Moeblack/dsh-message-edit 预览 preview

Moeblack/dsh-message-edit

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

DSH插件:基于分支的消息编辑、重掷、重试与版本时间线

Project Overview项目介绍

dsh-message-edit is a native plugin built exclusively for DeepSeek Harness, adding event-sourced message editing, regeneration, and retry capabilities to the DSH platform. It does not alter existing historical conversation events; instead, every edit, regeneration or retry creates a new version of the conversation starting from before the target turn. The original conversation is always retained, and users can switch back to any previous version at any time. To install the plugin, users just need to run a single command via the official DSH CLI, which automatically adds it to the active profile.

After installation, the plugin adds a new Timeline tab to DSH's conversation view, placed between the existing Trajectory and Prompt Studio tabs. Users can edit settled user messages, assistant reasoning blocks, and assistant response text directly from the UI, or trigger a regeneration from the last assistant turn. Users can also select any historical turn from the Timeline to retry execution, and choose between two cascade strategies: truncate all content after the target turn, or preserve subsequent user inputs and re-execute them one by one.

The plugin only depends on public core services provided by DSH, and does not modify internal DSH engine code or official UI components. It follows an append-only pattern for conversation history, so all original historical data remains immutable, and it does not alter or restore workspace files or external command outputs. To install the plugin for local development, you can clone the repository, build it with npm, then add it via a symbolic link to your DSH profile, and restart DSH to activate the changes.

dsh-message-edit 是专为 DeepSeek Harness 开发的原生插件,为 DSH 补充基于事件溯源的消息编辑、重生成和任意回合重试能力。它不修改原有历史事件,每次编辑、重生成或重试操作都会在目标回合之前生成一个新会话版本,原有会话始终完整保留,用户可以随时切换回任意历史版本,支持通过 DSH 官方 CLI 命令一键完成安装。

用户可以在 DSH 的会话界面编辑已发送的用户文本、助手思考块和助手回复文本,也可以从最后一条助手回复重新生成,或在 Timeline 时间线中选择任意历史回合重新执行。它提供两种级联策略,默认截断后续旧内容,也可以保留后续用户输入依次重新执行,适合需要调整对话过程、优化输出结果的 DSH 用户。

该插件仅依赖 DSH 公开的核心服务,不修改 DSH 引擎内部代码和原有官方 UI,不会原地改写会话事件,历史数据为追加只读模式。它也不会联动修改工作区文件、外部命令执行结果和已有产物,可通过 npm 下载安装,本地开发可使用符号链接接入 DSH 配置,重启后即可生效。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • 49 stars - an early-stage project星标 49,属于早期项目
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 dsh-message-edit

把 Moeblack/dsh-message-edit 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DSH Message Edit

npm version npm downloads license

dsh-message-edit(npm · GitHub)为 DeepSeek Harness 补充基于事件溯源的「消息编辑与重生成」能力。插件不改写历史事件,也不修改 DSH 引擎内部;每次编辑、重生成或重试都会从目标回合之前创建一个新会话版本,原会话始终保留并可随时切回。

dsh plugin --profile web add dsh-message-edit

功能

  • 编辑消息:可编辑已落定的用户文本、assistant.reasoning 思考块与 assistant.response 回复文本。
  • 重生成:从最后一条已落定助手回复所属回合之前分支,使用原用户输入重新生成。
  • 重试任意回合:在 Timeline 中选择任意历史回合重新执行。
  • 级联策略:
    • truncate(默认):只重新执行目标输入,删除该点之后的旧后续。
    • preserve:保留后续用户输入,并在新分支中依次重新执行;助手输出与工具链全部重新生成。
  • 版本切换:会话标题栏的 ← 撤销当前原子效果,→ 重施加最新直接子效果;Timeline 展示完整已知分支树、操作时间、编辑前后内容与当前版本。
  • Timeline 标签页:注册到 conversation.view,order: 15,位于 Trajectory(10)与 Prompt Studio(20)之间。

设计

时间可组合性

插件把完整回合作为效果原子。目标回合的 turn/start、模型请求、工具调用、工具结果与 turn/end 不会被局部复制后拼接;新版本从该回合之前的闭合边界分支:

  1. 用户消息编辑、Reroll 与 Retry:回退整个目标回合,再把目标用户输入作为新回合交给 Agent。
  2. 助手块编辑:回退整个目标回合,以原用户输入和编辑后的助手内容构造一个新的完整闭合回合;原工具链不进入新版本。选择 preserve 时,后续用户输入再依次交给 Agent,产生新的完整工具链。
  3. 每个版本都追加一个不可拆分的 message-edit/version 效果对:effect 记录正向效果,inverse 记录恢复目标。父版本链自动导出组合逆;恢复不是删除事件,而是沿逆链切换到仍然存在的版本。
  4. 消息历史变换彼此不交换,因此撤销遵循 LIFO:一次只撤销当前原子效果并保留更早效果;各后继分支始终保留,可从父版本重新施加。

分支与 Agent 接线

旧实现先用短生命周期 Session 暂存分支、落盘、移除 live Session,再用 agents.resume() 重建 Agent。这个过程存在两个分离的生命周期边界:暂存日志已经持久化后,Agent 仍可能创建失败。现实现只使用 AgentRegistry.create() 已公开的 seed + meta 事务缝:

  1. 在来源 Agent 的 runMaintenance() 内,从已闭合边界取得不可变 seed;第一回合之前使用空 seed。
  2. 用本地等价的纯事件构造器把版本效果对与可选手工助手回合加入 seed,再调用 ctx.agents.create({ seed, meta })。Session 在 Agent 构造前一次性验证完整 seed;任何一步失败都会由 AgentFactory 的结构性逆撤销,外部观察者看不到半成品 Session,Agent 的回合计数也直接从完整历史初始化。
  3. 发布后调用 ctx.sessions.flush(),在 HTTP 操作成功前建立耐久性屏障。
  4. Workspace 挂接与 child Agent 生命周期分别返回原子逆;操作失败时按相反顺序组合恢复。随后通过 child.agent.followup() 排入需要重新执行的用户输入。

此路径不接触 ReactLoopAgent、AgentLoop 私有方法或 apiproxy 的收窄 fork RPC;分支 seed 仍由同一 Session 公共事件契约验证。

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

← 上一个 Prev ui-status-label 下一个 Next ax-feishu-bridge →