Download src/agents/pi-embedded-runner/tool-split.ts from quinnz/openclaw: direct link, hf CLI and curl.
- Browser
- Download file 609 Bytes
-
https://huggingface.co/spaces/quinnz/openclaw/resolve/main/src/agents/pi-embedded-runner/tool-split.ts
- Command line
-
hf download hf://spaces/quinnz/openclaw/src/agents/pi-embedded-runner/tool-split.ts
-
curl -L -o tool-split.ts https://huggingface.co/spaces/quinnz/openclaw/resolve/main/src/agents/pi-embedded-runner/tool-split.ts
609 Bytes
| import type { AgentTool } from "@mariozechner/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 }): { | |
| builtInTools: AnyAgentTool[]; | |
| customTools: ReturnType<typeof toToolDefinitions>; | |
| } { | |
| const { tools } = options; | |
| return { | |
| builtInTools: [], | |
| customTools: toToolDefinitions(tools), | |
| }; | |
| } | |