import type { AggregateGraphViolation } from "../runtime/replay.js"; import type { CanonicalState, SynthEvent } from "../types/index.js"; /** Validator schema version carried by every report and proof artifact. */ export declare const GRAPH_INTEGRITY_VALIDATOR_VERSION = 1; /** Aggregate kinds the graph integrity model recognizes. */ export type GraphAggregateKind = "mission" | "expedition" | "objective" | "generatedWorkItem"; /** A single graph-integrity violation (superset of the replay violation shape). */ export type GraphIntegrityViolation = { kind: AggregateGraphViolation["kind"]; message: string; aggregateKind: GraphAggregateKind; aggregateId: string; parentId?: string; }; /** One invariant of the formal model and its verdict. */ export type GraphIntegrityInvariant = { /** Stable identifier, e.g. "parent-resolution". */ invariant: string; /** "not-event-provable" marks documented model gaps; it never fails a report. */ status: "pass" | "fail" | "not-event-provable"; detail: string; violations: string[]; }; /** Per-kind counts and structural statistics of the materialized graph. */ export type GraphIntegritySummary = { missions: number; expeditions: number; objectives: number; /** Canonical work items; the event payloads carry no objective edge (documented gap). */ workItems: number; generatedWorkItems: number; nodes: number; /** Resolved parent edges in the replayed state. */ edges: number; /** Mission roots. */ roots: number; }; /** Structured result of a Graph Integrity validation run. */ export type GraphIntegrityReport = { kind: "graph-integrity-report"; version: 1; result: "valid" | "invalid"; eventCount: number; invariants: GraphIntegrityInvariant[]; graph: GraphIntegritySummary; violations: GraphIntegrityViolation[]; }; /** * Validate the aggregate graph carried by an event log against the full * Graph Integrity invariant set. When the replayed state is not provided * it is rebuilt from the events, so post-replay navigation invariants * always run. The report is deterministic for a given event log. */ export declare function validateGraphIntegrity(events: SynthEvent[], state?: CanonicalState): GraphIntegrityReport;