SnapshotStorage
Defined in: src/session/storage.ts:47
Interface for snapshot persistence. Implementations provide storage backends (S3, filesystem, etc.).
File layout convention:
sessions/<session_id>/ scopes/ agent/<scope_id>/ snapshots/ snapshot_latest.json immutable_history/ snapshot_<uuid>.json snapshot_<uuid>.jsonMethods
Section titled “Methods”saveSnapshot()
Section titled “saveSnapshot()”saveSnapshot(params): Promise<void>;Defined in: src/session/storage.ts:51
Persists a snapshot to storage.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; snapshotId: string; isLatest: boolean; snapshot: Snapshot; } |
params.location | SnapshotLocation |
params.snapshotId | string |
params.isLatest | boolean |
params.snapshot | Snapshot |
Returns
Section titled “Returns”Promise<void>
loadSnapshot()
Section titled “loadSnapshot()”loadSnapshot(params): Promise<Snapshot>;Defined in: src/session/storage.ts:61
Loads a snapshot from storage.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; snapshotId?: string; } |
params.location | SnapshotLocation |
params.snapshotId? | string |
Returns
Section titled “Returns”Promise<Snapshot>
listSnapshotIds()
Section titled “listSnapshotIds()”listSnapshotIds(params): Promise<string[]>;Defined in: src/session/storage.ts:76
Lists all available snapshot IDs for a session scope.
TODO: Add pagination support for long-running agents with many snapshots. Future signature could be:
listSnapshots(params: { location: SnapshotLocation limit?: number // Max results to return (e.g., 100) startAfter?: string // Snapshot ID to start after (for cursor-based pagination)}): Promise<{ snapshotIds: string[]; nextToken?: string }>Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; } |
params.location | SnapshotLocation |
Returns
Section titled “Returns”Promise<string[]>
loadManifest()
Section titled “loadManifest()”loadManifest(params): Promise<SnapshotManifest>;Defined in: src/session/storage.ts:81
Loads the snapshot manifest.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; } |
params.location | SnapshotLocation |
Returns
Section titled “Returns”Promise<SnapshotManifest>
saveManifest()
Section titled “saveManifest()”saveManifest(params): Promise<void>;Defined in: src/session/storage.ts:86
Saves the snapshot manifest.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; manifest: SnapshotManifest; } |
params.location | SnapshotLocation |
params.manifest | SnapshotManifest |
Returns
Section titled “Returns”Promise<void>