/** * Plain JSON-compatible representation of a World. * Returned by `world.toJSON()`, consumed by `World.fromJSON()`. */ export interface WorldSnapshot { /** Entity stable ID → component map (component name → data). */ entities: Record>; /** Relationship name → (source ID → target ID or edge object). */ relationships: Record< string, Record >; }