mayf3/dsh-session-doctor
会话医生:诊断、解卡、读取 DeepSeek Harness 会话
Project Overview项目介绍
This is a purpose-built plugin created exclusively for DeepSeek Harness (DSH), designed to diagnose and unblock stuck DSH agent sessions. It ships with five distinct tools that let users list all active sessions, read full conversation history from any session, check session health, unblock stuck running agents, and send messages to other sessions. It can be installed in three ways: running a one-line terminal command, installing directly from this GitHub repository, or asking any existing DSH agent to run the install command for you. After installation, it automatically mounts and makes all five tools available to every existing DSH session.
When using the plugin, the typical workflow starts when a user notices one of their DSH agent sessions is stuck and not processing new incoming messages. First, they run the list sessions tool to get the ID and current status of the stuck session, then confirm it is stuck by checking its status with the built-in diagnostic tool. Once confirmed, they run the unblock tool, which cancels the stuck running task while preserving all queued messages in the agent’s inbox. After the agent returns to idle status, it automatically processes the queued messages, and users can read the session history to check progress or send new instructions if needed.
The plugin is released under the permissive MIT open source license, so it is free to use, modify, and distribute for any personal or commercial purpose. It has three documented limitations: the unblock tool only works on live running agents, since offline agents do not have active stuck tasks to cancel. When sending a message to an offline session, the plugin will start the session with the default DSH model, and does not carry over any manually selected model from the previous session. It also does not support cross-process or cross-machine session management.
这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,主要功能是诊断、恢复卡死的 DSH 代理会话,同时提供列出所有会话、读取指定会话对话记录、向其他会话发送指令的能力。插件可以通过一行 dsh 命令安装,也可以从 GitHub 拉取安装,甚至可以直接让当前 DSH 会话帮你执行安装命令,安装完成后自动挂载生效,所有现有会话都能直接使用插件提供的五个工具。
典型工作流是用户发现某个会话卡住后,先调用工具列出所有会话确认状态,再诊断目标会话确认卡死,之后调用解卡功能中止卡住的任务,保留排队消息让代理回到 idle 状态自动处理后续任务,还可以读取该会话的历史对话查看进展,必要时发送新指令指挥会话继续。这个插件面向所有日常使用 DSH 多会话工作流的用户,能快速解决会话卡死导致的消息积压问题。
本插件采用 MIT 许可开源,免费供个人和商业使用。当前有三个明确的使用限制:解卡功能仅作用于在线 running 状态的代理,离线会话不存在卡住的活动,因此无需解卡;离线发送消息会用默认模型启动目标会话,不继承上次手动切换的模型选择;不支持跨进程或跨机器的会话通信。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-session-doctor(mayf3/dsh-session-doctor)
仓库:https://github.com/mayf3/dsh-session-doctor
本站详情页:https://www.yhbd.top/plugins/mayf3-dsh-session-doctor/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-08-14 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 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 --profile web add github:mayf3/dsh-session-doctor
把 mayf3/dsh-session-doctor 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-session-doctor · 会话医生
English | 中文
诊断、解卡、读取 DeepSeek Harness 会话的插件。给每个会话装上五个工具,让你能查看、诊断、恢复、指挥其他 Agent 会话。
这是什么
在 DeepSeek Harness 里,一个进程会同时挂着多个 Agent 会话。一个会话可能卡死——比如 cordis_inspect_query 之类的 Client 平台查询永远等不到页面响应,agent 停在 running 状态,后续消息全部积压在 inbox 不被处理。本插件提供:
- 列出所有会话:标题、id、在线状态、agent 运行状态(
running/idle)、排队消息数、工作目录; - 读取任意会话的对话记录:用户与助手消息按时间顺序返回,附带标题与 live 状态;
- 诊断会话是否卡死:查看 agent 是否在线、
running/idle、inbox 排队数、最后事件; - 解卡卡死的会话:对
running的 agent 发送取消信号(keepInbox: true),中止卡住的活动但保留 inbox 排队消息,agent 回到 idle 后自动处理排队消息; - 向其他会话发送消息:目标在线直接投递;仅持久化时自动恢复后投递。
典型场景:发现另一个会话卡住不动 → 诊断确认 → 解卡恢复 → 查看它后续的进展 → 必要时发消息指挥它继续。
功能
| 能力 | 说明 |
|---|---|
list_sessions |
列出所有会话:id、标题、工作目录、持久化状态、agent 运行状态、排队消息数 |
read_session |
读取指定会话的对话记录(用户/助手文本消息),按序返回,支持 limit |
session_status |
诊断目标会话:是否在线、running/idle、inbox 排队数、最后事件 |
session_recover |
解卡:对卡死的 running agent 发取消信号(keepInbox: true),中止卡住的活动、保留排队消息 |
send_session_message |
向目标会话发消息:在线直接投递;仅持久化自动恢复后投递 |
安装
方式一:一行命令
dsh plugin --profile web add dsh-session-doctor
方式二:从 GitHub 安装
dsh plugin --profile web add github:mayf3/dsh-session-doctor
方式三:直接发给你的 Agent
打开任意一个 DSH 会话,把下面这句话发给它:
帮我安装会话医生插件,执行:
dsh plugin --profile web add dsh-session-doctor
装完自动挂载,所有会话立即获得上述五个工具。
使用
- 对会话 A 说「列出所有会话」——它调
list_sessions,你可以看到每个会话的标题和运行状态; - 怀疑某个会话卡住 → 说「检查会话
<id>的状态」——它调session_status,返回status: running且长时间无进展即确认卡死; - 说「解卡会话
<id>」——它调session_recover,卡住的活动被中止,排队消息在 agent 回到 idle 后继续处理; - 说「看看会话
<id>最近在做什么」——它调read_session,返回该会话的对话记录; - 说「给会话
<id>发消息:……」——它调send_session_message,对方在线立即送达、离线自动恢复后投递。
原理
- 诊断:
sessionQuery.listSessions()列出完整逻辑语料,ctx.agents.get(id)读取 live agent 的status与inbox排队数,sessionQuery.listEvents(id)取最后事件作为进展证据; - 解卡:live agent 若
status === 'running',调用agent.cancel({ kind: 'user' }, { keepInbox: true })—— 中止当前卡住的活动,但保留 inbox 排队消息;agent 收敛到 idle 后,排队消息会被自动处理; - 读取:
sessionQuery.readSession(id)重放完整会话日志,提取user/message与assistant/message的文本块; - 发送:在线 →
agents.get(id)后followup();离线 →agentLoop.resume()恢复会话再投递。
与 dsh-agent-message 的关系
dsh-agent-message 专注跨会话消息收发(五种投递模式、回执、会话导航);本插件专注会话健康(诊断、解卡、读取记录),并提供一个简单的消息投递入口。两者可以共存:消息收发用 agent-message,卡住了解卡用 session-doctor。
目录结构
dsh-session-doctor/
├── lib/
│ └── index.js # host 半区:五个工具
├── cordis.patch.yml # 自注册补丁(dsh.bundle.patch 指向它)
├── package.json # DSH 插件清单(dsh.bundle / dshx.contributes)
├── README.md # 中文文档
└── README.en.md # English documentation
限制
session_recover只作用于 live agent(running状态);离线会话不存在卡住的活动,无需解卡。send_session_message的离线恢复以默认模型启动目标会话(不继承它上次手动切换的模型选择)。- 跨进程/跨机器通信不在本插件范围内。
liangmianya/dsh-synapse
alaliqing/claude-paper
acryldev/acryl
omdsh-dev/dsh-annotation
Anionex/dsh-turn-rewind
Tyan66666/billion-context-dsh
qkycir-123/dsh-run2skill