borgmcp-shared 0.4.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.
@@ -1 +1 @@
1
- {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AA2BA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAI/B;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,WAAW,GAAG,UAAU,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CACvC;AAED,MAAM,MAAM,eAAe,GAAG,oBAAoB,EAAE,CAAC;AA8ErD,eAAO,MAAM,qBAAqB,shDAQwM,CAAC;AAwB3O,eAAO,MAAM,gCAAgC,++VAsEkb,CAAC;AAEhe,eAAO,MAAM,oBAAoB,24GAyB+N,CAAC;AAuEjQ,eAAO,MAAM,kCAAkC,wzDASqV,CAAC;AAErY,eAAO,MAAM,sCAAsC,+mFAUgjB,CAAC;AAYpmB,eAAO,MAAM,4BAA4B,+kCAQ4P,CAAC;AAEtS,eAAO,MAAM,gCAAgC,k4CAQ0G,CAAC;AAExJ,eAAO,MAAM,2BAA2B,kwDASmS,CAAC;AAE5U,eAAO,MAAM,uBAAuB,siEAWsN,CAAC;AAE3P,eAAO,MAAM,4BAA4B,UAExC,CAAC;AAEF,eAA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gB,6BAA6B,CAC3C,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,QAAQ,GAAG,IAAI,GACxB,MAAM,CAKR;AAaD,wBAAgB,4BAA4B,CAC1C,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/C,QAAQ,EAAE,QAAQ,GACjB,MAAM,GAAG,IAAI,CAQf;AAED,wBAAgB,+BAA+B,CAC7C,gBAAgB,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,EACpD,QAAQ,EAAE,QAAQ,GAAG,IAAI,GACxB,eAAe,GAAG,IAAI,CAExB"}
package/dist/templates.js CHANGED
@@ -167,9 +167,9 @@ The cube's release-cycle discipline has three documented shapes; the seat-holder
167
167
  **Frontend/web-UI testing-track dispatch instruction:** for PRs touching user-facing web UI bundles, explicitly instruct Release Quality in the dispatch: "load the built page in a browser, capture console output, and include it in RQ-APPROVED [testing]." Diff-only review routinely misses client-side bundle errors.
168
168
 
169
169
  **SR-exclusion list (autonomous-mode shape NOT eligible — explicit SR gate required regardless):**
170
- - PRs introducing new auth-bypass call sites (RLS-equivalent gates, admin-mode helpers)
171
- - PRs changing auth-decision caching mechanisms (subscription/session cache backend swaps)
172
- - PRs modifying OAuth or other identity-token handling (refresh flows, consent parameters)
170
+ - PRs introducing new auth-bypass call sites (scoped-store gates, admin-mode helpers)
171
+ - PRs changing authorization-decision caching mechanisms (session cache storage swaps)
172
+ - PRs modifying identity or session-token handling (verification, renewal, revocation)
173
173
  - PRs touching CORS allowlist matching, encryption key handling, or webhook signature verification
174
174
 
175
175
  These exclusions reflect the cube's documented threat model. Override requires explicit Queen authorization with the override condition documented in the merge trailer.
@@ -403,8 +403,7 @@ const SOFTWARE_DEV = {
403
403
  'PD-APPROVED',
404
404
  'PS-APPROVED',
405
405
  ],
406
- routing: 'directed',
407
- default_to: ['coordinator', 'queen'],
406
+ routing: 'broadcast',
408
407
  lifecycle: 'completion',
409
408
  },
