import type { ChatImage, ChatMessage, CompletionResult } from "../../types.js"; export declare const ACTION_CYCLE_RECOVERY_PREFIX = "[ACTION CYCLE RECOVERY] "; export interface TurnHistoryPorts { readonly messages: ChatMessage[]; readonly images: readonly ChatImage[] | undefined; readonly sanitizeAssistantText: (text: string) => string; readonly visibleCommitted: () => boolean; readonly writeAssistantMessage: (text: string) => void; } export interface TurnHistoryWriter { readonly recoveryUserMessage: (content: string) => ChatMessage; readonly upsertActionCycleRecovery: (content: string) => void; readonly recoveryProse: (content: string) => string | undefined; readonly pushAssistantHistory: (content: string, reasoning?: Pick, hasToolCalls?: boolean) => void; } export declare const recoveryProseFrom: (content: string) => string | undefined; export declare const createTurnHistoryWriter: (ports: TurnHistoryPorts) => TurnHistoryWriter;