DSH Plugins
返回列表
⚙️

dsh-turnsnap

工作流 更新于 2026.08.28

在终端中运行以下命令:

dsh plugin install yongshuai0314/dsh-turnsnap

将以下提示词粘贴到 DeepSeek Harness 对话框中:

在 DeepSeek Harness 中执行 dsh plugin install yongshuai0314/dsh-turnsnap 即可安装本插件,源码见 https://github.com/yongshuai0314/dsh-turnsnap 。

插件介绍

Long agent sessions in DeepSeek Harness rewrite dozens of files in a row. When a turn goes sideways, you are left either digging through git log for the last known-good state or simply losing the trail. dsh-turnsnap makes the checkpoint automatic: after every completed agent turn, if the session working directory is a git repository with uncommitted changes, it stages everything and creates one tagged [turnsnap] commit with the turn number, file count, and timestamp baked into the message, giving you a rollback anchor you never had to ask for.

The whole thing is zero-config and needs no client half; once the plugin loads it hot-reloads within seconds and starts guarding every session in a git workspace. Checkpoints are serialized on an internal queue, so a parent session and its subagents closing turns at the same moment cannot race the git index. Three argument-free tools are exposed - turnsnap_pause, turnsnap_resume, and turnsnap_status - so you can tell the model to pause or resume auto-commits mid-session, or call them from any script for fine-grained control over which turns get snapshotted.

It is built for developers running multi-turn code generation, refactors, or batch tasks in DSH who want a one-step way to roll back. Keep in mind that checkpoints use git add -A with --no-verify: pre-commit hooks are skipped, and any deliberately partial staging that spans a turn boundary will be folded into the commit - a quick pause before that boundary keeps things clean.

使用场景

  • 多回合代码生成后需要快速回滚到某一回合
  • 子代理并发修改同一仓库时避免 git 索引竞态
  • 批量重构或大规模改写时逐回合保留可追溯快照

适合人员

  • 使用 DeepSeek Harness 跑多回合会话的开发者
  • 需要频繁回滚的实验性项目维护者
  • 希望减少手动 git 操作的自动化工作流用户