mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 10:04:46 +00:00
feat: add tool descriptor planner
This commit is contained in:
18
src/tools/execution.ts
Normal file
18
src/tools/execution.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user