/** * The drift-detection pipeline for one stack: last-operation event scan → * suspect classification → journal merge → probe → journal upkeep. Shared by * `fjall drift detect` and the [G2] deploy pre-flight so both surfaces report * identical findings for identical state. * * Journal upkeep: confirmed or unconfirmed findings (the wedge persists or * could not be ruled out) re-record the journal so the next deploy re-probes; * all-present or stack-missing findings clear it. */ import { type Result } from "@fjall/generator"; import type { AwsProvider } from "../../aws/AwsProvider.js"; import type { DriftFinding, DriftSuspect } from "../../types/drift.js"; import type { DriftProbeRunner } from "./driftProbe.js"; import { type DriftJournalOptions } from "./driftSuspectJournal.js"; export interface DetectStackDriftDeps { aws: AwsProvider; probe: DriftProbeRunner; journal?: DriftJournalOptions; /** Injectable clock for journal timestamps. */ now?: () => Date; } export interface DetectStackDriftParams { stackName: string; abortSignal?: AbortSignal; } export interface StackDriftReport { stackName: string; suspects: DriftSuspect[]; findings: DriftFinding[]; /** How many suspects came from the live event scan vs the journal. */ suspectSources: { events: number; journal: number; }; } export declare function detectStackDrift(deps: DetectStackDriftDeps, params: DetectStackDriftParams): Promise>;