opencode-swarm 7.171.2 → 7.172.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/delegation-lifecycle.d.ts +21 -5
- package/dist/background/pending-delegations.d.ts +118 -6
- package/dist/cli/ast-diff-f2a1y02y.js +13 -0
- package/dist/cli/{coder-settlement-9e696204.js → coder-settlement-pw4jbrez.js} +14 -14
- package/dist/cli/{config-doctor-zr748h4m.js → config-doctor-ab0ckcsc.js} +6 -6
- package/dist/cli/{core-aa3jmzcs.js → core-ty98bsnz.js} +5 -5
- package/dist/cli/{curation-policy-fakrpw5t.js → curation-policy-cvjd6kz8.js} +7 -7
- package/dist/cli/{curator-drift-r9r8gepb.js → curator-drift-b0pbzjxv.js} +8 -8
- package/dist/cli/curator-llm-factory-69vje2m7.js +72 -0
- package/dist/cli/{curator-xgpxtaf1.js → curator-rvrhbsy2.js} +45 -45
- package/dist/cli/{dispatch-hwwj3qrb.js → dispatch-9yqqqfr6.js} +2 -2
- package/dist/cli/{evidence-summary-service-5e2323zr.js → evidence-summary-service-wmer0c5b.js} +22 -22
- package/dist/cli/{gate-evidence-5htpsr5y.js → gate-evidence-6d0f6ekr.js} +9 -9
- package/dist/cli/guardrail-explain-z06dyan0.js +73 -0
- package/dist/cli/guardrail-log-bmyxcdfk.js +23 -0
- package/dist/cli/{guardrail-reset-rdqxeqy0.js → guardrail-reset-9wmbhwff.js} +45 -45
- package/dist/cli/hive-promoter-mc8xssba.js +87 -0
- package/dist/cli/{index-mazy938h.js → index-008sppht.js} +4 -4
- package/dist/cli/{index-aa2eyfvr.js → index-31fes86t.js} +2 -2
- package/dist/cli/{index-vqb65csb.js → index-3r17j2gc.js} +138 -28
- package/dist/cli/{index-wfh89qct.js → index-66tshqdp.js} +4 -4
- package/dist/cli/{index-e7yv4xw1.js → index-93z2fhyp.js} +3 -3
- package/dist/cli/{index-6k5aq7b9.js → index-9bg5vc22.js} +2 -2
- package/dist/cli/{index-g6nen3gt.js → index-9p00xent.js} +1 -1
- package/dist/cli/{index-yqbnsmmv.js → index-bdqefjxg.js} +1 -1
- package/dist/cli/{index-f1rj1j8t.js → index-br08k19k.js} +2713 -1429
- package/dist/cli/{index-ee6ydtfe.js → index-c1ggtmpm.js} +1 -1
- package/dist/cli/{index-2ryy0cwt.js → index-c5wyannc.js} +30 -18
- package/dist/cli/{index-qcy7eg6z.js → index-dg5znyqw.js} +154 -37
- package/dist/cli/{index-sxt7fgcw.js → index-ecaws78e.js} +1 -1
- package/dist/cli/{index-j6rq132j.js → index-edext37b.js} +7 -7
- package/dist/cli/{index-cw912re7.js → index-fpbcxykc.js} +1 -1
- package/dist/cli/{index-3qf1vxtb.js → index-frcemc0b.js} +1 -1
- package/dist/cli/{index-nfs78aqj.js → index-gdrdtbw6.js} +2 -2
- package/dist/cli/{index-bpmtbmy9.js → index-gknz3bv1.js} +1 -1
- package/dist/cli/{index-kb66he4e.js → index-h91jjw6t.js} +1 -1
- package/dist/cli/{index-er6sk4e6.js → index-ha3wsy2e.js} +2 -2
- package/dist/cli/{index-5400m33a.js → index-hnvmj9wx.js} +1 -1
- package/dist/cli/{index-dsgc303n.js → index-hx0pas8b.js} +4 -4
- package/dist/cli/{index-0caqxnby.js → index-hydccmm1.js} +1 -1
- package/dist/cli/{index-r60cw2jt.js → index-j8warkkj.js} +7 -7
- package/dist/cli/{index-rrc08h4q.js → index-jc0as97z.js} +5 -5
- package/dist/cli/{index-9dz2ee2g.js → index-jmn35na4.js} +70 -50
- package/dist/cli/{index-95e3a9en.js → index-jzrx2sx2.js} +1 -1
- package/dist/cli/{index-b3pmzbh1.js → index-ma38q4rf.js} +2 -2
- package/dist/cli/{index-fhh02gwx.js → index-mq69g46a.js} +2 -2
- package/dist/cli/{index-3jcp3zb6.js → index-nzpw41w6.js} +2 -2
- package/dist/cli/{index-9txyxbqc.js → index-pmg1k4mv.js} +8 -8
- package/dist/cli/{index-b43rt5ph.js → index-pt7h91zc.js} +19 -1
- package/dist/cli/{index-7hnjs7tf.js → index-q58xegd7.js} +2 -2
- package/dist/cli/{index-0yffa3np.js → index-qfz31dcy.js} +5 -5
- package/dist/cli/{ast-diff-b0esr2kf.js → index-qss1s93b.js} +3 -6
- package/dist/cli/{index-d79q2f8z.js → index-re1ey51s.js} +4 -4
- package/dist/cli/{index-jr6pypmj.js → index-rhe9zbe2.js} +45 -45
- package/dist/cli/{index-qdy4a48x.js → index-sakgsnxj.js} +3 -3
- package/dist/cli/{index-04ph4jp2.js → index-tm6z0wgj.js} +2 -2
- package/dist/cli/{index-nyn01yrz.js → index-tr3tbtgw.js} +2 -2
- package/dist/cli/{index-q2yk70rs.js → index-twpzfwga.js} +4 -3
- package/dist/cli/{index-ph94evsh.js → index-vqs7dxp7.js} +7 -7
- package/dist/cli/{index-gq2zdxep.js → index-w0141tkw.js} +8 -8
- package/dist/cli/{index-11gz0few.js → index-wf6pbrg7.js} +1 -1
- package/dist/cli/{index-n832052r.js → index-wrt875kh.js} +1 -1
- package/dist/cli/{index-nbdmdyke.js → index-ws3ggk1h.js} +7 -7
- package/dist/cli/{index-9vfp6g53.js → index-y21gyrt6.js} +47 -47
- package/dist/cli/{index-7qqwx64h.js → index-y5x1swr8.js} +8 -8
- package/dist/cli/{index-evxd1art.js → index-yf1mvexg.js} +2 -2
- package/dist/cli/{semantic-classifier-ygqk0me1.js → index-ykamkw55.js} +2 -5
- package/dist/cli/{index-9br68j86.js → index-z2deqhpp.js} +1 -1
- package/dist/cli/{index-5a8q4qr5.js → index-zcjdw8dw.js} +2 -2
- package/dist/cli/index.js +53 -47
- package/dist/cli/{knowledge-escalator-kn74r5w8.js → knowledge-escalator-k4ab3f1f.js} +17 -17
- package/dist/cli/{knowledge-events-7gpw741m.js → knowledge-events-aqy4hb15.js} +15 -15
- package/dist/cli/{knowledge-link-vh9pfnb9.js → knowledge-link-51m3c09s.js} +6 -6
- package/dist/cli/{knowledge-store-3f9kke7z.js → knowledge-store-xgkga9xj.js} +7 -7
- package/dist/cli/{knowledge-validator-c2z68v8v.js → knowledge-validator-vvgs8m7m.js} +9 -9
- package/dist/cli/mcp-qvgka4c8.js +78 -0
- package/dist/cli/mcp.d.ts +27 -0
- package/dist/cli/{model-preflight-1ycat9jz.js → model-preflight-2mvdbj0c.js} +1 -1
- package/dist/cli/{pending-delegations-d5c07rb7.js → pending-delegations-1xvmbw29.js} +21 -13
- package/dist/cli/{pr-subscriptions-krv0jvds.js → pr-subscriptions-13xqrhwx.js} +13 -13
- package/dist/cli/{pr-workflow-gate-hmdht1he.js → pr-workflow-gate-6qzpckxa.js} +45 -45
- package/dist/cli/{runner-8m8qhngm.js → runner-k2t9n662.js} +7 -7
- package/dist/cli/{scan-cursor-b57xxs3q.js → scan-cursor-q5nycpzb.js} +8 -8
- package/dist/cli/{schema-r8tv8dqm.js → schema-a8gskpey.js} +3 -3
- package/dist/cli/{scope-persistence-0sc90mpj.js → scope-persistence-q0n6y3n7.js} +17 -17
- package/dist/cli/semantic-classifier-bjsez0v5.js +8 -0
- package/dist/cli/server-wmbahe8h.js +18129 -0
- package/dist/cli/{skill-generator-syxa1mxm.js → skill-generator-z76whwng.js} +19 -19
- package/dist/cli/snapshot-coordination-init-k2fgw463.js +86 -0
- package/dist/cli/{telemetry-0mz37v3h.js → telemetry-zed80n86.js} +3 -3
- package/dist/cli/{workspace-snapshot-hkz2wt1c.js → workspace-snapshot-93dx9rbt.js} +4 -4
- package/dist/cli/{worktree-collision-ownership-1tzw8qzp.js → worktree-collision-ownership-deyrgr70.js} +14 -14
- package/dist/cli/{worktree-isolation-ez0e48v3.js → worktree-isolation-9rjxaxp6.js} +45 -45
- package/dist/hooks/pr-workflow-gate.d.ts +14 -2
- package/dist/hooks/pr-workflow-session-resolver.d.ts +45 -0
- package/dist/hooks/search-knowledge.d.ts +7 -0
- package/dist/index.js +108 -108
- package/dist/mcp/adapters/knowledge-memory.d.ts +16 -0
- package/dist/mcp/adapters/scope-repo.d.ts +14 -0
- package/dist/mcp/adapters/verification.d.ts +20 -0
- package/dist/mcp/pipeline.d.ts +25 -0
- package/dist/mcp/registry.d.ts +47 -0
- package/dist/mcp/server.d.ts +35 -0
- package/dist/memory/gateway.d.ts +9 -1
- package/dist/observability/catalog.d.ts +4 -3
- package/dist/plan/index.d.ts +1 -0
- package/dist/plan/ledger.d.ts +10 -0
- package/dist/plan/manager.d.ts +38 -2
- package/dist/pr-review/completion.d.ts +12 -0
- package/dist/telemetry.d.ts +11 -1
- package/dist/tools/dispatch-lanes.d.ts +5 -1
- package/dist/tools/phase-complete.d.ts +1 -1
- package/dist/tools/placeholder-scan.d.ts +10 -0
- package/dist/tools/pr-workflow-status.d.ts +6 -0
- package/dist/tools/quality-budget.d.ts +10 -0
- package/dist/tools/repo-map.d.ts +5 -0
- package/dist/tools/sast-scan.d.ts +11 -0
- package/dist/tools/swarm-memory-recall.d.ts +12 -0
- package/dist/tools/syntax-check.d.ts +12 -1
- package/package.json +2 -1
- package/dist/cli/curator-llm-factory-nshzhgs4.js +0 -72
- package/dist/cli/guardrail-explain-d0h0p73g.js +0 -73
- package/dist/cli/guardrail-log-heejmjce.js +0 -23
- package/dist/cli/hive-promoter-n262tkm3.js +0 -87
- package/dist/cli/snapshot-coordination-init-x18mwxyv.js +0 -86
package/dist/cli/index.js
CHANGED
|
@@ -13,78 +13,80 @@ import {
|
|
|
13
13
|
readCachePackageVersion,
|
|
14
14
|
resolveCommand,
|
|
15
15
|
safeRealpathSync
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
16
|
+
} from "./index-br08k19k.js";
|
|
17
|
+
import"./index-hnvmj9wx.js";
|
|
18
|
+
import"./index-ha3wsy2e.js";
|
|
19
|
+
import"./index-hx0pas8b.js";
|
|
20
|
+
import"./index-h91jjw6t.js";
|
|
21
|
+
import"./index-sakgsnxj.js";
|
|
22
|
+
import"./index-3r17j2gc.js";
|
|
23
|
+
import"./index-nzpw41w6.js";
|
|
24
24
|
import"./index-txdagbh7.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
25
|
+
import"./index-z2deqhpp.js";
|
|
26
|
+
import"./index-fpbcxykc.js";
|
|
27
|
+
import"./index-re1ey51s.js";
|
|
28
|
+
import"./index-qfz31dcy.js";
|
|
29
|
+
import"./index-tm6z0wgj.js";
|
|
30
30
|
import"./index-fyfbpz4f.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-y5x1swr8.js";
|
|
32
32
|
import"./index-0hgmsyfp.js";
|
|
33
33
|
import"./index-zsrtt42s.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
34
|
+
import"./index-w0141tkw.js";
|
|
35
|
+
import"./index-mq69g46a.js";
|
|
36
|
+
import"./index-tr3tbtgw.js";
|
|
37
|
+
import"./index-pt7h91zc.js";
|
|
38
38
|
import"./index-q7sjgr1y.js";
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
39
|
+
import"./index-jc0as97z.js";
|
|
40
|
+
import"./index-008sppht.js";
|
|
41
|
+
import"./index-dg5znyqw.js";
|
|
42
|
+
import"./index-pmg1k4mv.js";
|
|
43
|
+
import"./index-ma38q4rf.js";
|
|
44
44
|
import"./index-2s7dvzff.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
45
|
+
import"./index-66tshqdp.js";
|
|
46
|
+
import"./index-hydccmm1.js";
|
|
47
47
|
import"./index-rtry5xyf.js";
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
56
|
-
import"./index-
|
|
48
|
+
import"./index-93z2fhyp.js";
|
|
49
|
+
import"./index-frcemc0b.js";
|
|
50
|
+
import"./index-wrt875kh.js";
|
|
51
|
+
import"./index-edext37b.js";
|
|
52
|
+
import"./index-c5wyannc.js";
|
|
53
|
+
import"./index-9bg5vc22.js";
|
|
54
|
+
import"./index-31fes86t.js";
|
|
55
|
+
import"./index-9p00xent.js";
|
|
56
|
+
import"./index-bdqefjxg.js";
|
|
57
57
|
import"./index-rdm3px0g.js";
|
|
58
58
|
import"./index-ry16d01s.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
59
|
+
import"./index-gdrdtbw6.js";
|
|
60
|
+
import"./index-j8warkkj.js";
|
|
61
61
|
import"./index-vzm6zre7.js";
|
|
62
62
|
import"./index-ae75rja9.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
63
|
+
import"./index-jzrx2sx2.js";
|
|
64
|
+
import"./index-yf1mvexg.js";
|
|
65
65
|
import"./index-7g4c7s5r.js";
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-
|
|
66
|
+
import"./index-jmn35na4.js";
|
|
67
|
+
import"./index-ws3ggk1h.js";
|
|
68
68
|
import"./index-1xnse449.js";
|
|
69
|
-
import"./index-
|
|
70
|
-
import"./index-
|
|
69
|
+
import"./index-c1ggtmpm.js";
|
|
70
|
+
import"./index-zcjdw8dw.js";
|
|
71
71
|
import"./index-0mhftbpp.js";
|
|
72
72
|
import"./index-a1w58b47.js";
|
|
73
73
|
import {
|
|
74
74
|
init_package,
|
|
75
75
|
package_default
|
|
76
|
-
} from "./index-
|
|
76
|
+
} from "./index-twpzfwga.js";
|
|
77
77
|
import {
|
|
78
78
|
DEFAULT_AGENT_CONFIGS,
|
|
79
79
|
init_constants
|
|
80
|
-
} from "./index-
|
|
80
|
+
} from "./index-ecaws78e.js";
|
|
81
81
|
import"./index-bk5tah7q.js";
|
|
82
|
-
import"./index-
|
|
82
|
+
import"./index-gknz3bv1.js";
|
|
83
83
|
import"./index-zpsr8rpc.js";
|
|
84
84
|
import"./index-76qm2c2y.js";
|
|
85
85
|
import"./index-yzjaj53h.js";
|
|
86
86
|
import"./index-zgwm4ryv.js";
|
|
87
|
-
import
|
|
87
|
+
import {
|
|
88
|
+
__require
|
|
89
|
+
} from "./index-a76rekgs.js";
|
|
88
90
|
|
|
89
91
|
// src/cli/index.ts
|
|
90
92
|
init_package();
|
|
@@ -622,6 +624,10 @@ async function main() {
|
|
|
622
624
|
} else if (command === "ci") {
|
|
623
625
|
const exitCode = await run(["ci", ...args.slice(1)]);
|
|
624
626
|
process.exit(exitCode);
|
|
627
|
+
} else if (command === "mcp") {
|
|
628
|
+
const { handleMcpCommand } = await import("./mcp-qvgka4c8.js");
|
|
629
|
+
const exitCode = await handleMcpCommand(args.slice(1));
|
|
630
|
+
process.exit(exitCode);
|
|
625
631
|
} else {
|
|
626
632
|
console.error(`Unknown command: ${command}`);
|
|
627
633
|
console.error("Run with --help for usage information");
|
|
@@ -658,7 +664,7 @@ Valid commands: ${VALID_COMMANDS.join(", ")}`);
|
|
|
658
664
|
}
|
|
659
665
|
}
|
|
660
666
|
if ((policy === "human-only" || policy === "restricted") && !process.stdout.isTTY && process.env.SWARM_ALLOW_HUMAN_ONLY_CLI !== "1") {
|
|
661
|
-
console.error(`Refusing to run human-only command '${resolved.key}' from a non-interactive shell.
|
|
667
|
+
console.error(`Refusing to run human-only command '${resolved.key}' from a non-interactive shell. Run it yourself in a terminal, or set SWARM_ALLOW_HUMAN_ONLY_CLI=1 if this is an explicitly approved automation.`);
|
|
662
668
|
return 1;
|
|
663
669
|
}
|
|
664
670
|
let result;
|
|
@@ -9,31 +9,31 @@ import {
|
|
|
9
9
|
maybeEscalateOnViolation,
|
|
10
10
|
maybeQuarantineOnContradiction,
|
|
11
11
|
readRecentEscalations
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
12
|
+
} from "./index-qfz31dcy.js";
|
|
13
|
+
import"./index-pmg1k4mv.js";
|
|
14
|
+
import"./index-ma38q4rf.js";
|
|
15
15
|
import"./index-2s7dvzff.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
16
|
+
import"./index-93z2fhyp.js";
|
|
17
|
+
import"./index-frcemc0b.js";
|
|
18
|
+
import"./index-wrt875kh.js";
|
|
19
|
+
import"./index-gdrdtbw6.js";
|
|
20
|
+
import"./index-j8warkkj.js";
|
|
21
21
|
import"./index-vzm6zre7.js";
|
|
22
22
|
import"./index-ae75rja9.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
23
|
+
import"./index-jzrx2sx2.js";
|
|
24
|
+
import"./index-yf1mvexg.js";
|
|
25
25
|
import"./index-7g4c7s5r.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-jmn35na4.js";
|
|
27
|
+
import"./index-ws3ggk1h.js";
|
|
28
28
|
import"./index-1xnse449.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-c1ggtmpm.js";
|
|
30
|
+
import"./index-zcjdw8dw.js";
|
|
31
31
|
import"./index-0mhftbpp.js";
|
|
32
32
|
import"./index-a1w58b47.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
33
|
+
import"./index-twpzfwga.js";
|
|
34
|
+
import"./index-ecaws78e.js";
|
|
35
35
|
import"./index-bk5tah7q.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-gknz3bv1.js";
|
|
37
37
|
import"./index-zpsr8rpc.js";
|
|
38
38
|
import"./index-zgwm4ryv.js";
|
|
39
39
|
import"./index-a76rekgs.js";
|
|
@@ -29,28 +29,28 @@ import {
|
|
|
29
29
|
resolveKnowledgeCounterBaselinePath,
|
|
30
30
|
resolveKnowledgeEventsPath,
|
|
31
31
|
resolveLegacyApplicationLogPath
|
|
32
|
-
} from "./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
} from "./index-pmg1k4mv.js";
|
|
33
|
+
import"./index-ma38q4rf.js";
|
|
34
34
|
import"./index-2s7dvzff.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
35
|
+
import"./index-93z2fhyp.js";
|
|
36
|
+
import"./index-frcemc0b.js";
|
|
37
|
+
import"./index-wrt875kh.js";
|
|
38
|
+
import"./index-gdrdtbw6.js";
|
|
39
39
|
import"./index-ae75rja9.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-jzrx2sx2.js";
|
|
41
|
+
import"./index-yf1mvexg.js";
|
|
42
42
|
import"./index-7g4c7s5r.js";
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
43
|
+
import"./index-jmn35na4.js";
|
|
44
|
+
import"./index-ws3ggk1h.js";
|
|
45
45
|
import"./index-1xnse449.js";
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
46
|
+
import"./index-c1ggtmpm.js";
|
|
47
|
+
import"./index-zcjdw8dw.js";
|
|
48
48
|
import"./index-0mhftbpp.js";
|
|
49
49
|
import"./index-a1w58b47.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
50
|
+
import"./index-twpzfwga.js";
|
|
51
|
+
import"./index-ecaws78e.js";
|
|
52
52
|
import"./index-bk5tah7q.js";
|
|
53
|
-
import"./index-
|
|
53
|
+
import"./index-gknz3bv1.js";
|
|
54
54
|
import"./index-zpsr8rpc.js";
|
|
55
55
|
import"./index-zgwm4ryv.js";
|
|
56
56
|
import"./index-a76rekgs.js";
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
resolveLinkDir,
|
|
13
13
|
sanitizeLinkId,
|
|
14
14
|
writeLinkPointer
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
} from "./index-jzrx2sx2.js";
|
|
16
|
+
import"./index-yf1mvexg.js";
|
|
17
17
|
import"./index-7g4c7s5r.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
18
|
+
import"./index-jmn35na4.js";
|
|
19
|
+
import"./index-ws3ggk1h.js";
|
|
20
20
|
import"./index-1xnse449.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
21
|
+
import"./index-c1ggtmpm.js";
|
|
22
|
+
import"./index-gknz3bv1.js";
|
|
23
23
|
import"./index-zpsr8rpc.js";
|
|
24
24
|
import"./index-zgwm4ryv.js";
|
|
25
25
|
import"./index-a76rekgs.js";
|
|
@@ -43,20 +43,20 @@ import {
|
|
|
43
43
|
transactKnowledge,
|
|
44
44
|
transactKnowledgeWithCas,
|
|
45
45
|
wordBigrams
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-j8warkkj.js";
|
|
47
47
|
import"./index-vzm6zre7.js";
|
|
48
48
|
import {
|
|
49
49
|
resolveHiveDataDir
|
|
50
50
|
} from "./index-ae75rja9.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
51
|
+
import"./index-jzrx2sx2.js";
|
|
52
|
+
import"./index-yf1mvexg.js";
|
|
53
53
|
import"./index-7g4c7s5r.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
54
|
+
import"./index-jmn35na4.js";
|
|
55
|
+
import"./index-ws3ggk1h.js";
|
|
56
56
|
import"./index-1xnse449.js";
|
|
57
|
-
import"./index-
|
|
57
|
+
import"./index-c1ggtmpm.js";
|
|
58
58
|
import"./index-bk5tah7q.js";
|
|
59
|
-
import"./index-
|
|
59
|
+
import"./index-gknz3bv1.js";
|
|
60
60
|
import"./index-zpsr8rpc.js";
|
|
61
61
|
import"./index-zgwm4ryv.js";
|
|
62
62
|
import"./index-a76rekgs.js";
|
|
@@ -23,21 +23,21 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-66tshqdp.js";
|
|
27
|
+
import"./index-hydccmm1.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-j8warkkj.js";
|
|
30
30
|
import"./index-vzm6zre7.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
import"./index-jzrx2sx2.js";
|
|
33
|
+
import"./index-yf1mvexg.js";
|
|
34
34
|
import"./index-7g4c7s5r.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
35
|
+
import"./index-jmn35na4.js";
|
|
36
|
+
import"./index-ws3ggk1h.js";
|
|
37
37
|
import"./index-1xnse449.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-c1ggtmpm.js";
|
|
39
39
|
import"./index-bk5tah7q.js";
|
|
40
|
-
import"./index-
|
|
40
|
+
import"./index-gknz3bv1.js";
|
|
41
41
|
import"./index-zpsr8rpc.js";
|
|
42
42
|
import"./index-zgwm4ryv.js";
|
|
43
43
|
import"./index-a76rekgs.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
validateProjectDirectory
|
|
4
|
+
} from "./index-fpbcxykc.js";
|
|
5
|
+
import"./index-ry16d01s.js";
|
|
6
|
+
import {
|
|
7
|
+
__require
|
|
8
|
+
} from "./index-a76rekgs.js";
|
|
9
|
+
|
|
10
|
+
// src/cli/mcp.ts
|
|
11
|
+
import { existsSync, statSync } from "fs";
|
|
12
|
+
import path from "path";
|
|
13
|
+
function parseMcpServeArgs(argv) {
|
|
14
|
+
let root = "";
|
|
15
|
+
let allowWrite = false;
|
|
16
|
+
for (let i = 0;i < argv.length; i++) {
|
|
17
|
+
const arg = argv[i];
|
|
18
|
+
if (arg === "--dir") {
|
|
19
|
+
root = argv[i + 1] ?? "";
|
|
20
|
+
i += 1;
|
|
21
|
+
} else if (arg.startsWith("--dir=")) {
|
|
22
|
+
root = arg.slice("--dir=".length);
|
|
23
|
+
} else if (arg === "--allow-write") {
|
|
24
|
+
allowWrite = true;
|
|
25
|
+
} else {
|
|
26
|
+
return { error: `unknown argument: ${arg}` };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (!root) {
|
|
30
|
+
return { error: "mcp serve requires --dir <project-root>" };
|
|
31
|
+
}
|
|
32
|
+
return { root, allowWrite };
|
|
33
|
+
}
|
|
34
|
+
function resolveMcpRoot(input) {
|
|
35
|
+
const resolved = path.isAbsolute(input) ? path.normalize(input) : path.resolve(process.cwd(), input);
|
|
36
|
+
try {
|
|
37
|
+
validateProjectDirectory(resolved);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
return {
|
|
40
|
+
error: `invalid --dir: ${error instanceof Error ? error.message : String(error)}`
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
if (!existsSync(resolved) || !statSync(resolved).isDirectory()) {
|
|
44
|
+
return { error: `invalid --dir: not an existing directory: ${resolved}` };
|
|
45
|
+
}
|
|
46
|
+
return { root: resolved };
|
|
47
|
+
}
|
|
48
|
+
async function handleMcpCommand(argv) {
|
|
49
|
+
if (argv[0] !== "serve") {
|
|
50
|
+
console.error("Usage: opencode-swarm mcp serve --dir <project-root> [--allow-write]");
|
|
51
|
+
return 1;
|
|
52
|
+
}
|
|
53
|
+
const parsed = parseMcpServeArgs(argv.slice(1));
|
|
54
|
+
if ("error" in parsed) {
|
|
55
|
+
console.error(`mcp serve: ${parsed.error}`);
|
|
56
|
+
return 1;
|
|
57
|
+
}
|
|
58
|
+
const rootResult = resolveMcpRoot(parsed.root);
|
|
59
|
+
if ("error" in rootResult) {
|
|
60
|
+
console.error(`mcp serve: ${rootResult.error}`);
|
|
61
|
+
return 1;
|
|
62
|
+
}
|
|
63
|
+
try {
|
|
64
|
+
const { runMcpServer } = await import("./server-wmbahe8h.js");
|
|
65
|
+
return await runMcpServer({
|
|
66
|
+
root: rootResult.root,
|
|
67
|
+
allowWrite: parsed.allowWrite
|
|
68
|
+
});
|
|
69
|
+
} catch (error) {
|
|
70
|
+
console.error(`mcp serve: failed to start: ${error instanceof Error ? error.message : String(error)}`);
|
|
71
|
+
return 1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
resolveMcpRoot,
|
|
76
|
+
parseMcpServeArgs,
|
|
77
|
+
handleMcpCommand
|
|
78
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `swarm mcp serve` CLI handler (#2499).
|
|
3
|
+
*
|
|
4
|
+
* Starts the read-only MCP verification server over stdio for ONE
|
|
5
|
+
* configured project root. This is a long-running CLI-only entry — it is
|
|
6
|
+
* deliberately NOT a `/swarm` registry command, because a stdio server must
|
|
7
|
+
* own the process stdin/stdout that an in-session command cannot.
|
|
8
|
+
*
|
|
9
|
+
* The MCP server module is DYNAMICALLY imported so the official SDK lands
|
|
10
|
+
* in a split chunk of the CLI bundle rather than growing the
|
|
11
|
+
* `dist/cli/index.js` entry (2.4 MB packaging cap), and the plugin bundle
|
|
12
|
+
* (`dist/index.js`) never imports it at all (init-bounded, invariant 1/2).
|
|
13
|
+
*/
|
|
14
|
+
export interface McpServeArgs {
|
|
15
|
+
root: string;
|
|
16
|
+
allowWrite: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function parseMcpServeArgs(argv: string[]): McpServeArgs | {
|
|
19
|
+
error: string;
|
|
20
|
+
};
|
|
21
|
+
/** Resolve + fail-closed validate the configured project root. */
|
|
22
|
+
export declare function resolveMcpRoot(input: string): {
|
|
23
|
+
root: string;
|
|
24
|
+
} | {
|
|
25
|
+
error: string;
|
|
26
|
+
};
|
|
27
|
+
export declare function handleMcpCommand(argv: string[]): Promise<number>;
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
DEFAULT_SWEEPABLE_DELEGATION_STATUSES,
|
|
14
14
|
DELEGATION_COMPACTION_HIGH_WATER_BYTES,
|
|
15
15
|
DELEGATION_COMPACTION_LOW_WATER_BYTES,
|
|
16
|
+
DELEGATION_READ_RETRY_DELAY_MS,
|
|
16
17
|
LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER,
|
|
17
18
|
MAX_BACKGROUND_ADVISORY_CHARS,
|
|
18
19
|
MAX_BACKGROUND_OBSERVED_FILES,
|
|
@@ -36,7 +37,9 @@ import {
|
|
|
36
37
|
clearLegacyCoderSettlementTransferPending,
|
|
37
38
|
compactBackgroundDelegations,
|
|
38
39
|
findByBatchId,
|
|
40
|
+
findByBatchIdDetailed,
|
|
39
41
|
findByCorrelationId,
|
|
42
|
+
findByCorrelationIdDetailed,
|
|
40
43
|
findDelegationForCompletion,
|
|
41
44
|
findOpenAsyncLaneBatches,
|
|
42
45
|
isTerminalDelegationStatus,
|
|
@@ -51,6 +54,7 @@ import {
|
|
|
51
54
|
putPendingBackgroundAdvisory,
|
|
52
55
|
readDelegationFallback,
|
|
53
56
|
readDelegations,
|
|
57
|
+
readDelegationsDetailed,
|
|
54
58
|
recordDelegationIngestionResult,
|
|
55
59
|
recordPendingDelegation,
|
|
56
60
|
recordPendingDelegationDetailed,
|
|
@@ -67,27 +71,27 @@ import {
|
|
|
67
71
|
sweepStaleDelegations,
|
|
68
72
|
updateCoderSettlement,
|
|
69
73
|
writeDelegationFallback
|
|
70
|
-
} from "./index-
|
|
71
|
-
import"./index-
|
|
74
|
+
} from "./index-dg5znyqw.js";
|
|
75
|
+
import"./index-ma38q4rf.js";
|
|
72
76
|
import"./index-2s7dvzff.js";
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
75
|
-
import"./index-
|
|
77
|
+
import"./index-31fes86t.js";
|
|
78
|
+
import"./index-9p00xent.js";
|
|
79
|
+
import"./index-bdqefjxg.js";
|
|
76
80
|
import"./index-rdm3px0g.js";
|
|
77
81
|
import"./index-ry16d01s.js";
|
|
78
|
-
import"./index-
|
|
79
|
-
import"./index-
|
|
82
|
+
import"./index-gdrdtbw6.js";
|
|
83
|
+
import"./index-j8warkkj.js";
|
|
80
84
|
import"./index-vzm6zre7.js";
|
|
81
85
|
import"./index-ae75rja9.js";
|
|
82
|
-
import"./index-
|
|
83
|
-
import"./index-
|
|
86
|
+
import"./index-jzrx2sx2.js";
|
|
87
|
+
import"./index-yf1mvexg.js";
|
|
84
88
|
import"./index-7g4c7s5r.js";
|
|
85
|
-
import"./index-
|
|
86
|
-
import"./index-
|
|
89
|
+
import"./index-jmn35na4.js";
|
|
90
|
+
import"./index-ws3ggk1h.js";
|
|
87
91
|
import"./index-1xnse449.js";
|
|
88
|
-
import"./index-
|
|
92
|
+
import"./index-c1ggtmpm.js";
|
|
89
93
|
import"./index-bk5tah7q.js";
|
|
90
|
-
import"./index-
|
|
94
|
+
import"./index-gknz3bv1.js";
|
|
91
95
|
import"./index-zpsr8rpc.js";
|
|
92
96
|
import"./index-zgwm4ryv.js";
|
|
93
97
|
import"./index-a76rekgs.js";
|
|
@@ -108,6 +112,7 @@ export {
|
|
|
108
112
|
recordPendingDelegationDetailed,
|
|
109
113
|
recordPendingDelegation,
|
|
110
114
|
recordDelegationIngestionResult,
|
|
115
|
+
readDelegationsDetailed,
|
|
111
116
|
readDelegations,
|
|
112
117
|
readDelegationFallback,
|
|
113
118
|
putPendingBackgroundAdvisory,
|
|
@@ -122,7 +127,9 @@ export {
|
|
|
122
127
|
isTerminalDelegationStatus,
|
|
123
128
|
findOpenAsyncLaneBatches,
|
|
124
129
|
findDelegationForCompletion,
|
|
130
|
+
findByCorrelationIdDetailed,
|
|
125
131
|
findByCorrelationId,
|
|
132
|
+
findByBatchIdDetailed,
|
|
126
133
|
findByBatchId,
|
|
127
134
|
compactBackgroundDelegations,
|
|
128
135
|
clearLegacyCoderSettlementTransferPending,
|
|
@@ -146,6 +153,7 @@ export {
|
|
|
146
153
|
MAX_BACKGROUND_OBSERVED_FILES,
|
|
147
154
|
MAX_BACKGROUND_ADVISORY_CHARS,
|
|
148
155
|
LEGACY_CODER_SETTLEMENT_PENDING_ADVISORY_MARKER,
|
|
156
|
+
DELEGATION_READ_RETRY_DELAY_MS,
|
|
149
157
|
DELEGATION_COMPACTION_LOW_WATER_BYTES,
|
|
150
158
|
DELEGATION_COMPACTION_HIGH_WATER_BYTES,
|
|
151
159
|
DEFAULT_SWEEPABLE_DELEGATION_STATUSES,
|
|
@@ -19,27 +19,27 @@ import {
|
|
|
19
19
|
sweepStale,
|
|
20
20
|
unsubscribe,
|
|
21
21
|
updateSnapshot
|
|
22
|
-
} from "./index-
|
|
23
|
-
import"./index-
|
|
22
|
+
} from "./index-y5x1swr8.js";
|
|
23
|
+
import"./index-ma38q4rf.js";
|
|
24
24
|
import"./index-2s7dvzff.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
25
|
+
import"./index-31fes86t.js";
|
|
26
|
+
import"./index-9p00xent.js";
|
|
27
|
+
import"./index-bdqefjxg.js";
|
|
28
28
|
import"./index-rdm3px0g.js";
|
|
29
29
|
import"./index-ry16d01s.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
import"./index-gdrdtbw6.js";
|
|
31
|
+
import"./index-j8warkkj.js";
|
|
32
32
|
import"./index-vzm6zre7.js";
|
|
33
33
|
import"./index-ae75rja9.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
34
|
+
import"./index-jzrx2sx2.js";
|
|
35
|
+
import"./index-yf1mvexg.js";
|
|
36
36
|
import"./index-7g4c7s5r.js";
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
37
|
+
import"./index-jmn35na4.js";
|
|
38
|
+
import"./index-ws3ggk1h.js";
|
|
39
39
|
import"./index-1xnse449.js";
|
|
40
|
-
import"./index-
|
|
40
|
+
import"./index-c1ggtmpm.js";
|
|
41
41
|
import"./index-bk5tah7q.js";
|
|
42
|
-
import"./index-
|
|
42
|
+
import"./index-gknz3bv1.js";
|
|
43
43
|
import"./index-zpsr8rpc.js";
|
|
44
44
|
import"./index-zgwm4ryv.js";
|
|
45
45
|
import"./index-a76rekgs.js";
|