mcp-pacemaker 2.1.0 → 2.1.1
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/CHANGELOG.md +98 -2
- package/CONTRIBUTING.md +10 -3
- package/README.md +98 -760
- package/autostart/windows/legacy-access.ps1 +359 -0
- package/bin/account-upgrade-controller.mjs +1 -1
- package/bin/account-upgrade-worker.mjs +7 -0
- package/bin/cli-main.mjs +61 -5
- package/bin/dependency-lock.json +642 -0
- package/bin/legacy-access.mjs +73 -0
- package/bin/legacy-installation.mjs +75 -19
- package/bin/legacy-task.mjs +24 -0
- package/bin/legacy-upgrade.mjs +66 -10
- package/bin/managed-upgrade.mjs +102 -12
- package/bin/mcp-bridge.mjs +38 -20
- package/bin/prewarm.mjs +28 -6
- package/bin/service-control.mjs +10 -5
- package/bin/upgrade-capability.json +2 -1
- package/bin/upgrade-dependencies.mjs +67 -6
- package/bin/upgrade-package.mjs +2 -0
- package/bin/windows-legacy/LegacyProcessBroker.build.json +3 -3
- package/bin/windows-legacy/LegacyProcessBroker.exe +0 -0
- package/bin/windows-legacy/src/LegacyNative.cs +60 -11
- package/bin/windows-legacy/src/LegacyProcessBroker.cs +317 -197
- package/bin/windows-legacy-process.mjs +12 -5
- package/docs/account-upgrades.md +17 -4
- package/docs/compatibility.md +39 -0
- package/docs/configuration.md +146 -0
- package/docs/dashboards.md +125 -0
- package/docs/execution-context.md +11 -5
- package/docs/http-api.md +47 -0
- package/docs/install.md +52 -0
- package/docs/operations.md +99 -0
- package/docs/upgrades.md +324 -0
- package/package.json +10 -3
- package/tools/windows-legacy/README.md +118 -92
- package/tools/windows-legacy/inventory.mjs +8 -6
- package/ui/dist/third-party-manifest.json +1 -1
package/docs/upgrades.md
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
# Upgrades and rollback
|
|
2
|
+
|
|
3
|
+
How to replace a running installation, run a new version beside the old one with `--sxs`,
|
|
4
|
+
recover an interrupted upgrade, and move a Windows 1.3.0 installation. The
|
|
5
|
+
[README](../README.md#upgrades) has the short version.
|
|
6
|
+
|
|
7
|
+
## What an upgrade keeps and what it ends
|
|
8
|
+
|
|
9
|
+
An upgrade restarts Pacemaker. It may end open sessions and calls in progress: clients
|
|
10
|
+
reconnect to the new version, and no call is retried. It never changes `servers.json` (the
|
|
11
|
+
server list and every server's settings stay exactly as they were) or your client setup.
|
|
12
|
+
Of everything clients and the dashboard do, only unfinished config work, such as a pooling
|
|
13
|
+
change still being saved or an unresolved config transaction, makes an upgrade refuse. A
|
|
14
|
+
refused upgrade puts the current version back in service; let the work finish and retry. If
|
|
15
|
+
that work is still settling, the upgrader keeps trying to resume the current version for up
|
|
16
|
+
to ten seconds. If it still cannot, the current version stays paused until
|
|
17
|
+
`mcp-pacemaker upgrade --recover --instance <directory> --yes` succeeds (for an
|
|
18
|
+
[explicit-account](account-upgrades.md) install,
|
|
19
|
+
`mcp-pacemaker --user <SID> --instance <directory> upgrade --recover`).
|
|
20
|
+
|
|
21
|
+
An upgrade is run by the installed version's CLI, so these rules apply from 2.1.1. A 2.1.0
|
|
22
|
+
bridge still refuses while any session is open, and after any client has dropped a stream.
|
|
23
|
+
To upgrade from 2.1.0, close your MCP clients, restart Pacemaker (`mcp-pacemaker stop`, then
|
|
24
|
+
`mcp-pacemaker start`) and run the upgrade before reconnecting them.
|
|
25
|
+
|
|
26
|
+
Versions before 2.1.1 also compare the session records (`sessions.json`) when they start.
|
|
27
|
+
Moving to one of them is refused before the download if that file is over 1 MiB, and rolls
|
|
28
|
+
back if the file cannot be read once the old version has stopped.
|
|
29
|
+
|
|
30
|
+
## Replacing or rolling back a running installation
|
|
31
|
+
|
|
32
|
+
These managed-upgrade commands require **2.1.0 or newer**.
|
|
33
|
+
Version 2.0.2 does not include them.
|
|
34
|
+
|
|
35
|
+
Run the bridge, supervisor, default upgrades and recovery as an **ordinary user**:
|
|
36
|
+
a normal, non-administrator terminal on Windows and a non-root session on Linux/macOS.
|
|
37
|
+
The [user-runtime contract](execution-context.md) rejects privileged or
|
|
38
|
+
unverified callers before runtime work, so a replacement does not inherit different
|
|
39
|
+
authority. Read-only plans remain available. Explicit Windows account administration has a separate
|
|
40
|
+
[controller/worker path and qualification requirements](account-upgrades.md).
|
|
41
|
+
|
|
42
|
+
For a **stable managed instance created by this implementation**:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
mcp-pacemaker upgrade --to <exact-version> --plan
|
|
46
|
+
mcp-pacemaker upgrade --to <exact-version>
|
|
47
|
+
# Noninteractive confirmation of the displayed local plan:
|
|
48
|
+
mcp-pacemaker upgrade --to <exact-version> --yes
|
|
49
|
+
|
|
50
|
+
# Keep the existing service and host wiring:
|
|
51
|
+
mcp-pacemaker upgrade --to <exact-version> --sxs
|
|
52
|
+
mcp-pacemaker upgrade --to <exact-version> --sxs --port 9001
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`--to` requires canonical stable SemVer, not `latest`, a range, or a Git/file spec.
|
|
56
|
+
Selecting another major is explicit and printed in the plan; it is not a compatibility
|
|
57
|
+
claim. The target must ship the managed admission/readiness protocol. Older targets
|
|
58
|
+
without that protocol are rejected before interruption, including for automatic SxS ports.
|
|
59
|
+
|
|
60
|
+
Normal upgrades preserve the selected port: `--port` is valid **only with `--sxs`**.
|
|
61
|
+
Without an SxS port, the actual new loopback listener binds port 0 and stays open;
|
|
62
|
+
the OS-selected port is displayed and saved for later starts. The read-only plan says
|
|
63
|
+
“OS-assigned,” not a guessed port. An explicitly requested busy port fails without adoption.
|
|
64
|
+
SxS gets separate config, nonce, logs and session files. It preserves the source working
|
|
65
|
+
directory for relative server commands and does not rewire any host or enable pooling.
|
|
66
|
+
|
|
67
|
+
When discovery finds multiple instances, use the exact directory printed by setup/upgrade:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
mcp-pacemaker upgrade --instance <directory> --to <exact-version> --plan
|
|
71
|
+
mcp-pacemaker start --instance <directory>
|
|
72
|
+
mcp-pacemaker stop --instance <directory>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`--instance <directory>` and `--instance=<directory>` work before or after the
|
|
76
|
+
command. Selection is normalized once, including paths with spaces; conflicting
|
|
77
|
+
selectors or port/config overrides are rejected before an action. Text after `--`
|
|
78
|
+
is not interpreted as a selector. An invalid explicit selection never falls back
|
|
79
|
+
to the default instance.
|
|
80
|
+
CLI port options use canonical decimal integers from 1 to 65535; scientific notation, hex,
|
|
81
|
+
signs, surrounding whitespace and zero-padded spellings are rejected before requests.
|
|
82
|
+
|
|
83
|
+
Selected `start`, `stop`, `reload`, `prewarm`, `status`, `doctor`, `top`, `logs`,
|
|
84
|
+
`dashboard`, version/help, and upgrade commands use the same instance context.
|
|
85
|
+
The TUI's recycle key uses that instance's port **and nonce directory**; logs use
|
|
86
|
+
its config directory. Bare `mcp-pacemaker --instance <directory>` shows status
|
|
87
|
+
even when SxS has no host-wiring state. Host setup/removal commands (`init`,
|
|
88
|
+
`import`, `install`, `uninstall`) are refused with `--instance`; selection alone
|
|
89
|
+
does not authorize rewriting host configuration or changing autostart.
|
|
90
|
+
Generated prewarm Cancel/Undo commands retain the selected instance and config,
|
|
91
|
+
so they resolve the same CLI version and nonce directory. Windows commands use
|
|
92
|
+
an encoded PowerShell launcher with an explicit native argument list to preserve
|
|
93
|
+
spaces, quotes and shell characters; unmanaged `--config` commands remain supported.
|
|
94
|
+
|
|
95
|
+
The stable per-instance launcher selects checked version directories. Upgrades never
|
|
96
|
+
overwrite a running package or rewrite per-version autostart tasks. The previous selection
|
|
97
|
+
and package are retained. The existing command entry point dispatches to the committed
|
|
98
|
+
version's CLI and its own dependencies: ordinary `--version`, `status`, `update-check`
|
|
99
|
+
and the next `upgrade` use that version. An unfinished activation keeps the previous
|
|
100
|
+
CLI available for recovery; rollback restores that CLI selection. SxS does not change
|
|
101
|
+
the default CLI. Use `--instance <directory>` to select its CLI explicitly.
|
|
102
|
+
|
|
103
|
+
From 2.1.1 a target ships the SHA-512 dependency lock it was released and tested with
|
|
104
|
+
(`bin/dependency-lock.json`, declared by `dependencyLock` in `bin/upgrade-capability.json`).
|
|
105
|
+
The upgrader installs exactly that lock with `npm ci`, so registry metadata cannot change
|
|
106
|
+
the staged dependency set, and mirrors that publish only SHA-1 checksums work. Its entries
|
|
107
|
+
name the public registry, which npm maps to your configured registry as it does for any
|
|
108
|
+
lock, including through a `replace-registry-host` URL-prefix mapping. When that setting is
|
|
109
|
+
`never` or names only another host, the upgrader points each entry at the registry that
|
|
110
|
+
resolving it would have used: your configured registry, or a package scope's registry.
|
|
111
|
+
Older targets without that lock have their dependencies resolved into a private lock as
|
|
112
|
+
before. Both the lock and installed
|
|
113
|
+
dependency files enter the checked version inventory, and npm verifies every archive before
|
|
114
|
+
interruption. Target CLI startup and version are checked before quiescing.
|
|
115
|
+
The target archive and every CLI dependency archive require SHA-512 integrity. A resolved
|
|
116
|
+
lock with SHA-1-only or missing integrity is rejected before interruption and names the
|
|
117
|
+
package; the upgrader does not downgrade its checks to accommodate a registry.
|
|
118
|
+
Acquisition uses the configured npm registry, or explicit
|
|
119
|
+
`--registry`, with no registry fallback or global npm changes. Existing npm permissions,
|
|
120
|
+
TLS, release-age policy and URL-prefix mapping remain in effect; lifecycle scripts are
|
|
121
|
+
disabled for acquisition. For npm 12 mirrors, use your approved command-local
|
|
122
|
+
`replace-registry-host` full-URL-prefix mapping back through that registry—not a
|
|
123
|
+
hard-coded mirror URL or public-registry bypass.
|
|
124
|
+
|
|
125
|
+
Download, archive integrity, package/engine/native-binary checks and an owned packaged
|
|
126
|
+
startup check finish before interruption. Admission then closes, and calls in progress and
|
|
127
|
+
config work get up to eight seconds to finish. A call made over the older SSE transport is
|
|
128
|
+
answered on its stream, so it gets no grace period. Open sessions, and calls still running
|
|
129
|
+
after that, end with the restart. Config work still unfinished then makes the upgrade
|
|
130
|
+
refuse, and the upgrader resumes the current version, trying for up to ten seconds while
|
|
131
|
+
that work settles; let the work finish and retry. No ended tool call or failed configuration
|
|
132
|
+
commit is replayed. This is a **short
|
|
133
|
+
restart**, not socket handoff or zero downtime. Clients and dashboard tabs may need a reload.
|
|
134
|
+
|
|
135
|
+
The supervisor persists admission hold **before** forwarding quiesce. A lost reply, bridge
|
|
136
|
+
crash or replacement child does not release it. After a definite refusal the upgrader
|
|
137
|
+
resumes the current version as described above; otherwise only explicit resume/recovery or a
|
|
138
|
+
verified activation opens admission again. Upgrade stop is tied to the drained generation;
|
|
139
|
+
any replacement generation must remain held.
|
|
140
|
+
|
|
141
|
+
The activation journal blocks unattended starts after an interrupted transition.
|
|
142
|
+
Selection and launch intent are separate durable transitions. A selected target that
|
|
143
|
+
was provably never launched can recover using the exact previous stopped-generation
|
|
144
|
+
receipt. After launch intent, an empty port alone is not shutdown proof.
|
|
145
|
+
Recovery parses bounded instance/journal identities before checking executable
|
|
146
|
+
bytes. It fully verifies and runs the retained recovery CLI, so a damaged or
|
|
147
|
+
missing target file cannot prevent a safe pre-launch rollback. A damaged previous
|
|
148
|
+
package, stale identity or unknown journal still causes a refusal.
|
|
149
|
+
|
|
150
|
+
| Journal state | Recovery boundary |
|
|
151
|
+
|---|---|
|
|
152
|
+
| Prepared / quiescing | Explicitly resume the matching previous service |
|
|
153
|
+
| Stopping | Reconcile the exact drained generation |
|
|
154
|
+
| Stopped / selecting / selected | Require the previous completed-stop receipt; the target has no launch intent |
|
|
155
|
+
| Launching | Require a new held generation and verified shutdown; no empty-port inference |
|
|
156
|
+
| Rollback-selecting / rollback-selected | Require the durable rollback stop proof before selecting/restarting previous code |
|
|
157
|
+
| Rollback-launching | Require proof for the newly launched previous generation; otherwise refuse |
|
|
158
|
+
| Admitting / admitting-rollback | Admission may have occurred; no automatic rollback |
|
|
159
|
+
| Committed / rolled-back / aborted | No interrupted activation remains |
|
|
160
|
+
|
|
161
|
+
Automatic rollback is restricted to startup failure before target admission, with
|
|
162
|
+
unchanged configuration bytes, identity and security and verified shutdown. If admission
|
|
163
|
+
may have occurred, recovery refuses rather than overwriting user state.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
mcp-pacemaker upgrade --recover --instance <directory> --yes
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
A crash can leave `upgrade.lock`. Recovery does not steal it based on a reusable PID.
|
|
170
|
+
Verify the original upgrader has exited, preserve the journal, and remove only that
|
|
171
|
+
instance's lock before recovery. Keep packages, configuration and transaction files.
|
|
172
|
+
Journal writes are file-flushed and atomically renamed; Windows directory-entry
|
|
173
|
+
durability across power loss is not claimed.
|
|
174
|
+
|
|
175
|
+
## One-time Windows 1.3 restart migration
|
|
176
|
+
|
|
177
|
+
The normal `upgrade --to <exact-version>` confirmation also supports the exact known
|
|
178
|
+
**1.3.0 Windows supervisor/launcher and per-user task shape**, with one port in the
|
|
179
|
+
existing install state. Invoke an upgrade-capable CLI from a separate durable package;
|
|
180
|
+
do not overwrite the running 1.3 package first. `--plan` remains read-only.
|
|
181
|
+
|
|
182
|
+
This transition restarts **Pacemaker, not Windows**. The 1.3 supervisor, its bridge and the
|
|
183
|
+
processes the bridge started are stopped, so open sessions and calls in progress end; clients
|
|
184
|
+
reconnect to the new version and no call is retried. The confirmation says so. `--yes`
|
|
185
|
+
confirms the plan shown without a prompt; without it, an unattended invocation refuses.
|
|
186
|
+
Run the upgrade from a terminal that the 1.3 bridge did not start. An upgrade started from
|
|
187
|
+
inside its tree, for example through an MCP server's shell, would stop itself, so it is
|
|
188
|
+
refused before anything changes. Once a 2.1.1 or newer upgrade has run against a 1.3
|
|
189
|
+
install, use 2.1.1 or newer for later attempts; 2.1.0 does not accept its records.
|
|
190
|
+
|
|
191
|
+
### 1.3 installs set up from an administrator terminal
|
|
192
|
+
|
|
193
|
+
When 1.3's autostart was set up from an administrator terminal, Windows makes
|
|
194
|
+
Administrators the owner of the task and lets your account only read it. Files the
|
|
195
|
+
administrator terminal created are owned by Administrators too. The upgrade must run as an
|
|
196
|
+
ordinary user, so it cannot change them. Planning (and `--plan`) checks the task and the
|
|
197
|
+
1.3 `bin\cli.mjs` first and stops before any process capture, download or change. The
|
|
198
|
+
message names each item.
|
|
199
|
+
|
|
200
|
+
Run this once from an administrator terminal, then run the upgrade from a normal terminal:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
mcp-pacemaker upgrade --fix-legacy-access --plan # shows the change; changes nothing
|
|
204
|
+
mcp-pacemaker upgrade --fix-legacy-access # asks, then applies it
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
It accepts only the exact 1.3 task and package that the upgrade accepts. It gives the task's
|
|
208
|
+
own run-as user full control of that task and makes that user the owner of the 1.3
|
|
209
|
+
`bin\cli.mjs`, nothing else. The task XML, triggers, run-as account and run level, the other
|
|
210
|
+
permission entries and the file contents stay the same and are checked afterwards. The task
|
|
211
|
+
keeps running as you, not elevated. Before it changes anything it records the previous
|
|
212
|
+
permissions in `legacy-upgrade\access-<time>.json` under the configuration directory. Other
|
|
213
|
+
missing permissions, such as delete rights on the file, are reported but not changed. Installs
|
|
214
|
+
set up from a normal terminal do not need this step.
|
|
215
|
+
|
|
216
|
+
Target package, CLI dependencies, native identities and packaged startup are verified
|
|
217
|
+
before downtime. A separate broker holds handles to the selected supervisor and bridge and
|
|
218
|
+
checks their identity. It does not list the bridge's session processes in the plan, because
|
|
219
|
+
a busy bridge starts and ends them every few seconds. Only the verified selected task is
|
|
220
|
+
held. Stop ends the supervisor first. Before it ends the bridge, it holds a handle to every
|
|
221
|
+
process under the bridge, because Node ends a process's direct children together with it
|
|
222
|
+
(1.3 runs each bare server command under `cmd.exe`) and their own children would otherwise
|
|
223
|
+
be left with no traceable parent. It then ends the bridge and stops everything it holds,
|
|
224
|
+
plus anything those processes started, up to 2048 processes. Each one is checked to have
|
|
225
|
+
exited. The supervisor and bridge must be proven stopped before the held target starts on
|
|
226
|
+
the same port; a process the bridge started that cannot be stopped is reported and left
|
|
227
|
+
running. It does not use a name/PID kill or assume task disable stopped the running
|
|
228
|
+
supervisor. Configuration, host wiring and port remain unchanged; the existing CLI entry
|
|
229
|
+
dispatches the newly selected managed CLI.
|
|
230
|
+
|
|
231
|
+
Preparation stays outside managed discovery until the instance identity and recovery
|
|
232
|
+
journal are durable; the prepared directory is then published together. A pre-journal
|
|
233
|
+
I/O failure leaves the old installation discoverable. Failed preparation is retained,
|
|
234
|
+
not guessed safe to delete. A terminal rolled-back/aborted candidate is excluded only
|
|
235
|
+
after its bounded journal and legacy-source binding validate, so damaged target files
|
|
236
|
+
do not prevent retrying the still-running legacy installation.
|
|
237
|
+
|
|
238
|
+
The task's **resource owner and full security descriptor** are separate from its run-as
|
|
239
|
+
account. Planning and every task operation require owner/group/DACL/SACL/integrity
|
|
240
|
+
inspection through Task Scheduler. If the required security read is denied or unsupported,
|
|
241
|
+
migration refuses before touching the task; it does not enable privileges or elevate.
|
|
242
|
+
Existing-task updates preserve security rather than reassigning its owner: they clear
|
|
243
|
+
only the temporary definition's embedded descriptor, pass no replacement security
|
|
244
|
+
descriptor, disable automatic principal-ACE edits, and verify the complete raw resource
|
|
245
|
+
descriptor again afterward. Protected backups retain the original raw descriptor and XML.
|
|
246
|
+
Restoration requires exact equality of all non-XML registration/security fields and
|
|
247
|
+
Task Scheduler-normalized XML, ignoring only the exact embedded
|
|
248
|
+
`Task/RegistrationInfo/SecurityDescriptor` representation. Raw revision preconditions,
|
|
249
|
+
backups and the actual returned XML/hash are not rewritten; other metadata or XML drift refuses.
|
|
250
|
+
Concurrent or uncertain security changes require inspection, not permission repair.
|
|
251
|
+
The resource owner may be the runtime user or canonical builtin Administrators;
|
|
252
|
+
that does not change the run-as account. Default scope remains **current user**,
|
|
253
|
+
but Windows execution and recovery require a freshly verified ordinary caller
|
|
254
|
+
before staging or mutation; an elevated or unverified caller refuses rather than
|
|
255
|
+
launching a runtime with different authority. Read-only planning is unchanged.
|
|
256
|
+
Explicit original-account administration uses a task-only
|
|
257
|
+
trusted controller and an original-user worker; see
|
|
258
|
+
[account upgrade scope and qualification](account-upgrades.md).
|
|
259
|
+
`--all-users` is explicitly unsupported.
|
|
260
|
+
|
|
261
|
+
The legacy receipt reports `legacyRootStopVerified`, `observedDescendantsStopped`,
|
|
262
|
+
`descendantsFound`, `descendantsStopped` and `treeCompleteness: "unproven"`. This is
|
|
263
|
+
**not** the modern Job Object complete-descendant proof: a process whose parent had already
|
|
264
|
+
exited before the upgrade cannot be traced to the bridge and is left running. Recovery's
|
|
265
|
+
read-only check proves only that the supervisor and bridge are gone. A plan made by 2.1.1 or
|
|
266
|
+
newer lists no other processes, so recovery of such a plan reports
|
|
267
|
+
`observedDescendantsStopped: false`. The new managed runtime contains future children from
|
|
268
|
+
birth.
|
|
269
|
+
|
|
270
|
+
Unknown package/task shapes, changed owner/generation/configuration, a supervisor or bridge
|
|
271
|
+
that did not stop, or a foreign listener prevent activation. A foreign listener is never
|
|
272
|
+
stopped. Original code and protected configuration/task backups are retained. A verified
|
|
273
|
+
pre-admission target failure can restore the original CLI and scoped task and verify a
|
|
274
|
+
fresh legacy backend; uncertain launch, registration or admission outcomes require
|
|
275
|
+
explicit recovery. No configuration is deleted or replayed.
|
|
276
|
+
|
|
277
|
+
| Legacy journal phase | Recovery boundary |
|
|
278
|
+
|---|---|
|
|
279
|
+
| `legacy-prepared` / `legacy-held` | Verify the original supervisor and bridge and unchanged config; restore only the recorded task hold |
|
|
280
|
+
| `legacy-holding` | Task write outcome may be unknown; inspect before recovery |
|
|
281
|
+
| `legacy-stopping` | Read-only check that the supervisor and bridge are gone; if either still runs, recovery refuses |
|
|
282
|
+
| `legacy-stopped` | Revalidate partial stop and free port before safe old-version rollback |
|
|
283
|
+
| `legacy-launching` / `legacy-wiring` | Require modern held-target shutdown proof; a closed port alone is insufficient |
|
|
284
|
+
| `legacy-admitting` | Traffic may have entered; no automatic rollback |
|
|
285
|
+
| Legacy rollback intent phases | An interrupted task/CLI/launch outcome is reported as uncertain, not retried blindly |
|
|
286
|
+
| `legacy-rolled-back` / `legacy-aborted` | Original installation remains selected; the staged managed candidate stays dormant |
|
|
287
|
+
|
|
288
|
+
A killed migration can also leave the profile's `legacy-upgrade/upgrade.lock`.
|
|
289
|
+
Verify that exact upgrader has exited before removing its lock; never steal it by PID
|
|
290
|
+
guessing. Preserve the journal and backup files.
|
|
291
|
+
|
|
292
|
+
This adapter does not support direct unregistered bridges, other legacy versions,
|
|
293
|
+
multiple legacy ports, Linux/macOS registrations, or legacy-source SxS. Targets must
|
|
294
|
+
declare `legacyRestartProtocol: 1`; older published targets without it refuse before
|
|
295
|
+
legacy downtime.
|
|
296
|
+
|
|
297
|
+
Managed SxS keeps its own verified package copy as well as separate runtime state.
|
|
298
|
+
If a crash happens during port-0 startup before the port is durably recorded, recovery
|
|
299
|
+
reports an unknown launch outcome rather than marking it safely aborted. Preserve
|
|
300
|
+
that instance and its journal until readiness or shutdown can be verified.
|
|
301
|
+
|
|
302
|
+
## Manual migration for older installations
|
|
303
|
+
|
|
304
|
+
For an older installation requiring a separately verified manual migration:
|
|
305
|
+
|
|
306
|
+
Do not overwrite a package directory while its supervisor or bridge is running. Workers and
|
|
307
|
+
native helpers can load later, and dashboard assets are read from disk: replacement can mix
|
|
308
|
+
old and new code even when the original process still reports its old version.
|
|
309
|
+
|
|
310
|
+
Identify the selected port, installation directory, configuration directory and OS autostart
|
|
311
|
+
entry first. Settle or cancel 2.x batches, recover interrupted transactions with 2.x, and keep
|
|
312
|
+
a protected configuration backup. Disable the selected autostart entry and stop its supervisor
|
|
313
|
+
and bridge before replacing files; prove they cannot restart during replacement. Keep the
|
|
314
|
+
known-good installation until the new backend's version and instance identity are confirmed.
|
|
315
|
+
Re-register the intended autostart path, refresh dashboard tabs, and confirm host wiring.
|
|
316
|
+
|
|
317
|
+
One global npm prefix holds one package version and its shared command names. Installing the
|
|
318
|
+
other major there replaces it. Separate ports do not isolate credentials, nonces, logs or
|
|
319
|
+
session files: manual side-by-side operation needs separate durable code roots and separate
|
|
320
|
+
configuration directories, plus separate host/HOME state for CLI-managed setup.
|
|
321
|
+
`init/import --config` selects a source host configuration, not an isolated runtime profile.
|
|
322
|
+
There is no package `--profile` or `MCP_HOME` switch; managed SxS uses explicit instance
|
|
323
|
+
directories instead. Do not use an unscoped stop/uninstall
|
|
324
|
+
operation when another instance must remain running.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-pacemaker",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Keeps your MCP servers alive across editor restarts, reboots, and token expiry — pluggable auth, cross-platform auto-start, one-command setup. Zero-dependency bridge; a small CLI for setup.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -26,7 +26,14 @@
|
|
|
26
26
|
"LICENSE",
|
|
27
27
|
"THIRD_PARTY_NOTICES.txt",
|
|
28
28
|
"CONTRIBUTING.md",
|
|
29
|
-
"docs/execution-context.md"
|
|
29
|
+
"docs/execution-context.md",
|
|
30
|
+
"docs/compatibility.md",
|
|
31
|
+
"docs/configuration.md",
|
|
32
|
+
"docs/dashboards.md",
|
|
33
|
+
"docs/http-api.md",
|
|
34
|
+
"docs/install.md",
|
|
35
|
+
"docs/operations.md",
|
|
36
|
+
"docs/upgrades.md"
|
|
30
37
|
],
|
|
31
38
|
"engines": {
|
|
32
39
|
"node": ">=20"
|
|
@@ -62,7 +69,7 @@
|
|
|
62
69
|
"compat:clean": "node tools/compatibility/prepare.mjs --clean",
|
|
63
70
|
"test:compat": "node --test --test-concurrency=1 test/compat/gates.test.mjs test/compat/cli-api.test.mjs",
|
|
64
71
|
"test:compat:browser": "node --test --test-concurrency=1 test/compat/browser.test.mjs",
|
|
65
|
-
"test": "node --test --test-concurrency=4 test/bridge.test.mjs test/bridge-controls.test.mjs test/kill-tree.test.mjs test/keepalive.test.mjs test/auth-token.test.mjs test/cold-start.test.mjs test/crash-report.test.mjs test/resume.test.mjs test/config-checks.test.mjs test/config-reload.test.mjs test/health.test.mjs test/cli.test.mjs test/logs.test.mjs test/prewarm.test.mjs test/pooling-batch-scheduler.test.mjs test/pooling-batch-api.test.mjs test/pooling-batch-store.test.mjs test/pooling-batches.test.mjs test/pooling-stage-publication.test.mjs test/pooling-batch-startup.test.mjs test/pooling-postcommit-recovery.test.mjs test/pooling-config.test.mjs test/pooling-writer.test.mjs test/pooling-api.test.mjs test/pooling-deadlines.test.mjs test/pooling-queue-budget.test.mjs test/windows-security-helper.test.mjs test/windows-batch-security.test.mjs test/tui.test.mjs test/warm-pool.test.mjs test/server-metrics.test.mjs test/admission.test.mjs test/shared-sessions.test.mjs test/shared-http.test.mjs test/cross-host.test.mjs test/suite-integrity.test.mjs test/consumer-package.test.mjs test/notices.test.mjs test/notices-runtime.test.mjs test/npm-publication.test.mjs test/npm-publication-proof.test.mjs test/update-check.test.mjs test/service-lifecycle.test.mjs test/service-supervisor.test.mjs test/npm-publication-gates.test.mjs test/npm-publication-matrix.test.mjs test/publication-scanners-advisories.test.mjs test/publication-scanners.test.mjs test/service-replacement.test.mjs test/consumer-environment.test.mjs test/npm-publication-external.test.mjs test/npm-publication-peer.test.mjs test/publication-scanners-diagnostics.test.mjs test/publication-scanners-publication.test.mjs test/publication-scanners-paths.test.mjs test/npm-publication-local-enforcement.test.mjs test/publication-scanners-admission.test.mjs test/windows-process-lifetime.test.mjs test/windows-lifetime-startup.test.mjs test/managed-upgrade.test.mjs test/windows-lifetime-identity.test.mjs test/windows-legacy-process.test.mjs test/legacy-upgrade.test.mjs test/legacy-task-security.test.mjs test/windows-task-channel.test.mjs test/task-controller.test.mjs test/account-task-adapter.test.mjs test/account-upgrade.test.mjs test/account-rollback-launch.test.mjs test/account-recovery.test.mjs test/runtime-context.test.mjs test/ci-contracts.test.mjs",
|
|
72
|
+
"test": "node --test --test-concurrency=4 test/bridge.test.mjs test/bridge-controls.test.mjs test/kill-tree.test.mjs test/keepalive.test.mjs test/auth-token.test.mjs test/cold-start.test.mjs test/crash-report.test.mjs test/resume.test.mjs test/config-checks.test.mjs test/config-reload.test.mjs test/health.test.mjs test/cli.test.mjs test/logs.test.mjs test/prewarm.test.mjs test/pooling-batch-scheduler.test.mjs test/pooling-batch-api.test.mjs test/pooling-batch-store.test.mjs test/pooling-batches.test.mjs test/pooling-stage-publication.test.mjs test/pooling-batch-startup.test.mjs test/pooling-postcommit-recovery.test.mjs test/pooling-config.test.mjs test/pooling-writer.test.mjs test/pooling-api.test.mjs test/pooling-deadlines.test.mjs test/pooling-queue-budget.test.mjs test/windows-security-helper.test.mjs test/windows-batch-security.test.mjs test/tui.test.mjs test/warm-pool.test.mjs test/server-metrics.test.mjs test/admission.test.mjs test/shared-sessions.test.mjs test/shared-http.test.mjs test/cross-host.test.mjs test/suite-integrity.test.mjs test/consumer-package.test.mjs test/notices.test.mjs test/notices-runtime.test.mjs test/npm-publication.test.mjs test/npm-publication-proof.test.mjs test/update-check.test.mjs test/service-lifecycle.test.mjs test/service-supervisor.test.mjs test/npm-publication-gates.test.mjs test/npm-publication-matrix.test.mjs test/publication-scanners-advisories.test.mjs test/publication-scanners.test.mjs test/service-replacement.test.mjs test/consumer-environment.test.mjs test/npm-publication-external.test.mjs test/npm-publication-peer.test.mjs test/publication-scanners-diagnostics.test.mjs test/publication-scanners-publication.test.mjs test/publication-scanners-paths.test.mjs test/npm-publication-local-enforcement.test.mjs test/publication-scanners-admission.test.mjs test/windows-process-lifetime.test.mjs test/windows-lifetime-startup.test.mjs test/managed-upgrade.test.mjs test/windows-lifetime-identity.test.mjs test/windows-legacy-process.test.mjs test/legacy-upgrade.test.mjs test/legacy-access.test.mjs test/legacy-task-security.test.mjs test/windows-task-channel.test.mjs test/task-controller.test.mjs test/account-task-adapter.test.mjs test/account-upgrade.test.mjs test/account-rollback-launch.test.mjs test/account-recovery.test.mjs test/runtime-context.test.mjs test/ci-contracts.test.mjs",
|
|
66
73
|
"notices:check": "node tools/third-party-notices/check.mjs",
|
|
67
74
|
"publication:source-gates": "node tools/npm-publication/source-gates.mjs",
|
|
68
75
|
"publication:artifact-gates": "node tools/npm-publication/artifact-gates.mjs",
|