domitor-syh/dsh-rollback 预览 preview

domitor-syh/dsh-rollback

Plugin插件 Native原生 ⭐ 2 MIT Sessions & Context会话与上下文

为 DeepSeek Harness(DSH)Web 端提供一个 TRAE 式「回退到本轮对话发起前」的插件:按轮次建立检查点,一键把【工作区文件】和【模型上下文】同时回退到某一轮发起之前,保持同一会话 id。

catalog descriptioncatalog 简介 / catalog description:TRAE-style conversation rollback plugin for DeepSeek Harness

Project Overview项目介绍

dsh-rollback is a native conversation-rollback plugin purpose-built for the DSH (DeepSeek Harness) Web client, distributed as the npm package @domitor-syh/dsh-rollback and shipped with a bundle manifest so the DSH boot layer can load it from a profile's node_modules. It faithfully reproduces TRAE's "rewind to before this turn" semantics by establishing a checkpoint at the start of every turn, then atomically rolling back both workspace files and the model context to that checkpoint while preserving the same session id, which prevents the hallucination-continuation and state-conflict artefacts you would get from rolling back only one side.

The intended workflow is triggered either by the per-turn "回退" button on the DSH Web UI (on the action bar of a completed turn, or the turn footer of an interrupted one) or by the slash command /rollback. The plugin opens an in-session dialog listing affected files and their planned actions (restore, recover, delete, skip), and on confirmation it uses the official user/message replace primitive to truncate the context in place while a Copy-before-Write snapshot restores modified files, deletes newly created files, and rehydrates deleted ones, all within a 10-turn sliding window that mirrors TRAE's design.

Compatibility, dependencies, and first-run caveats are tight and explicitly documented: runtime requires >=0.1.5-rc.2 <0.2.0-0 or >=0.2.0-rc.2 <0.3.0-0, and only DSH 0.2.0-rc.2 and 0.1.5-rc.2 are end-to-end verified in 0.4.0; other builds in range are supported by design only, will name themselves in the browser console on contract mismatch, and degrade fail-closed so the worst case is "nothing gets hidden". Development requires pnpm plus Node tooling, and crucially pnpm build alone is not enough because DSH does not load from the repo — you must run pnpm deploy:profile to repack the tarball into the active profile, then manually restart DSH and refresh the page; out-of-window rollback targets, the retired conversationEvents service, and path-based reference chips (@path mentions) are not recoverable, and the licence is MIT.

dsh-rollback 是一个面向 DSH(DeepSeek Harness)Web 端的原生对话回退插件,仿照 TRAE 的"回退到本轮发起前"语义,按对话轮次建立轻量检查点,在保持同一 session id 不变的前提下,把工作区文件改动与模型上下文同时对齐回滚到目标轮之前,从根本上避免只回滚一方导致的幻觉延续或状态冲突。插件以 npm 包 @domitor-syh/dsh-rollback 形式发布,配套 bundle manifest,并被列入 awesome-dsh-plugin 索引页。

典型工作流中,用户在 DSH Web 端每轮回复结束后的动作条(或被中断轮次的页脚)点击"回退"按钮,也可直接键入 /rollback 命令;插件弹出会话内对话框列出受影响的文件与处置(恢复/找回/删除/跳过),确认后即用官方原语 user/message 的 replace 就地截断上下文并通过 Copy-before-Write 还原文件。回退目标限定在最近 10 轮滑动窗口内,超出范围 GUI 按钮置灰、命令报错;适用对象是会在多轮编辑中遇到模型走偏或文件被污染、需要局部回滚而不丢失整个会话的 DSH 重度用户。

依赖与限制方面,运行时需 DSH ≥0.1.5-rc.2 且 <0.2.0-0,或 ≥0.2.0-rc.2 且 <0.3.0-0,0.4.0 版本只对 0.2.0-rc.2 与 0.1.5-rc.2 做端到端实测,其它构建仅按设计兼容且可能在控制台点名报错并 fail-closed;构建与部署需 pnpm,完成 pnpm build 后必须运行 pnpm deploy:profile 重新打包到 profile 并手动重启 DSH。已退役的 conversationEvents 服务、跨会话文件改动以及参考芯片(路径附件)均不在可恢复范围内,许可证为 MIT。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 @domitor-syh/dsh-rollback

