/** * Problem: * Cancelling or interrupting an in-flight turn leaves uncommitted in-progress checkpoints (status=2) * in the session's SQLite database (`~/.gemini/antigravity-acp/conversations/.db`). * Resuming or executing subsequent prompts against the session triggers a fatal panic: * `"panic: could not find doneCh for checkpoint"`. * * Solution: * Inspects the session's SQLite database on load and shutdown, repairing any orphaned * in-progress checkpoints and action steps to ABORTED (status=5) with isolated session scoping. */ import { type AcpFix } from "../../core/types.js"; export declare const STEP_TYPE_USER = 14; export declare const STEP_TYPE_AGENT = 15; export declare const STEP_TYPE_ERROR = 17; export declare const STEP_TYPE_CHECKPOINT = 23; export declare const CHECKPOINT_STATUS_IN_PROGRESS = 2; export declare const CHECKPOINT_STATUS_ABORTED = 5; export declare const DONE_CH_PANIC_MARKER = "could not find doneCh for checkpoint"; export declare function getConversationDbPath(sessionId: string): string; export declare function extractExecutorMetadataStepIdx(data: Uint8Array): number | null; export declare function extractGenMetadataStepIndices(data: Uint8Array): { stepIdx: number | null; earliestIdx: number | null; }; /** * Automatically repairs orphaned in-progress steps (status=2), including checkpoints * (step_type=23) and action/tool steps (step_type=21), left behind by cancelled, aborted, * or interrupted Antigravity turns. Setting status=5 (aborted) prevents Antigravity * from crashing on resumption or next prompt with "could not find doneCh for checkpoint". * * Also prunes orphaned or out-of-bounds `executor_metadata` and `gen_metadata` entries * whose step indices exceed the maximum valid step in `steps`, preventing fatal Go executor * panics ("earliest step index is out of bounds: X vs Y"). * * Returns the number of repaired steps and metadata records. */ export declare function repairOrphanedCheckpoints(sessionId: string, customDbPath?: string): number; export declare const orphanedCheckpointsFix: AcpFix; export declare const checkpointRepairFix: AcpFix; //# sourceMappingURL=index.d.ts.map