dsh-drydock 1.1.0-rc.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +64 -303
- package/README.md +126 -282
- package/bin/drydock-doctor.mjs +307 -0
- package/bin/drydock-modules.mjs +140 -0
- package/bin/drydock-update.mjs +362 -0
- package/bin/dsh-boot.cmd +4 -0
- package/bin/dsh-boot.mjs +215 -11
- package/bin/open-boot.mjs +692 -70
- package/bin/rescue-daemon.mjs +78 -5
- package/lib/aggregate.js +95 -11
- package/lib/boot-snapshot.mjs +202 -0
- package/lib/bundles-official.mjs +370 -0
- package/lib/capabilities.mjs +215 -0
- package/lib/client.js +8 -8
- package/lib/diagnostics.mjs +1846 -0
- package/lib/downloader.js +439 -42
- package/lib/enginectl.mjs +442 -21
- package/lib/envprobe.mjs +942 -0
- package/lib/host-profile.mjs +217 -0
- package/lib/host-registry.mjs +159 -0
- package/lib/index.js +1067 -216
- package/lib/remote.js +47 -5
- package/lib/rescue-profile.mjs +1330 -0
- package/lib/rescue.js +20 -3
- package/lib/self-update.mjs +481 -0
- package/lib/sources.mjs +179 -0
- package/lib/watchdog.mjs +263 -0
- package/package.json +28 -5
package/README.en.md
CHANGED
|
@@ -1,342 +1,103 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center"><img src="docs/images/logo.svg" width="88" height="88" alt="DSH engine drydock"></p>
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> statements such as "current version 0.9.1" / "latest on npm" describe the time of writing.
|
|
5
|
-
> The working copy is **1.0.0** (npm package renamed to **`dsh-drydock`**; the old name `dsh-plugin-manager-pro` will get a deprecation notice but will not be deleted); the current Chinese README is [README.md](README.md), the full v0.9.1-era Chinese text is [docs/README-full.md](docs/README-full.md), and the release process is [docs/RELEASING.md](docs/RELEASING.md).
|
|
3
|
+
# DSH engine drydock (dsh-drydock)
|
|
6
4
|
|
|
7
|
-
> A
|
|
8
|
-
|
|
9
|
-
   
