前言¶
DeepSeek Harness(DSH)把 profile、bundle、patch 層和本地 link 依賴疊在一起運行。一旦啓動異常或 Discussion 裏難以描述現場,有用信息往往分散在用戶目錄:當前用的是哪個 profile、dsh.profile.bundles 是否還能解析、link: 是否仍指向有效路徑、cordis.patch.yml 能否解析、磁盤與憑證文件權限是否正常。手工逐項排查費時,且容易在貼日誌時泄露敏感內容。社區插件 dsh-doctor(維護者 Bliveren,分類 admin-security)提供一條命令式的只讀體檢,輸出可脫敏的 Markdown 報告,便於粘貼到討論區求助。
這是什麼¶
dsh-doctor 是針對 DeepSeek Harness 安裝環境的診斷插件:不讀寫憑證內容、不修改或刪除任何文件,只彙總 profile、bundle、patch、本地鏈接、磁盤與 .credentials.yaml 存在性與權限等事實,並生成適合公開的 redacted 報告。
- 倉庫:https://github.com/Bliveren/dsh-doctor
- 社區目錄頁:https://www.skillhub.cn/plugins/Bliveren/dsh-doctor
- 許可證:MIT(package.json 與 README 一致)
- 當前 package 版本:0.1.0;要求 Node.js
>=24.9,DSH>=0.2.0 <0.3.0
DSH 生態強調「一切皆插件」;SkillHub 等目錄爲社區站點,與 DeepSeek / 幻方無官方從屬關係。
核心功能:檢查項一覽¶
README 將檢查項整理爲下表(插件以當前 dsh 進程權限讀取路徑與進程信息,只報告不修復):
| Check | 說明 |
|---|---|
runtime/node |
運行中 Node.js 是否在支持範圍內 |
profile/exists |
啓動所用 profile 目錄是否存在 |
profile/manifest |
manifest 是否聲明可讀的 dsh.profile.bundles 列表 |
bundle/<name> |
每個 bundle:內置或已安裝、是否有 patch、engines.dsh 是否滿足 |
profile/patch |
cordis.patch.yml 能否解析、是否存在重複 row id |
profile/local-links |
link:、file: 依賴是否仍指向有效目標 |
profile/backups |
遺留 .bak-* 與廢棄的 <profile>.broken-* 副本 |
profile/lockfile |
profile 依賴是否被 lockfile 固定 |
home/exists、home/writable |
DSH home 是否存在、是否可寫 |
home/disk |
DSH home 所在卷剩餘空間 |
home/credentials |
.credentials.yaml 是否存在、權限是否足夠 restrictive |
內置 bundle(如 @deepseek-ai/dsh-base、@deepseek-ai/dsh-web-app)從 dsh 安裝解析而非 profile 的 node_modules;若 profile manifest 的 dependencies 未列出某 bundle,則視爲 in-box,profile 側缺少對應 node_modules 條目不算問題。
報告末尾有彙總行,例如 summary: 13 pass, 1 warn, 0 fail, 0 skip;單項爲 PASS / WARN / FAIL 等,並附簡要 Detail。
安裝與啓用¶
安裝命令須帶 profile 名稱,與 README 原文一致:
dsh plugin --profile <name> add github:Bliveren/dsh-doctor
包爲純 ESM、無構建步驟;若用 git 源安裝,無需 build-script allowlist。需要固定版本時,可 pin 到 commit:
dsh plugin --profile <name> add github:Bliveren/dsh-doctor#<sha>
安裝後重啓 DSH host,工具纔會進入 registry。
典型用法¶
參數¶
profile:要檢查的 profile 名。默認取 host 啓動時的 profile(由 launcher 的 profile 目錄參數或環境變量DSH_PROFILE推斷)。
讓智能體執行¶
重啓 host 後,在對話中指示 agent(README 示例):
Run dsh_doctor and show me the report.
報告爲 Markdown,含生成時間、平臺、Node 版本、dsh home、profile 名與檢查表;WARN 項可能列出備份文件名或 abandoned 的 desktop.broken-* 類目錄及最後修改時間,便於對照清理策略,但插件本身不會替你刪除。
適用場景與邊界¶
適合誰
- 本地或服務器上 DSH 行爲異常,需要快速確認「層疊配置 + 文件系統」是否自洽。
- 要在 GitHub Discussions 等場合描述環境,又需避免貼出憑證內容。
務必知曉
- 插件隨當前 dsh 進程權限運行;安裝前應自行審閱 倉庫源碼 與 MIT 許可證。
- 不讀
.credentials.yaml的內容,只報告存在性與 permission bits。 - 不寫、不修、不刪;修復建議以 hint 形式出現,不會自動執行。
- PASS 不等於安裝一定可用:不覆蓋 provider 可達性、sandbox、其它插件內部邏輯等運行時行爲。
開發側:檢查邏輯在 lib/checks.js,以路徑與進程事實的純函數實現,可用 pnpm install 與 pnpm test(node --test test/checks.test.mjs)在不啓動 DSH 的情況下測新檢查項;index.js 負責註冊到 tool registry。
結尾¶
dsh-doctor 把分散在 DSH home 與 profile 裏的安裝事實收成一份只讀、可公開粘貼的報告,適合 admin-security 場景下的自助排查與社區協作。需要安裝說明與完整檢查表時,以 GitHub README 爲準:https://github.com/Bliveren/dsh-doctor;目錄索引見 SkillHub 插件頁。