@vithrive/dsh-plugin-market
v0.1.1
Published
DSH web plugin: a plugin marketplace tab in Settings → Plugins, listing installable dsh plugins from the deepseek-harness-plugin.com directory with one-click install.
Readme
@vithrive/dsh-plugin-market
A plugin-marketplace tab for the DeepSeek Harness Web UI, placed in Settings → Plugins, right of the plugin list.
Published as @vithrive/dsh-plugin-market on npm (the bare
dsh-plugin-marketname is taken by an unrelated package).
What it does
- Adds a Plugin market tab to the Plugins settings section
(
settings.plugins.tab, idmarket, order 20 — after the plugin list). - Data source: the DeepSeek Harness Plugin Directory
— a curated directory of ~287 plugins across 11 categories, updated daily.
The browser reads its list pages directly (the site serves
access-control-allow-origin: *, so no proxy is needed). - Pins the directory's ★ Featured picks on top, then the full catalog, with live search, a category filter, and an installed-only toggle.
- Marks packages already installed in this deployment (matched by normalized
package name against the
pluginInventoryRemote; a directory slug and the npm/package name sometimes differ, so a miss there is possible). - One-click install: every card has an Install button that runs
pnpm add <spec>in the web profile through a same-origin host endpoint (POST /plugin-market/api/install, origin-checked and spec-whitelisted) and reconcilesdsh.profile.bundles— success shows 已安装, failure shows 安装失败 with the pnpm error. A restart ofdsh webis still required for the newly installed plugin to activate. - Every card expands to fetch the plugin's install command from the
directory detail page, with copy-to-clipboard, the GitHub source link, and
the plugin facts (stars / license / language / last push / maintainer).
The directory prints
dsh plugin add github:owner/repo; since the CLI requires--profile, the copied command is adapted todsh plugin --profile web add github:owner/repo.
Install
From npm (published as @vithrive/dsh-plugin-market):
dsh plugin --profile web add @vithrive/dsh-plugin-marketFrom the source directory (this repo lives at ~/.dsh/plugins/dsh-plugin-market):
cd ~/.dsh/plugins/dsh-plugin-market
pnpm pack
dsh plugin --profile web add .\dsh-plugin-market-0.1.0.tgzThen restart the web app:
# stop the running `dsh web` (Ctrl+C or kill the process), then
dsh webThe browser roster (dsh.client scanning) picks the new client bundle up on
boot — no web-app rebuild is needed.
Structure
lib/index.js node half — marker row (the marketplace is browser-side)
lib/client.js browser half — the Plugin market tab (registered into
settings.plugins.tab, id "market", order 20)
cordis.patch.yml dsh.bundle.patch — inserts the plugin-market row
package.json declares dsh.bundle.patch + dsh.client (platform web)
smoke.mjs Node smoke test (exports contract, tab registration, pure
helpers, SSR render) — run `node smoke.mjs`Development
The client bundle is a plain window.__ModuleLoader__.load({ id, factory })
handoff (the format client-modules serves under /plugins/<id>/client.js); it
requires only modules that are already in the web roster
(react, @deepseek-ai/dsh-client-ui-primitives).
The HTML parsers (parseListHtml / parseDetailHtml) run in the browser
(DOMParser); make-probe.mjs emits a self-contained probe that exercises the
data layer against the live directory inside a browser page (CDP), used to
verify parser changes against the real site.
On Windows, pnpm cannot symlink local folders without Developer Mode, so the profile installs the package from a tarball. The dev loop is:
# after editing lib/*, re-pack, re-add, then restart dsh web
cd C:\Users\admin\.dsh\plugins\dsh-plugin-market
pnpm pack
dsh plugin --profile web add .\dsh-plugin-market-0.1.0.tgzTo point the install command at a different profile, edit PROFILE in
lib/client.js.
Notes
- The directory is fetched directly from the browser; if the machine is offline the tab shows a retryable error, and one-click install reports the failure on the card.
- One-click install runs
pnpm addin the profile directory (ctx.baseUrl); installing a plugin that is already present fails with pnpm's message, and a newly installed plugin only activates afterdsh webrestarts.
