DeepSeek Harness 插件管理工具

前言

在 DeepSeek Harness(DSH)里管理已下载的插件:查看列表、启用、停用、删除。安装方式与插件市场的插件完全一致(npm 包 + dsh.profile.bundles 挂载 + dsh.client 浏览器端),装上后会出现在 DSH 的「插件」页,在「设置」里多一个插件管理页,并可以在对话中直接调用管理工具。

插件概览

  • 名称:dsh-plugin-manager
  • 维护者:zcx-zg
  • 分类:admin-security
  • 标星:0
  • 简介:Manage installed DSH (DeepSeek Harness) plugins: list, enable, disable, delete - from model tools or a web Settings page.
  • 许可证:MIT

插件读取 DSH profile 中的 package.json 依赖与 dsh.profile.bundles 启用状态,与 DSH「插件」页共享同一份数据源。

核心功能

插件列表与状态

  • 列出已安装插件,支持关键词与启用状态过滤
  • 标识「含界面」与「仅 Host」两种类型
  • 状态指示:已启用 / 已停用

启用与停用

  • 启用:写入 dsh.profile.bundles
  • 停用:从 bundles 移除,保留文件,可随时恢复

删除

  • 彻底删除插件:依赖声明 + node_modules 目录
  • 删除前经 DSH 审批;操作不可撤销

Web 界面

  • 在 DSH「设置」中新增「插件管理」页
  • 布局与「技能」页一致:标题 + 说明,右上角统计(profile / 总数 / 已启用 / 已停用)
  • 分段页签:全部 / 已启用 / 已停用
  • 搜索框 + 刷新
  • 插件行:首字母图标、包名、版本、状态、标签、说明、开关、删除
  • 删除前弹出确认框;操作结果以 toast 反馈

模型工具

  • list_dsh_plugins:列出已安装插件,支持关键词与启用状态过滤
  • enable_dsh_plugin:启用插件(写入 dsh.profile.bundles)
  • disable_dsh_plugin:停用插件(从 bundles 移除,保留文件)
  • delete_dsh_plugin:彻底删除插件(依赖 + bundles + node_modules),调用前经 DSH 审批

Web 接口

插件注册三条路由,供后续面板或脚本复用(读的是同一份 profile 数据):

  • GET /api/dsh-plugin-manager/state
  • POST /api/dsh-plugin-manager/toggle,请求体:{ "name": "...", "enabled": false }
  • POST /api/dsh-plugin-manager/delete,请求体:{ "name": "..." }

写操作要求请求头 x-dsh-plugin-manager: 1 且 content-type: application/json。

安装与启用

直接从 GitHub 装进 profile(浏览器 UI 一般是 web):

dsh plugin --profile web add github:zcx-zg/dsh-plugin-manager

装完重启 DSH,插件会自动挂载(cordis.patch.yml 负责这一层)。

开发或离线环境也可以走本地目录 / tgz:

# 本地目录,改完不用重新打包
dsh plugin --profile web add .\dsh-plugin-manager

# 或先打包再安装
npm pack
dsh plugin --profile web add .\dsh-plugin-manager-0.2.0.tgz

卸载:

dsh plugin --profile web remove dsh-plugin-manager

配置

在 DSH 的「插件」页打开本插件详情即可编辑(宿主 plugins.bundle.config 槽位):

配置项 默认值 说明
profile web 管理哪个 profile
dshHome ~/.dsh DSH 数据目录
allowDelete true 设为 false 时禁止删除插件

典型用法

通过对话调用

  • “我现在装了哪些插件?”
  • “把 dsh-better-sidebar 停用”
  • “删除 dsh-plugin-wallpaper-engine”

通过 Web 界面操作

  • 打开 DSH「设置」 → 「插件管理」
  • 在页签或搜索框中筛选插件
  • 点击开关启用 / 停用
  • 点击删除按钮,确认后删除

通过脚本调用接口

# 查询状态
curl http://localhost:端口/api/dsh-plugin-manager/state

# 启用插件
curl -X POST http://localhost:端口/api/dsh-plugin-manager/toggle \
  -H "x-dsh-plugin-manager: 1" \
  -H "content-type: application/json" \
  -d '{"name": "插件名", "enabled": true}'

# 删除插件
curl -X POST http://localhost:端口/api/dsh-plugin-manager/delete \
  -H "x-dsh-plugin-manager: 1" \
  -H "content-type: application/json" \
  -d '{"name": "插件名"}'

适用场景与注意

  • 适合需要统一管理 DSH 插件生命周期(启用/停用/删除)的开发者与运维
  • 插件以当前 DSH 进程权限运行;安装前应检查源码与许可证
  • 删除插件会移除依赖声明与 node_modules 目录,不可撤销

小结

dsh-plugin-manager 为 DSH 提供了从模型对话到 Web 界面的统一插件管理入口,覆盖列表、启用、停用与删除全流程,并与 DSH 原生「插件」页共享数据源,适合需要精细化管理插件生态的场景。

  • 插件目录:https://www.skillhub.cn/plugins/zcx-zg/dsh-plugin-manager
  • GitHub:https://github.com/zcx-zg/dsh-plugin-manager
羽毛球分组比赛记分
小程序二维码

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

小夜