把 domitor-syh/dsh-rollback 加入你的 DSH 配置(web profile)即可启用。

READMEREADME



dsh-rollback · TRAE 式「回退」插件

dsh-rollback 界面预览

🌐 语言 / Language: 中文 · English

Awesome DSH Plugin listed plugins npm downloads MIT License CI

为 DeepSeek Harness(DSH)Web 端提供一个 TRAE 式「回退到本轮对话发起前」的插件:按轮次建立检查点,一键把【工作区文件】和【模型上下文】同时回退到某一轮发起之前,保持同一会话 id。

是什么

dsh-rollback 忠实实现了 TRAE 回退功能的核心设计思想——对话状态与文件状态对齐回滚:

  • 模型行为由「对话历史」和「工作区文件」共同决定,因此回退必须同时回滚两者,否则会出现幻觉延续或状态冲突。
  • 回退 = 恢复该轮及之后触碰过的文件(修改→写回原内容,新建→删除)+ 原位截断对话历史(同一 session id,模型不再看到被截断的内容)。

兼容的 DSH 版本

最新发布(0.4.0)在各已发布 DSH 构建上的情况;清单取自 npm registry 上的 @deepseek-ai/dsh,覆盖截至本次发布已发布的全部构建:

DSH 版本 状态 说明
0.2.0-rc.2 已实测 官方桌面版当前捆绑的构建,本次发布适配并验证的目标。两处核心变更都在它上面修掉并复验:conversation.chat.turnTail 由 chain 变 list(否则被中断轮次的回退按钮会静默消失)、会话格式 v4 拒收 source.kind: 'plugin'(否则回退之后该会话每一轮都失败)
0.1.5-rc.2 已实测 上一代适配并逐项验证的构建:回退、截断、文件恢复、欢迎页、隐藏、图片回填都在它上面端到端跑通。0.4.0 对它仍是实测过的那一套行为——本次两处修复都保留了对旧拼写的识别与回落(chain 座位、{kind:'plugin'} 标记),所以同一份产物继续服务这一代
0.1.1-rc.2 按设计支持,未实测 插件为这一代契约保留了特性探测回退分支:已退役的 conversationEvents 服务、快照上的 session.chat、旧拼写的表层 start/end、addImages/pruneImages。本机没有 0.1.1 的构建,这条路径没有在真实运行 0.1.1 的机器上跑过——它是设计上的回退,不是实测结论
0.1.1-rc.1、0.1.2-alpha.2–alpha.5、0.1.2-rc.1、0.1.3-alpha.2、0.1.5-alpha.1/alpha.2/rc.1/rc.3、0.1.6-alpha.1/alpha.2、0.1.7-alpha.1/alpha.2/rc.1 未验证 没有在这些构建上跑过,包括同属 0.1.5 线、晚于 0.1.5-rc.2 发布的 0.1.5-rc.3。某个构建若改了契约,插件不会静默失败:它会在控制台点名报错(见下),隐藏逻辑 fail-closed,最坏只退化成「不隐藏」这一外观影响。要在这些版本上试,请挑一个可以丢弃的会话
0.0.1-rc.1/rc.2/rc.5、0.1.0-rc.2/rc.3/rc.6/rc.7/rc.8(低于 0.1.1) 不支持 低于 0.1.1 没有上述回退所覆盖的契约,且落在兼容区间(dsh.engines.dsh 与 peerDependencies 同为 >=0.1.5-rc.2 …)的下界之外
0.2.0-rc.1 及更早的 0.2.0 预发布,以及 0.2.0 之后尚未发布的构建 未验证 只实测过 0.2.0-rc.2 这一个构建。0.2.0 线仍在预发布期,契约可能再变;同样的自我保护仍然生效(控制台点名报错、隐藏 fail-closed,最坏只退化成「不隐藏」)。要在这些构建上试,请挑一个可以丢弃的会话

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-hawkeye-scan 下一个 Next dsh-plogin-plugin-recommender →