import { Tool, ToolCallEngine, StreamProcessingState, StreamChunkResult, ChatCompletionMessageToolCall } from '@multimodal/agent-interface'; /** * Base configuration for tool call engines */ export interface ToolCallEngineConfig { /** Maximum size of content buffer in characters */ maxBufferSize?: number; /** Maximum number of tool calls to track */ maxToolCalls?: number; } /** * Base class for all Tool Call Engines providing common functionality * and performance optimizations */ export declare abstract class ToolCallEngineBase extends ToolCallEngine { protected logger: import("@agent-infra/logger/dist/console-logger").ConsoleLogger; protected config: Required; private toolDescriptionCache; constructor(config?: ToolCallEngineConfig); /** * Generate a hash for tools array to enable caching */ private generateToolsHash; /** * Get cached or generate tool description */ protected getCachedToolDescription(tools: Tool[]): string; /** * Generate tool description - to be implemented by subclasses */ protected abstract generateToolDescription(tools: Tool[]): string; /** * Format tool parameters with caching for better performance */ protected formatToolParameters(tool: Tool): string; /** * Safely truncate buffer if it exceeds maximum size */ protected truncateBuffer(buffer: string): string; /** * Validate and limit tool calls array */ protected validateToolCalls(toolCalls: ChatCompletionMessageToolCall[]): ChatCompletionMessageToolCall[]; /** * Create a safe processing state with memory limits */ protected createSafeProcessingState(): StreamProcessingState; /** * Update processing state with safety checks */ protected updateProcessingState(state: StreamProcessingState, contentDelta: string, reasoningDelta?: string): void; /** * Handle common error scenarios in streaming */ protected handleStreamingError(error: unknown, context: string): StreamChunkResult; /** * Clear cache - useful for testing or when tools change frequently */ clearCache(): void; } //# sourceMappingURL=ToolCallEngineBase.d.ts.map