Expand description
Cheap workspace environment-delta observability.
Long-horizon agents operate in a changing environment: files are written, processes mutate state, git trees move. The harness needs a fast way to detect that the environment drifted between turns so it can re-ground assumptions instead of trusting a stale picture.
WorkspaceSnapshot captures a lightweight fingerprint of every tracked
file (size + mtime + a short content hash of the head), and diff
computes added/changed/removed paths. Snapshots are cheap enough to take at
each turn boundary and to persist as a derived view.
Structs§
- File
Stat - A compact fingerprint of a single file.
- Snapshot
Delta - The difference between two workspace snapshots.
- Workspace
Snapshot - A point-in-time fingerprint of a workspace’s tracked files.
Functions§
- diff
- Compute the delta from
oldtonew. - snapshot_
path - Resolve the on-disk path for a session’s environment snapshot.