dsh-plugin-health
消息通讯 活跃维护

dsh-plugin-health

EasonMWS/dsh-plugin-health

Upgrade check + multi-host compatibility matrix for DSH plugins, official format-1 market index, Windows/WSL install doctor, and a reusable GitHub Action that comments a compatibility matrix on plugin PRs.

3
Stars 标星
1
Forks 分支
3
Watchers 关注
2
Open Issues
JavaScript
主要语言
MIT
开源协议
658 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:EasonMWS/dsh-plugin-health
git clone https://github.com/EasonMWS/dsh-plugin-health.git
git clone git@github.com:EasonMWS/dsh-plugin-health.git
README.md main

dsh-plugin-health

CI
npm
License: MIT

Plugin manager, doctor and conflict checker for
DeepSeek Harness (dsh) — with a native settings
page inside DSH.

Status: 0.5.0. Built against the official DSH 0.2.1-rc.2 compatibility rules and the
published @deepseek-ai/dsh-plugin-market-index validator.

Live official format-1 index: https://easonmws.github.io/dsh-plugin-health/index.json
(300 plugins, rebuilt nightly) · npm: npm install -g dsh-plugin-health ·
repo: https://github.com/EasonMWS/dsh-plugin-health

Listed on the awesome-dsh-plugin
directory and the DSH Plugin Store.

Looking for a plugin manager / doctor / checker?

This package is what you want if you are searching for any of these:

If you are looking for… This package does that
a plugin manager for DSH shows every installed plugin and its state in one page
a plugin checker / inspector / scanner scans all installed plugins, not a sample
a plugin doctor / diagnostics explains what is broken and what to do about it
plugin conflict detection flags plugins that will not load on your DSH version
to fix / repair a broken plugin one-click repair (quarantine only, never deletes)
why a plugin stopped working after a DSH update compares declared ranges against the new host
插件管理 / 插件检查 / 插件冲突 / 插件诊断 / 插件不兼容 中文界面,设置 → 插件健康

Not this package if you want to browse and install new plugins from a market — that is a
marketplace, while this one manages what you already have. (It does build the official format-1
index that marketplaces can consume.)

Why this exists: DSH gates installs, but not upgrades

DSH rejects a new install whose declared range does not cover the running version — that part is
solid:

$ dsh plugin --profile test add dsh-session-recall
dsh: installation rejected: Plugin dsh-session-recall@0.7.9 is incompatible with dsh 0.2.1-rc.3
dsh: nothing was installed.

What it does not do is re-check plugins that are already installed after the host moves. A
plugin declaring engines.dsh: 0.2.1-rc.2 stays in bundles and keeps loading on 0.2.1-rc.3 with
no warning anywhere in the UI. That is the gap this package fills: it reads what every installed
plugin declares and compares it against the version you are actually running.

It has already caught real regressions

Scanning the top 120 plugins across a host bump found 5 that load on 0.2.1-rc.2 but are rejected
on 0.2.1-rc.3. Reports were filed for each, and maintainers acted — 4 of the 5 have shipped
fixes
(verified 2026-10-26), and the count of affected plugins went 5 → 1:

Confirmed against the published 0.1.47 manifest and the official rc.3 host compatibility
evaluator: 19 DSH peers were rejected, while rc.2 still passed.
Fixed on main in #179 … All nine PR CI jobs passed, including the new required rc.3 Profile
lane
.

— Anionex/dsh-vision-toolkit#178
(906★), on a fix prompted by this scan — released as 0.1.48

Plugin Fixed in Status
@anionex/dsh-vision-toolkit 0.1.48 ✅ released, verified on rc.2 + rc.3
dsh-plugin-subscriptions 0.9.11 ✅ released, verified on rc.2 + rc.3
@nanmicoder/dsh-agent-teams 0.1.27 ✅ released, verified on rc.2 + rc.3
@goodandready/dsh-clinebot 0.6.16 ✅ released, verified on rc.2 + rc.3
dsh-workbuddy-connect — ⚠️ still 0.7.9 (repository unreachable — the one case where no report could even be filed)

