← 返回列表
D

dsh-plugin-toggle

v0.1.2 · 2 天前发布

第三方插件开关:在设置页启用/禁用第三方插件(改写各 profile 的 cordis.patch.yml,DSH 热重载立即生效)

dshdeepseek-harnessplugindeepseekdsh-plugin

README

dsh-plugin-toggle

第三方插件开关 —— 在 DSH Web 设置页里启用/禁用第三方插件。

A settings-page toggle for third-party plugins in DeepSeek Harness Web.

安装

bash
dsh plugin --profile web add dsh-plugin-toggle

或本地包:

bash
dsh plugin --profile web add ./dsh-plugin-toggle-0.1.0.tgz

安装后重启 dsh web。设置 → 插件 → 「第三方插件」页签即可使用。

功能

  • 插件开关:列出每个 profile 中非官方(第三方)插件行(bundle 栈里非 @deepseek-ai/* 的 bundle + 用户补丁插入的行),带版本/描述/状态,一键启用/禁用。

  • 热重载生效:开关直接改写 profile 的 cordis.patch.ymldisabled: true 标记),DSH 监视该文件并热重载,无需重启;状态持久,重启后保持。

  • 刷新页面:页签底部提供「刷新页面」按钮(纯客户端 location.reload()),修改插件/配置后刷新 Web 界面。
  • 工作原理

  • Host:注册自定义 Web 路由 POST /plugin-toggle/api/<method>list / set-enabled),读取各 profile 的 bundle 栈与补丁文件,改写补丁。路由仅接受同源请求。

  • Client__ModuleLoader__ bundle,注册到 `settings.plugins
  • 查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    dsh-plugin-toggle
    Repo
    git+https://github.com/huntersxy/dsh-plugin-toggle.git
    Engines
    {"node":">=20"}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-ui-slots"]}}