Loads a snapshot either by its snapshotId or by sessionId.
See GetSnapshotOptions for the lookup semantics (exactly one of
snapshotId / sessionId; sessionId resolves to the session's latest
leaf snapshot, optionally rejecting branching histories).
OptionalonOptionaloptions: SessionStoreOptionsAtomically reads the current snapshot (if snapshotId is provided),
passes it to mutator, and persists the result.
snapshotId is provided the store reads the existing snapshot
and passes it to the mutator. The mutator can inspect the current
state (e.g. to check for concurrent status changes) and return the
updated snapshot to save, or null to skip the write.snapshotId is undefined the store passes undefined to
the mutator (signaling a new snapshot). The store assigns a new
identifier.Implementations should ensure the read→mutate→write cycle is atomic to prevent race conditions (e.g. a "done" write overwriting a concurrent "aborted" status).
The mutator can:
null to silently skip the write.Optionaloptions: SessionStoreOptionsThe snapshotId that was used, or null when the mutator
returned null.
Interface for persistent session snapshot storage.