mcp-pacemaker 2.0.2 → 2.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.
Files changed (80) hide show
  1. package/CHANGELOG.md +75 -1
  2. package/CONTRIBUTING.md +39 -13
  3. package/README.md +255 -8
  4. package/THIRD_PARTY_NOTICES.txt +1 -28
  5. package/autostart/windows/account-task.ps1 +167 -0
  6. package/autostart/windows/inspect-task.ps1 +42 -0
  7. package/autostart/windows/inspect-worker-process-sessions.ps1 +155 -0
  8. package/autostart/windows/legacy-task.ps1 +301 -0
  9. package/autostart/windows/register-task.ps1 +11 -2
  10. package/bin/account-task-adapter.mjs +47 -0
  11. package/bin/account-upgrade-controller.mjs +198 -0
  12. package/bin/account-upgrade-worker.mjs +134 -0
  13. package/bin/account-worker-session.mjs +215 -0
  14. package/bin/cli-dispatch.mjs +154 -0
  15. package/bin/cli-main.mjs +1007 -0
  16. package/bin/cli-selection.mjs +43 -0
  17. package/bin/cli.mjs +7 -876
  18. package/bin/legacy-1.3.json +32 -0
  19. package/bin/legacy-installation.mjs +217 -0
  20. package/bin/legacy-task.mjs +52 -0
  21. package/bin/legacy-upgrade.mjs +471 -0
  22. package/bin/managed-runtime.mjs +170 -0
  23. package/bin/managed-state.mjs +257 -0
  24. package/bin/managed-upgrade.mjs +491 -0
  25. package/bin/mcp-bridge.mjs +132 -4
  26. package/bin/pooling-batches.mjs +13 -0
  27. package/bin/pooling-writer.mjs +4 -0
  28. package/bin/prewarm.mjs +33 -21
  29. package/bin/runtime-context.mjs +100 -0
  30. package/bin/service-control.mjs +27 -4
  31. package/bin/stable-launcher.mjs +54 -0
  32. package/bin/task-only-controller.mjs +226 -0
  33. package/bin/task-scope.mjs +65 -0
  34. package/bin/task-transaction-protocol.mjs +173 -0
  35. package/bin/top.mjs +22 -10
  36. package/bin/update-check.mjs +13 -2
  37. package/bin/upgrade-autostart.mjs +47 -0
  38. package/bin/upgrade-capability.json +8 -0
  39. package/bin/upgrade-dependencies.mjs +122 -0
  40. package/bin/upgrade-package.mjs +203 -0
  41. package/bin/windows-legacy/LegacyProcessBroker.build.json +42 -0
  42. package/bin/windows-legacy/LegacyProcessBroker.exe +0 -0
  43. package/bin/windows-legacy/src/AssemblyInfo.cs +8 -0
  44. package/bin/windows-legacy/src/LegacyNative.cs +783 -0
  45. package/bin/windows-legacy/src/LegacyProcessBroker.cs +841 -0
  46. package/bin/windows-legacy-process.mjs +241 -0
  47. package/bin/windows-lifetime/ProcessLifetimeHelper.build.json +38 -0
  48. package/bin/windows-lifetime/ProcessLifetimeHelper.exe +0 -0
  49. package/bin/windows-lifetime/src/AssemblyInfo.cs +8 -0
  50. package/bin/windows-lifetime/src/ProcessLifetimeHelper.cs +468 -0
  51. package/bin/windows-process-lifetime.mjs +218 -0
  52. package/bin/windows-task-channel/TaskChannelGuard.build.json +45 -0
  53. package/bin/windows-task-channel/TaskChannelGuard.exe +0 -0
  54. package/bin/windows-task-channel/src/AssemblyInfo.cs +8 -0
  55. package/bin/windows-task-channel/src/ChannelCliContext.cs +210 -0
  56. package/bin/windows-task-channel/src/ChannelFiles.cs +231 -0
  57. package/bin/windows-task-channel/src/ChannelNative.cs +477 -0
  58. package/bin/windows-task-channel/src/ChannelSession.cs +203 -0
  59. package/bin/windows-task-channel/src/TaskChannelGuard.cs +686 -0
  60. package/bin/windows-task-channel.mjs +335 -0
  61. package/docs/account-upgrades.md +205 -0
  62. package/docs/execution-context.md +113 -0
  63. package/package.json +12 -5
  64. package/supervisor/supervise.mjs +226 -40
  65. package/tools/account-upgrade/qualify-two-account.ps1 +66 -0
  66. package/tools/windows-legacy/README.md +225 -0
  67. package/tools/windows-legacy/build.ps1 +122 -0
  68. package/tools/windows-legacy/inventory.mjs +90 -0
  69. package/tools/windows-process-lifetime/README.md +119 -0
  70. package/tools/windows-process-lifetime/build.ps1 +122 -0
  71. package/tools/windows-process-lifetime/inventory.mjs +86 -0
  72. package/tools/windows-task-channel/README.md +329 -0
  73. package/tools/windows-task-channel/build.ps1 +107 -0
  74. package/tools/windows-task-channel/inventory.mjs +117 -0
  75. package/ui/dist/THIRD_PARTY_NOTICES.txt +1 -28
  76. package/ui/dist/assets/{index-CgPruWYi.js → index-CcwMo2sI.js} +1 -1
  77. package/ui/dist/assets/index-PVcuDNrN.css +1 -0
  78. package/ui/dist/index.html +2 -2
  79. package/ui/dist/third-party-manifest.json +37 -25
  80. package/ui/dist/assets/index-CaLPg0c-.css +0 -1
