Wire-format envelope produced by Graph.snapshot and consumed by Graph.hydrate.

Inputs are captured by their JSON-serialisable values; non- serialisable values are omitted (mirrors Graph.exportModel conservatism). The optional schemaHash is a deterministic digest over the registered node id-set; when present, hydrate rejects snapshots whose hash does not match the live graph's id-set with a HydrationSchemaError. That capability check is the structural defence against the hydration-mismatch race — server-snapshot id-set ≠ client node-set is not "almost certainly fine in practice," it is rejected at the door.

interface GraphSnapshot {
    inputs: Readonly<Record<string, unknown>>;
    schema: 1;
    schemaHash?: string;
    time: number;
}

Properties

inputs: Readonly<Record<string, unknown>>

Map of input id → JSON-serialisable value.

schema: 1

Wire-format schema version; pinned at 1 for the current epic.

schemaHash?: string

Deterministic digest over the registered node id-set at capture time. Optional on the wire so hand-authored snapshots and pre-hash test fixtures stay valid; when present, validated by Graph.hydrate.

time: number

GraphTime at which the snapshot was captured.