import type { AgentMessage } from "@earendil-works/pi-agent-core"; export declare function findDuplicateToolCallIds(messages: readonly AgentMessage[]): string[]; /** Throw a descriptive error when context carries the same assistant turn more than once. */ export declare function assertToolPairingInvariant(messages: readonly AgentMessage[]): void; /** * Give every tool call a non-empty id that no earlier call in the context uses. * * A reused or empty id is renamed after its assistant turn, and the tool results * following that turn (up to the next assistant message) are renamed with it in * call order. Renaming depends only on earlier messages, so the derived ids stay * stable as the conversation grows and do not invalidate provider prompt caches. * Messages that need no change are returned as the same objects. */ export declare function uniquifyToolCallIds(messages: TMessage[]): TMessage[]; //# sourceMappingURL=context-tool-pairing.d.ts.map