dsh-market-ui: Browse and Install npm Community Plugins in the DSH Web Sidebar

Introduction

DeepSeek Harness (DSH) plugins can originate from the official built-in list, self-built indexes, or be installed directly by package name using dsh plugin. As community plugins proliferate, the cost of relying solely on the command line or the “Discover” page to check package names one by one becomes high. Here, we introduce dsh-market-ui: a “Plugin Market” panel in the Web GUI sidebar that fetches packages tagged with dsh-plugin from npm. It supports browsing, searching, installing, uninstalling, and updating, as well as comparing similar plugins and performing pre-installation checks on the details page. It uses a different locale namespace (dshMarketUi / dsh-market-ui) compared to DSH’s native Discover plugin, allowing it to be enabled simultaneously with the official discovery page.

What is this

dsh-market-ui is a community-maintained DSH client dual-sided plugin (host + browser). The maintainer is GitHub user 910092147, repository 910092147/dsh-market-ui, npm package name dsh-market-ui. The version in current documentation is 0.2.7, license MIT, requiring Node >= 18.

Panel entry: Sidebar “Plugin Market” (same level as the “Plugins” page), or Settings → Built-in Plugins → Plugin Market. Brief description (English): DSH plugin marketplace for DeepSeek Harness: browse, search, install, update and compare npm plugins.

How it works

Starting from 0.2.x, installation, uninstallation, and updates utilize the official DSH pluginManager service, rather than spawning dsh plugin CLI in the background. It shares the same pnpm implementation, profile write locks, failure rollback, registry fallback, engines.dsh compatibility checks, and build script approval as the official “Plugins” page; behavior is consistent across Web and Desktop. After installation, changes take effect immediately if HMR is enabled; otherwise, the UI will prompt for a restart.

Write operations are executed as background tasks: POST /install|uninstall|update immediately returns 202 and a job id, and the browser polls GET /job?id=. The panel can be closed; upon reopening, it takes over unfinished tasks via GET /jobs and calls pluginManager.cancelInstall via POST /cancel to avoid long-term page blocking.

Catalog and Search

Data Source: npm registry search (keywords:dsh-plugin). Browsing defaults to the top 250 relevant results, cached for 6 hours to DSH_HOME/cache/plugin-market/catalog.json. If fetching fails, old cache is used and annotated. Click “Refresh Catalog” for immediate updates.

Search: Uses npm text= ranking with strict token filtering; supports filtering by author/publisher (npm username or GitHub owner) and update time (Yesterday / 3 Days / 7 Days / 30 Days / Half a Year). If npm search indexing is delayed for new packages, it falls back to querying the registry packument by exact package name.

Categories, counts, and pagination are handled host-side; numbers on category labels represent the total result count, not just the current page.

Install, Update, and Uninstall

Installed versions come from pluginManager.listBundles(). If they differ from the latest npm version, an “Update” appears on the card. Under HMR, updates involve uninstalling then reinstalling (plugins are briefly disabled); without HMR, it overwrites and prompts for a restart. The toolbar “Update All” processes all updateable items sequentially; link: / file: / workspace: local installations are skipped to prevent overwriting development source code with npm versions.

The category bar “Updates Available (N)” lists only installed plugins with new versions on npm; local link/file/workspace installations are not counted. Cards display Current Version → Latest Version.

Pre-installation Check (Details page): Package size, presence of preinstall/install/postinstall scripts, compatibility verdict using runtime semver against engines.dsh, and deprecation status. Clear warnings are issued for incompatibility or presence of install scripts.

If rejected by pluginManager due to required build script authorization, the error may include pendingBuilds; the current UI does not yet provide “Allow and Retry”, requiring handling via the official Plugins page or reinstallation. Uninstalling DSH bundles or running plugins will be rejected with an explanation.

Details Page: README, Comparison, and Translation

The details page README prioritizes Chinese for the interface language (e.g., README.zh-CN.md); if GitHub raw fails, it falls back to the npm registry readme field.

