feat: add tool descriptor planner

This commit is contained in:
Shakker
2026-05-02 07:10:52 +01:00
committed by Shakker
parent 8080c9cf03
commit c5224a341e
8 changed files with 412 additions and 0 deletions

18
src/tools/execution.ts Normal file
View File

@@ -0,0 +1,18 @@
import type { ToolExecutorRef } from "./types.js";
export function formatToolExecutorRef(ref: ToolExecutorRef): string {
switch (ref.kind) {
case "core":
return `core:${ref.executorId}`;
case "plugin":
return `plugin:${ref.pluginId}:${ref.toolName}`;
case "channel":
return `channel:${ref.channelId}:${ref.actionId}`;
case "mcp":
return `mcp:${ref.serverId}:${ref.toolName}`;
default: {
const exhaustive: never = ref;
return exhaustive;
}
}
}