|
|
10
|
-
|
|
11
|
-
> Community plugin — not an official DSH package. npm: `dsh-drydock` (formerly `dsh-plugin-manager-pro`, which will be marked deprecated but not deleted) · GitHub: [nonentity303/dsh-drydock](https://github.com/nonentity303/dsh-drydock) · Cross-platform (Windows / macOS / Linux).
|
|
5
|
+
> **When the engine won't start, it is still there.** A **boot-time reliability toolchain** for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness): standalone processes and ports for pre-boot self-check, broken-plugin quarantine and engine rescue (3081 / 3082), plus a tidy plugin manager.
|
|
12
6
|
>
|
|
13
|
-
> **
|
|
14
|
-
> Check what is published any time with `npm view dsh-drydock version`; tags: <https://github.com/nonentity303/dsh-drydock/tags>.
|
|
15
|
-
> ⚠️ A brand-new release is blocked by pnpm's 24 h cool-down (`minimumReleaseAge`) — pin the version explicitly if it does not install (see "Install" below).
|
|
16
|
-
|
|
17
|
-

|
|
18
|
-
|
|
19
|
-
<sub>**Figure 1** · the 0.9 standalone plugin page (captured in an isolated rehearsal environment on DSH **0.1.7-rc.2**, 2026-09-28): the sidebar entry "Plugin manager" and the five section tabs — Official built-ins (optional) · All plugins · Market · Operations & scenarios · Maintenance. Source image: `docs/images/pm-090-official2.png`.</sub>
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## 🧭 Why this manager exists: the official page does the basics, this one covers the rest
|
|
24
|
-
|
|
25
|
-
Since DSH **0.1.6** the plugin manager is part of the engine itself: a host service `@deepseek-ai/dsh-plugin-manager` (a new `id: plugin-manager` row in the `dsh-base` bundle) plus a client page `@deepseek-ai/dsh-client-ui-plugin-manager`.¹³
|
|
26
|
-
|
|
27
|
-
This manager is not "one more plugin list". It **takes over that page and adds what the official one does not do**: a complete install/uninstall loop (impact preview → transactional uninstall → rollback on failure → one-click undo), operation history and named scenarios, and **rescue when the engine itself will not start**.
|
|
28
|
-
|
|
29
|
-
### Capability comparison
|
|
30
|
-
|
|
31
|
-
| Capability | Official built-in page (DSH 0.1.7) | LX2000WASD/dsh-web-plugin-manager (**discontinued**) | This manager (0.9.1) |
|
|
32
|
-
|---|---|---|---|
|
|
33
|
-
| Starts on DSH 0.1.7 | ✅ shipped with the engine | ❌ breaks the profile since 0.1.6 (loader entry id collision)¹ | ✅ verified on 0.1.7-rc.2: rehearsal + clean-environment install⁴ |
|
|
34
|
-
| Transactional uninstall (impact preview → backup → remove → pre-boot self-check → rollback) | ❌ only bundle layer add/remove (`installBundle` / `removeBundle`); no preview, no undo³ | ⚠️ can uninstall (incl. bundles) but **not transactionally**: failures only say "restart to take effect", recovery means editing `cordis.patch.yml` by hand¹ | ✅ full loop, plus **one-click undo**⁴ |
|
|
35
|
-
| Automatic rollback | ⚠️ restores profile files when a bundle install/remove fails³ | ⚠️ quality gate + rollback for install/update; **none for uninstall**¹ | ✅ rollback on uninstall *and* on "auto-install from the downloads folder"⁴ |
|
|
36
|
-
| Standalone rescue (works when the engine is down) | ❌ the rescue page is served by the engine, so it dies with it⁵ | ❌ no standalone daemon/launcher; its own "known limitations" say the auto-restart chain can hang and needs manual recovery¹ | ✅ 3081 launcher + 3082 rescue service, independent of the main process⁴ |
|
|
37
|
-
| Operation history / undo | ❌ | ❌ not in its feature list or CLI¹ | ✅ last 20 operations, one-click undo⁴ |
|
|
38
|
-
| GitHub Releases | — (released with the engine) | **0** | **11** (incl. v0.9.0 with a tgz asset)² |
|
|
39
|
-
|
|
40
|
-
**Sources** (each one verifiable):
|
|
41
|
-
|
|
42
|
-
1. Competitor README (announcement + feature list + known limitations + CLI): <https://raw.githubusercontent.com/LX2000WASD/dsh-web-plugin-manager/master/README.md> (mirror if raw is unreachable: <https://cdn.jsdelivr.net/gh/LX2000WASD/dsh-web-plugin-manager@master/README.md>) · repo <https://github.com/LX2000WASD/dsh-web-plugin-manager>. It contains `TypeError: duplicate loader entry id: plugin-manager` and "do not install on 0.1.6-alpha.2 or later".
|
|
43
|
-
2. GitHub API, measured 2026-10-03: competitor `releases` → `[]` (<https://api.github.com/repos/LX2000WASD/dsh-web-plugin-manager/releases>); this repo → **11** releases, latest `v0.9.0` (2026-09-30) with asset `dsh-plugin-manager-pro-0.9.0.tgz` (<https://api.github.com/repos/nonentity303/dsh-drydock/releases>).
|
|
44
|
-
3. Official page capability surface (0.1.7-rc.2) = the 12 remote methods of `@deepseek-ai/dsh-plugin-manager`: `listPlugins` / `listBundles` / `registries` / `inspect` / `setPluginEnabled` / `setBundleEnabled` / `installBundle` / `waitForInstall` / `cancelInstall` / `removeBundle` / `listVersionExemptions` / `setVersionExemption` (<https://www.npmjs.com/package/@deepseek-ai/dsh-plugin-manager>); the page itself is <https://www.npmjs.com/package/@deepseek-ai/dsh-client-ui-plugin-manager>. There are **no** impact preview, history/undo, scenarios or rescue methods.
|
|
45
|
-
4. This repository: `cordis.patch.yml` (disable the built-in page, insert our own row id), `lib/index.js` (uninstall transaction, history, sidecar), `bin/rescue-daemon.mjs` · `bin/open-boot.mjs` · `bin/dsh-boot.mjs` (matching `package.json` `bin`); 0.1.7-rc.2 evidence in `docs/releases/RELEASE_NOTES_0.8.3-1.md` and `docs/releases/0.9.0.md`.
|
|
46
|
-
5. `/rescue` is registered by **our host code** through the engine's `webServer` — hence it dies with the engine. That is exactly why the standalone services exist (`bin/rescue-daemon.mjs` header, [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)).
|
|
47
|
-
|
|
48
|
-
### "Why the old manager died" — and why this one is alive
|
|
49
|
-
|
|
50
|
-
Since DSH 0.1.6 a third-party manager hits the same wall: **declare a loader entry id that the official bundle already uses and the profile crashes on startup**:
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
TypeError: duplicate loader entry id: plugin-manager
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
The leading competitor [LX2000WASD/dsh-web-plugin-manager](https://github.com/LX2000WASD/dsh-web-plugin-manager) (measured 2026-10-03: 68 stars / 3 forks / last push 2026-09-20 / **0 releases**) left the field that way: in 2026-09 it announced end-of-maintenance on its README front page ("for DSH <= 0.1.5-rc.2", "**do not install on 0.1.6-alpha.2 or later**").¹
|
|
57
|
-
|
|
58
|
-
**This manager hit the same pit and survived** — by not fighting over the id:
|
|
59
|
-
|
|
60
|
-
| What it does | Where |
|
|
61
|
-
|---|---|
|
|
62
|
-
| ① Disable the built-in page row: `- id: ui-plugin-manager` / `disabled: true` | `cordis.patch.yml` (in the package) |
|
|
63
|
-
| ② Insert its own row with its own id `drydock` — **never the official `plugin-manager`** | `cordis.patch.yml` |
|
|
64
|
-
| ③ Register into `main` (key=`plugins`) and `sidebar.panellist` (id=`plugins`) and declare the 7 `plugins.*` child slots the built-in page used to own (so third-party config cards have a real home) | `src/client.jsx` |
|
|
65
|
-
|
|
66
|
-
Verified on **DSH 0.1.7-rc.2**: the engine boots cleanly, the sidebar shows "Plugin manager" and all five sections — that is Figure 1.
|
|
67
|
-
|
|
68
|
-
> **Which version should I install?** DSH **0.1.6 or later → 0.9.1** (to try the pre-release: `npm i dsh-plugin-manager-pro@next` = **0.9.1-rc2**, shipped under the `next` dist-tag, does not move `latest`); **old engines (before 0.1.6) → 0.8.2**. Full matrix under "Requirements".
|
|
69
|
-
|
|
70
|
-

|
|
71
|
-
|
|
72
|
-
<sub>**Figure 2** · the **impact preview** of a transactional uninstall (rehearsal environment, 2026-09-28): what will be removed and what is affected, before `package.json` is touched; the same "diagnostics" card also carries the rescue entries (`Repair engine` / `Restart engine` / `Pre-boot self-check` / `auto-quarantine failing plugins`). Source image: `docs/images/pm4-uninstall-preview.png`.</sub>
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## ✨ Highlights
|
|
77
|
-
|
|
78
|
-
- **Standalone plugin page** (v0.9.0): a first-level sidebar entry "Plugin manager" instead of a tab inside Settings — see plugins, install, **configure**, uninstall and rescue on one page, in five sections: **Official built-ins (optional) · All plugins · Market · Operations & scenarios · Maintenance**.
|
|
79
|
-
- **Third-party config entries have a home** (v0.9.0): after taking over the built-in page, plugin-registered config cards still work — one summary line in the row, and the plugin's own full config card when expanded.
|
|
80
|
-
- **Transactional uninstall** (v0.8): impact preview (dependents / entries / toggle rows) → backup → remove → pre-boot self-check → **automatic rollback on failure**; **one-click undo** afterwards.
|
|
81
|
-
- **Operation history + scenarios** (v0.8): the last 20 operations are undoable; save a plugin combination as a named scenario and switch with a change preview.
|
|
82
|
-
- **Rescue decoupled from the engine** (v0.7+): with the engine down, the **3081 launcher (with a built-in rescue page) and the 3082 rescue service** still self-check, repair and start it.
|
|
83
|
-
- **Browser as launcher**: set your home page to `http://127.0.0.1:3081/` (`http://localhost:3081/` works the same way) — opening the browser runs self-check → repair → start → jumps to the main UI.
|
|
84
|
-
- **Local write endpoints are guarded** (v0.9.1): same-origin `Origin` (same-host, same-port allowlist: `127.0.0.1` / `localhost` / `[::1]`) + one-time token + single-flight, so a third-party page cannot start/stop anything; `--status` also appends a `health.log` line (7 days / 1000 lines).
|
|
85
|
-
- **Multi-source update aggregation**: npm registry / dshfind / GitHub / custom mirrors queried in parallel, with rate-limit circuit breaking and the highest version winning.
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## 📋 Feature overview (v0.9.1)
|
|
90
|
-
|
|
91
|
-
### Plugin page (sidebar "Plugin manager")
|
|
92
|
-
|
|
93
|
-
Five sections, switching keeps your scroll position:
|
|
94
|
-
|
|
95
|
-
| Section | Contents |
|
|
96
|
-
|---|---|
|
|
97
|
-
| **Official built-ins (optional)** | Engine-provided bundles that are disabled by default (one-click enable/disable) + official plugins with their own config page + version exemptions |
|
|
98
|
-
| **All plugins** | Plugin list: search, collapsible groups, origin filter, enable/disable, inline config, inline uninstall, version & origin, manual origin override |
|
|
99
|
-
| **Market** | dshfind curated catalog (browse by category / search / sort), one-click install; falls back to GitHub search when offline |
|
|
100
|
-
| **Operations & scenarios** | Transactional uninstall with impact preview, **pre-uninstall health check**, operation history undo, scenarios |
|
|
101
|
-
| **Maintenance** | Update sources, pre-boot self-check, rescue center entries, downloads folder |
|
|
102
|
-
|
|
103
|
-
### Plugin list
|
|
104
|
-
|
|
105
|
-
- **Collapsible groups** by necessity (🔴 required / 🟡 recommended / 🟢 optional) with enable counters and update badges; search expands automatically.
|
|
106
|
-
- **Origin classification**: built into the architecture vs user-installed (`dsh plugin add` / market), with filter chips and row badges.
|
|
107
|
-
- **Manual origin override** per row (npm / GitHub / local / built-in), persisted.
|
|
108
|
-
- **Status at a glance**: 🔴 error/needs attention · 🟡 update available · ⚪ disabled · 🟢 enabled, plus name, summary, necessity, installed→latest version, origin and a toggle.
|
|
109
|
-
- **Automatic one-line summaries** from a built-in catalog, or from `README.zh.md` / `package.json.description` / `README.md`.
|
|
110
|
-
- **Architecture protection**: rows the web layer deliberately disables (e.g. `tool-fs`) and UI skeleton plugins cannot be toggled (🔒 with a reason).
|
|
111
|
-
- **Third-party config cards** (v0.9.0): entries registered through `plugins.row.config` (per row) and `plugins.bundle.config` (per bundle) are rendered inline; plugins without a config registration get no empty button.
|
|
112
|
-
|
|
113
|
-
### Transactional uninstall, history and scenarios
|
|
114
|
-
|
|
115
|
-
- **Impact preview**: dependents (reverse `dependencies` / `peerDependencies` graph), entries to be removed, toggle rows to be cleaned, bundle declarations.
|
|
116
|
-
- **Pre-uninstall health check** (v0.9.1): a verdict line (**safe / caution / risky** + one-line reason) and three checks — ① broken dependencies (high for `dependencies`/`peerDependencies`, info for optional/recommended; downgraded when the dependent is itself depended on) ② **patch residue** in `cordis.patch.yml` (report only — never auto-deleted) ③ **service / port conflicts** (`dsh.services` / `service` / `provides` / `ports`).
|
|
117
|
-
- **The transaction**: back up `package.json` + `cordis.patch.yml` (`.rescue-bak-*`) → `pnpm remove` + drop bundles/toggle rows → run the pre-boot self-check → **roll back on any failure** (restore backups + reinstall dependencies). Directories locked by Windows are queued in `pendingRemovals` and retried on the next start.
|
|
118
|
-
- **Before uninstalling the manager itself**, the package's own `bin/open-boot.mjs --uninstall` is called first (older versions have no such flag → recorded as "skipped", never blocking).
|
|
119
|
-
- **Operation history**: the last 20 operations (uninstall / toggle / quarantine / scenario / reset), one-click undo, persisted across restarts.
|
|
120
|
-
- **Scenarios**: save the current enable/disable state under a name and apply it later, with a change preview first.
|
|
7
|
+
> The official page and plugin markets handle **getting plugins in**; the drydock handles **what happens afterwards** — undo a bad install, rescue a dead engine. *It fixes this boot; we fix why the next one would break.*
|
|
121
8
|
|
|
122
|
-
|
|
9
|
+
 
|
|
10
|
+
   
|
|
123
11
|
|
|
124
|
-
-
|
|
125
|
-
- **Circuit breaking**: GitHub API 403/429 cools down for 10 minutes; full refresh runs 8 concurrent queries and results are cached for 30 minutes (a cache hit returns instantly; refresh duration depends on your network and the number of enabled sources).
|
|
126
|
-
- **Download order**: ① native browser download (hidden iframe, capturable by download managers) → ② external downloader → ③ built-in fallback (HTTP / aria2c / P2P magnet·torrent).
|
|
127
|
-
- **Auto-install from the downloads folder**: drop `.tgz` / `.tar.gz` into `$DSH_HOME\downloads`; manifest validation + pre-boot self-check, rollback on failure and a `.failed` stamp so it is not retried forever.
|
|
128
|
-
|
|
129
|
-
### Market
|
|
130
|
-
|
|
131
|
-
- Catalog endpoint `https://awesome-dsh-plugin.com/plugins.json` (`CATALOG_URL` in `lib/index.js`) with localized descriptions / stars / categories; entry count changes upstream; 10-minute host cache. Falls back to GitHub `topic:dsh-plugin` search when offline.
|
|
132
|
-
- **Zero round-trips**: the catalog is fetched once; search / category chips / sort / paging happen client-side.
|
|
133
|
-
- **One-click install**: npm-backed entries install straight from the registry; GitHub repos go through the built-in downloader; two-step confirmation; ✓ badge when installed.
|
|
134
|
-
- **Post-install validation**: `dsh.bundle` / `dsh.client` manifests are verified and rolled back if broken; pnpm hoist drift and `minimumReleaseAge` traps are recovered automatically.
|
|
135
|
-
|
|
136
|
-
### Rescue
|
|
137
|
-
|
|
138
|
-
- **Standalone rescue page `/rescue`**: self-contained HTML that talks straight to the host gateway, usable even when the UI is broken (diagnose / quarantine / repair / restart / uninstall).
|
|
139
|
-
- **Floating rescue button** (🛟, bottom right) as an entry point when the settings page is broken.
|
|
140
|
-
- **Auto-quarantine**: optional (**off by default**) and only for plugins that fail repeatedly; UI skeleton and infrastructure entries are protected and never disabled automatically.
|
|
141
|
-
- **Pre-boot self-check**: `verifyProfile` / `fixProfile` — broken bundles can take the engine down at boot; one-click check and quarantine repair.
|
|
142
|
-
- **Runtime quarantine**: when a plugin is incompatible with the engine, the loader can take the whole tree down (a static check cannot see it) — open-boot / rescue-daemon / dsh-boot parse the boot log, quarantine the failing entry and retry; quarantine rows are backed up and reversible.
|
|
143
|
-
|
|
144
|
-

|
|
145
|
-
|
|
146
|
-
<sub>**Figure 3** · the rescue side (same rehearsal environment, 2026-09-28): the "diagnostics" card in Maintenance with `Repair engine`, `Restart engine`, `Pre-boot self-check`, `auto-quarantine failing plugins`, and the list of uninstallable profile dependencies. Source image: `docs/images/pm-maintenance-rescue.png`.</sub>
|
|
147
|
-
|
|
148
|
-
### 🧰 Standalone rescue toolchain
|
|
149
|
-
|
|
150
|
-
> A classic rescue page is registered by the engine — **when the engine is down, so is the rescue page**. Since v0.7 the rescue capability runs independently of the main process. No new dependencies (plain Node + the existing `yaml`).
|
|
151
|
-
|
|
152
|
-
| Tool | What it does | Usage |
|
|
153
|
-
|---|---|---|
|
|
154
|
-
| `bin/open-boot.mjs` | **The single web entry + resident supervisor** (3081): `/` is the "open the browser and it starts" page, **`/rescue` is the rescue page** (with `/rescue/api/*`). Set it as your home page (`127.0.0.1` / `localhost` / `[::1]` are equivalent as long as the port matches). It stays hidden and only pops a visible progress window when the engine really needs starting (`--no-window` disables that). Health = **HTTP handshake + identity fingerprint**; write endpoints are guarded by **Origin + one-time token**; `--uninstall` cleans everything (stop supervisor → remove autostart → remove shims → clear pid; exit codes 0 = completed / 1 = error / **2 = ownership unconfirmed** — nothing stopped, pid file kept) | `npx dsh-drydock` |
|
|
155
|
-
| `bin/rescue-daemon.mjs` | **Independent backup rescue service** (default port **3082**): self-contained rescue page + `verify/fix/start/stop/status` API, no engine dependency. `stop` first verifies pid and port ownership (`{"force":true}` to force). **No longer competes with the 3081 launcher** (an occupied port is a hard error, never a silent port shift) | `npx dsh-drydock-rescue` |
|
|
156
|
-
| `bin/dsh-boot.mjs` / `.cmd` | **Steam-style boot sequence**: verify → auto-quarantine broken plugins → start → wait for health. `--repair-only` (self-check + repair only, no start), `--pause`, `--help`; exit codes 0 = ready / 1 = failed to start / 2 = repair incomplete. Immediate failures (bad command, port conflict) return at once with the absolute log path | `npx dsh-drydock-boot` (double-clickable equivalent on Windows: `bin\dsh-boot.cmd` inside the package) |
|
|
157
|
-
|
|
158
|
-
#### Resident launcher and autostart
|
|
159
|
-
|
|
160
|
-
| Command | Effect |
|
|
161
|
-
|---|---|
|
|
162
|
-
| `npx dsh-drydock --supervise [--interval 60] [--heartbeat-min 10]` | **Resident supervisor**: quietly keeps 3081 alive; a lock port (`port+1000`) guarantees a single instance; only a failed HTTP handshake triggers a start — healthy instances are never killed. Writes four kinds of log lines (state change / heartbeat / exit / uncaught exception) to `profile/open-boot-supervisor.log` |
|
|
163
|
-
| `npx dsh-drydock --ensure` | One-shot: make sure the port has this launcher (exit 0/1) |
|
|
164
|
-
| `npx dsh-drydock --status` | **Status self-check + health trail**: launcher (handshake + identity) / supervisor (lock port ownership) / engine (3080 handshake) / pid file / cwd / logs and last heartbeat; exit 0 = launcher healthy. Reports the occupying pid when the port belongs to someone else. **Appends a `health.log` line every run** (7 days / 1000 lines kept) |
|
|
165
|
-
| `npx dsh-drydock --install-autostart` | **Install autostart** (Windows): writes `HKCU\...\Run\DSHWebFront` plus `open-boot-autostart.vbs` (silent resident on login) and `open-boot-ui.vbs` (ensure 3081 then open the browser). The wrapper scripts are pure ASCII and self-resolve their path, so non-ASCII user names or profile paths with spaces no longer break |
|
|
166
|
-
| `npx dsh-drydock --uninstall-autostart` / `--autostart-status` | Remove / inspect autostart (shim presence, supervisor liveness, whether the port is this launcher). Idempotent (exit 0) when nothing is installed |
|
|
167
|
-
| `npx dsh-drydock --uninstall` | **Uninstall loop (R13)**: stop this profile's supervisor (three-fold ownership check: pid file + lock port `port+1000` + process image; refuses and never touches other processes) → delete **all** `DSHWeb*` Run values (including the legacy `DSHWebRescue`) → delete both `.vbs` shims → clear `.open-boot.pid` (logs kept). Exit codes: **0** = completed (including a confirmed "nothing to clean") / **1** = error / **2** = **ownership unconfirmed** (`netstat`/`tasklist` probes unavailable: no process stopped, pid file kept, never reports "uninstall complete"). Still idempotent; the engine on 3080 is left alone. The manager calls it before uninstalling itself |
|
|
168
|
-
| `npx dsh-drydock --help` / `npx dsh-drydock-boot --help` | Show usage (unknown flags are reported, not silently ignored) |
|
|
169
|
-
|
|
170
|
-
After installation the three commands come from the `bin` field of `package.json` (`dsh-drydock` / `dsh-drydock-boot` / `dsh-drydock-rescue`). `npx` works without installing, and you can always run the file inside the package (path is independent of cwd):
|
|
171
|
-
|
|
172
|
-
```sh
|
|
173
|
-
node "$DSH_HOME/profiles/web/node_modules/dsh-drydock/bin/open-boot.mjs" --status
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
- **Shared modules**: `lib/preflight.mjs` (standalone self-check/repair, same logic as the host's `verifyProfile`/`fixProfile`), `lib/enginectl.mjs` (engine probing/start/stop/pid management + the write-endpoint guards).
|
|
177
|
-
- **Troubleshooting**: engine will not start → ① open `http://127.0.0.1:3081/` (`http://localhost:3081/` is equivalent) → "check → repair → start"; ② `npx dsh-drydock-boot --repair-only` to see the quarantine list; ③ `npx dsh-drydock --status` for the real state of launcher/supervisor/engine plus the last `health.log` line; ④ interactive start with `npx dsh-drydock-boot`.
|
|
178
|
-
- **Full command/exit-code tables, the four `--uninstall` steps and a troubleshooting table**: [docs/LAUNCHER.md](docs/LAUNCHER.md). Architecture and slot contract: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
|
|
179
|
-
|
|
180
|
-
> **Health semantics and the safety of "stop engine"**: ready = **HTTP handshake succeeded and the response carries a DSH identity fingerprint** (a bare TCP listener is never considered healthy). So when 3080, 3081 or 3082 is occupied by something else, the tools **fail loudly instead of pretending to be ready** and never shift ports silently. `stopEngine()` runs three checks first (pid alive / process image is node·dsh / the port owner matches the recorded pid) and refuses otherwise, explaining why on the rescue page (a "force stop" button — or `POST /api/stop {"force":true}` — is available there). Pid files: `.rescue-daemon.pid` (engine) and `.open-boot.pid` (launcher), both JSON.
|
|
12
|
+
> Community plugin — not an official DSH package. npm: `dsh-drydock` (formerly `dsh-plugin-manager-pro`, which is deprecated on npm but not deleted; kept for installing historical versions) · GitHub: [nonentity303/dsh-drydock](https://github.com/nonentity303/dsh-drydock) · Cross-platform (Windows / macOS / Linux).
|
|
181
13
|
>
|
|
182
|
-
> **
|
|
14
|
+
> **Current version: 1.1.0** (this doc tracks `master`). **Trust the badges**, not this line: the three badges above are the **live** `latest` / `desktop` / `next` channel versions. If you are reading a **snapshot** of this README on the npm page or in a third-party catalog (ADP etc.), the text may lag — take versions and install commands from the badges, `npm view dsh-drydock dist-tags`, or <https://github.com/nonentity303/dsh-drydock/blob/master/status.json>.
|
|
15
|
+
> ⚠️ A brand-new release is blocked by pnpm's **24 h cool-down** (`minimumReleaseAge`) — pin the version explicitly if it does not install (see "Install" below).
|
|
183
16
|
|
|
184
|
-
|
|
17
|
+
## Four signature features
|
|
185
18
|
|
|
186
|
-
|
|
19
|
+
### ① Standalone rescue toolchain — works when the engine does not
|
|
20
|
+
The 3081 launcher (`/` boot page, `/plugins` fallback manager, `/rescue` rescue page) and the 3082 backup rescue daemon run in **separate processes and ports**, independent of the Cordis runtime; `verify / fix / start / stop / status` return explicit exit codes (0 ready / 1 start failed / 2 repair incomplete) and are script-callable. → [docs/RESCUE.md](docs/RESCUE.md)
|
|
187
21
|
|
|
188
|
-
|
|
189
|
-
-
|
|
190
|
-
- **`engines.node` in `package.json` is the only statement of record** (currently `>=18.0.0`). Note: **0.9.1 fails to load on Node 18/20** (a top-level named import of `node:module`'s `findPackageJSON`, which only exists since Node **22.14** → link-time `SyntaxError`, the whole plugin never loads); **on Node 18/20 use 0.9.1-rc2 or newer** — it uses a namespace import + runtime feature detection + a fallback resolver, guarded by the static gate `node tools/dev/compat-scan.mjs --root .` (measured on this version: `blocker=0`, exit 0; on the published 0.9.1 tarball: `blocker=1`).
|
|
191
|
-
- **The engine version decides which manager version you install** (table below) — installing the wrong one means no plugin page, or a profile that will not start.
|
|
22
|
+
### ② Transactional uninstall / rollback / one-click undo
|
|
23
|
+
Impact preview + pre-uninstall verdict (safe / caution / risky) → backup → remove → verify every step → **automatic rollback on any failure**; Windows file-lock leftovers are queued in `pendingRemovals` and retried on the next start; the last 20 operations are undoable and plugin combinations can be saved as **named scenarios**. → [docs/USAGE.md](docs/USAGE.md)
|
|
192
24
|
|
|
193
|
-
###
|
|
25
|
+
### ③ Update-source trust model + download provenance
|
|
26
|
+
Defaults are npm official `registry.npmjs.org` / GitHub official repo / npmmirror, and **the registry version is authoritative**; custom sources are `authoritative: false` by default and **fallback only** (never mixed with the official ones); `http://` sources are allowed but labelled "**plaintext · fallback only**" and need explicit `authoritative: true` + `allowInsecure: true` to take part in version decisions; only `@deepseek-ai/*` uses the `next` track; auto-install from the downloads folder requires a matching **provenance** record (name + version + source + digest, valid 7 days). → [docs/SECURITY.md](docs/SECURITY.md)
|
|
194
27
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
| **0.1.7-rc.2** | **0.9.1** (published) · **0.9.1-rc2** (pre-release, `next` dist-tag) | ✅ works | 0.9.0: 2026-09-28 rehearsal + clean-environment install; 0.9.1: all four test suites green; **0.9.1-rc2 (pre-release)**: launcher suite independently verified **448 checks / 418 OK / 30 SKIP(env) / 0 FAIL**, exit 0 (2026-10-07; all 30 SKIPs are sandbox boundaries, **not product failures**); static compat gate `compat-scan` on the candidate tarball **exit 0 / blocker 0** (the published 0.9.1 tarball reports blocker 1 / exit 2); it also carries the performance fixes (client bundle **792,931 → 255,903 B**, host hot-snapshot median **18.8 → 1.1 ms**); **the count of record is the output of `node test-launcher.mjs --strict`** (it moves with the tree) | Isolated rehearsal environment (separate `DSH_HOME` + ports): engine boots cleanly, sidebar "Plugin manager", all five sections (Figures 1–3 come from it). Sources: `docs/releases/0.9.0.md`, `docs/releases/0.9.0-verify.md`, `docs/releases/RELEASE_NOTES_0.8.3-1.md`, [docs/RELEASING.md](docs/RELEASING.md) |
|
|
198
|
-
| **0.1.6 and later** (incl. 0.1.6-alpha.2) | **0.9.1** (recommended) / **0.9.1-rc2** (pre-release) | ✅ recommended (takes over the built-in page) | 0.1.7-rc.2 verified; **0.1.6-alpha.x not tested individually** | The official page became part of the engine in 0.1.6; the `ui-plugin-manager` row our `cordis.patch.yml` disables is exactly that page (`@deepseek-ai/dsh-client-ui-plugin-manager`) |
|
|
199
|
-
| **0.1.0-rc.6 ~ 0.1.5** (engines before 0.1.6) | **0.8.2** | ✅ works (legacy "Settings → Plugins" tab) | 0.8.2 released 2026-09-04; the pre-upgrade baseline on this machine was engine 0.1.1-rc.2 + 0.8.x | 0.8.x and 0.9 are two different clients (`docs/releases/0.9.0.md` ⑤); **the 0.1.5 line was not tested individually** |
|
|
200
|
-
| **0.1.7-rc.2** | **0.8.2 / early 0.8.3 builds** | ❌ plugin never activates | measured in the 2026-09-28 rehearsal | Two independent causes: ① since 0.1.7 the typert strict codec must provide a `create()` factory; ② `dsh.client.inject` referenced `@deepseek-ai/dsh-client-runtime`, removed in 0.1.7. Fixed in 0.8.3-1 and 0.9.x |
|
|
201
|
-
| **0.1.6 and later** | **any third-party manager that declares the same loader entry id** (e.g. LX2000WASD 0.6.x) | ❌ profile will not start | competitor announcement, 2026-09 | `TypeError: duplicate loader entry id: plugin-manager` (the official `dsh-base` row id is `plugin-manager`); this manager uses its own id `drydock` |
|
|
202
|
-
| Already on 0.9.x with an engine before 0.1.6 | rollback: `dsh plugin --profile web add dsh-plugin-manager-pro@0.8.2` | ⚠️ recovery path | — | see the rollback command under "Install" |
|
|
28
|
+
### ④ 3081 fallback page + engine watchdog
|
|
29
|
+
With the engine down, `http://127.0.0.1:3081/plugins` still enables / disables, updates, uninstalls and restarts it. The resident supervisor now also watches engine health: **two consecutive failed health probes → it starts the engine directly** (same path as "Restart engine"), recycles a hung launcher of its own, and stays quiet after you explicitly stop the engine. Fully localised (Chinese) UI, light/dark theme following the system; Windows / macOS / Linux (`--install-autostart` is Windows-only). → [docs/USAGE.md](docs/USAGE.md)
|
|
203
30
|
|
|
204
|
-
|
|
205
|
-
> **On Node 18/20 (or to try the pre-release) install `0.9.1-rc2`**: `npm i dsh-plugin-manager-pro@next` — 0.9.1 **fails to load on Node 18/20**, which is the first blocker this pre-release fixes (see `docs/releases/0.9.1-rc2.md`).
|
|
206
|
-
> The "verified" records come from the rehearsal environment, the clean-environment install report and the real-machine install archive (`docs/releases/0.9.0-verify.md`; developer workspace `upgrade-rehearsal/`, `audit/install-090/` — the latter two are not part of the npm package). The process is repeated for every engine patch release per `docs/RELEASING.md`.
|
|
207
|
-
|
|
208
|
-
## 🔐 Permissions and data scope
|
|
209
|
-
|
|
210
|
-
> What does it actually touch? Everything it reads or writes stays inside your **local profile directory** and the **update sources you configure**: no account, no cloud, no telemetry. Every write is preceded by a `.rescue-bak-*` backup and goes through an atomic "temp file + rename".
|
|
211
|
-
|
|
212
|
-
| Data | Purpose | Leaves the machine? |
|
|
213
|
-
|---|---|---|
|
|
214
|
-
| `~/.dsh/profiles/<name>/package.json` | read the installed plugin list (`dependencies` / `dsh.bundle` / `dsh.client`); written back by install/uninstall/scenario operations (backed up first) | No |
|
|
215
|
-
| `~/.dsh/profiles/<name>/cordis.patch.yml` | read/write enable-state and quarantine rows (only rows carrying the `Managed by dsh-drydock` marker; pre-rename rows carry the old `dsh-plugin-manager-pro` marker and are still recognized; backed up first) | No |
|
|
216
|
-
| `~/.dsh/profiles/<name>/plugin-manager.json` (sidecar) | operation history (last 20), scenarios, manual origin overrides, pending removals, update-source config | No |
|
|
217
|
-
| `~/.dsh/profiles/<name>/node_modules/**` | read the dependency graph and package summaries; uninstall/quarantine deletes package directories via `pnpm` (Windows file locks are queued for the next start) | No (pnpm talks to the registry during install/uninstall) |
|
|
218
|
-
| `~/.dsh/profiles/<name>/vendor/downloads/*.tgz` | archive staging for browser downloads; archives still referenced by dependencies are never deleted | No |
|
|
219
|
-
| `$DSH_HOME/downloads/*` | "auto-install from the downloads folder" scans archives and writes `.installed` / `.failed` stamps | No |
|
|
220
|
-
| Local npm global root (Windows `%APPDATA%\npm`, macOS/Linux `npm root -g` and common paths) | **read-only**: locate the engine-provided `@deepseek-ai/*` packages and extract plugin summaries | No |
|
|
221
|
-
| Update sources: npm registry (`registry.npmjs.org` by default), dshfind, GitHub, mirrors you add (e.g. `registry.npmmirror.com`) | query versions and download archives | **Queries only** (GET metadata / archives) — no local data is uploaded |
|
|
222
|
-
| GitHub API: `api.github.com`, `raw.githubusercontent.com`, `codeload.github.com` | read releases and repository `package.json`, download tgz | same |
|
|
223
|
-
| Catalog `awesome-dsh-plugin.com/plugins.json` | market catalog (10-minute host cache) | same |
|
|
224
|
-
| Loopback ports `3080` / `3081` / `3082` (+ lock `4081 = 3081+1000`) | main UI / launcher + rescue page / backup rescue service / single-instance lock — bound to `127.0.0.1` only | No (never leaves the machine) |
|
|
225
|
-
| Windows registry `HKCU\...\Run\DSHWebFront` + profile `open-boot-autostart.vbs`, `open-boot-ui.vbs` | written **only when you explicitly run `--install-autostart`**; cleaned by `npx dsh-drydock --uninstall-autostart` (or `--uninstall`) | No |
|
|
226
|
-
| Profile `.rescue-daemon.pid`, `.open-boot.pid`, `rescue-daemon.log`, `open-boot-supervisor.log`, `health.log` | pids, logs and the self-check trail (`health.log` keeps 7 days / 1000 lines) | No |
|
|
227
|
-
|
|
228
|
-
> **What it never touches**: conversation content, `settings.yaml`, `.credentials.yaml` (API keys) — there is no code path reading them in `lib/`.
|
|
229
|
-
|
|
230
|
-
## Install
|
|
231
|
-
|
|
232
|
-
> **Install from npm** (`dsh plugin … add` is pnpm underneath and reuses the engine-provided `@deepseek-ai/*`).
|
|
31
|
+
## Install (30 seconds)
|
|
233
32
|
|
|
234
33
|
```sh
|
|
235
|
-
#
|
|
236
|
-
dsh plugin --profile web add dsh-drydock
|
|
237
|
-
|
|
238
|
-
# 2) right after a release (or during the 24 h cool-down) — pin the version, always reliable
|
|
239
|
-
dsh plugin --profile web add dsh-drydock@1.0.0
|
|
240
|
-
|
|
241
|
-
# 3) offline tarball (downloaded from the GitHub Release page, or built with npm pack)
|
|
242
|
-
dsh plugin --profile web add ./dsh-drydock-1.0.0.tgz
|
|
243
|
-
|
|
244
|
-
# old engines (0.1.0-rc.6 ~ 0.1.5), or when 0.9.x does not take effect: roll back to the legacy UI
|
|
245
|
-
# (0.8.2 only ever existed under the old package name — the rollback command keeps the old name)
|
|
246
|
-
dsh plugin --profile web add dsh-plugin-manager-pro@0.8.2
|
|
34
|
+
# Recommended: pin the version so pnpm's 24 h cool-down cannot block it
|
|
35
|
+
dsh plugin --profile web add dsh-drydock@1.0.4
|
|
247
36
|
|
|
248
|
-
#
|
|
37
|
+
# Restart the web engine (client bundles load at engine startup)
|
|
249
38
|
dsh web
|
|
250
39
|
```
|
|
251
40
|
|
|
252
|
-
|
|
41
|
+
Then use the sidebar **"Plugin manager"** on `http://127.0.0.1:3080`, or the fallback page `http://127.0.0.1:3081/plugins`. Set your browser home page to `http://127.0.0.1:3081/` and opening the browser self-checks, repairs and starts the engine.
|
|
253
42
|
|
|
254
|
-
|
|
43
|
+
- **Do not want a profile install?** `npx dsh-drydock` runs the 3081 launcher, `npx dsh-drydock-boot --repair-only` self-checks and repairs, `npx dsh-drydock-rescue` runs the 3082 backup rescue.
|
|
44
|
+
- **Did not install / still the old UI?** ① client bundles load at startup — **restart `dsh web`**; ② pin the version during the 24 h cool-down (or add `dsh-drydock@1.0.4` to `minimumReleaseAgeExclude` in the profile's `pnpm-workspace.yaml`). Full install / update / uninstall / rollback / offline tgz / autostart: [docs/INSTALL.md](docs/INSTALL.md).
|
|
255
45
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
> -
|
|
259
|
-
> - The engine's `@deepseek-ai/*` packages are **pre-release versions** on npm (`-rc.*` / `-alpha.*`) with a messy version history (e.g. `dsh-home-paths` `latest` is stuck at `0.0.1-rc.3` while engines ship `0.1.7-rc.2`). Installing this package with **npm** makes npm resolve those pre-release ranges with its own peer rules — behaviour differs per npm version (a warning, or a hard `ERESOLVE`). **That is a fact about the engine's packages, not a defect of this plugin**; this package's own runtime dependencies are just `yaml` and `zod`.
|
|
260
|
-
> - If your npm config is strict about pre-release peers, add `--legacy-peer-deps`.
|
|
261
|
-
> - Conclusion: **always install into a profile with `dsh plugin … add`**; `npm install` is only for the devDependencies of this repository (see "Development and tests").
|
|
46
|
+
## Upgrade check (users on pre-0.9.1 builds)
|
|
47
|
+
|
|
48
|
+
> ⛔ **`dsh-plugin-manager-pro` releases before 0.9.1 (including `0.9.1-rc2`) are retired**: they carry known supply-chain risk and crash on load with Node < 22.14. npm now shows a **strengthened deprecation notice** (packages are not deleted; historical versions remain installable but should not be used).
|
|
262
49
|
|
|
263
|
-
|
|
50
|
+
Upgrade with one command:
|
|
264
51
|
|
|
265
52
|
```sh
|
|
266
|
-
dsh plugin --profile web remove dsh-plugin-manager-pro #
|
|
267
|
-
|
|
268
|
-
|
|
53
|
+
dsh plugin --profile web remove dsh-plugin-manager-pro # drop the old package
|
|
54
|
+
dsh plugin --profile web add dsh-drydock@^1.0.4 # the only recommended entry
|
|
55
|
+
dsh web # restart to apply
|
|
269
56
|
```
|
|
270
57
|
|
|
271
|
-
|
|
58
|
+
`dsh-drydock` is the only recommended package name; rollback inside 1.0.x uses the same name (e.g. `dsh-drydock@1.0.3`). The engine must be ≥ 0.1.7-rc.2; older engines should stay on their historical release. See [docs/INSTALL.md](docs/INSTALL.md) and [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
|
|
272
59
|
|
|
273
|
-
|
|
274
|
-
|---|---|
|
|
275
|
-
| Engine is fine, UI is broken | `http://127.0.0.1:3080/rescue` (rescue page / 🛟 button) |
|
|
276
|
-
| Engine will not start | `http://127.0.0.1:3081/rescue` (the launcher's rescue page; `/` is the "open and it starts" page; `http://localhost:3081/…` is equivalent) → check → repair → start. Independent backup entry: `npx dsh-drydock-rescue` (port **3082**) |
|
|
277
|
-
| Want "open the browser and it starts" | Set your home page to `http://127.0.0.1:3081/` (`http://localhost:3081/` is equivalent — same host and port); make it resident with `npx dsh-drydock --install-autostart` |
|
|
278
|
-
| Want 3081 resident without windows | `npx dsh-drydock --supervise` (silent; a visible window appears only when the engine must be started; `--no-window` disables it) |
|
|
279
|
-
| Want the state of 3080/3081/3082/4081 | `npx dsh-drydock --status` (launcher identity / lock ownership / engine handshake / pid files / last heartbeat) and one `health.log` line |
|
|
280
|
-
| Remove every launcher trace | `npx dsh-drydock --uninstall` (exit codes 0 = completed / 1 = error / **2 = ownership unconfirmed**: nothing is stopped and the pid file is kept — re-run from a session where `netstat`/`tasklist` work; the engine on 3080 and the logs stay) |
|
|
281
|
-
| Port 3081 serves someone else's page | The port belongs to another process: `--status` reports the pid; kill it or change `--port` and update your home page (the tool **never** shifts ports silently) |
|
|
282
|
-
| Command-line check & start | `npx dsh-drydock-boot` (start) or `npx dsh-drydock-boot --repair-only` (check + repair only); on Windows double-click `bin\dsh-boot.cmd` inside the package |
|
|
283
|
-
| Installed but the UI is still old | The engine loads client bundles at startup — restart `dsh web` (or let the launcher restart the engine) |
|
|
284
|
-
| Toggling a plugin does not change anything | The engine applies entries at startup: the change is written immediately but needs an engine restart (the UI tells you when) |
|
|
60
|
+
## Entries
|
|
285
61
|
|
|
286
|
-
|
|
62
|
+
| Entry | Address | Purpose |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| Manager (3080) | `http://127.0.0.1:3080` → sidebar "Plugin manager" | Everyday entry: list / install / configure / uninstall / rescue |
|
|
65
|
+
| Fallback page (3081) | `http://127.0.0.1:3081/plugins` | Available with the engine down: toggle / update / uninstall / health check / restart |
|
|
66
|
+
| Boot page (3081) | `http://127.0.0.1:3081/` | Open and it self-checks → repairs → starts (best as browser home page) |
|
|
67
|
+
| Rescue page (3081) | `http://127.0.0.1:3081/rescue` | verify / fix / start / stop / status |
|
|
68
|
+
| Rescue button 🛟 | bottom-right of 3080 | Draggable, remembered position; entry when settings are broken |
|
|
287
69
|
|
|
288
|
-
|
|
70
|
+
> The engine also serves `/rescue` at `http://127.0.0.1:3080/rescue`, but it goes through host admission: **entering from inside the app** (rescue button / plugin page) works; typing it in the address bar is an origin-less top-level navigation and gets 403. Use the 3081 page when the engine is down.
|
|
289
71
|
|
|
290
|
-
|
|
291
|
-
- **Plugin page takeover** (`src/client.jsx` + `cordis.patch.yml`): registers into `main` (key=`plugins`) and `sidebar.panellist` (id=`plugins`), disables the built-in `ui-plugin-manager` row and declares the 7 `plugins.*` child slots; the three that third-party plugins really use (`plugins.row.config` / `plugins.bundle.config` / `plugins.item`) have real render exits — **an unregistered key never produces an empty button**.
|
|
292
|
-
- **Toggle persistence**: rows written into the profile's `cordis.patch.yml`, always carrying the `Managed by dsh-drydock` marker (legacy `dsh-plugin-manager-pro` markers are still read) so user-owned patch rows are never touched.
|
|
293
|
-
- **Update aggregation** (`lib/aggregate.js` + `compare-versions.js`): parallel sources → highest version → random tie-break; 10-minute circuit breaking on 403/429; full pre-release support.
|
|
294
|
-
- **Downloader** (`lib/downloader.js`): streaming HTTP; magnet/.torrent prefer an external downloader (cross-platform where/which) → built-in webtorrent → manual import.
|
|
295
|
-
- **Cross-platform** (`lib/platform.js`): npm global root via `%APPDATA%\npm` on Windows, `npm root -g` plus common paths and nvm directories elsewhere (10-minute cache).
|
|
296
|
-
- **Standalone rescue** (`lib/preflight.mjs` + `lib/enginectl.mjs`): plain-Node self-check/repair and engine lifecycle shared by all three CLI tools; port split: 3081 launcher (single web entry with `/rescue`), 3082 backup rescue service, 4081 supervisor lock.
|
|
297
|
-
- **Local write-endpoint guards** (v0.9.1, `lib/enginectl.mjs`: `newApiToken` / `allowedOriginsOf` / `guardWriteRequest` / `createSingleFlight`): the local write endpoints (`POST /api/boot`, `/rescue/api/start|fix|stop`) require a **same-origin `Origin`** — the same-host, same-port allowlist `127.0.0.1` / `localhost` / `[::1]`, **never derived from the `Host` header** (`localhost:3081` and `127.0.0.1:3081` are equivalent; another port is not) — plus a page-injected one-time token (`X-DSH-PM-Token`, 48 hex chars, never written to disk, rotated on every start); a missing `Origin` (local tools) still requires the token, otherwise 401. Boot/start are single-flighted (a concurrent second request gets 409), so a third-party web page cannot start/stop anything. Read endpoints (`GET /api/status|verify`) stay open for local tools.
|
|
298
|
-
- **Health trail**: `--status` appends `OK|FAIL boot=…@3081 engine=…@3080` to `profile/health.log` (7 days / 1000 lines).
|
|
299
|
-
- **Protected entries**: the manager itself, loader infrastructure, webserver/connection/ui-layout etc. cannot be toggled; the rescue and auto-quarantine protection sets share one source, and auto-quarantine additionally needs repeated failures.
|
|
300
|
-
- **Deep dive**: [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) (process diagram, slot contract, sidecar fields, uninstall transaction) and [docs/LAUNCHER.md](docs/LAUNCHER.md) (command/exit-code tables).
|
|
301
|
-
|
|
302
|
-
---
|
|
72
|
+
## Requirements
|
|
303
73
|
|
|
304
|
-
|
|
74
|
+
- Windows 10/11 · macOS · Linux (rescue toolchain and all three bins are cross-platform; **autostart management is Windows-only**).
|
|
75
|
+
- Node.js: `engines.node` declares `>=22.12.0` (tightened in 1.1.0, enforced in build/pack); Node 18 is EOL and pnpm 11 no longer supports 18/20/21 — **run Node 24.x** (same as DSH itself).
|
|
76
|
+
- DSH `dsh` ≥ `0.1.7-rc.2` (`<0.3.0-0`) and `pnpm` (`dsh plugin` and updates depend on it).
|
|
77
|
+
- Loopback ports `3080` (engine) · `3081` (launcher) · `3082` (backup rescue) · `4081` (supervisor lock = 3081+1000), all bound to `127.0.0.1`.
|
|
305
78
|
|
|
306
|
-
|
|
307
|
-
npm install # if npm blocks the esbuild install script: npm approve-scripts esbuild
|
|
308
|
-
npm run build # bundle the browser side → lib/client.js
|
|
309
|
-
npm test # build + bundle + render + integration + launcher
|
|
310
|
-
node test-launcher.mjs --strict # launcher tests (random ports + temp profile, never touches a real profile/registry)
|
|
311
|
-
node tools/test-host-fixes.mjs # host-side regression assertions
|
|
312
|
-
npm run check:vendor # vendor consistency (per-file sha256 inside the tgz == working tree)
|
|
313
|
-
npm run pack # build + npm pack
|
|
314
|
-
node tools/dev/gen-changelog.mjs # regenerate CHANGELOG.md from docs/releases/*.md
|
|
315
|
-
node tools/dev/gen-changelog.mjs --check # verify CHANGELOG.md is up to date (exit 1 when stale)
|
|
316
|
-
```
|
|
79
|
+
Details: [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
|
|
317
80
|
|
|
318
|
-
Docs
|
|
81
|
+
## Docs
|
|
319
82
|
|
|
320
|
-
|
|
83
|
+
The detailed docs are currently **Chinese only** — English deep-dive docs have **not been split yet**; `README.en.md` is a condensed entry and links below point to the Chinese docs.
|
|
321
84
|
|
|
322
|
-
|
|
|
323
|
-
|
|
324
|
-
|
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
|
|
|
330
|
-
|
|
|
331
|
-
|
|
|
332
|
-
|
|
|
85
|
+
| Doc | Content |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| [docs/INSTALL.md](docs/INSTALL.md) | Install / update / uninstall / rollback / offline tgz / 24 h cool-down / autostart / ports / upgrading from the old package |
|
|
88
|
+
| [docs/USAGE.md](docs/USAGE.md) | Carriers, origin three-way sections and tabs, transactional uninstall, history, scenarios, updates & downloads, market, fallback page |
|
|
89
|
+
| [docs/SECURITY.md](docs/SECURITY.md) | Permissions and data scope, update-source trust model, download provenance, write-endpoint guards, admission, threat model |
|
|
90
|
+
| [docs/RESCUE.md](docs/RESCUE.md) | Standalone rescue toolchain, rescue quick reference, 3081 API, how it works, 3082 |
|
|
91
|
+
| [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md) | Requirements, engine compatibility matrix, Node, platforms and ports |
|
|
92
|
+
| [docs/FAQ.md](docs/FAQ.md) | FAQ and troubleshooting (including old-package upgrades) |
|
|
93
|
+
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Three-process architecture, slot contract, sidecar fields, uninstall transaction |
|
|
94
|
+
| [docs/LAUNCHER.md](docs/LAUNCHER.md) | All CLI commands and exit codes, `--uninstall` loop, write-endpoint guards |
|
|
95
|
+
| [CHANGELOG.md](CHANGELOG.md) | Version history (generated) |
|
|
96
|
+
| [docs/releases/](docs/releases/) | Per-release notes ([1.0.4](docs/releases/1.0.4.md)) |
|
|
97
|
+
| [docs/README-full.md](docs/README-full.md) | v0.9.1-era full archive — **not the current manual** |
|
|
333
98
|
|
|
334
99
|
## License
|
|
335
100
|
|
|
336
101
|
MIT. The patch-persistence approach is inspired by [hrhgit/deepseek-harness-plugin-manager](https://github.com/hrhgit/deepseek-harness-plugin-manager) (MIT).
|
|
337
102
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
## 中文
|
|
341
|
-
|
|
342
|
-
中文说明(主文档):[README.md](README.md) — 与本文的功能清单与命令保持一致。
|
|
103
|
+
Chinese (main) documentation: [README.md](README.md).
|