package/CHANGELOG.md CHANGED
@@ -7,7 +7,77 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- Target release: **2.0.2**. This candidate has not yet been published.
10
+ ## [2.1.0] - 2026-10-12
11
+
12
+ Target release: 2.1.0. This candidate has not yet been published.
13
+
14
+ ### Added
15
+
16
+ - Explicit managed `upgrade --to`, read-only plans, isolated `--sxs` instances with
17
+ retained OS-assigned listeners, stable launchers, admission control and a durable
18
+ activation/recovery journal. Bare `upgrade` and `--self` remain compatible.
19
+ - Preserve ports and host wiring during managed replacement; retain the previous
20
+ package and restrict rollback to verified, unchanged pre-admission state.
21
+ - Add one-time restart-only migration for the exact Windows 1.3.0 registration,
22
+ with interactive uncertainty acknowledgement, held process identities, partial
23
+ observed-descendant receipts and scoped task/CLI rollback. No machine reboot.
24
+ - Refuse unsupported or unknown supervisor/autostart identities before interruption.
25
+ - Add explicit Windows original-account upgrades with a task-only administrator
26
+ controller and authenticated original-user worker. Keep current-user scope as
27
+ the default, preserve task security/account settings, and refuse unavailable or
28
+ changed logged-on session identity. Real elevated two-account qualification
29
+ remains required; `--all-users` is unsupported.
30
+
31
+ ### Fixed
32
+
33
+ - Contain Windows bridge descendants in a kill-on-close Job Object before any
34
+ workload starts, preventing nested cmd/Node trees from surviving abrupt bridge
35
+ loss. Fail startup if containment cannot be established.
36
+ - Preserve existing task security during legacy migration instead of resubmitting
37
+ its owner, allowing an ordinary user to update an eligible Administrators-owned
38
+ task without changing its permissions.
39
+ - Handle Task Scheduler's equivalent XML serialization during post-write checks
40
+ and restoration, including rediscovery after rollback. Keep raw revision
41
+ preconditions, original backups and complete resource-security checks intact.
42
+ - Avoid Windows upgrade-authorization failures caused by slow thread enumeration
43
+ and already-terminated thread records while retaining complete identity and
44
+ authority checks.
45
+ - Capture larger legacy process trees with bounded discovery and distinguish
46
+ reused parent PIDs from proven descendant relationships.
47
+ - Recheck shared-session test cooldown deadlines after early timer delivery before
48
+ acquiring a replacement generation.
49
+ - Wait for the metrics test process and its stdio to close before removing fixture files.
50
+ - Pin the Windows process-lifetime and task-channel helpers to their own packaged directory
51
+ instead of inheriting the caller's working directory. A process's working directory cannot
52
+ be removed on Windows, so a detached helper previously blocked removal of the instance,
53
+ configuration and staging directories with `EPERM`.
54
+ - Report the native refusal reason when the task channel declines a request, instead of a
55
+ bare refusal with no cause.
56
+
57
+ ### Security
58
+
59
+ - Refuse elevated or unverified default Windows upgrade and recovery before
60
+ staging, task writes or runtime launch, preserving the original runtime authority.
61
+ - Raise the CLI's `smol-toml` floor to `1.9.0`.
62
+ - Move the dashboard build to Tailwind CSS `4.3.3`, removing the vulnerable
63
+ `braces` and `postcss-selector-parser` dependency paths, and pin `source-map-js`
64
+ to `1.2.2`.
65
+ - Retire the 2.0.2 producer exception from fresh native and OSV scans. New releases
66
+ require complete clean producer evidence; historical receipts retain their
67
+ original source bindings and expiry.
68
+
69
+ ### Changed
70
+
71
+ - **Breaking for privileged callers.** The bridge, supervisor and default upgrades now verify
72
+ the caller before any runtime work and refuse an elevated or root caller at startup with
73
+ `User-runtime execution refused: …`. This is not Windows-only and not upgrade-only: on Linux
74
+ and macOS a `root` process is refused, which includes the default user in most container
75
+ images. There is no override; run as an ordinary account. Shipping this in a minor release is
76
+ deliberate — the previous behaviour let a bridge run with authority it could not verify.
77
+ - Update the Tailwind PostCSS adapter, class-merging dependency, generated dashboard
78
+ assets and license attribution while retaining the existing theme configuration.
79
+
80
+ ## [2.0.2] - 2026-10-06
11
81
 
12
82
  ### Fixed
13
83
 
