dsh-plugin-manager
DeepSeek Harness Web GUI plugin manager
- Stars
- 3
- Language
- TypeScript
- Created
- Aug 19, 2026
- Updated
- Aug 19, 2026
Introduction
dsh-plugin-manager
在 DeepSeek Harness(DSH)Web GUI 的「设置」面板里管理本机插件:列出、启用、禁用、安装、卸载 web profile 的插件,无需命令行手动操作。
功能
- 列出:读取
$DSH_HOME/profiles/web/package.json(dependencies+dsh.profile.bundles)与node_modules里的实际版本,区分「用户插件」与「内置模块」。 - 启用 / 禁用:切换插件在
dsh.profile.bundles中的挂载(禁用保留安装,仅下次启动不再加载)。 - 安装:输入 npm 包名,在 profile 目录跑
pnpm add <spec>,并按安装状态自动对账 bundles。 - 卸载:一键
pnpm remove <name>,并对账 bundles。
所有改动只落到 profile 的
package.json/node_modules,需重启dsh web并硬刷新浏览器后生效(host 半改动无法热加载)。
安装
方式一:从 GitHub(推荐,免构建脚本)
仓库已提交构建产物 lib/,直接装:
dsh plugin --profile web add github:fuyao606/dsh-plugin-manager
方式二:本地开发
git clone https://github.com/fuyao606/dsh-plugin-manager.git
cd dsh-plugin-manager
pnpm install
pnpm build
# 装进 web profile(本地 link,改完 rebuild 后重启即可)
dsh plugin --profile web add ../dsh-plugin-manager
方式三:npm(若已发布)
dsh plugin --profile web add dsh-plugin-manager@latest
装完重启 dsh web 并硬刷新浏览器,打开 **设置 →「插件管理」**即可使用。
开发
pnpm install
pnpm typecheck # tsc --noEmit
pnpm build # tsdown → lib/index.js(host)+ lib/client.js(client)
仓库刻意提交了构建产物
lib/(见.gitignore注释),改src/后需pnpm build重新生成并提交,保证 GitHub 安装免构建脚本。
安全
- 路由走与
/api网关一致的浏览器信任围栏(Host 回环 / trustedHosts + 同源),阻止恶意网页对本地 DSH 服务做 CSRF 安装/卸载。 install的包名规格做白名单校验,避免经shell: true调 pnpm 时被注入;仅支持 npm 包名(name/@scope/name,可选@version),github:/file:等规格需走命令行。
架构
- host 半
src/index.ts→lib/index.js:/plugin-manager/apiJSON API(list / enable / disable / install / remove)。 - client 半
src/client/index.tsx→lib/client.js:注册settings.sectionslot,渲染管理界面。 - 只依赖模块表提供的
react;@deepseek-ai/*服务面全部用结构化类型镜像,无值依赖。