import type { TerminationEnvelopeV1 } from "../contracts/index.js"; /** * Atomically persist the termination envelope for a governed run. * * Crash-safe write sequence (mirrors exit-signal.ts atomic publication): * 1. Write complete JSON to a unique tmp file (wx, 0o600) in runDirectory * 2. Sync and close the tmp file * 3. Hard-link tmp → termination.json (EEXIST → slot already occupied) * 4. On EEXIST, read and return the existing envelope * 5. Unlink the tmp file in finally (best-effort) * * First terminal exit path wins — competing callers that hit EEXIST get back * the envelope that won the race. This is the A1 idempotency guarantee. */ export declare function persistTerminationEnvelope(runDirectory: string, envelope: TerminationEnvelopeV1): Promise;