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
羽毛球分组比赛记分
小程序二维码

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

小夜