dsh-plugin-clinic:給 DeepSeek Harness 插件集做只讀體檢

前言

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 Host header,用於 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。
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