diff --git a/README.md b/README.md index c247c71..579cb33 100644 --- a/README.md +++ b/README.md @@ -79,12 +79,12 @@ Create a user-level Hose enterprise config that works from any directory: ```bash mkdir -p ~/.config/seal-use/enterprises -seal-use corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}' +seal-use corps add-hose-persistent --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}' seal-use auth diagnose --corp seal-use tools list ``` -`corps add-hose` verifies by default before writing the config. It uses the Hose OpenAPI credential response to derive the corporation ID, then checks provisional auth, Seal SSO, and Seal `whoami`. Pass `"force":true` or `"verify":false` only when you intentionally want to write a config that may fail later. +`corps add-hose-persistent` verifies by default before writing the config. It uses the Hose OpenAPI credential response to derive the corporation ID, then checks provisional auth, Seal SSO, and Seal `whoami`. Pass `"force":true` or `"verify":false` only when you intentionally want to write a config that may fail later. The old `add-hose` spelling remains a compatibility alias. Create a user-level Seal-native enterprise config from an already signed-in Seal Use page: diff --git a/scripts/install.sh b/scripts/install.sh index e928f07..2756f4b 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -273,7 +273,7 @@ echo "✨ seal-use successfully installed to ${TARGET_PATH}!" "$TARGET_PATH" version echo "" echo "Quick start:" -echo " 1. Add enterprise: seal-use corps add-hose --json '{...}'" +echo " 1. Add enterprise: seal-use corps add-hose-persistent --json '{...}'" echo " 2. View MCP config: seal-use mcp-config" echo " 3. Self-update: seal-use update" echo "" diff --git a/skills/seal-use/SKILL.md b/skills/seal-use/SKILL.md index b742807..b79ee90 100644 --- a/skills/seal-use/SKILL.md +++ b/skills/seal-use/SKILL.md @@ -15,6 +15,21 @@ metadata: - 机器字段(如 `checkedAt`、`lastCheckedAt`)保留 ISO 8601 UTC 格式,精确到秒,例如 `2026-09-22T04:56:06Z`;不要改成本地时间或添加毫秒。 - Agent 面向用户解释时间时,必须将 UTC 换算为北京时间(`Asia/Shanghai`,`UTC+8`),明确标注“北京时间”;需要审计或消歧时同时附上原始 UTC 时间。 +### 企业接入路由约定 + +必须区分“用户提供的材料”“最终企业来源”和“标准化 CLI 入口”三个概念: + +| 用户材料 | Agent 预处理后的标准入口 | 说明 | +|---|---|---| +| 合思开放平台 `appKey + appSecurity` | `corps add-hose-persistent` | 纯 Hose 长期凭据入口;自动探测域名、企业和管理员。 | +| Seal URL + Bearer Token,或从 Seal 后台复制的 cURL | `corps add-seal` | 两者是同一类 Seal 会话凭据;cURL 只需提取必要字段后再调用 `add-seal`。 | +| Seal 原生委托链接,或合思协助链接 | `corps add-link` | `add-link` 是 URL 混合入口,自动识别 Seal 与 Hose 链接;它不直接接收 cURL。 | +| 从已登录合思管理员页面复制的 cURL | 优先提取密钥后调用 `corps add-hose-persistent`;失败时经 Hose→Seal SSO 换取 Seal Bearer 后调用 `corps add-seal` | Hose `accesstoken` 与 Seal Bearer 不是同一种 token;不能直接混用。 | + +**Token 类型不得混用**:`add-seal` 只接受 Seal Bearer Token;合思网页 cURL 中的 `accesstoken` 只能用于 Hose API 和密钥提取,提取失败后必须先经 SSO 换成 Seal Bearer,不能直接作为 `add-seal` 的 `token`。 + +`add-link` 的默认行为是导入临时会话。只有明确使用 `--elevate-hose` 时,才执行合思提权并提取长期 OpenAPI 凭据;`--as-hose` 仅作为兼容旧参数,不作为 Agent 的默认表达。 + --- ## 0. 全局业务术语与对外输出契约(Mandatory Vocabulary Contract)⚠️ 核心红线 @@ -63,7 +78,7 @@ metadata: ![网络Fetch/XHR](assets/hose-curl-network-fetch-xhr.png) 3. 找到任一正常业务请求,右键「复制」-「以 cURL 格式复制」: ![以cURL格式复制](assets/hose-curl-copy-as-curl.png) -3. **无感接入**:Agent 接收材料后自动执行 `corps add-hose`、`corps add-link` 或 `corps hose-extract-keys --save`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 `corpId` 或 `staffId`。详阅 `references/first-time-user.md` 与 `references/enterprise-onboarding.md`。 +3. **无感接入**:Agent 接收材料后自动执行 `corps add-hose-persistent`、`corps add-seal`、`corps add-link` 或 `corps hose-extract-keys --save`,系统自动反查拉取真实企业中文名,自动绑定管理员,完成接入。无需用户手动查找 `corpId` 或 `staffId`。详阅 `references/first-time-user.md` 与 `references/enterprise-onboarding.md`。 --- @@ -75,7 +90,7 @@ metadata: `corps` 是企业上下文的总入口,推荐按“接入 → 发现与选择 → 环境配对 → 测试验证”的主线使用;Hose 能力是针对合思来源企业的专属子域,不应覆盖原生 Seal 主流程。 -- **企业接入(主入口)**:`add-link`(自动识别 Seal 原生委托链接或 Hose 协助链接,原生 Seal 优先)、`add-seal`、`add-hose`。 +- **企业接入(主入口)**:`add-link`(自动识别 Seal 原生委托链接或 Hose 协助链接,原生 Seal 优先)、`add-seal`、`add-hose-persistent`。 - **发现与选择(高频管理)**:`list`、`search`/`find`、`get`/`show`、`current`、`switch`。 - **企业配置(低频维护)**:`mark`、`rename`。 - **测试配对与验证(生产变更闭环)**:`bind-test`、`unbind-test`、`sync-test`、`replay-test`;回归测试统一使用 `seal-use test regression`。 diff --git a/skills/seal-use/references/cli.md b/skills/seal-use/references/cli.md index dac7740..1d258da 100644 --- a/skills/seal-use/references/cli.md +++ b/skills/seal-use/references/cli.md @@ -87,7 +87,7 @@ seal-use corps bind-test [--confirm] [--force] seal-use corps unbind-test [] [--confirm] seal-use corps sync-test [] [--dry-run] [--yes] [--version-name ] seal-use corps replay-test [] [--record-id ] [--sn ] [--limit ] [--status ] [--webhook ] [--sn-suffix ] [--dry-run] [--confirm|--yes] [--force] -seal-use corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}' +seal-use corps add-hose-persistent --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}' seal-use corps add-seal --json '{"sealUrl":"https://tenant.sealai.cc","token":"seal-bearer-token"}' seal-use corps add-link [--name ] [--elevate-hose] [--app-key ] [--key-id ] [--overwrite] [--dry-run] seal-use corps probe-hose --json '{"appKey":"...","appSecurity":"...","domain":"https://..."}' @@ -214,7 +214,7 @@ Use the command groups in this order for normal work: **enterprise onboarding** - `seal-use corps add-link [--name ] [--elevate-hose] [--app-key ] [--key-id ] [--overwrite] [--dry-run]` is the preferred onboarding entry point: it auto-detects a Seal native delegate link or a Hose assistance link. Native Seal links are registered as native Seal enterprises; Hose links can remain short-lived or use `--elevate-hose` for durable Hose credentials. The legacy `--as-hose` alias remains accepted for compatibility. `--dry-run` never writes local config. - `seal-use corps add-seal --json '{"sealUrl":"https://tenant.sealai.cc","token":"..."}'` registers a native Seal enterprise directly. -- `seal-use corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"..."}'` registers a Hose enterprise from durable OpenAPI credentials. +- `seal-use corps add-hose-persistent --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"..."}'` registers and persists a Hose enterprise from durable OpenAPI credentials. The old `add-hose` spelling remains a compatibility alias. - `seal-use corps list [query] [--env ] [--limit ] [--all] [--strict] [--corp ]` (defaults to displaying the top 10 most frequently used enterprises in the last 7 days; sorting is automatic and query results keep relevance order) - `seal-use corps search [--env ] [--strict]` (intelligent soft search by default: case-insensitive, Chinese homophones, front/back nasal vowels, flat/retroflex consonants, initials, typo/missing letter tolerance; pass `--strict` for exact substring match) - `seal-use corps get ` (rich enterprise attributes with sensitive secrets safely redacted) @@ -350,14 +350,14 @@ Approval runs, simulations, and Langfuse bridge: Add and verify a Hose enterprise: ```bash -seal-use corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}' +seal-use corps add-hose-persistent --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId"}' seal-use auth check --corp ``` Force-write a Hose config without verification: ```bash -seal-use corps add-hose --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId","force":true}' +seal-use corps add-hose-persistent --json '{"name":"企业名称","domain":"https://app.ekuaibao.com","appKey":"...","appSecurity":"...","proxyStaffBizId":"corpId:staffId","force":true}' ``` Check auth failures: diff --git a/skills/seal-use/references/enterprise-onboarding.md b/skills/seal-use/references/enterprise-onboarding.md index 68b5c99..9f4a82e 100644 --- a/skills/seal-use/references/enterprise-onboarding.md +++ b/skills/seal-use/references/enterprise-onboarding.md @@ -41,14 +41,21 @@ Classify both the enterprise identity origin and how the current credential was | Hose/合思-sourced Seal tenant | Hose `appKey` + `appSecurity` | 【最高·永久】自动签名/续期 | Stable, refreshable standard integration; unlocks full OpenAPI and `deploy hosecloud sync`. | | Hose/合思-sourced Seal tenant | Hose authorization/assistance link (`thirdparty.html`) | 【两极分化】普通导入→短效;提权→永久 | Temporary session that can be **elevated** to permanent `appKey`/`appSecurity` with `extract-keys --save` or `add-link --elevate-hose`. | | Hose/合思-sourced Seal tenant | cURL copied from an authenticated **Hose admin** page | 【两极分化】普通导入→短效;提权→永久 | **Same session scope as an assistance link.** If the user is a Hose administrator, this carries the same web session credentials (`accesstoken`, `corpid`, cookies) and can equally invoke `/api/innerapi/v1/key` to extract permanent `appKey`/`appSecurity`. | -| Hose/合思-sourced Seal tenant | cURL copied from an authenticated Seal page | 【短效会话快照】 | Snapshot with Seal Bearer token; can set up temporary Seal session access. | | Seal-native tenant | Seal assistance/delegation link | 【临时·可撤销】 | Temporary delegated access to a Seal tenant. | -| Seal-native tenant | cURL copied from an authenticated Seal page | 【短效会话快照】 | Snapshot containing the Seal host and session authentication. | +| Seal-native tenant | Seal URL + Bearer Token, or cURL copied from an authenticated Seal page | 【短效会话快照】 | Both normalize to `add-seal`; the cURL is only a transport format for the same Seal Bearer credential. | **同等凭据原则(Equal Credential Scope Principle)**: A Hose assistance link and a browser cURL from an authenticated Hose admin session are both Hose web frontend sessions — they carry the same underlying `accessToken`/`accesstoken` and `corpid`. The **only** structural difference is delivery format. When a Hose administrator sends you a cURL, treat it with the same privilege elevation potential as an assistance link. Do not downgrade it to a plain Seal session import without first attempting key extraction. Credential shape alone does not define identity origin. In particular, a Hose-sourced user eventually receives a Seal Bearer session after SSO. When `whoami` returns provider metadata, preserve it and use it to describe the tenant accurately. +### Token boundary + +The Hose web-session `accesstoken` and the Seal Bearer Token are different credentials and are not interchangeable: + +- `corps add-seal` accepts the Seal Bearer Token together with `sealUrl`. +- A Hose cURL's `accesstoken` is used first for Hose key extraction. If no permanent OpenAPI key can be extracted, exchange the Hose session through Seal SSO and only then call `add-seal` with the resulting Seal Bearer Token. +- Never pass a Hose `accesstoken` directly as the `token` field of `add-seal`. + ## Parameter Ownership Ask the user only for information that cannot be discovered safely: @@ -67,7 +74,7 @@ Ask the user only for information that cannot be discovered safely: This is the preferred durable route for a Hose-sourced tenant. Read `hose-enterprise-init.md`, then use: ```bash -seal-use corps add-hose --json '{"appKey":"...","appSecurity":"..."}' +seal-use corps add-hose-persistent --json '{"appKey":"...","appSecurity":"..."}' ``` The CLI probes the standard domains, discovers the corporation, and discovers administrator candidates. If it returns multiple candidates, show only useful identifying information and ask which person should be used; retry with `staffName`, `staffPhone`, or the selected `staffId` internally. After creation, run: @@ -113,7 +120,7 @@ seal-use corps hose-keys [--reveal] seal-use auth hose-keys --corp [--reveal] ``` -When using standard `add-link` with a Seal delegate link, it consumes the token directly against the Seal tenant and persists the verified Seal session. When using standard `add-link` with a Hose link (without `--elevate-hose`), it exchanges the temporary Hose token at the target Seal tenant and stores the short-lived Seal session. When `--elevate-hose` is used on a Hose link, the CLI executes Hose subdomain privilege elevation to register a durable standard Hose configuration. The legacy `--as-hose` alias remains accepted for compatibility. +When using standard `add-link` with a Seal delegate link, it consumes the token directly against the Seal tenant and persists the verified Seal session. When using standard `add-link` with a Hose link (without `--elevate-hose`), it exchanges the temporary Hose session through Seal SSO and stores the resulting short-lived Seal Bearer session. When `--elevate-hose` is used on a Hose link, the CLI executes Hose subdomain privilege elevation to register a durable standard Hose configuration. The legacy `--as-hose` alias remains accepted for compatibility. Assistance links are credentials. Do not follow a link merely to inspect it when the user's request was only explanatory, and never publish, log, or commit it. diff --git a/skills/seal-use/references/first-time-user.md b/skills/seal-use/references/first-time-user.md index d4e0485..a3698d3 100644 --- a/skills/seal-use/references/first-time-user.md +++ b/skills/seal-use/references/first-time-user.md @@ -71,8 +71,10 @@ macOS 也可以使用 `Option + Command + I`;Windows 常见快捷键是 `F12` 助手会先判断这条请求来自合思网页还是 Seal 网页: -- **合思网页**:读取请求主机、会话令牌和企业标识。若当前登录人具备管理员权限,优先尝试把短期网页会话提升为长期 OpenAPI 凭据;否则导入为临时会话。 -- **Seal 网页**:读取 Seal 主机和 Bearer 会话,验证当前租户和用户身份。 +- **合思网页**:读取请求主机、Hose `accesstoken` 和企业标识。若当前登录人具备管理员权限,优先提取长期 OpenAPI 凭据并调用 `add-hose-persistent`;否则先经 Hose→Seal SSO 换取 Seal Bearer,再调用 `add-seal`。 +- **Seal 网页**:读取 Seal 主机和 Bearer 会话,整理为 `sealUrl + token` 后调用 `add-seal`。 + +注意:cURL 是 Agent 的输入材料,不是 `add-link` 的参数。`add-link` 只接收 Seal 委托链接或合思协助链接,并负责自动识别这两类 URL。 这些步骤由助手完成,用户不需要从 cURL 中手动寻找 token、企业 ID 或员工 ID。 diff --git a/skills/seal-use/references/hose-enterprise-auth.md b/skills/seal-use/references/hose-enterprise-auth.md index b9bb419..a2c4ad8 100644 --- a/skills/seal-use/references/hose-enterprise-auth.md +++ b/skills/seal-use/references/hose-enterprise-auth.md @@ -6,16 +6,16 @@ Use this reference for Hose/合思 enterprise configuration and user-facing Hose Use the CLI for normal enterprise setup. Do not inspect source code or hand-edit `~/.config/seal-use/enterprises/*.json` unless the CLI fails or the user explicitly asks for low-level config debugging. -For first-time setup or when the user has an assistance link or browser cURL instead of standard application credentials, read `enterprise-onboarding.md` first. This reference's `add-hose` route is specifically for durable Hose OpenAPI credentials. +For first-time setup or when the user has an assistance link or browser cURL instead of standard application credentials, read `enterprise-onboarding.md` first. This reference's `add-hose-persistent` route is specifically for durable Hose OpenAPI credentials. ```bash -seal-use corps add-hose --json '{"appKey":"...","appSecurity":"..."}' +seal-use corps add-hose-persistent --json '{"appKey":"...","appSecurity":"..."}' seal-use corps list seal-use corps current --corp seal-use corps switch ``` -`corps add-hose` probes standard domains and discovers the enterprise automatically. If it returns multiple administrator candidates, present their names and masked phones for the user to choose, then retry with `staffName`, `staffPhone`, or the selected `staffId`. Do not ask for `domain`, `corpId`, `staffId`, or `proxyStaffBizId` before discovery. Ask for a dedicated/private-cloud `domain` only after standard probing fails. +`corps add-hose-persistent` probes standard domains and discovers the enterprise automatically. If it returns multiple administrator candidates, present their names and masked phones for the user to choose, then retry with `staffName`, `staffPhone`, or the selected `staffId`. Do not ask for `domain`, `corpId`, `staffId`, or `proxyStaffBizId` before discovery. Ask for a dedicated/private-cloud `domain` only after standard probing fails. The old `add-hose` spelling remains a compatibility alias. The command verifies by default and writes the enterprise config. If the user says not to operate business logic, stop at `corps` and auth/config commands; do not run approval, rule, document, simulation, or approval-run commands. diff --git a/skills/seal-use/references/hose-enterprise-init.md b/skills/seal-use/references/hose-enterprise-init.md index 5c34c36..55a7360 100644 --- a/skills/seal-use/references/hose-enterprise-init.md +++ b/skills/seal-use/references/hose-enterprise-init.md @@ -78,7 +78,7 @@ seal-use corps hose-staffs --json '{ 1. **若用户在初始指令中已指名(姓名或手机号)**: ```bash - seal-use corps add-hose --json '{ + seal-use corps add-hose-persistent --json '{ "appKey": "...", "appSecurity": "...", "staffName": "于光泽" @@ -87,7 +87,7 @@ seal-use corps hose-staffs --json '{ * 系统通过角色人员列表匹配:若**唯一匹配且 `active == true`**,直接绑定该 `staffId` 完成接入。 2. **若用户未指定管理员**: ```bash - seal-use corps add-hose --json '{ + seal-use corps add-hose-persistent --json '{ "appKey": "...", "appSecurity": "..." }' @@ -97,7 +97,7 @@ seal-use corps hose-staffs --json '{ * 只有用户明确允许自动选择时才传 `--force`,此时按“首位启用管理员,若无则首位候选”确定审计身份,并在结果中保留该选择。 3. **若已知目标人员 ID**: ```bash - seal-use corps add-hose --json '{ + seal-use corps add-hose-persistent --json '{ "appKey": "...", "appSecurity": "...", "staffId": "ID01OZVhtzekb5:ID01K9vHULqNj1" diff --git a/skills/seal-use/references/staging-simulation-workflow.md b/skills/seal-use/references/staging-simulation-workflow.md index dc64c2a..38b729b 100644 --- a/skills/seal-use/references/staging-simulation-workflow.md +++ b/skills/seal-use/references/staging-simulation-workflow.md @@ -61,7 +61,7 @@ flowchart TD 识别生产企业(`sourceType: "hose"` 或 `"seal"`)与测试企业(如专用的测试环境)。 3. **如果尚未接入企业**: - - 合思标准凭证接入生产企业:`seal-use corps add-hose --json '{"appKey":"...","appSecurity":"...","domain":"..."}'` + - 合思标准凭证接入生产企业:`seal-use corps add-hose-persistent --json '{"appKey":"...","appSecurity":"...","domain":"..."}'` - 或通过协助链接接入:`seal-use corps add-link ` 4. **环境严格标记与 1 对 1 绑定**: diff --git a/src/cli/commands/corps.test.ts b/src/cli/commands/corps.test.ts index b819bbe..5a7ed45 100644 --- a/src/cli/commands/corps.test.ts +++ b/src/cli/commands/corps.test.ts @@ -195,6 +195,15 @@ describe("corps link onboarding", () => { }); describe("corp compatibility alias", () => { + test("exposes add-hose-persistent as the canonical Hose onboarding command", async () => { + setupConfigEnv(); + const result = await runCli(["corps", "add-hose-persistent", "--json", "{}"]); + + expect(result.isError).toBe(true); + expect(result.stderr).toContain("Missing required JSON field: appKey"); + expect(result.stderr).not.toContain("Unknown corps action"); + }); + test("seal-use corp list executes and resolves cleanly like seal-use corps", async () => { setupConfigEnv(); const result = await runCli(["corp", "list"]); diff --git a/src/cli/commands/corps.ts b/src/cli/commands/corps.ts index b5e5fd1..ab087db 100644 --- a/src/cli/commands/corps.ts +++ b/src/cli/commands/corps.ts @@ -151,7 +151,7 @@ export async function handleCorpsCommand(action: string | undefined, maybeName: } if (allCorps.length === 0) { - console.error("提示:当前未检测到企业配置。你可以使用 seal-use corps add-hose 或 seal-use corps add-seal 添加企业,或运行 seal-use help 查看说明。"); + console.error("提示:当前未检测到企业配置。你可以使用 seal-use corps add-hose-persistent 或 seal-use corps add-seal 添加企业,或运行 seal-use help 查看说明。"); } else if (isStrict && filtered.length === 0 && (action === "search" || action === "find") && rawQuery) { console.error(`提示:未在严格模式下匹配到企业 "${rawQuery}"。可以尝试省略 --strict 进行智能软搜索。`); } @@ -1003,7 +1003,10 @@ export async function handleCorpsCommand(action: string | undefined, maybeName: return; } - if (action === "add-hose") { + if (action === "add-hose-persistent" || action === "add-hose") { + if (action === "add-hose") { + console.error("⚠️ Notice: 'add-hose' is a compatibility alias; use 'add-hose-persistent' for durable Hose credentials."); + } const jsonPayload = jsonObject(args.json); const merged = { ...jsonPayload, diff --git a/src/cli/help.test.ts b/src/cli/help.test.ts index 47ea6c6..5ed57a6 100644 --- a/src/cli/help.test.ts +++ b/src/cli/help.test.ts @@ -75,6 +75,7 @@ describe("renderHelp", () => { expect(help).toContain("seal-use corps sync-test"); expect(help).toContain("发现与选择:"); expect(help).toContain("企业接入:"); + expect(help).toContain("seal-use corps add-hose-persistent"); expect(help).toContain("Hose 专属能力:"); expect(help).toContain("seal-use corps probe-hose"); expect(help).toContain("seal-use corps hose-staffs"); @@ -103,6 +104,12 @@ describe("renderHelp", () => { expect(help).not.toContain("seal-use webhook"); }); + test("documents the add-hose compatibility alias", () => { + const help = renderHelp(["corps", "add-hose-persistent"]); + expect(help).toContain("seal-use corps add-hose-persistent"); + expect(help).toContain("旧命令 add-hose 仍可用"); + }); + test("throws usage error for unknown area or subcommand", () => { expect(() => renderHelp(["nonexistent-domain"])).toThrow(/Unknown command/); expect(() => renderHelp(["corps", "nonexistent-cmd"])).toThrow(/Unknown corps command/); diff --git a/src/cli/help.ts b/src/cli/help.ts index 8110c18..5bbac67 100644 --- a/src/cli/help.ts +++ b/src/cli/help.ts @@ -157,10 +157,12 @@ export const HELP_REGISTRY: AreaHelp[] = [ description: "Pulls production approval records from the production enterprise and replays them into the bound test enterprise's Webhook channel for rule verification." }, { - name: "add-hose", + name: "add-hose-persistent", + aliases: ["add-hose"], group: "企业接入", - summary: "Add a Hose/Ekuaibao enterprise configuration", - usage: ["seal-use corps add-hose --json '{\"name\":\"企业名称\",\"domain\":\"https://app.ekuaibao.com\",\"appKey\":\"...\",\"appSecurity\":\"...\",\"proxyStaffBizId\":\"corpId:staffId\"}'"] + summary: "Add a durable Hose/Ekuaibao enterprise configuration", + usage: ["seal-use corps add-hose-persistent --json '{\"name\":\"企业名称\",\"domain\":\"https://app.ekuaibao.com\",\"appKey\":\"...\",\"appSecurity\":\"...\",\"proxyStaffBizId\":\"corpId:staffId\"}'"], + description: "使用长期 Hose OpenAPI 凭据接入企业并持久化配置;旧命令 add-hose 仍可用,但仅作为兼容别名。" }, { name: "add-seal", @@ -196,7 +198,7 @@ export const HELP_REGISTRY: AreaHelp[] = [ group: "Hose 专属能力", summary: "Discover Hose staff candidates by role", usage: ["seal-use corps hose-staffs --json '{\"appKey\":\"...\",\"appSecurity\":\"...\",\"role\":\"admin\"}'"], - description: "按合思角色查询员工候选;手机号默认脱敏,供 add-hose 选择管理员。" + description: "按合思角色查询员工候选;手机号默认脱敏,供 add-hose-persistent 选择管理员。" }, { name: "hose-extract-keys", diff --git a/src/core/doctor/diagnose.ts b/src/core/doctor/diagnose.ts index 007b429..cad23d4 100644 --- a/src/core/doctor/diagnose.ts +++ b/src/core/doctor/diagnose.ts @@ -258,7 +258,7 @@ export function diagnoseSystem(): DoctorDiagnosis { id: "enterprises", title: "企业接入状态", status: "warn", - message: "当前未检测到企业配置,请使用 seal-use corps add-hose 或 add-seal 接入企业" + message: "当前未检测到企业配置,请使用 seal-use corps add-hose-persistent 或 add-seal 接入企业" }); }