dsh-auto-upgrade
扫描 DSH 及插件更新,在隔离目录验证候选版本,并提供切换与回滚流程。 适合 Windows 用户维护 DSH 及插件版本;目前支持扫描、候选验证和可回滚切换,定时无人值守升级尚未实现。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:neo805/dsh-auto-upgrade說明文件
閱讀完整 README ↗dsh-auto-upgrade
English | 中文
Version: 0.1.1-rc.2 (tested on DSH 0.2.1-rc.2) · Changelog · Requirements · Plan
A DSH (DeepSeek Harness) bundle that scans your installed profiles for updates, stages the update in an isolated home, gates it, and then switches by two directory renames — with a rollback that needs no network and no reinstall.
Work in progress. This is
0.1.x: the read-only scan, the candidate pipeline and the reversible switch work today; the parts that make it fully unattended (functional probe matrix, dual-end orchestration, scheduled self-upgrade) are planned but not implemented yet. The table below is the honest state, not the aspiration.
What works today
| Area | State |
|---|---|
| Read-only scan: per-profile dependency inventory, source classification (npm / file / link / git), engine + peer gate, snapshot, report, root entry file | ✅ |
Candidate build in an isolated home (own node_modules), dump gate, isolated boot gate | ✅ |
| Switch (two renames), rollback (reverse rename), commit; recovery-intent record before the first rename | ✅ |
Executor deployment: scripts/ copied to $DSH_HOME/auto-upgrade/scripts/ on mount | ✅ |
| Functional probe matrix (tool-level A/B diff against the live profile) | ⏳ planned (M2) |
| Dual-end orchestration: verify on Web first, then prepare Desktop | ⏳ planned (M3) |
| Self-update chain + scheduled duty session (automation task) | ⏳ planned (M4) |
| Installing a plugin that is not installed yet; natural-language config | ⏳ planned (M5) |
Tested end to end on Web with two real upgrades (clearai-dsh 0.5.5 → 0.5.6 and
@changfenhuang/dsh-genui 0.13.0 → 0.14.0, one at a time), each followed by a host
restart and a health check. The Desktop side is not covered yet.
Requirements
- Windows 10/11 with PowerShell 7.
- A DSH install whose profile you want to maintain (developed and tested against
0.2.1-rc.2;engines.dshis `>=0.2.0-rc.1 -DryRun pwsh -File $DSH_HOME\auto-upgrade\scripts\Invoke-AutoUpgradeSwitch.ps1 -TxnId -Confirm
5) keep it, or go back
pwsh -File $DSH_HOME\auto-upgrade\scripts\Invoke-AutoUpgradeSwitch.ps1 -TxnId -Commit pwsh -File $DSH_HOME\auto-upgrade\scripts\Restore-AutoUpgrade.ps1 -TxnId
The switch does **not** stop the host for you: a running DSH keeps its files open, so
stop it first (on this machine: stop `dsh web`, run
`$DSH_HOME\DSH-Hidden-Launcher.vbs` afterwards). A failure inside the switch compensates
back to the previous state; nothing is ever deleted.
## How it is put together
| Layer | What it does | Why there |
|---|---|---|
| **Bundle** | one `insert` row, a ~110-line skill registrar | ships, enables and disables like any plugin, and can be removed completely |
| **Skill** | judging: compatibility, safety, overlap, local forks; a user-only apply gate | knowledge that has to be rewritten every release |
| **Scripts** | scan, snapshot, gates, promote, roll back | deterministic, offline, zero tokens |
The registrar imports **nothing** from `@deepseek-ai/*`; the skills registry is reached
through `inject: ["skills"]` only. That is deliberate: a helper plugin must not be the
thing the version gate rejects on upgrade day.
## What the gates actually check
- `dsh --profile
--dump-default-config` — the bundle layer only, so a broken user
patch layer cannot block it. Exit code plus `patch: entry … not found` warnings.
- Every `engines.dsh` and every `@deepseek-ai/dsh-*` peer, resolved against the version
the host actually ships. A peer that is not on disk is reported as *not resolvable*
(client-side packages are bundled into the web client, so absence is not proof of
removal) — it does not become a false failure.
- An isolated boot on `--port 0`: parse the printed URL, probe it, treat `401` as alive
(the Web surface authenticates by cookie), kill the whole process tree, time out.
- A missing declaration is `unknown`, not a defect: recorded, never queued.
## Safety and degradation
- A scan changes nothing outside `$DSH_HOME/auto-upgrade/` (plus one entry file).
- The switch moves the live profile into `quarantine//original` instead of deleting
it, and writes a durable recovery-intent record before the first rename; a crash in
between is replayable.
- Candidate and live must be on the same volume, so the swap stays atomic.
- The registrar deploys the executors outside the package, so a self-upgrade of the
bundle cannot delete the thing doing the upgrading.
- No UI, ever: everything is configured by asking the agent in a session.
## Known limits
- `0.1.x` covers one plugin at a time; DSH-core upgrades and the Desktop half are not
automated yet (M2/M3).
- Functional regression detection is composition-level today (gates + evidence); a
tool-level A/B probe matrix is not implemented.
- Windows only. Candidate builds need `pnpm` and, unless the store is warm, network.
- Not published to npm yet: install from the tarball.
## Authorship & maintenance
- **Authors by version range**
- `0.1.0` – present: **DeepSeek-V4.1-Flash-1017** (AI model, through DeepSeek Harness).
- **Producer / repository owner**: KEI.NEO (@neo805) — the human publisher responsible
for this repository.
- **Maintenance scope**: a personal hobby (vibe-coding) project, published for sharing.
**No maintenance or updates are promised in response to external demand.**
- **Contribution policy**: this repository has **Issues disabled and does not accept Pull
Requests**. Forks are welcome under the MIT license.
- **Disclaimer**: the software is provided "as is", without warranty of any kind (see
LICENSE). Evaluate it yourself before production use.
## Thanks & license
MIT. The candidate-transaction vocabulary (staged / quarantined / promoted / rolled
back) follows [@linxin666/dsh-doctor](https://github.com/zhu1090093659/dsh-web)
(BSD-3-Clause), re-implemented in PowerShell; the skill-registrar shape follows the
official `@deepseek-ai/dsh-skill-badge` (MIT); `dsh-plugin-guide`, `dsh-plugin-check` and
`awesome-dsh-plugin-feed` were used as references for the judging knowledge, the registry
check and the update feed.