Make Hose command boundaries explicit

This commit is contained in:
gitea committed 2026-09-22 12:00:45 +08:00
1 parent f3134a59b3
commit c71979cde2
8 files changed
+53 -35

No files matched your search

+2 -2
View File
@@ -345,7 +345,7 @@ export async function handleApprovalRunsCommand(
return;
}
if (action === "flow") {
if (action === "flow" || action === "hose-flow") {
const target =
maybeName ??
args.command[2] ??
@@ -353,7 +353,7 @@ export async function handleApprovalRunsCommand(
stringOption(args.options.id) ??
stringOption(args.options.recordId);
if (!target) {
throw new Error("Usage: seal-use approval-runs flow <recordId|SN>");
throw new Error("Usage: seal-use approval-runs hose-flow <recordId|SN>");
}
await runTool(
+1 -1
View File
@@ -14,7 +14,7 @@ export async function handleAuthExtractKeysCommand(maybeName: string | undefined
const link = maybeName ?? stringOption(args.options.link) ?? stringOption(args.options.url);
if (!link) {
throw new Error(
"Usage: seal-use auth extract-keys <https://.../web/thirdparty.html?...> [--reveal] [--save] [--name <customName>] [--overwrite]"
"Usage: seal-use auth hose-extract-keys <https://.../web/thirdparty.html?...> [--reveal] [--save] [--name <customName>] [--overwrite]"
);
}
const reveal =
+8
View File
@@ -85,6 +85,14 @@ describe("renderHelp", () => {
expect(help).not.toContain("seal-use billing");
});
test("renders Hose-specific auth and approval flow command names", () => {
const authHelp = renderHelp(["auth"]);
const approvalHelp = renderHelp(["approval-runs"]);
expect(authHelp).toContain("seal-use auth hose-extract-keys");
expect(authHelp).toContain("seal-use auth hose-keys");
expect(approvalHelp).toContain("seal-use approval-runs hose-flow");
});
test("renders focused subcommand help with usage, options, and description", () => {
const help = renderHelp(["corps", "bind-test"]);
expect(help).toContain("seal-use corps bind-test");
+10 -9
View File
@@ -465,9 +465,10 @@ export const HELP_REGISTRY: AreaHelp[] = [
]
},
{
name: "flow",
summary: "Get Hose approval flow timeline, staff opinions, and align with AI runs",
usage: ["seal-use approval-runs flow <recordId|SN> [--corp <corpId>]"]
name: "hose-flow",
aliases: ["flow"],
summary: "【合思专属】Get Hose approval flow timeline, staff opinions, and align with AI runs",
usage: ["seal-use approval-runs hose-flow <recordId|SN> [--corp <corpId>]"]
},
{
name: "list",
@@ -786,11 +787,11 @@ export const HELP_REGISTRY: AreaHelp[] = [
"专用于合思 (Hose) 来源企业。向合思申请临时 ticket,生成直达外部合思/易快报主站 (https://app.ekuaibao.com/web/thirdparty.html) 的免密登录链接。若需生成 Seal 自身的审核后台访问链接,请使用 'seal-use auth link'。"
},
{
name: "extract-keys",
aliases: ["extract-key", "extract-hose-keys", "hose-extract-keys"],
name: "hose-extract-keys",
aliases: ["extract-keys", "extract-key", "extract-hose-keys"],
summary: "【合思子域提权】从合思协助链接提取 OpenAPI 开发者密钥并可选升级配置",
usage: [
"seal-use auth extract-keys <url> [--reveal] [--save] [--app-key <key>] [--key-id <id>] [--name <customName>] [--overwrite]"
"seal-use auth hose-extract-keys <url> [--reveal] [--save] [--app-key <key>] [--key-id <id>] [--name <customName>] [--overwrite]"
],
options: [
{ flag: "--reveal, -r", description: "显式揭示完整 appSecurity 明文(默认脱敏保护)" },
@@ -801,10 +802,10 @@ export const HELP_REGISTRY: AreaHelp[] = [
description: "专属于合思 (Hose/合思云/易快报) 子域的能力。非合思渠道企业不支持。"
},
{
name: "keys",
aliases: ["hose-keys"],
name: "hose-keys",
aliases: ["keys"],
summary: "【合思子域】查看当前企业已配置的合思 OpenAPI 开发者密钥",
usage: ["seal-use auth keys [--corp <corpId>] [--reveal]"],
usage: ["seal-use auth hose-keys [--corp <corpId>] [--reveal]"],
options: [
{ flag: "--reveal, -r", description: "显式揭示完整 appSecurity 明文(默认脱敏保护)" }
],