dsh-drydock 1.0.1 → 1.0.2

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 CHANGED
@@ -151,30 +151,30 @@ Five sections, switching keeps your scroll position:
151
151
 
152
152
  | Tool | What it does | Usage |
153
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-pm-launcher` |
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-pm-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-pm-boot` (double-clickable equivalent on Windows: `bin\dsh-boot.cmd` inside the package) |
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
157
 
158
158
  #### Resident launcher and autostart
159
159
 
160
160
  | Command | Effect |
161
161
  |---|---|
162
- | `npx dsh-pm-launcher --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-pm-launcher --ensure` | One-shot: make sure the port has this launcher (exit 0/1) |
164
- | `npx dsh-pm-launcher --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-pm-launcher --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-pm-launcher --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-pm-launcher --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-pm-launcher --help` / `npx dsh-pm-boot --help` | Show usage (unknown flags are reported, not silently ignored) |
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
169
 
170
- After installation the three commands come from the `bin` field of `package.json` (`dsh-pm-launcher` / `dsh-pm-boot` / `dsh-pm-rescue`). `npx` works without installing, and you can always run the file inside the package (path is independent of cwd):
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
171
 
172
172
  ```sh
173
173
  node "$DSH_HOME/profiles/web/node_modules/dsh-drydock/bin/open-boot.mjs" --status
174
174
  ```
175
175
 
176
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-pm-boot --repair-only` to see the quarantine list; ③ `npx dsh-pm-launcher --status` for the real state of launcher/supervisor/engine plus the last `health.log` line; ④ interactive start with `npx dsh-pm-boot`.
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
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
179
 
180
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.
@@ -222,7 +222,7 @@ node "$DSH_HOME/profiles/web/node_modules/dsh-drydock/bin/open-boot.mjs" --statu
222
222
  | GitHub API: `api.github.com`, `raw.githubusercontent.com`, `codeload.github.com` | read releases and repository `package.json`, download tgz | same |
223
223
  | Catalog `awesome-dsh-plugin.com/plugins.json` | market catalog (10-minute host cache) | same |
224
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-pm-launcher --uninstall-autostart` (or `--uninstall`) | No |
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
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
227
 
228
228
  > **What it never touches**: conversation content, `settings.yaml`, `.credentials.yaml` (API keys) — there is no code path reading them in `lib/`.
@@ -264,8 +264,8 @@ Uninstall:
264
264
 
265
265
  ```sh
266
266
  dsh plugin --profile web remove dsh-plugin-manager-pro # calls --uninstall below to clean autostart/supervisor/shims first
267
- npx dsh-pm-launcher --uninstall-autostart # Windows: remove autostart (idempotent)
268
- npx dsh-pm-launcher --uninstall # optional: remove every launcher trace (stop supervisor + delete DSHWeb* + shims + pid)
267
+ npx dsh-drydock --uninstall-autostart # Windows: remove autostart (idempotent)
268
+ npx dsh-drydock --uninstall # optional: remove every launcher trace (stop supervisor + delete DSHWeb* + shims + pid)
269
269
  ```
270
270
 
271
271
  ## Rescue quick reference
@@ -273,13 +273,13 @@ npx dsh-pm-launcher --uninstall # optional: remove ever
273
273
  | Situation | What to do |
274
274
  |---|---|
275
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-pm-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-pm-launcher --install-autostart` |
278
- | Want 3081 resident without windows | `npx dsh-pm-launcher --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-pm-launcher --status` (launcher identity / lock ownership / engine handshake / pid files / last heartbeat) and one `health.log` line |
280
- | Remove every launcher trace | `npx dsh-pm-launcher --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) |
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
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-pm-boot` (start) or `npx dsh-pm-boot --repair-only` (check + repair only); on Windows double-click `bin\dsh-boot.cmd` inside the package |
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
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
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) |
285
285
 
@@ -324,7 +324,7 @@ Docs: [docs/RELEASING.md](docs/RELEASING.md) (release flow), [docs/ARCHITECTURE.
324
324
  | Installed but the UI is still the old one / no new page | Client bundles load at engine startup: **restart `dsh web`** (or let the launcher restart the engine) |
325
325
  | Plugin state does not change after toggling | The engine applies entries at startup: written to config immediately, **effective after an engine restart** |
326
326
  | `dsh plugin add` says "Already up to date" | pnpm caches tarballs by version: **bump the version** before adding again |
327
- | Engine will not start (broken bundle in `package.json`) | Open `http://127.0.0.1:3081/rescue` → check → repair → start; or `npx dsh-pm-boot --repair-only` |
327
+ | Engine will not start (broken bundle in `package.json`) | Open `http://127.0.0.1:3081/rescue` → check → repair → start; or `npx dsh-drydock-boot --repair-only` |
328
328
  | No `/rescue` on 3081 | 0.9.0 and earlier only had the rescue flow on the launcher's `/` (or on the 3082 service). 0.9.1 serves `/rescue` and `/rescue/api/*` on 3081 — upgrade the plugin |
