import type { AgentMessage as KoiMessage } from "@mariozechner/pi-agent-core";
declare function makeMissingToolResult(params: {
    toolCallId: string;
    toolName?: string;
}): Extract<KoiMessage, {
    role: "toolResult";
}>;
export { makeMissingToolResult };
export type ToolCallInputRepairReport = {
    messages: KoiMessage[];
    droppedToolCalls: number;
    droppedAssistantMessages: number;
};
export declare function repairToolCallInputs(messages: KoiMessage[]): ToolCallInputRepairReport;
export declare function sanitizeToolCallInputs(messages: KoiMessage[]): KoiMessage[];
export declare function sanitizeToolUseResultPairing(messages: KoiMessage[]): KoiMessage[];
export type ToolUseRepairReport = {
    messages: KoiMessage[];
    added: Array<Extract<KoiMessage, {
        role: "toolResult";
    }>>;
    droppedDuplicateCount: number;
    droppedOrphanCount: number;
    moved: boolean;
};
export declare function repairToolUseResultPairing(messages: KoiMessage[]): ToolUseRepairReport;
