borgmcp 2.2.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -0
- package/dist/assimilate-cmd.d.ts +6 -0
- package/dist/assimilate-cmd.d.ts.map +1 -1
- package/dist/assimilate-cmd.js +31 -7
- package/dist/assimilate-cmd.js.map +1 -1
- package/dist/assimilate-deps.d.ts.map +1 -1
- package/dist/assimilate-deps.js +2 -0
- package/dist/assimilate-deps.js.map +1 -1
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +14 -0
- package/dist/claude.js.map +1 -1
- package/dist/cli-help.d.ts +2 -0
- package/dist/cli-help.d.ts.map +1 -1
- package/dist/cli-help.js +19 -0
- package/dist/cli-help.js.map +1 -1
- package/dist/cli-platform.d.ts +1 -0
- package/dist/cli-platform.d.ts.map +1 -1
- package/dist/cli-platform.js +5 -1
- package/dist/cli-platform.js.map +1 -1
- package/dist/console-prefix.d.ts +9 -10
- package/dist/console-prefix.d.ts.map +1 -1
- package/dist/console-prefix.js +23 -20
- package/dist/console-prefix.js.map +1 -1
- package/dist/cubes.d.ts +11 -0
- package/dist/cubes.d.ts.map +1 -1
- package/dist/cubes.js +10 -0
- package/dist/cubes.js.map +1 -1
- package/dist/display-identity.d.ts +34 -0
- package/dist/display-identity.d.ts.map +1 -0
- package/dist/display-identity.js +88 -0
- package/dist/display-identity.js.map +1 -0
- package/dist/docs-sections.d.ts.map +1 -1
- package/dist/docs-sections.js +9 -0
- package/dist/docs-sections.js.map +1 -1
- package/dist/drone-management.d.ts.map +1 -1
- package/dist/drone-management.js +6 -0
- package/dist/drone-management.js.map +1 -1
- package/dist/inbox-monitor.d.ts.map +1 -1
- package/dist/inbox-monitor.js +12 -0
- package/dist/inbox-monitor.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +58 -16
- package/dist/index.js.map +1 -1
- package/dist/log-stream.d.ts.map +1 -1
- package/dist/log-stream.js +41 -15
- package/dist/log-stream.js.map +1 -1
- package/dist/parse-assimilate-args.d.ts +1 -1
- package/dist/parse-assimilate-args.d.ts.map +1 -1
- package/dist/parse-assimilate-args.js +5 -2
- package/dist/parse-assimilate-args.js.map +1 -1
- package/dist/regen-format.d.ts +2 -2
- package/dist/regen-format.d.ts.map +1 -1
- package/dist/regen-format.js +6 -5
- package/dist/regen-format.js.map +1 -1
- package/dist/regen.js +6 -2
- package/dist/regen.js.map +1 -1
- package/dist/remote-client.d.ts.map +1 -1
- package/dist/remote-client.js +8 -1
- package/dist/remote-client.js.map +1 -1
- package/dist/reset-local-seat-cmd.d.ts +8 -0
- package/dist/reset-local-seat-cmd.d.ts.map +1 -1
- package/dist/reset-local-seat-cmd.js +21 -2
- package/dist/reset-local-seat-cmd.js.map +1 -1
- package/dist/seat-reattach-guard.d.ts +21 -0
- package/dist/seat-reattach-guard.d.ts.map +1 -0
- package/dist/seat-reattach-guard.js +83 -0
- package/dist/seat-reattach-guard.js.map +1 -0
- package/dist/seats.d.ts +6 -2
- package/dist/seats.d.ts.map +1 -1
- package/dist/seats.js +37 -14
- package/dist/seats.js.map +1 -1
- package/dist/unknown-subcommand.d.ts +1 -1
- package/dist/unknown-subcommand.d.ts.map +1 -1
- package/dist/unknown-subcommand.js +1 -0
- package/dist/unknown-subcommand.js.map +1 -1
- package/dist/update-cmd.d.ts +58 -0
- package/dist/update-cmd.d.ts.map +1 -0
- package/dist/update-cmd.js +801 -0
- package/dist/update-cmd.js.map +1 -0
- package/docs/EXTRACTION_PROVENANCE.md +3 -3
- package/docs/LOCAL_SERVER.md +43 -0
- package/docs/RELEASING.md +145 -4
- package/docs/SEAT_LIFECYCLE.md +242 -0
- package/package.json +6 -3
- package/src/assimilate-cmd.ts +45 -7
- package/src/assimilate-deps.ts +2 -0
- package/src/claude.ts +15 -0
- package/src/cli-help.ts +22 -0
- package/src/cli-platform.ts +5 -2
- package/src/console-prefix.ts +25 -18
- package/src/cubes.ts +16 -0
- package/src/display-identity.ts +130 -0
- package/src/docs-sections.ts +9 -0
- package/src/drone-management.ts +6 -0
- package/src/inbox-monitor.ts +19 -0
- package/src/index.ts +66 -20
- package/src/log-stream.ts +38 -14
- package/src/parse-assimilate-args.ts +4 -2
- package/src/regen-format.ts +6 -5
- package/src/regen.ts +11 -2
- package/src/remote-client.ts +8 -0
- package/src/reset-local-seat-cmd.ts +26 -1
- package/src/seat-reattach-guard.ts +113 -0
- package/src/seats.ts +36 -14
- package/src/unknown-subcommand.ts +1 -0
- package/src/update-cmd.ts +1006 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-cmd.js","sourceRoot":"","sources":["../src/update-cmd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,cAAc,GAAG,SAAS,CAAC;AACjC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AACxC,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAC7D,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;AACtC,MAAM,YAAY,GAAG,iLAAiL,CAAC;AA4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AC;QACxE,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;QAChC,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -22,7 +22,7 @@ The extraction copied the monorepo's `client/src/` production boundary and top-l
|
|
|
22
22
|
recovery, `2.0.2`, `2.0.3`, `2.0.4`, `2.0.5`, and `2.0.6` successors were
|
|
23
23
|
published and registry-verified. The immutable `2.0.7` workflow failed before
|
|
24
24
|
package creation or npm publication. The `2.0.8`, `2.0.9`, `2.0.10`, `2.0.11`,
|
|
25
|
-
`2.1.0`, and `2.1.1` successors were published, so the next candidate identity is `2.
|
|
25
|
+
`2.1.0`, and `2.1.1` successors were published, and `2.2.0` was subsequently published, and `2.3.0` was subsequently published, so the next candidate identity is `2.4.0`. Extraction and
|
|
26
26
|
versioning do not authorize publication.
|
|
27
27
|
|
|
28
28
|
## Review Holds
|
|
@@ -42,7 +42,7 @@ resolves to the audited registry `borgmcp-shared@0.6.4` with integrity
|
|
|
42
42
|
`sha512-Wm4b0uoOAw9JCz5OTHD0Q2uXKkeWYdkVksdeZvRG8l62XGMY+G8GkNEsZT9L533LbVbQ29GhgF0htjDenQThDg==`.
|
|
43
43
|
The matching `borgmcp-server@0.1.21` release is published with integrity
|
|
44
44
|
`sha512-g0QH4cKcsKuDyZs1MvBmvCoCLaZ4wVI04yHCGSvcAeWghWxSBH0IIF8Q5OFi1pLB7TZXOVP6D3QAabUQ2eJTFg==`
|
|
45
|
-
and pins the same `borgmcp-shared@0.6.4` contract. Client `borgmcp@2.
|
|
45
|
+
and pins the same `borgmcp-shared@0.6.4` contract. Client `borgmcp@2.3.0` is published. The immutable `v2.0.7`
|
|
46
46
|
attempt failed before publication and remains preserved. Publication of the next
|
|
47
|
-
candidate remains gated by reviewed `v2.
|
|
47
|
+
candidate remains gated by reviewed `v2.4.0` source, a fresh annotated tag, and
|
|
48
48
|
the exact-artifact and protected-publication gates.
|
package/docs/LOCAL_SERVER.md
CHANGED
|
@@ -129,6 +129,45 @@ create distinct bounded cubes. An ordinary enrolled client is denied before a
|
|
|
129
129
|
create request is sent. Cloud-only capabilities fail explicitly rather than
|
|
130
130
|
being redirected.
|
|
131
131
|
|
|
132
|
+
## Updating Borg
|
|
133
|
+
|
|
134
|
+
For an npm-global installation, use the whole-product command:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
borg update
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
The command performs a zero-mutation registry preflight for the exact proposed
|
|
141
|
+
`borgmcp` and `borgmcp-server` versions, their SHA-512 integrity values, and an
|
|
142
|
+
identical exact `borgmcp-shared` dependency pin. Lookup and installation are
|
|
143
|
+
bound to the canonical `https://registry.npmjs.org/` authority and one proven npm
|
|
144
|
+
executable, global prefix, and global root. An alternate configured registry,
|
|
145
|
+
changed npm context, registry failure, malformed manifest, mismatched or ranged
|
|
146
|
+
shared pin, unsupported package manager, or ambiguous binary fails before
|
|
147
|
+
confirmation and mutation with manual-update guidance.
|
|
148
|
+
|
|
149
|
+
The client is installed first. Borg then verifies and re-enters through the new
|
|
150
|
+
client binary before any server mutation. If that install, verification, or
|
|
151
|
+
re-entry fails, the server controller and runtime are untouched. When a server
|
|
152
|
+
was already installed, the new client installs the target controller before
|
|
153
|
+
invoking `borg-mcp-server update --json`; this ensures the runtime phase uses the
|
|
154
|
+
current structured contract rather than the stale controller being replaced.
|
|
155
|
+
The client strictly decodes server update and status JSON and never executes a
|
|
156
|
+
rendered `next_action` string.
|
|
157
|
+
|
|
158
|
+
Final verification requires the installed client and server manifests, their
|
|
159
|
+
installed shared packages, controller identity, prepared artifact and integrity,
|
|
160
|
+
and any running artifact and pinned-TLS protocol identity to agree. A previously
|
|
161
|
+
stopped server remains stopped; matching controller and prepared runtime are
|
|
162
|
+
reported as `prepared; still stopped` without inventing a live protocol check.
|
|
163
|
+
An absent server is skipped rather than installed. Partial completion prints the
|
|
164
|
+
safe retry command `borg update --yes`. Borg never starts a stopped server,
|
|
165
|
+
daemonizes, or restarts agent processes.
|
|
166
|
+
|
|
167
|
+
`borg server update` remains the server-runtime-only command. It verifies and
|
|
168
|
+
activates the server artifact but deliberately does not rewrite the global
|
|
169
|
+
controller executable that is running it.
|
|
170
|
+
|
|
132
171
|
After the first attach, the launched agent should run `borg_whoami` and
|
|
133
172
|
`borg_roster` to verify its seat and begin coordinating. To create a second seat,
|
|
134
173
|
the operator runs the explicit local assimilation command from the intended
|
|
@@ -144,6 +183,10 @@ replacement; only an authoritative eviction mints a fresh bearer and permits a
|
|
|
144
183
|
remint. (The `retry_key` idempotency key applies to enrollment and cube-creation
|
|
145
184
|
only — never to seat re-attach, which is idempotent through the bearer itself.)
|
|
146
185
|
|
|
186
|
+
The complete persisted-state model, exact recovery output, duplicate-session
|
|
187
|
+
guard, in-session re-attach contract, and deterministic multi-seat selection
|
|
188
|
+
order are documented in [`SEAT_LIFECYCLE.md`](SEAT_LIFECYCLE.md).
|
|
189
|
+
|
|
147
190
|
The default discovery endpoint is `https://127.0.0.1:7091`. Explicit `--host` values may include another port but must pass the same trust and endpoint policy.
|
|
148
191
|
|
|
149
192
|
## Recovery commands
|
package/docs/RELEASING.md
CHANGED
|
@@ -118,8 +118,18 @@ The annotated `v2.1.1` tag object
|
|
|
118
118
|
`db0a6a76744928e0067eb03b8a236076c56ae758`. Workflow run `30174878044`, attempt 1,
|
|
119
119
|
successfully published that exact source as `borgmcp@2.1.1`; the same-run artifact report records integrity
|
|
120
120
|
`sha512-nZJ3i6LBIj/4743mqVRJTUH3YGmC8HfC/NuQb7eOv+/K/dyBogDnwZ3opiZiZSe4LE5CXuG72Sip7cPRoCoZrA==`.
|
|
121
|
+
Never move, replace, reuse, or rerun that tag or workflow. The annotated `v2.2.0` tag object
|
|
122
|
+
`edf12fcd4c56eb0ad59917269aaeee223b36bd53` peels to protected-main commit
|
|
123
|
+
`db4f374e88c24dadee47d5400537890cad1e5f40`. Workflow run `30195666955`, attempt 1,
|
|
124
|
+
successfully published that exact source as `borgmcp@2.2.0`; the same-run artifact report records integrity
|
|
125
|
+
`sha512-Pi3rpQH6f+V67OPoRIwyKjOFrCJ5y/39knCayExBmnMC5Urb8m+m9UQVNV7cWMuhd3S3WMM6JOkgcIYOVhWnxg==`.
|
|
126
|
+
Never move, replace, reuse, or rerun that tag or workflow. The annotated `v2.3.0` tag object
|
|
127
|
+
`24b1f8622a0a0b542dbac26c70662f5b499d3426` peels to protected-main commit
|
|
128
|
+
`9e708b7233486abdcd7fbc893a2d5bc818241d87`. Workflow run `30218208664`, attempt 1,
|
|
129
|
+
successfully published that exact source as `borgmcp@2.3.0`; the same-run artifact report records integrity
|
|
130
|
+
`sha512-xyiyC/HXvWnSiii621WdA4qBKehmBzZSaLGN6PZvf82FQUqVONrRyhl1SmOLzPlPXX9boNKSA1EuaVJrtUv6zA==`.
|
|
121
131
|
Never move, replace, reuse, or rerun that tag or workflow. The next candidate
|
|
122
|
-
uses the unused `v2.
|
|
132
|
+
uses the unused `v2.4.0` identity from a fresh reviewed protected-main commit
|
|
123
133
|
and requires the complete release gate again.
|
|
124
134
|
|
|
125
135
|
## Release Prerequisites
|
|
@@ -149,6 +159,55 @@ Before creating the release tag, independently verify all of these conditions:
|
|
|
149
159
|
machine-checkable. A release tag created before they are resolved fails before
|
|
150
160
|
dependency installation or publication.
|
|
151
161
|
|
|
162
|
+
### Release identity preparation
|
|
163
|
+
|
|
164
|
+
Prepare the next stable identity only from a clean protected-main checkout. The
|
|
165
|
+
command requires evidence for the version being superseded because a workflow
|
|
166
|
+
run and artifact integrity cannot be derived from the repository tree:
|
|
167
|
+
|
|
168
|
+
```sh
|
|
169
|
+
npm run release:prepare -- 2.3.0 \
|
|
170
|
+
--workflow-run-id 30195666955 \
|
|
171
|
+
--workflow-run-attempt 1 \
|
|
172
|
+
--artifact-integrity 'sha512-...'
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The command independently verifies the annotated tag, its peeled commit, the
|
|
176
|
+
exact successful tag-workflow attempt, and npm artifact integrity before writing
|
|
177
|
+
anything. It then deterministically updates only the manifest version, the two
|
|
178
|
+
root lockfile version fields, the extraction ledger, this document's immutable
|
|
179
|
+
release record, and the release-lane current-version/evidence assertions.
|
|
180
|
+
|
|
181
|
+
Release branches use the `release/` prefix and enter protected `main` through a
|
|
182
|
+
pull request. A direct push only updates the staging branch; it does
|
|
183
|
+
not produce a release-identity verdict and grants no review skip, merge
|
|
184
|
+
authority, or release authority.
|
|
185
|
+
|
|
186
|
+
For a pull request from a same-repository `release/` branch, the dedicated
|
|
187
|
+
release-identity workflow is loaded from the exact protected base commit. It
|
|
188
|
+
checks out that base, fetches the exact candidate commit into the Git object
|
|
189
|
+
database without checking it out, and invokes the base commit's verifier with
|
|
190
|
+
explicit base and candidate SHAs. It does not install or execute candidate
|
|
191
|
+
dependencies, package scripts, workflow code, actions, or verifier code. The
|
|
192
|
+
candidate is treated only as Git tree and blob data.
|
|
193
|
+
|
|
194
|
+
To reproduce the classification locally, resolve and pass exact commit SHAs:
|
|
195
|
+
|
|
196
|
+
```sh
|
|
197
|
+
base_sha=$(git rev-parse origin/main)
|
|
198
|
+
candidate_sha=$(git rev-parse HEAD)
|
|
199
|
+
npm run verify:release-identity -- --base "$base_sha" --candidate "$candidate_sha"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The verifier rechecks the recorded provenance against GitHub, npm, and Git. It
|
|
203
|
+
reconstructs the expected tree in a temporary Git index and requires exact tree
|
|
204
|
+
equality, exact changed paths, and exact per-file shapes. The release-identity
|
|
205
|
+
allowlist must remain byte-identical. The generated no-cloud occurrence allowlist
|
|
206
|
+
must also remain byte-identical; any source-line renumbering makes the commit a
|
|
207
|
+
code change rather than a release-identity change. A commit the classifier
|
|
208
|
+
rejects follows the full code review chain and must never be manually declared
|
|
209
|
+
identity-only.
|
|
210
|
+
|
|
152
211
|
## Repository Controls
|
|
153
212
|
|
|
154
213
|
Repository settings are operator-owned and are not changed by this workflow.
|
|
@@ -172,6 +231,74 @@ Before preparing a candidate, independently verify:
|
|
|
172
231
|
|
|
173
232
|
## Release Workflow
|
|
174
233
|
|
|
234
|
+
### Pre-tag composed exercise
|
|
235
|
+
|
|
236
|
+
Before creating a release tag, exercise the packed client against the selected
|
|
237
|
+
server artifact:
|
|
238
|
+
|
|
239
|
+
```sh
|
|
240
|
+
npm run release:exercise -- \
|
|
241
|
+
--server /absolute/path/to/borgmcp-server.tgz \
|
|
242
|
+
--server-integrity 'sha512-...'
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
The server integrity must come from the reviewed producer of that artifact. Run
|
|
246
|
+
the command once with the published counterpart. When the client and server are
|
|
247
|
+
being released together, run it again with the co-releasing server candidate.
|
|
248
|
+
The default path builds and packs the current client; `--client-tarball` exists
|
|
249
|
+
only for reproducing a reviewed packed client or running a negative control.
|
|
250
|
+
|
|
251
|
+
This harness exercises reviewed release candidates and their published
|
|
252
|
+
counterparts. It is not a containment sandbox for hostile or otherwise untrusted
|
|
253
|
+
packages and must not be used as one. The temporary install and data directories
|
|
254
|
+
isolate the reviewed exercise from normal product state; they are not an
|
|
255
|
+
operating-system security boundary.
|
|
256
|
+
|
|
257
|
+
The harness requires Node.js 22, npm 11.18.0, Python 3, and macOS or Linux. It
|
|
258
|
+
installs both tarballs into a private temporary project, bootstraps isolated
|
|
259
|
+
server data, and starts the installed server directly. It never uses
|
|
260
|
+
`borg server setup`, because registry-backed activation would select the
|
|
261
|
+
previously published server instead of a candidate.
|
|
262
|
+
|
|
263
|
+
Both composed terminal journeys run under a real PTY:
|
|
264
|
+
|
|
265
|
+
- `borg server dashboard` must render the attached-viewer footer, exit cleanly
|
|
266
|
+
on Ctrl-C, restore the cursor and alternate screen, and leave the server's
|
|
267
|
+
pinned-TLS process healthy at `GET /healthz` (204, empty body).
|
|
268
|
+
- `borg server start` must render the foreground-server footer, exit cleanly on
|
|
269
|
+
Ctrl-C, restore the terminal, stop the server, and release its health endpoint.
|
|
270
|
+
|
|
271
|
+
The client facade resolves `borg-mcp-server` by bare name. The harness therefore
|
|
272
|
+
uses a controlled shim only to arrange resolution, then verifies the outcome:
|
|
273
|
+
before trusting a frame, it reads the live process command and requires the
|
|
274
|
+
absolute installed server entry. Every client or server executable must resolve
|
|
275
|
+
inside the installed package root covered by the SRI cited for that role. Its
|
|
276
|
+
JSON report records the absolute path, version, and independently supplied
|
|
277
|
+
integrity for the client, dashboard listener, dashboard viewer, and foreground
|
|
278
|
+
listener/viewer roles. PATH ordering alone is never accepted as identity evidence.
|
|
279
|
+
|
|
280
|
+
The harness is a fail-closed release gate. A missing frame, non-PTY execution,
|
|
281
|
+
wrong journey footer, substituted artifact, nonzero exit, absent terminal
|
|
282
|
+
restore sequence, failed post-exit health assertion, timeout, or oversized
|
|
283
|
+
transcript fails the command. Its controls must remain demonstrably bidirectional:
|
|
284
|
+
the current client/server pairing passes; and a deliberately wrong server
|
|
285
|
+
integrity fails before either journey starts.
|
|
286
|
+
|
|
287
|
+
The terminal-restore negative control is specifically the packed pre-#146 client
|
|
288
|
+
from commit `81da7b970ffb4e76a35c7bc551c419fec702a3b6` composed with published
|
|
289
|
+
`borgmcp-server@0.2.0`, registry integrity
|
|
290
|
+
`sha512-squb0+vdy0q7l/4FeV7OTvSm7OiFWGsAjGhcVEXYrQc9K/8jJYduqPS90VBwaJRT6z221Gxf3xQ5SeZe/Qoncw==`.
|
|
291
|
+
That composition must fail on the missing cursor-restore sequence. A newer server
|
|
292
|
+
candidate can mask the old client's defect and is not a valid counterpart for
|
|
293
|
+
this negative control.
|
|
294
|
+
|
|
295
|
+
```sh
|
|
296
|
+
npm run release:exercise -- \
|
|
297
|
+
--server borgmcp-server@0.2.0 \
|
|
298
|
+
--server-integrity 'sha512-squb0+vdy0q7l/4FeV7OTvSm7OiFWGsAjGhcVEXYrQc9K/8jJYduqPS90VBwaJRT6z221Gxf3xQ5SeZe/Qoncw==' \
|
|
299
|
+
--client-tarball /absolute/path/to/pre-146-borgmcp-2.1.1.tgz
|
|
300
|
+
```
|
|
301
|
+
|
|
175
302
|
The only trigger is a protected annotated `v<package version>` tag. Manual
|
|
176
303
|
dispatch is intentionally absent so a second run cannot rebuild or publish an
|
|
177
304
|
existing tag. The workflow rejects reruns, root `.npmrc`
|
|
@@ -194,6 +321,12 @@ The unprivileged `verify` job performs one sequence:
|
|
|
194
321
|
7. Upload only the tarball and its verifier-generated report as the same-run
|
|
195
322
|
release artifact.
|
|
196
323
|
|
|
324
|
+
After `verify` succeeds, the designated Queen operator alone approves the
|
|
325
|
+
`npm-publish` environment. There is no separate pre-publication exact-artifact
|
|
326
|
+
Security gate: the verify job is the mechanical authority for the exact bytes
|
|
327
|
+
that the publish job consumes. Environment approval authorizes publication; it
|
|
328
|
+
does not permit a rerun, a rebuilt artifact, or approval by another actor.
|
|
329
|
+
|
|
197
330
|
The protected `publish` job alone receives `id-token: write`. It downloads the
|
|
198
331
|
same-run artifact and rejects a report whose package name or version differs
|
|
199
332
|
from the release, a version that already exists, an unclaimed package, or an
|
|
@@ -208,13 +341,21 @@ is no post-publication registry readback job: registry metadata and install
|
|
|
208
341
|
visibility propagate asynchronously and cannot invalidate an immutable
|
|
209
342
|
publication after npm accepts it.
|
|
210
343
|
|
|
344
|
+
Separately, once the release is installable from the canonical registry, install
|
|
345
|
+
it into an isolated prefix and exercise the real user update path end to end.
|
|
346
|
+
This is product verification, not publication validation: failure routes a new
|
|
347
|
+
reviewed fix and never invalidates, rebuilds, retags, or reruns the immutable
|
|
348
|
+
release. Do not repeat byte comparisons, integrity/SRI checks, packed-version
|
|
349
|
+
checks, source-tree verification, dist-tag readback, or provenance readback that
|
|
350
|
+
the exact-artifact `verify` and publish jobs already completed.
|
|
351
|
+
|
|
211
352
|
No separate checksum file is needed: the tarball verifier records canonical
|
|
212
353
|
SHA-512 SRI in the artifact report. GitHub's same-run artifact transport and the
|
|
213
354
|
report bind the reviewed candidate without repeated SHA512 choreography.
|
|
214
355
|
|
|
215
|
-
Rely on npm Trusted Publishing
|
|
216
|
-
|
|
217
|
-
|
|
356
|
+
Rely on npm Trusted Publishing. Do not perform post-publication provenance
|
|
357
|
+
readback or reconstruct DSSE, in-toto, SLSA, workflow-ref, or builder statements
|
|
358
|
+
locally.
|
|
218
359
|
Do not add cross-run tuple variables, cross-run artifact selection, duplicate
|
|
219
360
|
builds, duplicate package verification, checksum bundles, or SBOM ceremony.
|
|
220
361
|
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Seat Lifecycle and Recovery
|
|
2
|
+
|
|
3
|
+
This guide describes the local seat behavior shipped by the client. A seat is
|
|
4
|
+
one server-side drone identity plus its client-generated session bearer and
|
|
5
|
+
worktree binding. The bearer and binding are stored together in the private
|
|
6
|
+
`seats.json` store; commands never reconstruct one from the other.
|
|
7
|
+
|
|
8
|
+
## Stored states
|
|
9
|
+
|
|
10
|
+
Only two seat states are persisted:
|
|
11
|
+
|
|
12
|
+
| State | Meaning | What can use it |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `pending` | The client persisted a fresh bearer before attach completed. It may be unbound, or bound to a worktree after a recoverable finalize failure. | Retry logic only. It is never hydrated as a live seat. |
|
|
15
|
+
| `active` | Attach completed and the server session metadata, display metadata, and worktree binding were committed together. | Normal coordination and re-attach. |
|
|
16
|
+
|
|
17
|
+
`revoked`, `superseded`, and `evicted` are server verdicts, not values written
|
|
18
|
+
to `seats.json`. Revocation and supersession do not silently delete local
|
|
19
|
+
state. An authoritative eviction is the sole verdict that permits the terminal
|
|
20
|
+
assimilation flow to replace a rejected seat. `borg reset-local-seat` is the
|
|
21
|
+
explicit offline deletion path.
|
|
22
|
+
|
|
23
|
+
Seat sessions do not expire. A legacy `expiresAt` field is ignored, and current
|
|
24
|
+
attach responses containing `expires_at` are rejected. An enrollment
|
|
25
|
+
invitation can expire; recovery is to request a new invitation. An expired
|
|
26
|
+
stream cursor is also separate from seat identity and is recovered by resetting
|
|
27
|
+
the cursor and reconnecting.
|
|
28
|
+
|
|
29
|
+
The whole seat store fails closed if any persisted record is malformed. The
|
|
30
|
+
store reader raises:
|
|
31
|
+
|
|
32
|
+
```text
|
|
33
|
+
Borg seat store is malformed or has an unsupported version; refusing to read it
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The file is not rewritten and no bearer material is included in the error.
|
|
37
|
+
|
|
38
|
+
## Enrollment, attach, and retry
|
|
39
|
+
|
|
40
|
+
Enrollment establishes the authority-bound parent credential used to request
|
|
41
|
+
seat attachment. Invitation enrollment persists its retry tuple before network
|
|
42
|
+
I/O; a rejected or expired invitation requires a new invitation.
|
|
43
|
+
|
|
44
|
+
For a seat attach, the client:
|
|
45
|
+
|
|
46
|
+
1. Mints a 32-byte base64url session bearer and persists a `pending` record
|
|
47
|
+
before sending it.
|
|
48
|
+
2. Sends that bearer to the server. The server stores only its digest.
|
|
49
|
+
3. On success, atomically changes the same record to `active` and adds the
|
|
50
|
+
server metadata and worktree binding.
|
|
51
|
+
|
|
52
|
+
An ambiguous retry reuses the same persisted bearer, so the server resolves the
|
|
53
|
+
same seat instead of minting a duplicate. A crash after server acceptance but
|
|
54
|
+
before local finalization is also resumed from that pending record. If a
|
|
55
|
+
sibling worktree was already created when activation failed, Borg binds the
|
|
56
|
+
still-pending record to that worktree without making it live; rerunning from
|
|
57
|
+
there resends the same bearer.
|
|
58
|
+
|
|
59
|
+
Only an `implicit-sibling:<id>` pending operation is eligible for automatic
|
|
60
|
+
implicit retry adoption. A `named-sibling:<name>` operation remains distinct
|
|
61
|
+
and is never silently adopted by an unnamed sibling launch.
|
|
62
|
+
|
|
63
|
+
If activation fails and the exact pending record is successfully bound to the
|
|
64
|
+
spawned worktree, Borg preserves that worktree and the printed retry reuses the
|
|
65
|
+
same seat. If the record is missing, replaced, or unavailable, Borg removes the
|
|
66
|
+
spawned worktree and does not print a client retry command: the server may
|
|
67
|
+
already have accepted the seat, and the current protocol has no client-side
|
|
68
|
+
operation identifier or cleanup endpoint that can prove reuse or remove it.
|
|
69
|
+
|
|
70
|
+
## Re-attaching from a terminal
|
|
71
|
+
|
|
72
|
+
`borg assimilate --here` first resolves this worktree's saved active seat and
|
|
73
|
+
probes it. A live seat is reattached with the identical bearer; its saved role
|
|
74
|
+
is authoritative, and no new drone is minted. The success line is:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
re-attached to existing seat <drone-label> (same session, no new drone minted)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Before relaunch, Borg checks the seat's inbox-monitor PID. A live holder refuses
|
|
81
|
+
the relaunch, names its PID, and gives both the safe fresh-worktree path and the
|
|
82
|
+
explicit one-time override:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
This worktree's Borg seat already has a live session (inbox monitor pid <pid>).
|
|
86
|
+
No agent was launched. Stop the existing session or use a fresh worktree with `borg assimilate --worktree <name>`. If the live monitor is wedged, override once with `borg assimilate --here --force`.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
For a stale or missing heartbeat, the first line adds:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
Its heartbeat is <stale|missing>, so the process may be wedged.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
A dead, absent, malformed, or unreadable PID file is not evidence of a live
|
|
96
|
+
holder, so ordinary crash recovery proceeds without `--force`. The probe is
|
|
97
|
+
read-only; it does not reap, kill, rewrite, or clear monitor state.
|
|
98
|
+
|
|
99
|
+
If a second monitor reaches the singleton after launch, it exits successfully
|
|
100
|
+
without tailing and prints:
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
borg-inbox-monitor: seat inbox "<path>" is already monitored by a live instance (pid <pid>); yielding — another session likely holds this seat.
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The existing monitor remains the sole inbox reader.
|
|
107
|
+
|
|
108
|
+
## Re-attaching from an agent session
|
|
109
|
+
|
|
110
|
+
The `borg_assimilate` MCP tool is re-attach-only. It can reuse this worktree's
|
|
111
|
+
saved seat for the requested cube, but it cannot create a seat or switch the
|
|
112
|
+
worktree to another cube.
|
|
113
|
+
|
|
114
|
+
With no saved identity, it returns:
|
|
115
|
+
|
|
116
|
+
```text
|
|
117
|
+
◼ This session has no drone seat for this worktree, and in-session borg_assimilate is re-attach-only (it never creates seats — gh#780). To create a seat for cube "<cube>", run `borg assimilate` in a terminal — it spawns the worktree, persists the identity, and launches the agent in one step.
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
For another cube, it returns:
|
|
121
|
+
|
|
122
|
+
```text
|
|
123
|
+
◼ This worktree is attached to cube "<active-cube>"; in-session borg_assimilate is re-attach-only and cannot switch to "<requested-cube>" (gh#780). To work in "<requested-cube>", run `borg assimilate` in a terminal from that project (or spawn a fresh worktree for it).
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
A successful in-session re-attach begins:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
# Re-attached to cube: <cube>
|
|
130
|
+
|
|
131
|
+
**Drone label:** <drone-label>
|
|
132
|
+
**Seat:** existing identity reused — no new drone minted (gh#780)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
If the server no longer accepts the saved seat, the tool fails rather than
|
|
136
|
+
reminting:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
◼ Re-attach failed — this worktree's saved seat is unreachable (likely evicted or its session was revoked). Server said: <server-error>
|
|
140
|
+
Recover by running `borg assimilate` in a terminal to create a fresh seat; in-session borg_assimilate never re-mints (gh#780).
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Terminal verdicts and recovery
|
|
144
|
+
|
|
145
|
+
### Revoked or superseded session
|
|
146
|
+
|
|
147
|
+
A pin-matched `SESSION_REVOKED` or `SESSION_REJECTED` is diagnosis only. Attach
|
|
148
|
+
does not mutate the saved seat. The exact output is one of:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
Local session was revoked.
|
|
152
|
+
Next: run borg reset-local-seat, then borg assimilate --host <server> --enroll.
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
Local session was superseded by a newer enrollment.
|
|
157
|
+
Next: run borg reset-local-seat, then borg assimilate --host <server> --enroll.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Run the named offline reset, obtain a new invitation, and enroll again.
|
|
161
|
+
|
|
162
|
+
### Evicted seat
|
|
163
|
+
|
|
164
|
+
Only an authoritative `410 DRONE_EVICTED` permits replacement of a rejected
|
|
165
|
+
saved seat. If the pre-attach probe establishes eviction, the terminal
|
|
166
|
+
assimilation flow may replace the bearer and attach a fresh seat. Ambiguous
|
|
167
|
+
transport, trust, endpoint, credential, or server failures never authorize that
|
|
168
|
+
replacement.
|
|
169
|
+
|
|
170
|
+
If the attach itself returns the eviction after re-attach began, Borg does not
|
|
171
|
+
claim recovery. It prints:
|
|
172
|
+
|
|
173
|
+
```text
|
|
174
|
+
This worktree's saved seat on <server> was evicted. Remove this worktree, or from a fresh worktree run `borg assimilate --host <server>`.
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
The stream path also treats typed `DRONE_EVICTED` as terminal: it marks that
|
|
178
|
+
exact local candidate rejected, stops retrying that seat, and does not restart
|
|
179
|
+
the loop as though the failure were transient.
|
|
180
|
+
|
|
181
|
+
### Rejected or expired invitation
|
|
182
|
+
|
|
183
|
+
An invitation failure is enrollment recovery, not a seat reset:
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
The enrollment invitation for <server> was rejected or expired. Ask the server operator for a replacement invitation — the server can stay running: for an unclaimed owner client run `borg-mcp-server owner-invite`; for an ordinary client run `borg-mcp-server client-invite`. Then rerun `borg assimilate --host <server> --enroll`.
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Offline reset
|
|
190
|
+
|
|
191
|
+
`borg reset-local-seat` clears only the current worktree's saved credential and
|
|
192
|
+
cube binding. It makes no network call, revokes nothing server-side, and leaves
|
|
193
|
+
the server, trust anchor, cube, and sibling worktrees unchanged.
|
|
194
|
+
|
|
195
|
+
Its shipped help describes the command as:
|
|
196
|
+
|
|
197
|
+
```text
|
|
198
|
+
borg reset-local-seat (borgmcp <version>) — clear ONLY this worktree's saved local seat
|
|
199
|
+
|
|
200
|
+
Usage:
|
|
201
|
+
borg reset-local-seat Reset this worktree's saved seat (TTY confirms [y/N])
|
|
202
|
+
borg reset-local-seat --host <host> No-op unless this worktree's seat is on <host>
|
|
203
|
+
borg reset-local-seat --yes Reset without a prompt (required when non-interactive)
|
|
204
|
+
borg reset-local-seat --help Show this help
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
The command snapshots the exact binding and token-safe bearer observation,
|
|
208
|
+
prompts outside the store lock, then revalidates the same seat before deleting
|
|
209
|
+
it. If another process replaced or reset the seat, the command is an honest
|
|
210
|
+
no-op rather than deleting the successor. After a successful reset, Borg reads
|
|
211
|
+
the same worktree again without hydrating any bearer. If another saved active
|
|
212
|
+
seat remains on the same server, the command points to
|
|
213
|
+
`borg assimilate --host <server> --here` and states that the server will
|
|
214
|
+
revalidate it before launch. Otherwise it gives the fresh-enrollment path:
|
|
215
|
+
|
|
216
|
+
```text
|
|
217
|
+
borg assimilate --host <server> --enroll
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Multiple seats and deterministic selection
|
|
221
|
+
|
|
222
|
+
An in-place seat uses operation kind `seat` and operation key
|
|
223
|
+
`current-worktree`. A sibling uses operation kind `sibling`; named siblings key
|
|
224
|
+
on their worktree name, while implicit siblings receive a unique operation key.
|
|
225
|
+
These operations derive distinct credential references and distinct bearers.
|
|
226
|
+
Creating a sibling therefore never moves or overwrites the original
|
|
227
|
+
worktree's active seat.
|
|
228
|
+
|
|
229
|
+
Historical recovery or interrupted operations can leave more than one active
|
|
230
|
+
record bound to one worktree. Every process uses the same total order:
|
|
231
|
+
|
|
232
|
+
1. A candidate not definitively rejected in this process comes before a
|
|
233
|
+
rejected, revoked, or evicted candidate.
|
|
234
|
+
2. A `sibling` candidate finalized into this worktree comes before an older
|
|
235
|
+
in-place `seat` candidate.
|
|
236
|
+
3. Remaining ties use the credential reference's lexical order.
|
|
237
|
+
|
|
238
|
+
Only `active` records participate in normal selection. A bound `pending` record
|
|
239
|
+
is discoverable only by the convergence path that resends its exact bearer.
|
|
240
|
+
This ordering is shared by SessionStart, kickoff construction, MCP children,
|
|
241
|
+
stream ownership, and normal active-cube hydration, so one process does not
|
|
242
|
+
select different seats for different surfaces.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "borgmcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Coordinate AI coding agents in shared cubes. Works with Claude Code, Codex, and OpenCode.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,14 +29,17 @@
|
|
|
29
29
|
"start": "node dist/index.js",
|
|
30
30
|
"test": "npm run test:unit && npm run test:release",
|
|
31
31
|
"test:unit": "vitest run --config vitest.config.ts",
|
|
32
|
-
"test:release": "node --test test/release-lane.test.mjs",
|
|
32
|
+
"test:release": "node --test test/release-lane.test.mjs test/release-identity.test.mjs",
|
|
33
33
|
"onboarding:smoke": "node scripts/onboarding-smoke.mjs",
|
|
34
|
+
"release:prepare": "node scripts/release-identity.mjs prepare",
|
|
35
|
+
"release:exercise": "npm run build && node scripts/release-exercise.mjs",
|
|
34
36
|
"release:check": "npm run verify:public-source && npm run verify:release && npm run verify:lock && npm run check && npm test && npm run build && npm run onboarding:smoke && npm run verify:package",
|
|
35
37
|
"verify:artifact": "node scripts/verify-packed-artifact.mjs",
|
|
36
38
|
"verify:public-source": "node scripts/verify-public-source.mjs",
|
|
37
39
|
"verify:package": "node scripts/verify-local-package.mjs",
|
|
38
40
|
"verify:release": "node scripts/verify-release-readiness.mjs",
|
|
39
|
-
"verify:lock": "node scripts/verify-lock-registry.mjs"
|
|
41
|
+
"verify:lock": "node scripts/verify-lock-registry.mjs",
|
|
42
|
+
"verify:release-identity": "node scripts/release-identity.mjs verify"
|
|
40
43
|
},
|
|
41
44
|
"files": [
|
|
42
45
|
"dist",
|