mcp-pacemaker 2.0.1 → 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 +105 -1
  2. package/CONTRIBUTING.md +49 -13
  3. package/README.md +361 -60
  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/README.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # mcp-pacemaker
2
2
 
3
- **Keep your MCP servers alive across editor restarts, reboots, and token expiry.** The long-running bridge is dependency-free; a small CLI (commander · clack · picocolors) handles setup.
3
+ **A local process supervisor and transport bridge for your MCP servers.** Manage server
4
+ lifetime outside your editor or CLI, with opt-in pre-warming and compatible session sharing.
5
+ The long-running bridge has no third-party runtime dependencies; the setup CLI and dashboards
6
+ have their own dependencies.
7
+
8
+ [Install from npm](https://www.npmjs.com/package/mcp-pacemaker) ·
9
+ [Report a problem](https://github.com/girishkvs/mcp-pacemaker/issues) ·
10
+ [Release notes](https://github.com/girishkvs/mcp-pacemaker/releases)
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).
4
15
 
5
16
  MCP hosts — editors (VS Code, Cursor, Claude Desktop) **and** CLIs (Claude Code, Copilot CLI,
6
17
  Codex, Gemini) — run stdio MCP servers as child processes. When the host restarts, crashes, or
@@ -19,36 +30,53 @@ is separate planned work.
19
30
 
20
31
  ## Quick start
21
32
 
22
- This README describes **2.0.x**. The current line is 2.x; the explicit maintenance line is
23
- 1.3.x. See the [legacy documentation](https://github.com/girishkvs/mcp-pacemaker/blob/v1.3.1/README.md)
24
- for its immediate-save behavior and [support policy](SECURITY.md#supported-versions).
33
+ Install **mcp-pacemaker 2.1.0** from npm. Use a maintained **Node.js 22 or 24**
34
+ release; Windows also needs PowerShell 7 and Windows Script Host.
35
+ See [installation requirements](#install) before setup.
25
36
 
26
- Compatibility gates distinguish immutable **1.3.0 / 2.0.0** from the **1.3.1 / 2.0.1** candidates.
27
- A 2.x client handles legacy immediate saves. A 1.x client cannot write pooling settings to a
28
- 2.x bridge: update the CLI and refresh old dashboard tabs. Before downgrading, settle pending
29
- or interrupted transactions with 2.x. See the [real-version gates](CONTRIBUTING.md#real-version-compatibility-gates)
30
- for exact pairs; other minor versions are not covered.
37
+ ```bash
38
+ npm view mcp-pacemaker@2.1.0 version
39
+ npm install -g mcp-pacemaker@2.1.0
40
+ mcp-pacemaker --version
41
+ ```
42
+
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
+
51
+ Before setup, have a readable JSON host configuration containing server definitions, or
52
+ prepare [`~/.mcp-pacemaker/servers.json`](#serversjson). Supported import sources are
53
+ `vscode`, `cursor`, `claude` (Claude Desktop), `copilot-cli` and `gemini`.
54
+ Codex and Claude Code are wiring destinations, not import sources.
55
+
56
+ Then run interactive setup:
31
57
 
32
58
  ```bash
33
- npm i -g github:girishkvs/mcp-pacemaker#v2.0.1
34
59
  mcp-pacemaker init
35
60
  ```
36
61
 
37
- That one command does the whole setup:
62
+ `init` detects supported hosts, imports **one source host** (or reuses `servers.json`),
63
+ asks for confirmation before wiring the selected hosts, registers OS auto-start and
64
+ starts the bridge. Reload or restart the selected hosts afterward.
38
65
 
39
- 1. **detects** every MCP host you have installed — editors and CLIs,
40
- 2. **imports** the servers already configured in them into `~/.mcp-pacemaker/servers.json`,
41
- 3. **rewrites** each host's config to point at the bridge (backing every file up first),
42
- 4. **registers** OS auto-start so the bridge returns after a reboot,
43
- 5. **starts** the bridge and prints what it wired.
66
+ **Setup changes local configuration and auto-start.** Importing can create or update
67
+ `servers.json` before the wiring confirmation. Existing JSON/TOML host files get a `.bak`
68
+ before replacement; native Claude Code registrations do not. Keep your own protected
69
+ configuration backup, especially before repeating setup.
44
70
 
45
- Nothing is written before you see it: `mcp-pacemaker plan --client <host>` shows the exact
46
- changes, every config write leaves a `.bak`, and `mcp-pacemaker uninstall` restores them.
71
+ `--from` chooses the import source; `--client` chooses wiring destinations. For example,
72
+ `mcp-pacemaker init --from vscode --client codex` imports VS Code's definitions and wires
73
+ Codex. Without `--from`, setup prefers the first detected JSON host; it does not merge
74
+ every detected host. Omit `--yes` to keep the confirmation prompt.
47
75
 
48
- After setup, bare `mcp-pacemaker` reports status:
76
+ Check the running bridge:
49
77
 
50
78
  ```bash
51
- mcp-pacemaker # status: bridges, wired hosts, servers
79
+ mcp-pacemaker status # status without entering first-run setup
52
80
  mcp-pacemaker top # live terminal dashboard
53
81
  mcp-pacemaker doctor # diagnose config, reachability, wiring
54
82
  ```
@@ -56,12 +84,12 @@ mcp-pacemaker doctor # diagnose config, reachability, wiring
56
84
  <details>
57
85
  <summary>Prefer to drive it yourself? The same steps, one at a time</summary>
58
86
 
59
- Every command takes any host id — `vscode`, `cursor`, `claude`, `claude-code`, `copilot-cli`,
60
- `codex`, `gemini` (see [Supported hosts](#supported-hosts)). `--from` / `--client` below are
61
- just examples; substitute whichever you use.
87
+ `plan`, `install` and `emit` accept any [supported host](#supported-hosts) as a wiring target.
88
+ `import --from` accepts the five JSON import sources listed above. Run import first unless
89
+ you already have `servers.json`; `plan` needs that file.
62
90
 
63
91
  ```bash
64
- mcp-pacemaker import --from <host> # build servers.json from an existing host
92
+ mcp-pacemaker import --from <source> # write servers.json from one JSON host config
65
93
  mcp-pacemaker plan --client <host> # dry run: show what install would change
66
94
  mcp-pacemaker install --client <host> # wire one host (--port N gives it its own bridge)
67
95
  mcp-pacemaker start # start the bridge
@@ -81,23 +109,32 @@ them in.
81
109
 
82
110
  </details>
83
111
 
84
- ## Why not just use supergateway / mcp-proxy?
112
+ ## Which process-sharing mode?
85
113
 
86
- Those are great, mature stdio↔SSE bridges. `mcp-pacemaker` targets a different problem —
87
- *durable local hosting on a dev workstation* — and adds things they don't:
114
+ Sharing a bridge does not automatically share a server process.
88
115
 
89
- | | supergateway | mcp-proxy | **mcp-pacemaker** |
90
- |---|---|---|---|
91
- | stdio → SSE | ✅ | ✅ | ✅ |
92
- | Streamable HTTP | ✅ | ✅ | ✅ |
93
- | Dependencies | npm tree | PyPI tree | **bridge: zero** · tiny setup CLI |
94
- | Process supervision | ❌ | ❌ | ✅ |
95
- | OS auto-start (logon / unlock / boot) | ❌ | ❌ | ✅ (Windows / macOS / Linux) |
96
- | Dynamic per-request token (from a CLI, auto-refresh) | ❌ (static) | ❌ (static/OAuth2) | ✅ |
97
- | Sessions survive the bridge restarting | ❌ | ❌ | ✅ |
98
- | Scheduled recycle for interactively-authenticated servers | ❌ | ❌ | ✅ |
99
- | One-command import + client wiring | ❌ | ❌ | ✅ |
100
- | Web + terminal dashboard, HTTP API | ❌ | ❌ | ✅ |
116
+ | Mode | Process behavior | Use when |
117
+ |---|---|---|
118
+ | `isolated` (default) | One child per session | The server needs per-client workspace, account or conversation state |
119
+ | `pool` (opt-in) | Pre-started, uninitialized children; each is assigned exclusively to one session | Startup is slow but sessions must remain separate |
120
+ | `shared` (opt-in) | One initialized child for compatible sessions | Tools are stateless, inputs are explicit and the credential context is common |
121
+
122
+ Shared clients must send identical initialization parameters, including `clientInfo`, and
123
+ empty client capabilities. It is not automatic cross-editor sharing. See
124
+ [shared-mode limits](#shared-mode) before enabling it.
125
+
126
+ ## Choosing a transport tool
127
+
128
+ Documentation checked September 27, 2026; this is a use-case guide, not a feature benchmark.
129
+
130
+ | Tool | Consider it when |
131
+ |---|---|
132
+ | [Supergateway](https://github.com/supercorp-ai/supergateway) | You want command-line conversion between stdio and HTTP/SSE/WebSocket transports |
133
+ | [mcp-proxy](https://github.com/sparfenyuk/mcp-proxy) | You want a Python-based adapter between local stdio clients/servers and remote MCP transports |
134
+ | **mcp-pacemaker** | You want workstation process supervision, host wiring, auto-start, lifecycle diagnostics and explicit isolation/pooling/sharing policies |
135
+
136
+ These projects have overlapping capabilities. Reconnecting to a fresh server is not recovery
137
+ of arbitrary application state, and a transport bridge is not a sandbox for untrusted tools.
101
138
 
102
139
  ## Supported hosts
103
140
 
@@ -125,26 +162,34 @@ Use a maintained **Node.js 22 or 24** release. Node 20 remains a compatibility t
125
162
  end-of-life, not a recommended secure runtime. The bridge has no npm runtime dependencies;
126
163
  the setup CLI and dashboard have their own dependencies.
127
164
 
128
- GitHub and npm publication are separate. Until the npm release is announced from
129
- [this repository](https://github.com/girishkvs/mcp-pacemaker/releases), use the pinned GitHub
130
- release. Do not assume that an npm package with a matching name is this project.
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
+
173
+ Install the released package from [npm](https://www.npmjs.com/package/mcp-pacemaker).
174
+ Its repository link should point to
175
+ [`girishkvs/mcp-pacemaker`](https://github.com/girishkvs/mcp-pacemaker).
176
+ Use an exact version for a repeatable installation:
131
177
 
132
178
  ```bash
133
- npm i -g github:girishkvs/mcp-pacemaker#v2.0.1
134
- # Deliberate legacy installation instead:
135
- npm i -g github:girishkvs/mcp-pacemaker#v1.3.1
179
+ npm view mcp-pacemaker@2.1.0 version
180
+ npm install -g mcp-pacemaker@2.1.0
181
+ mcp-pacemaker --version
136
182
  ```
137
183
 
138
- After npm publication, `mcp-pacemaker@latest` selects the current 2.x line and
139
- `mcp-pacemaker@legacy` selects maintained 1.3.x. Verify the official listing's repository and
140
- maintainer before installing. For a repeatable installation, choose an exact released version:
184
+ The current line uses the `latest` npm channel; the maintenance line uses `legacy` when that
185
+ channel has been published. Check the actual registry values before choosing a channel:
141
186
 
142
187
  ```bash
143
- npm i -g mcp-pacemaker@2.0.1
144
- # Or, deliberately:
145
- npm i -g mcp-pacemaker@1.3.1
188
+ npm view mcp-pacemaker dist-tags --json
146
189
  ```
147
190
 
191
+ GitHub tags and npm publication are separate: a tag does not establish that the same
192
+ version or channel is available on npm, or that its package bytes are identical.
148
193
  `@1` and `@2` are version ranges, not the maintained channels. They can select a version
149
194
  withdrawn from a channel. `upgrade --self` resolves the installed major's channel and prints
150
195
  an exact-version command; it never installs or downgrades anything.
@@ -158,11 +203,26 @@ Automatic configuration edits need .NET Framework 4.6.2 or newer. The bundled he
158
203
  unsigned; npm provenance is not Authenticode signing or an application-control allowlist.
159
204
  Windows ARM64 is not validated.
160
205
 
206
+ ### Version compatibility
207
+
208
+ This README describes **2.0.x**. For 1.3.x immediate-save behavior, see the
209
+ [legacy documentation](https://github.com/girishkvs/mcp-pacemaker/blob/v1.3.1/README.md)
210
+ and [support policy](SECURITY.md#supported-versions). Those documents do not establish
211
+ that a legacy version is available on npm.
212
+
213
+ The historical baselines remain **1.3.0 / 2.0.0**. The earlier **1.3.1 / 2.0.1**
214
+ patch-pair evidence is not transferable to a new release. The selected **1.3.1 / 2.0.2**
215
+ pair requires fresh exact-byte compatibility and service-replacement gates.
216
+ A 2.x client handles legacy immediate saves. A 1.x client cannot write pooling settings to a
217
+ 2.x bridge: update the CLI and refresh old dashboard tabs. Before downgrading, settle pending
218
+ or interrupted transactions with 2.x. See the [real-version gates](CONTRIBUTING.md#real-version-compatibility-gates)
219
+ for exact pairs; only the exact executed pairs are covered.
220
+
161
221
  ### Command reference
162
222
 
163
223
  | Command | What it does |
164
224
  |---|---|
165
- | `init [--client a,b] [--yes]` | **The one you want.** Detect hosts, import, wire, auto-start, launch |
225
+ | `init [--from source] [--client a,b] [--yes]` | Interactive setup: import one source, wire selected hosts, auto-start, launch |
166
226
  | `status` | Bridges, wired hosts, servers, and any server currently failing |
167
227
  | `reload` | Re-read `servers.json` into the running bridge without restarting it |
168
228
  | `doctor` | Diagnose config, bridge reachability, host wiring |
@@ -171,16 +231,20 @@ Windows ARM64 is not validated.
171
231
  | `logs [--follow] [--since 2h] [--server name] [--grep text]` | Read and filter durable logs, including retained rotation |
172
232
  | `top` / `dashboard` | Live terminal UI / web dashboard |
173
233
  | `plan --client <host>` | Dry run — show exactly what `install` would change |
174
- | `import --from <host>` | Build `~/.mcp-pacemaker/servers.json` from an existing host |
234
+ | `import --from <source>` | Build `~/.mcp-pacemaker/servers.json` from one supported JSON host config |
175
235
  | `install --client <host> [--port N]` | Wire one host (its own `--port` gives it its own bridge) |
176
236
  | `emit --client <host>` | Print the config entries without writing anything |
177
237
  | `start` / `stop` | Start or stop bridges (`--port` for one, else all) |
178
- | `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 |
179
243
  | `update-check [--json]` | Compare the installed version with its maintained npm channel |
180
- | `uninstall` | Stop the bridge, remove auto-start, restore configs from `.bak` |
244
+ | `uninstall` | Stop managed bridges, remove auto-start, restore available host-file `.bak` copies; native entries are not restored |
181
245
 
182
- > Package installation does not upgrade a running backend. `upgrade` rewires host configuration;
183
- > 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.
184
248
 
185
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).
186
250
 
@@ -198,10 +262,234 @@ relying on an implicit socket-location fallback.
198
262
  Isolated and pooled stdio servers support HTTP+SSE (`/<name>/sse`) and Streamable HTTP
199
263
  (`/<name>/mcp`). Shared mode requires Streamable HTTP.
200
264
 
201
- `install` writes a `.bak` of your client config before touching it, and `uninstall` restores it.
265
+ `install` backs up an existing JSON/TOML host file to `.bak`; repeating it replaces that backup.
266
+ `uninstall` restores available host-file backups, leaves files without backups as-is, and
267
+ keeps `servers.json`. Native Claude Code registrations are not backed up or automatically
268
+ restored; record their original definitions separately and restore them through Claude Code.
202
269
 
203
270
  ### Replacing or rolling back a running installation
204
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
+
205
493
  Do not overwrite a package directory while its supervisor or bridge is running. Workers and
206
494
  native helpers can load later, and dashboard assets are read from disk: replacement can mix
207
495
  old and new code even when the original process still reports its old version.
@@ -218,7 +506,8 @@ other major there replaces it. Separate ports do not isolate credentials, nonces
218
506
  session files: manual side-by-side operation needs separate durable code roots and separate
219
507
  configuration directories, plus separate host/HOME state for CLI-managed setup.
220
508
  `init/import --config` selects a source host configuration, not an isolated runtime profile.
221
- 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
222
511
  operation when another instance must remain running.
223
512
 
224
513
  ## Dashboards
@@ -607,7 +896,19 @@ See [the shared-session contract](docs/shared-sessions.md) for limits and failur
607
896
  ## Uninstall
608
897
 
609
898
  ```bash
610
- npx mcp-pacemaker uninstall # stop bridge, remove auto-start, restore client config from .bak
899
+ mcp-pacemaker uninstall # use the CLI from the matching installed version
900
+ ```
901
+
902
+ This stops managed bridges, removes auto-start entries and restores available host-file
903
+ backups. It leaves files without backups and native Claude Code registrations unchanged.
904
+ It is not scoped to one port; review [replacement and rollback](#replacing-or-rolling-back-a-running-installation)
905
+ first if another instance must remain running. Do not fetch a different CLI with `npx`
906
+ to remove an existing installation.
907
+
908
+ After the installed service has been removed successfully, remove the global npm package:
909
+
910
+ ```bash
911
+ npm uninstall -g mcp-pacemaker
611
912
  ```
612
913
 
613
914
  ## Project
@@ -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