dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
在 DeepSeek Harness 升级后自动巡检已安装插件的兼容性,修复或禁用不兼容插件;宿主启动失败时由宿主外 supervisor 救援,必要时回滚到上一个宿主版本。
English | 中文
A compatibility guard for DeepSeek Harness upgrades.
dsh-upgrade-guard watches the DSH host version. When it changes, the guard audits every installed plugin against the new host, then (with your confirmation) repairs, updates, disables, or rolls the host back — so a single incompatible community plugin cannot leave you with a harness that refuses to boot.
DSH is in developer preview and ships compatibility-breaking changes. This plugin exists because that is the expected failure mode, not an edge case.
engines.dsh and peerDependencies against the resolved host/core versions, with the ecosystem's directional policy (below-min and explicit upper bounds are risks; implicit caret ceilings are warnings).cordis.patch.yml, with a one-click dedupe (backed up first).dsh.compat.probe; the guard runs it in an isolated child process and reports pass/fail.@latest), installs it, otherwise repairs the local install, otherwise disables the plugin.sudo, no npm.Three parts, one package:
| Part | Where | Responsibility |
|---|---|---|
| Host plugin | DSH profile bundle | Version baseline, scans, remediation, HTTP API, settings namespace |
| Client UI | DSH web client | Settings panel, plugin cards, status switches, overlay alerts |
| Supervisor | detached Node process | Adopts the host, snapshots host versions, rescues crashes, rolls back, performs restarts |
State lives under ~/.dsh/upgrade-guard/.
cordis.patch.yml for duplicate top-level - id: entries and stale patch targets reported by dsh --dump-config; the panel shows a "composition diagnostics" block with a dedupe action (keeps the last entry, backs up first).dsh-market is installed, the guard reads its read-only diagnostics endpoint and merges duplicates / stale targets / multi-version / peer mismatches into the same block. An unavailable or unauthorized market is skipped without affecting the audit.{
"dsh": {
"compat": {
"probe": { "file": "./lib/probe.js", "export": "probe", "timeoutMs": 20000 }
}
}
}
// lib/probe.js — ctx: { hostVersion, profile, dshHome, pluginDir }
export async function probe(ctx) {
const ok = await checkSomethingAgainst(ctx.hostVersion)
return { ok, message: ok ? 'ok' : 'why it is incompatible' }
}
dsh plugin --profile web add \
https://github.com/zzy6-a/dsh-upgrade-guard/releases/download/v0.2.0/dsh-upgrade-guard-0.2.0.tgz
Or download the .tgz from the Releases page and install the local file:
dsh plugin --profile web add /path/to/dsh-upgrade-guard-0.2.0.tgz
dsh plugin --profile web add dsh-upgrade-guard
dsh plugin --profile web add link:/path/to/dsh-upgrade-guard
Then restart DSH once (设置 → 升级守卫 → 重启 DSH, or your usual launcher). The guard mounts as a profile bundle and keeps itself loaded on later boots.
pnpm install, rebuild when declared), elsedisabled override into cordis.patch.yml (recoverable from the panel).If the tree fails to load, no host-side plugin can help — that is what the detached supervisor is for:
failed to apply loader entry <entry> (<package>).dsh --dump-config (read-only), backs up the patch file, writes disabled: true, and relaunches.~/.dsh/upgrade-guard/host-snapshots/<version>/ and reports the rollback.incidents/ and surfaced in the UI on the next successful boot.Snapshots are full copies of the host package directory (~300 MB each, latest two kept).
In Settings → Plugins → Plugin configuration the guard exposes a card with:
cordis.patch.yml accepts the composition-layer defaults:
- id: dsh-upgrade-guard
config:
autoScanMs: 0 # periodic scan interval, 0 = only on boot/upgrade/manual
supervisor: true # out-of-host rescue / rollback / restart
snapshotHost: true # keep host snapshots for rollback
Loopback and same-origin guarded:
GET /dsh-upgrade-guard/api/statePOST /dsh-upgrade-guard/api/checkPOST /dsh-upgrade-guard/api/repair { name?, dryRun? }POST /dsh-upgrade-guard/api/toggle { name, enabled }POST /dsh-upgrade-guard/api/uninstall { name, allowSelf? }POST /dsh-upgrade-guard/api/config { enabled?, autoScan? }POST /dsh-upgrade-guard/api/patch-fix (dedupe patch entries; returns the backup dir)POST /dsh-upgrade-guard/api/restartPOST /dsh-upgrade-guard/api/alert/ack | alert/ack-all>= 0.1.5-rc.1>= 22.19windowsHide), and kills process trees with taskkill /PID <pid> /T /F when restarting.~/.dsh/upgrade-guard/.npm install
npm run typecheck
npm test
npm run build # host: tsc -> lib, client: tsdown -> lib/client.js
npm pack # produces dsh-upgrade-guard-<version>.tgz
The supervisor source is scripts/supervisor.mjs; it is copied into lib/ during build.
cordis.patch.yml, and it runs package-manager commands during remediation. Every write is backed up first under ~/.dsh/upgrade-guard/backups/.