Repository navigation
tracefs: a changeset for every step a DSH agent takes, with undo (bundle, MIT) #13309
emmettlu
started this conversation in
Show Your Plugins!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
tracefs: version every step a DSH agent takes, and undo it
The problem
An agent runs a dozen
bash/write/apply_patchcalls in a turn, and halfway through you want the files back as they were before step three. Usually that means git stash, a manual diff, or asking the model to undo from memory. tracefs leaves it to the file system:tracefstool withaction=status/log/diff/undo/merge.undoreverts only the paths that batch touched; if those paths changed again afterwards it reports a conflict and changes nothing.turn/end). Text files changed on both sides go togit merge-file; anything that doesn't merge is reported as a conflict and main is left alone. Setmerge: falseto turn the automatic merge off.Where it runs
The plugin is userspace only and ships its own cross-platform backend, tracefs-lite:
hdiutil, no root)clonefile, no extra spaceudisksctlotherwise)When dsh runs under
tracefs runon Linux, the plugin switches to thetracefsddaemon instead (btrfs subvolumes + overlayfs + a mount namespace that keeps the agent in its own branch).Install
The plugin: open Plugins, switch on Custom plugin indexes under Experimental plugins, then on the Discover tab choose Add index source and enter:
Search for
tracefsand choose Install. The confirmation should show the Git repositorygithub.com/emmettlu/tracefs, commit0c6d711, directorysdk/dsh.Or skip the index and use the install spec directly:
Needs DSH
>=0.2.1-alpha.4 <0.3.0; npm is not involved.Put the project in a tracefs-lite store (the plugin records only in trees of a store; elsewhere it only offers the
tracefstool, which says how to turn it on):Then point the DSH session's working directory at the printed path.
Tests and CI
Every commit runs on GitHub Actions (ci.yml):
tracefsdintegration tests (root, btrfs, systemd) and the kernel module (Linux 7.3 in QEMU).The same backend elsewhere
The repo also has a Codex plugin (hooks + skill) and a pi-coding-agent extension on the same backend.
Known limits
Feedback welcome — please file issues.
All reactions