DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Message Edit — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

@yunyv/dsh-message-edit

Message Edit

为 DeepSeek Harness 对话提供基于分支的编辑、重新生成、重试和版本导航功能(兼容 DSH 0.1.0-rc.6 / rc.7+)

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add @yunyv/dsh-message-edit@0.2.8
README兼容性版本

兼容性与来源证明

Message Edit 以 @yunyv/dsh-message-edit 发布,当前版本为 0.2.8。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/20

版本

0.2.8stable
2026/8/18
0.2.7stable
2026/8/18
0.2.6stable
2026/8/18
查看其余 2 个版本收起版本
0.2.5stable
2026/8/18
0.2.4stable
2026/8/18

相关插件

正在加载相关插件…

最新版
0.2.8
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
307.1 kB
文件数
23
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
32
最近提交
2026/8/18
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 memory-context 分类下经过校验的插件。

Contextdsh-context用于上下文洞察和管理的 DeepSeek Harness 插件,提供上下文仪表板和上下文命令,帮助了解上下文的构成及其演变过程。Mnemondsh-mnemon面向 DeepSeek Harness 的可组合三层记忆控制平面:持久化运行时上下文、可搜索的项目文档、可插拔的长期记忆、受保护的策略、WebUI 和无头工具。Memsearch Dsh@zilliz/memsearch-dsh适用于 DeepSeek Harness 的 MemSearch 插件:在多个代理之间共享 Markdown 记忆,支持捕获、步骤前上下文注入、记忆召回技能和技能候选审核面板。Memory@furongjun1999/dsh-memory灵枢(Lingshu·líng shū)DeepSeek Harness 插件:完整大脑——长期记忆/知识飞轮/自我认知/递归反思接入 DSH,对话自动沉淀进 md_cg 认知图(md 文档)

README

DSH Message Edit

Event-sourced message editing, rerolling, retrying, and version navigation for DeepSeek Harness. The plugin never rewrites history events and never touches the DSH engine internals: every edit, reroll, or retry forks a new session version before the target turn, while the original session is always preserved and can be switched back to at any time.

Compatibility

  • Works with DSH 0.1.0-rc.6, 0.1.0-rc.7, and newer.
  • Version events (message-edit/version) carry ignorable: true on the event envelope: newer DSH builds skip unknown event types marked ignorable instead of refusing the entire log, so session history stays loadable across DSH upgrades.

Features

  • Edit messages: settled user text, assistant.reasoning thinking blocks, and assistant.response reply text are all editable.
  • Rerun: fork before the turn of the last settled assistant reply and regenerate from the original user input.
  • Retry any turn: pick any historical turn in the Timeline and re-execute it.
  • Cascade policies:
    • truncate (default): re-execute only the target input, dropping the old tail after that point.
    • preserve: keep the following user inputs and re-execute them in order on the new branch; assistant outputs and tool chains are fully regenerated.
  • Version switching: ← in the session title bar undoes the current atomic effect, → re-applies the latest direct child effect; the Timeline shows the full known branch tree, operation time, before/after content, and the current version.
  • Timeline tab: registered on conversation.view, order: 15, between Trajectory (10) and Prompt Studio (20).

Installation

# npm
dsh plugin --profile web add @yunyv/dsh-message-edit

# or GitHub
dsh plugin --profile web add github:yunyv/dsh-message-edit

# or local development (link mode)
dsh plugin --profile web add -w link:/path/to/dsh-message-edit

dsh plugin is a pnpm forwarder: after add, the dsh.bundle declaration is recognized and the plugin is adopted into the profile's dsh.profile.bundles; restart dsh for it to take effect.

Design

Temporal composition

The plugin treats a complete turn as the atomic effect. The target turn's turn/start, model request, tool calls, tool results, and turn/end are never partially copied and spliced; a new version forks from a closed boundary before that turn:

  1. User-message edit, Reroll, and Retry: roll back the whole target turn, then hand the target user input to the Agent as a new turn.
  2. Assistant-block edit: roll back the whole target turn and construct a new complete closed turn from the original user input plus the edited assistant content; the original tool chain does not enter the new version. With preserve, the following user inputs are re-executed in order, producing a fresh tool chain.
  3. Each version appends an inseparable message-edit/version effect pair: effect records the forward effect, inverse records the restore target. The parent chain derives composite inverses automatically; restoring is not event deletion but switching along the inverse chain to a version that still exists.
  4. Message-history transforms do not commute, so undo follows LIFO: only the current atomic effect is undone at a time, keeping earlier effects; every successor branch is retained and can be re-applied from the parent version.

