Skip to content

Import and export

The implemented document interchange primitives are:

const encoded = engine.session.saveToBase64();
engine.session.loadFromBase64(encoded);

const snapshot = engine.snapshot();
engine.restore(snapshot);

persist() uses the first representation through a StorageAdapter; a SavedGame record adds metadata around it. snapshot() adds in-memory Engine history and policy names. Loading/restoring is guarded while network or sync is attached, and resume() clears stale local action history.

These are serialization APIs, not a versioned interchange or migration system. The storage contract currently stamps version 1.0.0; callers should check compatibility and keep backups. There is no documented streaming, selective-state export, encryption-at-rest, or generic cross-version migration facility in this layer.