410
409
  {
@@ -530,7 +529,7 @@ Workflow:
530
529
  - Verify correctness: does the code do what the commit message claims? Tests pass? Bundle size acceptable? Follows project conventions?
531
530
  - **Verify implementation quality + suggest refactors when appropriate.** Beyond "does it work," ask: is the code clean and readable? Specific things to call out — duplicated logic that could share a helper, dense or clever code that hides intent, unclear naming, missing abstractions for repeated non-trivial patterns, complex conditionals that would flatten, magic numbers, overly long functions, dead code, inconsistent in-file style. **Balance against "don't over-engineer"**: per the project's standing rule, three similar lines is better than a premature abstraction. Refactors should reduce real complexity, not add layers for hypothetical future cases. Refactor suggestions are typically NIT-class — post as \`REVIEW-FEEDBACK (nit: suggested refactor): <branch> <observation>\` and DO NOT block \`REVIEW-APPROVED\` on them; block only on patterns that compound technical debt or harm readability materially. Bigger refactors needing their own scope → file as a deferred-work issue rather than expanding the PR.
532
531
  - **Replaced-module behavioral diff.** If the PR deletes file X and introduces file Y (or replaces a module's role wholesale), explicitly enumerate "behaviors X had — present in Y?" before approval. Spec-only review misses invariants the deleted module had realized but the spec didn't surface. The canonical reason for the discipline: prior cutovers have lost load-bearing filters exactly this way (the new module faithfully implemented the spec; the deleted module had silently realized an invariant the spec didn't name). Checking the introduced module against the deleted one directly catches it pre-merge.
533
- - **Security review is Security Auditor's lane, not yours.** If the PR touches auth, auth-scoped data access (RLS wrappers / session-bound query helpers), encryption, secret handling, webhook signature verification, input validation, CORS, rate limits, OAuth flows, or customer-data paths, surface that to the cube (e.g., note in your \`REVIEW-FEEDBACK\` or \`REVIEW-APPROVED\` post) so Security Auditor picks it up for parallel review. Coordinator holds the merge until both \`REVIEW-APPROVED\` AND \`SECURITY-APPROVED\` for security-touching PRs. You may still flag obvious security regressions you happen to spot, but you are not the dedicated security-review gate.
532
+ - **Security review is Security Auditor's lane, not yours.** If the PR touches auth, scoped data access (scoped-store wrappers / session-bound query helpers), encryption, secret handling, input validation, origin allowlists, rate limits, credential flows, or sensitive-data paths, surface that to the cube (e.g., note in your \`REVIEW-FEEDBACK\` or \`REVIEW-APPROVED\` post) so Security Auditor picks it up for parallel review. Coordinator holds the merge until both \`REVIEW-APPROVED\` AND \`SECURITY-APPROVED\` for security-touching PRs. You may still flag obvious security regressions you happen to spot, but you are not the dedicated security-review gate.
534
533
  - For each finding worth flagging, post \`REVIEW-FEEDBACK: <branch> <observation>\` — high-confidence issues only. Sort blockers from nits explicitly.
535
534
  - When done, post either \`REVIEW-APPROVED: <branch>\` (clean) or expect the Builder to address feedback and re-post \`REVIEW-READY:\`. Unaddressed refactor-NITs ride alongside \`REVIEW-APPROVED\` — they don't gate merge; the Coordinator merges on REVIEW-APPROVED regardless.
536
535
 
@@ -610,12 +609,12 @@ Boundaries:
610
609
  detailed_description: `You are the cube's security specialist — the dedicated owner of the security expectations the project documents but no other role enforces. Other drones check correctness, behavior, experience, and performance; you check exploitability. Autonomous — coordinate through the log.
611
610
 
612
611
  Your job:
613
- - Review security-touching code changes for vulnerability classes: OWASP top 10, command injection, XSS, SQL injection, auth bypass, data leaks, path traversal, SSRF, race conditions in auth/billing paths.
614
- - Audit security-critical surfaces: auth flows (JWT/OAuth verification, JWKS caching), auth-scoped data access (any function that gates user-data access by session identity — RLS wrappers, session-bound query helpers, equivalent boundary guards), encryption (algorithms, key handling, IV/nonce uniqueness, secret storage), webhook signature verification (HMAC), input validation at API boundaries (Zod schemas or equivalent), CORS / origin allowlists, rate limiters, dependency hygiene (CVE checks on dependency bumps), customer-data and billing paths.
612
+ - Review security-touching code changes for vulnerability classes: OWASP top 10, command injection, XSS, SQL injection, auth bypass, data leaks, path traversal, SSRF, and races in authorization or session state.
613
+ - Audit security-critical surfaces: bearer and session verification, scoped data access (any function that gates data by session identity — scoped-store wrappers, session-bound query helpers, equivalent boundary guards), encryption (algorithms, key handling, IV/nonce uniqueness, secret storage), input validation at API boundaries (Zod schemas or equivalent), origin allowlists, rate limiters, dependency hygiene (CVE checks on dependency bumps), and sensitive local data paths.
615
614
  - Run periodic full-codebase sweeps separate from per-pull-request review — walk the documented security expectations (project security instructions, threat-model docs, security checklists) and verify they still hold. Cadence: once per minor release or every ~2 weeks, whichever comes first. Catches the "we documented it but stopped enforcing it" failure mode.
616
615
 
617
616
  When you engage on a PR:
618
- - On regen, scan the log for \`REVIEW-READY:\` signals on branches touching security surface (auth, auth-scoped data access, encryption, webhooks, input validation, CORS, rate limits, OAuth, customer-data paths, dependency bumps).
617
+ - On regen, scan the log for \`REVIEW-READY:\` signals on branches touching security surface (auth, scoped data access, encryption, input validation, origin allowlists, rate limits, credential flows, sensitive-data paths, dependency bumps).
619
618
  - For non-security-relevant changes (experience copy, version bumps, test infrastructure, internal refactors of non-security code), DON'T gate. Code Reviewer alone is the merge gate for those.
620
619
  - Post \`STARTING: security review of <branch>\` and pull the diff.
621
620
 
@@ -666,8 +665,7 @@ const STARTER = {
666
665
  {
667
666
  class: 'completion-gate',
668
667
  prefixes: ['APPROVED'],
669
- routing: 'directed',
670
- default_to: ['coordinator', 'queen'],
668
+ routing: 'broadcast',
671
669
  lifecycle: 'completion',
672
670
  },
673
671
  {
@@ -1 +1 @@
1
- {"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAsEA,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;q6BA+B83B,CAAC;AAEt6B,MAAM,8BAA8B,GAAG;;;;;;;;;;;;;;;;;;;;;;8gBAsBue,CAAC;AAE/gB,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;0OAQqM,CAAC;AAE3O,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;mRAoBiP,CAAC;AAEpR,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+dAsE+a,CAAC;AAEhe,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;gQAyB4N,CAAC;AAEjQ,MAAM,gCAAgC,GAAG;;;;;;;;yWAQgU,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C,QAAkB;IAElB,IAAI,oBAAoB,IAAI,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,QAAQ,CAAC,cAAc,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,gBAAoD,EACpD,QAAyB;IAEzB,OAAO,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,gBAAgB,IAAI,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC;AAChG,CAAC"}
@@ -2,16 +2,18 @@
2
2
 
3
3
  This document defines the data-only enrollment and cube-creation boundaries
4
4
  shared by clients and servers. It does not define offline operator commands,
5
- database transactions, or keychain APIs, but implementations must preserve the
6
- security properties below.
7
-
8
- This contract replaces the server-generated bearer response used by the
9
- published `borgmcp-shared@0.3.0` v1 baseline. It is a breaking clean-slate v2
10
- wire change; this source now identifies the still-unpublished `0.4.0` candidate
11
- and requires a coordinated client/server release. The version bump grants no tag
12
- or publication authority creating the `v0.4.0` tag and the registry
13
- publication remain separate, independently gated steps. There is no
14
- compatibility path that returns a bearer from the server.
5
+ database transactions, or a client storage API, but implementations must
6
+ preserve the security properties below.
7
+
8
+ This contract replaced the server-generated bearer response used by the
9
+ published `borgmcp-shared@0.3.0` v1 baseline and shipped in the immutable
10
+ `0.4.0` clean-slate v2 release. The immutable `v0.4.1` verification artifact
11
+ failed its cross-platform SBOM audit and must never be published or rerun.
12
+ This source now identifies the still-unpublished `0.4.2` recovery release without
13
+ changing the wire contract. The version bump grants no tag or publication
14
+ authority: creating the `v0.4.2` tag and publishing the reviewed artifact remain
15
+ separate, independently gated steps. There is no compatibility path that returns
16
+ a bearer from the server.
15
17
 
16
18
  A client verifies the credential-free `GET /api/protocol` tag preflight before
17
19
  it creates or sends any enrollment secret; a peer that presents a different
@@ -30,11 +32,12 @@ Before network I/O, the client generates:
30
32
  unpadded base64url; and
31
33
  - a canonical UUID retry key.
32
34
 
33
- The client persists both values as a pending enrollment in the operating-system
34
- keychain before sending the request. It retains and reuses the exact pending
35
- tuple after an ambiguous timeout or connection loss. The wire contract never
36
- permits a file fallback, URL/argv/environment transport, or diagnostic output
37
- for these secrets.
35
+ Before sending the request, the client persists both values in its single local
36
+ seat-record file with mode `0600`, using an atomic replacement under the store's
37
+ cross-process lock. The pending record is operation-scoped and cannot be loaded
38
+ as an active seat. The client retains and reuses the exact pending tuple after an
39
+ ambiguous timeout or connection loss. The wire contract never permits
40
+ URL/argv/environment transport or diagnostic output for these secrets.
38
41
 
39
42
  ## Exchange Request
40
43
 
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` and `npm-publish-sole-operator-approval` decisions.
10
- This document describes the operator procedure; it does not authorize a release.
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. Approval must remain
71
- pending while Security reviews the artifact produced by the `verify` job.
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
- Both jobs reject a repository-root `.npmrc` before their first npm command. The
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
@@ -191,15 +193,23 @@ first:
191
193
  - exercises npm's publish metadata in dry-run mode; and
192
194
  - installs the exact tarball with scripts disabled in a clean consumer, verifies
193
195
  its production tree, and imports every reviewed public export; and
194
- - uploads the tarball, verifier report, and SHA-512 checksum for seven days.
196
+ - uploads the tarball, verifier report, SHA-512 checksum, SBOM, and
197
+ `RUN_EVIDENCE` for seven days.
195
198
 
196
199
  Security must download and audit that exact workflow artifact. After Security
197
200
  approves the tarball, Release Quality confirms the operator procedure, and the
198
- Queen explicitly authorizes the public flip, an authorized reviewer may approve
199
- the waiting `npm-publish` environment deployment. The publish job downloads and
200
- checksum-verifies the same artifact, repeats the artifact verifier, checks that
201
- `0.2.2` is absent and the name is unclaimed as expected, and publishes only the
202
- downloaded tarball with `--access public --provenance`.
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`.
203
213
 
204
214
  Immediately after a successful first publish:
205
215
 
@@ -217,47 +227,59 @@ Immediately after a successful first publish:
217
227
 
218
228
  ## Later Releases
219
229
 
220
- ### 0.4.0 Clean-Slate v2 Contract
230
+ ### 0.4.2 Cross-Platform SBOM Recovery
221
231
 
222
- The ratified `borgmcp-shared-enrollment-version` decision defined this breaking
223
- retry-safe enrollment and idempotent multi-cube contract. `borgmcp-shared@0.3.0`
224
- is now the published, immutable v1 baseline on the registry, so the clean-slate
225
- v2 contract credential-free tag preflight included is versioned as the
226
- still-unpublished `0.4.0` candidate (a breaking change on a `0.x` package bumps
227
- the minor). This source now identifies `0.4.0`. That reviewed version bump
228
- does not authorize creating `v0.4.0` or publishing the package, and the source
229
- branch must not republish `0.3.0`.
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.
230
239
 
231
- Before a separately authorized `v0.4.0` tag is created:
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.
232
245
 
233
- 1. The exact `0.4.0` source commit must be merged to protected `main` after Code
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
234
249
  Review, Security, and Release Quality approve the package identity, public
235
- API, conformance behavior, generated output, and release documentation.
236
- 2. The package and root lockfile, `SHARED_PACKAGE_VERSION`, the exact protocol
237
- version tag, packed-artifact verifier, and version assertions all identify
238
- `0.4.0` (done in this source bump).
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.
239
254
  3. The protected workflow must build one exact tarball and pass its full source,
240
255
  test, audit, public-export, source-map, install/import, dry-run, lock-derived
241
256
  CycloneDX SBOM, integrity, and provenance gates. Security must approve that
242
257
  exact workflow artifact.
243
- 4. The `0.4.0` workflow must generate a CycloneDX SBOM, canonicalize npm's
258
+ 4. The `0.4.2` workflow must generate a CycloneDX SBOM, canonicalize npm's
244
259
  checkout-derived root display name to the already-verified manifest name,
245
260
  and validate every component's exact canonical registry tarball URL, single
246
261
  matching CycloneDX distribution reference, purl, and lock SHA-512 plus the
247
- exact installed dependency graph and zero package runtime dependencies. The
248
- tarball, SBOM, and SBOM validation report must be
249
- checksummed and uploaded together for Security audit.
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.
250
271
  5. The tag and publication each require their own explicit authorization. A
251
272
  source-version approval, merge, or successful verification run grants neither.
252
273
 
253
274
  After registry publication and independent integrity/provenance verification,
254
- the first borgmcp client and borgmcp-server releases may replace their temporary
255
- development dependency with the reviewed registry range `^0.4.0`. They must not
256
- ship a Git dependency or fall back to the incompatible published `0.3.0` v1
257
- enrollment 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.
258
279
 
259
280
  Later releases follow the same source gates, annotated protected tag, exact
260
- tarball audit, Queen authorization, and environment approval. The registry
281
+ tarball audit, Coordinator authorization under the ratified shared release
282
+ autonomy, and environment approval. The registry
261
283
  preflight requires the package to be owned by `NPM_EXPECTED_OWNER` and rejects
262
284
  an existing target version. It also fails if
263
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.4.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://borgmcp.ai",
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"