import { ToolCallEngine, Tool, ToolCallEnginePrepareRequestContext, ChatCompletionCreateParams, ChatCompletionAssistantMessageParam, ChatCompletionChunk, MultimodalToolCallResult, AgentEventStream, ChatCompletionMessageParam, ParsedModelResponse, StreamChunkResult } from '@tarko/agent-interface'; import { T5StreamProcessingState as OmniStreamProcessingState } from '@omni-tars/core'; /** * SimpleKorToolCallEngine - Minimal prompt engineering tool call engine * * This is the simplest possible implementation of a tool call engine that: * 1. Uses prompt engineering to instruct the LLM to output tool calls in a specific format * 2. Parses tool calls from LLM response text using simple regex matching * 3. Does not support streaming (focuses on core functionality only) * * Format used: {"name": "tool_name", "arguments": {...}} */ export declare class GUIAgentToolCallEngine extends ToolCallEngine { private logger; private t5Adapter; private agentMode; constructor(...args: unknown[]); /** * Prepare system prompt with tool information and instructions based on agent mode */ preparePrompt(instructions: string, tools: Tool[]): string[]; /** * Prepare request parameters for the LLM * * FIXME: move to base tool call engine. */ prepareRequest(context: ToolCallEnginePrepareRequestContext): ChatCompletionCreateParams; /** * Initialize processing state (minimal implementation) * * FIXME: move to base tool call engine. */ initStreamProcessingState(): OmniStreamProcessingState; /** * Process streaming chunks - simply accumulate content */ processStreamingChunk(chunk: ChatCompletionChunk, state: OmniStreamProcessingState): StreamChunkResult; /** * Extract tool calls from complete response text */ finalizeStreamProcessing(state: OmniStreamProcessingState): ParsedModelResponse; /** * Build assistant message for conversation history * For PE engines, we preserve the raw content including tool call markup * * FIXME: move to base tool call engine. */ buildHistoricalAssistantMessage(currentLoopAssistantEvent: AgentEventStream.AssistantMessageEvent): ChatCompletionAssistantMessageParam; /** * Build tool result messages as user messages * PE engines format tool results as user input for next iteration * * FIXME: move to base tool call engine. */ buildHistoricalToolCallResultMessages(toolCallResults: MultimodalToolCallResult[]): ChatCompletionMessageParam[]; /** * Generate a tool call ID */ private generateToolCallId; } //# sourceMappingURL=GUIAgentToolCallEngine.d.ts.map