dsh-turn-delete:DeepSeek Harness 的会话轮次删除插件
hanshenmesen/dsh-turn-delete
DSH plugin 删除会话中完整的一轮对话,保留会话本身,支持确认与幂等操作。
在 DeepSeek Harness 中删除一个完整的已关闭轮次,而无需删除整个会话,保留其余对话历史。
dsh plugin --profile web add github:hanshenmesen/dsh-turn-delete- 分类
- 会话与消息
- 平台
- DSH-Plugin
- 作者
- hanshenmesen
- 分发方式
- 插件
dsh-turn-delete 核心特性
dsh-turn-delete 仓库信息

dsh-turn-delete 仓库简介
dsh-turn-delete 是 DeepSeek Harness(DSH)的会话管理插件(DSH plugin),用于在不删除整个会话的前提下,从会话中移除一个完整的已关闭轮次。它解决了需要清理或修正对话历史但保留会话其余部分的问题。该插件在每条已完成顶层轮次的最终助手回复旁提供一个删除操作,并支持确认机制,确保操作安全。由 hanshenmesen 维护,采用 MIT 协议,使用 TypeScript 编写,最近更新于 2026-08。
dsh-turn-delete 这个 DSH plugin 支持哪些核心特性?
该插件提供以下核心能力:
- 仅对已完成的普通会话轮次显示删除操作,子代理转录不暴露该操作。
- 删除前需确认,且会话运行中禁用。
- 删除所选轮次的提示、助手消息和工具记录,但保留会话 ID、标题、工作区关联、后续轮次及原始追加事件日志。
- 通过持久化的零内容替换事件记录删除,刷新或重启后仍保留。
- 操作幂等,重复请求不会产生额外影响。
dsh-turn-delete 怎么安装?
从 GitHub 安装:
dsh plugin --profile web add github:hanshenmesen/dsh-turn-delete
安装后需重启 dsh web。若需移除,执行:
dsh plugin --profile web remove dsh-turn-delete
dsh-turn-delete 兼容哪些 DeepSeek Harness 版本和平台?
该插件兼容 DeepSeek Harness 0.1.0-rc.6 和 0.1.0-rc.7,需要 Node.js 22.19 或更高版本,支持 Web profile 和基于 Web 的桌面 shell。由于 Harness 处于开发者预览阶段,升级后建议用包含三个短轮次的临时会话测试删除中间轮次。
dsh-turn-delete 的设计原理是什么?
Host 部分注册 POST /dsh-turn-delete,获取目标 Agent 的维护租约,验证完整关闭轮次的表面跨度,追加零内容替换事件,并等待 sessions.flush() 完成。浏览器部分贡献到 conversation.chat.assistant-actions 和 conversation.chat.turnTail 插槽,通过 Conversation 定义将持久化墓碑投影到目标 Turn,并应用窄的展示兼容层。模型上下文删除不依赖该兼容层。
dsh-turn-delete 的安全性如何?
与所有 DSH 插件一样,该包以 Harness 进程的权限运行,安装第三方插件前应审查源码。删除操作改变未来模型上下文,但有意保留原始追加事件以供审计和重放。