前言¶
DeepSeek Harness 的扩展方式强调「一切皆插件」。插件可以互相组合,也会把稳定性风险分散到加载器、依赖、运行时、安装脚本、重复安装和补丁一致性上。dsh-plugin-clinic 补上的是这一层只读健康检查:它检查 Harness home 下已安装的 profile 插件集合,不写入外部状态,也不执行修复,然后以模型工具、Web 仪表板和 JSON 报告输出结果。
这是什么¶
dsh-plugin-clinic 是 ayahunter 维护的 DeepSeek Harness 插件,许可证为 MIT。它面向已安装插件集的健康检查,提供 plugin_health 模型工具、Settings → Plugins 中的 Clinic / 体检 tab,以及给 CI 和脚本使用的 JSON 报告。
核心功能¶
下面介绍它已提供的能力:
- 模型工具
plugin_health:在会话中诊断当前环境,并可把检查结果转为具体修复建议。 - Web dashboard:在
Settings → Plugins中提供 Clinic / 体检 tab,按 profile 展示插件健康概览。 - JSON reports:提供稳定
schemaVersion: 1契约,用于 CI 和脚本。 - 8 项只读检查:
load-health、bundle-manifest、peer-deps、runtime-compat、install-scripts、duplicate、patch-health、provenance。 - One row install:单个 npm bundle patch 同时挂载 Host engine 和 browser dashboard。
安装与启用¶
先确认 Node 版本。package.json 中 engines.node 为:
^22.19.0 || >=24.0.0
安装命令:
dsh plugin --profile web add dsh-plugin-clinic
安装后重启对应 profile。Settings → Plugins 中会出现 Clinic / 体检 tab,会话中会出现 plugin_health 工具。
升级命令:
dsh plugin --profile web update dsh-plugin-clinic
升级不会自动应用,升级后需要重启 profile。如果从源码安装,prepare script 会构建 sources,pnpm 会要求允许一次 build。
配置¶
README 示例中的 cordis.patch.yml 配置项如下:
- id: clinic
name: 'dsh-plugin-clinic'
config:
profiles: []
enableTool: true
enableWebRoute: true
webRoutePrefix: '/clinic'
includeHomePatches: true
这些配置项包括 profiles、enableTool、enableWebRoute、webRoutePrefix、includeHomePatches。其中 profiles 用于限定要诊断的 profile 目录名,空值表示全部;enableTool 对应 plugin_health 工具;enableWebRoute 对应 webServer 存在时注册 /clinic HTTP 路由;webRoutePrefix 示例为 /clinic。
典型用法¶
1、在任意已安装该插件的 profile 会话中发送:
体检一下我的插件
2、直接调用工具时传 details: true,获取逐条 finding 证据:
{ "details": true }
3、在 Web GUI 中打开:
Settings → Plugins → 体检
查看每个 profile 的健康概览。
4、通过 HTTP endpoints 获取报告:
GET /clinic/health
GET /clinic/health/summary
GET /clinic/health 返回完整 ClinicReport;GET /clinic/health/summary 返回 dashboard 摘要投影。
边界与注意事项¶
- 只读诊断:v1 只做诊断,不做修复;repair 是 agent/user action。
- 离线检查:v1 完全离线,无 npm online checks;deprecated 标志和 update availability 属于 v2。
- 当前 profile:当前 profile 不可检测;v1 默认诊断所有 profile。
--profile从 argv 提取只是 best-effort UI highlighting,不是 authoritative。 - Browser-first dashboard:Clinic tab 已对照 official Web GUI 验证;Electron desktop shells 尚未验证。
- Loader-only plugins:没有
package.json的 loader-only plugins 不适用peer-deps、runtime-compat、install-scripts等检查;只适用load-health和provenance。 - 无 source-level security scan:该能力属于
dsh-plugin-doctor,optional integration deferred to v2。 - 报告是 point-in-time snapshot:无 cache、history 或 subscription。
- HTTP routes 要求 loopback
Hostheader,用于 DNS-rebinding defense,但不是 authentication。
适用场景¶
适合在以下场景使用:
- 在 agent 会话中快速检查当前 profile 的插件加载、依赖和补丁状态。
- 在 Web GUI 中查看多个 profile 的插件健康概览。
- 将 JSON 报告接入脚本或 CI 流程。
使用注意:
- 插件以当前 dsh 进程权限运行。安装前应检查源码、许可证和依赖;许可证为 MIT。
- 它不替代源码级安全扫描,也不执行修复。
- 如果你只需要离线、只读的第一层诊断,它可以作为插件集健康检查入口。
链接¶
- GitHub:https://github.com/ayahunter/dsh-plugin-clinic
- 目录页:已核实资料未给出具体 URL;可在 DSH 插件目录中检索
dsh-plugin-clinic。