@@ -475,6 +545,10 @@ one is a trap for anyone building something similar.
475
545
  - Do not report a teardown the bridge initiated as a crash. `taskkill /F` exits non-zero, so
476
546
  every recycle, idle reap and session close was recorded as a failure, burying real ones.
477
547
 
548
+ [Unreleased]: https://github.com/girishkvs/mcp-pacemaker/compare/v2.1.0...HEAD
549
+ [2.1.0]: https://github.com/girishkvs/mcp-pacemaker/releases/tag/v2.1.0
550
+ [2.0.2]: https://github.com/girishkvs/mcp-pacemaker/releases/tag/v2.0.2
551
+ [2.0.1]: https://github.com/girishkvs/mcp-pacemaker/releases/tag/v2.0.1
478
552
  [2.0.0]: https://github.com/girishkvs/mcp-pacemaker/releases/tag/v2.0.0
479
553
  [1.3.0]: https://github.com/girishkvs/mcp-pacemaker/releases/tag/v1.3.0
480
554
  [1.2.0]: https://github.com/girishkvs/mcp-pacemaker/releases/tag/v1.2.0
package/CONTRIBUTING.md CHANGED
@@ -18,12 +18,16 @@ part of its security posture. The setup CLI and the dashboard may use dependenci
18
18
 
19
19
  ## Lockfiles must resolve to the public registry
20
20
 
21
- CI fails any lockfile containing a `resolved` URL outside `registry.npmjs.org`. If you work
22
- behind a private mirror, re-resolve before committing:
21
+ CI fails any lockfile containing a `resolved` URL outside `registry.npmjs.org`.
22
+ Do not bypass a required registry policy to produce those URLs. Restore through the
23
+ approved registry and preserve exact package names, versions and verified archive
24
+ integrities when canonicalizing mirror-specific URLs for the public lockfile.
25
+ Hosted CI must still restore the resulting lock from its configured registry.
23
26
 
24
- ```bash
25
- npm install --registry https://registry.npmjs.org
26
- ```
27
+ For npm 12 mirrors whose metadata and tarball URLs have different prefixes,
28
+ `replace-registry-host` supports command-local URL-prefix mapping back through the
29
+ approved registry. This does not require relaxing `allow-remote`, disabling TLS,
30
+ changing global settings or committing a private registry configuration.
27
31
 
28
32
  ## Tests
29
33
 
@@ -35,8 +39,13 @@ Tests are `node:test` only, no framework. Each test file that starts a bridge ow
35
39
  ports, because files run in parallel; the current allocation is listed at the top of
36
40
  `test/auth-token.test.mjs`. Pick unused ones for a new file.
37
41
 
38
- Before submitting, run the complete `npm test` command with its normal file concurrency.
39
- Focused or serialized runs help diagnose failures but do not replace that run. Record the
42
+ Before submitting, run the complete `npm test` command with its normal file concurrency
43
+ (`--test-concurrency=4`, matching the four vCPUs on hosted runners). CI and the local
44
+ publication gate go through `npm run test:contract -- <name>` instead, which adds the
45
+ execution-context preflight and, on Windows, splits the suite into the ordinary-account lane
46
+ and the session lane; `npm run test:contract -- source --check` reports what a lane would run
47
+ without running it. Focused or serialized runs help diagnose failures but do not replace that
48
+ run. Record the
40
49
  exact Node and npm versions, OS, architecture, and command; matching only the Node major is
41
50
  not enough to reproduce a CI failure.
42
51
 
@@ -63,6 +72,14 @@ platform; Windows also exercises the real executable. Those checks do not replac
63
72
  byte-for-byte rebuild, and a rolling CI image may not contain the recorded compiler.
64
73
  No compiler or PowerShell host runs in the production config-write path.
65
74
 
75
+ Windows bridge lifetime containment uses a **separate** packaged helper. Build
76
+ and byte-for-byte verify it with `tools/windows-process-lifetime/build.ps1` and
77
+ `-Verify`; see its README for the ownership and failure contract. Do not change
78
+ the immutable config-security helper to update the lifetime helper. Run both
79
+ `test/windows-process-lifetime.test.mjs` and `test/windows-lifetime-startup.test.mjs`
80
+ on supported Windows/Node versions. They retain owned PID/creation-time cleanup
81
+ receipts and TCP heartbeat observations outside Git.
82
+
66
83
  Batch tests must cover the full five-second trailing debounce, merging complete snapshots,
67
84
  Reload now, requests during a flip, stale active revisions, whole-batch Cancel/Undo and late
68
85
  commit outcomes. Use controlled clocks for scheduling boundaries and real file/HTTP cases for
@@ -77,9 +94,17 @@ sleeping a fixed interval.
77
94
 
78
95
  ## Real-version compatibility gates
79
96
 
97
+ The dashboard uses the Tailwind 4 PostCSS adapter. Its optimizer stays disabled
98
+ until generated selectors and license attribution have been checked; Vite still
99
+ minifies the final CSS. Keep the inline Vite and standalone PostCSS settings
100
+ consistent, and run the UI tests before regenerating the dashboard and notices.
101
+
80
102
  These are separate, mandatory CI gates, not substitutes for `npm test`. The root CI job runs
