Kind: Class
Source: atloria-monorepo/libs/agent-core/src/context/git-backend.ts
Implements: CheckpointBackend
Methods
| Method | Signature | Returns |
|---|---|---|
isGitRepo | isGitRepo(dir: string) | boolean |
save | save(snap: Snapshot) | void |
load | load(relPath: string) | Snapshot[] |
loadLatest | loadLatest(relPath: string) | `Snapshot |
deleteFile | deleteFile(relPath: string) | void |
deleteFrom | deleteFrom(relPath: string, fromIndex: number) | void |
getTrackedFiles | getTrackedFiles() | string[] |
getTotalCount | getTotalCount() | number |
getSnapshotCount | getSnapshotCount(relPath: string) | number |
clear | clear() | void |
evictOldest | evictOldest() | boolean |
Properties
| Property | Type |
|---|---|
sessionId | string |
Where it refuses work
GitBackendstops the work withErrorwhen!this.gitDir.GitBackendstops the work with an early return when!entries || entries.length === 0, in 2 places.GitBackendstops the work with an early return when!entries.GitBackendstops the work with an early return whenfromIndex < 0 || fromIndex >= entries.length.
When something fails
GitBackendhandles failure in 7 places: it turns it into a return value in 3, discards it silently in 3, and logs it and continues in 1. A failure discarded silently leaves no trace for whoever debugs this later.
Was this page helpful?