borgmcp-shared 0.3.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -26
- package/SECURITY.md +6 -5
- package/dist/conformance/adapter.d.ts +62 -11
- package/dist/conformance/adapter.d.ts.map +1 -1
- package/dist/conformance/adapter.js +273 -55
- package/dist/conformance/adapter.js.map +1 -1
- package/dist/protocol/contract.d.ts +56 -25
- package/dist/protocol/contract.d.ts.map +1 -1
- package/dist/protocol/contract.js +147 -116
- package/dist/protocol/contract.js.map +1 -1
- package/dist/protocol/coordination.d.ts +25 -0
- package/dist/protocol/coordination.d.ts.map +1 -1
- package/dist/protocol/coordination.js +44 -0
- package/dist/protocol/coordination.js.map +1 -1
- package/dist/protocol/errors.d.ts +2 -4
- package/dist/protocol/errors.d.ts.map +1 -1
- package/dist/protocol/errors.js +1 -1
- package/dist/protocol/errors.js.map +1 -1
- package/dist/protocol/version.d.ts +2 -10
- package/dist/protocol/version.d.ts.map +1 -1
- package/dist/protocol/version.js +1 -18
- package/dist/protocol/version.js.map +1 -1
- package/dist/templates.d.ts +1 -1
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +9 -11
- package/dist/templates.js.map +1 -1
- package/docs/compatibility.md +38 -50
- package/docs/enrollment.md +27 -17
- package/docs/releasing.md +61 -33
- package/package.json +2 -2
- package/src/conformance/adapter.ts +618 -82
- package/src/protocol/contract.ts +250 -160
- package/src/protocol/coordination.ts +82 -0
- package/src/protocol/errors.ts +7 -3
- package/src/protocol/version.ts +3 -35
- package/src/templates.ts +9 -11
package/docs/releasing.md
CHANGED
|
@@ -6,8 +6,9 @@ published from that exact tarball. Local publication and publication from an
|
|
|
6
6
|
unreviewed branch are not supported.
|
|
7
7
|
|
|
8
8
|
The active release policy is governed by the ratified
|
|
9
|
-
`shared-package-consumption
|
|
10
|
-
This document describes the
|
|
9
|
+
`shared-package-consumption`, `borgmcp-shared-coordinator-autonomy`, and
|
|
10
|
+
`npm-publish-sole-operator-approval` decisions. This document describes the
|
|
11
|
+
operator procedure; it does not authorize a release.
|
|
11
12
|
|
|
12
13
|
## Permanent Repository Configuration
|
|
13
14
|
|
|
@@ -67,8 +68,9 @@ Configure these controls before creating a release tag:
|
|
|
67
68
|
`SECURITY.md` directs reporters to the private reporting path, so disabled
|
|
68
69
|
reporting is always a release-blocking documentation failure.
|
|
69
70
|
|
|
70
|
-
The environment approval is the final technical control.
|
|
71
|
-
|
|
71
|
+
The environment approval is the final technical control. It appears only on the
|
|
72
|
+
`publish` job, after `validate` has verified the SR approval tuple. Approval must
|
|
73
|
+
remain pending while Security reviews the artifact produced by the `verify` job.
|
|
72
74
|
GitHub's ephemeral workflow token cannot read every repository-administration
|
|
73
75
|
setting checked by `scripts/verify-release-configuration.mjs`. An authorized
|
|
74
76
|
operator must run the guard with an administration-capable token before creating
|
|
@@ -88,7 +90,7 @@ before dependency installation, and includes the same values in the uploaded
|
|
|
88
90
|
`RUN_EVIDENCE` file. Never use the Actions rerun controls to advance a failed
|
|
89
91
|
immutable tag or proof run.
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
All three jobs reject a repository-root `.npmrc` before their first npm command. The
|
|
92
94
|
exact npm bootstrap uses isolated runner-temp prefix, user config, and cache
|
|
93
95
|
paths, forces `https://registry.npmjs.org`, disables scripts, and verifies both
|
|
94
96
|
the installed npm version and registry before adding its bin directory to
|
|
@@ -137,9 +139,10 @@ Recover out of band without rerunning the workflow:
|
|
|
137
139
|
2. With `GITHUB_SHA=508f2dc88658d8e00ff036b7ce6913fcfbef239b` and
|
|
138
140
|
`NPM_EXPECTED_OWNER=byteventures`, run
|
|
139
141
|
`node scripts/verify-registry-release.mjs postpublish <audited-tarball>`. The
|
|
140
|
-
verifier retries only transient HTTP 404 propagation responses
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
verifier retries only transient HTTP 404 propagation responses. Its production
|
|
143
|
+
envelope performs at most 18 reads over approximately three and a half minutes
|
|
144
|
+
(1, 2, 4, and 8 second waits, then a 15 second cap). Non-404 failures and
|
|
145
|
+
integrity, owner, or provenance mismatches remain immediate terminal failures.
|
|
143
146
|
3. Install exact `borgmcp-shared@0.2.2` from the registry into a clean temporary
|
|
144
147
|
prefix with scripts disabled and run `npm audit signatures` against that
|
|
145
148
|
prefix.
|
|
@@ -190,15 +193,23 @@ first:
|
|
|
190
193
|
- exercises npm's publish metadata in dry-run mode; and
|
|
191
194
|
- installs the exact tarball with scripts disabled in a clean consumer, verifies
|
|
192
195
|
its production tree, and imports every reviewed public export; and
|
|
193
|
-
- uploads the tarball, verifier report,
|
|
196
|
+
- uploads the tarball, verifier report, SHA-512 checksum, SBOM, and
|
|
197
|
+
`RUN_EVIDENCE` for seven days.
|
|
194
198
|
|
|
195
199
|
Security must download and audit that exact workflow artifact. After Security
|
|
196
200
|
approves the tarball, Release Quality confirms the operator procedure, and the
|
|
197
|
-
Queen explicitly authorizes the public flip,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
`
|
|
201
|
-
|
|
201
|
+
Queen explicitly authorizes the public flip, the Coordinator writes the SR
|
|
202
|
+
approval tuple (`ARTIFACT_SR_SHA512`, `ARTIFACT_SR_RUN_ID`,
|
|
203
|
+
`ARTIFACT_SR_RUN_ATTEMPT`) to environment variables and dispatches the
|
|
204
|
+
`publish.yml` workflow with the tag. The `validate` job runs first (outside
|
|
205
|
+
the `npm-publish` environment): it re-verifies the source, queries the source
|
|
206
|
+
run's workflow path, tag, conclusion, and attempt via the GitHub API, downloads
|
|
207
|
+
the artifact, binds the SR tuple to the exact tarball, and confirms run identity.
|
|
208
|
+
Only after `validate` succeeds does the `publish` job run, which surfaces the
|
|
209
|
+
`npm-publish` environment approval dialog. The `publish` job re-downloads and
|
|
210
|
+
checksum-verifies the same artifact, re-binds the SR tuple, repeats the artifact
|
|
211
|
+
verifier, checks that `0.2.2` is absent and the name is unclaimed as expected,
|
|
212
|
+
and publishes only the downloaded tarball with `--access public --provenance`.
|
|
202
213
|
|
|
203
214
|
Immediately after a successful first publish:
|
|
204
215
|
|
|
@@ -216,42 +227,59 @@ Immediately after a successful first publish:
|
|
|
216
227
|
|
|
217
228
|
## Later Releases
|
|
218
229
|
|
|
219
|
-
### 0.
|
|
230
|
+
### 0.4.2 Cross-Platform SBOM Recovery
|
|
220
231
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
232
|
+
`borgmcp-shared@0.4.0` is the published, immutable clean-slate v2 contract, but
|
|
233
|
+
its registry artifact was built before the public package's local/self-hosted
|
|
234
|
+
topology cleanup. The immutable `v0.4.1` run `29701429995` built the cleaned
|
|
235
|
+
artifact, but independent macOS verification proved that the SBOM verifier used
|
|
236
|
+
the auditor's installed optional-dependency tree instead of a deterministic
|
|
237
|
+
release graph. The `v0.4.1` tag, run, and artifact are failed evidence: never
|
|
238
|
+
publish, move, reuse, rerun, or substitute them.
|
|
225
239
|
|
|
226
|
-
|
|
240
|
+
Version `0.4.2` carries the reviewed cleanup with a lockfile-derived SBOM graph
|
|
241
|
+
for the fixed release target `{os: linux, cpu: x64, libc: glibc}`. It does not
|
|
242
|
+
change the protocol tag or runtime behavior. This source now identifies `0.4.2`.
|
|
243
|
+
The reviewed recovery bump does not authorize creating `v0.4.2` or publishing
|
|
244
|
+
the package.
|
|
227
245
|
|
|
228
|
-
|
|
246
|
+
Before a separately authorized `v0.4.2` tag is created:
|
|
247
|
+
|
|
248
|
+
1. The exact `0.4.2` source commit must be merged to protected `main` after Code
|
|
229
249
|
Review, Security, and Release Quality approve the package identity, public
|
|
230
|
-
API,
|
|
231
|
-
2. The package and root lockfile, `SHARED_PACKAGE_VERSION`,
|
|
232
|
-
|
|
250
|
+
API, generated output, and release documentation.
|
|
251
|
+
2. The package and root lockfile, `SHARED_PACKAGE_VERSION`, packed-artifact and
|
|
252
|
+
SBOM verifiers, generated declarations, and version assertions must all
|
|
253
|
+
identify `0.4.2`. The protocol tag remains unchanged.
|
|
233
254
|
3. The protected workflow must build one exact tarball and pass its full source,
|
|
234
255
|
test, audit, public-export, source-map, install/import, dry-run, lock-derived
|
|
235
256
|
CycloneDX SBOM, integrity, and provenance gates. Security must approve that
|
|
236
257
|
exact workflow artifact.
|
|
237
|
-
4. The `0.
|
|
258
|
+
4. The `0.4.2` workflow must generate a CycloneDX SBOM, canonicalize npm's
|
|
238
259
|
checkout-derived root display name to the already-verified manifest name,
|
|
239
260
|
and validate every component's exact canonical registry tarball URL, single
|
|
240
261
|
matching CycloneDX distribution reference, purl, and lock SHA-512 plus the
|
|
241
|
-
exact
|
|
242
|
-
|
|
243
|
-
|
|
262
|
+
exact lockfile-derived release-target graph and zero package runtime
|
|
263
|
+
dependencies. The graph starts from root development dependencies, follows
|
|
264
|
+
required dependencies and peers, includes only target-compatible optional
|
|
265
|
+
dependencies, and includes optional peers only when another reachable edge
|
|
266
|
+
installs them. Root manifest and lock selectors must match and permit the
|
|
267
|
+
fixed target. Verification must not inspect the auditor's operating system,
|
|
268
|
+
installed dependency tree, or `node_modules`. The tarball, SBOM, and SBOM
|
|
269
|
+
validation report must be checksummed and uploaded together for Security
|
|
270
|
+
audit.
|
|
244
271
|
5. The tag and publication each require their own explicit authorization. A
|
|
245
272
|
source-version approval, merge, or successful verification run grants neither.
|
|
246
273
|
|
|
247
274
|
After registry publication and independent integrity/provenance verification,
|
|
248
|
-
the first borgmcp client and borgmcp-server releases
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
response.
|
|
275
|
+
the first borgmcp client and borgmcp-server releases must pin exact
|
|
276
|
+
`borgmcp-shared@0.4.2` and commit their registry lockfiles. They must not ship a
|
|
277
|
+
Git dependency, a version range that can resolve to the pre-cleanup artifact, or
|
|
278
|
+
a fallback to the incompatible `0.3.0` v1 enrollment response.
|
|
252
279
|
|
|
253
280
|
Later releases follow the same source gates, annotated protected tag, exact
|
|
254
|
-
tarball audit,
|
|
281
|
+
tarball audit, Coordinator authorization under the ratified shared release
|
|
282
|
+
autonomy, and environment approval. The registry
|
|
255
283
|
preflight requires the package to be owned by `NPM_EXPECTED_OWNER` and rejects
|
|
256
284
|
an existing target version. It also fails if
|
|
257
285
|
`ALLOW_UNCLAIMED_FIRST_PUBLISH` is not `false` or any `NPM_TOKEN` remains;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "borgmcp-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Shared protocol, domain, templates, and conformance contracts for Borg MCP implementations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
],
|
|
69
69
|
"author": "Byte Ventures IO AB",
|
|
70
70
|
"license": "Apache-2.0",
|
|
71
|
-
"homepage": "https://
|
|
71
|
+
"homepage": "https://github.com/Byte-Ventures/borg-mcp-shared",
|
|
72
72
|
"repository": {
|
|
73
73
|
"type": "git",
|
|
74
74
|
"url": "git+https://github.com/Byte-Ventures/borg-mcp-shared.git"
|