Anionex/dsh-turn-rewind 预览 preview

Anionex/dsh-turn-rewind

Plugin插件 Native原生 ⭐ 127 BSD-3-Clause Sessions & Context会话与上下文

deepseek 工具——对话与工作区状态回退插件 | DSH —— 由持久化变更账本驱动,可回退对话与工作区状态

Project Overview项目介绍

DSH Turn Rewind is a native plugin built exclusively for DeepSeek Harness. It adds message-anchored project file recovery to DSH sessions, letting users restart a session from any previous user message. Its underlying recovery engine is called Change Ledger, which creates durable restore points and exposes a public API that other Cordis plugins can consume to extend its functionality. It works with both Git worktrees and ordinary non-Git directories, with optimizations to speed up snapshot creation for large workspaces. It skips re-reading unchanged files, cutting snapshot time for a 20,000-file workspace from 237 seconds to just 7 seconds.

The standard workflow starts with creating a restore point before any changes are made to the workspace. After the agent or user modifies working files, Turn Rewind shows a preview of exact path-level changes, then lets the user approve a full or selective restore plan before executing any changes. Every restore requires explicit user approval via the UI dialog, so no changes are reverted automatically without user action. It also automatically creates a rescue point before any restore to handle unexpected program interruptions. This plugin is ideal for any DSH user who wants the ability to roll back accidental workspace changes and restart sessions from an earlier point.

DSH Turn Rewind is released under the open-source BSD-3-Clause license, so it is free to use and modify. It stores restore points by default in $DSH_HOME/change-ledger/v1, and can be configured to use an alternate storage location if needed. Oversized files are skipped and reported rather than causing the entire checkpoint to fail, which improves reliability for large workspaces. It automatically prunes only old automatic checkpoints, never silently deleting user-created restore points. The plugin also includes a storage manager to let users delete old restore points and garbage collect unused blob data to save disk space.

DSH Turn Rewind 是专为 DeepSeek Harness 开发的原生会话上下文插件,核心功能是给 DSH 会话提供基于消息锚点的工作区文件恢复能力,允许用户从任意历史消息点重启会话。它不仅支持 Git 工作树,也支持普通非 Git 目录的快照恢复,底层使用 Change Ledger 持久化恢复引擎,还可为其他 Cordis 插件提供公开可调用的服务 API。

用户使用流程是先创建恢复点,之后代理或用户修改工作区文件,插件会预览路径级别的变更差异,用户梳理并确认完整或选择性恢复计划后,点击对话框中的最终恢复按钮即可完成操作。所有恢复操作都需要用户手动点击确认,不会自动执行任何回滚,能避免误改文件带来的问题,适合需要回溯会话和工作区状态的 DSH 用户。

该插件采用 BSD-3-Clause 许可证开源,默认将恢复点存储在 $DSH_HOME/change-ledger/v1,不存在付费或闭源组件,可免费使用。它支持对超大文件单独跳过记录、对未变更文件跳过重读取,能大幅提升大工作区的快照创建速度,恢复前还会自动创建救援点应对程序异常中断。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 no risk signal found未发现风险信号
  • This site's static screen found no obvious risk signal (stars, license, activity, manifest)本站静态筛查没发现明显风险信号(星标、许可证、更新活跃度、清单完整度)
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add @anionex/dsh-turn-rewind

把 Anionex/dsh-turn-rewind 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DSH Turn Rewind

X (Twitter)

中文说明

Message-anchored project-file recovery for 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:

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.

What's new

Most recent work first:

  • File rewind works in ordinary directories (0.3.0) — when the working directory is not a Git repository it is snapshotted as an ordinary directory (.git and node_modules excluded by default, plus an optional .dsh-rewindignore), so messages-only rewind is no longer the only option.
  • The fastest path is now the default (0.3.8) — the new auto mode uses Git-native checkpoints in a Git worktree (reusing the repository object database, so committed content is never stored twice) and the plugin's own store for ordinary directories.
  • Unchanged files are no longer re-read (0.3.5) — each workspace keeps a persistent path identity cache; a measured 20 000-file / 351 MB workspace dropped from 237 s to about 7 s per capture.
  • One oversized file no longer discards a whole checkpoint (0.3.3) — it is skipped and reported while the rest is still captured, and a restore never touches a path its checkpoint did not record, so a file that was too large then and small now is never deleted.
  • Checkpoint budget 5 s → 60 s, parallel capture (0.3.4) — a 5-second budget in a large directory could only ever report a skip.
  • Rewind button and messages-only fixes (0.2.2 / 0.2.3) — adapted to the DSH 0.1.2-alpha client hooks and restored the messages-only mode that the Host rejected.
  • Settings card matches the official cards (0.3.6 / 0.3.7) — one collapsed row that expands, consistent with every other plugin card.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-recall-unread 下一个 Next dsh-codex-subscription →