snapshots.getSaveSnapshot
Returns the active snapshot for a save, optionally including the full content.The save ID.
Whether to include the full HTML/text content. Defaults to
false (returns metadata only).The active snapshot, or
null if no snapshot exists.snapshots.requestSaveSnapshot
Manually requests a new snapshot (re-snapshot) for a save.The save ID to re-snapshot.
snapshots.getSnapshotHistory
Returns all snapshot versions for a save, ordered by version number.The save ID.
Array of all snapshot versions for the save, from newest to oldest.
snapshots.setActiveVersion
Restores a previous snapshot version as the active (displayed) version.The snapshot version ID to activate.
This doesn’t delete other versions — it just changes which version is displayed in reader mode. You can switch between versions at any time.
Content deduplication
Snapshots use content-addressable storage for efficiency:- Content is hashed with SHA-256
- Identical content across saves or versions is stored once
- Reference counting ensures cleanup when content is no longer needed
- If a re-snapshot produces the same content, the duplicate version is automatically discarded
