
Anionex/dsh-turn-rewind
582最近提交 2026年8月14日
dsh-turn-rewind DSH 插件
Turn Rewind 为 DSH 会话提供持久的恢复生命周期,将恢复点锚定到每条用户消息。它提供两种模式:仅恢复文件,或恢复文件并从所选消息之前重启对话。该插件包含安全合约,包括预览、明确确认、自动救援点和恢复后验证。
如何安装 dsh-turn-rewind DSH 插件
dsh plugin --profile web add @anionex/dsh-turn-rewind复制不会执行命令。安装 dsh-turn-rewind DSH 插件前请核对仓库和版本。
dsh-turn-rewind DSH 插件数据来源
dsh-turn-rewind DSH 插件快照日期:2026年8月16日
discovered
dsh-turn-rewind DSH 插件能做什么
- 在 DSH 会话中基于用户消息创建恢复点。
- 在应用恢复前预览文件级别的更改(添加、修改、删除)。
- 仅恢复文件,或恢复文件并从所选消息之前重启对话。
- 每次恢复前自动创建救援点,支持失败时回滚。
- 恢复后进行哈希验证以确保完整性。
- 支持受跟踪文件、未跟踪文件(未被 .gitignore 排除)、符号链接和可执行权限位。
- 提供公共服务 API(`ctx.changeLedger`),供其他插件使用快照/恢复生命周期。
dsh-turn-rewind DSH 插件适合哪些场景
- 从代理在对话中造成的意外文件修改中恢复。
- 撤销特定回合的更改,并从该点继续对话。
- 在失败实验前回退到干净的项目状态,同时保留对话历史。
- 分支对话(原生 Branch)而不影响文件,或选择恢复文件带或不带对话重启。
- 让其他插件通过服务 API 集成持久的快照和恢复功能。
dsh-turn-rewind DSH 插件适合谁
- 希望在代理交互期间安全恢复文件和回溯的 DSH 用户。
- 使用 DSH Agent 且需要可靠回退工作区变更的开发者。
- 希望利用 Change Ledger 引擎实现自己的快照/恢复功能的插件开发者。
dsh-turn-rewind DSH 插件的限制
- 版本 0.1:仅支持普通 Git 工作目录;稀疏检出、子模块、忽略文件、特殊文件、套接字、设备、命名管道、扩展属性、ACL、所有权、时间戳和硬链接拓扑均被拒绝。
- 不支持非 Git 目录;插件需要 Git 仓库。
- 所有大小和用户点保留限制会直接失败:maxRestorePoints(50)、maxFileBytes(16MB)、maxSnapshotBytes(512MB)等。
- 如果任何正在运行的 Agent 使用相同的工作目录(包括源会话),则恢复操作被阻止。
- 不修改 Git 内部数据(索引、分支、HEAD、贮藏、提交);恢复的内容显示为未提交的更改。
dsh-turn-rewind DSH 插件的仓库 README 摘录
以下文字摘自 dsh-turn-rewind DSH 插件的上游仓库 Anionex/dsh-turn-rewind 的 README,版权归原作者,仅作引用。
Message-anchored project-file recovery for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), with an option to restart from the restored request. **Turn Rewind** is the user-facing feature, repository, and Profile Bundle name. **Change Ledger** is the durable restore engine underneath it: the `ctx.changeLedger` service, on-disk format, and storage path keep that name because they describe the reusable snapshot and recovery layer rather than the Web action alone. Change Ledger gives a DSH session an explicit safety boundary around workspace mutations: ```text create restore point ↓ agent / user / external tools modify the worktree ↓ preview exact path-level drift ↓ review a full or selective restore plan ↓ press the final restore button in the rewind dialog ↓ create rescue point → restore → verify ``` It never commits, stashes, resets, switches branches, edits the Git index, or decides automatically that a change should be reverted. ## Preview Rewind appears as an icon-only third action under each user message, after its timestamp and native Copy action: 。它在任何修改前创建救援点,并在之后验证哈希。如果恢复失败,它会自动使用救援点回滚。此外,插件从不修改 Git 内部数据(索引、分支、提交),因此你的 Git 历史保持不变。
如何配置插件的存储限制?
你可以在 DSH 配置文件的补丁层覆盖默认配置。关键设置包括 storageDir、maxRestorePoints(默认 50)、maxFileBytes(16MB)、maxSnapshotBytes(512MB)和 planTtlMs(900000)。所有大小限制都会直接失败,因此请根据项目设置合适的值。
恢复点支持哪些文件类型?
Turn Rewind 支持受跟踪的文件(包括当前缺失的跟踪路径)、未被 .gitignore 排除的未跟踪文件、普通文件(二进制或文本)、符号链接和可执行权限位。不支持忽略的文件、子模块、稀疏检出、特殊文件(套接字、设备、命名管道)、扩展属性、ACL、所有权、时间戳或硬链接。