import type { Message } from '../types/messages.js'; export interface MessageRepairReport { changed: boolean; removedToolUses: string[]; removedToolResults: string[]; removedMessages: number; } export interface MessageRepairResult { messages: Message[]; report: MessageRepairReport; } /** * Repair provider-level tool-call adjacency invariants. * * Anthropic requires every assistant `tool_use` block to have a matching * `tool_result` block in the immediately following user message. Manual * context surgery (summary/prune) can cut through the middle of such an * exchange. This function removes only the now-orphaned protocol blocks, * preserving surrounding text/images/thinking blocks where possible. */ export declare function repairToolUseAdjacency(messages: Message[]): MessageRepairResult; /** * True when a message content payload carries meaningful information for * the provider: non-whitespace text, a tool call/result, thinking with * text or a signature, or any other block type. * * False for empty strings/arrays and for arrays whose only blocks are * empty or whitespace-only text — the shape persisted when a stream is * interrupted before the first meaningful delta (issue #271). Strict * providers reject such assistant turns, so repair and replay paths must * treat them as empty. */ export declare function hasMeaningfulContent(content: Message['content']): boolean; //# sourceMappingURL=message-invariants.d.ts.map