From 9d74b4099120433780fef2665fdc08ef2033f417 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Fri, 11 Sep 2026 14:44:32 +0800 Subject: [PATCH] Update skill coverage for recent CLI capabilities --- skills/seal-use/SKILL.md | 23 +++++++++---- skills/seal-use/references/cli.md | 57 +++++++++++++++++++++++++++---- 2 files changed, 68 insertions(+), 12 deletions(-) diff --git a/skills/seal-use/SKILL.md b/skills/seal-use/SKILL.md index 4dfa31f..84cba31 100644 --- a/skills/seal-use/SKILL.md +++ b/skills/seal-use/SKILL.md @@ -39,8 +39,8 @@ seal-use corps list - 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-use corps ...`. -- Before write operations on rules, documents, style preferences, or publishing, fetch current state and confirm the intended mutation with the user. For supported configuration writes, prefer the universal `--dry-run` preview first (rules clear/push, preferences, thinking-depth policies, HoseCloud configure, and Webhook add/update/delete), then use `--yes` only after reviewing its redacted `changesDiff`. -- Knowledge document creation is currently irreversible: the upstream API exposes no delete operation. Validate `contentType` and `scenarios` before creating, and use `enabled: false` when the document should be withdrawn. +- Before write operations on rules, documents, style preferences, or publishing, fetch current state and confirm the intended mutation with the user. For supported configuration writes, prefer the universal `--dry-run` preview first (rules clear/push, `corps sync-test`, preferences, thinking-depth policies, HoseCloud configure, and Webhook add/update/delete), then use `--yes` only after reviewing its redacted `changesDiff`. +- Knowledge document creation and deletion are now supported. Validate `contentType` and `scenarios` before creating; use `enabled: false` when the document should be withdrawn without deletion. For an explicit deletion, re-read the document and obtain confirmation before using the low-level `seal_approval_delete_document` tool. - 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`. @@ -56,14 +56,16 @@ seal-use corps list - First install / zero configuration / “how do I connect my enterprise?” / user supplies app credentials, an assistance link, or F12/Network cURL: read `references/enterprise-onboarding.md`. Ask what material the user already has in plain language, then discover all remaining identifiers automatically. - User-facing Seal tenant assistance link (Seal 协助/Seal 授权/委托): resolve the named enterprise first, then run `seal-use delegation create --corp --note ''`; 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-use simulation create --mode hosecloud --flow-ids ... --no-wait --corp ` (合思指定单号) 或 `--mode material_pack --package-ids ... --schema-config file.json` (材料包导入), 支持多源系统 `--source-system `, `simulation status ` 单次查询状态, `simulation wait ` 轮询等待完成, `simulation clean ` 清理数据, `simulation specifications` 列出单据模板, `simulation list`/`get`/`batch-records` 查看批次与记录。创建前确认目标环境为测试环境。 -- 测试企业标记、关联与配置规则同步: `seal-use corps mark --env --confirm` (严格标记环境), `seal-use corps bind-test --confirm` (严格1对1下挂,禁止多层级串联), `seal-use corps unbind-test --confirm`, `seal-use corps sync-test [--dry-run|--yes] [--version-name ]` (将正式企业的偏好和草稿规则覆盖同步到测试企业并自动发布语义版本 `[Prod vN · #M]`,输出并本地缓存 `ruleMapping`,正式企业规则保持草稿态不发布), `seal-use rules map [--corp ] [--version ] [--code ]` (离线毫秒级速查测试与生产规则对照映射)。 +- 模拟测试发布闭环: `seal-use simulation create --mode hosecloud --flow-ids ... --no-wait --corp ` (合思指定单号) 或 `--mode material_pack --package-ids ... --schema-config file.json` (材料包导入), 支持多源系统 `--source-system `, `simulation status ` 单次查询状态, `simulation wait ` 轮询等待完成, `simulation clean ` 清理数据, `simulation specifications` 列出单据模板, `simulation approval-definitions` 查询飞书审批定义, `simulation list`/`get`/`batch-records` 查看批次与记录。创建前确认目标环境为测试环境。 +- 测试企业标记、关联与配置规则同步: `seal-use corps mark --env --confirm` (严格标记环境), `seal-use corps bind-test --confirm` (严格1对1下挂,禁止多层级串联), `seal-use corps unbind-test --confirm`, `seal-use corps sync-test [--dry-run|--yes] [--version-name ]` (将正式企业的偏好、草稿规则和知识文档覆盖同步到测试企业并自动发布语义版本 `[Prod vN · #M -> Test vM]`,输出并本地缓存 `versionMapping`/`ruleMapping`,正式企业规则保持草稿态不发布), `seal-use rules map [--corp ] [--version ] [--code ]` (离线毫秒级速查测试与生产规则对照映射)。 +- 规则本地工作流: `seal-use rules pull` 导出草稿规则,`rules lint` 做质量检查,`rules push --dry-run` 预览增量更新,确认后用 `--yes` 写入;`rules map` 查询 `corps sync-test` 生成的跨企业规则映射。规则版本与草稿/发布 code 空间的区别详见 `references/rule-lightweight.md` 和 `references/cli.md`。 - Seal AI 智能审核发布到合思费控: `seal-use deploy hosecloud --corp `; read `references/hose-enterprise-deploy.md`. - 审核决策偏好与思考深度: `seal-use preference get --corp `, `preference decision update --json '...' --corp `, `preference thinking-depth set --default --corp `, `preference thinking-depth policies --corp `. -- 审核大盘统计与去重分析: `seal-use approval-runs stats [--since 3months] [--dedupe-by sourceDocumentSN|id] --corp `, `seal-use approval-runs count --corp `. +- 审核大盘统计与去重分析: `seal-use approval-runs stats [--since 3months] [--dedupe-by sourceDocumentSN|sourceDocumentId|id] --corp `, `approval-runs count`, `analytics insight`, 以及 `approval-runs export`(Excel 报表);需要追踪单据时再使用 `url` 或 `bridge`。 - User-facing 合思 authorization link (合思/易快报授权): `seal-use auth hose-link --corp --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-use delegation list --corp `, `create [--note ...] --corp `, `create --from-link [--note ...]`, `revoke --corp `. -- User & Contacts Management (用户搜索、激活与一键代生成授权): `seal-use users search [keyword] --corp `, `users delegation --corp ` (仅适用于 Seal 本地创建的账号 `provider: local`;对合思同步账号系统拒绝重置密码,需改用 `auth hose-link`), `users activate --corp `, `users create --name ... --phone ... --corp `, `reset-password --corp `, `get --corp `, `delete --corp `. +- User & Contacts Management (用户搜索、激活与一键代生成授权): `seal-use users search [keyword] --corp `, `users delegation --corp ` (仅适用于 Seal 本地创建的账号 `provider: local`;对合思同步账号系统拒绝重置密码,需改用 `auth hose-link`), `users activate --corp `, `users create --name ... --phone ... --corp `, `users reset-password --corp `, `users get --corp `, `users delete --corp `. +- 只读业务数据与组织发现: `seal-use contacts departments|children|users|sync-time --corp `, `seal-use data expenses|invoices --corp `, `seal-use analytics insight --corp `, `seal-use context --corp `, `seal-use source config --corp `;这些查询优先用于定位企业结构、原始费用/发票和当前审核知识,不要把结果误当成写操作。 - LLM Model Config & Providers: `seal-use llm config --corp `, `seal-use llm providers --corp `. - System Permissions Config: `seal-use permissions available --corp `, `seal-use permissions configs --corp `. - Billing & Feature Quotas: `seal-use billing status --corp `, `seal-use billing plans --corp `, `seal-use billing features --corp `. @@ -103,6 +105,9 @@ seal-use approval-runs result --corp --summary seal-use rules count --corp seal-use rules list --corp --summary seal-use rules lint --corp --summary +seal-use rules pull --corp --out ./rules.local.json +seal-use rules push --corp --file ./rules.local.json --dry-run +seal-use rules map --corp --version latest seal-use rules clear --corp --dry-run seal-use rules clear --corp --yes seal-use rules get --corp --version 16 --code '#0038' @@ -113,6 +118,12 @@ seal-use simulation package-upload <材料包.zip> --corp seal-use simulation list --corp seal-use simulation get --corp seal-use simulation batch-records --corp +seal-use simulation status --corp +seal-use simulation approval-definitions --corp +seal-use approval-runs export --corp --downloads --completed-only +seal-use analytics insight --corp +seal-use contacts departments --corp +seal-use data invoices --corp --limit 20 seal-use tool seal_approval_search --corp --json '{"keywords":["差旅","发票"],"areas":["rules"],"snippetOnly":true,"maxChars":500,"fields":["id","title","snippet"]}' ``` diff --git a/skills/seal-use/references/cli.md b/skills/seal-use/references/cli.md index e9c4e7c..1dc3a22 100644 --- a/skills/seal-use/references/cli.md +++ b/skills/seal-use/references/cli.md @@ -9,8 +9,11 @@ seal-use Enterprise config lookup: - If `SEAL_USE_ENTERPRISES_DIR` is set, only that directory is loaded. -- Otherwise `./enterprises` and `~/.config/seal-use/enterprises` are merged. -- User-level configs override same-ID local configs. +- Otherwise the user-level `~/.config/seal-use/enterprises` directory is loaded. A configured + `testEnterprisesDir` is loaded first for test-tenant workflows. The current working directory's + `./enterprises` directory is not loaded implicitly. +- Set `SEAL_USE_ENTERPRISES_DIR` to use one explicit directory instead. Legacy + `~/.config/seal-home/enterprises` files are migrated to the primary directory when possible. Enterprise selection is stateless by default. Commands that access an enterprise require `--corp ` unless stateful mode is explicitly enabled: @@ -39,13 +42,33 @@ seal-use config get seal-use config mode [--corp ] seal-use config test-dir [|--clear] seal-use config lint [--linter ] [--min-score ] +seal-use rules count [--corp ] +seal-use rules list [--summary] [--count] [--limit 20] [--offset 0] [--corp ] +seal-use rules clear [--corp ] [--dry-run|--yes] +seal-use rules versions [--corp ] +seal-use rules version [--corp ] +seal-use rules get --corp --version --code '#0038' +seal-use rules get --corp --record-id --runtime-id rule-205 +seal-use rules search [--version ] [--maxResults 20] [--corp ] seal-use rules pull [--corp ] [--version ] [--out ] seal-use rules lint [--file ] [--corp ] [--linter ] [--version ] [--code ] [--min-score ] [--summary] seal-use rules push [--file ] [--corp ] [--publish] [--version-name ] [--dry-run|--yes] +seal-use rules map [--corp ] [--version ] [--code ] seal-use service [--port 8787] [--host 127.0.0.1] [--lines 50] seal-use http [--port 8787] [--host 127.0.0.1] seal-use serve [--port 8787] -seal-use update +seal-use update [--check] [--force] [--version ] +seal-use update check +seal-use update changelog [--limit ] +seal-use changelog [--limit ] +seal-use mcp +seal-use mcp config +seal-use mcp-config +seal-use skill dump +seal-use skill install [--dir |--local] +seal-use skill status +seal-use openapi +seal-use probe [] seal-use tools list seal-use corps list [--corp ] seal-use corps current [--corp ] @@ -63,6 +86,9 @@ seal-use delegation list [--corp ] seal-use delegation create [--note ] [--from-link ] [--corp ] seal-use delegation revoke [--corp ] seal-use users create --name --phone [--dept ] [--corp ] +seal-use users search [--corp ] +seal-use users delegation [--note ] [--corp ] +seal-use users activate [--corp ] seal-use users reset-password [--corp ] seal-use users get [--corp ] seal-use users delete [--corp ] @@ -79,14 +105,18 @@ seal-use permissions configs [--corp ] seal-use billing status [--corp ] seal-use billing plans [--corp ] seal-use billing features [--corp ] +seal-use webhook ready [<材料包.zip>] [--webhook ] [--corp ] +seal-use webhook status [<材料包.zip>] [--corp ] seal-use webhook list [--query ] [--show-secret] [--corp ] seal-use webhook get|find [--show-secret] [--corp ] seal-use webhook add --name --result-url [--mode assisted|semi_automatic|fully_automatic] [--auto-approval-rate 60] [--secret ] [--min-file-size ] [--max-file-size ] [--allowed-extensions <.pdf,.xlsx,...>] [--dry-run] [--corp ] seal-use webhook update [--name ] [--result-url ] [--mode assisted|semi_automatic|fully_automatic] [--auto-approval-rate 60] [--secret |--rotate-secret] [--min-file-size ] [--max-file-size ] [--allowed-extensions <.pdf,.xlsx,...>] [--clear-max-file-size] [--dry-run] [--corp ] seal-use webhook delete [--yes|--dry-run] [--corp ] +seal-use webhook material-pack preview <材料包.zip|信息表.xlsx> [--min-file-size ] [--max-file-size ] [--allowed-extensions <.pdf,.xlsx,...>] [--corp ] +seal-use webhook material-pack push <材料包.zip|信息表.xlsx> [--webhook ] [--corp ] seal-use deploy hosecloud requirements [--corp ] seal-use deploy hosecloud list [--corp ] -seal-use deploy hosecloud get [] [--corp ] +seal-use deploy hosecloud get [--corp ] seal-use deploy hosecloud status [--corp ] seal-use deploy hosecloud configure --json '{...}' [--dry-run] [--corp ] seal-use deploy hosecloud sync [] [--auto] [--corp ] @@ -96,6 +126,7 @@ seal-use preference thinking-depth set --default [--dry-run] [--co seal-use preference thinking-depth policies list [--corp ] seal-use preference thinking-depth policies upsert --json '{...}' [--dry-run] [--corp ] seal-use preference thinking-depth policies remove [--dry-run] [--corp ] +seal-use context [--ruleVersion ] [--documentLimit 50] [--corp ] seal-use source config [--corp ] seal-use tool [--corp ] [--json '{"key":"value"}'] seal-use approval-runs summary --corp [--date YYYY-MM-DD] [--timezone Asia/Shanghai] @@ -149,6 +180,14 @@ Identity and session: - `seal-use corps list` - `seal-use corps current` +Read-only discovery: + +- `seal-use contacts departments|children|users|sync-time --corp ` queries the tenant's organization tree and last directory sync time. +- `seal-use data expenses|invoices --corp [--search ] [--start-date ] [--end-date ] [--offset ] [--limit ]` queries paginated raw expense or invoice records. +- `seal-use analytics insight --corp [--start-date ] [--end-date ] [--limit ]` queries risk-tag statistics; omitted dates use the current month. +- `seal-use context --corp [--ruleVersion ] [--documentLimit 50]` aggregates rules, knowledge documents, and style preferences. +- `seal-use source config --corp ` resolves the live source-system configuration without changing it. + Test Enterprise Binding & Staging Synchronization: - **1-to-1 Association**: One production enterprise can only bind at most one test enterprise (`corps bind-test `). Multi-tier chaining is rejected. @@ -191,6 +230,11 @@ Approval run lightweight queries: Approval knowledge documents & style: +- `seal-use tool seal_approval_documents_list --corp --json '{"limit":50}'` +- `seal-use tool seal_approval_document_get --corp --json '{"documentId":"doc-id"}'` +- `seal-use tool seal_approval_document_create --corp --json '{"title":"标题","purpose":"用途","content":"Markdown 内容","contentType":"policy","scenarios":["audit"]}'` +- `seal-use tool seal_approval_document_update --corp --json '{"documentId":"doc-id","enabled":false}'` +- `seal-use tool seal_approval_delete_document --corp --json '{"documentId":"doc-id"}'` (删除前必须重新读取并确认) - `seal-use rules get --corp --version --code '#0038'` - `seal-use rules get --corp --record-id --runtime-id rule-205` @@ -208,7 +252,7 @@ Webhook integrations: Webhook writes read the current AI approval config and POST the merged full config back to `api/v1/agent/ai-approval/config`, preserving non-Webhook integrations. List/get mask `secret` by default; add returns the generated secret once. Each Webhook can also store a mutable `materialPackFilePolicy` with `minFileSizeBytes`, optional `maxFileSizeBytes`, and `allowedExtensions`. Update is a patch: omitted policy fields are retained; `allowedExtensions` replaces the complete list; `--clear-max-file-size` removes the upper bound. -All supported configuration writes accept `--dry-run`: rules clear/push, preference updates, thinking-depth policy changes, HoseCloud configure, and Webhook add/update/delete. Preview mode performs read-only discovery and returns JSON with `preview: true`, the exact `targetUrl`, a redacted `changesDiff` (`before`/`after`), and `impactCount`. It never sends the mutation request and does not require `--yes`; use the same command with `--yes` only after reviewing the preview. +All supported configuration writes accept `--dry-run`: rules clear/push, `corps sync-test`, preference updates, thinking-depth policy changes, HoseCloud configure, and Webhook add/update/delete. Preview mode performs read-only discovery and returns JSON with `preview: true`, the exact `targetUrl`, a redacted `changesDiff` (`before`/`after`), and `impactCount`. It never sends the mutation request and does not require `--yes`; use the same command with `--yes` only after reviewing the preview. Approval runs, simulations, and Langfuse bridge: @@ -217,6 +261,7 @@ Approval runs, simulations, and Langfuse bridge: - `seal-use approval-runs bridge --corp [--sourceDocumentSN ]` - `seal-use simulation create --mode hosecloud --flow-ids ... --no-wait --corp ` returns immediately with an `asyncTicket` (creation is non-blocking by default for compatibility). - `seal-use simulation status --corp ` performs one non-blocking status check and returns `QUEUED`/`RUNNING`/`COMPLETED`/`FAILED`-style state plus counters. +- `seal-use simulation approval-definitions --corp ` lists available Feishu approval definitions so an `approvalCode` can be selected before creating a batch. - `seal-use simulation wait --corp ` - `seal-use simulation clean --corp ` - `seal-use simulation list --corp ` @@ -355,7 +400,7 @@ Create a document: `contentType` 必须是 `document`、`video`、`pdf`、`feishu_doc` 或 `policy` 之一;`scenarios` 必填且至少包含一个 `fill`(智能填单)或 `audit`(智能审核)。这里的 `scenarios` 是产品能力开关,不是费用类别或业务场景名。 -知识文档创建后当前 API 没有删除接口,创建操作不可逆;请在写入前确认标题、正文、内容类型和能力场景。需要撤下内容时,优先使用更新操作并设置 `enabled: false`(如果上游支持该字段),不要通过试探性创建来验证参数。规则支持删除,但知识文档与规则的生命周期能力并不对称。 +知识文档支持通过 `seal_approval_delete_document` 删除,且 `corps sync-test` 会在按标题对账时删除测试企业中多余的文档;删除仍是破坏性写操作,必须在写入前重新读取并确认标题/ID。若只是暂时撤下内容,优先使用更新操作并设置 `enabled: false`。 Update a document: