/**
 * Tool Argument Repairer
 *
 * Tool calls require `function.arguments` to be a JSON string. Models often emit JSON-ish
 * payloads (single quotes, fenced blocks, comments, trailing commas, etc.).
 *
 * This module provides a deterministic, best-effort repair surface that returns a JSON string
 * or `{}` and never throws.
 */
export interface RepairResult {
    repaired: string;
    success: boolean;
    error?: string;
}
export declare class ToolArgumentRepairer {
    repairToString(args: unknown): string;
    validateAndRepair(toolName: string, args: unknown): RepairResult;
    /**
     * 批量修复工具参数
     *
     * @param toolCalls - 工具调用列表
     * @returns 修复后的工具调用列表
     */
    repairToolCalls(toolCalls: Array<{
        name?: string;
        arguments?: unknown;
    }>): Array<{
        name?: string;
        arguments: string;
    }>;
}
/**
 * 快捷函数：修复工具参数
 */
export declare function repairToolArguments(args: unknown): string;
/**
 * 快捷函数：验证并修复工具参数
 */
export declare function validateToolArguments(toolName: string, args: unknown): RepairResult;
