ruby1304/dsh-turn-fork

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

为DeepSeek Harness对话提供原子级消息编辑、重试、重新生成及版本树导航功能——这是dsh-message-edit的重启安全继任者

Project Overview项目介绍

ruby1304/dsh-turn-fork is a native plugin built exclusively for DeepSeek Harness. It adds turn-atomic message editing, retry, regenerate, and version-tree navigation features to DSH conversations, fixing a critical durability bug found in the older community plugin dsh-message-edit that breaks session logs after a DSH restart. To install the plugin, you just run the command dsh plugin add dsh-turn-fork in your terminal, then restart your DSH client to activate it. After installation, the plugin automatically adds a Turn Fork tab between Trajectory and Prompt Studio, plus shortcut buttons in the session header and on each assistant message.

This plugin is designed for DSH users who need to revise historical user messages and re-run conversation flows from any point in an existing chat history. When you edit an older message, you can choose between two downstream policies: truncate all subsequent turns, or preserve and replay every turn after the edited one. Before you confirm a preserve operation, the plugin shows you a clear count of how many turns will be replayed, so you can avoid unexpected token costs from re-running unnecessary steps. You can view the full version tree of all your branches in the Turn Fork tab, navigate between branches, and stop any running agent branch directly from the UI.

dsh-turn-fork is released under the open-source MIT license, and it only uses official DSH interface slots to add its UI components, so no DOM injection or custom text guessing is required to integrate with the existing DSH UI. It also natively supports bilingual UI for both English and Chinese, matching DSH’s client locale setting automatically. Currently, the DSH platform does not expose an official session deletion API, so branch deletion and automatic garbage collection are not supported by this plugin yet. If you need to fully rewind workspace state when switching between branches, you should always pair this plugin with a dedicated checkpointing tool like dsh-checkpoint-rewind.

这是一个专为 DeepSeek Harness 开发的原生插件,核心功能是为 DSH 对话提供基于回合的原子编辑、重试、重新生成以及版本树导航能力。它解决了社区插件 dsh-message-edit 的持久性缺陷,保证分支对话日志在 DSH 进程重启后依然可读。用户可通过 dsh plugin add dsh-turn-fork 命令安装,安装后重启 DSH 即可启用,插件会自动注册“Turn Fork”标签页、会话头部操作按钮和每条助理消息的重试按钮。

插件面向需要在对话过程中修改历史消息、重新运行对话流程的 DSH 用户,支持从任意历史回合分叉生成新的对话分支。编辑用户消息后,可选择截断后续所有回合,或是保留并重放后续所有回合,操作前会提示保留模式下需要重放的回合数量,避免不必要的 token 消耗。用户可通过 Turn Fork 标签页查看完整的版本树,在不同分支之间快速导航,支持对运行中的分支执行停止操作。

本插件遵循 MIT 许可协议,使用官方 DSH 接口插槽实现所有功能,不会注入 DOM 或猜测文本位置,同时支持中英双语 UI,适配 DSH 的区域设置。当前受限于 DSH 平台接口,暂未提供分支会话删除和垃圾回收功能,用户如需回退工作区状态,建议搭配 dsh-checkpoint-rewind 等检查点插件使用。从旧插件迁移时,损坏的日志无法就地修复,需要提前导出旧对话记录。

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

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

READMEREADME

dsh-turn-fork

Turn-atomic message editing, retry, reroll, and version-tree navigation for DeepSeek Harness conversations.

简体中文

  • Edit any settled user message and re-run the conversation from that turn (truncate or preserve downstream turns).
  • Retry any historical turn; regenerate the latest reply.
  • Version tree Timeline with undo/redo navigation across branches.
  • Branch logs survive a dsh process restart — the P0 durability guarantee the community plugin dsh-message-edit fails (see below).
  • Official slots only: Timeline tab, session-header actions, and per-message assistant actions. No DOM injection, no text guessing.
  • Bilingual UI (zh / en) through the dsh-client-locale service.

Install

dsh plugin add dsh-turn-fork

Then restart dsh. The plugin registers a Turn Fork tab (between Trajectory and Prompt Studio), compact undo/redo/regenerate buttons in the session header, and retry/regenerate buttons on each finalized assistant message.

Why this plugin exists

dsh-message-edit (v0.2.3) has a P0 defect: its durable provenance event message-edit/version is written without the ignorable marker. The live write path accepts it, but after a dsh restart the persistence layer's cold-read vocabulary guard (assertEventsSupported) rejects the whole log with SessionFormatUnsupportedError — every branch session becomes unreadable. See tests/p0-persistence.test.mjs for a reproduction (live write OK → restart → cold read REJECTED) and this plugin's regression test (ignorable marker → restart → cold read PASSES), run against the real dsh-session + dsh-session-persistence-jsonl packages in a fresh child process.

dsh-turn-fork also fixes the design gaps the review found in the community plugin:

Gap This plugin
Custom events must be ignorable: true turn-fork/version is always ignorable; schema-versioned for future migration
HTTP route without trust fence (CSRF / DNS rebinding, quota burning) Origin/Host loopback fence + content-type check + 64 KiB body cap
Message targeting by DOM text guessing Official slots only (conversation.view, conversation.session.header.actions, conversation.chat.assistant-actions)
reasoningEffort / config lost on fork provider/model/maxTokens derive from the last request/header; reasoningEffort and adapterDefaults ride the inherited header inside the seed
Steering messages dropped on replay Every user input of a turn is preserved and replayed in order
Assistant edits forge source: {kind:'model'} and drop tool calls Not supported (honest limitation, see below)
Undo navigation leaves branches running silently Running branches are reported; each has an explicit Stop control
preserve replays N turns with no confirmation Cost hint and explicit cascade choice before saving
No tests, no i18n node:test suite + P0 regression + dsh-testkit lifecycle gate; zh/en dictionaries

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

← 上一个 Prev query-balance 下一个 Next dsh-composer-layout →