前言¶
DeepSeek Harness(DSH)裏 Agent 常用標準模式、PTC 模式、極簡模式等原生預設,這些預設會掛載一批內置插件。若只想關掉其中幾個,常見做法是複製一份預設再改插件列表;預設一多,維護和升級成本都會上去,也容易和依賴原生模式 ID 的業務插件打架。
下面介紹社區插件 @pandayuuha/dsh-disable-preset-plugins(維護者 PandaYuuHa,分類:工作流)。它通過 Profile 裏的 cordis.patch.yml 把指定內置插件標記爲 disabled: true,在不動預設模式 ID、不拆預設結構的前提下完成禁用。
這是什麼¶
@pandayuuha/dsh-disable-preset-plugins 是面向 DSH Agent 預設的通用禁用器:保留原生預設(如 standard、ptc、minimal)完整不變,由 Cordis Loader 跳過已標記禁用的條目,而不是從預設裏硬刪插件定義。
插件包當前版本爲 0.1.0(MIT 許可),依賴 Node.js >= 20,peer 依賴 @deepseek-ai/cordis 與 @deepseek-ai/dsh-agent-preset。
核心功能¶
README 中歸納的能力如下,均可通過配置復現:
- 純粹原生:保留原插件條目,僅將屬性置爲
disabled: true,由加載器跳過掛載。 - 零侵入:不改變預設的模式 ID,不影響其他針對原生模式編寫的業務插件。
- 規範生命週期:支持
dispose,卸載或重載時不留狀態殘留。 - 定向控制:支持全局列表禁用,也支持按
standard、ptc、minimal分別指定。
支持的原生模式標識(Preset ID):
| 模式中文名 | Preset ID |
|---|---|
| 標準模式 | standard |
| PTC 模式 | ptc |
| 極簡模式 | minimal |
安裝與啓用¶
插件本身不帶寫死的業務配置;安裝後只需在對應 Profile 的 cordis.patch.yml 裏追加 disable-preset-plugins 的配置塊(路徑示例:~/.dsh/profiles/<profile-name>/cordis.patch.yml)。
網頁版或桌面版嚮導¶
在 添加插件 嚮導的搜索框中填寫 @pandayuuha/dsh-disable-preset-plugins,然後點擊 安裝。
dsh CLI¶
桌面版 Profile:
dsh plugin --profile desktop add @pandayuuha/dsh-disable-preset-plugins
網頁版 Profile:
dsh plugin --profile web add @pandayuuha/dsh-disable-preset-plugins
更新到最新版:
# 桌面版
dsh plugin --profile desktop update @pandayuuha/dsh-disable-preset-plugins@latest
# 網頁版
dsh plugin --profile web update @pandayuuha/dsh-disable-preset-plugins@latest
典型用法¶
在當前 Profile 的 cordis.patch.yml 中增加如下結構(插件條目 id 爲 disable-preset-plugins)。下面示例中的包名、插件 ID 均爲 README 樣例,實際使用時請換成你要禁用的真實標識。
全局禁用會在所有 Agent 預設中標記所列插件;presets 下可按模式單獨指定:
- id: disable-preset-plugins
config:
# 1. 全局禁用:在此列出的插件將在所有 Agent 預設中被標記爲 disabled
disabled:
- "example-plugin-package" # 插件包名樣例,例如 "@deepseek-ai/dsh-time-context"
- "example-plugin-id" # 插件條目 ID 樣例,例如 "time-context"
# 2. 按模式精確禁用:針對標準模式(standard)、PTC模式(ptc)、極簡模式(minimal)單獨指定禁用項
presets:
standard:
- "plugin-only-disabled-in-standard"
ptc:
- "plugin-only-disabled-in-ptc"
minimal:
- "plugin-only-disabled-in-minimal"
配置生效後,無需新建預設即可在對應模式下關閉指定內置插件。
適用場景與注意¶
適合誰:需要在 DSH 裏繼續使用原生 standard / ptc / minimal 預設,但希望關掉個別內置插件(例如減少工具暴露、對齊團隊規範)的開發者。
使用前請知悉:
- DSH 生態強調「一切皆插件」;社區目錄(如 SkillHub)是獨立站點,與 DeepSeek / 幻方無官方從屬關係,安裝來源請以目錄頁與 GitHub 倉庫爲準。
- 插件在 當前 dsh 進程權限 下運行,安裝前建議閱讀 GitHub 源碼 與 MIT 許可證,確認禁用列表不會誤傷仍依賴該插件的其他流程。
- 禁用項應填寫正確的插件包名或 Cordis 插件條目 ID;README 樣例中的
example-*字符串僅作字段說明,不能直接當作有效配置。
結尾¶
經過上面的步驟,你可以在不動原生 Agent 預設骨架的前提下,用 Profile 配置精確關閉內置插件,避免爲「減插件」而複製整份預設。更多說明見社區目錄與倉庫:
- 目錄頁:https://www.skillhub.cn/plugins/PandaYuuHa/dsh-disable-preset-plugins
- GitHub:https://github.com/PandaYuuHa/dsh-disable-preset-plugins