dsh-message-edit: Branch-based Message Editing and Version Timeline for DeepSeek Harness
moeblack/dsh-message-edit
DSH plugin for branch-based message editing, reroll, retry, and version timeline with event-sourced history.
Provides event-sourcing-based message editing, reroll, retry, and version timeline for DeepSeek Harness, creating a new session version for each modification while the original session remains reversible.
dsh plugin --profile web add github:moeblack/dsh-message-edit- Category
- Sessions & Messages
- Platform
- DSH-Plugin
- Author
- moeblack
- Distribution
- Plugin
dsh-message-edit Key Features
dsh-message-edit Repository

dsh-message-edit Repo Summary
dsh-message-edit is a session editing plugin (DSH plugin) for DeepSeek Harness, maintained by Moeblack and written in TypeScript. It provides branch-based message editing, reroll, retry, and version timeline capabilities based on event sourcing. It solves the problem of breaking history or being unable to roll back when modifying or regenerating messages in an AI conversation: each edit or regeneration creates a new session version from before the target turn, while the original session is always preserved and can be switched back at any time. Core capabilities include editing user text, reasoning blocks, and assistant responses, branching retry from any historical turn, and controlling subsequent content via cascade strategies (truncate or preserve).
What core editing and regeneration operations does the dsh-message-edit DSH plugin support?
The plugin supports three core operations: editing settled user text, assistant.reasoning blocks, and assistant.response text; branching from before the turn of the last settled assistant reply to regenerate using the original user input; and re-executing any historical turn selected in the Timeline. For cascade strategies, truncate (default) only re-executes the target input and deletes subsequent old content, while preserve retains subsequent user inputs and re-executes them in the new branch, regenerating assistant outputs and tool chains entirely.
How does dsh-message-edit's version timeline and undo/redo mechanism work?
The plugin treats a complete turn as an atomic effect. Each operation appends an indivisible message-edit/version effect pair recording the forward effect and the restore target. The session title bar's ← undoes the current atomic effect, and → reapplies the latest direct child effect; the Timeline tab (registered to conversation.view, order: 15) shows the full known branch tree, operation timestamps, content before/after edits, and the current version. Undo follows LIFO, and all successor branches are preserved and can be reapplied from the parent version.
How does dsh-message-edit wire with DeepSeek Harness Agents and Sessions?
The plugin only uses the public seed + meta transaction seam of AgentRegistry.create(). Within the source Agent's runMaintenance(), it obtains an immutable seed from a closed boundary, adds version effect pairs using pure event constructors, and calls ctx.agents.create(). The Session validates the complete seed once before Agent construction; on failure, AgentFactory performs structural inverse undo, so external observers never see a half-finished Session. After publishing, it calls ctx.sessions.flush() to establish a durability barrier. Workspace attachment and child Agent lifecycle return atomic inverses, combined in reverse order on failure.
How to install dsh-message-edit?
Use the official plugin registration command:
dsh plugin --profile web add github:moeblack/dsh-message-edit
For local development, use -w link: to link the source directory. The build is based on @deepseek-ai/*@0.1.0-rc.6 types published on npm, producing index.mjs (Host plugin) and client.js (Browser plugin).
What are the UI and data model characteristics of dsh-message-edit?
UI components use CSS Modules and --dsw-* semantic tokens without any UI library, and product copy is in Chinese. The data model includes a message-edit/version event in each version's non-inherited suffix; the session header's parentSession forms a version tree, and the Timeline generates a complete value-level projection via ctx.sessionQuery.traceSession(). Legacy flat events remain readable and are normalized to the same effect pair. The plugin was last updated in 2026-08, is MIT-licensed, and currently has 24 stars and 3 forks.