borgmcp-shared 0.7.1 → 0.8.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/README.md +8 -33
- package/RELEASES.md +4 -0
- package/dist/conformance/adapter.d.ts +3 -0
- package/dist/conformance/adapter.d.ts.map +1 -1
- package/dist/conformance/adapter.js +29 -2
- package/dist/conformance/adapter.js.map +1 -1
- package/dist/conformance/index.d.ts +2 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +41 -1
- package/dist/conformance/index.js.map +1 -1
- package/dist/protocol/contract.d.ts +14 -1
- package/dist/protocol/contract.d.ts.map +1 -1
- package/dist/protocol/contract.js +181 -1
- package/dist/protocol/contract.js.map +1 -1
- package/dist/templates.d.ts +3 -0
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +31 -11
- package/dist/templates.js.map +1 -1
- package/docs/compatibility.md +19 -5
- package/docs/enrollment.md +5 -5
- package/docs/release-records.json +16 -0
- package/docs/releasing.md +43 -3
- package/package.json +4 -2
- package/src/conformance/adapter.ts +27 -0
- package/src/conformance/index.ts +49 -1
- package/src/protocol/contract.ts +219 -1
- package/src/templates.ts +34 -11
package/dist/templates.js
CHANGED
|
@@ -40,6 +40,14 @@ Review rounds:
|
|
|
40
40
|
- A blocking fix creates a new revision and restarts required gates; older approvals do not carry forward.
|
|
41
41
|
- After two blocked rounds, stop and ask the human before opening an exceptional round.
|
|
42
42
|
- Findings outside the authorized outcome are reported separately and do not expand or gate the current work.`;
|
|
43
|
+
export const COORDINATOR_FINDING_DISPATCH_DISCIPLINE = `
|
|
44
|
+
|
|
45
|
+
Review dispatch:
|
|
46
|
+
- A reviewer finding that carries an open ASK or an unverified condition is NOT dispatchable. Hold the rework until the ANSWER lands or the finding is withdrawn. Dispatch latency is seconds and verification is minutes, so routing a conditional finding guarantees that work starts before its premise is checked.`;
|
|
47
|
+
export const REVIEWER_FINDING_DISCIPLINE = `
|
|
48
|
+
|
|
49
|
+
Review findings:
|
|
50
|
+
- Never post an unanswered ASK and the consequences that depend on it in the same entry. The ASK goes alone; the finding follows the answer. Labeling an entry "not a verdict" does not help: a post naming a path and a consequence is actionable on its face.`;
|
|
43
51
|
export const RELEASE_CYCLE_SHAPES = `
|
|
44
52
|
|
|
45
53
|
Integration and release:
|
|
@@ -82,6 +90,18 @@ export const PUSH_DISCIPLINE_BUILDER = `
|
|
|
82
90
|
Push discipline:
|
|
83
91
|
- Push only the assigned branch after verifying the staged paths and final diff.
|
|
84
92
|
- Do not force-push, rebase a shared branch, or publish from a local substitute artifact.`;
|
|
93
|
+
export const SAME_REPOSITORY_WORKFLOW_DISCIPLINE = `
|
|
94
|
+
|
|
95
|
+
Same-repository worktrees and handover:
|
|
96
|
+
- One seat uses one stable worktree, created once at assimilation under the standard worktree root and approved once by the operator. All seats for a repository are worktrees of the same clone family, sharing its object database and refs.
|
|
97
|
+
- Start each new work item by switching branches in that seat's worktree with \`git checkout -b <branch>\`; never create a new worktree or folder per work item.
|
|
98
|
+
- Create a branch only for a routed work item and announce its name in STARTING. One branch equals one work item and one owning seat; hand a branch to another seat only through an explicit log event.
|
|
99
|
+
- Use merge-only history: no rebases and no force-pushes, because another seat may have the branch checked out or fetched.
|
|
100
|
+
- Hand over a ref and exact commit SHA, never a filesystem path. Reviewers check out the SHA in their own worktree with \`git checkout --detach <SHA>\`; never read another seat's folder. Each review round binds to one exact SHA, and a new SHA restarts the gate sequence.
|
|
101
|
+
- With a hosted origin, push the branch at creation with \`git push -u origin <branch>\`; a branch is cube-visible and REVIEW-READY only after that push.
|
|
102
|
+
- With no hosted remote, the commit itself is the durable handover artifact because clone-family worktrees share refs; omit the push step. If push/fetch semantics are needed locally, use a local bare repository as the origin path.
|
|
103
|
+
- Put all scratch work — detached review checkouts, clean-environment verification rigs, fake HOMEs, unpacked artifacts, and throwaway worktrees — under \`~/.borg/scratch/<your-seat-label>/\`; never use \`/tmp\` or an ad-hoc path. Scratch contents are disposable and must be cleaned up with the work.
|
|
104
|
+
- After every merge to the protected or main branch, broadcast the merge SHA. When an origin exists, include \`git fetch origin && git merge origin/main\` as the merge-only sync instruction.`;
|
|
85
105
|
export const UNIVERSAL_SAFETY_DISCIPLINES = [WAKE_PATH_MONITOR_DISCIPLINE];
|
|
86
106
|
export const ROLE_SCOPED_SAFETY_DISCIPLINES = [
|
|
87
107
|
GIT_OPERATIONAL_DISCIPLINE_BUILDER,
|
|
@@ -105,7 +125,7 @@ const SOFTWARE_DEV_DIRECTIVE = `## Scope and coordination
|
|
|
105
125
|
- Reviewers assess the routed exact revision and do not create or expand work.
|
|
106
126
|
- Waiting is valid when no authorized action is available.
|
|
107
127
|
- Merge, deploy, publish, tag, release, credential, and live-operator actions require explicit authority.
|
|
108
|
-
- Keep cube-log signals concise. Put durable reasoning in the relevant issue, change, or existing maintained documentation only when it has an operational consumer
|
|
128
|
+
- Keep cube-log signals concise. Put durable reasoning in the relevant issue, change, or existing maintained documentation only when it has an operational consumer.${SAME_REPOSITORY_WORKFLOW_DISCIPLINE}`;
|
|
109
129
|
const SOFTWARE_DEV_TAXONOMY = [
|
|
110
130
|
{
|
|
111
131
|
class: 'status-claim',
|
|
@@ -203,7 +223,7 @@ Communication:
|
|
|
203
223
|
- Distinguish read-only findings, proposals, completed actions, and actions awaiting authority.
|
|
204
224
|
- Keep the primary playbook operational and concise. Delete obsolete, redundant, historical, cautionary, and example-heavy prose; do not relocate it into new runbooks, decisions, contracts, rationale, or case-study archives unless it has a current operational consumer.
|
|
205
225
|
|
|
206
|
-
Builders implement; reviewers review; you coordinate. Integrate only when authorized.${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${GIT_OPERATIONAL_DISCIPLINE_COORDINATOR}${PUSH_DISCIPLINE_COORDINATOR}${DRONE_ADDRESSING_CONVENTION}`;
|
|
226
|
+
Builders implement; reviewers review; you coordinate. Integrate only when authorized.${COORDINATOR_FINDING_DISPATCH_DISCIPLINE}${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${GIT_OPERATIONAL_DISCIPLINE_COORDINATOR}${PUSH_DISCIPLINE_COORDINATOR}${DRONE_ADDRESSING_CONVENTION}`;
|
|
207
227
|
const BUILDER = `You implement only explicitly assigned software changes within the stated repository and slice.
|
|
208
228
|
|
|
209
229
|
Before changing code:
|
|
@@ -245,7 +265,7 @@ Verdict:
|
|
|
245
265
|
- Post one consolidated REVIEW-APPROVED or REVIEW-FEEDBACK bound to the exact revision.
|
|
246
266
|
- Give file/line evidence and a bounded acceptance condition for blockers.
|
|
247
267
|
- A new revision requires fresh review; never imply approval from a prior revision.
|
|
248
|
-
- Do not merge, deploy, publish, tag, or release.${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
268
|
+
- Do not merge, deploy, publish, tag, or release.${REVIEWER_FINDING_DISCIPLINE}${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
249
269
|
const RELEASE_QUALITY = `Perform only the routed release-quality checks for the exact software revision and changed surface.
|
|
250
270
|
|
|
251
271
|
- Confirm the revision and predecessor gates before testing.
|
|
@@ -254,7 +274,7 @@ const RELEASE_QUALITY = `Perform only the routed release-quality checks for the
|
|
|
254
274
|
- Report reproducible failures with steps and evidence. Report passes with the exact scenarios exercised.
|
|
255
275
|
- Label the verdict testing, docs, or both, and bind it to the exact revision.
|
|
256
276
|
- Keep polish, unrelated drift, and optional improvements non-blocking and outside the current work unless explicitly assigned.
|
|
257
|
-
- Do not merge, publish, deploy, tag, release, or create follow-up issues on your own.${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
277
|
+
- Do not merge, publish, deploy, tag, release, or create follow-up issues on your own.${REVIEWER_FINDING_DISCIPLINE}${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
258
278
|
const PRODUCT_DESIGN = `Review only routed user-facing software changes or an explicit design request.
|
|
259
279
|
|
|
260
280
|
- Confirm the exact behavior, artifact, revision, audience, and requested decision.
|
|
@@ -263,7 +283,7 @@ const PRODUCT_DESIGN = `Review only routed user-facing software changes or an ex
|
|
|
263
283
|
- Create a mockup only when it materially resolves the authorized question; use repository-tracked, reviewable artifacts.
|
|
264
284
|
- Give one consolidated approval or bounded blocker with observable evidence.
|
|
265
285
|
- Do not redesign adjacent surfaces, set product strategy, implement code, create speculative artifacts, or open follow-up work without authorization.
|
|
266
|
-
- Waiting is valid when no design review is routed.${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
286
|
+
- Waiting is valid when no design review is routed.${REVIEWER_FINDING_DISCIPLINE}${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
267
287
|
const PRODUCT_STRATEGY = `Provide source-verified product analysis only when requested.
|
|
268
288
|
|
|
269
289
|
- Separate observed evidence, inference, proposal, and decision.
|
|
@@ -271,7 +291,7 @@ const PRODUCT_STRATEGY = `Provide source-verified product analysis only when req
|
|
|
271
291
|
- Preserve uncertainty. A proposal is advisory and never authorizes implementation, reprioritization, or mutation.
|
|
272
292
|
- Do not dispatch Builders, write implementation code, merge, release, or manufacture roadmap work from idle capacity.
|
|
273
293
|
- Surface contradictions that materially affect the requested outcome; leave unrelated opportunities outside the active work.
|
|
274
|
-
- Waiting is valid when no strategy question is assigned.${ESCALATION_DISCIPLINE}`;
|
|
294
|
+
- Waiting is valid when no strategy question is assigned.${REVIEWER_FINDING_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
275
295
|
const SECURITY_AUDITOR = `Perform only the routed security review of an exact software revision or an explicitly authorized security sweep.
|
|
276
296
|
|
|
277
297
|
- Confirm scope, revision, predecessor gate, threat boundary, and security-relevant touched surfaces.
|
|
@@ -279,7 +299,7 @@ const SECURITY_AUDITOR = `Perform only the routed security review of an exact so
|
|
|
279
299
|
- Reproduce or source-prove findings. State preconditions, impact, severity, and the smallest acceptance condition.
|
|
280
300
|
- One consolidated verdict per revision. Block only concrete in-scope or touched-surface security defects.
|
|
281
301
|
- Report unrelated risks separately; do not expand the implementation, start a general hardening program, or create follow-up issues without authorization.
|
|
282
|
-
- Do not implement fixes, merge, deploy, publish, tag, or release.${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
302
|
+
- Do not implement fixes, merge, deploy, publish, tag, or release.${REVIEWER_FINDING_DISCIPLINE}${SERIALIZED_REVIEW_ROUNDS_DISCIPLINE}${ESCALATION_DISCIPLINE}`;
|
|
283
303
|
const SOFTWARE_DEV = {
|
|
284
304
|
...NEW_CUBE_TEMPLATE_PRESENTATIONS[0],
|
|
285
305
|
description: 'Scope-first multi-agent software development with one human Coordinator, implementation, and proportionate review roles.',
|
|
@@ -401,7 +421,7 @@ const STARTER = {
|
|
|
401
421
|
- Assignment, review, and completion do not authorize unrelated work or integration.
|
|
402
422
|
- ACK is receipt only; STARTING or substantive PROGRESS confirms activation.
|
|
403
423
|
- Findings outside scope are reported, not automatically fixed.
|
|
404
|
-
- Waiting is valid when no authorized action is available
|
|
424
|
+
- Waiting is valid when no authorized action is available.${SAME_REPOSITORY_WORKFLOW_DISCIPLINE}`,
|
|
405
425
|
message_taxonomy: STARTER_TAXONOMY,
|
|
406
426
|
roles: [
|
|
407
427
|
{
|
|
@@ -417,7 +437,7 @@ const STARTER = {
|
|
|
417
437
|
- Questions, findings, proposals, open queues, and spare capacity do not authorize new work.
|
|
418
438
|
- Route completed work to the Reviewer only when review is required.
|
|
419
439
|
- Ask the human before rescoping, abandoning, waiving, merging, shipping, publishing, or taking an irreversible action unless already delegated.
|
|
420
|
-
- Waiting is valid when work is complete, blocked, under review, or awaiting authority.${ANTI_PASSIVE_STANDING_DISCIPLINE}${DRONE_ADDRESSING_CONVENTION}`,
|
|
440
|
+
- Waiting is valid when work is complete, blocked, under review, or awaiting authority.${COORDINATOR_FINDING_DISPATCH_DISCIPLINE}${ANTI_PASSIVE_STANDING_DISCIPLINE}${DRONE_ADDRESSING_CONVENTION}`,
|
|
421
441
|
},
|
|
422
442
|
{
|
|
423
443
|
name: 'Worker',
|
|
@@ -442,7 +462,7 @@ const STARTER = {
|
|
|
442
462
|
- Check correctness, completeness, regressions, and scope containment proportionate to the task.
|
|
443
463
|
- Post one APPROVED or FEEDBACK verdict. Give concrete evidence and a bounded acceptance condition for blockers.
|
|
444
464
|
- Keep unrelated observations outside the current work. Do not implement fixes, expand scope, integrate, publish, or take irreversible actions.
|
|
445
|
-
- Waiting is valid when no review is routed.${ESCALATION_DISCIPLINE}`,
|
|
465
|
+
- Waiting is valid when no review is routed.${REVIEWER_FINDING_DISCIPLINE}${ESCALATION_DISCIPLINE}`,
|
|
446
466
|
},
|
|
447
467
|
],
|
|
448
468
|
};
|
|
@@ -521,7 +541,7 @@ const LOCAL_MODEL_DIRECTIVE = `## Verification-cost workflow
|
|
|
521
541
|
- A fourth seat is optional: add a second Executor when throughput-bound, or a second capable Director as an independent review lens when correctness-bound. Never use a cheap model as a review lens.
|
|
522
542
|
- Waiting is valid only when no authorized action or active assigned work remains, or while a role is awaiting a named predecessor and has no independent action it can advance.
|
|
523
543
|
- Dispatch, packet echo, status, and answers are not completion. Each role continues its active item in the same turn until it posts a terminal signal from its own vocabulary.
|
|
524
|
-
- Merge, publish, deploy, tag, release, credential, and irreversible actions require explicit authority
|
|
544
|
+
- Merge, publish, deploy, tag, release, credential, and irreversible actions require explicit authority.${SAME_REPOSITORY_WORKFLOW_DISCIPLINE}`;
|
|
525
545
|
const LOCAL_MODEL_DIRECTOR = `You own authorized intent, priorities, decisions, and verification that requires careful reading. Never implement a change.
|
|
526
546
|
|
|
527
547
|
Scope and authority:
|
package/dist/templates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAwCA,MAAM,CAAC,MAAM,6BAA6B,GAAG,kB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;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAA6B;IACjD,cAAc,EAAE,YAAY;IAC5B,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE,WAAW;CAC3B,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,gBAAwB,EACxB,QAAyB;IAEzB,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,gBAAgB,CAAC;IAChF,OAAO,QAAQ,EAAE,cAAc,IAAI,gBAAgB,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,oBAA+C,EAC/C,QAAkB;IAElB,IAAI,oBAAoB,IAAI,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5E,OAAO,QAAQ,CAAC,cAAc,IAAI,IAAI,CAAC;AACzC,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"}
|
package/docs/compatibility.md
CHANGED
|
@@ -20,9 +20,11 @@ that presents a different tag is rejected — it is never adapted to.
|
|
|
20
20
|
## Change Policy
|
|
21
21
|
|
|
22
22
|
A wire-shape change is simply made: the protocol tag increments and both the
|
|
23
|
-
client and server adopt the new tag together in a coordinated release.
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
client and server adopt the new tag together in a coordinated release. During
|
|
24
|
+
the independently published rollout, a new client and server can temporarily
|
|
25
|
+
be the latest published packages without sharing the same tag; incompatible
|
|
26
|
+
peers fail closed rather than degrade. The publication window is a release
|
|
27
|
+
property, not a compatibility mode.
|
|
26
28
|
|
|
27
29
|
A wire-shape change must include:
|
|
28
30
|
|
|
@@ -56,7 +58,7 @@ Director/Shaper/Executor template. A v5 peer and a v6 peer reject each other
|
|
|
56
58
|
during credential-free preflight, before an older peer can reject the new
|
|
57
59
|
template later while decoding a cube-creation request.
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
Published `borgmcp-shared@0.7.1` carries protocol v7. It adds
|
|
60
62
|
manage-gated `DELETE /api/cubes/:cubeId` with an exact terminal response,
|
|
61
63
|
atomic cascade semantics, and `CUBE_DELETED`. Every connected deleted-cube
|
|
62
64
|
stream receives one strict protocol error envelope as `event: error` before
|
|
@@ -64,6 +66,11 @@ close. Former authorized parent and drone credentials receive
|
|
|
64
66
|
`410 CUBE_DELETED` for that cube, including after authority restart; callers
|
|
65
67
|
that were never authorized still receive non-enumerating `404 NOT_FOUND`.
|
|
66
68
|
|
|
69
|
+
The `borgmcp-shared@0.8.1` release candidate retains protocol v7 and adds the
|
|
70
|
+
v2 invitation artifact: a canonical opaque token carrying the HTTPS endpoint,
|
|
71
|
+
CA SPKI SHA-256 pin, enrollment authority, secret, and integrity binding. The
|
|
72
|
+
strict codec rejects legacy or non-canonical forms before enrollment dispatch.
|
|
73
|
+
|
|
67
74
|
Removing or reinterpreting an existing field is a protocol-breaking change even
|
|
68
75
|
when TypeScript permits it. Implementations must not infer compatibility from a
|
|
69
76
|
successful build alone — they must run the shared conformance suite against the
|
|
@@ -71,7 +78,8 @@ exact tag they implement.
|
|
|
71
78
|
|
|
72
79
|
## Coordinated Rollout
|
|
73
80
|
|
|
74
|
-
The
|
|
81
|
+
The current workflows publish each package directly to npm's default `latest`
|
|
82
|
+
dist-tag. The least-bad order is therefore:
|
|
75
83
|
|
|
76
84
|
1. Publish the reviewed `borgmcp-shared` registry artifact only after its
|
|
77
85
|
separate tag and publication gates pass, under a version that has never been
|
|
@@ -83,6 +91,12 @@ The rollout order is fail-closed:
|
|
|
83
91
|
4. Deploy client and server support together. A peer on the prior protocol tag
|
|
84
92
|
and a peer on the new tag are incompatible; neither side falls back.
|
|
85
93
|
|
|
94
|
+
This order does not eliminate the publication window. Until the client release
|
|
95
|
+
finishes, `latest` can resolve to a new server and an older client, or the
|
|
96
|
+
reverse while the order advances. A user who installs both packages during that
|
|
97
|
+
window must install the matching coupled shared, server, and client versions
|
|
98
|
+
from the coordinated release instead of relying on `latest` for both peers.
|
|
99
|
+
|
|
86
100
|
## Model/Provider Selection
|
|
87
101
|
|
|
88
102
|
Model/provider selection is intentionally absent from the coordination contract.
|
package/docs/enrollment.md
CHANGED
|
@@ -25,11 +25,11 @@ mutation and must never be rerun or moved. `borgmcp-shared@0.6.1`,
|
|
|
25
25
|
`fa8a2dc072d4ffe2a16d5f02576fead822a2f72e`; successful attempt-1 workflow run
|
|
26
26
|
`30169732628` published registry integrity
|
|
27
27
|
`sha512-Wm4b0uoOAw9JCz5OTHD0Q2uXKkeWYdkVksdeZvRG8l62XGMY+G8GkNEsZT9L533LbVbQ29GhgF0htjDenQThDg==`.
|
|
28
|
-
Never rerun or move that tag. `borgmcp-shared@0.7.0`
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
creating `v0.
|
|
32
|
-
reviewed artifact remain separate, independently gated steps.
|
|
28
|
+
Never rerun or move that tag. `borgmcp-shared@0.7.0` and
|
|
29
|
+
`borgmcp-shared@0.7.1` are published and immutable. This source now identifies
|
|
30
|
+
the unpublished `0.8.1` protocol-v7 invitation-artifact release candidate. The
|
|
31
|
+
version bump grants no tag or publication authority: creating `v0.8.1` and
|
|
32
|
+
publishing the reviewed artifact remain separate, independently gated steps.
|
|
33
33
|
There is no compatibility path that returns a bearer from the server.
|
|
34
34
|
|
|
35
35
|
A client verifies the credential-free `GET /api/protocol` tag preflight before
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"outcome": "published",
|
|
4
|
+
"version": "0.7.1",
|
|
5
|
+
"tag": "v0.7.1",
|
|
6
|
+
"tag_object": "672423566ed75cf7704775cb480a75767e7c6851",
|
|
7
|
+
"commit": "f4870596ba79702f2e4eb3a6620802d5e538052d",
|
|
8
|
+
"tree": "ed3117008afede794a71620b6dfb4430ee4123a2",
|
|
9
|
+
"workflow_run_id": 30625736845,
|
|
10
|
+
"workflow_run_attempt": 1,
|
|
11
|
+
"workflow_conclusion": "success",
|
|
12
|
+
"verify_job_id": null,
|
|
13
|
+
"publish_job_id": null,
|
|
14
|
+
"artifact_integrity": "sha512-d4GE7ezGyoFN0uwA62gvRPUMfMdJ1kxhTunqU8dW3Qhy1n2SlNXZWr1Nthm6Goo0bAgvax8KEywyReodA6FyQA=="
|
|
15
|
+
}
|
|
16
|
+
]
|
package/docs/releasing.md
CHANGED
|
@@ -81,6 +81,22 @@ repository, workflow output, artifact, issue, or shell history.
|
|
|
81
81
|
the version or updating consumers. Registry propagation and later consumer
|
|
82
82
|
availability are operational observations, not release-workflow gates.
|
|
83
83
|
|
|
84
|
+
## Coupled Publication Window
|
|
85
|
+
|
|
86
|
+
The shared, server, and client packages are published independently. The current
|
|
87
|
+
release workflows publish directly to npm's default `latest` dist-tag, so the
|
|
88
|
+
least-bad order is shared first, server second, and client third. This keeps each
|
|
89
|
+
consumer pointed at an immutable shared artifact, but it cannot make the three
|
|
90
|
+
`latest` pointers atomic.
|
|
91
|
+
|
|
92
|
+
During that sequence, a user can install the newest server and newest client
|
|
93
|
+
while they still carry different protocol tags. Their credential-free preflight
|
|
94
|
+
fails closed by design; this is a publication-window mismatch, not a negotiation
|
|
95
|
+
or fallback case. The user remedy is to install the matching coupled shared,
|
|
96
|
+
server, and client versions from the coordinated release rather than retrying
|
|
97
|
+
`latest`. Do not describe this window as eliminated or promise an atomic
|
|
98
|
+
multi-package publication until all three release workflows support that shape.
|
|
99
|
+
|
|
84
100
|
The workflow publishes only `./release/<tarball>`. It never publishes from the
|
|
85
101
|
repository directory, a package name, a URL, a prior workflow artifact, or a
|
|
86
102
|
locally rebuilt replacement.
|
|
@@ -101,6 +117,30 @@ Once npm accepts the version, the immutable release has occurred. Never rerun,
|
|
|
101
117
|
republish, overwrite, unpublish, or silently substitute a replacement because a
|
|
102
118
|
later registry read is delayed or unavailable.
|
|
103
119
|
|
|
120
|
+
## Failed-Superseded Recovery
|
|
121
|
+
|
|
122
|
+
The tag-triggered workflow is single-job and first-attempt-only. If attempt 1
|
|
123
|
+
fails before the tarball is built, the tarball is verified, the clean consumer
|
|
124
|
+
is exercised, or `npm publish` runs, preserve the failed tag and run as immutable
|
|
125
|
+
evidence. The failed version is not an install target and must not be rerun.
|
|
126
|
+
|
|
127
|
+
Record the failure and prepare a newer version only from a clean tree:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
npm run release:prepare -- <next-version> \
|
|
131
|
+
--workflow-run-id <failed-tag-run-id> \
|
|
132
|
+
--workflow-run-attempt 1 \
|
|
133
|
+
--workflow-conclusion failure
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The release identity verifier binds the record to the annotated tag, the exact
|
|
137
|
+
workflow run and commit, the completed failed `publish` job, and the skipped
|
|
138
|
+
tarball, clean-consumer, and publish steps. It independently checks the npm
|
|
139
|
+
version list for registry absence. An attempt-2 run, a failure after packaging
|
|
140
|
+
or publication, an artifact integrity value on a failed record, or a version
|
|
141
|
+
present in npm is rejected. The generated record is `failed-superseded`; the
|
|
142
|
+
next release uses a new version and a new annotated tag.
|
|
143
|
+
|
|
104
144
|
## Immutable Historical Evidence
|
|
105
145
|
|
|
106
146
|
These records remain evidence, not reusable release inputs:
|
|
@@ -139,9 +179,9 @@ mutation. Never rerun or move that tag. `borgmcp-shared@0.6.1`,
|
|
|
139
179
|
`fa8a2dc072d4ffe2a16d5f02576fead822a2f72e`; successful attempt-1 workflow run
|
|
140
180
|
`30169732628` published registry integrity
|
|
141
181
|
`sha512-Wm4b0uoOAw9JCz5OTHD0Q2uXKkeWYdkVksdeZvRG8l62XGMY+G8GkNEsZT9L533LbVbQ29GhgF0htjDenQThDg==`.
|
|
142
|
-
Never rerun or move that tag. `borgmcp-shared@0.7.0`
|
|
143
|
-
|
|
144
|
-
release candidate. Its release requires
|
|
182
|
+
Never rerun or move that tag. `borgmcp-shared@0.7.0` and
|
|
183
|
+
`borgmcp-shared@0.7.1` are published and immutable. This source identifies the
|
|
184
|
+
unpublished `0.8.1` protocol-v7 invitation-artifact release candidate. Its release requires
|
|
145
185
|
reviewed source and explicit publication authorization through one protected
|
|
146
186
|
publish run whose terminal boundary is successful `npm publish`. The workflow
|
|
147
187
|
performs no post-publication registry readback. Consumers must update the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "borgmcp-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Shared protocol, domain, templates, and conformance contracts for Borg MCP implementations.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -62,6 +62,8 @@
|
|
|
62
62
|
"test": "vitest run",
|
|
63
63
|
"verify:artifact": "node scripts/verify-packed-artifact.mjs",
|
|
64
64
|
"verify:sbom": "node scripts/verify-release-sbom.mjs",
|
|
65
|
+
"release:prepare": "node scripts/release-identity.mjs prepare",
|
|
66
|
+
"verify:release-identity": "node scripts/release-identity.mjs verify",
|
|
65
67
|
"prepack": "npm run check && npm test && npm run build"
|
|
66
68
|
},
|
|
67
69
|
"keywords": [
|
|
@@ -90,6 +92,6 @@
|
|
|
90
92
|
"vitest": "^3.2.4"
|
|
91
93
|
},
|
|
92
94
|
"engines": {
|
|
93
|
-
"node": ">=
|
|
95
|
+
"node": ">=22.12.0"
|
|
94
96
|
}
|
|
95
97
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
decodeDecisionResultEnvelope,
|
|
10
10
|
decodeDecisionsResultEnvelope,
|
|
11
11
|
decodeEnrollmentExchangeResponseEnvelope,
|
|
12
|
+
decodeInvitationArtifact,
|
|
12
13
|
decodeAttachResponseEnvelope,
|
|
13
14
|
decodeDroneRuntimeMetadataPatch,
|
|
14
15
|
decodeEvictDroneResultEnvelope,
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
35
36
|
import {
|
|
36
37
|
CREATE_CUBE_ASSOCIATION_CONFORMANCE,
|
|
37
38
|
CREATE_CUBE_RETRY_CONFORMANCE,
|
|
39
|
+
INVITATION_ARTIFACT_CONFORMANCE,
|
|
38
40
|
ENROLLMENT_RETRY_CONFORMANCE,
|
|
39
41
|
} from './index.js';
|
|
40
42
|
|
|
@@ -335,6 +337,7 @@ export interface ConformanceEnvironment {
|
|
|
335
337
|
export const ADAPTER_CONFORMANCE_FIXTURES = [
|
|
336
338
|
{ id: 'http.unauthenticated-liveness', area: 'http' },
|
|
337
339
|
{ id: 'protocol.credential-free-preflight', area: 'protocol' },
|
|
340
|
+
{ id: 'enrollment.invitation-artifact', area: 'enrollment' },
|
|
338
341
|
{ id: 'enrollment.retry-authority', area: 'enrollment' },
|
|
339
342
|
{ id: 'repository.explicit-association', area: 'repository' },
|
|
340
343
|
{ id: 'security.adapter-boundary-injection', area: 'security' },
|
|
@@ -642,6 +645,30 @@ export async function runAdapterConformance(
|
|
|
642
645
|
return { authenticated: false, mutation_free: true, protocol_version: preflight.protocol_version };
|
|
643
646
|
});
|
|
644
647
|
|
|
648
|
+
await record('enrollment.invitation-artifact', async () => {
|
|
649
|
+
const errors: string[] = [];
|
|
650
|
+
for (const vector of INVITATION_ARTIFACT_CONFORMANCE) {
|
|
651
|
+
if (vector.expected === null) {
|
|
652
|
+
let rejected = false;
|
|
653
|
+
try {
|
|
654
|
+
decodeInvitationArtifact(vector.input);
|
|
655
|
+
} catch {
|
|
656
|
+
rejected = true;
|
|
657
|
+
}
|
|
658
|
+
if (!rejected) errors.push(`${vector.name}: permissive decoder accepted the invalid artifact.`);
|
|
659
|
+
continue;
|
|
660
|
+
}
|
|
661
|
+
try {
|
|
662
|
+
const decoded = decodeInvitationArtifact(vector.input);
|
|
663
|
+
invariant(same(decoded, vector.expected), `${vector.name} decoded a different artifact.`);
|
|
664
|
+
} catch (error) {
|
|
665
|
+
errors.push(`${vector.name}: ${error instanceof Error ? error.message : String(error)}`);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
invariant(errors.length === 0, errors.join(' | '));
|
|
669
|
+
return { vectors: INVITATION_ARTIFACT_CONFORMANCE.length };
|
|
670
|
+
});
|
|
671
|
+
|
|
645
672
|
await record('enrollment.retry-authority', async () => {
|
|
646
673
|
const retryVectorErrors: string[] = [];
|
|
647
674
|
for (const [index, vector] of ENROLLMENT_RETRY_CONFORMANCE.entries()) {
|
package/src/conformance/index.ts
CHANGED
|
@@ -7,6 +7,10 @@ import type {
|
|
|
7
7
|
EnrollmentExchangeRequest,
|
|
8
8
|
ResolveRepositoryCubeRequest,
|
|
9
9
|
} from '../protocol/contract.js';
|
|
10
|
+
import {
|
|
11
|
+
encodeInvitationArtifact,
|
|
12
|
+
type InvitationArtifact,
|
|
13
|
+
} from '../protocol/contract.js';
|
|
10
14
|
import type { EnrichedStreamEntry } from '../protocol/types.js';
|
|
11
15
|
|
|
12
16
|
export * from './adapter.js';
|
|
@@ -230,7 +234,51 @@ export interface EnrollmentRetryConformanceVector {
|
|
|
230
234
|
};
|
|
231
235
|
}
|
|
232
236
|
|
|
233
|
-
const
|
|
237
|
+
const ENROLLMENT_ARTIFACT: InvitationArtifact = {
|
|
238
|
+
version: 2,
|
|
239
|
+
endpoint: 'https://borg.example.test:7091',
|
|
240
|
+
ca_spki_sha256: 'a'.repeat(64),
|
|
241
|
+
authority: 'client',
|
|
242
|
+
secret: 'S'.repeat(43),
|
|
243
|
+
integrity: 'I'.repeat(43),
|
|
244
|
+
};
|
|
245
|
+
const ENROLLMENT_ARTIFACT_TOKEN = encodeInvitationArtifact(ENROLLMENT_ARTIFACT);
|
|
246
|
+
|
|
247
|
+
export const INVITATION_ARTIFACT_CONFORMANCE: readonly ConformanceVector<
|
|
248
|
+
string,
|
|
249
|
+
InvitationArtifact | null
|
|
250
|
+
>[] = [
|
|
251
|
+
{
|
|
252
|
+
name: 'decodes the canonical v2 invitation artifact',
|
|
253
|
+
input: ENROLLMENT_ARTIFACT_TOKEN,
|
|
254
|
+
expected: ENROLLMENT_ARTIFACT,
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: 'rejects a legacy opaque invitation before use',
|
|
258
|
+
input: 'I'.repeat(43),
|
|
259
|
+
expected: null,
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: 'rejects a mangled noncanonical invitation token',
|
|
263
|
+
input: `${ENROLLMENT_ARTIFACT_TOKEN}=`,
|
|
264
|
+
expected: null,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: 'rejects an invitation token above the outer bound',
|
|
268
|
+
input: 'A'.repeat(1025),
|
|
269
|
+
expected: null,
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: 'rejects a token with a duplicate trailing field',
|
|
273
|
+
input: `${ENROLLMENT_ARTIFACT_TOKEN}A`,
|
|
274
|
+
expected: null,
|
|
275
|
+
},
|
|
276
|
+
];
|
|
277
|
+
|
|
278
|
+
const ENROLLMENT_INVITATION = encodeInvitationArtifact({
|
|
279
|
+
...ENROLLMENT_ARTIFACT,
|
|
280
|
+
authority: 'client',
|
|
281
|
+
});
|
|
234
282
|
const ENROLLMENT_CREDENTIAL = 'A'.repeat(43);
|
|
235
283
|
const ENROLLMENT_RETRY_KEY = '00000000-0000-4000-8000-000000000101';
|
|
236
284
|
|