Full report: docs/upgrade-0.2.1-rc3.md.

A real UI, only when you need it

Install it as a bundle and DSH gets a native Settings → 插件健康 section:

dsh plugin --profile web add dsh-plugin-health
  • It checks every plugin you actually have installed, not a sample and not just the bundle list:
    bundles, package.json dependencies, cordis.patch.yml inserts (including nested ones), and
    anything plugin-shaped in node_modules. The header tells you how many were inspected.
  • Every finding is written in plain language with a concrete next step — a first-time user can act
    without reading CLI docs.
  • One line at the top says whether you can relax (可以放心用) or should act (有问题建议处理), and a
    重新扫描 button re-runs the check on demand.
  • If nothing is wrong, nothing is shown. The plugin adds no badge, no banner, no sidebar entry.
  • When something is wrong, a compact 插件有 N 个问题 entry appears above the account menu and
    jumps straight to the section.
  • The host half only serves a loopback-only read-only snapshot; the plugin never modifies your
    profile.
Findings, verdict line, one-click repair Dry-run plan before any write
Settings section with findings and the repair button Repair plan shown before applying

Upgrading DSH? Run the check first.

0.2.1-rc.3 (2026-10-23) dropped the compatible count from 118 to 113 of the top 120 plugins:
5 plugins that worked on rc.2 stop loading on rc.3, all because they enumerate exact
@deepseek-ai/* versions. As of 2026-10-26, 4 of them have shipped fixes (affected 5 → 1).
Earlier, rc.2 had broken 3 others. Latest report:
docs/upgrade-0.2.1-rc3.md ·
docs/upgrade-0.2.1.md.

dsh-plugin-health matrix --plugins plugins.txt --versions 0.2.1-rc.2,0.2.1-rc.3

Why

DSH ships no official plugin market index, publishes a prerelease roughly every two days with
breaking changes, and its plugin manager has no version picker or upgrade action. Today an author
can only check a plugin against the one DSH version installed on the machine, and Windows/WSL
install failures leave partial directories and stale locks behind.

This tool covers the three gaps that the existing doctor/market tools do not:

  1. Multi-host compatibility matrix — will a plugin load on 0.1.7-rc.2, 0.2.0-rc.2,
    0.2.1-alpha.4, 0.2.1-rc.2, ...? Evaluated with the exact official semantics
    (engines.dsh first, otherwise @deepseek-ai/dsh* peers, prereleases included,
    workspace: ranges mapped to the host version).
  2. Official format-1 market index — turn a community catalog into a JSON index that the
    built-in DSH Discover tab accepts, validated by the same parser the DSH Host uses.
  3. Windows/WSL install doctor — read-only by default; repairs quarantine, never delete, and
    patch edits keep the user's comments.

Install

npm install -g dsh-plugin-health
# or run the checkout:
git clone https://github.com/EasonMWS/dsh-plugin-health.git && cd dsh-plugin-health && npm ci
node bin/dsh-plugin-health.js --help

Requires Node.js 20+.

Install inside DSH (bundle mode)

The package is also an installable DSH bundle. Installing it into a profile adds a read-only
plugin_health agent tool that reports missing third-party bundles, broken package directories,
cordis.patch.yml residue, proxy/registry configuration, profile drift, and installed plugins
incompatible with the running DSH version.

dsh plugin --profile web add dsh-plugin-health

The bundle declares engines.dsh, adds no UI, and changes nothing by itself.

1. Compatibility matrix

dsh-plugin-health matrix \
  --plugins examples/plugins.txt \
  --versions latest,next,alpha,0.1.7-rc.2 \
  --out dsh-health-out/matrix \
  --fail-on any
  • --plugins accepts a file (one spec per line, # comments allowed), a comma list, or repeated
    flags. A spec is name, name@version, or a local plugin directory.
  • --versions accepts exact SemVer versions or npm dist-tags of @deepseek-ai/dsh
    (latest, next, alpha, ...).
  • Output: matrix.json, matrix.md, and static SVG badges (badges/).
  • --fail-on any|none|<host> makes the command usable as a CI gate.

The evaluation mirrors packages/boot/app-boot/src/plugin-compatibility.ts:

Manifest declares Check
engines.dsh that range alone; peers are ignored
no engines.dsh, has peers every @deepseek-ai/dsh / @deepseek-ai/dsh-* peer range
peer range workspace:^ / ~ / * the running host version
prerelease host versions participate in ranges (includePrerelease: true)

The matrix is static (manifests + official requirements). A passing declaration does not
prove that a plugin activates or that its tools work. Use the separate opt-in smoke command
below for runtime acceptance. Git-only plugins can be checked statically from a local clone.

Runtime acceptance in a fresh profile

Install the host version you want to test into a separate directory, then test the package users
will install, including a release tarball:

npm install --prefix /tmp/dsh-rc3 @deepseek-ai/dsh@0.2.1-rc.3
dsh-plugin-health smoke \
  --dsh-dir /tmp/dsh-rc3/node_modules/@deepseek-ai/dsh \
  --plugin ./my-plugin-1.0.0.tgz \
  --tool my_plugin_tool \
  --calls ./smoke-calls.json \
  --out dsh-health-out/runtime

smoke-calls.json is an array of tool calls. Each call must complete without a tool error;
expectedValue, when provided, is compared with the entire structured return value:

[{"name":"my_plugin_tool","arguments":{"input":"example"},"expectedValue":{"answer":42}}]

The command installs through the official dsh plugin CLI into a new DSH_HOME, boots through
the host's public @deepseek-ai/dsh/profile-boot export, checks named tool registrations, executes
the supplied calls, and disposes the profile. It requires at least one --tool or --calls
assertion. --tool alone checks registration, not tool behavior or browser rendering.

Installation has a 120-second limit. Boot, calls and shutdown share a 30-second limit; override
with --install-timeout and --timeout (milliseconds). On timeout, the whole child process tree
is stopped, including a plugin that never finishes initialization. The report names the failing
stage (install, boot, assertions or shutdown) and preserves the host diagnostic. Exit 1
means acceptance failed, even if a signal handler exits zero after a timeout.
On POSIX, a process that exits zero but leaves background descendants also fails acceptance and
its remaining process group is stopped. Windows uses taskkill /T for timeouts; detecting children
after their parent has already exited is not supported there.

Every run retains its home, smoke.json, runtime.json and bounded stdout/stderr in a new run
directory. Existing profiles are not modified. There is no automatic cleanup; inspect logs before
sharing them. Repeat with a separate installed host directory for each version in your matrix.
The installed host needs Node.js and pnpm versions supported by that DSH release, and must export
profile-boot (tested with 0.2.1-rc.2 and 0.2.1-rc.3).

This runs plugin code with your OS account permissions. A temporary DSH home is isolation from
your normal profile, not a security sandbox. Only run packages you trust; use a container or VM
for untrusted code. Runtime smoke does not certify all plugin behavior or UI compatibility.

Example run (2026-10-17, 7 plugins × 4 hosts)

dsh 0.1.7-rc.2: 6/7 compatible, 1 incompatible
dsh 0.2.0-rc.2: 5/7 compatible, 2 incompatible
dsh 0.2.1-alpha.4: 5/7 compatible, 2 incompatible
dsh 0.2.1-rc.2: 5/7 compatible, 2 incompatible
✗ dsh-win32@0.17.14: incompatible on all four (narrow @deepseek-ai/dsh-subprocess-local peers)
✗ dsh-find-plugin@0.4.0: incompatible from 0.2.0-rc.2 (@deepseek-ai/dsh-tools peer)

The first result reproduces the real failure tracked in dsh-win32 issue #89 (a peer upper bound
that is too narrow for later host lines) without installing anything.

GitHub Action: matrix on every pull request

The repository ships a reusable workflow. Add
examples/dsh-compat.yml to a plugin repository (as
.github/workflows/dsh-compat.yml) and every pull request gets a compatibility matrix comment plus
a job summary, with the matrix artifact uploaded:

name: dsh plugin compatibility
on: pull_request
permissions:
  contents: read
  pull-requests: write
jobs:
  matrix:
    uses: EasonMWS/dsh-plugin-health/.github/workflows/matrix-review.yml@v0.1.5
    with:
      plugins: '.'
      versions: 'latest,next,alpha'
      comment: true

2. Format-1 market index

dsh-plugin-health index \
  --catalog https://awesome-dsh-plugin.com/plugins.json \
  --host 0.2.1-rc.2 \
  --index-url https://easonmws.github.io/dsh-plugin-health/index.json \
  --matrix dsh-health-out/matrix/matrix.json \
  --limit 300 --out site

The command writes site/index.json (format 1) plus site/build-report.md, then validates the
document with @deepseek-ai/dsh-plugin-market-index — the official reader used by the DSH Host.
Host the directory on any static origin (GitHub Pages is fine; no redirects) and paste the
index.json URL into Plugins → 自定义插件市场 → 发现 → 添加索引源.

Index facts:

  • market title/description and every plugin title/description are localised (en required, zh kept);
  • categories come from the catalog, plus labels (npm, compatible, incompatible,
    unchecked, capability risk) and sort keys (downloads, stars, health score);
  • the health score is deterministic: popularity (log downloads 55, log stars 25) ± compatibility
    and capability-risk adjustments, 0–100;
  • versions listed per plugin default to the dist-tag latest first, then the highest versions
    (--max-versions, default 3), with the npm publish timestamp and engines.dsh.

Current scope: npm-published catalog entries only (2,607 of 5,704 in the October 2026 snapshot).
GitHub/tarball-only entries are skipped and reported; git source support (commit-pinned) is on the
roadmap.

3. Windows/WSL doctor and repair

dsh-plugin-health doctor --home C:\Users\me\.dsh --profile desktop --runtime 0.2.1-rc.2
dsh-plugin-health repair --home C:\Users\me\.dsh --profile desktop --apply --yes

Checks: declared third-party bundles that are not installed (bundles shipped by the DSH
installation are treated as provided), unreadable/partial package directories, missing profile
dependencies, broken or empty cordis.patch.yml entries, .bak-* / .lock / .lock.takeover-*
residue, large plugin-manager logs, proxy configured without NODE_USE_ENV_PROXY=1, WSL and long
Windows paths, installed-plugin incompatibility against --runtime, and plugin-set drift between
profiles.

Repairs are opt-in (--apply), default to a dry run, and never delete:

  • files/directories move to <home>/.plugin-health/quarantine/<timestamp>/ (a repair-log.json
    records every action);
  • cordis.patch.yml is edited textually (top-level - [] entries only) after a backup, so comments
    and formatting survive.

Roadmap

  • runtime acceptance for browser-only plugins (the current smoke command probes agent tools);
  • git/tarball catalog entries with commit-pinned sources;
  • matrix over the whole catalog, published nightly next to the index;
  • a DSH plugin panel that renders the matrix and doctor results in-app;
  • a reusable GitHub Action and a public compatibility dashboard.

Development

npm ci
npm test

Unit tests cover the official compatibility semantics, the format-1 builder (validated with the
official parser), doctor/repair fixtures, and runtime-runner failure paths. npm test needs no
network. To run the separate installed-host acceptance fixtures (requires pnpm and an installed
host):

npm run test:runtime -- /tmp/dsh-rc3/node_modules/@deepseek-ai/dsh

This packs and installs controlled healthy, pending-injection, throwing-init and hanging-init
fixtures. Their profiles and reports are retained for inspection.

Disclaimer

DSH plugins run with the user's full permission. A health score, a compatibility label, or a
catalog listing is not a security review. Third-party indexes are unsigned; only add sources you
trust.

License

MIT