Anionex/dsh-turn-rewind ↗★ 116
@anionex/dsh-turn-rewind
提供会话与工作区的单轮级回退和恢复功能 适合需要精细控制对话历史、随时回退工作区状态的开发者。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Anionex/dsh-turn-rewind说明文档
阅读完整 README ↗Configuration
Runtime-tunable options are editable in the DSH web settings page under Plugins → Turn Rewind (turn-rewind settings namespace). Changes apply live to the next capture, restore, or deletion; they persist in the host's settings.yaml and override the profile patch values below. storageDir is deliberately not editable there: the storage root must not move while the engine holds locks and journals, so it stays a patch-layer field.
Override the composition base (and storageDir) in the profile patch layer:
- id: turn-rewind
config:
storageDir: ~/.dsh/change-ledger/v1
maxRestorePoints: 50
maxTurnCheckpointsPerSession: 30
maxFiles: 20000
maxFileBytes: 16777216
maxSnapshotBytes: 536870912
planTtlMs: 900000
staleLockMs: 30000
turnCheckpointMode: legacy # off | git-native | legacy; "off" stops creating file checkpoints
turnCheckpointTimeoutMs: 5000
turnCheckpointMaxNewBytes: 33554432
turnCheckpointTrust: fast # fast | strict
A file above `maxFileBytes`, or one whose type is unsupported, is skipped and recorded on the restore point instead of discarding the whole checkpoint; the dialog names it, and a restore never touches a skipped path. Reaching `maxFiles` or `maxSnapshotBytes` keeps the captured part and says so in the dialog.
Setting turnCheckpointMode: off (in the patch or in the settings card) stops automatic file checkpoints; every turn records a durable skip instead, and the rewind dialog still offers Rewind messages only for those messages.
All size and user-point retention limits fail loudly. Automatic turn checkpoints have a separate per-session retention window and prune only their own oldest checkpoints; user and rescue restore points are never silently pruned. When omitted, storageDir resolves to $DSH_HOME/change-ledger/v1 and falls back to ~/.dsh/change-ledger/v1; it must not overlap the managed worktree.