dsh-plugin-manager:DSH Settings 插件管理器

前言

DSH 生态把能力以插件 bundle 的形式扩展。一个 profile 里可能已经安装多个插件包,安装、更新、卸载、检查新版本时,如果只能在命令行、仓库页和市场搜索之间来回切换,操作会比较分散。

dsh-plugin-manager 是一个可独立发布的 DSH bundle。它在 Settings → Plugins 中提供一个带分类的插件管理器,用于管理 Desktop 和 native Web profile 中的已安装插件包。

基础信息

  • 仓库:TAOxxx7/dsh-plugin-manager
  • 维护者:TAOxxx7
  • 许可证:MIT
  • 定位:DSH Settings plugin manager bundle for Desktop and native Web profiles

下面是 package.json 中与安装、运行相关的关键字段:

{
  "name": "dsh-plugin-manager-community",
  "version": "0.1.3",
  "engines": {
    "node": ">=20"
  },
  "license": "MIT"
}

安装命令中使用的是 npm 包名 dsh-plugin-manager-community。如果发布者重命名包名,需要替换安装命令中的包名。

核心功能

dsh-plugin-manager 提供的能力如下:

  • Settings → Plugins 提供带分类的插件管理器。
  • 为已安装 profile 包提供分类。
  • 支持 GitHub dsh-plugin 市场搜索。
  • 重复安装检测。
  • 市场仓库发布 DSH bundle 时优先 npm 安装。
  • 未发布仓库走 GitHub fallback。
  • 支持卸载、单包更新、更新检查和启动检查。
  • 对源码安装插件进行 GitHub Release 检查,支持 semver tags,未固定源使用 commit-head fallback。
  • 显式 pnpm build 审批/重试并捕获诊断。
  • Desktop 和 native Web 安装完成后的重启提示。
  • 在 DSH Desktop 与 npx @deepseek-ai/dsh web 中保持相同 active-profile 行为。

安装与启用

先确认当前 DSH 运行环境满足 Node 引擎要求:>=20

为 Desktop profile 安装最新版社区插件包:

dsh plugin --profile desktop add dsh-plugin-manager-community@latest

为 native Web profile 安装插件包并启动 Web:

npx -y @deepseek-ai/dsh plugin --profile web add dsh-plugin-manager-community@latest
npx -y @deepseek-ai/dsh web

安装更新包版本后,需要重启当前 DSH 进程以加载新 bundle 层。市场安装成功后,Settings tab 会询问是否重启。

典型用法

查看已安装包

安装完成后,进入 Settings → Plugins。这里会展示已安装 profile 包,并给出分类。

搜索并安装市场插件

通过 GitHub dsh-plugin 市场搜索候选插件仓库。

  • 如果市场仓库已发布 DSH bundle,优先走 npm 安装。
  • 如果仓库未发布,走 GitHub fallback。
  • 安装前会进行重复安装检测。

更新与卸载

插件管理器支持:

  • 卸载。
  • 单包更新。
  • 更新检查。
  • 启动检查。

对于源码安装的插件,会进行 GitHub Release 检查:

  • 支持 semver tags。
  • 未固定源使用 commit-head fallback。

pnpm build 审批与重试

当插件流程需要执行 pnpm build 时,dsh-plugin-manager 会要求显式审批/重试,并捕获诊断信息。

Native Web 重启行为

Native Web 的重启会替换运行中的 Node 进程。根据浏览器请求时机,触发重启的那个 HTTP 请求可能显示 Failed to fetch。当前客户端会识别这种 Web-only 断开为预期重启,并显示 reconnecting 状态。

Windows native Web 的 pnpm 解析顺序

在 Windows native Web 中,pnpm 的解析顺序为:

  1. DSH_PNPM_BIN
  2. active profile/shared DSH pnpm package
  3. PNPM_HOME / npm global directories
  4. PATH
  5. Node.js Corepack

如果上述位置都不可用,需要安装 Node.js/Corepack,或者将 DSH_PNPM_BIN 设置为完整 pnpm.cmd 路径,然后重启 Web 进程。

适用场景与注意

适合在 DSH Desktop 或 native Web 中管理 profile 插件包的人。这个插件把分类、市场搜索、安装、更新、卸载、重启提示集中在 Settings → Plugins 中。

使用前注意:

  • 它会以当前 dsh 进程权限运行。安装前应检查源码、许可证和包名。
  • dsh.client.platformweb,描述浏览器界面,不是 GitHub-only 安装模式。
  • lib/ 是从验证过的 Harness build 复制的 release artifact。
  • src/ 供审查和未来维护。
  • 许可证为 MIT
  • 要求 Node >=20

结尾

dsh-plugin-manager 的价值是把 DSH 插件的查看、搜索、安装、更新、卸载和重启提示放进 Settings 面板,减少 Desktop 和 native Web 之间重复操作。

GitHub:https://github.com/TAOxxx7/dsh-plugin-manager

目录页:已核实资料中未出现目录页 URL,本文不补全。

羽毛球分组比赛记分
小程序二维码

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

小夜