前言¶
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