import type { ChatMessage, FuncCallMsg } from '../client';
type ToolCallMsg = FuncCallMsg;
export declare function normalizeToolCallPairs(context: readonly ChatMessage[]): ChatMessage[];
export declare function hasAdjacentMatchingToolResult(context: readonly ChatMessage[], index: number): boolean;
export declare function hasAdjacentMatchingToolCall(context: readonly ChatMessage[], index: number): boolean;
export declare function formatUnresolvedToolCallText(call: ToolCallMsg): string;
export type ToolCallAdjacencyViolation = Readonly<{
    kind: 'unresolved_call';
    index: number;
    callId: string;
    toolName: string;
}> | Readonly<{
    kind: 'orphaned_result';
    index: number;
    callId: string;
    toolName: string;
}>;
export declare function findFirstToolCallAdjacencyViolation(context: readonly ChatMessage[]): ToolCallAdjacencyViolation | null;
export declare function sanitizeToolContextForProvider(context: readonly ChatMessage[]): Readonly<{
    messages: ChatMessage[];
    droppedViolations: ToolCallAdjacencyViolation[];
}>;
export declare function formatToolCallAdjacencyViolation(violation: ToolCallAdjacencyViolation, location: string): string;
export {};
