mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 03:54:45 +00:00
16 lines
556 B
TypeScript
16 lines
556 B
TypeScript
import type { AgentTool } from "@earendil-works/pi-agent-core";
|
|
import { toToolDefinitions } from "../pi-tool-definition-adapter.js";
|
|
|
|
// We always pass tools via `customTools` so our policy filtering, sandbox integration,
|
|
// and extended toolset remain consistent across providers.
|
|
type AnyAgentTool = AgentTool;
|
|
|
|
export function splitSdkTools(options: { tools: AnyAgentTool[]; sandboxEnabled: boolean }): {
|
|
customTools: ReturnType<typeof toToolDefinitions>;
|
|
} {
|
|
const { tools } = options;
|
|
return {
|
|
customTools: toToolDefinitions(tools),
|
|
};
|
|
}
|