S3Storage
Defined in: src/session/s3-storage.ts:31
S3-based implementation of SnapshotStorage for persisting session snapshots
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new S3Storage(config): S3Storage;Defined in: src/session/s3-storage.ts:42
Creates new S3Storage instance
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
config | S3StorageConfig | Configuration options |
Returns
Section titled “Returns”S3Storage
Methods
Section titled “Methods”saveSnapshot()
Section titled “saveSnapshot()”saveSnapshot(params): Promise<void>;Defined in: src/session/s3-storage.ts:65
Saves snapshot to S3, optionally marking as latest
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>
Implementation of
Section titled “Implementation of”loadSnapshot()
Section titled “loadSnapshot()”loadSnapshot(params): Promise<Snapshot>;Defined in: src/session/s3-storage.ts:81
Loads snapshot by ID or latest if undefined
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; snapshotId?: string; } |
params.location | SnapshotLocation |
params.snapshotId? | string |
Returns
Section titled “Returns”Promise<Snapshot>
Implementation of
Section titled “Implementation of”listSnapshotIds()
Section titled “listSnapshotIds()”listSnapshotIds(params): Promise<string[]>;Defined in: src/session/s3-storage.ts:103
Lists all snapshot IDs for a session scope.
TODO: Add pagination support for long-running agents with many snapshots. Future signature could be:
listSnapshots(params: { sessionId: string scope: Scope 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[]>
Implementation of
Section titled “Implementation of”SnapshotStorage.listSnapshotIds
loadManifest()
Section titled “loadManifest()”loadManifest(params): Promise<SnapshotManifest>;Defined in: src/session/s3-storage.ts:124
Loads manifest or returns default if not found
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; } |
params.location | SnapshotLocation |
Returns
Section titled “Returns”Promise<SnapshotManifest>
Implementation of
Section titled “Implementation of”saveManifest()
Section titled “saveManifest()”saveManifest(params): Promise<void>;Defined in: src/session/s3-storage.ts:139
Saves manifest to S3
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
params | { location: SnapshotLocation; manifest: SnapshotManifest; } |
params.location | SnapshotLocation |
params.manifest | SnapshotManifest |
Returns
Section titled “Returns”Promise<void>