前言¶
DSH(DeepSeek Harness)是一个基于 cordis 微内核构建的本地智能体运行时。一个 profile 是 DSH 启动时使用的目录,其中包含 package.json 列出插件包,以及 cordis.patch.yml 对这些插件进行配置覆盖。插件包会同时通过 npm 仓库、本地 tarball 和 DSH 自带包三种渠道到达,但没有机制会在任一渠道偏离时发出警告,升级失败往往发生在 profile 已经处于半损坏状态之后。
dsh-plugin-doctor 是一个只读健康检查插件,用于在修改 profile 之前先了解当前状态。它不会安装、移除、启用或打补丁,报告中的 readOnly 始终为 true。
插件定位¶
- 名称:dsh-plugin-doctor
- 维护者:ginxiu0330-sketch
- 分类:admin-security
- 核心价值:在 profile 运行时读取其状态,回答四个实际会破坏工作环境的常见问题,而不改变任何内容。
核心功能¶
一次 plugin_doctor 调用即可回答以下四个问题:
- 哪些插件有新版本,其中哪些会破坏当前 DSH 版本?
- 已安装的包是否声明了当前 DSH 版本拒绝的依赖要求?
- 每个包补丁了哪些行,哪些行被多个包同时声明(即影响加载顺序的覆盖)?
- 哪些技能名称被更高优先级的来源同名副本所遮蔽(即“我的修改没生效”的常见原因)?
插件通过只读调用 ctx.pluginManager.listBundles()、ctx.pluginManager.listVersions(name)、ctx.skills.list() 获取信息,并使用 @deepseek-ai/dsh-tools 的 defineTool 定义工具的 schema、执行器和渲染器。
安装与启用¶
该插件是一个 bundle:包含一个 npm 包和 cordis.patch.yml。目前尚未发布到 npm,需要从 GitHub 仓库检出。
从 GitHub 克隆:
git clone https://github.com/ginxiu0330-sketch/dsh-plugin-doctor
在 profile 目录(默认为 %USERPROFILE%\.dsh\profiles\<name>)中编辑 package.json:
// package.json
{
"dependencies": {
"dsh-plugin-doctor": "file:C:/path/to/dsh-plugin-doctor"
}
}
编辑 cordis.patch.yml,追加一个数组条目:
# cordis.patch.yml — append one array entry
- insert:
- id: plugin-doctor
name: 'dsh-plugin-doctor'
使用 launcher 的包管理器安装依赖,然后重启 DSH。桌面主机不支持热加载新 bundle,首次加载必须重启。
典型用法¶
运行 plugin_doctor,不传参数时默认启用所有检查:
> run plugin_doctor
# DSH plugin doctor — 2026-11-18 03:22 UTC
runtime unknown · 3 packages · 1 upgradable · 1 incompatible · 0 broken
Read-only: nothing was installed, removed, enabled or patched.
## 1. Installed packages
| package | installed | latest | status | channel | note |
| --- | --- | --- | --- | --- | --- |
| dsh-broken | 0.1.0 | — | INCOMPATIBLE | unknown (disabled) | incompatible-version: engines.dsh wants >=0.3.0 |
| dsh-cost-meter | 1.9.65 | 1.10.0 | update | registry | |
| dsh-oil-ui | 0.3.1 | — | local | file | file spec |
## 2. DSH compatibility
| package | version | runtime | scope | requirements |
| --- | --- | --- | --- | --- |
| dsh-broken | 0.1.0 | 0.2.2-rc.2 | installed | engines.dsh: >=0.3.0 |
## 3. Patch health
| bundle | rows | overrides | state | problems |
| --- | --- | --- | --- | --- |
| dsh-oil-ui | 1 | 1 | enabled | |
1 row(s) override rows the bundle does not declare. Those are the rows most likely to
break silently when a bundle upgrades, because the override keeps pointing at an id the
new version may have renamed or dropped.
## 4. Skills
| skill | source | invocation | state | path |
| --- | --- | --- | --- | --- |
| oil-ui | project-dsh | model | active | /p/.dsh/skills/oil-ui |
| oil-ui | user-dsh | model | shadowed by project-dsh | /u/skills/oil-ui |
可选参数:
| 参数 | 类型 | 默认值 | 含义 |
|---|---|---|---|
checkUpdates |
boolean | true |
向注册表询问哪些包有新版本。每个注册表规范一次往返;关闭可快速获取离线报告。 |
checkSkills |
boolean | true |
包含技能目录并标记名称被遮蔽的情况。 |
timeoutMs |
integer | 20000 |
每个包的注册表检查时间预算。超时会变为 unknown,不会当作错误处理。 |
工具不会在缺少服务时抛出异常:没有插件管理器或技能目录的 profile 仍会生成报告,并将 pluginManagerError / skillsError 标记为相应错误。
状态值含义:
| status | 含义 |
|---|---|
update |
注册表依赖,注册表返回了新版本。 |
incompatible |
已安装的包或候选升级声明了当前 DSH 版本拒绝的要求。 |
error |
插件管理器无法读取或解析包(unexpected-package、not-bundle、缺少文件等)。 |
local |
无升级渠道:file: 规范、git pin 或 DSH 自带的 bundle。 |
ok |
注册表依赖已是最新版本,或为 DSH 自带 bundle。 |
unknown |
无法向注册表询问(离线、超时、未找到)。永不静默当作 ok。 |
适用场景与注意¶
适合在升级或修改 profile 之前进行一次健康检查,了解升级风险、兼容性冲突、补丁覆盖与技能遮蔽情况。插件以当前 DSH 进程权限运行,安装前应检查仓库源码与许可证。
价值总结¶
dsh-plugin-doctor 在不改变 profile 的前提下,给出插件升级状态、DSH 兼容性、补丁覆盖和技能遮蔽的完整视图,是维护 DSH profile 健康的前置检查工具。更多细节请参考:
- 目录页:https://www.skillhub.cn/plugins/ginxiu0330-sketch/dsh-plugin-doctor
- GitHub:https://github.com/ginxiu0330-sketch/dsh-plugin-doctor