dsh-plugin-installer:DeepSeek Harness 的插件市场与 Profile 切换

前言

在 DeepSeek Harness(DSH)中,插件是扩展 Web UI 的方式之一。但插件本身通常分散在 GitHub 仓库中,安装前需要找仓库、确认版本、下载包、安装到指定 Web Profile,之后还要单独处理更新和移除。

dsh-plugin-installer 把这几个步骤放进 DSH Web UI:在 Settings → Plugins 中增加一个 Plugin marketplace 标签,用于从 GitHub 发现 DSH 插件、校验可安装性,并把插件安装到选定的 DSH Profile。

这里介绍的是一个第三方社区项目,不等同于 DeepSeek / 幻方官方应用商店。DSH 采用插件化扩展,这个项目把发现、安装、更新和 Profile 切换放在同一个 Web 界面里。

这是什么

dsh-plugin-installerToukaiteio 维护,定位为:

An in-app marketplace and Profile switcher for DeepSeek Harness.

它接入 DSH 官方 Web UI 的插件位置,提供一个 Plugin marketplace 页面,用于发现 GitHub dsh-plugindsh topics 下的仓库,并在安装前做 DSH bundle 校验。它运行在 DSH Web Profile 中,不是独立管理站点。

核心功能

  • 从 GitHub dsh-plugindsh topics 在线发现插件仓库。
  • 排除 DeepSeek Harness host repository,不让宿主仓库混入插件市场结果。
  • 安装前校验根 package.json 中的 dsh.bundle.patch
  • 优先使用 GitHub Release 中已发布的 .tgz build artifact;只有 checked-in JavaScript entry 存在时,才允许 source install。
  • 支持从市场列表选择 Release 版本;默认优先 stable releases。
  • 当 GitHub 提供 digest 时,校验 Release archive 的 SHA-256。
  • 安装到选定的 DSH Profile。
  • 通过 GitHub dependency specs 和 package repository metadata 检测已安装状态。
  • 对 GitHub Release 版本做自动更新检查,并提供 in-page update 和 removal 操作。
  • 支持市场插件自身更新检查,可一键更新 active profile,并通过 restart action 生效。
  • 界面文案和日期格式跟随官方 DSH language preference。
  • 提供 Web Profile list、快速打开 Profile、创建 Web Profile。
  • 安装到 active Profile 后提供 restart guidance 和 one-click restart action。
  • 在 server 和 client 两端使用 12 分钟的 per-query、per-sort、per-page 缓存,减少 GitHub API 压力并加快重复访问。
  • 无限滚动会在当前列表结束前拉取下一个 GitHub search page。
  • 保留两个 GitHub 支持的 repository search order:updated time 和 star count。
  • 支持在 marketplace UI 中配置 GitHub API token,并提供 environment-variable fallback。

安装要求

  • Node.js >=22.19.0
  • pnpm >=10
  • DeepSeek Harness 0.1.0-rc.6 or a compatible release
  • A running DSH Web Profile for the in-app UI

安装与启用

Windows

在 Windows 上,可以运行下面的 PowerShell installer:

irm https://raw.githubusercontent.com/Toukaiteio/dsh-plugin-installer/main/scripts/Install-DshPluginInstaller.ps1 | iex

macOS 与 Linux

在 macOS 或 Linux 上,先下载 Bash installer,再执行:

curl --fail --location --remote-name https://raw.githubusercontent.com/Toukaiteio/dsh-plugin-installer/main/scripts/install-dsh-plugin-installer.sh
bash ./install-dsh-plugin-installer.sh

如果要安装到另一个 Profile,或安装后不启动 DSH Web,可以显式传参数:

bash ./install-dsh-plugin-installer.sh --profile work --no-start

手动安装

如果使用本地包文件,可以添加到目标 Web Profile:

dsh plugin --profile web add ./dsh-plugin-installer-<version>.tgz
dsh web

启动后,打开:

Settings → Plugins → Plugin marketplace

GitHub API token

如果匿名 GitHub API 达到限制,可以在市场内配置 token:

Settings → Plugins → Plugin marketplace → GitHub request settings

保存后,token 不会返回给浏览器。插件保存位置为:

$DSH_HOME/config/dsh-plugin-installer.json

对于无人值守安装,也支持 server-side GITHUB_TOKEN environment variable;当没有 plugin-saved token 时使用它。

安装校验

市场把 GitHub topic 只当作发现线索,不把它当作信任判断。选择安装后,DSH 宿主侧会读取仓库元数据和最新 Release,再拉取根 package.json,并要求存在有效的 dsh.bundle.patch

它会优先选择与包匹配的 <package-name>-<version>.tgz Release asset,并在 GitHub 提供 digest 时校验摘要。如果没有可用 Release,只有在 checked-in JavaScript entry 在对应 commit 中存在时,才允许 commit-pinned source install。

如果仓库既没有可用 Release archive,也没有可验证的 built JavaScript entry,市场会拒绝安装并说明原因。需要 prepare build script 的 source fallback,会要求按插件单独确认。

已安装插件管理

市场会跟随 DSH 的语言偏好,并按该语言格式化仓库日期。

已安装插件状态可以从 GitHub dependency specs 和 package repository metadata 中检测。对于 GitHub Release 版本,市场会做自动更新检查,并允许在页面内执行 update 和 removal。

市场插件自身也有 self-update check,支持一键更新 active profile,并通过 restart action 让新构建生效。

适用场景与注意

适合以下情况:

  • 你经常需要在 DSH Web UI 中安装、更新或移除插件。
  • 你需要从 GitHub 快速找到 dsh-plugin / dsh 话题下的项目。
  • 你需要在多个 DSH Web Profile 之间切换、打开或创建 Profile。
  • 你希望安装前能看到 Release 校验、包校验和失败原因。

使用前注意:

  • 插件作为当前 DSH 进程中的插件运行,安装前建议检查源码与许可证;包内 files 列出 LICENSE
  • 不要使用 NODE_TLS_REJECT_UNAUTHORIZED=0 绕过证书校验。
  • GitHub token 用于处理 API 限制;保存后不会返回浏览器。
  • 市场结果来自 GitHub topics,不等同于对仓库安全性做了最终背书。
  • 该项目是社区项目,与 DeepSeek / 幻方无官方从属关系。

结尾

dsh-plugin-installer 把 DSH 插件的安装路径从手动找仓库、手动下包、手动装插件,收敛到一个 Web 页面里,覆盖发现、校验、安装、更新和 Profile 切换。

项目入口(GitHub):

https://github.com/Toukaiteio/dsh-plugin-installer
羽毛球分组比赛记分
小程序二维码

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

小夜