import type { ApprovedMissionModelSnapshot } from "../mission-studio/types.js"; /** Minimal event shape the certifier needs (canonical events qualify). */ export type SeedEventLike = { type: string; payload: unknown; }; export type GenesisCertificationRule = { rule: string; status: "pass" | "fail"; violations: string[]; }; export type SeedEventGraphSummary = { missions: number; expeditions: number; objectives: number; nodes: number; edges: number; roots: number; }; export type GenesisCertificationReport = { kind: "genesis-certification-report"; version: 1; snapshotId?: string; result: "certified" | "rejected"; rules: GenesisCertificationRule[]; counts: { missions: number; expeditions: number; objectives: number; seedEvents: number; }; graph: SeedEventGraphSummary; warnings: string[]; violations: string[]; }; export type GenesisIntegrityProof = { kind: "genesis-integrity-proof"; version: 1; snapshotId?: string; result: "certified" | "rejected"; eventCount: number; firstEventHash: string | null; finalEventHash: string | null; /** SHA-256 over the ordered list of committed event hashes. */ chainDigest: string; graph: SeedEventGraphSummary; /** SHA-256 over the certification report content. */ certificationDigest: string; }; /** * Validate a snapshot presented for Genesis intake. * * Genesis must not trust that the snapshot passed Mission Studio * approval, so every check runs again here. Returns a list of * violations; empty means the snapshot is accepted. * * Violations: * - missing or malformed required snapshot fields * - proposal with missing required fields (id, name, and the * kind-specific fields the snapshot bridge maps into events) * - invalid parent references and duplicate identities * (via the Mission Studio proposal graph validator) */ export declare function validateSnapshotAcceptance(snapshot: ApprovedMissionModelSnapshot): string[]; /** * Certify the mission/expedition/objective graph carried by a set of * seed events. Every expedition must reference a mission present in * the same graph, every objective must reference an expedition * present in the same graph, every node must be reachable from a * mission root, and the graph must be acyclic. */ export declare function certifySeedEventGraph(seedEvents: SeedEventLike[]): { violations: string[]; graph: SeedEventGraphSummary; }; /** * Run every Genesis intake rule and produce the certification report. * The report is deterministic: it contains no wall-clock fields, so * identical inputs always produce an identical report. */ export declare function certifyGenesisIntake(input: { snapshot?: ApprovedMissionModelSnapshot; seedEvents: SeedEventLike[]; }): GenesisCertificationReport; /** * Build the integrity proof for a certified Genesis intake. The proof * binds the committed hash chain (via its ordered event hashes) to * the certification report (via its content digest), so any later * tampering with either is detectable by recomputation. */ export declare function buildGenesisIntegrityProof(input: { report: GenesisCertificationReport; events: Array<{ eventHash: string; }>; }): GenesisIntegrityProof;