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.
@@ -38,6 +38,50 @@ function positiveInteger(value, name, maximum) {
38
38
  throw new ProtocolContractError(`Invalid coordination field "${name}".`);
39
39
  return decoded;
40
40
  }
41
+ function decodeManagedDrone(value) {
42
+ const input = object(value);
43
+ exact(input, ['id', 'cube_id', 'role_id', 'label'], ['id', 'cube_id', 'role_id', 'label']);
44
+ return {
45
+ id: decodeUuid(input.id, ['id']),
46
+ cube_id: decodeUuid(input.cube_id, ['cube_id']),
47
+ role_id: decodeUuid(input.role_id, ['role_id']),
48
+ label: boundedString(input.label, 'label', 120),
49
+ };
50
+ }
51
+ export function decodeReassignDroneRequest(value) {
52
+ const input = object(value);
53
+ exact(input, ['role_id'], ['role_id']);
54
+ return { role_id: decodeUuid(input.role_id, ['role_id']) };
55
+ }
56
+ export function decodeReassignDroneRequestEnvelope(value) {
57
+ return decodeProtocolEnvelope(value, decodeReassignDroneRequest);
58
+ }
59
+ export function decodeReassignDroneResult(value) {
60
+ const input = object(value);
61
+ exact(input, ['drone'], ['drone']);
62
+ return { drone: decodeManagedDrone(input.drone) };
63
+ }
64
+ export function decodeReassignDroneResultEnvelope(value) {
65
+ return decodeProtocolEnvelope(value, decodeReassignDroneResult);
66
+ }
67
+ export function decodeEvictDroneRequest(value) {
68
+ const input = object(value);
69
+ exact(input, [], []);
70
+ return {};
71
+ }
72
+ export function decodeEvictDroneRequestEnvelope(value) {
73
+ return decodeProtocolEnvelope(value, decodeEvictDroneRequest);
74
+ }
75
+ export function decodeEvictDroneResult(value) {
76
+ const input = object(value);
77
+ exact(input, ['drone_id', 'evicted'], ['drone_id', 'evicted']);
78
+ if (input.evicted !== true)
79
+ throw new ProtocolContractError('Invalid drone eviction result.');
80
+ return { drone_id: decodeUuid(input.drone_id, ['drone_id']), evicted: true };
81
+ }
82
+ export function decodeEvictDroneResultEnvelope(value) {
83
+ return decodeProtocolEnvelope(value, decodeEvictDroneResult);
84
+ }
41
85
  export function decodeReadLogRequest(value) {
42
86
  const input = object(value);
43
87
  exact(input, ['cursor', 'limit'], ['cursor']);
@@ -1 +1 @@
1
- {"version":3,"file":"coordination.js","sourceRoot":"","sources":["../../src/protocol/coordination.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,cAAc,GAGf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AA6BrD,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,qBAAqB,CAAC,iCAAiC,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,KAAgC,CAAC;AAC1C,CAAC;AAED,SAAS,KAAK,CACZ,KAA8B,EAC9B,OAA0B,EAC1B,QAA2B;IAE3B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,qBAAqB,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAC;IACtG,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC;YACtD,MAAM,IAAI,qBAAqB,CAAC,+BAA+B,GAAG,IAAI,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAc,EAAE,IAAY,EAAE,OAAe;IAClE,IAAI,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TED = "DRONE_EVICTED",
18
18
  DRONE_FROZEN = "DRONE_FROZEN",
19
19
  UNSUPPORTED_PROTOCOL_VERSION = "UNSUPPORTED_PROTOCOL_VERSION",
20
- UNSUPPORTED_CAPABILITY = "UNSUPPORTED_CAPABILITY",
21
20
  CURSOR_INVALID = "CURSOR_INVALID",
22
21
  CURSOR_EXPIRED = "CURSOR_EXPIRED",
23
- SESSION_REVOKED = "SESSION_REVOKED"
22
+ SESSION_REVOKED = "SESSION_REVOKED",
23
+ SESSION_REJECTED = "SESSION_REJECTED"
24
24
  }
25
25
  export interface ErrorResponse {
26
26
  code: ErrorCode;
27
27
  message: string;
28
28
  details?: string;
29
29
  retryAfter?: number;
30
- requiredCapability?: string;
31
- supportedVersions?: readonly string[];
32
30
  }
33
31
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/protocol/errors.ts"],"names":[],"mappings":"AACA,oBAAY,SAAS;IACnB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,qBAAqB,0BAA0B;IAC/C,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;IAC3C,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,sBAAsB,2BAA2B;IACjD,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,sBAAsB,2BAA2B;IACjD,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,4BAA4B,iCAAiC;IAC7D,sBAAsB,2BAA2B;IACjD,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;CACpC;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/protocol/errors.ts"],"names":[],"mappings":"AACA,oBAAY,SAAS;IACnB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,qBAAqB,0BAA0B;IAC/C,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,mBAAmB,wBAAwB;IAC3C,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,sBAAsB,2BAA2B;IACjD,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,sBAAsB,2BAA2B;IACjD,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,4BAA4B,iCAAiC;IAC7D,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAOnC,gBAAgB,qBAAqB;CACtC;AAGD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -18,9 +18,9 @@ export var ErrorCode;
18
18
  ErrorCode["DRONE_EVICTED"] = "DRONE_EVICTED";
19
19
  ErrorCode["DRONE_FROZEN"] = "DRONE_FROZEN";
20
20
  ErrorCode["UNSUPPORTED_PROTOCOL_VERSION"] = "UNSUPPORTED_PROTOCOL_VERSION";
21
- ErrorCode["UNSUPPORTED_CAPABILITY"] = "UNSUPPORTED_CAPABILITY";
22
21
  ErrorCode["CURSOR_INVALID"] = "CURSOR_INVALID";
23
22
  ErrorCode["CURSOR_EXPIRED"] = "CURSOR_EXPIRED";
24
23
  ErrorCode["SESSION_REVOKED"] = "SESSION_REVOKED";
24
+ ErrorCode["SESSION_REJECTED"] = "SESSION_REJECTED";
25
25
  })(ErrorCode || (ErrorCode = {}));
