Rename the internal tool registry to capability registry

This commit is contained in:
gitea committed 2026-09-30 14:47:51 +08:00
1 parent f8b2b2ecde
commit bc9256a9d9
41 files changed
+470 -452

No files matched your search

+8 -8
View File
@@ -1,7 +1,7 @@
import { readFileSync } from "node:fs";
import type { CorpConfig } from "../../core/config/types.js";
import type { createSealClient } from "../../core/http/factory.js";
import { runTool } from "../helpers.js";
import { runCapability } from "../helpers.js";
import { booleanOption, jsonObject, stringOption } from "../parser.js";
import { outputOptions } from "../printer.js";
import type { ParsedArgs } from "../types.js";
@@ -55,12 +55,12 @@ export async function handleDeployCommand(
}
if (action === "requirements") {
await runTool("seal_deploy_hosecloud_requirements", client, corp, {}, outputOptions(args.options));
await runCapability("seal_deploy_hosecloud_requirements", client, corp, {}, outputOptions(args.options));
return;
}
if (action === "list") {
await runTool("seal_deploy_hosecloud_list", client, corp, {}, outputOptions(args.options));
await runCapability("seal_deploy_hosecloud_list", client, corp, {}, outputOptions(args.options));
return;
}
@@ -92,12 +92,12 @@ export async function handleDeployCommand(
: undefined
);
}
await runTool("seal_deploy_hosecloud_get", client, corp, { signKey }, outputOptions(args.options));
await runCapability("seal_deploy_hosecloud_get", client, corp, { signKey }, outputOptions(args.options));
return;
}
if (action === "status") {
await runTool("seal_deploy_hosecloud_status", client, corp, {}, outputOptions(args.options));
await runCapability("seal_deploy_hosecloud_status", client, corp, {}, outputOptions(args.options));
return;
}
@@ -109,7 +109,7 @@ export async function handleDeployCommand(
if (!payload || Object.keys(payload).length === 0) {
throw new Error("Usage: seal-use deploy hosecloud configure --json '{...}' or --input <file>");
}
await runTool("seal_deploy_hosecloud_configure", client, corp, {
await runCapability("seal_deploy_hosecloud_configure", client, corp, {
...payload,
dryRun: booleanOption(args.options.dryRun) ?? booleanOption(args.options["dry-run"])
}, outputOptions(args.options));
@@ -135,7 +135,7 @@ export async function handleDeployCommand(
if (firstHose && hoseConfigs.length === 1 && autoOpt) {
const singleKey = firstHose.signKey;
console.error(`ℹ️ [auto] 检测到企业仅有 1 个合思配置,已自动选择 (signKey: ${singleKey})`);
await runTool("seal_deploy_hosecloud_sync", client, corp, { signKey: singleKey }, outputOptions(args.options));
await runCapability("seal_deploy_hosecloud_sync", client, corp, { signKey: singleKey }, outputOptions(args.options));
return;
}
@@ -162,7 +162,7 @@ export async function handleDeployCommand(
);
}
await runTool("seal_deploy_hosecloud_sync", client, corp, { signKey }, outputOptions(args.options));
await runCapability("seal_deploy_hosecloud_sync", client, corp, { signKey }, outputOptions(args.options));
return;
}