opencode-swarm 7.171.1 → 7.172.0
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-vxpmxk46.js → coder-settlement-0k46xqk2.js} +14 -14
- package/dist/cli/{config-doctor-vwy3c9g9.js → config-doctor-x41bxjp6.js} +6 -6
- package/dist/cli/{core-2znms60v.js → core-3spww0at.js} +5 -5
- package/dist/cli/{curation-policy-fakrpw5t.js → curation-policy-92qhvewe.js} +7 -7
- package/dist/cli/{curator-drift-r9r8gepb.js → curator-drift-fqvxe2zw.js} +8 -8
- package/dist/cli/{curator-kc80aj6d.js → curator-eyz6gg74.js} +45 -45
- package/dist/cli/curator-llm-factory-jnsjqq99.js +72 -0
- package/dist/cli/{dispatch-hwwj3qrb.js → dispatch-9yqqqfr6.js} +2 -2
- package/dist/cli/{evidence-summary-service-g3gr1pfs.js → evidence-summary-service-kf0vb1hf.js} +22 -22
- package/dist/cli/{gate-evidence-8mwsj2b7.js → gate-evidence-89wvxgs9.js} +9 -9
- package/dist/cli/guardrail-explain-rz4kaqyp.js +73 -0
- package/dist/cli/guardrail-log-kfjk62sz.js +23 -0
- package/dist/cli/{guardrail-reset-v91p8ca6.js → guardrail-reset-d8m1h5sz.js} +45 -45
- package/dist/cli/hive-promoter-0ekf5zp1.js +87 -0
- package/dist/cli/{index-xm0131fx.js → index-0y2ygy5f.js} +154 -37
- package/dist/cli/{index-aa2eyfvr.js → index-12w05bxk.js} +2 -2
- package/dist/cli/{index-95e3a9en.js → index-1s3t3jdc.js} +1 -1
- package/dist/cli/{index-xefajbqv.js → index-1vsmh63p.js} +2734 -1433
- package/dist/cli/{index-3zzyxs7q.js → index-25fa4krx.js} +8 -8
- package/dist/cli/{index-wn9gf91x.js → index-29j9sjbw.js} +3 -3
- package/dist/cli/{index-vs7b2pqm.js → index-2rdj9mdh.js} +4 -4
- package/dist/cli/{index-4sf357vj.js → index-328eg2bb.js} +4 -4
- package/dist/cli/{index-nyn01yrz.js → index-34jdempk.js} +2 -2
- package/dist/cli/{index-d6bs0p6d.js → index-39x78qk0.js} +8 -8
- package/dist/cli/{index-m1j1rth6.js → index-3kqzzwvd.js} +2 -2
- package/dist/cli/{index-5134766r.js → index-53ges0rk.js} +7 -7
- package/dist/cli/{index-7pae558g.js → index-5hambjmn.js} +6 -6
- package/dist/cli/{index-dr1ym009.js → index-63t4m2t5.js} +16 -16
- package/dist/cli/{index-0caqxnby.js → index-677gzqmd.js} +1 -1
- package/dist/cli/{index-b3pmzbh1.js → index-6fb3y9pm.js} +2 -2
- package/dist/cli/{index-s7h6txsk.js → index-6jshhpjw.js} +3 -3
- package/dist/cli/{index-5vgd9st3.js → index-7q1m8rsw.js} +7 -7
- package/dist/cli/{index-3jwamrzw.js → index-8k09fkqj.js} +5 -5
- package/dist/cli/{index-rdjmbeex.js → index-8wnjcav5.js} +4 -4
- package/dist/cli/{index-nbdmdyke.js → index-a2kv054j.js} +1 -1
- package/dist/cli/{index-9dz2ee2g.js → index-br3r0y73.js} +67 -47
- package/dist/cli/{index-ee6ydtfe.js → index-c1ggtmpm.js} +1 -1
- package/dist/cli/{index-evxd1art.js → index-dga9j6s1.js} +2 -2
- package/dist/cli/{index-nfs78aqj.js → index-dpb1xs5m.js} +2 -2
- package/dist/cli/{index-sxt7fgcw.js → index-ecaws78e.js} +1 -1
- package/dist/cli/{index-yqbnsmmv.js → index-efkckdaw.js} +1 -1
- 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-bpmtbmy9.js → index-gknz3bv1.js} +1 -1
- package/dist/cli/{index-6mjtptnb.js → index-gmw8a1qa.js} +1 -1
- package/dist/cli/{index-5400m33a.js → index-hnvmj9wx.js} +1 -1
- package/dist/cli/{index-rkj71ej6.js → index-jvg7hvjp.js} +7 -7
- package/dist/cli/{index-g6nen3gt.js → index-k441jgzk.js} +1 -1
- package/dist/cli/{index-6k5aq7b9.js → index-mj07x42s.js} +2 -2
- package/dist/cli/{index-kb66he4e.js → index-nqbmk4b9.js} +1 -1
- package/dist/cli/{index-er6sk4e6.js → index-nyrhz1h1.js} +2 -2
- package/dist/cli/{index-b43rt5ph.js → index-pt7h91zc.js} +19 -1
- package/dist/cli/{ast-diff-b0esr2kf.js → index-qss1s93b.js} +3 -6
- package/dist/cli/{index-cdee25pp.js → index-r08tgb71.js} +2 -2
- package/dist/cli/{index-3jcp3zb6.js → index-s723hx7z.js} +2 -2
- package/dist/cli/{index-2j0pd6sj.js → index-tfmb620d.js} +45 -45
- package/dist/cli/{index-7qqwx64h.js → index-v2fge66b.js} +8 -8
- package/dist/cli/{index-fhh02gwx.js → index-v6msnkz2.js} +2 -2
- package/dist/cli/{index-d5pk5b95.js → index-w1d5nsdc.js} +2 -2
- package/dist/cli/{index-n832052r.js → index-wrt875kh.js} +1 -1
- package/dist/cli/{index-ztxh3nmf.js → index-xn9tm7sr.js} +47 -47
- package/dist/cli/{index-9cp6bhx9.js → index-y8y2bjsy.js} +4 -4
- 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-8nbzfbjg.js → index-z81mxyhm.js} +5 -5
- package/dist/cli/{index-4rq1d5k5.js → index-zbw6h4xn.js} +4 -3
- package/dist/cli/index.js +53 -47
- package/dist/cli/{knowledge-escalator-4j6xgcvj.js → knowledge-escalator-qtz01ffw.js} +17 -17
- package/dist/cli/{knowledge-events-5ax1g356.js → knowledge-events-8w0mvkzc.js} +15 -15
- package/dist/cli/{knowledge-link-vh9pfnb9.js → knowledge-link-3xp7h4xn.js} +6 -6
- package/dist/cli/{knowledge-store-2nrtfb5x.js → knowledge-store-p5ps09qg.js} +7 -7
- package/dist/cli/{knowledge-validator-efcax8g9.js → knowledge-validator-rc63wfkp.js} +9 -9
- package/dist/cli/mcp-pmfg7wpk.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-29qj2kya.js → pending-delegations-1sg6g7et.js} +21 -13
- package/dist/cli/{pr-subscriptions-t51vcrvd.js → pr-subscriptions-yd804apk.js} +13 -13
- package/dist/cli/{pr-workflow-gate-03367gvd.js → pr-workflow-gate-pf3ssffq.js} +45 -45
- package/dist/cli/{runner-8m8qhngm.js → runner-rry4z6j2.js} +7 -7
- package/dist/cli/{scan-cursor-nhxpv6tj.js → scan-cursor-j93ek248.js} +8 -8
- package/dist/cli/{schema-ht5hmsce.js → schema-hvptm5hf.js} +3 -3
- package/dist/cli/{scope-persistence-6qebaksv.js → scope-persistence-3tfvswtk.js} +17 -17
- package/dist/cli/semantic-classifier-bjsez0v5.js +8 -0
- package/dist/cli/server-rbvx63t6.js +18129 -0
- package/dist/cli/{skill-generator-tfm4kawf.js → skill-generator-r9wc6xt1.js} +19 -19
- package/dist/cli/snapshot-coordination-init-7w5em40w.js +86 -0
- package/dist/cli/{telemetry-0mz37v3h.js → telemetry-vw919tfm.js} +3 -3
- package/dist/cli/{workspace-snapshot-hkz2wt1c.js → workspace-snapshot-x54wxr6a.js} +4 -4
- package/dist/cli/{worktree-collision-ownership-6mgm8p9g.js → worktree-collision-ownership-yetwf2ch.js} +14 -14
- package/dist/cli/{worktree-isolation-02rr7t21.js → worktree-isolation-sxfj78hv.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 +103 -103
- 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/pr-review/completion.d.ts +12 -0
- package/dist/retention/dir-prune.d.ts +5 -1
- package/dist/telemetry.d.ts +11 -1
- package/dist/tools/dispatch-lanes.d.ts +5 -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-exke3rag.js +0 -72
- package/dist/cli/guardrail-explain-pkbjswtd.js +0 -73
- package/dist/cli/guardrail-log-qx1tpeda.js +0 -23
- package/dist/cli/hive-promoter-02vxb018.js +0 -87
- package/dist/cli/snapshot-coordination-init-zgfjjv9p.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-1vsmh63p.js";
|
|
17
|
+
import"./index-hnvmj9wx.js";
|
|
18
|
+
import"./index-nyrhz1h1.js";
|
|
19
|
+
import"./index-328eg2bb.js";
|
|
20
|
+
import"./index-nqbmk4b9.js";
|
|
21
|
+
import"./index-29j9sjbw.js";
|
|
22
|
+
import"./index-63t4m2t5.js";
|
|
23
|
+
import"./index-s723hx7z.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-y8y2bjsy.js";
|
|
28
|
+
import"./index-z81mxyhm.js";
|
|
29
|
+
import"./index-r08tgb71.js";
|
|
30
30
|
import"./index-fyfbpz4f.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-v2fge66b.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-25fa4krx.js";
|
|
35
|
+
import"./index-v6msnkz2.js";
|
|
36
|
+
import"./index-34jdempk.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-8k09fkqj.js";
|
|
40
|
+
import"./index-8wnjcav5.js";
|
|
41
|
+
import"./index-0y2ygy5f.js";
|
|
42
|
+
import"./index-39x78qk0.js";
|
|
43
|
+
import"./index-6fb3y9pm.js";
|
|
44
44
|
import"./index-2s7dvzff.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
45
|
+
import"./index-2rdj9mdh.js";
|
|
46
|
+
import"./index-677gzqmd.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-6jshhpjw.js";
|
|
49
|
+
import"./index-frcemc0b.js";
|
|
50
|
+
import"./index-wrt875kh.js";
|
|
51
|
+
import"./index-7q1m8rsw.js";
|
|
52
|
+
import"./index-5hambjmn.js";
|
|
53
|
+
import"./index-mj07x42s.js";
|
|
54
|
+
import"./index-12w05bxk.js";
|
|
55
|
+
import"./index-k441jgzk.js";
|
|
56
|
+
import"./index-efkckdaw.js";
|
|
57
57
|
import"./index-rdm3px0g.js";
|
|
58
58
|
import"./index-ry16d01s.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
59
|
+
import"./index-dpb1xs5m.js";
|
|
60
|
+
import"./index-53ges0rk.js";
|
|
61
61
|
import"./index-vzm6zre7.js";
|
|
62
62
|
import"./index-ae75rja9.js";
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
63
|
+
import"./index-1s3t3jdc.js";
|
|
64
|
+
import"./index-dga9j6s1.js";
|
|
65
65
|
import"./index-7g4c7s5r.js";
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-
|
|
66
|
+
import"./index-br3r0y73.js";
|
|
67
|
+
import"./index-a2kv054j.js";
|
|
68
68
|
import"./index-1xnse449.js";
|
|
69
|
-
import"./index-
|
|
70
|
-
import"./index-
|
|
69
|
+
import"./index-c1ggtmpm.js";
|
|
70
|
+
import"./index-3kqzzwvd.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-zbw6h4xn.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-pmfg7wpk.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-z81mxyhm.js";
|
|
13
|
+
import"./index-39x78qk0.js";
|
|
14
|
+
import"./index-6fb3y9pm.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-6jshhpjw.js";
|
|
17
|
+
import"./index-frcemc0b.js";
|
|
18
|
+
import"./index-wrt875kh.js";
|
|
19
|
+
import"./index-dpb1xs5m.js";
|
|
20
|
+
import"./index-53ges0rk.js";
|
|
21
21
|
import"./index-vzm6zre7.js";
|
|
22
22
|
import"./index-ae75rja9.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
23
|
+
import"./index-1s3t3jdc.js";
|
|
24
|
+
import"./index-dga9j6s1.js";
|
|
25
25
|
import"./index-7g4c7s5r.js";
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
import"./index-br3r0y73.js";
|
|
27
|
+
import"./index-a2kv054j.js";
|
|
28
28
|
import"./index-1xnse449.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-c1ggtmpm.js";
|
|
30
|
+
import"./index-3kqzzwvd.js";
|
|
31
31
|
import"./index-0mhftbpp.js";
|
|
32
32
|
import"./index-a1w58b47.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
33
|
+
import"./index-zbw6h4xn.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-39x78qk0.js";
|
|
33
|
+
import"./index-6fb3y9pm.js";
|
|
34
34
|
import"./index-2s7dvzff.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
35
|
+
import"./index-6jshhpjw.js";
|
|
36
|
+
import"./index-frcemc0b.js";
|
|
37
|
+
import"./index-wrt875kh.js";
|
|
38
|
+
import"./index-dpb1xs5m.js";
|
|
39
39
|
import"./index-ae75rja9.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-1s3t3jdc.js";
|
|
41
|
+
import"./index-dga9j6s1.js";
|
|
42
42
|
import"./index-7g4c7s5r.js";
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
43
|
+
import"./index-br3r0y73.js";
|
|
44
|
+
import"./index-a2kv054j.js";
|
|
45
45
|
import"./index-1xnse449.js";
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
46
|
+
import"./index-c1ggtmpm.js";
|
|
47
|
+
import"./index-3kqzzwvd.js";
|
|
48
48
|
import"./index-0mhftbpp.js";
|
|
49
49
|
import"./index-a1w58b47.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
50
|
+
import"./index-zbw6h4xn.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-1s3t3jdc.js";
|
|
16
|
+
import"./index-dga9j6s1.js";
|
|
17
17
|
import"./index-7g4c7s5r.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
18
|
+
import"./index-br3r0y73.js";
|
|
19
|
+
import"./index-a2kv054j.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-53ges0rk.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-1s3t3jdc.js";
|
|
52
|
+
import"./index-dga9j6s1.js";
|
|
53
53
|
import"./index-7g4c7s5r.js";
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
54
|
+
import"./index-br3r0y73.js";
|
|
55
|
+
import"./index-a2kv054j.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-2rdj9mdh.js";
|
|
27
|
+
import"./index-677gzqmd.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-53ges0rk.js";
|
|
30
30
|
import"./index-vzm6zre7.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
32
|
+
import"./index-1s3t3jdc.js";
|
|
33
|
+
import"./index-dga9j6s1.js";
|
|
34
34
|
import"./index-7g4c7s5r.js";
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
35
|
+
import"./index-br3r0y73.js";
|
|
36
|
+
import"./index-a2kv054j.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-rbvx63t6.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-0y2ygy5f.js";
|
|
75
|
+
import"./index-6fb3y9pm.js";
|
|
72
76
|
import"./index-2s7dvzff.js";
|
|
73
|
-
import"./index-
|
|
74
|
-
import"./index-
|
|
75
|
-
import"./index-
|
|
77
|
+
import"./index-12w05bxk.js";
|
|
78
|
+
import"./index-k441jgzk.js";
|
|
79
|
+
import"./index-efkckdaw.js";
|
|
76
80
|
import"./index-rdm3px0g.js";
|
|
77
81
|
import"./index-ry16d01s.js";
|
|
78
|
-
import"./index-
|
|
79
|
-
import"./index-
|
|
82
|
+
import"./index-dpb1xs5m.js";
|
|
83
|
+
import"./index-53ges0rk.js";
|
|
80
84
|
import"./index-vzm6zre7.js";
|
|
81
85
|
import"./index-ae75rja9.js";
|
|
82
|
-
import"./index-
|
|
83
|
-
import"./index-
|
|
86
|
+
import"./index-1s3t3jdc.js";
|
|
87
|
+
import"./index-dga9j6s1.js";
|
|
84
88
|
import"./index-7g4c7s5r.js";
|
|
85
|
-
import"./index-
|
|
86
|
-
import"./index-
|
|
89
|
+
import"./index-br3r0y73.js";
|
|
90
|
+
import"./index-a2kv054j.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-v2fge66b.js";
|
|
23
|
+
import"./index-6fb3y9pm.js";
|
|
24
24
|
import"./index-2s7dvzff.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
25
|
+
import"./index-12w05bxk.js";
|
|
26
|
+
import"./index-k441jgzk.js";
|
|
27
|
+
import"./index-efkckdaw.js";
|
|
28
28
|
import"./index-rdm3px0g.js";
|
|
29
29
|
import"./index-ry16d01s.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
30
|
+
import"./index-dpb1xs5m.js";
|
|
31
|
+
import"./index-53ges0rk.js";
|
|
32
32
|
import"./index-vzm6zre7.js";
|
|
33
33
|
import"./index-ae75rja9.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
34
|
+
import"./index-1s3t3jdc.js";
|
|
35
|
+
import"./index-dga9j6s1.js";
|
|
36
36
|
import"./index-7g4c7s5r.js";
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
37
|
+
import"./index-br3r0y73.js";
|
|
38
|
+
import"./index-a2kv054j.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";
|