Rename the internal tool registry to capability registry
This commit is contained in:
1 parent
f8b2b2ecde
commit
bc9256a9d9
41 files changed
+470
-452
No files matched your search
@@ -3,7 +3,7 @@ import type { createSealClient } from "../../core/http/factory.js";
|
||||
import { createSealClient as createNewSealClient } from "../../core/http/factory.js";
|
||||
import { resolveSealCustomHeaders } from "../../core/http/request-headers.js";
|
||||
import { existsSync } from "node:fs";
|
||||
import { runTool, selectCorp } from "../helpers.js";
|
||||
import { runCapability, selectCorp } from "../helpers.js";
|
||||
import * as api from "../../domains/seal/api.js";
|
||||
import { findWebhookIntegration } from "../../domains/seal/api.js";
|
||||
import type { WebhookIntegration } from "../../domains/seal/types.js";
|
||||
@@ -315,7 +315,7 @@ export async function handleWebhookCommand(
|
||||
return;
|
||||
}
|
||||
if (action === "list") {
|
||||
await runTool(
|
||||
await runCapability(
|
||||
"seal_webhook_list",
|
||||
client,
|
||||
corp,
|
||||
@@ -331,7 +331,7 @@ export async function handleWebhookCommand(
|
||||
if (action === "get" || action === "find") {
|
||||
const selector = maybeName ?? stringOption(args.options.selector) ?? stringOption(args.options.id);
|
||||
if (!selector) throw new Error("Usage: seal-use webhook get <idOrName> [--show-secret]");
|
||||
await runTool(
|
||||
await runCapability(
|
||||
"seal_webhook_get",
|
||||
client,
|
||||
corp,
|
||||
@@ -357,7 +357,7 @@ export async function handleWebhookCommand(
|
||||
const autoApprovalRate = webhookRateOption(args.options);
|
||||
const materialPackFilePolicy = materialPackFilePolicyOptions(args.options);
|
||||
const dryRun = booleanOption(args.options.dryRun) ?? booleanOption(args.options["dry-run"]);
|
||||
await runTool(
|
||||
await runCapability(
|
||||
"seal_webhook_add",
|
||||
client,
|
||||
corp,
|
||||
@@ -405,7 +405,7 @@ export async function handleWebhookCommand(
|
||||
) {
|
||||
throw usageError("Webhook update requires at least one field option");
|
||||
}
|
||||
await runTool(
|
||||
await runCapability(
|
||||
"seal_webhook_update",
|
||||
client,
|
||||
corp,
|
||||
@@ -435,7 +435,7 @@ export async function handleWebhookCommand(
|
||||
`seal-use webhook delete ${selector} --corp ${corp.id} --yes`
|
||||
);
|
||||
}
|
||||
await runTool(
|
||||
await runCapability(
|
||||
"seal_webhook_delete",
|
||||
client,
|
||||
corp,
|
||||
|
||||
Reference in new issue
Block a user