329
329
  | Worried a third-party page can trigger start/stop | It cannot: write endpoints require a **same-origin `Origin`** — same host *and* the same port only, i.e. `127.0.0.1` / `localhost` / `[::1]`, **never derived from the `Host`/`Referer` header** — plus a one-time token (`X-DSH-PM-Token`; a missing `Origin` still needs it, otherwise 401), and they are single-flighted (403 / 401 / 409) — see [docs/LAUNCHER.md](docs/LAUNCHER.md) §4 |
330
330
  | Browser reports `waiting for service: remote.xxx` | A client `inject` must not include its own remote (deadlock); inject only keeps `["slots","locale","remote"]` |
package/README.md CHANGED
@@ -144,9 +144,9 @@
144
144
 
145
145
  | 工具 | 用途 | 用法 |
146
146
  |---|---|---|
147
- | `bin/open-boot.mjs` | **唯一网页入口 + 常驻守护**(3081):`/` 是"打开即启动"页;**`/plugins` 是兜底管理页**(v1.0);`/rescue` 是救援页。设为浏览器主页即"打开即启动"。平时完全隐藏,只有引擎需要拉起时才弹一个可见启动窗口(`--no-window` 可关)。健康判定 = HTTP 握手 + 身份指纹;写接口带 Origin + 一次性令牌防护;`--uninstall` 一键清理(退出码 0/1/2,2 = 归属未确认时不动任何进程) | `npx dsh-pm-launcher` |
148
- | `bin/rescue-daemon.mjs` | **独立备份救援守护**(默认端口 **3082**):自包含中文救援页 + `verify/fix/start/stop/status` API,不依赖主引擎。**不与 3081 抢端口**(被占时明确报错退出,不静默漂移) | `npx dsh-pm-rescue`(默认 3082) |
149
- | `bin/dsh-boot.mjs` / `.cmd` | **Steam 式启动序列**:verify → 自动隔离坏插件 → 启动 → 健康等待。`--repair-only` 只自检+修复不启动;退出码 0=就绪 / 1=启动失败 / 2=修复未完成;启动即失败会**立即返回**并打印日志绝对路径 | `npx dsh-pm-boot`(Windows 双击:**包内** `bin\dsh-boot.cmd`) |
147
+ | `bin/open-boot.mjs` | **唯一网页入口 + 常驻守护**(3081):`/` 是"打开即启动"页;**`/plugins` 是兜底管理页**(v1.0);`/rescue` 是救援页。设为浏览器主页即"打开即启动"。平时完全隐藏,只有引擎需要拉起时才弹一个可见启动窗口(`--no-window` 可关)。健康判定 = HTTP 握手 + 身份指纹;写接口带 Origin + 一次性令牌防护;`--uninstall` 一键清理(退出码 0/1/2,2 = 归属未确认时不动任何进程) | `npx dsh-drydock` |
148
+ | `bin/rescue-daemon.mjs` | **独立备份救援守护**(默认端口 **3082**):自包含中文救援页 + `verify/fix/start/stop/status` API,不依赖主引擎。**不与 3081 抢端口**(被占时明确报错退出,不静默漂移) | `npx dsh-drydock-rescue`(默认 3082) |
149
+ | `bin/dsh-boot.mjs` / `.cmd` | **Steam 式启动序列**:verify → 自动隔离坏插件 → 启动 → 健康等待。`--repair-only` 只自检+修复不启动;退出码 0=就绪 / 1=启动失败 / 2=修复未完成;启动即失败会**立即返回**并打印日志绝对路径 | `npx dsh-drydock-boot`(Windows 双击:**包内** `bin\dsh-boot.cmd`) |
150
150
 
