borgmcp 0.8.19 → 0.8.21
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/dist/config-utils.d.ts +22 -0
- package/dist/config-utils.d.ts.map +1 -1
- package/dist/config-utils.js +51 -0
- package/dist/config-utils.js.map +1 -1
- package/dist/regen-format.d.ts.map +1 -1
- package/dist/regen-format.js +11 -0
- package/dist/regen-format.js.map +1 -1
- package/dist/setup.js +41 -31
- package/dist/setup.js.map +1 -1
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +84 -9
- package/dist/templates.js.map +1 -1
- package/package.json +1 -1
package/dist/config-utils.d.ts
CHANGED
|
@@ -35,6 +35,28 @@ export declare function addUserPromptSubmitHook(): boolean;
|
|
|
35
35
|
* removeSessionStartHook.
|
|
36
36
|
*/
|
|
37
37
|
export declare function removeUserPromptSubmitHook(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Detect whether the borg MCP server is already registered in the Claude
|
|
40
|
+
* Code CLI config (`~/.claude.json` `mcpServers.borg`).
|
|
41
|
+
*
|
|
42
|
+
* Per gh#79: when a user re-runs `borg setup` to refresh OAuth (the
|
|
43
|
+
* canonical re-run reason), the setup wizard's "Add borg to Claude Code?"
|
|
44
|
+
* prompt is redundant — the answer is deterministic ("already
|
|
45
|
+
* configured"). This detect lets the wizard silently skip Step 1 entirely
|
|
46
|
+
* when borg is present. Per the dispatch's Queen-implicit anti-scope,
|
|
47
|
+
* "silent means silent" — callers must not log an "already configured"
|
|
48
|
+
* notice when this returns true.
|
|
49
|
+
*
|
|
50
|
+
* Safe-default contract: any read error (file missing, malformed JSON,
|
|
51
|
+
* permission denied, empty file, unexpected shape) returns `false` so
|
|
52
|
+
* the caller still prompts. The dispatch's edge-case framing is "if
|
|
53
|
+
* indeterminate → prompt fires" — never silent-skip when state is
|
|
54
|
+
* ambiguous. The prompt is the safe path; silent-skip is the
|
|
55
|
+
* optimization layered on top of a verified-present signal.
|
|
56
|
+
*
|
|
57
|
+
* @param configPath Override the config-file path; primarily for tests.
|
|
58
|
+
*/
|
|
59
|
+
export declare function isMcpServerConfigured(configPath?: string): boolean;
|
|
38
60
|
/**
|
|
39
61
|
* Get absolute path to borg index.js
|
|
40
62
|
* Returns the actual index.js file, not the npm symlink
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-utils.d.ts","sourceRoot":"","sources":["../src/config-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"config-utils.d.ts","sourceRoot":"","sources":["../src/config-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8CH;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAyB7C;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CA+BhD;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAyBjD;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CA+BpD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,GAAE,MAA2B,GACtC,OAAO,CAaT;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAItC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAyBnC"}
|
package/dist/config-utils.js
CHANGED
|
@@ -14,6 +14,17 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
14
14
|
const __dirname = dirname(__filename);
|
|
15
15
|
const HOOK_COMMAND = 'borg-regen';
|
|
16
16
|
const AUDIT_HOOK_COMMAND = 'borg-log-audit';
|
|
17
|
+
/**
|
|
18
|
+
* Claude Code CLI config path. The CLI reads `mcpServers.<name>` from
|
|
19
|
+
* this file to discover registered MCP servers; `addMcpServer()` (below)
|
|
20
|
+
* writes to it via the `claude mcp add --scope user borg borg-mcp` shell
|
|
21
|
+
* command. Server name is `borg` (not `borgmcp` — `borg-mcp` is the
|
|
22
|
+
* binary that backs it). NOTE: distinct from
|
|
23
|
+
* `~/Library/Application Support/Claude/claude_desktop_config.json`,
|
|
24
|
+
* which is the Claude Desktop app's config (different product).
|
|
25
|
+
*/
|
|
26
|
+
const CLAUDE_CONFIG_PATH = path.join(os.homedir(), '.claude.json');
|
|
27
|
+
const MCP_SERVER_NAME = 'borg';
|
|
17
28
|
function settingsPath() {
|
|
18
29
|
return path.join(os.homedir(), '.claude', 'settings.json');
|
|
19
30
|
}
|
|
@@ -169,6 +180,46 @@ export function removeUserPromptSubmitHook() {
|
|
|
169
180
|
writeSettings(settings);
|
|
170
181
|
return changed;
|
|
171
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Detect whether the borg MCP server is already registered in the Claude
|
|
185
|
+
* Code CLI config (`~/.claude.json` `mcpServers.borg`).
|
|
186
|
+
*
|
|
187
|
+
* Per gh#79: when a user re-runs `borg setup` to refresh OAuth (the
|
|
188
|
+
* canonical re-run reason), the setup wizard's "Add borg to Claude Code?"
|
|
189
|
+
* prompt is redundant — the answer is deterministic ("already
|
|
190
|
+
* configured"). This detect lets the wizard silently skip Step 1 entirely
|
|
191
|
+
* when borg is present. Per the dispatch's Queen-implicit anti-scope,
|
|
192
|
+
* "silent means silent" — callers must not log an "already configured"
|
|
193
|
+
* notice when this returns true.
|
|
194
|
+
*
|
|
195
|
+
* Safe-default contract: any read error (file missing, malformed JSON,
|
|
196
|
+
* permission denied, empty file, unexpected shape) returns `false` so
|
|
197
|
+
* the caller still prompts. The dispatch's edge-case framing is "if
|
|
198
|
+
* indeterminate → prompt fires" — never silent-skip when state is
|
|
199
|
+
* ambiguous. The prompt is the safe path; silent-skip is the
|
|
200
|
+
* optimization layered on top of a verified-present signal.
|
|
201
|
+
*
|
|
202
|
+
* @param configPath Override the config-file path; primarily for tests.
|
|
203
|
+
*/
|
|
204
|
+
export function isMcpServerConfigured(configPath = CLAUDE_CONFIG_PATH) {
|
|
205
|
+
try {
|
|
206
|
+
if (!fs.existsSync(configPath))
|
|
207
|
+
return false;
|
|
208
|
+
const text = fs.readFileSync(configPath, 'utf-8');
|
|
209
|
+
if (!text.trim())
|
|
210
|
+
return false;
|
|
211
|
+
const parsed = JSON.parse(text);
|
|
212
|
+
if (!parsed || typeof parsed !== 'object')
|
|
213
|
+
return false;
|
|
214
|
+
const servers = parsed.mcpServers;
|
|
215
|
+
if (!servers || typeof servers !== 'object')
|
|
216
|
+
return false;
|
|
217
|
+
return MCP_SERVER_NAME in servers;
|
|
218
|
+
}
|
|
219
|
+
catch {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
172
223
|
/**
|
|
173
224
|
* Get absolute path to borg index.js
|
|
174
225
|
* Returns the actual index.js file, not the npm symlink
|
package/dist/config-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-utils.js","sourceRoot":"","sources":["../src/config-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,kCAAkC;AAClC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,YAAY,GAAG,YAAY,CAAC;AAClC,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAE5C,SAAS,YAAY;IACnB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,YAAY;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|
1
|
+
{"version":3,"file":"regen-format.d.ts","sourceRoot":"","sources":["../src/regen-format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAwFzC;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAqB,CAAC;AAEjD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAYpD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE;IACN,IAAI,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,SAAS,EAAE,GAAG,EAAE,CAAC;CAClB,GACA,MAAM,CAmDR"}
|
package/dist/regen-format.js
CHANGED
|
@@ -89,6 +89,17 @@ Any time you make a factual claim that could be verified — "PR #X shipped as v
|
|
|
89
89
|
|
|
90
90
|
**The discipline is universal to reviewer-class actions** (Code Reviewer formal gates + Security Auditor SR gates + PM-courtesy verifications + UX-courtesy reviews + any drone making a verification-worthy factual claim in their cube-log post). Refinement #13 lives in this playbook rather than in any one role's text because it applies to ALL reviewers.
|
|
91
91
|
|
|
92
|
+
**Four-surface propagation (Refinement #13 sharpening — Sprint 8 PR-B + PR-D + Sprint 9 PR-A empirical evidence)**:
|
|
93
|
+
|
|
94
|
+
The discipline applies at FOUR surfaces. Catches at the surface closest to origin are cheapest; catches at later surfaces have already propagated through earlier consumers:
|
|
95
|
+
|
|
96
|
+
- **Surface 1 (brainstorm-proposal time)**: when a brainstorm contribution names specific code identifiers / API field names / enum values / column names / function signatures, the PROPOSING drone source-grep's the referenced file BEFORE composing the proposal. Cheapest catch surface; one drone catches one error.
|
|
97
|
+
- **Surface 2 (comment/JSDoc/docstring writing time)**: when an implementation comment cites cross-file invariants (other modules' thresholds, schema columns, enum values, semantic contracts), the WRITING drone source-grep's the referenced file BEFORE writing the comment. Mid-cost catch; one drone catches one error but downstream reviewers may inherit the wrong mental model from the comment.
|
|
98
|
+
- **Surface 3 (review-time verification)**: the existing review-class discipline (Code Reviewer formal gates + Security Auditor SR gates + PM/UX/QA courtesy reviews). Late catch opportunity; if the error propagated through Surfaces 1 + 2, multiple reviewers may have already trusted the framing instead of source-grepping themselves.
|
|
99
|
+
- **Surface 4 (durable-tracking-artifact-writing time)**: when filing a deferred-tracking gh issue from a cube event payload, the FILING drone fetches the originating entry's full body via \`borg:read-log since=<timestamp>\` BEFORE composing the issue body. Cube event previews can truncate substantive content (mid-paragraph cuts on long entries); filing from the truncated preview trusts a derivative artifact instead of the source-of-truth full entry. Most expensive surface — the filed issue becomes the cube's durable cross-sprint memory; correcting it requires a follow-up issuecomment post-filing, and Sprint N+1 pickup drones inherit the incomplete framing if the correction is missed.
|
|
100
|
+
|
|
101
|
+
**Empirical case studies (2026-05-17 Sprint 8 + Sprint 9)**: PR-B 5-drone cascade-failure on error-code casing — drone-8 proposed lowercase code names at brainstorm without grepping \`workers/errors.ts:11 ErrorCode\` enum (Surface 1 origin); drone-1 reproduced in dispatch verbatim; drone-6 implemented from dispatch; drone-2 CR + drone-3 QA initially approved without source-grepping (Surface 3 inherited the wrong framing); drone-8 caught their own origin gap at review-time via Surface 3 self-application. PR-D drone-2 CR-NIT #1 — drone-6 wrote JSDoc claim citing \`gh#39 watchdog\` semantics without grepping \`workers/heartbeat.ts\` (Surface 2 origin); drone-2 caught at Surface 3 review-time via direct file read. PR-#102 gh#103 filing — drone-1 filed gh#103 (PR #102 PM-NITs) composing the issue body from the TRUNCATED cube event preview of drone-7's 16:12:51Z entry (Surface 4 origin); NIT #2 substance dropped mid-paragraph; drone-7 closed the gap via issuecomment-4471465300 50 min post-filing. All three cases would have been cheapest to catch at the originating surface (1, 2, or 4 respectively).
|
|
102
|
+
|
|
92
103
|
**Posting to the log:**
|
|
93
104
|
|
|
94
105
|
Every time you start a task, finish a task, get stuck, answer another drone, or learn something other drones should know — post to the log per your role's conventions. This applies regardless of who initiated the work: a log signal, your own scan of the cube, or a direct user prompt all produce the same logging duty. The conventions live in your role detail; the system stays vocabulary-agnostic.
|
package/dist/regen-format.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"regen-format.js","sourceRoot":"","sources":["../src/regen-format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO
|
|
1
|
+
{"version":3,"file":"regen-format.js","sourceRoot":"","sources":["../src/regen-format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;isBAsFwrB,CAAC;AAClsB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,EAAE,CAAC;AAEjD;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAmB;IAC1C,MAAM,IAAI,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9D,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC;QAAE,OAAO,UAAU,CAAC;IACtD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IAClC,IAAI,GAAG,GAAG,EAAE;QAAE,OAAO,GAAG,G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AC,oBAAoB,IAAI,iCAAiC;QACrE,EAAE;QACF,uBAAuB;QACvB,YAAY;QACZ,EAAE;QACF,qBAAqB;QACrB,aAAa;QACb,EAAE;QACF,oBAAoB;QACpB,UAAU;QACV,EAAE;QACF,gBAAgB,EAAE;KACnB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/dist/setup.js
CHANGED
|
@@ -13,7 +13,7 @@ import open from 'open';
|
|
|
13
13
|
import which from 'which';
|
|
14
14
|
import { authenticateWithGoogle } from './auth.js';
|
|
15
15
|
import { checkSubscriptionStatus, createSubscription } from './remote-client.js';
|
|
16
|
-
import { addMcpServer, addSessionStartHook } from './config-utils.js';
|
|
16
|
+
import { addMcpServer, addSessionStartHook, isMcpServerConfigured, } from './config-utils.js';
|
|
17
17
|
import { isAuthenticated } from './config.js';
|
|
18
18
|
import { handleVersionFlag } from './version.js';
|
|
19
19
|
/**
|
|
@@ -35,38 +35,48 @@ async function main() {
|
|
|
35
35
|
process.exit(1);
|
|
36
36
|
}
|
|
37
37
|
// Step 1: MCP Configuration
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
const hookAdded = addSessionStartHook();
|
|
65
|
-
if (hookAdded) {
|
|
66
|
-
console.log(chalk.green('◼ Registered SessionStart hook (borg-regen on session start)\n'));
|
|
38
|
+
//
|
|
39
|
+
// gh#79: when borg is already registered in the Claude Code CLI
|
|
40
|
+
// config, silent-skip this entire block. The canonical re-run
|
|
41
|
+
// reason is "refresh OAuth," where this prompt's answer is
|
|
42
|
+
// deterministic ("already configured") — asking it is redundant
|
|
43
|
+
// friction. Per dispatch's Queen-implicit anti-scope, "silent means
|
|
44
|
+
// silent": no header, no prompt, no "already configured" notice.
|
|
45
|
+
// The wizard just proceeds to Step 2 (OAuth).
|
|
46
|
+
if (!isMcpServerConfigured()) {
|
|
47
|
+
console.log(chalk.blue('◼ MCP Server Configuration'));
|
|
48
|
+
const { confirmConfig } = await prompts({
|
|
49
|
+
type: 'confirm',
|
|
50
|
+
name: 'confirmConfig',
|
|
51
|
+
message: 'Add borg to Claude Code?',
|
|
52
|
+
initial: true
|
|
53
|
+
});
|
|
54
|
+
if (!confirmConfig) {
|
|
55
|
+
// gh#14: don't exit the wizard when the user says "n" to "Add borg
|
|
56
|
+
// to Claude Code?" — they may already have borg added and be re-
|
|
57
|
+
// running setup to refresh OAuth (a documented recovery path).
|
|
58
|
+
// Skip Step 1 (MCP config) and continue to Step 2 (OAuth) so the
|
|
59
|
+
// user reaches the actual goal of their re-run. Users who want to
|
|
60
|
+
// cancel the whole wizard use Ctrl-C (the standard interactive-
|
|
61
|
+
// abort gesture).
|
|
62
|
+
console.log(chalk.gray('\n◼ Skipping Claude Code integration; proceeding to OAuth authentication.\n'));
|
|
67
63
|
}
|
|
68
64
|
else {
|
|
69
|
-
|
|
65
|
+
try {
|
|
66
|
+
addMcpServer();
|
|
67
|
+
console.log(chalk.green('◼ borg added to Claude Code'));
|
|
68
|
+
}
|
|
69
|
+
catch (error) {
|
|
70
|
+
console.error(chalk.red(`\n◼ Failed to add MCP server: ${error.message}\n`));
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
const hookAdded = addSessionStartHook();
|
|
74
|
+
if (hookAdded) {
|
|
75
|
+
console.log(chalk.green('◼ Registered SessionStart hook (borg-regen on session start)\n'));
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
console.log(chalk.gray('◼ SessionStart hook already registered (or settings could not be parsed)\n'));
|
|
79
|
+
}
|
|
70
80
|
}
|
|
71
81
|
}
|
|
72
82
|
// Step 2: Authentication
|
package/dist/setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD;;GAEG;AACH,KAAK,UAAU,IAAI;IACjB,iBAAiB,EAAE,CAAC;IACpB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAE5D,qCAAqC;IACrC,IAAI,aAAqB,CAAC;IAC1B,IAAI,CAAC;QACH,aAAa,GAAG,KAAK,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C,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QAExD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,uBAAuB,EAAE,CAAC;YAE/C,IAAI,MAAM,CAAC,SAAS,EAAE,CAAC;gBACrB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC;gBACxD,OAAO;YACT,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,kCAAkC;QACpC,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;AACjE,CAAC;AAED,aAAa;AACb,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,qBAAqB,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;IACjE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/templates.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,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,aAAa,CAAC,EAAE,OAAO,CAAC;CAMzB;
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,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,aAAa,CAAC,EAAE,OAAO,CAAC;CAMzB;AAuUD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB;AA2MD,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAE9C,CAAC;AAEF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAEzD;AAED,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C"}
|
package/dist/templates.js
CHANGED
|
@@ -142,26 +142,43 @@ When you post a dispatch with an "if X by time Y, then fallback Z" shape (e.g.,
|
|
|
142
142
|
* to keep the per-role text focused on the role-specific axes while
|
|
143
143
|
* the universal verification discipline lives once in the playbook.
|
|
144
144
|
*
|
|
145
|
+
* Refinement #15 — synthesis no-collapse discipline (Sprint 9 PR A
|
|
146
|
+
* codification per drone-1's 17:14:44Z dispatch) — Coordinator-side
|
|
147
|
+
* brainstorm-facilitation rule absorbed from Sprint 8 PR-C
|
|
148
|
+
* activity-log synthesis-tally-collapse incident (15:13:01Z drone-4
|
|
149
|
+
* UX-OBJECTION). Pairs with Refinement #11 at brainstorm vs gate
|
|
150
|
+
* stages.
|
|
151
|
+
*
|
|
152
|
+
* Refinement #13 three-surface propagation sharpening (Sprint 9 PR A
|
|
153
|
+
* codification per drone-1's 17:14:44Z dispatch) — empirical
|
|
154
|
+
* evidence from Sprint 8 PR-B 5-drone cascade-failure on error-code
|
|
155
|
+
* casing + PR-D drone-2 CR-NIT on JSDoc accuracy. The detailed
|
|
156
|
+
* three-surface text lives in `regen-format.ts` getDronePlaybook
|
|
157
|
+
* Refinement #13 section; this constant's #13 bullet references it.
|
|
158
|
+
*
|
|
145
159
|
* Queen-ratified policy at 2026-05-17 ~10:50Z UTC per drone-1's
|
|
146
160
|
* 10:46:34Z gh#68 dispatch + ratification of drone-2's filed
|
|
147
161
|
* proposal in gh#68's body. (Refinement #14 / gh#76 was folded into
|
|
148
162
|
* gh#68's scope later — that ratification is at ~11:09Z per drone-1's
|
|
149
163
|
* 11:06:52Z scope-expansion dispatch; CONDITIONAL_DISPATCH_ENFORCEMENT
|
|
150
|
-
* JSDoc carries that separate timestamp.)
|
|
164
|
+
* JSDoc carries that separate timestamp.) Refinements #15 + #13 v3
|
|
165
|
+
* three-surface sharpening Queen-ratified at 2026-05-17 ~17:14Z UTC
|
|
166
|
+
* per Sprint 9 PR A dispatch.
|
|
151
167
|
*
|
|
152
168
|
* Update this constant + the matching Refinement #13 section in
|
|
153
|
-
* `regen-format.ts` together — the
|
|
154
|
-
*
|
|
169
|
+
* `regen-format.ts` together — the refinements form a coherent
|
|
170
|
+
* discipline cluster + reference each other.
|
|
155
171
|
*/
|
|
156
|
-
const
|
|
172
|
+
const REVIEW_AND_FACILITATION_REFINEMENTS = `
|
|
157
173
|
|
|
158
174
|
**Review-discipline refinements (cube-collective-validated, gh#68):**
|
|
159
175
|
|
|
160
|
-
These
|
|
176
|
+
These refinements emerged from cross-PR review evidence during the May 2026 cluster + got codified as canonical Code Reviewer discipline.
|
|
161
177
|
|
|
162
178
|
- **Refinement #11 — Reviewer-explicit-defer overrides generic defer-aversion.** When a PR review surfaces a NIT and the reviewer EXPLICITLY frames it as defer-eligible (e.g., "deferring as follow-on" / "filing as gh issue rather than blocking this PR"), accept that as the reviewer's framed disposition rather than treating defer as the failure mode. Generic defer-aversion ("if it could be fixed now, fix it now") is the wrong heuristic when the reviewer has surfaced the defer-eligibility explicitly — they're using their reviewer authority to scope the PR, not avoiding work. **Origin:** Sprint A 2026-05-13.
|
|
163
179
|
- **Refinement #12 — Side-effect-channel mock-coverage on BOTH directions for refactors that bifurcate behavior.** When a refactor introduces a side-effect that didn't exist before (or removes one that previously existed, or moves a side-effect from one channel to another), test coverage MUST include assertions in BOTH directions: the positive case (side-effect fires when expected) AND the regression-pin (side-effect does NOT fire when not expected). Mocking only the canonical channel and relying on "tests passed" is the canonical incomplete-coverage pattern that produced PR #41's broadcast-omission bug (DB INSERT was mocked + asserted; LogBroadcaster fan-out wasn't mocked → silent prod regression). **Canonical success cases:** PR #50 (gh#46 Phase 2 last_log_post — appendLog advances; validateDroneSession + resolveDroneContext do NOT advance) + PR #66 (subscription cache — cache-miss hits DB; cache-hit does NOT hit DB) + PR #73 (gh#71 own-drone filter carve-out — heartbeat-pings DO write; ordinary self-authored entries DO NOT write). When mocking a component with side-effects, mock ALL the side-effect channels + assert each.
|
|
164
|
-
- **Refinement #13 — Verify factual claims against source-of-truth, not derivative artifacts.** See the universal drone playbook (\`borg:role\` for any role; appended on every regen) for the full v1+v2+v3 statement. Refinement #13 applies to ALL reviewer-class actions (Code Reviewer, Security Auditor, PM-courtesy, UX-courtesy), not just Code Reviewer — which is why it lives in the universal playbook rather than this role's specific text
|
|
180
|
+
- **Refinement #13 — Verify factual claims against source-of-truth, not derivative artifacts.** See the universal drone playbook (\`borg:role\` for any role; appended on every regen) for the full v1+v2+v3 statement + the three-surface-propagation sharpening (brainstorm-proposal time + comment/JSDoc-writing time + review-time). Refinement #13 applies to ALL reviewer-class actions (Code Reviewer, Security Auditor, PM-courtesy, UX-courtesy), not just Code Reviewer — which is why it lives in the universal playbook rather than this role's specific text.
|
|
181
|
+
- **Refinement #15 — Synthesis no-collapse discipline (Coordinator-side facilitation).** When facilitating brainstorm synthesis as Coordinator, EXPLICIT lens push-back with user-value-case must NEVER collapse into silent-align-with-majority in the convergence-call. The synthesis table's "NEEDS DECISION" cell must produce an explicit convergence resolution that NAMES the decision-needing lens column + makes the decision explicitly (with rationale), not silently align with the majority lean. Middle-ground proposals are third positions, not silent agreements with either pole. Conditional leans ("X UNLESS Y") need explicit-resolution-tracking when other lens contributions trigger the condition. Coordinator-override on consensus is legitimate but must be EXPLICIT (verbatim "I override because…" framing in the dispatch), not implicit via tally-flatten. **Canonical case study (2026-05-17 Sprint 8 brainstorm, PR-C activity-log decision)**: drone-4 explicit UX push-back + middle-ground fallback (Option 2: collapsed-by-default + CLI link) collapsed in synthesis as "decision-eligible silent-align"; drone-4 UX-OBJECTION at 15:13:01Z caught the collapse; drone-3 + drone-7 self-corrected their compressed positions; drone-1 reversed synthesis via explicit Option 2 selection. Pairs with Refinement #11 (gate-class reviewer-explicit-defer) to close the consensus-flatten failure class at BOTH brainstorm and gate stages.`;
|
|
165
182
|
/**
|
|
166
183
|
* gh#31 + Queen rule (d) — git workflow rules + full release cycle.
|
|
167
184
|
* Coordinator-only clause; only the Coordinator role enacts merges,
|
|
@@ -263,6 +280,64 @@ const SCHEDULEWAKEUP_CADENCE = `
|
|
|
263
280
|
- **Coordinator/Queen seat:** ~15 min ± 3 min jitter (uniform-random integer in [720, 1080] seconds) for the ScheduleWakeup safety-net. Shorter than the event-driven-drone default because Coordinator/Queen drives proactive iteration between events (dispatch progress checks, queue progression, gate ratifications) — 30-min lag visibly delays sprint cadence.
|
|
264
281
|
- **Other drones (event-driven: Builder, Code Reviewer, QA, UX, PM, SR, Visionary):** 30 min fallback acceptable. Inbox Monitor is the primary wake; ScheduleWakeup is the safety-net for missed Monitor events. Their cadence floor is driven by external events (incoming dispatches, REVIEW-READY signals, gh#39 watchdog pings), not proactive iteration.
|
|
265
282
|
- **Jitter rationale:** fixed timing creates synchronized wake patterns (thundering-herd shape; multiple drones all check at :00 of each hour). Uniform-random jitter desynchronizes correlated cube-log read bursts, spreads any external API calls (Stripe, GitHub, Anthropic), and matches the gh#39 watchdog's existing jitter discipline.`;
|
|
283
|
+
/**
|
|
284
|
+
* gh#95 — push-discipline codification (Coordinator side). Mirror of
|
|
285
|
+
* the Builder side from the Coordinator's seat: when merging on
|
|
286
|
+
* ship-on-consensus, announce intent BEFORE pulling the merge trigger
|
|
287
|
+
* + announce completion as the FIRST tool call AFTER the merge so
|
|
288
|
+
* Builders + reviewers see the state-change before composing follow-up
|
|
289
|
+
* actions. Closes the inbox-Monitor propagation race that produced
|
|
290
|
+
* the 2026-05-17 PR #91 merged-PR-branch-resurrection incident from
|
|
291
|
+
* the Coordinator side.
|
|
292
|
+
*
|
|
293
|
+
* Mirror this constant into `workers/cubes.ts`
|
|
294
|
+
* `QUEEN_ROLE_DETAILED_DESCRIPTION` — Queen drives merges + bumps too.
|
|
295
|
+
*
|
|
296
|
+
* Queen-ratified policy at 2026-05-17 ~14:42Z UTC per drone-1's gh#95
|
|
297
|
+
* filing.
|
|
298
|
+
*/
|
|
299
|
+
const PUSH_DISCIPLINE_COORDINATOR = `
|
|
300
|
+
|
|
301
|
+
**Merge-announcement discipline (gh#95):**
|
|
302
|
+
|
|
303
|
+
The 2026-05-17 PR #91 merged-PR-branch-resurrection incident showed that ship-on-consensus merges can fire faster than inbox-Monitor propagation to all drones. A Builder composing a fold-commit at the same moment Coordinator merges produces an orphan-commit on a resurrected branch. The mitigation is symmetric to Builder \`PUSHING:\` announcements:
|
|
304
|
+
|
|
305
|
+
- **Before \`gh pr merge\`**, post a \`MERGING: PR #N <branch>\` cube-log entry as the LAST action BEFORE the merge command. Builders see the intent; any in-flight fold composer pauses + verifies state before pushing. ~5s of cube-time exposure pre-merge is the budget; if a lens-drone objects within that window (e.g., drone-4's late-fold-recommendation pattern from PR #91), the merge can be paused for cross-lens convergence before becoming irreversible.
|
|
306
|
+
- **Immediately after \`gh pr merge\` completes**, post \`MERGED: PR #N → main @ <commit>\` as the FIRST tool call BEFORE composing any elaborate SHIPPED-with-followups synthesis. This is the canonical state-change announcement — Builders + reviewers see the merge landed before composing concurrent actions on the now-merged PR's branch.
|
|
307
|
+
- **SHIPPED synthesis (with follow-up filings, batched ALIGNMENT dispatch, sprint-queue updates, etc.) goes in a separate post AFTER the \`MERGED:\` atomic entry.** The two-stage pattern preserves race-safety: drones see \`MERGED:\` quickly + can stop their in-flight folds; the SHIPPED synthesis can take its time without blocking the state-change signal.
|
|
308
|
+
- **If lens-drones disagree post-merge** (drone-4's late-fold-recommendation pattern), do NOT revert the merge — capture the disagreement in a Sprint N+1 follow-up gh issue (the gh#94 shape from PR #91). The literal-dispatch-reading on-merge defends Refinement #11 + ship-on-consensus speed; lens-divergence-resolution lives in durable issue tracking, not in post-hoc revert.`;
|
|
309
|
+
/**
|
|
310
|
+
* gh#95 — push-discipline codification (Builder side). Empirically
|
|
311
|
+
* motivated by the 2026-05-17 PR #91 merged-PR-branch-resurrection
|
|
312
|
+
* incident: drone-6's fold commit pushed at 14:38:02Z to
|
|
313
|
+
* `feat/sprint-6-setup-mcp-autodetect-gh79` AFTER PR #91 was merged
|
|
314
|
+
* at 14:35:24Z resurrected the origin branch. The merge had already
|
|
315
|
+
* happened; the fold push was structurally moot AND landed on a
|
|
316
|
+
* branch that had been deleted at merge time.
|
|
317
|
+
*
|
|
318
|
+
* Mitigations are discipline-not-tooling per Queen-implicit anti-scope:
|
|
319
|
+
* (1) the canonical "first push" after REVIEW-READY needs no extra
|
|
320
|
+
* convention (the REVIEW-READY post IS the implicit-approval signal);
|
|
321
|
+
* (2) SUBSEQUENT pushes (folds, fixups, additional commits) DO need
|
|
322
|
+
* a pre-push announcement so the Coordinator has visibility before
|
|
323
|
+
* the new commit lands on a possibly-stale branch state.
|
|
324
|
+
*
|
|
325
|
+
* Queen-ratified policy at 2026-05-17 ~14:42Z UTC per drone-1's
|
|
326
|
+
* gh#95 filing absorbing Queen's "Drones should ask coordinator for
|
|
327
|
+
* approval before pushing to remote" friction observation.
|
|
328
|
+
*/
|
|
329
|
+
const PUSH_DISCIPLINE_BUILDER = `
|
|
330
|
+
|
|
331
|
+
**Pre-push announcement discipline (gh#95):**
|
|
332
|
+
|
|
333
|
+
The initial \`git push\` to a feature branch (the one that produces \`REVIEW-READY: <branch>\`) carries implicit Coordinator approval — the dispatch that authorized the work also authorizes the first push to the branch tracking that dispatch. SUBSEQUENT pushes to the same branch (NIT-folds, fixup commits, drone-2-NIT-address commits) do NOT carry implicit approval — they can race the Coordinator's merge action.
|
|
334
|
+
|
|
335
|
+
**Empirical case** (2026-05-17 PR #91 merged-PR-branch-resurrection): a Builder fold-commit pushed ~3 min AFTER the PR had been merged on ship-on-consensus resurrected the origin branch (which had been deleted at merge time), producing an orphan commit + post-hoc audit cleanup. Root cause: no pre-push visibility check meant the Builder didn't realize merge had already landed.
|
|
336
|
+
|
|
337
|
+
- **Before any subsequent push** (any push after the initial REVIEW-READY push), post a \`PUSHING: <branch> <reason>\` cube-log entry FIRST. Reason captures intent (e.g., "addressing drone-2 NIT #3 fold" / "fixup typo in test assertion" / "rebase onto latest main"). Gives Coordinator visibility before the new commit lands.
|
|
338
|
+
- **Pre-push sanity check:** before composing the push command, run \`gh pr view <PR> --json state,mergedAt\` (or check via \`git log origin/main --oneline\` for the merge commit). If \`state\` is \`MERGED\`, ABORT the push — your work is moot; the merge already happened. File a Sprint N+1 follow-up gh issue if the change is still wanted instead of pushing to a closed PR's branch.
|
|
339
|
+
- **Race-window awareness:** ship-on-consensus merges can fire faster than inbox-Monitor propagation. The merge-event reaches your inbox within seconds-to-minutes; assume the merge has happened until you verify state. The \`gh pr view\` check costs ~500ms; the resurrected-branch cleanup cost is much higher.
|
|
340
|
+
- **First-push exception:** the initial \`git push -u origin <branch>\` for a fresh feature branch carries implicit dispatch approval — no \`PUSHING:\` entry needed. The \`REVIEW-READY: <branch>\` post that follows IS the dispatch-completion signal.`;
|
|
266
341
|
const SOFTWARE_DEV = {
|
|
267
342
|
name: 'software-dev',
|
|
268
343
|
description: 'Multi-agent software development. Coordinator (held by the human Queen) directs Builders, a Code Reviewer, a QA Tester, a UX Expert, a Visionary, a Product Manager, and a Security Auditor. The Queen role (autonomous-mode delegation target) is platform-supplied and available on every cube.',
|
|
@@ -308,7 +383,7 @@ Log conventions you use:
|
|
|
308
383
|
|
|
309
384
|
Read the log first on every regen. Act only on actionable signals.
|
|
310
385
|
|
|
311
|
-
**Elevation to the Queen role (autonomous variant):** When the human Queen authorizes autonomous operation (a few hours, overnight, etc.), your role is reassigned to Queen via \`borg:reassign-drone\`. Same base responsibilities documented here; the Queen role adds autonomous-mode behaviors (ship-on-consensus, ~2h STATE-SUMMARY cadence, sustained-idle stop, operator-credentialed deferral) documented in its own \`detailed_description\`. On the human Queen's return, you're reassigned back to this role. Class-hierarchy invariant: only a drone currently in a human-seat role (Coordinator in this template) can be promoted to a queen-class role — \`borg:reassign-drone\` enforces this server-side; reassign through a human-seat role first if you're elevating a drone from elsewhere.${ACTIVE_MOMENTUM_OWNERSHIP}${RELEASE_CYCLE_SHAPES}${CONDITIONAL_DISPATCH_ENFORCEMENT}${COORDINATOR_WORKFLOW_RULES}${GIT_OPERATIONAL_DISCIPLINE_COORDINATOR}${SCHEDULEWAKEUP_CADENCE}`,
|
|
386
|
+
**Elevation to the Queen role (autonomous variant):** When the human Queen authorizes autonomous operation (a few hours, overnight, etc.), your role is reassigned to Queen via \`borg:reassign-drone\`. Same base responsibilities documented here; the Queen role adds autonomous-mode behaviors (ship-on-consensus, ~2h STATE-SUMMARY cadence, sustained-idle stop, operator-credentialed deferral) documented in its own \`detailed_description\`. On the human Queen's return, you're reassigned back to this role. Class-hierarchy invariant: only a drone currently in a human-seat role (Coordinator in this template) can be promoted to a queen-class role — \`borg:reassign-drone\` enforces this server-side; reassign through a human-seat role first if you're elevating a drone from elsewhere.${ACTIVE_MOMENTUM_OWNERSHIP}${RELEASE_CYCLE_SHAPES}${CONDITIONAL_DISPATCH_ENFORCEMENT}${COORDINATOR_WORKFLOW_RULES}${GIT_OPERATIONAL_DISCIPLINE_COORDINATOR}${SCHEDULEWAKEUP_CADENCE}${PUSH_DISCIPLINE_COORDINATOR}`,
|
|
312
387
|
},
|
|
313
388
|
{
|
|
314
389
|
name: 'Builder',
|
|
@@ -325,7 +400,7 @@ Workflow:
|
|
|
325
400
|
Project conventions:
|
|
326
401
|
- TDD where it applies (DB methods, business logic). Skip TDD for migrations and UI.
|
|
327
402
|
- Always commit specific file paths (\`git add path/to/file\`), never \`-A\`.
|
|
328
|
-
- Tests must pass and any build-verification or deploy-dry-run gate the cube specifies must succeed before claiming DONE.${ESCALATION_DISCIPLINE}${GIT_OPERATIONAL_DISCIPLINE_BUILDER}`,
|
|
403
|
+
- Tests must pass and any build-verification or deploy-dry-run gate the cube specifies must succeed before claiming DONE.${ESCALATION_DISCIPLINE}${GIT_OPERATIONAL_DISCIPLINE_BUILDER}${PUSH_DISCIPLINE_BUILDER}`,
|
|
329
404
|
},
|
|
330
405
|
{
|
|
331
406
|
name: 'Code Reviewer',
|
|
@@ -341,7 +416,7 @@ Workflow:
|
|
|
341
416
|
- For each finding worth flagging, post \`REVIEW-FEEDBACK: <branch> <observation>\` — high-confidence issues only. Sort blockers from nits explicitly.
|
|
342
417
|
- 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.
|
|
343
418
|
|
|
344
|
-
Don't merge yourself — \`REVIEW-APPROVED\` is the signal; the Coordinator does the actual merge to main.${
|
|
419
|
+
Don't merge yourself — \`REVIEW-APPROVED\` is the signal; the Coordinator does the actual merge to main.${REVIEW_AND_FACILITATION_REFINEMENTS}${ESCALATION_DISCIPLINE}`,
|
|
345
420
|
},
|
|
346
421
|
{
|
|
347
422
|
name: 'QA Tester',
|
package/dist/templates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAeH,uEAAuE;AACvE,oEAAoE;AACpE,+DAA+D;AAC/D,iEAAiE;AACjE,oEAAoE;AACpE,mEAAmE;AACnE,mEAAmE;AACnE,qEAAqE;AACrE,gCAAgC;AAChC,uEAAuE;AAEvE;;;;;GAKG;AACH,MAAM,qBAAqB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