/** * ADR-406 §19.3 — fold a mission's append-only event log into a `MissionView`. * * Replay re-checks every control event against the transition table and every * observation against its own rules, and verifies the hash chain, so state is * a pure function of the log: snapshot + tail and full replay must agree. */ import { type ControlEventType, type MissionEvent, type ObservationEventType } from './schemas.js'; import { type MissionView } from './transitions.js'; export declare const GENESIS_HASH: string; export declare function isControlEvent(type: string): type is ControlEventType; /** Hash over every field except `hash` itself, chained through `prevHash`. */ export declare function eventHash(event: Omit): string; /** Observation rules; throws `TransitionError`. Observations never change state. */ export declare function checkObservation(view: MissionView, type: ObservationEventType, p: Record): void; /** Apply one event; throws `TransitionError` for anything the rules refuse. */ export declare function foldEvent(view: MissionView | null, event: MissionEvent): MissionView; export declare function replay(events: readonly MissionEvent[], from?: MissionView | null): MissionView | null; //# sourceMappingURL=fold.d.ts.map