import type { TaskPacket } from "./types.js"; export type AttemptPhase = "claimed" | "provisioned" | "worker_running" | "scope_audit" | "committed" | "verifying" | "verified" | "integrating" | "merged" | "failed" | "cancelled" | "abandoned"; export type AttemptRecord = { attemptId: string; taskId: string; planId: string; phase: AttemptPhase; packet: TaskPacket; repoRoot?: string; repoKey?: string; worktreeDir?: string; workerSessionKey?: string; /** Set just before the integrator's CAS so a crash can tell "landed" from "never happened". */ expectedTrunkSha?: string; note?: string; createdAt: string; updatedAt: string; }; export declare function upsertAttempt(record: Omit & { createdAt?: string; }, directory?: string): AttemptRecord; export declare function setAttemptPhase(attemptId: string, phase: AttemptPhase, patch?: Partial>, directory?: string): AttemptRecord | null; export declare function getAttempt(attemptId: string, directory?: string): AttemptRecord | null; export declare function listAttempts(directory?: string): AttemptRecord[]; export declare function listLiveAttempts(directory?: string): AttemptRecord[]; export declare function removeAttempt(attemptId: string, directory?: string): void;