在 DeepSeek Harness Web GUI 內管理本機插件:dsh-plugin-manager

前言

DSH 的插件理念是「一切皆插件」。如果本機 web profile 裏需要頻繁增加、停用或卸載插件,命令行方式通常會直接面對 profile 的 package.json 與 dsh.profile.bundles,改完後還要重啓 dsh web 並硬刷新瀏覽器。

dsh-plugin-manager 把這部分操作放進 DeepSeek Harness Web GUI 的設置面板:列出、啓用、禁用、安裝、卸載 web profile 的插件。DSH 社區目錄是獨立站點,與 DeepSeek / 幻方無官方從屬關係,不應理解爲官方應用商店。

這是什麼

dsh-plugin-manager 是在 DeepSeek Harness Web GUI 內管理本機插件的 DSH 插件。它由 fuyao606 維護,許可證爲 MIT。

它默認管理 web profile,讀取:

  • $DSH_HOME/profiles/web/package.json 中的 dependencies 與 dsh.profile.bundles
  • node_modules 中的實際版本

界面上會區分「用戶插件」與「內置模塊」。

核心功能

列出插件

在 DeepSeek Harness Web GUI 的設置面板裏查看當前 profile 中的插件,並結合 package.json 與 node_modules 顯示實際版本。

啓用與禁用

啓用或禁用插件時,切換 dsh.profile.bundles 中的掛載狀態。禁用會保留已安裝內容,只是下次啓動時不再加載該 bundle。

安裝與卸載

安裝時輸入 npm 包名,在 profile 目錄執行 pnpm add <spec>,並按安裝狀態對賬 bundles。

卸載時執行 pnpm remove <name>,並對賬 bundles。

API 與客戶端

dsh-plugin-manager 提供 /plugin-manager/api JSON API,操作限定爲:

list
enable
disable
install
remove

API 只接受 POST,並複用 DSH Web API 的請求信任圍欄,檢查迴環 Host、trustedHosts 和同源請求。

客戶端註冊 settings.section slot,渲染插件管理界面。

校驗

插件對 API 和安裝規格使用信任圍欄與白名單校驗。安裝規格僅支持 npm 包名;github:、file:、本地路徑和 tarball URL 等規格需走命令行。

安裝與啓用

推薦安裝

推薦從 GitHub 安裝:

dsh plugin --profile web add github:fuyao606/dsh-plugin-manager

固定版本安裝

也可以固定到指定版本:

dsh plugin --profile web add github:fuyao606/dsh-plugin-manager#v0.1.1

npm 方式安裝

如果已發佈 npm 包,可以使用:

dsh plugin --profile web add dsh-plugin-manager@latest

本地開發安裝

先克隆倉庫,再構建後安裝:

git clone https://github.com/fuyao606/dsh-plugin-manager.git
cd dsh-plugin-manager
pnpm install
pnpm build

dsh plugin --profile web add ../dsh-plugin-manager

打開插件管理

安裝完成後重啓 dsh web,並硬刷新瀏覽器,然後打開:

設置 → 插件管理

典型用法

安裝規格

「安裝插件」輸入框支持以下 npm 包名形式:

  • name
  • name@version
  • name@tag
  • @scope/name
  • @scope/name@version

示例規格:

@tonydua/dsh-web-search-exa
dsh-better-sidebar@latest
dsh-plugin@1.2.3

github:、file:、本地路徑和 tarball URL 等規格請改用命令行安裝。

狀態說明

  • 已啓用:bundle 已掛載到 dsh.profile.bundles。
  • 已禁用:包仍保留安裝,但已移出 bundle 掛載列表。
  • 已阻斷:與當前 profile 的 Cordis patch ID 衝突,不能強行啓用。
  • 普通依賴:npm 依賴,不是 DSH bundle,不支持啓用 / 禁用。
  • 內置:profile 原有的內置 bundle,不可卸載。

適用場景與注意

適合需要管理本機 DSH web profile 插件的開發者。使用前需要注意:

  • 所有改動只落到 profile 的 package.json 和 node_modules,需重啓 dsh web 並硬刷新瀏覽器後生效。
  • Host 半改動無法熱加載,僅刷新頁面不會使配置生效。
  • 默認管理 web profile;使用其他 profile 時,請確保該 profile 已存在且能由 DSH 正常啓動。
  • 普通依賴不是 DSH bundle,不支持啓用 / 禁用。
  • 內置 bundle 不可卸載。
  • 已阻斷表示與當前 profile 的 Cordis patch ID 衝突,不能強行啓用。
  • 要求 Node.js >=20,包管理器使用 pnpm。
  • 插件仍會以本機 DSH 進程權限運行,請只安裝信任的 npm 包;安裝前應檢查源碼與許可證。

鏈接

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

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

小夜