/** * Tool executor service - manages tool registration and execution */ import type { Tool, ToolCall, ToolResult } from '../types/tools.js'; export interface ToolContext { workingDirectory: string; requestApproval?: (action: string, details: string) => Promise; } export declare class ToolExecutor { private readonly tools; private context; constructor(tools?: Tool[], context?: ToolContext); /** * Set the working directory context */ setContext(context: ToolContext): void; /** * Register additional tools (e.g., from MCP servers) */ registerTools(tools: Tool[]): void; /** * Get all tool definitions for API requests */ getToolDefinitions(): import("../types/tools.js").ToolDefinition[]; /** * Execute a single tool call */ executeTool(toolCall: ToolCall): Promise; /** * Execute multiple tool calls */ executeToolCalls(toolCalls: ToolCall[]): Promise; /** * Format tool execution result as content string */ private formatToolResult; /** * Check if a tool exists */ hasTool(name: string): boolean; /** * Get list of available tool names */ getToolNames(): string[]; } /** * Global tool executor instance */ export declare const toolExecutor: ToolExecutor; //# sourceMappingURL=tools.d.ts.map