(toolName: string, args: Record<string, any>)
| 214 | } |
| 215 | |
| 216 | async function toolRequest(toolName: string, args: Record<string, any>): Promise<any> { |
| 217 | if (USE_AGENT_BACKEND) { |
| 218 | if (!agentBackend) { |
| 219 | throw new Error("Agent backend unavailable: configuration failed to initialize"); |
| 220 | } |
| 221 | return await agentBackend.requestTool(toolName, args); |
| 222 | } |
| 223 | return await brokerRequest("tool", { tool: toolName, args }); |
| 224 | } |
| 225 | |
| 226 | async function statusRequest(): Promise<any> { |
| 227 | if (USE_AGENT_BACKEND) { |
no test coverage detected