LingLambda/dsh-undo
DeepSeek Harness(dsh)上下文撤销/重做插件:将模型上下文回滚到上一步完成的状态,并再次恢复。
Project Overview项目介绍
This is a native DSH plugin built exclusively for DeepSeek Harness, adding durable multi-level undo/redo capabilities to DSH interactive sessions. It rewinds model context by full user turns and restores any workspace files that were changed by tools during the target turn. All commands are handled fully locally on the host machine and are never sent to the remote large language model. It supports three core commands: /undo for the latest user turn, /undo <user-seq> to rewind from a specific turn, and /redo to restore the most recent undone change. To install from the npm registry, run dsh plugin --profile demo add dsh-undo in your terminal.
Before and after every top-level tool execution, the plugin automatically records the current workspace tree in an isolated hidden Git directory under ~/.dsh/dsh-undo/snapshots/. It never creates new commits, switches branches, or modifies your working repository’s existing Git index. It tracks both tracked and untracked files under 2 MiB, leaving ignored and larger files completely untouched. It only restores files that were touched by tools in the selected user turns, and retains all metadata so undo/redo state survives a host restart. If there is no Git workspace detected for the current session, context undo/redo still works, but file restoration will be marked as unavailable.
This plugin is currently a preview release that depends on unreleased DeepSeek Harness features, including support for durable surface/rewind and surface/restore session events, and the conversation.chat.user-actions WebUI slot. If you install it on an older, publicly released DSH version, running /undo will show a message prompting you to upgrade DSH to a compatible version. There are several known limits: file restoration is limited to the detected Git workspace root, and external effects like network requests, database writes, and remote API calls cannot be undone. The project is released under the open source MIT license, and can be installed from GitHub or local development builds as well.
这是专为DeepSeek Harness开发的原生插件,为DSH会话提供持久化的多级撤销/重做功能。它可以按用户回合回滚模型上下文,并恢复该回合中工具修改过的工作区文件。所有命令都在本地处理,永远不会发送给大语言模型。它支持/undo、/undo <用户序号>和/redo三种命令,满足不同的回滚操作需求。
插件会在每次顶级工具执行前后记录工作区树状结构,快照存储在~/.dsh/dsh-undo/snapshots/下的独立隐藏Git目录中,不会修改仓库本身的Git索引。重启主机后,会话重放可以重建相同的可见界面和重做栈,文件恢复元数据可以在重启后保留。WebUI会在用户消息气泡添加撤销按钮,点击即可触发对应序号的撤销操作。
当前插件依赖尚未发布的DSH功能,包括支持持久化surface/rewind和surface/restore会话事件,以及conversation.chat.user-actions WebUI插槽。安装到现有版本DSH会提示升级,不兼容旧版。文件恢复仅限Git工作区根目录内,外部效应如网络请求、API调用等无法撤销,采用MIT许可证开源。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-undo(LingLambda/dsh-undo)
仓库:https://github.com/LingLambda/dsh-undo
本站详情页:https://www.yhbd.top/plugins/linglambda-dsh-undo/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 4 · 最近提交 2026-08-15 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
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 demo add dsh-undo
把 LingLambda/dsh-undo 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-undo
English | 中文
[!WARNING] Forward-looking preview: this release is not usable with any currently published DeepSeek Harness version. It depends on unreleased Harness support for durable
surface/rewind/surface/restoreevents and theconversation.chat.user-actionsWebUI slot. Installing it today will make/undofail closed with an upgrade message. Publish this package only to preview and coordinate the future integration; do not present it as production-ready until the matching Harness release exists. look for https://github.com/deepseek-ai/deepseek-harness/discussions/467/
Durable, multi-level undo/redo for DeepSeek Harness (dsh). It rewinds model context by real user turn and restores workspace files changed by tools in that turn.
The commands are handled locally and are never sent to the model:
/undorewinds the latest visible real user message and every surface message after it./undo <user-seq>rewinds from a specific visible user message, including all later turns./redorestores the latest active rewind. Repeated undo and redo operations use LIFO order.
The WebUI client contributes an undo action to finalized real-user message bubbles. The action invokes /undo <user-seq>; the Host validates that the addressed message is still a legal rewind target.
How It Works
Harness sessions remain append-only. Undo appends a dedicated surface/rewind control event for the exact current surface suffix; redo appends surface/restore for the newest active rewind. The original message nodes, message IDs, tool-call correlations, and log events are retained. Session replay reconstructs the same visible surface and redo stack after restart.
Before and after each top-level tool execution, the plugin records a workspace tree using an isolated hidden Git directory under ~/.dsh/dsh-undo/snapshots/. It does not create commits, switch branches, or modify the repository's own Git index. Undo restores only files touched by tools in the selected user turns; redo restores the pre-undo tree. Patch and redo metadata are stored per session so file redo can survive a Host restart.
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
wenbin-wb/dsh-bridge
PerryLink/dsh-permission-rules
MichengAI/dsh-archive-manager
eri64/dsh-claude-ux
lsz-asd/dsh-plugin-session-delete
10086ggqq/dsh_theme_terraria
king-bcolor/dsh-multi-tenant-projects