Skip to main content

Module checkpoint

Module checkpoint 

Source
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§

CheckpointId
12-char short SHA identifying one checkpoint commit.
CheckpointInfo
Metadata for a single checkpoint commit.
RestoreStats
Result of a ShadowRepo::restore_paths call.
ShadowRepo
A shared shadow bare git repository for a workspace.