AI Agent Hub
Back to plugins
🧠

dsh-rollback

Memory Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install Taler97/dsh-rollback

Paste the following prompt into your AI chat to install this plugin:

Install it in DeepSeek Harness by running dsh plugin install Taler97/dsh-rollback; the source is available at https://github.com/Taler97/dsh-rollback

About this plugin

When an AI agent overwrites a file via write, edit, or a bash/run_code call, the original content is often lost for good. dsh-rollback solves exactly this gap: without touching the agent loop, it hooks into Harness' documented tools/* extension points to silently checkpoint every file mutation so it can be undone later.

Two capture paths feed the same store. On a successful write/edit result the plugin pulls the pre-image and stores it as a git blob via hash-object -w, leaving the index, refs, and working tree untouched. For opaque bash/run_code calls it forward-snapshots the entire session working directory before execution, then diffs the tree afterwards to archive every changed or created file. Restoration is exposed as a model-facing rollback_files tool and a human /rollback command, both backed by the same durable append-only manifest, so records survive restarts and restores are idempotent.

It is aimed at developers who use DeepSeek Harness for file editing, code generation, or script execution. No workflow change is required: the plugin auto-mounts, adds zero tokens during normal operation, and a single tool call or command reverts the file to its pre-mutation byte-exact state.

Use Cases

  • A model agent overwrites a file with a broken edit and the original content must be restored instantly
  • A bash or run_code call unexpectedly modifies several files and the user wants to undo all of them at once
  • After a session restart, previously captured checkpoints remain available for idempotent restoration

Best For

  • Developers using DeepSeek Harness for file editing, code generation, or script execution
  • Engineering teams that need a safety net around AI agent file mutations
  • Architects who want non-invasive rollback guarantees without altering the agent loop