151
151
  > 端口的完整分工、退出码表、写接口防护与 `--uninstall` 四步见 [docs/LAUNCHER.md](docs/LAUNCHER.md);进程与槽位架构见 [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md)。
152
152
 
@@ -154,13 +154,13 @@
154
154
 
155
155
  | 命令 | 作用 |
156
156
  |---|---|
157
- | `npx dsh-pm-launcher --supervise [--interval 60] [--heartbeat-min 10]` | **常驻守护**:静默确保 3081 有服务;锁端口(`port+1000`)单实例;只有 HTTP 握手失败才拉起,绝不误杀健康实例 |
158
- | `npx dsh-pm-launcher --ensure` | 一次性确保 3081(桌面快捷方式用,退出码 0/1) |
159
- | `npx dsh-pm-launcher --status` | **状态自检 + 健康留痕**:启动器/守护/引擎/PID/cwd/日志与最后心跳;每次追加一行 `profile/health.log`(保留 7 天 / 1000 行) |
160
- | `npx dsh-pm-launcher --install-autostart` | **写开机自启**(Windows):HKCU Run + 登录静默常驻;包装脚本正文纯 ASCII,中文用户名/含空格路径不乱码 |
161
- | `npx dsh-pm-launcher --uninstall-autostart` / `--autostart-status` | 移除自启 / 查看状态;未安装时**幂等**(exit 0) |
162
- | `npx dsh-pm-launcher --uninstall` | **卸载闭环**:三重归属校验停守护 → 删 HKCU\...\Run 下**所有** `DSHWeb*` 值 → 删 shim → 清 pid(**日志保留**)。退出码 0=完成 / 1=出错 / **2=归属未确认**(不动任何进程、保留 pid);引擎 3080 不动。管理器卸载自身前会自动调用它 |
163
- | `npx dsh-pm-launcher --help` / `npx dsh-pm-boot --help` | 显示用法(参数不再被静默忽略) |
157
+ | `npx dsh-drydock --supervise [--interval 60] [--heartbeat-min 10]` | **常驻守护**:静默确保 3081 有服务;锁端口(`port+1000`)单实例;只有 HTTP 握手失败才拉起,绝不误杀健康实例 |
158
+ | `npx dsh-drydock --ensure` | 一次性确保 3081(桌面快捷方式用,退出码 0/1) |
159
+ | `npx dsh-drydock --status` | **状态自检 + 健康留痕**:启动器/守护/引擎/PID/cwd/日志与最后心跳;每次追加一行 `profile/health.log`(保留 7 天 / 1000 行) |
160
+ | `npx dsh-drydock --install-autostart` | **写开机自启**(Windows):HKCU Run + 登录静默常驻;包装脚本正文纯 ASCII,中文用户名/含空格路径不乱码 |
161
+ | `npx dsh-drydock --uninstall-autostart` / `--autostart-status` | 移除自启 / 查看状态;未安装时**幂等**(exit 0) |
162
+ | `npx dsh-drydock --uninstall` | **卸载闭环**:三重归属校验停守护 → 删 HKCU\...\Run 下**所有** `DSHWeb*` 值 → 删 shim → 清 pid(**日志保留**)。退出码 0=完成 / 1=出错 / **2=归属未确认**(不动任何进程、保留 pid);引擎 3080 不动。管理器卸载自身前会自动调用它 |
163
+ | `npx dsh-drydock --help` / `npx dsh-drydock-boot --help` | 显示用法(参数不再被静默忽略) |
164
164
 
165
165
  > **健康判定与"停引擎"的安全性**:引擎/启动器就绪 = **HTTP 握手成功且响应带 dsh 身份指纹**(裸 TCP 监听器一律判不健康)。端口被别的进程占用时明确报错,不静默换端口。`stopEngine()` 前三重校验(pid 存活 / 进程镜像 / 端口归属),不过一律拒绝,需要时可在救援页"强制停止"。PID 文件均为 JSON(`profile/.rescue-daemon.pid` / `.open-boot.pid`)。
166
166
  >
@@ -234,8 +234,8 @@ pnpm update dsh-drydock --latest --dir <profile>
234
234
 
235
235
  # 卸载:3081 兜底页「卸载」(带备份、验证与失败回滚),或
236
236
  dsh plugin --profile web remove dsh-drydock # 卸载前自动清理自启/守护/shim