Branching and Agent wiring

  1. Inside the source Agent's runMaintenance(), take an immutable seed from the closed boundary; before the first turn, use an empty seed.
  2. Append the version effect pair and an optional manual assistant turn with local pure event constructors, then call ctx.agents.create({ seed, meta }). The Session validates the whole seed once before Agent construction; any failure is structurally reverted by AgentFactory, so observers never see a half-built Session and the Agent's turn count initializes directly from the full history.
  3. Call ctx.sessions.flush() after publishing, establishing a durability barrier before the HTTP operation succeeds.
  4. Workspace attachment and child-Agent lifecycle each return an atomic inverse; on failure they are composed in reverse order. The child input is then queued via child.agent.followup().

This path never touches ReactLoopAgent, AgentLoop private methods, or apiproxy's narrowed fork RPC; branch seeds still pass through the same public Session event contract.

Spatial composition

  • Host depends only on the public sessions, agents, sessionPersistence, sessionQuery, workspaceRegistry, and webServer services.
  • Browser composes only slots, conversation, connection, and runtime sessions services.
  • The Timeline and title bar share a value-level Snapshot source keyed by sessionId; the controller reactively subscribes to the current Session's closed turns and the lineage values in the Session list, rebinding on Session identity replacement without caching stale Session objects.
  • Version navigation waits for the runtime Session list to publish the matching ID before ctx.sessions.open(); availability changes drive navigation directly.

Data model

Each plugin version contains one message-edit/version event in its own non-inherited suffix:

interface MessageEditVersionEvent {
  schemaVersion: 2
  effect: {
    id: string
    operation: 'edit' | 'reroll' | 'retry'
    cascade: 'truncate' | 'preserve'
    targetTurn: number
    targetEventSeq: number
    targetBlockIndex?: number
    blockKind?: 'user' | 'assistant.reasoning' | 'assistant.response'
    before?: string
    after?: string
  }
  inverse: {
    kind: 'restore-version'
    sessionId: string
  }
}

The session header's parentSession builds the version tree and must match inverse.sessionId; seedLength separates the current version's own metadata from same-named events inherited from ancestors. The Timeline derives the full value-level projection via ctx.sessionQuery.traceSession() and readSession(), and exports undoStack and direct redoSessionIds from the atomic inverse chain. Legacy flat events remain readable and normalize to the same effect pair in the projection.

UI

  • conversation.view
    • id: message-edit-timeline
    • order: 15
    • label: Timeline
  • conversation.session.header.actions
    • id: message-edit-controls
    • undo the direct parent effect, re-apply the latest direct child effect, effect-chain count, rerun the last reply
  • conversation.chat.assistant-actions
    • id: message-edit-assistant-actions
    • per-message edit / retry buttons riding the official per-message action slot (messageId dispatch); user messages have no such slot and are covered by DOM injection

Components use CSS Modules and --dsw-* semantic tokens with no UI library. Product copy is Chinese; code comments are English.

HTTP API

  • GET /message-edit?sessionId=<id>: readable messages, retryable turns, and the full version tree.
  • POST /message-edit: run edit, reroll, or retry; returns the newly published Session ID.

Build

npm install
npm run build

Source lives in src/ (host at src/index.ts, browser at src/client/); the build script is scripts/build.mjs on top of esbuild + lightningcss:

  • Host: src/index.ts → index.mjs (ESM, @deepseek-ai/* external)
  • Browser: src/client/index.ts → client.js + client.js.map (window.__ModuleLoader__.load closure factory; CSS Modules are compiled by lightningcss into a hashed class map plus idempotent <style data-plugin> injection)

npm run typecheck (tsc --noEmit) validates types; npm run build emits both halves.

Scope

  • Never rewrites Session events; history is append-only and deep-frozen.
  • Does not restore or modify workspace files, external command effects, or existing artifacts.
  • Does not modify the DSH engine, apiproxy, or official UI packages.

License

MIT — see LICENSE.