PerryLink/dsh-checkpoint-rewind ↗★ 17
dsh-checkpoint-rewind
提供会话、工作区与配置的统一快照回滚
AI 分析
适合需要对工作状态进行自动备份、差异对比和一键回滚的开发人员。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:PerryLink/dsh-checkpoint-rewind说明文档
阅读完整 README ↗Configuration
All tunables are Schemastery Config fields (changeable from cordis.yml). Nothing is hardcoded. Provider options (gitBin, snapshotDir, excludeGlobs, verifyByHash) are read from the live config at use time, so cordis.yml changes apply without a restart.
| Key | Default | Meaning |
|---|---|---|
enabled | true | Master switch; false removes the commands, listeners, and providers entirely |
provider | auto | Snapshot provider: auto (git if available, else copy) · git · copy |
gitBin | git | Git executable path |
snapshotDir | $DSH_HOME/dsh-checkpoint-rewind (fallback ~/.dsh/dsh-checkpoint-rewind when $DSH_HOME is unset) | Root for copy-provider snapshots |
maxSnapshots | 50 | Checkpoints kept per session (oldest pruned first) |
maxSnapshotBytes | 536870912 (512 MiB) | Global incremental-byte soft quota (newest per live session always retained) |
pruneOnTurnEnd | true | Run quota pruning when a turn ends |
mutationTools | ['bash','write','edit','str_replace_editor','pwsh','terminal_send'] | Tools treated as mutating at tools/pre-execute |
excludeGlobs | ['node_modules','.git','.dsh','dist','build'] | Glob patterns skipped by the copy provider |
confirmVia | auto | Confirmation channel: auto (userQuestions first) · userQuestions · approval |
listLimit | 10 | Checkpoints shown by bare /rewind |
preRewindCheckpoint | warn | Guard checkpoint before restore: warn · require · off |
verifyByHash | false | Copy-provider content-hash comparison and restore verification |
autoCheckpoint.enabled | true | Automatic interval snapshots on step/start |
autoCheckpoint.intervalMinutes | 0 | Interval; 0 = every step |
workspaceRestore | restore | Workspace rollback: restore (safe overwrite) · reset-hard (CC-style, opt-in) |
diffRenderer | pairwise | Settings-page diff renderer: pairwise (line-level text) · side-by-side (per-file two-column) |
selectiveRestore | true | Per-file selective restore (/rewind … --files) and the panel's per-file checkbox + size total |
promptSection | true | Inject a short role-statement prompt section |
checkpointTool | true | Register the checkpoint model tool |
- insert:
- id: checkpoint-rewind
name: dsh-checkpoint-rewind
config:
provider: auto
maxSnapshots: 50
maxSnapshotBytes: 536870912
pruneOnTurnEnd: true
confirmVia: auto
preRewindCheckpoint: warn