237
- npx dsh-pm-launcher --uninstall-autostart # Windows:清理开机自启(幂等)
238
- npx dsh-pm-launcher --uninstall # 需要时:彻底清理启动器痕迹(引擎 3080 与日志保留)
237
+ npx dsh-drydock --uninstall-autostart # Windows:清理开机自启(幂等)
238
+ npx dsh-drydock --uninstall # 需要时:彻底清理启动器痕迹(引擎 3080 与日志保留)
239
239
  ```
240
240
 
241
241
  ## 救援流程速查
@@ -247,10 +247,10 @@ npx dsh-pm-launcher --uninstall # 需要时:彻底清
247
247
  | 插件被禁用到界面起不来 | `http://127.0.0.1:3081/plugins` 直接 toggle(该页不依赖引擎) |
248
248
  | 某个插件把引擎打挂 | 3081 `/plugins` → mod 体检看 verdict → 禁用观察或卸载(带备份与验证) |
249
249
  | 卸载/更新被引擎占用 | 拒绝硬删并引导:先禁用 → 重启引擎 → 再操作 |
250
- | 需要独立于 3081 的备份救援入口 | `npx dsh-pm-rescue`(默认 3082,不抢端口) |
251
- | 想知道 3080/3081/3082/4081 到底什么状态 | `npx dsh-pm-launcher --status`(并追加一条 `health.log` 留痕) |
252
- | 命令行一键自检+启动 | `npx dsh-pm-boot`(启动)或 `npx dsh-pm-boot --repair-only`(只自检+修复) |
253
- | 彻底移除启动器 | `npx dsh-pm-launcher --uninstall`(退出码 2 = 归属未确认:不动任何进程) |
250
+ | 需要独立于 3081 的备份救援入口 | `npx dsh-drydock-rescue`(默认 3082,不抢端口) |
251
+ | 想知道 3080/3081/3082/4081 到底什么状态 | `npx dsh-drydock --status`(并追加一条 `health.log` 留痕) |
252
+ | 命令行一键自检+启动 | `npx dsh-drydock-boot`(启动)或 `npx dsh-drydock-boot --repair-only`(只自检+修复) |
253
+ | 彻底移除启动器 | `npx dsh-drydock --uninstall`(退出码 2 = 归属未确认:不动任何进程) |
254
254
 
255
255
  > **已知限制**:入口 token URL 只有在引擎 stdout 落到 `<DSH_HOME>/logs/web.log` 时才取得到(启动器经 `enginectl` 拉起时正常落盘)。若引擎由其他路径拉起(如 `dsh-boot` 的弹窗路径),3081 可能给不出可直接跳转的链接——到 `/rescue` 执行一次「重启引擎」即可恢复。
256
256
 
@@ -313,7 +313,7 @@ npm run pack # build + npm pack(产出安装
313
313
  | 装完界面还是旧的 / 新页面不出现 | 客户端 bundle 在引擎启动时加载:**必须重启 `dsh web`**(或让启动器重新拉起引擎) |
314
314
  | 启停插件后列表状态没变 | 引擎在启动时套用条目:配置已写入,**重启引擎后生效**(界面会在需要重启时提示) |
315
315
  | `dsh plugin add` 报 "Already up to date" 不更新 | pnpm 按版本号缓存 tarball;**修改后必须升版本号**再 add |
316
- | 引擎起不来(坏 bundle 进 package.json) | 开 `http://127.0.0.1:3081/rescue` → 运行检查 → 修复 → 启动;或 `npx dsh-pm-boot --repair-only` |
316
+ | 引擎起不来(坏 bundle 进 package.json) | 开 `http://127.0.0.1:3081/rescue` → 运行检查 → 修复 → 启动;或 `npx dsh-drydock-boot --repair-only` |
317
317
  | 想禁用管理器自己 | 3080 界面内不可自禁:去 `http://127.0.0.1:3081/plugins`(独立于引擎存活)或用 `dsh plugin remove`;3080 内允许的是**卸载**(额外警告路径,自动清理自启) |
318
318
  | 列表分区和我认知的不一样 | v1.0 起按来源三分区(核心组件 / 引擎内置组件 / 用户插件);「推荐」只是行内标签,不再是分区 |
319
319
  | 担心第三方网页能触发启动/停止 | 不会:写接口要**同源 `Origin` + 一次性令牌**,并发受单飞闸门限制(403 / 401 / 409)——见 [docs/LAUNCHER.md](docs/LAUNCHER.md) §4 |