Introduction¶
The release cycle for DeepSeek Harness (DSH) is fast, and every core upgrade can tighten the contracts that plugins rely on: stricter module tables, errors thrown when service injection fields are missing, renamed UI exports, or changes to the session message format. Common outcomes seen in the community include the page reporting Failed to load plugins, a large number of PENDING items in the plugin chain, or failures occurring at message formatting only after a task finishes. Manually checking the changelog and testing upgrades one by one is costly and prone to missing issues like “static code still referencing a deleted service name.”
Here we introduce dsh-upgrade-guard (Category: Workflow), published by maintainer wqx11235 in the SkillHub Plugin Directory. It consolidates checks summarized from historical upgrade incidents into three repeatable actions: pre-upgrade inventory, post-upgrade contract scanning, and startup smoke testing before switching traffic.
What is this¶
dsh-upgrade-guard is an upgrade safety net plugin for DSH 0.1.x / 0.2.x (current package version 0.2.0, MIT License, requires Node >= 22). It does not replace the official release notes; rather, it performs offline scanning for known breaking contracts, pre-checks against plugin compatibility declarations on npm before upgrading, and spins up a temporary host on a temporary port for startup-level verification.
The plugin shares the same logic for both the Web configuration profile (profiles/web) and the official desktop client (profiles/desktop): the host side does not import @deepseek-ai/* packages and mounts routes via the webServer service; the client side follows the 0.1.2+ inject / slots conventions and only require('react'), thereby reducing the historical failure surface of “the host contract changed, but the plugin is still referencing old packages.”
Core Features: Three Actions¶
The README summarizes the capabilities into the three items corresponding to the table below (names and timing are subject to the repository documentation).
| Action | Timing | Purpose |
|---|---|---|
| Contract scan | Anytime / Post-upgrade | Offline, second-level: Checks against the KNOWN_RULES catalog to scan installed plugins for violations of known breaking contracts (removed/renamed services, the source shape of session message v4, references to non-existent exports in the host ui-primitives, etc.) |
| Preflight | Pre-upgrade | Online, approx. 10–40 seconds: Checks each plugin’s declared compatibility range, latest npm version, and support for the target host version. Outputs “can upgrade, who needs coordinated upgrades, who should be disabled first.” |
| Boot smoke | Before port switching | Approx. 30–90 seconds: Starts a temporary host on a test port, reads the startup summary (SKIPPED / DEGRADED / PENDING, etc.), probes the reachability of each client bundle, and terminates the test process upon completion. |
The rule types for contract scanning are maintained in KNOWN_RULES within lib/guard.mjs. The categories listed in the documentation include: removed-service, session-source-v4, missing-host-export, pinned-exact. New incidents are handled by “adding a rule” to expand the catalog, rather than generalized guessing.
Installation and Activation¶
Refer to the GitHub README for installation commands. The typical Web profile path is as follows (PowerShell example):
cd $env:USERPROFILE\.dsh\profiles\web
pnpm add github:wqx11235/dsh-upgrade-guard
Then, in that profile’s package.json, add "dsh-upgrade-guard" to dsh.profile.bundles.
If there is no network, you can manually place the entire repository at %USERPROFILE%\.dsh\profiles\web\node_modules\dsh-upgrade-guard and similarly add it to dsh.profile.bundles. For the desktop client, replace web in the path with desktop.
After completing dependency installation and bundle registration, restart the host, force refresh the page, and open Settings → General → Upgrade Guard in the UI.
Note: This article does not provide git clone or dsh plugin add commands constructed with the plugin name; please refer to pnpm add github:wqx11235/dsh-upgrade-guard in the README.
Typical Usage¶
Graphical Interface¶
Path: Settings → General → Upgrade guard. The three buttons correspond to the three capabilities mentioned above; the footer indicates the host version, runtime, and ui-primitives source on which the results are based, avoiding misjudgment of whether an export exists when “the primitives copy on disk is inconsistent with the running host.”
- Contract scan: Summary is in the form of
critical N / warn N (scanned M plugins), with a list of findings. - Preflight: Summary includes target version, number of plugins, and number of updates available, along with a list.
- Boot smoke:
PASS/FAIL, accompanied by key lines (e.g.,ROOT?,PENDING,SKIPPED,DEGRADED,BADBUNDLE).
Command Line (Same Engine)¶
Console output is deliberately in English/ASCII (to avoid UTF-8 Chinese garbling under Windows cmd code page 936); Chinese reports are written to the file specified by --report (default directory is $DSH_HOME/upgrade-guard/).
node lib/guard.mjs scan --json --report scan.md [--profile <dir>] [--primitives <dir>]
node lib/guard.mjs preflight --json --report preflight.md --target 0.1.8-rc.1 [--no-network]
node lib/guard.mjs smoke --bin <.../dsh/lib/bin.js> --cwd <dir> --port 3099 --timeout 120 [--keep]
Common environment variables: DSH_HOME (default ~/.dsh), DSH_PROFILE, DSH_PRIMITIVES, DSH_SMOKE_BIN, DSH_SMOKE_PORT, DSH_SMOKE_CWD, DSH_SMOKE_TIMEOUT, DSH_SMOKE_KEEP=1.
HTTP API¶
The host registers POST /api/dsh-upgrade-guard. README examples:
{ "action": "status" }
{ "action": "scan" }
{ "action": "preflight", "target": "latest" }
{ "action": "smoke", "port": 3099 }
Returns path and host info, scan statistics and report path, preflight row data, smoke conclusion and report path respectively (fields depend on the actual response).
Use Cases and Limitations¶
Who it is for: Maintainers who frequently upgrade the DSH core on standalone machines or in team environments and have a large number of community plugins mounted in their profiles; those who want to see red flags at the startup chain and bundle level before “changing the production port.”
Execution Permissions: The plugin runs with the same process privileges as the current DSH host. Please review the source code and MIT License on the GitHub repository before installation. Do not enable smoke tests or preflight directly in a production environment without checking (preflight accesses the npm registry).
Limitations explicitly stated in the documentation (excerpt):
- Smoke tests only cover the startup phase (plugin tree loading, service dependencies, client bundle reachability); rendering-time errors (e.g.,
Minified React error #130caused by primitives renaming) must be caught by contract scanning. - Contract scanning only covers known catalogs; completely new types of breaks are invisible until rules are added.
- Preflight requires access to npm; plugins installed from git/url cannot be automatically compared for new versions and will be marked for manual review.
- Being skipped by the host’s peer compatibility gate (
SKIPPED) does not mean a crash; reinstallation often requires explicit exemptions such asdsh plugin allow-version. - Under the packaged desktop runtime (entry point inside
app.asar), smoke tests will reportUNSUPPORTEDand provide alternative instructions rather than failing silently.
Regarding the ecosystem, DSH emphasizes “Everything is a plugin”; SkillHub is a community directory site and has no official affiliation with DeepSeek / High-Flyer. The current GitHub stars for the repository are 2 (subject to the directory page/repository page).
Conclusion¶
Through the steps above, you can use Preflight to see the plugin matrix clearly before upgrading DSH, use Contract scan to sweep known contracts after upgrading, and use Boot smoke to confirm that the startup summary has no hidden PENDING root causes before switching ports. For more information, see the directory page wqx11235/dsh-upgrade-guard and the source code github.com/wqx11235/dsh-upgrade-guard (includes Chinese documentation README.zh.md).