Expand description
Shadow bare git repository for per-session, per-turn checkpoints.
A single bare repo lives at <workspace>/.recursive/shadow-git/.
All sessions in the same workspace share that repo’s object store
(so identical file contents dedup automatically), but each session
advances its own ref chain at refs/sessions/<sid>/HEAD.
Checkpoints are taken automatically by AgentRuntime at the
beginning and end of every turn — never by the agent itself.
Restoration is selective: callers must specify which file paths
to revert, leaving sibling sessions’ work untouched.
Implementation note: this module shells out to git via
std::process::Command so no new Cargo dependency is required.
Structs§
- Checkpoint
Id - 12-char short SHA identifying one checkpoint commit.
- Checkpoint
Info - Metadata for a single checkpoint commit.
- Restore
Stats - Result of a
ShadowRepo::restore_pathscall. - Shadow
Repo - A shared shadow bare git repository for a workspace.