Similar Comparison: Scores based on category / keywords / package name tokens, listing up to 5 similar plugins. It displays monthly downloads, update time, version, and license side-by-side, providing relative pros/cons based on objective data. There is also a Domain Feature Matrix (e.g., Plugin Market type, Cost type), comparing capability items (✓/·) using templates. Rows unique to the current plugin are marked “Exclusive”; capabilities are auto-identified from README, intro, and keywords for reference only. Clicking metric table rows or matrix column headers switches to the corresponding plugin’s details.

In the Chinese interface, English intros or READMEs can be clicked to “Translate to Chinese”: prioritizing the browser Translator API; if unavailable, falls back to the DSH default model (ctx.llm). Results are cached by content hash to DSH_HOME/cache/plugin-market/translations.json and marked as “Machine Translation”. Model translation consumes tokens and is not counted towards dsh-cost-meter session accounts.

Security and API

Write interfaces (install / uninstall / update / refresh) require:

  1. Custom header x-dsh-market: 1
  2. Origin same-origin with Host
  3. POST with content-type: application/json
  4. Package name conforms to npm rules and does not start with -

GET interfaces also require the x-dsh-market header. The host half provides /api/plugin-market/* REST; the browser half registers sidebar.panellist, main, and settings.plugins.tab.

Installation and Enablement

Prerequisite: DSH runs normally (dsh web or Desktop), and pnpm is in PATH.

Web:

dsh plugin --profile web add dsh-market-ui

Desktop:

dsh plugin --profile desktop add dsh-market-ui

dsh plugin installs the local directory via link (not copy); do not move or delete the source directory. Restart DSH after modifying host.js / client.js. npm page: https://www.npmjs.com/package/dsh-market-ui.

If installing from source development, the add command above points to the linked directory; when installing from npm, simply use the package name, no git clone needed.

Typical Usage

  1. After installation and restart (or waiting for HMR), open the Sidebar “Plugin Market”.
  2. Browse categories or search package names / authors; for niche packages not in the top 250 catalog, use the search box by name.
  3. Enter details to view README, compatibility, and install script warnings; use “Translate to Chinese” if necessary.
  4. One-click install, uninstall, or update; long-running tasks can finish in the background, check GET /jobs status by reopening the panel later.
  5. To link with the official “Discover” page, the package index can be used as an index source. The example in the documentation is as follows (change the version number to the new release after publishing):
https://cdn.jsdelivr.net/npm/dsh-market-ui@0.2.7/index.json

Paste the URL above in Plugins → Discover → Add Index Source to see this plugin on the official discovery page.

Use Cases and Notes

Suitable for: Users who frequently try community npm plugins in DSH Web or Desktop, need to compare similar implementations, and want to align with the official pluginManager locking and rollback strategies.

Notes:

  • Catalog browsing is limited to 250 results per search; colder packages rely on search.
  • The “My Plugins” tab relies on dsh-mine in keywords; local plugins not published to npm will not appear (including the display boundary of this plugin itself in “My Plugins”).
  • Plugins run with the current dsh process permissions; read the source code and MIT license before installation, and pay attention to third-party packages’ install scripts and engines.dsh.
  • The community catalog has no official affiliation with DeepSeek / High-Flyer; this article describes a community plugin market UI, not an official app store.

Repository Structure (for secondary development)

  • host.js — Node half: Catalog fetching/caching, search, REST, calling pluginManager
  • client.js — Browser half: React panel (list, details, task polling)
  • cordis.patch.yml, package.json (dsh.bundle + dsh.client)
  • NAMING.md — Multi-plugin naming conventions (dsh-feature-type + dsh-mine)

Maintainer release workflow see README: npm run check then npm publish; pushing v* tags allows CI auto-publishing (requires NPM_TOKEN).

Conclusion

dsh-market-ui brings DSH community plugins from npm into the sidebar: catalog caching, background installation tasks, compatibility and script warnings, similar comparisons, and alignment with official plugin management. Plugin catalog page: https://www.skillhub.cn/plugins/910092147/dsh-market-ui; Source code and instructions: https://github.com/910092147/dsh-market-ui.

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

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

Xiaoye