Files
openclaw/src/tools/execution.ts
2026-05-02 07:38:59 +01:00

19 lines
508 B
TypeScript

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;
}
}
}