import type { ToolCall } from '../types/index.js';
interface ParsedToolCall {
    toolName: string;
    parameters: Record<string, unknown>;
}
/**
 * Parses XML-formatted tool calls from non-function-calling models
 * Expected format: <tool_name><param1>value1</param1><param2>value2</param2></tool_name>
 */
export declare class XMLToolCallParser {
    private static readonly TOOL_CALL_REGEX;
    private static readonly PARAMETER_REGEX;
    /**
     * Extracts tool calls from text content containing XML-formatted tool calls
     */
    static parseToolCalls(content: string): ParsedToolCall[];
    /**
     * Validates that a matched string is a proper tool call
     * Rejects partial matches, malformed syntax, and invalid structures
     */
    private static isValidToolCall;
    /**
     * Parses parameters from inner XML content
     */
    private static parseParameters;
    /**
     * Converts parsed tool calls to the standard ToolCall format
     */
    static convertToToolCalls(parsedCalls: ParsedToolCall[]): ToolCall[];
    /**
     * Removes XML tool call blocks from content, leaving only the text
     */
    static removeToolCallsFromContent(content: string): string;
    /**
     * Checks if content contains XML-formatted tool calls
     */
    static hasToolCalls(content: string): boolean;
    /**
     * Detects malformed XML tool call attempts and returns error details
     * Returns null if no malformed tool calls detected
     */
    static detectMalformedToolCall(content: string): {
        error: string;
        examples: string;
    } | null;
    /**
     * Generates correct format examples for error messages
     */
    private static getCorrectFormatExamples;
}
export {};
//# sourceMappingURL=xml-parser.d.ts.map