81
- CLI/API pairs on Windows, Linux and macOS with Node 20, 22 and 24. The Linux/Node 22 UI
82
- job runs one Chromium browser matrix after building the dashboard.
103
+ CLI/API pairs on Linux and macOS with Node 20, 22 and 24. The Windows pair runs in the
104
+ `windows-ordinary` job through `tools/windows-ci/ci-ordinary-user.ps1 -Contract compatibility`,
105
+ which prepares, exercises and removes its fixtures inside a disposable standard account: the
106
+ fixtures record the temp root that owns them, so an administrator-prepared pair is refused. The
107
+ Linux/Node 22 UI job runs one Chromium browser matrix after building the dashboard.
83
108
 
84
109
  ```bash
85
110
  npm ci
@@ -111,13 +136,14 @@ The same harness runs in both maintained branches:
111
136
 
112
137
  | Preparation | Selected legacy / current pair |
113
138
  |---|---|
114
- | Default in the selected 2.0.2 checkout | Immutable 1.3.0 / packed 2.0.2 |
139
+ | Default in the selected 2.1.0 checkout | Immutable 1.3.0 / packed 2.1.0 |
115
140
  | Default in the 1.3.1 checkout | Packed 1.3.1 / immutable 2.0.0 |
116
141
  | `npm run compat:prepare:baseline` | Immutable 1.3.0 / immutable 2.0.0 |
117
- | `npm run compat:prepare -- --peer-root <opposite-patch-checkout>` | Packed 1.3.1 / packed 2.0.2 |
142
+ | `npm run compat:prepare -- --peer-root <opposite-patch-checkout>` | Packed explicit 1.x peer / packed 2.1.0 |
118
143
 
119
- These selections are not qualification evidence. The selected 1.3.1/2.0.2 pair
120
- requires fresh exact-byte gates; earlier 1.3.1/2.0.1 results remain historical.
144
+ These selections are not qualification evidence. The 2.1.0 candidate requires fresh
145
+ exact-byte gates; selecting it does not select an opposite-major patch pair.
146
+ Earlier 1.3.1/2.0.2 and 1.3.1/2.0.1 results remain historical.
121
147
 
122
148
  Run both API and browser gates for the explicit patch pair before publishing either complete
123
149
  dual-major release set. The two default CI pairs alone do not establish that combined result.
package/README.md CHANGED
@@ -9,6 +9,10 @@ have their own dependencies.
9
9
  [Report a problem](https://github.com/girishkvs/mcp-pacemaker/issues) ·
10
10
  [Release notes](https://github.com/girishkvs/mcp-pacemaker/releases)
11
11
 
12
+ > This README describes **2.1.0**. Verify its npm availability before installing;
13
+ > a source branch or GitHub tag is not proof of publication.
14
+ > See the [release changes](CHANGELOG.md).
15
+
12
16
  MCP hosts — editors (VS Code, Cursor, Claude Desktop) **and** CLIs (Claude Code, Copilot CLI,
13
17
  Codex, Gemini) — run stdio MCP servers as child processes. When the host restarts, crashes, or
14
18
  exits (every one-shot CLI run), **those servers die**. `mcp-pacemaker` runs your servers as
@@ -26,16 +30,24 @@ is separate planned work.
26
30
 
27
31
  ## Quick start
28
32
 
29
- Install **mcp-pacemaker 2.0.2** from npm. Use a maintained **Node.js 22 or 24**
33
+ Install **mcp-pacemaker 2.1.0** from npm. Use a maintained **Node.js 22 or 24**
30
34
  release; Windows also needs PowerShell 7 and Windows Script Host.
31
35
  See [installation requirements](#install) before setup.
32
36
 
33
37
  ```bash
34
- npm install -g mcp-pacemaker@2.0.2
38
+ npm view mcp-pacemaker@2.1.0 version
39
+ npm install -g mcp-pacemaker@2.1.0
35
40
  mcp-pacemaker --version
