import type { InteractiveImageAttachment } from '../interactive/imageAttachments.js'; export interface PersistedTaskOrderRevision { readonly taskDirRelative?: string; readonly taskDir?: string; readonly created: boolean; /** Roll back only when the subsequent task-record mutation has failed. */ readonly rollback: () => void; } /** * Resolve the canonical order used by retry/instruct. * * Existing task records always win over run-context copies. Records written by * older versions without task_dir retain their task text as a compatibility * fallback. */ export declare function resolveTaskOrderContent(projectDir: string, taskDir: string | undefined, legacyContent: string): string; /** * Make the confirmation text and the persisted order agree about attachments. */ export declare function ensureOrderAttachmentContent(content: string, attachments: readonly InteractiveImageAttachment[], lang: 'en' | 'ja'): string; export declare function resolveMaxImageIndex(content: string): number; /** * Persist an approved full order. The same function is used by Retry and * completed-task Instruct; execution/task-state transitions stay with callers. */ export declare function persistTaskOrderRevision(projectDir: string, taskDir: string | undefined, approvedOrderContent: string, lang: 'en' | 'ja', attachments?: readonly InteractiveImageAttachment[]): PersistedTaskOrderRevision; export declare function cleanupPersistedTaskOrderRevision(revision: PersistedTaskOrderRevision | undefined): void; //# sourceMappingURL=orderRevision.d.ts.map