26
26
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/protocol/errors.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACnB,0CAA6B,CAAA;IAC7B,0CAA6B,CAAA;IAC7B,0CAA6B,CAAA;IAC7B,4DAA+C,CAAA;IAC/C,4CAA+B,CAAA;IAC/B,4CAA+B,CAAA;IAC/B,oDAAuC,CAAA;IACvC,oDAAuC,CAAA;IACvC,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,oCAAuB,CAAA;IACvB,wCAA2B,CAAA;IAC3B,8DAAiD,CAAA;IACjD,4CAA+B,CAAA;IAC/B,0CAA6B,CAAA;IAC7B,0EAA6D,CAAA;IAC7D,8DAAiD,CAAA;IACjD,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;AACrC,CAAC,EAvBW,SAAS,KAAT,SAAS,QAuBpB"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/protocol/errors.ts"],"names":[],"mappings":"AACA,MAAM,CAAN,IAAY,SA6BX;AA7BD,WAAY,SAAS;IACnB,0CAA6B,CAAA;IAC7B,0CAA6B,CAAA;IAC7B,0CAA6B,CAAA;IAC7B,4DAA+C,CAAA;IAC/C,4CAA+B,CAAA;IAC/B,4CAA+B,CAAA;IAC/B,oDAAuC,CAAA;IACvC,oDAAuC,CAAA;IACvC,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,oCAAuB,CAAA;IACvB,wCAA2B,CAAA;IAC3B,8DAAiD,CAAA;IACjD,4CAA+B,CAAA;IAC/B,0CAA6B,CAAA;IAC7B,0EAA6D,CAAA;IAC7D,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,gDAAmC,CAAA;IAOnC,kDAAqC,CAAA;AACvC,CAAC,EA7BW,SAAS,KAAT,SAAS,QA6BpB"}
@@ -1,11 +1,3 @@
1
- export declare const PROTOCOL_VERSION: "1";
2
- export declare const SUPPORTED_PROTOCOL_VERSIONS: readonly ["1"];
3
- export type ProtocolVersion = (typeof SUPPORTED_PROTOCOL_VERSIONS)[number];
4
- export interface CompatibilityEntry {
5
- packageRange: string;
6
- protocolVersions: readonly ProtocolVersion[];
7
- notes: string;
8
- }
9
- export declare const COMPATIBILITY_MATRIX: readonly CompatibilityEntry[];
10
- export declare function isProtocolVersionSupported(value: unknown): value is ProtocolVersion;
1
+ export declare const PROTOCOL_VERSION: "2";
2
+ export type ProtocolVersion = typeof PROTOCOL_VERSION;
11
3
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/protocol/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,EAAG,GAAY,CAAC;AAG7C,eAAO,MAAM,2BAA2B,gBAA8B,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,SAAS,eAAe,EAAE,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;CACf;AAOD,eAAO,MAAM,oBAAoB,EAAE,SAAS,kBAAkB,EAW7D,CAAC;AAEF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAGnF"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/protocol/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,gBAAgB,EAAG,GAAY,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC"}
@@ -1,19 +1,2 @@
1
- export const PROTOCOL_VERSION = '1';
2
- export const SUPPORTED_PROTOCOL_VERSIONS = [PROTOCOL_VERSION];
3
- export const COMPATIBILITY_MATRIX = [
4
- {
5
- packageRange: '>=0.3.0 <0.4.0',
6
- protocolVersions: SUPPORTED_PROTOCOL_VERSIONS,
7
- notes: 'Retry-safe owner enrollment and idempotent multi-cube creation.',
8
- },
9
- {
10
- packageRange: '>=0.2.0 <0.3.0',
11
- protocolVersions: SUPPORTED_PROTOCOL_VERSIONS,
12
- notes: 'Legacy server-generated enrollment credential response.',
13
- },
14
- ];
15
- export function isProtocolVersionSupported(value) {
16
- return typeof value === 'string' &&
17
- SUPPORTED_PROTOCOL_VERSIONS.includes(value);
18
- }
1
+ export const PROTOCOL_VERSION = '2';
19
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/protocol/version.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAY,CAAC;AAG7C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,gBAAgB,CAAU,CAAC;AAevE,MAAM,CAAC,MAAM,oBAAoB,GAAkC;IACjE;QACE,YAAY,EAAE,gBAAgB;QAC9B,gBAAgB,EAAE,2BAA2B;QAC7C,KAAK,EAAE,iEAAiE;KACzE;IACD;QACE,YAAY,EAAE,gBAAgB;QAC9B,gBAAgB,EAAE,2BAA2B;QAC7C,KAAK,EAAE,yDAAyD;KACjE;CACF,CAAC;AAEF,MAAM,UAAU,0BAA0B,CAAC,KAAc;IACvD,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC7B,2BAAiD,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACvE,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/protocol/version.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAY,CAAC"}
@@ -18,7 +18,7 @@ export interface MessageTaxonomyClass {
18
18
  export type MessageTaxonomy = MessageTaxonomyClass[];
19
19
  export declare const ESCALATION_DISCIPLINE = "\n\n**Escalation discipline:**\n- The cube hierarchy is Drones \u2194 your cube's coordinating role \u2194 Queen. Address the coordinating role when blocked; **never** address Queen directly via cube messages.\n- When blocked \u2014 missing context, ambiguous scope, harness rejection, environment issue, anything \u2014 post to cube log with a structured frame: \"<coordinating role>: blocker X, options A/B/C, my pick is B.\" The coordinating role either resolves in-lane OR escalates to Queen if the decision is genuinely Queen-class.\n- **Do NOT bypass cube routing with a direct human-prompt channel for in-cube decisions.** Direct human prompts are reserved for genuinely user-only-knowable information in solo work (preferences, configuration values, etc.) \u2014 never for \"should I deploy?\" / \"should I skip E2E?\" / \"which option?\" \u2014 those are coordinating-role decisions posted to the cube log.\n- User-facing text output: same rule. Framing should be \"<coordinating role>: blocker X, options A/B/C, my pick is B\" \u2014 never \"Queen: which of A/B/C?\" The cube log is the channel; how the interface displays your output is incidental.\n- If the coordinating role is silent >10 min on a blocker, PING via `borg_roster since=<dispatch-entry-id>` or post a follow-up \u2014 don't bypass to Queen.\n- Autonomous-mode default: if you can resolve a question by reading the cube log + your role playbook + the codebase, do so without escalating. Escalate only when you genuinely need a decision the coordinating role (or higher) holds.";
20
20
  export declare const ANTI_PASSIVE_STANDING_DISCIPLINE = "\n\n**Anti-passive-Standing discipline:**\n\n`Standing.` is the correct reply to an in-progress transition. It is the WRONG reply when the next expected signal is overdue. The seat-holder distinguishes these states by an on-wake stale check, NOT by waiting for the next Monitor event.\n\n**On every Monitor wake AND every ScheduleWakeup heartbeat \u2014 run the stale check using the cheapest sufficient Borg read:**\n0. Routine wake triage starts with `borg_read-log unread_only=true` \u2014 NOT a manual `since` cursor or bare `limit` (those skip during bursts; `unread_only` reads from your server-side read cursor, oldest-unread first, advancing on each call, so you never miss an entry). DRAIN: if it returns a full set (count == limit) or `borg_roster` shows `behind_by` > 0, call `read-log unread_only=true` again until the return is < limit. Reserve `limit` for explicit bounded reads (e.g. a vote tally). `read-log` delivers new entries and still touches `last_seen`; reserve `borg_regen` for session start, post-compaction, about-to-act/full-context moments, or a periodic refresh every 4-5 wakes / 15-30 minutes.\n1. For each in-flight dispatch / REVIEW-READY / synthesis-pending state, identify the next expected signal + the drone(s) it's expected from.\n2. Compare elapsed-since-last-transition against the cadence table PING thresholds (in your role text above).\n3. If ANY row is past its PING threshold, you do NOT post `Standing.` \u2014 you take action per the escalation ladder below.\n\n**Escalation ladder (concrete; do not improvise \u2014 pick the lowest step that applies):**\n\n- **Step 1 \u2014 PING the specific drone** (when elapsed > PING threshold for that phase):\n Post `PING: <drone-label> \u2014 you ACK'd <thing> at HH:MM:SSZ; current status?` to the cube log. Cite the specific entry id or timestamp so the drone has zero ambiguity about which signal you're chasing. Wait one cadence-bucket (typically 5-10 min) for response.\n\n- **Step 2 \u2014 Probe the drone's liveness** (when PING gets no response within one cadence-bucket):\n Run `borg_roster since=<dispatch-entry-id>` to check the drone's `awake`/`stale-since-X` marker AND `last_log_post` freshness. If the drone is marked stale, proceed to Step 3. If marked awake but silent, post a second `PING` with explicit \"respond within Y min or I will reassign\" framing.\n\n- **Step 3 \u2014 Reassign the role** (when the drone is confirmed unresponsive: silent past 2x PING threshold AND `borg_roster` shows stale `last_log_post`):\n Pick a confirmed-alive drone (recent `awake` marker) compatible with the role. Run `borg_reassign-drone` to move the role assignment. Post a reassignment notice in the cube log naming the previous drone + the new drone + the work item handed over. Brief the new drone on the in-flight state. If the previous drone reconnects later, they post a returning-from-stall message; you decide whether to re-reassign or leave the current assignment in place.\n\n- **Step 4 \u2014 Suspect systemic failure** (when 3+ drones go simultaneously silent past their PING thresholds, or when reassignments themselves don't produce engagement):\n Stop reassigning. Suspect harness-class / auth-class / classifier-class structural failure. Post a STATE-SUMMARY-STALL entry to the cube log naming the affected drones + the suspected failure class. Surface to Queen (or to the human Queen on next return if autonomous) \u2014 this class of failure is above the Coordinator's resolution authority because the failure mode itself prevents normal dispatch from working.\n\n**Coordinator/Queen seats DO NOT STAND:** `Standing` is BANNED for the Coordinator-class seat. The earlier \"Standing-with-explicit-reason\" rule was a half-measure that still produced visibly idle turns; the directive now is unconditional \u2014 there is always productive Coordinator work, even when no gate is overdue and no dispatch is in flight. If you can't post `Standing`, you have to find something to do.\n\n**What \"productive Coordinator work\" looks like when no urgent dispatch is in flight:**\n- **Pre-stage the next merge artifact.** If a pull request is mid-review at 4/5, open it in the repository host + draft the merge-commit body NOW so the final APPROVED triggers one command. Don't wait for the vote to start the prep work.\n- **File the FRICTION you observed but didn't yet write up.** Per the cube directive, every friction observation is a tracked issue. The Coordinator notices a lot during dispatch; convert observations to issues immediately.\n- **Audit open work for candidate triage.** Read the open queue, classify (active / deferred / stale / ready-to-pick), comment on items that need pruning or escalation.\n- **Smoke-test what just shipped.** A merge+deploy from earlier in the session is now in production \u2014 verify the user-facing surface actually behaves as the merge claimed. Catch broken-ship issues before users do.\n- **Update durable docs.** Project instructions, role descriptions, runbook docs \u2014 small drifts noticed during the session that warrant codification.\n- **Probe drone liveness pre-emptively** via `borg_roster` \u2014 surface stale drones before they become a blocker on the next dispatch.\n- **Pre-validate the next work-batch dispatches.** If the next batch is implied by current state, draft the dispatch text + scope notes so it lands cleanly when the current batch completes.\n- **Run the on-wake stale check** (which IS standing-equivalent action even when nothing's overdue \u2014 it produces a snapshot of cube state, not a Standing reply).\n\n**The forcing function:** if you're about to type `Standing for X`, instead post the work you're doing while waiting. If you're not doing work while waiting, the new directive says you ARE failing \u2014 find work.\n\n**Verify-before-claiming (paired discipline):** the no-Standing directive trades correctness for velocity at the synthesis step. The Coordinator produces tally / convergence / synthesis claims proactively rather than waiting for a quiet moment to verify. WITHOUT a verify gate, this produces hallucinated tallies \u2014 listing votes that have NOT been verified via a fresh log read. Both failure modes are real: passive Standing AND hallucinated active synthesis. The paired discipline:\n\n- Before posting any tally / convergence / synthesis claim that names specific drone votes or counts, run `borg_read-log limit \u226510` for brainstorm-class threads OR `limit \u22655` for gate-convergence threads.\n- For gate-convergence threads, the canonical lens-vote format is `GATE-PASS: <lens-name>` followed by the disposition; pattern-match for this in the scan. Role verdict formats accepted: `REVIEW-APPROVED` (CR), `SECURITY-APPROVED` (SR), `RQ-APPROVED` (RQ), `PD-APPROVED` (PD), `PS-APPROVED` (PS). Encourage `GATE-PASS:` for multi-lens convergence posts.\n- If the scan misses a recent post (Monitor race / regen cursor stale), explicitly re-read on the next iteration before re-claiming the tally. ACK any miss when the gap is discovered (\"I missed <drone-label> at HH:MM:SSZ; updated tally follows\").\n\n**Canonical lens-vote format** (adopt `GATE-PASS:` going forward):\n```\nGATE-PASS: <lens> <branch> @ <commit-sha>\n<one-line disposition>\n```\nExamples: `GATE-PASS: CR feat/foo @ abc1234`, `GATE-PASS: SR feat/foo @ abc1234`. Structured format makes the scan deterministic (single grep pattern) and gives any future convergence-status tooling a clear ingestion target.\n\n**Coordinator owns deadlock resolution (HIGH-PRIORITY DIRECTIVE):**\n\nWhen the cube is at risk of deadlock \u2014 any pattern where progress requires action but no drone has explicit ownership of the required action \u2014 the Coordinator (or Queen seat in autonomous mode) is responsible for resolving the situation by **explicitly assigning the action to a named drone**. Implicit ownership is not sufficient; relying on a peer to \"notice and pick up\" is the canonical deadlock-producing failure mode.\n\n**Common deadlock classes the Coordinator resolves**:\n\n- **Author-gate-conflict**: when a gate-bearing drone (CR / SR / RQ / PD / PS / etc.) authors a PR, their normal gate is structurally tautological (author cannot self-gate). Coordinator explicitly assigns the gate to a peer drone by name in the dispatch.\n- **Cross-blocked silence**: when drone-A is waiting on drone-B and drone-B is waiting on drone-A (each tracking the other as upstream), neither is wrong but neither will move. Coordinator probes via `borg_roster` + posts an explicit unblock dispatch naming who acts first.\n- **Conditional dispatch with no enforcer**: \"If drone-X is silent by time T, drone-Y takes over\" produces no action unless the Coordinator arms their own ScheduleWakeup at deadline T to enforce the conditional.\n- **Unowned action surface**: a PR needs a deploy, a publish, a follow-up issue, etc., but the dispatch didn't name an owner. Coordinator assigns or executes themselves.\n- **Multi-drone NIT disagreement**: two drones flag conflicting NITs on the same PR with no resolution path. Coordinator synthesizes (no-collapse) and explicitly picks.\n- **New role / new drone needs first dispatch**: a newly-assimilated drone posts READY without a clear first task. Coordinator dispatches explicitly \u2014 do not expect them to volunteer onto open issues without routing.\n\n**Forcing function**: if you (Coordinator) see two posts that imply \"someone should pick this up\" without naming who, that's a deadlock-risk signal. Assign explicitly within one cadence-bucket (5-15 min per the cadence table). Escalate to Queen ONLY for Queen-class assignment decisions.\n\n**Companion bottom-up rule \u2014 idle drones may volunteer cross-role**: idle drones (capacity clean, no in-flight work) may volunteer to pick up unowned cross-role tasks even when the work doesn't match their primary role description, provided: (a) the work is visible in the cube log as unowned (REVIEW-READY without an explicit assignee for the gate-class they're volunteering for; OR a Coordinator post tagged with \"needs cross-coverage\"), (b) the volunteer drone posts `VOLUNTEER: <task> \u2014 <lens-axis I'm covering>` BEFORE doing the work so the Coordinator + cube see the claim, (c) the volunteer drone explicitly names which axis-lens they're applying (e.g., a CR-axis drone volunteering for testing-by-non-author posts `VOLUNTEER: <branch> \u2014 RQ testing-track cross-coverage from CR-axis lens` to make the cross-role framing explicit), (d) the volunteer drone's primary role doesn't have an in-flight obligation. The bottom-up rule is belt-and-suspenders with the Coordinator-explicit-assignment rule above \u2014 both can fire; whichever lands first owns the work.\n\n**Reassignment authority (autonomous-mode scope):** the Coordinator-class seat (Queen-by-delegation included) has standing authority to reassign roles within the existing cube's role roster WITHOUT per-reassignment Queen authorization, provided: (a) the reassignment is to a confirmed-alive drone, (b) the previous drone is documented as unresponsive per Step 3, (c) the reassignment is announced in cube log. Reassignment is operational continuity, not a Queen-policy decision.";
21
- export declare const RELEASE_CYCLE_SHAPES = "\n\n**Release-cycle shapes (autonomous-mode + cluster-recovery context):**\n\nThe cube's release-cycle discipline has three documented shapes; the seat-holder elects the appropriate shape per release based on the trigger rules below. **Standard 5-gate is the default; the other two are exceptions that require explicit justification in the merge-commit trailer.**\n\n- **(1) Standard 5-gate cycle (default):** Code Reviewer REVIEW-APPROVED + Security Auditor SECURITY-APPROVED + Release Quality RQ-APPROVED + Product Design PD-APPROVED + Coordinator merge. Used when SR/RQ/PD seats are live AND no exception applies. Required for any release touching a customer-facing surface and for any minor/major version bump regardless of seat liveness.\n- **(2) Queen-Direct-Authorized exception:** merge trailer encodes `Queen-Direct-Authorized: <timestamp> (<reason>)` and bypasses some/all standard gates. Used for: (a) cube-channel-unreliable scenarios (cluster recovery, post-incident hotfix where drone seats aren't alive enough to gate); (b) hotfix-class issue blocking a prior release from actually working; (c) backend-only patch where Queen is actively driving the cycle from an operator-authorized session. Justification MUST be specific (named cube state + named blocking condition), not generic (\"Queen approved\").\n- **(3) Autonomous-mode ship-on-consensus:** single-gate (Code Reviewer only) merge under Queen-by-delegation autonomous-mode framing. Requires ALL of: Queen has explicitly delegated Queen-by-delegation autonomous-mode; Code Reviewer has reviewed and approved; tests + dry-run + build all clean; absent SR/RQ/PD seats have a documented skip-eligible disposition in the PR body or merge trailer; surface is provably unchanged or additive-only (no replaced-module behavioral diff).\n\n**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.\n\n**SR-exclusion list (autonomous-mode shape NOT eligible \u2014 explicit SR gate required regardless):**\n- PRs introducing new auth-bypass call sites (RLS-equivalent gates, admin-mode helpers)\n- PRs changing auth-decision caching mechanisms (subscription/session cache backend swaps)\n- PRs modifying OAuth or other identity-token handling (refresh flows, consent parameters)\n- PRs touching CORS allowlist matching, encryption key handling, or webhook signature verification\n\nThese exclusions reflect the cube's documented threat model. Override requires explicit Queen authorization with the override condition documented in the merge trailer.\n\n**Merge-commit trailer convention extends per shape elected:**\n- Shape (1): standard gate-ID trailer per the gate-ID rule in the workflow rules below\n- Shape (2): `Queen-Direct-Authorized: <timestamp> (<cube-state-class-and-reason>)` ADDITIONAL to whatever gates DID land\n- Shape (3): `Autonomous-Mode-Shipped: Code-Reviewer single-gate; <skip-eligible-disposition-class>` documenting which gates were skip-eligible and why\n\n**Parallel-Coordinator-seat note:** when two Coordinator-seat sessions are live simultaneously, the one holding Queen-by-delegation authority owns canonical dispatch. The other yields. Surface the disposition in the cube log to keep the audit-trail clean.";
21
+ export declare const RELEASE_CYCLE_SHAPES = "\n\n**Release-cycle shapes (autonomous-mode + cluster-recovery context):**\n\nThe cube's release-cycle discipline has three documented shapes; the seat-holder elects the appropriate shape per release based on the trigger rules below. **Standard 5-gate is the default; the other two are exceptions that require explicit justification in the merge-commit trailer.**\n\n- **(1) Standard 5-gate cycle (default):** Code Reviewer REVIEW-APPROVED + Security Auditor SECURITY-APPROVED + Release Quality RQ-APPROVED + Product Design PD-APPROVED + Coordinator merge. Used when SR/RQ/PD seats are live AND no exception applies. Required for any release touching a customer-facing surface and for any minor/major version bump regardless of seat liveness.\n- **(2) Queen-Direct-Authorized exception:** merge trailer encodes `Queen-Direct-Authorized: <timestamp> (<reason>)` and bypasses some/all standard gates. Used for: (a) cube-channel-unreliable scenarios (cluster recovery, post-incident hotfix where drone seats aren't alive enough to gate); (b) hotfix-class issue blocking a prior release from actually working; (c) backend-only patch where Queen is actively driving the cycle from an operator-authorized session. Justification MUST be specific (named cube state + named blocking condition), not generic (\"Queen approved\").\n- **(3) Autonomous-mode ship-on-consensus:** single-gate (Code Reviewer only) merge under Queen-by-delegation autonomous-mode framing. Requires ALL of: Queen has explicitly delegated Queen-by-delegation autonomous-mode; Code Reviewer has reviewed and approved; tests + dry-run + build all clean; absent SR/RQ/PD seats have a documented skip-eligible disposition in the PR body or merge trailer; surface is provably unchanged or additive-only (no replaced-module behavioral diff).\n\n**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.\n\n**SR-exclusion list (autonomous-mode shape NOT eligible \u2014 explicit SR gate required regardless):**\n- PRs introducing new auth-bypass call sites (scoped-store gates, admin-mode helpers)\n- PRs changing authorization-decision caching mechanisms (session cache storage swaps)\n- PRs modifying identity or session-token handling (verification, renewal, revocation)\n- PRs touching CORS allowlist matching, encryption key handling, or webhook signature verification\n\nThese exclusions reflect the cube's documented threat model. Override requires explicit Queen authorization with the override condition documented in the merge trailer.\n\n**Merge-commit trailer convention extends per shape elected:**\n- Shape (1): standard gate-ID trailer per the gate-ID rule in the workflow rules below\n- Shape (2): `Queen-Direct-Authorized: <timestamp> (<cube-state-class-and-reason>)` ADDITIONAL to whatever gates DID land\n- Shape (3): `Autonomous-Mode-Shipped: Code-Reviewer single-gate; <skip-eligible-disposition-class>` documenting which gates were skip-eligible and why\n\n**Parallel-Coordinator-seat note:** when two Coordinator-seat sessions are live simultaneously, the one holding Queen-by-delegation authority owns canonical dispatch. The other yields. Surface the disposition in the cube log to keep the audit-trail clean.";
22
22
  export declare const GIT_OPERATIONAL_DISCIPLINE_BUILDER = "\n\n**Git operational discipline (empirically-motivated):**\n\nThese rules prevent primary-branch corruption caused by chained git operations and soft resets with divergent-ancestor staging. The failure class is repeatable by any drone touching git state.\n\n- **Pre-commit reflex: always run `git diff --staged --stat` before `git commit`.** Verify file count, LOC direction (+/-), and paths match intent. Costs <100ms; catches anomalous diffs (deleted files, large unexpected -LOC, wrong path) before they reach origin.\n- **Never chain `&&` across git-state-touching ops.** `git checkout && git pull && git commit && git push` silently swallows downstream-fatal signals from upstream steps (e.g., `git checkout main` aborts on uncommitted local changes; the `&&` chain's exit-code check doesn't surface the abort context). Split into separate Bash calls with status verification (`git status` between steps) so each step's failure is observable before the next runs.\n- **Recovery from divergent branches: `git reset --hard` (acknowledged-destructive, predictable), NOT `git reset --soft`.** Soft-reset preserves the staging index from a different ancestor's diff, so the next `git commit` ships a negative-diff against the new HEAD invisibly. `--hard` is loud about its destruction; `--soft` is silent about it. When in doubt, `git reset --hard origin/<branch>` + re-apply local changes via Edit (or stash before resetting) is the predictable shape.\n- **Force-pushes are bounded operations.** Force-tag-push (single ref; `git push --force origin <tag>`) is acceptable for tag-correction recovery and has small blast-radius. Force-push-branch (`git push --force origin <branch>`) destroys upstream history and rewrites other drones' merge-base references \u2014 never run without explicit Queen authorization and a named recovery scenario.";
23
23
  export declare const GIT_OPERATIONAL_DISCIPLINE_COORDINATOR = "\n\n**Git operational discipline (empirically-motivated):**\n\nThese rules prevent primary-branch corruption caused by chained git operations and soft resets with divergent-ancestor staging. Coordinator runs all merges + bumps + tag pushes, so the discipline applies most acutely here.\n\n- **Pre-commit reflex: always run `git diff --staged --stat` before `git commit`.** Verify file count, LOC direction (+/-), and paths match intent. Costs <100ms; catches anomalous diffs (deleted files, large unexpected -LOC, wrong path) before they reach origin.\n- **Never chain `&&` across git-state-touching ops.** `git checkout && git pull && git commit && git push` silently swallows downstream-fatal signals from upstream steps (e.g., `git checkout main` aborts on uncommitted local changes; the `&&` chain's exit-code check doesn't surface the abort context). Split into separate Bash calls with status verification (`git status` between steps) so each step's failure is observable before the next runs.\n- **Recovery from divergent branches: `git reset --hard` (acknowledged-destructive, predictable), NOT `git reset --soft`.** Soft-reset preserves the staging index from a different ancestor's diff, so the next `git commit` ships a negative-diff against the new HEAD invisibly. `--hard` is loud about its destruction; `--soft` is silent about it. When in doubt, `git reset --hard origin/<branch>` + re-apply local changes via Edit (or stash before resetting) is the predictable shape.\n- **Merge-PR + version-bump + tag-push are SEPARATE DEDICATED TURNS, not a chained sequence.** Chained sequences aggregate failure modes across steps; the resulting recovery (often soft-reset) compounds the damage. Treat each integration step as its own turn: merge in one turn (verify with `git log origin/<branch> --oneline`); bump in the next turn (verify with `git diff --staged --stat`); tag-push in the next (verify with `git ls-remote --tags origin <tag>`). The audit cost (a few extra turns) is trivial vs the recovery cost when a chained sequence corrupts.\n- **Force-pushes are bounded operations.** Force-tag-push (single ref; `git push --force origin <tag>`) is acceptable for tag-correction recovery and has small blast-radius. **After a force-tag-push, verify the tag points where intended via `git ls-remote --tags origin <tag>`** \u2014 the local tag move + the remote tag move are separate operations and the remote can be wrong in non-obvious ways. Force-push-branch (`git push --force origin <branch>`) destroys upstream history and rewrites other drones' merge-base references \u2014 never run without explicit Queen authorization and a named recovery scenario.";
24
24
  export declare const WAKE_PATH_MONITOR_DISCIPLINE = "\n\n**Wake-path liveness discipline:**\n\nThe cube's configured wake mechanism is part of the seat's liveness contract, not disposable task-local state. **Keep it active for the entire live life of the seat.** Do not disable it during idle periods, routine cleanup, or the end of an individual work cycle; doing so makes the seat unable to receive dispatches and gate signals.\n\nOnly disable the wake mechanism after the control plane authoritatively confirms that the seat is in a terminal lifecycle state. A notification or quoted status is a wake hint, not proof: confirm terminal state through an authenticated control-plane check before shutting down. A reversible suspension is explicitly non-terminal \u2014 keep the wake mechanism active so the seat can resume when the suspension clears.\n\n**Idle \u2260 manufacture liveness posts:** normal authenticated reads and wake handling provide proof-of-life. Do not invent periodic standing, liveness, or keep-alive log posts on a self-set cadence. Respond when an actual heartbeat request arrives; do not turn the heartbeat into a work engine.";
@@ -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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O,MAAM,2BAA2B,kwDASmS,CAAC;AAE5U,eAAO,MAAM,uBAAuB,siEAWsN,CAAC;AAE3P,eAAO,MAAM,4BAA4B,UAExC,CAAC;AAEF,eAAO,MAAM,8BAA8B,UAW1C,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,EAAE,CAAC;IAStB,cAAc,CAAC,EAAE,MAAM,CAAC;IAOxB,gBAAgB,CAAC,EAAE,eAAe,CAAC;CACpC;AAiCD,eAAO,MAAM,2BAA2B,2xBAEsuB,CAAC;AA2Z/wB,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAG9C,CAAC;AAEF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAEzD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C;AAaD,wBAAgB,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 @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,4BAA4B,EAAE;SACnK;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAA6B;IACjD,SAAS,EAAE,OAAO;IAClB,cAAc,EAAE,YAAY;CAC7B,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;AAaD,MAAM,UAAU,6BAA6B,CAC3C,gBAAwB,EACxB,QAAyB;IAEzB,IAAI,gBAAgB,IAAI,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACvD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,OAAO,QAAQ,EAAE,cAAc,IAAI,gBAAgB,CAAC;AACtD,CAAC;AAaD,MAAM,UAAU,4BAA4B,CAC1C,oBAA+C,EAC/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"}
@@ -1,69 +1,57 @@
1
1
  # Protocol Compatibility
2
2
 
3
- `borgmcp-shared` versions the contracts shared by Borg MCP clients and server
4
- implementations. Package versions and protocol generations are related but are
5
- not interchangeable: a package release can add helpers without changing the
6
- wire protocol.
7
-
8
- | Package range | Protocol generation | Status |
9
- | --- | --- | --- |
10
- | `>=0.3.0 <0.4.0` | `1` | Retry-safe owner enrollment and idempotent multi-cube creation |
11
- | `>=0.2.0 <0.3.0` | `1` | Legacy server-generated enrollment credential response |
3
+ `borgmcp-shared` carries the wire contract shared by the Borg MCP client and
4
+ server. The client and server are a single clean-slate product: they ship and
5
+ update together, so the contract has no negotiation surface and no
6
+ backwards-compatibility machinery.
7
+
8
+ ## Exact Protocol Tag
9
+
10
+ `PROTOCOL_VERSION` is the sole acceptance authority. The credential-free,
11
+ mutation-free `GET /api/protocol` preflight returns only the exact tag, and
12
+ `decodeProtocolTagPreflight` fails closed on any other tag, an extra field, or a
13
+ non-object body with a clear static mismatch diagnostic — so a client verifies
14
+ pinned TLS and the tag before it creates or sends any credential. Every
15
+ subsequent envelope also carries the tag and decodes it before any payload as
16
+ defense in depth. There is no capability negotiation, no supported-version list,
17
+ no compatibility matrix, and no package-range or version-range fallback. A peer
18
+ that presents a different tag is rejected — it is never adapted to.
12
19
 
13
20
  ## Change Policy
14
21
 
15
- Consumers implementing the current contract must pin `^0.3.0`, which npm
16
- interprets as `>=0.3.0 <0.4.0`. During the pre-1.0 series, a breaking envelope
17
- or wire-contract change requires a minor release; additive compatible contracts
18
- and corrections use a patch release within that minor. Consumers widen the
19
- minor range only after deliberate compatibility review. A broad `<1.0.0` range
20
- is unsafe because pre-1.0 minor
21
- versions may break the wire contract.
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. There is
24
+ no mixed-version window in which an old client and a new server (or the reverse)
25
+ interoperate; incompatible peers fail closed rather than degrade.
22
26
 
23
- A wire-shape change must include all of the following:
27
+ A wire-shape change must include:
24
28
 
25
29
  1. A new or updated implementation-neutral conformance vector.
26
30
  2. A documented client and server rollout order.
27
- 3. A compatibility entry that identifies the affected package and protocol
28
- versions.
29
- 4. A migration window when older deployed clients or servers can still be in
30
- use.
31
+ 3. A package version bump so the new protocol tag never ships under a version
32
+ whose already-published artifact carries a different tag.
31
33
 
32
34
  Removing or reinterpreting an existing field is a protocol-breaking change even
33
35
  when TypeScript permits it. Implementations must not infer compatibility from a
34
- successful build alone. Because both package ranges use protocol generation `1`,
35
- implementations must also check the peer package range and required capabilities,
36
- then run the shared conformance suite.
37
-
38
- ## 0.3.0 Enrollment Migration
36
+ successful build alone they must run the shared conformance suite against the
37
+ exact tag they implement.
39
38
 
40
- The source contract for purpose-bound owner enrollment now uses a
41
- client-generated credential and retry key and returns only the stable client ID
42
- plus `create_cube`; ordinary enrollment returns no server capability. Setup and
43
- enrollment create zero cubes. The separate authenticated, idempotent
44
- `POST /api/cubes` creates the selected cube template and creator grant. These
45
- shapes replace the server-generated credential response in `0.2.2` and are
46
- therefore a breaking wire change selected for `0.3.0`. They must not be silently
47
- accepted as a compatibility path. Client and server consumers must migrate
48
- together.
39
+ ## Coordinated Rollout
49
40
 
50
41
  The rollout order is fail-closed:
51
42
 
52
- 1. Publish the reviewed `borgmcp-shared@0.3.0` registry artifact only after its
53
- separate tag and publication gates pass.
54
- 2. Update the first client and server releases to the reviewed registry range
55
- `^0.3.0`; Git dependencies are not an authorized release input.
43
+ 1. Publish the reviewed `borgmcp-shared` registry artifact only after its
44
+ separate tag and publication gates pass, under a version that has never been
45
+ published with a different protocol tag.
46
+ 2. Update the client and server releases to the reviewed registry range; Git
47
+ dependencies are not an authorized release input.
56
48
  3. Run the shared adapter conformance suite in both consumers before release.
57
- 4. Deploy client and server support together. A `0.2.x` enrollment peer and a
58
- `0.3.x` enrollment peer are incompatible; neither side may fall back to the
59
- legacy server-generated credential response.
49
+ 4. Deploy client and server support together. A peer on the prior protocol tag
50
+ and a peer on the new tag are incompatible; neither side falls back.
60
51
 
61
- There is no mixed-version enrollment migration window because the affected
62
- client and server surfaces have not been publicly released. Existing
63
- `borgmcp-shared@0.2.2` coordination consumers remain on `^0.2.0` until they
64
- deliberately adopt the new enrollment contract.
52
+ ## Model/Provider Selection
65
53
 
66
- Model/provider selection is intentionally absent from the `0.3.x` coordination
67
- contract. Agent CLIs own model configuration; Borg servers may expose the
68
- separate advisory `reported_model` field for session observability, but clients
69
- must not use it for routing, launch configuration, or authorization.
54
+ Model/provider selection is intentionally absent from the coordination contract.
55
+ Agent CLIs own model configuration; Borg servers may expose the separate
56
+ advisory `reported_model` field for session observability, but clients must not
57
+ use it for routing, launch configuration, or authorization.
@@ -2,18 +2,27 @@
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
9
- `borgmcp-shared@0.2.2`. It is selected for `0.3.0` as a breaking wire change and
10
- requires a coordinated client/server migration. Version preparation does not
11
- authorize a tag or publication. There is no compatibility path that returns a
12
- bearer from the server.
13
-
14
- Servers implementing this contract advertise the required
15
- `auth.retry-safe-enrollment` capability. Negotiation fails closed when it is
16
- absent.
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.
17
+
18
+ A client verifies the credential-free `GET /api/protocol` tag preflight before
19
+ it creates or sends any enrollment secret; a peer that presents a different
20
+ protocol tag is rejected outright. The exact protocol tag is the sole acceptance
21
+ authority, so there is no capability a server advertises or a client negotiates
22
+ for this contract. The enrollment
23
+ response still carries the enrolled principal's `server_capabilities` (owner
24
+ enrollment grants `['create_cube']`; ordinary enrollment grants none) — that is
25
+ an authorization fact about the principal, not a negotiated protocol capability.
17
26
 
18
27
  ## Client Preconditions
19
28
 
@@ -23,11 +32,12 @@ Before network I/O, the client generates:
23
32
  unpadded base64url; and
24
33
  - a canonical UUID retry key.
25
34
 
26
- The client persists both values as a pending enrollment in the operating-system
27
- keychain before sending the request. It retains and reuses the exact pending
28
- tuple after an ambiguous timeout or connection loss. The wire contract never
29
- permits a file fallback, URL/argv/environment transport, or diagnostic output
30
- 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.
31
41
 
32
42
  ## Exchange Request
33
43