36
41
  ```
37
42
 
38
- The version check prints `2.0.2` without running setup.
43
+ The version check prints `2.1.0` without running setup.
44
+
45
+ > **Run it as an ordinary user.** From 2.1.0 the bridge, supervisor and default upgrades
46
+ > refuse a privileged caller *at startup* — a non-administrator terminal on Windows and a
47
+ > **non-root** session on Linux/macOS, including the default `root` user in most containers.
48
+ > A refused start prints `User-runtime execution refused: …`. There is no override; run as a
49
+ > normal user instead. See the [user-runtime contract](docs/execution-context.md).
50
+
39
51
  Before setup, have a readable JSON host configuration containing server definitions, or
40
52
  prepare [`~/.mcp-pacemaker/servers.json`](#serversjson). Supported import sources are
41
53
  `vscode`, `cursor`, `claude` (Claude Desktop), `copilot-cli` and `gemini`.
@@ -150,13 +162,22 @@ Use a maintained **Node.js 22 or 24** release. Node 20 remains a compatibility t
150
162
  end-of-life, not a recommended secure runtime. The bridge has no npm runtime dependencies;
151
163
  the setup CLI and dashboard have their own dependencies.
152
164
 
165
+ **Run as an ordinary user.** From 2.1.0 the bridge, supervisor and default upgrades verify the
166
+ caller before any runtime work and refuse elevated or root callers at startup with
167
+ `User-runtime execution refused: …`. On Linux and macOS that includes `root`, which is the
168
+ default user in most container images, so run the bridge as a normal account there. The
169
+ [user-runtime contract](docs/execution-context.md) describes what is checked and why; explicit
170
+ Windows account administration has a separate
171
+ [controller/worker path](docs/account-upgrades.md).
172
+
153
173
  Install the released package from [npm](https://www.npmjs.com/package/mcp-pacemaker).
154
174
  Its repository link should point to
155
175
  [`girishkvs/mcp-pacemaker`](https://github.com/girishkvs/mcp-pacemaker).
156
176
  Use an exact version for a repeatable installation:
157
177
 
158
178
  ```bash
159
- npm install -g mcp-pacemaker@2.0.2
179
+ npm view mcp-pacemaker@2.1.0 version
180
+ npm install -g mcp-pacemaker@2.1.0
160
181
  mcp-pacemaker --version
