Files
seal-use/skills/seal-home/SKILL.md
T
gitea 7bc98389eb
🧪 CI / 🧪 Test, Type-Check & Build Validation (push) Has been cancelled
🚀 Release / 🚀 Build & Publish Multi-Platform Binaries (push) Has been cancelled
Release v0.9.5: Optimize CI/CD pipelines, enable parallel builds, and add SHA-256 checksums
2026-08-27 16:10:50 +08:00

10 KiB

name, description, metadata
name description metadata
seal-home v0.9.5: Use when working with Seal Home tenant operations: packaged customer feedback from WeChat or screenshots, target-enterprise discovery, approval-run and Langfuse diagnosis, simulation test batch creation and publishing, minimal approval-rule remediation and publishing, delegation links, Hose/合思 authorization, LLM config, permissions, billing, users, rules, documents, and search.
version short-description
0.9.5 Seal tenant and Hose approval automation (v0.9.5)

Seal Home (v0.9.5)

Use the seal_cli MCP tool when it is available; pass the command string as its command argument. If MCP is unavailable, fall back to the global seal-home CLI. This skill is a routing layer for agents: keep this file short, choose the right command, and read a focused reference only when the task needs detail.

seal-home help
seal-home version
seal-home tools list

First Rules

  • Prefer compact commands first: pick, --summary, --fields, attachments --summary, rules count, and rules list --summary.
  • Parse JSON stdout. Do not scrape human text.
  • Do not hand-edit enterprise configs for normal setup. Use seal-home corps ....
  • Before write operations on rules, documents, style preferences, or publishing, fetch current state and confirm the intended mutation with the user. For repeat test-environment rule resets, prefer rules clear --dry-run followed by rules clear --yes.
  • For customer-feedback rule remediation, show an exact field-level diff and obtain explicit approval before updating. Default to changing only the narrowest necessary part of description; preserve scope, strictness, and unrelated clauses unless the user explicitly approves otherwise.
  • Resolve and lock the target enterprise corpId before diagnosis or mutation. Never assume the current tenant is the customer tenant. Re-fetch the target rule immediately before updating, then verify the draft and newly published version after writing.
  • For date questions, use explicit dates and --timezone Asia/Shanghai.
  • If output may be large, use --summary, --fields, --count, or --output-file; use --full only when the user really needs full payloads.
  • When returning ANY authorization, login, or delegation links (e.g. 合思授权链接, Seal授权链接/委托链接), ALWAYS provide BOTH a code block (```text ... ```) for easy copying without accidental default browser redirection, AND a clickable hyperlink.
  • For delegation links, always prefer seal-home delegation create over users delegation for link generation to ensure persistent token tracking.
  • Never treat “Seal 协助/Seal 授权/委托” as a 合思授权入口. They are different links and must use different commands.
  • In the default stateless mode, every enterprise command requires --corp <corpId>. In stateful mode, omitting --corp uses the configured default enterprise and is unsafe for an explicitly named enterprise.
  • For an explicitly named enterprise, first resolve it with seal-home corps list, then pass its exact corpId to every command. After creation, verify the returned URL host matches that enterprise's Seal tenant; if the host is the current/default tenant or cannot be verified, do not present the link as the target enterprise's link.

