import { type ActionRegistry } from "@decionis/agent-safe-pipeline"; import type { SecurityEvents } from "../incident/SecurityEvents.js"; import type { ExecutionJournal, OpenAttempt } from "./ExecutionJournal.js"; export type AttemptResolution = "RECONCILED_COMPLETED" | "RECONCILED_NOT_EXECUTED" | "STILL_UNKNOWN" | "UNCLAIMED" | "BINDING_MISMATCH"; export interface ResolvedAttempt { readonly intentId: string; readonly intentHash: string; readonly idempotencyKey: string; readonly openedAt: string; readonly state: OpenAttempt["state"]; readonly resolution: AttemptResolution; } export interface RecoveryReport { readonly attempts: readonly ResolvedAttempt[]; /** Attempts whose outcome is still not known; `/ready` can be made to wait on these. */ readonly unknown: number; } export interface StartupReconcilerOptions { readonly journal: ExecutionJournal; readonly registry: ActionRegistry; readonly events: SecurityEvents; readonly clock?: () => Date; } /** * What the last process left behind, resolved before this one accepts a * request. Every attempt the journal has open is read back, its stored * intent re-hashed rather than trusted, and the provider asked what it did * with that idempotency key, read-only. Nothing is ever re-executed here: * the reconciler calls the registry's read path, never the execute path. * * An attempt that was opened but never claimed had no grant consumed, so * the provider was never reached; the authority's own lease recovery owns * it and this process says so rather than guessing. An attempt whose stored * intent no longer hashes to its recorded hash is a tampered journal and is * reported as such. */ export declare class StartupReconciler { private readonly options; private readonly hasher; private readonly clock; constructor(options: StartupReconcilerOptions); recover(): Promise; private resolve; /** Records how the attempt ended, so the next start does not ask again. */ private close; } //# sourceMappingURL=StartupReconciler.d.ts.map