export interface ToolCallContractRef {
    readonly name: string;
}
export interface RawToolCall {
    readonly id?: string;
    readonly name: string;
    readonly arguments: string;
}
export interface RepairedToolCall {
    readonly id?: string;
    readonly name: string;
    readonly input: unknown;
    readonly source: "declared" | "reasoning" | "visible";
    readonly signature: string;
}
export interface ToolCallRepairInput {
    readonly declaredCalls?: readonly RawToolCall[];
    readonly reasoningContent?: string;
    readonly visibleContent?: string;
    readonly allowedToolNames: ReadonlySet<string>;
    readonly toolContracts?: readonly ToolCallContractRef[];
    readonly stormState?: ToolCallStormState;
}
export interface ToolCallStormState {
    readonly seenSignatures: ReadonlySet<string>;
}
export interface ToolCallRepairResult {
    readonly calls: readonly RepairedToolCall[];
    readonly suppressed: readonly string[];
    readonly ignored: readonly string[];
    readonly stormState: ToolCallStormState;
}
export declare function repairToolCalls(input: ToolCallRepairInput): ToolCallRepairResult;
export declare function repairTruncatedJson(input: string): string;
export declare function reNestFlatArgs(args: Record<string, unknown>): Record<string, unknown>;