Route By Intent

  • User-facing Seal tenant assistance link (Seal 协助/Seal 授权/委托): resolve the named enterprise first, then run seal-home delegation create --corp <corpId> --note '<enterprise>'; verify the returned hostname is that tenant's Seal hostname. Always provide BOTH a code block (```text ... ```) AND a hyperlink.
  • Packaged customer feedback → approval-rule remediation: read references/customer-feedback-rule-remediation.md. Use this route for WeChat messages, screenshots, rejection notifications, document numbers, customer complaints, expected approval behavior, rule-only mitigation, exact diffs, or requests to update and publish a rule version.
  • 模拟测试发布闭环: seal-home simulation create --mode hosecloud --flow-ids ... --corp <corpId> (合思指定单号) 或 --mode material_pack --package-ids ... --schema-config file.json (材料包导入), 支持多源系统 --source-system <hosecloud|feishu|weaver|helios|maycur|material_pack>, simulation wait <batchId> 轮询等待完成, simulation clean <batchId> 清理数据, simulation specifications 列出单据模板, simulation list/get/batch-records 查看批次与记录。创建前确认目标环境为测试环境。
  • HoseCloud 部署与同步发布: seal-home deploy hosecloud <requirements|list|get|status|configure|sync> --corp <corpId>.
  • 审核决策偏好与思考深度: seal-home preference get --corp <corpId>, preference decision update --json '...' --corp <corpId>, preference thinking-depth set --default <medium|high> --corp <corpId>, preference thinking-depth policies <list|upsert|remove> --corp <corpId>.
  • 审核大盘统计与去重分析: seal-home approval-runs stats [--since 3months] [--dedupe-by sourceDocumentSN|id] --corp <corpId>, seal-home approval-runs count --corp <corpId>.
  • User-facing 合思 authorization link (合思/易快报授权): seal-home auth hose-link --corp <corpId> --expire 7200; read references/hose-enterprise-auth.md. Never use this route when the user says Seal 协助. Always provide BOTH a code block (```text ... ```) AND a hyperlink.
  • Delegation links management: seal-home delegation list --corp <corpId>, create [--note ...] --corp <corpId>, revoke <tokenId> --corp <corpId>.
  • User & Contacts Management (用户搜索、激活与一键代生成授权): seal-home users search [keyword] --corp <corpId>, users delegation <userIdOrPhone> --corp <corpId> (仅适用于 Seal 本地创建的账号 provider: local;对合思同步账号系统拒绝重置密码,需改用 auth hose-link), users activate <userId> --corp <corpId>, users create --name ... --phone ... --corp <corpId>, reset-password <userId> --corp <corpId>, get <userId> --corp <corpId>, delete <userId> --corp <corpId>.
  • LLM Model Config & Providers: seal-home llm config --corp <corpId>, seal-home llm providers --corp <corpId>.
  • System Permissions Config: seal-home permissions available --corp <corpId>, seal-home permissions configs --corp <corpId>.
  • Billing & Feature Quotas: seal-home billing status --corp <corpId>, seal-home billing plans --corp <corpId>, seal-home billing features --corp <corpId>.
  • Webhook 审批回调管理: seal-home webhook <list|get|add|update|delete> --corp <corpId>.
  • HTTP REST API & Docs Server: seal-home http [--port 8787] [--host 127.0.0.1] (提供 /docs 交互文档、/openapi.json、POST /api/cli 与 /v1/* REST API)。
  • Full CLI inventory: read references/cli.md.

High-Value Commands

seal-home approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --latest
seal-home approval-runs pick --corp <corpId> --sn <sourceDocumentSN> --batch <batchId> --latest --fields recordId,status,aiDecision,aiSummary
seal-home approval-runs get <recordId> --corp <corpId> --summary
seal-home approval-runs get <recordId> --corp <corpId> --fields metadata,document.fields,result.summary
seal-home approval-runs document-summary <recordId> --corp <corpId>
seal-home approval-runs cited-rules <recordId> --corp <corpId>
seal-home approval-runs attachments <recordId> --corp <corpId> --summary
seal-home approval-runs result <recordId> --corp <corpId> --summary
seal-home rules count --corp <corpId>
seal-home rules list --corp <corpId> --summary
seal-home rules clear --corp <corpId> --dry-run
seal-home rules clear --corp <corpId> --yes
seal-home rules get --corp <corpId> --version 16 --code '#0038'
seal-home rules get --corp <corpId> --record-id <recordId> --runtime-id rule-205
seal-home simulation create --corp <corpId> --mode hosecloud --flow-ids "B26017701,B26022501" [--reject-node 财务] [--thinking-depth default|medium|high]
seal-home simulation create --corp <corpId> --mode material_pack --package-ids <materialPackageId> [--schema-config file.json]
seal-home simulation package-upload <材料包.zip> --corp <corpId>
seal-home simulation list --corp <corpId>
seal-home simulation get <batchId> --corp <corpId>
seal-home simulation batch-records <batchId> --corp <corpId>
seal-home tool seal_approval_search --corp <corpId> --json '{"keywords":["差旅","发票"],"areas":["rules"],"snippetOnly":true,"maxChars":500,"fields":["id","title","snippet"]}'

Important Fields

  • sourceDocumentSN: external document number, often the easiest 合思/易快报 lookup key.
  • sourceDocumentId: external source document ID.
  • recordId: Seal approval run record ID.
  • simulationBatchId: simulation batch identifier.
  • status: run status.
  • taskMode / finalExecutionMode: execution mode information.
  • ruleSetVersionNumber: approval rule version used by a run.
  • langfuseTraceId: direct Langfuse trace lookup key.
  • langfuseSessionFallback: fallback session key, usually hosecloud-{sourceDocumentSN}.

References

  • references/approval-run-lightweight.md: 单号定位、字段裁剪、摘要、引用规则、单据摘要、附件摘要。
  • references/rule-lightweight.md: 规则 count/list summary、按版本/编号取单条规则、规则搜索裁剪。
  • references/customer-feedback-rule-remediation.md: 微信/截图反馈包到企业定位、审批追踪、根因分类、最小规则 diff、确认、发布与验收的固定闭环。
  • references/hose-enterprise-auth.md: Hose 企业配置、认证诊断、授权链接。
  • references/approval-attachment-trace.md: 附件/发票/OCR/图片争议的 Langfuse 追踪工作流。
  • references/cli.md: 完整 CLI 命令清单。

Safety

Rule, document, style preference, and publish actions mutate Seal configuration. Make the target enterprise explicit, show the intended payload, and verify after the write. Never send real enterprises/*.json files, tokens, signed URLs, or full raw documents to GitHub, tickets, logs, or chat unless the user explicitly requests a safe export.