/** * Persistent drift-suspect journal (drift-remediation plan ยง Phase 5 item 4). * When a deploy fails with out-of-band-deletion suspects, the engine records * them here so the [G2] stateless pre-flight can re-probe on the NEXT deploy * without new baseline calls on healthy deploys. One JSON file per * account/region/stack under `~/.fjall/drift/`; writes are atomic * (tmp + rename) against concurrent deploys sharing the directory. * * The journal is a hint, never an authority: reads fail soft (a corrupt or * schema-drifted file reads as "no suspects" at debug level), and a * journalled suspect still goes through the probe before any verdict. * Suspect `statusReason`s are pre-masked at construction upstream. */ import { type DriftJournalRecord, type DriftSuspect } from "../../types/drift.js"; export interface DriftJournalOptions { /** Override the journal root โ€” tests point this at a temp dir. */ journalDir?: string; } export declare function defaultDriftJournalDir(): string; export interface RecordDriftSuspectsParams { accountId: string; region: string; stackName: string; /** ISO-8601 timestamp of the failure that produced the suspects. */ recordedAt: string; suspects: readonly DriftSuspect[]; } /** * Persist a stack's suspects (atomic tmp + rename). Best-effort by contract: * failures are logged at debug and swallowed โ€” journalling must never turn a * deploy failure into a different failure. */ export declare function recordDriftSuspects(params: RecordDriftSuspectsParams, options?: DriftJournalOptions): Promise; /** * Read a stack's journalled suspects. Missing, corrupt, or schema-drifted * files all read as `null` (debug-logged) โ€” the journal is a hint. */ export declare function readDriftSuspects(accountId: string, region: string, stackName: string, options?: DriftJournalOptions): Promise; /** Remove a stack's journal entry (after a clean probe or deploy). */ export declare function clearDriftSuspects(accountId: string, region: string, stackName: string, options?: DriftJournalOptions): Promise;