161
182
  ```
162
183
 
@@ -214,12 +235,16 @@ for exact pairs; only the exact executed pairs are covered.
214
235
  | `install --client <host> [--port N]` | Wire one host (its own `--port` gives it its own bridge) |
215
236
  | `emit --client <host>` | Print the config entries without writing anything |
216
237
  | `start` / `stop` | Start or stop bridges (`--port` for one, else all) |
217
- | `upgrade [--self]` | Re-wire hosts; `--self` only prints same-major, exact-version installation guidance |
238
+ | `upgrade --to <version> [--plan] [--yes]` | Stage and replace one managed installation, including its CLI, preserving port/config/host wiring |
239
+ | `upgrade --to <version> --sxs [--port N]` | Keep the old instance and start an isolated new one; omitted port is OS-assigned |
240
+ | `upgrade --recover` | Resume or roll back an interrupted managed replacement from its durable journal |
241
+ | `[--instance <directory>]` | Select one installation when discovery finds several; valid before or after the command |
242
+ | `upgrade [--self]` | Legacy host repair; `--self` still prints same-major installation guidance only |
218
243
  | `update-check [--json]` | Compare the installed version with its maintained npm channel |
219
244
  | `uninstall` | Stop managed bridges, remove auto-start, restore available host-file `.bak` copies; native entries are not restored |
220
245
 
221
- > Package installation does not upgrade a running backend. `upgrade` rewires host configuration;
222
- > it does not replace package files, restart an adopted backend, or update its autostart path.
246
+ > Package installation alone does not upgrade a running backend. Use explicit `upgrade --to`
247
+ > for managed replacement. Bare `upgrade` retains the older host-repair behavior.
223
248
 
224
249
  > On start, pacemaker **probes the port**: it *adopts* an existing pacemaker bridge and *refuses to collide* with a foreign service (the wizard offers another port).
225
250
 
@@ -244,6 +269,227 @@ restored; record their original definitions separately and restore them through
244
269
 
245
270
  ### Replacing or rolling back a running installation
246
271
 
272
+ These managed-upgrade commands require **2.1.0 or newer**.
273
+ Version 2.0.2 does not include them.
274
+
275
+ Run the bridge, supervisor, default upgrades and recovery as an **ordinary user**:
276
+ a normal, non-administrator terminal on Windows and a non-root session on Linux/macOS.
277
+ The [user-runtime contract](docs/execution-context.md) rejects privileged or
278
+ unverified callers before runtime work, so a replacement does not inherit different
279
+ authority. Read-only plans remain available. Explicit Windows account administration has a separate
280
+ [controller/worker path and qualification requirements](docs/account-upgrades.md).
281
+
282
+ For a **stable managed instance created by this implementation**:
283
+
284
+ ```bash
285
+ mcp-pacemaker upgrade --to <exact-version> --plan
286
+ mcp-pacemaker upgrade --to <exact-version>
287
+ # Noninteractive confirmation of the displayed local plan:
288
+ mcp-pacemaker upgrade --to <exact-version> --yes
289
+
290
+ # Keep the existing service and host wiring:
291
+ mcp-pacemaker upgrade --to <exact-version> --sxs
292
+ mcp-pacemaker upgrade --to <exact-version> --sxs --port 9001
293
+ ```
294
+
295
+ `--to` requires canonical stable SemVer, not `latest`, a range, or a Git/file spec.
296
+ Selecting another major is explicit and printed in the plan; it is not a compatibility
297
+ claim. The target must ship the managed admission/readiness protocol. Older targets
298
+ without that protocol are rejected before interruption, including for automatic SxS ports.
299
+
300
+ Normal upgrades preserve the selected port: `--port` is valid **only with `--sxs`**.
301
+ Without an SxS port, the actual new loopback listener binds port 0 and stays open;
302
+ the OS-selected port is displayed and saved for later starts. The read-only plan says
303
+ “OS-assigned,” not a guessed port. An explicitly requested busy port fails without adoption.
304
+ SxS gets separate config, nonce, logs and session files. It preserves the source working
305
+ directory for relative server commands and does not rewire any host or enable pooling.
306
+
307
+ When discovery finds multiple instances, use the exact directory printed by setup/upgrade:
308
+
309
+ ```bash
310
+ mcp-pacemaker upgrade --instance <directory> --to <exact-version> --plan
311
+ mcp-pacemaker start --instance <directory>
312
+ mcp-pacemaker stop --instance <directory>
313
+ ```
314
+
315
+ `--instance <directory>` and `--instance=<directory>` work before or after the
316
+ command. Selection is normalized once, including paths with spaces; conflicting
317
+ selectors or port/config overrides are rejected before an action. Text after `--`
318
+ is not interpreted as a selector. An invalid explicit selection never falls back
319
+ to the default instance.
320
+ CLI port options use canonical decimal integers from 1 to 65535; scientific notation, hex,
321
+ signs, surrounding whitespace and zero-padded spellings are rejected before requests.
322
+
323
+ Selected `start`, `stop`, `reload`, `prewarm`, `status`, `doctor`, `top`, `logs`,
324
+ `dashboard`, version/help, and upgrade commands use the same instance context.
325
+ The TUI's recycle key uses that instance's port **and nonce directory**; logs use
326
+ its config directory. Bare `mcp-pacemaker --instance <directory>` shows status
327
+ even when SxS has no host-wiring state. Host setup/removal commands (`init`,
328
+ `import`, `install`, `uninstall`) are refused with `--instance`; selection alone
329
+ does not authorize rewriting host configuration or changing autostart.
330
+ Generated prewarm Cancel/Undo commands retain the selected instance and config,
331
+ so they resolve the same CLI version and nonce directory. Windows commands use
332
+ an encoded PowerShell launcher with an explicit native argument list to preserve
333
+ spaces, quotes and shell characters; unmanaged `--config` commands remain supported.
334
+
335
+ The stable per-instance launcher selects checked version directories. Upgrades never
336
+ overwrite a running package or rewrite per-version autostart tasks. The previous selection
337
+ and package are retained. The existing command entry point dispatches to the committed
338
+ version's CLI and its own dependencies: ordinary `--version`, `status`, `update-check`
339
+ and the next `upgrade` use that version. An unfinished activation keeps the previous
340
+ CLI available for recovery; rollback restores that CLI selection. SxS does not change
341
+ the default CLI. Use `--instance <directory>` to select its CLI explicitly.
342
+
343
+ Target dependencies are resolved into a private lock and restored with npm's archive
344
+ integrity checks before interruption. Both the lock and installed dependency files enter
345
+ the checked version inventory. Target CLI startup and version are checked before quiescing.
346
+ The target archive and resolved CLI dependencies require SHA-512 integrity metadata.
347
+ SHA-1-only or missing integrity information is rejected before interruption; the
348
+ upgrader does not downgrade its checks to accommodate a registry.
349
+ Acquisition uses the configured npm registry, or explicit
350
+ `--registry`, with no registry fallback or global npm changes. Existing npm permissions,
351
+ TLS, release-age policy and URL-prefix mapping remain in effect; lifecycle scripts are
352
+ disabled for acquisition. For npm 12 mirrors, use your approved command-local
353
+ `replace-registry-host` full-URL-prefix mapping back through that registry—not a
354
+ hard-coded mirror URL or public-registry bypass.
355
+
356
+ Download, archive integrity, package/engine/native-binary checks and an owned packaged
357
+ startup check finish before interruption. Admission then closes and waits up to eight
358
+ seconds for safe work to drain. Open MCP sessions and unresolved config transactions
359
+ currently cause a refusal; close/settle them and retry. No uncertain tool call or failed
360
+ configuration commit is replayed. This is a **short restart**, not socket handoff or
361
+ zero downtime. Clients and dashboard tabs may need a reload.
362
+
363
+ The supervisor persists admission hold **before** forwarding quiesce. A lost reply,
364
+ failed drain, bridge crash or replacement child does not release it. Only explicit
365
+ resume/recovery or a verified activation opens admission again. Upgrade stop is tied to
366
+ the drained generation; any replacement generation must remain held.
367
+
368
+ The activation journal blocks unattended starts after an interrupted transition.
369
+ Selection and launch intent are separate durable transitions. A selected target that
370
+ was provably never launched can recover using the exact previous stopped-generation
371
+ receipt. After launch intent, an empty port alone is not shutdown proof.
372
+ Recovery parses bounded instance/journal identities before checking executable
373
+ bytes. It fully verifies and runs the retained recovery CLI, so a damaged or
374
+ missing target file cannot prevent a safe pre-launch rollback. A damaged previous
375
+ package, stale identity or unknown journal still causes a refusal.
376
+
377
+ | Journal state | Recovery boundary |
378
+ |---|---|
379
+ | Prepared / quiescing | Explicitly resume the matching previous service |
380
+ | Stopping | Reconcile the exact drained generation |
381
+ | Stopped / selecting / selected | Require the previous completed-stop receipt; the target has no launch intent |
382
+ | Launching | Require a new held generation and verified shutdown; no empty-port inference |
383
+ | Rollback-selecting / rollback-selected | Require the durable rollback stop proof before selecting/restarting previous code |
384
+ | Rollback-launching | Require proof for the newly launched previous generation; otherwise refuse |
385
+ | Admitting / admitting-rollback | Admission may have occurred; no automatic rollback |
386
+ | Committed / rolled-back / aborted | No interrupted activation remains |
387
+
388
+ Automatic rollback is restricted to startup failure before target admission, with
389
+ unchanged configuration bytes, identity and security and verified shutdown. If admission
390
+ may have occurred, recovery refuses rather than overwriting user state.
391
+
392
+ ```bash
393
+ mcp-pacemaker upgrade --recover --instance <directory> --yes
394
+ ```
395
+
396
+ A crash can leave `upgrade.lock`. Recovery does not steal it based on a reusable PID.
397
+ Verify the original upgrader has exited, preserve the journal, and remove only that
398
+ instance's lock before recovery. Keep packages, configuration and transaction files.
399
+ Journal writes are file-flushed and atomically renamed; Windows directory-entry
400
+ durability across power loss is not claimed.
401
+
402
+ ### One-time Windows 1.3 restart migration
403
+
404
+ The normal `upgrade --to <exact-version>` confirmation also supports the exact known
405
+ **1.3.0 Windows supervisor/launcher and per-user task shape**, with one port in the
406
+ existing install state. Invoke an upgrade-capable CLI from a separate durable package;
407
+ do not overwrite the running 1.3 package first. `--plan` remains read-only.
408
+
409
+ This transition restarts **Pacemaker, not Windows**. Pause callers before confirming.
410
+ The interactive confirmation states that clients will disconnect and 1.3 cannot drain
411
+ or certify every in-flight HTTP outcome. Zero reported sessions or child PIDs does not
412
+ prove that HTTP calls finished. Ordinary `--yes` and unattended invocation refuse this
413
+ transition; there is no separate maintenance flag and no automatic call replay.
414
+
415
+ Target package, CLI dependencies, native identities and packaged startup are verified
416
+ before downtime. A separate broker retains handles for the selected supervisor, bridge
417
+ and a bounded set of provably owned descendants. Only the verified selected task is
418
+ held. Stop uses those handles and verifies their exit before starting the held target
419
+ on the same port. It does not use a name/PID kill or assume task disable stopped the
420
+ running supervisor. Configuration, host wiring and port remain unchanged; the existing
421
+ CLI entry dispatches the newly selected managed CLI.
422
+
423
+ Preparation stays outside managed discovery until the instance identity and recovery
424
+ journal are durable; the prepared directory is then published together. A pre-journal
425
+ I/O failure leaves the old installation discoverable. Failed preparation is retained,
426
+ not guessed safe to delete. A terminal rolled-back/aborted candidate is excluded only
427
+ after its bounded journal and legacy-source binding validate, so damaged target files
428
+ do not prevent retrying the still-running legacy installation.
429
+
430
+ The task's **resource owner and full security descriptor** are separate from its run-as
431
+ account. Planning and every task operation require owner/group/DACL/SACL/integrity
432
+ inspection through Task Scheduler. If the required security read is denied or unsupported,
433
+ migration refuses before touching the task; it does not enable privileges or elevate.
434
+ Existing-task updates preserve security rather than reassigning its owner: they clear
435
+ only the temporary definition's embedded descriptor, pass no replacement security
436
+ descriptor, disable automatic principal-ACE edits, and verify the complete raw resource
437
+ descriptor again afterward. Protected backups retain the original raw descriptor and XML.
438
+ Restoration requires exact equality of all non-XML registration/security fields and
439
+ Task Scheduler-normalized XML, ignoring only the exact embedded
440
+ `Task/RegistrationInfo/SecurityDescriptor` representation. Raw revision preconditions,
441
+ backups and the actual returned XML/hash are not rewritten; other metadata or XML drift refuses.
442
+ Concurrent or uncertain security changes require inspection, not permission repair.
443
+ The resource owner may be the runtime user or canonical builtin Administrators;
444
+ that does not change the run-as account. Default scope remains **current user**,
445
+ but Windows execution and recovery require a freshly verified ordinary caller
446
+ before staging or mutation; an elevated or unverified caller refuses rather than
447
+ launching a runtime with different authority. Read-only planning is unchanged.
448
+ Explicit original-account administration uses a task-only
449
+ trusted controller and an original-user worker; see
450
+ [account upgrade scope and qualification](docs/account-upgrades.md).
451
+ `--all-users` is explicitly unsupported.
452
+
453
+ The legacy receipt reports `legacyRootStopVerified`, `observedDescendantsStopped` and
454
+ `treeCompleteness: "unproven"` separately. This is **not** the modern Job Object
455
+ complete-descendant proof. Historical or uncaptured orphan processes cannot be fully
456
+ attributed; they are left untouched and the limitation is reported without claiming an
457
+ orphan count. The new managed runtime contains future children from birth.
458
+
459
+ Unknown package/task shapes, changed owner/generation/configuration, a failed captured
460
+ process stop, or a foreign listener prevent activation. A foreign listener is never
461
+ stopped. Original code and protected configuration/task backups are retained. A verified
462
+ pre-admission target failure can restore the original CLI and scoped task and verify a
463
+ fresh legacy backend; uncertain launch, registration or admission outcomes require
464
+ explicit recovery. No configuration is deleted or replayed.
465
+
466
+ | Legacy journal phase | Recovery boundary |
467
+ |---|---|
468
+ | `legacy-prepared` / `legacy-held` | Verify the original generations and unchanged state; restore only the recorded task hold |
469
+ | `legacy-holding` | Task write outcome may be unknown; inspect before recovery |
470
+ | `legacy-stopping` | Read-only captured-generation absence check; an incomplete observed set refuses recovery |
471
+ | `legacy-stopped` | Revalidate partial stop and free port before safe old-version rollback |
472
+ | `legacy-launching` / `legacy-wiring` | Require modern held-target shutdown proof; a closed port alone is insufficient |
473
+ | `legacy-admitting` | Traffic may have entered; no automatic rollback |
474
+ | Legacy rollback intent phases | An interrupted task/CLI/launch outcome is reported as uncertain, not retried blindly |
475
+ | `legacy-rolled-back` / `legacy-aborted` | Original installation remains selected; the staged managed candidate stays dormant |
476
+
477
+ A killed migration can also leave the profile's `legacy-upgrade/upgrade.lock`.
478
+ Verify that exact upgrader has exited before removing its lock; never steal it by PID
479
+ guessing. Preserve the journal and backup files.
480
+
481
+ This adapter does not support direct unregistered bridges, other legacy versions,
482
+ multiple legacy ports, Linux/macOS registrations, or legacy-source SxS. Targets must
483
+ declare `legacyRestartProtocol: 1`; older published targets without it refuse before
484
+ legacy downtime.
485
+
486
+ Managed SxS keeps its own verified package copy as well as separate runtime state.
487
+ If a crash happens during port-0 startup before the port is durably recorded, recovery
488
+ reports an unknown launch outcome rather than marking it safely aborted. Preserve
489
+ that instance and its journal until readiness or shutdown can be verified.
490
+
491
+ For an older installation requiring a separately verified manual migration:
492
+
247
493
  Do not overwrite a package directory while its supervisor or bridge is running. Workers and
248
494
  native helpers can load later, and dashboard assets are read from disk: replacement can mix
249
495
  old and new code even when the original process still reports its old version.
@@ -260,7 +506,8 @@ other major there replaces it. Separate ports do not isolate credentials, nonces
260
506
  session files: manual side-by-side operation needs separate durable code roots and separate
261
507
  configuration directories, plus separate host/HOME state for CLI-managed setup.
262
508
  `init/import --config` selects a source host configuration, not an isolated runtime profile.
263
- There is no package `--profile` or `MCP_HOME` switch. Do not use an unscoped stop/uninstall
509
+ There is no package `--profile` or `MCP_HOME` switch; managed SxS uses explicit instance
510
+ directories instead. Do not use an unscoped stop/uninstall
264
511
  operation when another instance must remain running.
265
512
 
266
513
  ## Dashboards
@@ -192,7 +192,7 @@ SOFTWARE.
192
192
  */
193
193
 
194
194
  ==============================================================================
195
- tailwindcss@3.4.19
195
+ tailwindcss@4.3.3
196
196
  Declared license: MIT
197
197
 
198
198
  --- LICENSE ---
@@ -218,33 +218,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
218
218
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
219
219
  SOFTWARE.
220
220
 
221
- --- lib/css/LICENSE ---
222
- MIT License
223
-
224
- Copyright (c) Nicolas Gallagher
225
- Copyright (c) Jonathan Neal
226
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
227
- Copyright (c) Adam Wathan
228
- Copyright (c) Jonathan Reinink
229
-
230
- Permission is hereby granted, free of charge, to any person obtaining a copy
231
- of this software and associated documentation files (the "Software"), to deal
232
- in the Software without restriction, including without limitation the rights
233
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
234
- copies of the Software, and to permit persons to whom the Software is
235
- furnished to do so, subject to the following conditions:
236
-
237
- The above copyright notice and this permission notice shall be included in all
238
- copies or substantial portions of the Software.
239
-
240
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
241
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
242
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
243
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
244
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
245
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
246
- SOFTWARE.
247
-
248
221
  ==============================================================================
249
222
  vite@7.3.6
250
223
  Declared license: MIT