Kind: Class
Source: atloria-monorepo/libs/agent-core/src/context/checkpoint-manager.ts
Methods
| Method | Signature | Returns |
|---|---|---|
createWithGit | `createWithGit(rootDir: string, config: Omit<CheckpointManagerConfig, 'rootDir' | 'backend'> & { |
sessionId?: string; staleAgeDays?: number; })` | `CheckpointManager` |
| snapshot | snapshot(relPath: string, label: string) | boolean |
| rollback | rollback(relPath: string, index: number) | string | null |
| getSnapshots | getSnapshots(relPath: string) | readonly Snapshot[] |
| getSnapshotCount | getSnapshotCount(relPath: string) | number |
| getTotalCount | getTotalCount() | number |
| getTrackedFiles | getTrackedFiles() | string[] |
| clear | clear() | void |
| getBackend | getBackend() | CheckpointBackend |
Where it refuses work
CheckpointManagerstops the work with an early return when!absPath.startsWith(path.resolve(this.rootDir)), in 2 places.CheckpointManagerstops the work with an early return when!fs.existsSync(absPath).CheckpointManagerstops the work with an early return whenfileSnaps.length === 0.CheckpointManagerstops the work with an early return whensnapIndex < 0 || snapIndex >= fileSnaps.length.
When something fails
CheckpointManagerhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?