import type { Tool, ToolCall, ToolResult, ToolDefinition } from './types'; /** * Handles execution of tools/functions called by LLMs */ export declare class ToolExecutor { private tools; /** * Create a new ToolExecutor * @param tools - Array of tool definitions with their functions */ constructor(tools: Tool[]); /** * Execute a single tool call * @param toolCall - The tool call from the LLM * @returns The result of the tool execution */ executeOne(toolCall: ToolCall): Promise; /** * Execute multiple tool calls * @param toolCalls - Array of tool calls from the LLM * @returns Array of tool results in the same order */ execute(toolCalls: ToolCall[]): Promise; /** * Execute tool calls sequentially (for order-dependent operations) * @param toolCalls - Array of tool calls from the LLM * @returns Array of tool results in the same order */ executeSequential(toolCalls: ToolCall[]): Promise; /** * Get tool definitions for provider formatting * @returns Array of tool definitions without the function implementations */ getToolDefinitions(): ToolDefinition[]; /** * Check if a tool exists * @param name - The tool name to check * @returns True if the tool exists */ hasTool(name: string): boolean; /** * Get a tool by name * @param name - The tool name * @returns The tool or undefined */ getTool(name: string): Tool | undefined; /** * Add a tool to the executor * @param tool - The tool to add */ addTool(tool: Tool): void; /** * Remove a tool from the executor * @param name - The tool name to remove * @returns True if the tool was removed */ removeTool(name: string): boolean; /** * Get the number of registered tools */ get size(): number; /** * Get all tool names */ getToolNames(): string[]; } //# sourceMappingURL=tool-executor.d.ts.map