/**
 * Text-based tool call parser.
 *
 * Some models (e.g. Qwen2.5-Coder abliterated) output tool calls as
 * plain text JSON instead of structured tool_calls in the API response.
 * This module wraps the stream function to detect and convert these
 * text-based tool calls into proper ToolCall objects that pi-agent-core
 * can process.
 *
 * Supported patterns:
 * 1. Raw JSON: {"name": "tool_name", "arguments": {...}}
 * 2. Tagged: <tool_call>{"name": "tool_name", "arguments": {...}}</tool_call>
 * 3. Code-fenced JSON with name/arguments structure
 */
import { type AssistantMessageEventStream, type Context, type SimpleStreamOptions, type Api, type Model } from "./types.js";
/**
 * Create a stream function wrapper that intercepts text-based tool calls
 * and converts them to structured ToolCall objects.
 */
export declare function createToolParsingStreamFn(toolNames: string[]): <TApi extends Api>(model: Model<TApi>, context: Context, options?: SimpleStreamOptions) => AssistantMessageEventStream;
//# sourceMappingURL=text-tool-parser.d.ts.map