import type { LoopRecord } from "../contracts/index.js"; export type PersistedLoopState = { loopId: string; workspaceId: string; projectId: string; status: LoopRecord["status"]; lifecycleState: LoopRecord["lifecycleState"]; createdAt: string; updatedAt: string; task: { title: string; objective: string; repoRoot?: string; }; budget: LoopRecord["budget"]; cost: LoopRecord["cost"]; metrics: { attemptCount: number; eventCount: number; failureCount: number; }; }; export declare function resolveRunsRoot(env?: NodeJS.ProcessEnv): string; /** * Write all loop artifacts to disk at the end of a run. * Uses the Phase 3 flat path: ~/.martin/runs// * - contract.json (task + budget, immutable) * - state.json (status, cost, metrics summary) * - ledger.jsonl (all events, one JSON per line) * - attempts/ (per-attempt JSON files) */ export declare function persistLoopArtifacts(loop: LoopRecord, options?: { runsRoot?: string; }): Promise;