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

+7 -7
View File
@@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
import type { CorpConfig } from "../../core/config/types.js";
import type { createSealClient } from "../../core/http/factory.js";
import { confirmationRequired } from "../errors.js";
import { runTool } from "../helpers.js";
import { runCapability } from "../helpers.js";
import {
booleanOption,
jsonObject,
@@ -38,7 +38,7 @@ export async function handleDocumentsCommand(
const scenarios = splitOption(args.options.scenarios);
const limit = numberOption(args.options.limit);
const offset = numberOption(args.options.offset);
await runTool(
await runCapability(
"seal_approval_documents_list",
client,
corp,
@@ -57,7 +57,7 @@ export async function handleDocumentsCommand(
if (!documentId) {
throw new Error("Usage: seal-use documents get <documentId> [--corp <corpId>]");
}
await runTool(
await runCapability(
"seal_approval_document_get",
client,
corp,
@@ -72,7 +72,7 @@ export async function handleDocumentsCommand(
if (!keyword) {
throw new Error("Usage: seal-use documents search <keyword> [--maxResults 20] [--corp <corpId>]");
}
await runTool(
await runCapability(
"seal_approval_search",
client,
corp,
@@ -120,7 +120,7 @@ export async function handleDocumentsCommand(
);
}
await runTool(
await runCapability(
"seal_approval_document_create",
client,
corp,
@@ -184,7 +184,7 @@ export async function handleDocumentsCommand(
);
}
await runTool(
await runCapability(
"seal_approval_document_update",
client,
corp,
@@ -220,7 +220,7 @@ export async function handleDocumentsCommand(
`seal-use documents delete ${documentId} --corp ${corp.id} --yes`
);
}
await runTool(
await runCapability(
"seal_approval_delete_document",
client,
corp,