opencode-swarm 7.135.1 → 7.135.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/swarm-pr-feedback/SKILL.md +24 -21
- package/.opencode/skills/swarm-pr-review/SKILL.md +55 -42
- package/dist/agents/explorer.d.ts +1 -1
- package/dist/background/candidate-contract.d.ts +113 -0
- package/dist/background/candidate-parser.d.ts +8 -29
- package/dist/background/pr-review-trigger-contract.d.ts +197 -0
- package/dist/background/workspace-snapshot.d.ts +26 -0
- package/dist/cli/{config-doctor-6398t3a6.js → config-doctor-pj3yvxdb.js} +2 -2
- package/dist/cli/{core-9876t6cs.js → core-4va9z2ng.js} +2 -2
- package/dist/cli/{curation-policy-f7qz4tez.js → curation-policy-b2caf3v3.js} +5 -5
- package/dist/cli/{curator-drift-9q6f85bm.js → curator-drift-2ta83hss.js} +2 -2
- package/dist/cli/{curator-llm-factory-wr3zmy2c.js → curator-llm-factory-9983528d.js} +26 -26
- package/dist/cli/{curator-fjhyezyx.js → curator-r1s2mwf2.js} +26 -26
- package/dist/cli/{dispatch-gxbeb2ps.js → dispatch-wtk6dxky.js} +2 -2
- package/dist/cli/{evidence-summary-service-0cczdmjv.js → evidence-summary-service-feby8ny0.js} +5 -5
- package/dist/cli/{explorer-jp0nen03.js → explorer-15gqzxh8.js} +1 -1
- package/dist/cli/{gate-evidence-8zrwdj69.js → gate-evidence-84b03mb4.js} +3 -3
- package/dist/cli/guardrail-explain-pwxvg5n0.js +57 -0
- package/dist/cli/{guardrail-log-bd45kw0x.js → guardrail-log-yzpz8b7t.js} +4 -4
- package/dist/cli/{hive-promoter-f2yh22m1.js → hive-promoter-586dhndj.js} +26 -26
- package/dist/cli/{index-j89zmcpx.js → index-02cqjna3.js} +6 -6
- package/dist/cli/{index-jtshf1pd.js → index-2pxk6qg4.js} +1 -1
- package/dist/cli/{index-aky90eqz.js → index-340chr1e.js} +1612 -166
- package/dist/cli/{index-xhpmagdm.js → index-3m7kpnqf.js} +2 -2
- package/dist/cli/{index-z085b4ka.js → index-3xbx305x.js} +1 -1
- package/dist/cli/{index-b4z7s917.js → index-73dfyfhq.js} +1 -1
- package/dist/cli/{index-ens0gt38.js → index-7pnvf04s.js} +8 -8
- package/dist/cli/{index-g1drmgxe.js → index-8gw8p7yh.js} +3 -3
- package/dist/cli/{index-jxchddjk.js → index-9c3gf2wd.js} +1 -1
- package/dist/cli/{index-bjrkg4tc.js → index-b0eva00y.js} +2 -2
- package/dist/cli/{index-2ghkk9ve.js → index-bfd4xfpp.js} +3 -3
- package/dist/cli/{index-4pdrmemy.js → index-bs4m85v1.js} +2 -2
- package/dist/cli/{index-5wx8wdxg.js → index-ckdva4rs.js} +5 -5
- package/dist/cli/{index-w80r3axq.js → index-cwdy5vw9.js} +28 -28
- package/dist/cli/{index-fwkqq9mq.js → index-d5psymdk.js} +4 -4
- package/dist/cli/{index-vxv732ex.js → index-dg1njnms.js} +7 -4
- package/dist/cli/{index-yhba8swx.js → index-dzyjb33e.js} +1 -1
- package/dist/cli/{index-xg9repnx.js → index-ey29aap6.js} +1 -1
- package/dist/cli/{index-wdkkf3xg.js → index-g3meqrsg.js} +2 -2
- package/dist/cli/{index-7an2qn0s.js → index-hdy2nd5h.js} +4 -4
- package/dist/cli/{index-nbnqf4fj.js → index-hvrrq3f3.js} +1 -1
- package/dist/cli/{index-dzaarxhg.js → index-j0kte6gd.js} +1 -1
- package/dist/cli/{index-5vp9gka3.js → index-j92ser8n.js} +1 -1
- package/dist/cli/{index-2nqsr1dx.js → index-jgkjxpdh.js} +4 -4
- package/dist/cli/{index-13xxjfhn.js → index-m0ynxkaa.js} +3 -3
- package/dist/cli/{index-247b1c1m.js → index-qqkw794p.js} +3 -3
- package/dist/cli/{index-b7p0mp2q.js → index-ryqnn3nv.js} +1 -1
- package/dist/cli/{index-fpkb3mw1.js → index-vg3yx648.js} +1 -1
- package/dist/cli/{index-qe3v54nb.js → index-y111zefa.js} +64 -23
- package/dist/cli/{index-3nasn371.js → index-y6a7gjtj.js} +126 -42
- package/dist/cli/index.js +26 -26
- package/dist/cli/{knowledge-escalator-4tp3yy7e.js → knowledge-escalator-w7by1m8m.js} +6 -6
- package/dist/cli/{knowledge-events-7854gb3p.js → knowledge-events-n8xxsay3.js} +4 -4
- package/dist/cli/{knowledge-link-etrfntkd.js → knowledge-link-mm1w967j.js} +3 -3
- package/dist/cli/{knowledge-store-cxnr6v01.js → knowledge-store-xzmvfnx3.js} +4 -4
- package/dist/cli/{knowledge-validator-3n5t55qy.js → knowledge-validator-5q1amsq6.js} +7 -7
- package/dist/cli/{pending-delegations-4z3tkkct.js → pending-delegations-mt5gs1bt.js} +3 -3
- package/dist/cli/{pr-subscriptions-29j794kd.js → pr-subscriptions-v5xd3j6d.js} +3 -3
- package/dist/cli/{scan-cursor-0cexjh3b.js → scan-cursor-1q1zmt4b.js} +5 -5
- package/dist/cli/{schema-rs5a7ywx.js → schema-8mtsfspm.js} +1 -1
- package/dist/cli/{scope-persistence-1vsnkmm4.js → scope-persistence-h2fpgxww.js} +2 -2
- package/dist/cli/{skill-generator-n0h9n0zd.js → skill-generator-54xbjgak.js} +8 -8
- package/dist/cli/{workspace-snapshot-9h5za0s6.js → workspace-snapshot-jmyamqnv.js} +6 -1
- package/dist/cli/{worktree-collision-ownership-dtwr0xj4.js → worktree-collision-ownership-15hymf1y.js} +5 -5
- package/dist/commands/registry.d.ts +1 -1
- package/dist/hooks/pr-workflow-gate.d.ts +30 -4
- package/dist/hooks/repo-graph-builder.d.ts +18 -0
- package/dist/index.js +394 -390
- package/dist/tools/convene-council.d.ts +3 -3
- package/dist/tools/dispatch-lanes.d.ts +65 -7
- package/dist/tools/repo-graph/builder.d.ts +20 -2
- package/dist/tools/repo-graph/incremental.d.ts +18 -1
- package/dist/tools/repo-graph/ontology.d.ts +8 -0
- package/dist/tools/repo-graph/types.d.ts +62 -1
- package/dist/tools/repo-graph.d.ts +1 -1
- package/dist/tools/submit-phase-council-verdicts.d.ts +3 -3
- package/dist/tools/write-final-council-evidence.d.ts +3 -3
- package/dist/tools/write-pr-review-trigger-eval.d.ts +34 -63
- package/package.json +1 -1
- package/dist/cli/guardrail-explain-g1s89b3e.js +0 -57
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./index-rtry5xyf.js";
|
|
5
5
|
import {
|
|
6
6
|
readKnowledgeEvents
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-8gw8p7yh.js";
|
|
8
8
|
import {
|
|
9
9
|
isLinked,
|
|
10
10
|
readLinkPointer,
|
|
11
11
|
resolveKnowledgeStoreDir,
|
|
12
12
|
resolveLinkDir
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-dzyjb33e.js";
|
|
14
14
|
|
|
15
15
|
// src/knowledge/curation-policy.ts
|
|
16
16
|
import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
readTaskEvidence,
|
|
8
8
|
readTaskEvidenceRaw,
|
|
9
9
|
sanitizeTaskId
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ryqnn3nv.js";
|
|
11
11
|
import {
|
|
12
12
|
atomicWriteFile
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-ey29aap6.js";
|
|
14
14
|
import {
|
|
15
15
|
EVIDENCE_MAX_JSON_BYTES,
|
|
16
16
|
EvidenceBundleSchema,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
readSwarmFileAsync,
|
|
50
50
|
validateSwarmPath
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-bfd4xfpp.js";
|
|
52
52
|
import {
|
|
53
53
|
readCachedParsedFile
|
|
54
54
|
} from "./index-fsrp8wp3.js";
|
|
@@ -63,17 +63,17 @@ import {
|
|
|
63
63
|
exports_external,
|
|
64
64
|
init_zod
|
|
65
65
|
} from "./index-bpmtbmy9.js";
|
|
66
|
-
import {
|
|
67
|
-
bunHash,
|
|
68
|
-
bunWrite,
|
|
69
|
-
mergeEnvForChild
|
|
70
|
-
} from "./index-qe3v54nb.js";
|
|
71
66
|
import {
|
|
72
67
|
criticalWarn,
|
|
73
68
|
error,
|
|
74
69
|
init_logger,
|
|
75
70
|
warn
|
|
76
71
|
} from "./index-zgwm4ryv.js";
|
|
72
|
+
import {
|
|
73
|
+
bunHash,
|
|
74
|
+
bunWrite,
|
|
75
|
+
mergeEnvForChild
|
|
76
|
+
} from "./index-y111zefa.js";
|
|
77
77
|
import {
|
|
78
78
|
__esm,
|
|
79
79
|
__export,
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./index-ae75rja9.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveKnowledgeStoreDir
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-dzyjb33e.js";
|
|
8
8
|
import {
|
|
9
9
|
atomicWriteFile
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ey29aap6.js";
|
|
11
11
|
import {
|
|
12
12
|
require_proper_lockfile
|
|
13
13
|
} from "./index-7g4c7s5r.js";
|
|
@@ -608,7 +608,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
608
608
|
deltas.push({ id, delta });
|
|
609
609
|
}
|
|
610
610
|
if (deltas.length > 0) {
|
|
611
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
611
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-xzmvfnx3.js");
|
|
612
612
|
await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledge,
|
|
4
4
|
transactKnowledge
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-02cqjna3.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveKnowledgeStoreDir
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-dzyjb33e.js";
|
|
9
9
|
import {
|
|
10
10
|
init_knowledge_types,
|
|
11
11
|
isActiveStatus
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
SwarmError
|
|
7
7
|
} from "./index-z6xqpmqg.js";
|
|
8
|
-
import {
|
|
9
|
-
bunFile
|
|
10
|
-
} from "./index-qe3v54nb.js";
|
|
11
8
|
import {
|
|
12
9
|
warn
|
|
13
10
|
} from "./index-zgwm4ryv.js";
|
|
11
|
+
import {
|
|
12
|
+
bunFile
|
|
13
|
+
} from "./index-y111zefa.js";
|
|
14
14
|
|
|
15
15
|
// src/hooks/utils.ts
|
|
16
16
|
import * as fs from "fs";
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-340chr1e.js";
|
|
16
16
|
import {
|
|
17
17
|
checkFileAuthority,
|
|
18
18
|
classifyFile,
|
|
19
19
|
isInDeclaredScope,
|
|
20
20
|
redactPath,
|
|
21
21
|
redactShellCommand
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-2pxk6qg4.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-02cqjna3.js";
|
|
10
10
|
import {
|
|
11
11
|
countEntryContradictionsInWindow,
|
|
12
12
|
countEntryViolationsInWindow,
|
|
13
13
|
readKnowledgeEvents,
|
|
14
14
|
recordKnowledgeEvent
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-8gw8p7yh.js";
|
|
16
16
|
import {
|
|
17
17
|
init_knowledge_types,
|
|
18
18
|
isActiveStatus
|
|
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
190
190
|
alreadyInactive: true
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
193
|
+
const { quarantineEntry } = await import("./knowledge-validator-5q1amsq6.js");
|
|
194
194
|
let policyConfig;
|
|
195
195
|
try {
|
|
196
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
197
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
196
|
+
const { KnowledgeConfigSchema } = await import("./schema-8mtsfspm.js");
|
|
197
|
+
const { loadPluginConfigWithMeta } = await import("./index-g3meqrsg.js");
|
|
198
198
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
199
199
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
200
200
|
} catch {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bs4m85v1.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-hvrrq3f3.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -84,30 +84,30 @@ import {
|
|
|
84
84
|
handleWriteRetroCommand,
|
|
85
85
|
normalizeSwarmCommandInput,
|
|
86
86
|
resolveCommand
|
|
87
|
-
} from "./index-
|
|
88
|
-
import"./index-
|
|
89
|
-
import"./index-
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
87
|
+
} from "./index-340chr1e.js";
|
|
88
|
+
import"./index-m0ynxkaa.js";
|
|
89
|
+
import"./index-2pxk6qg4.js";
|
|
90
|
+
import"./index-j92ser8n.js";
|
|
91
|
+
import"./index-7pnvf04s.js";
|
|
92
92
|
import"./index-4905hd2m.js";
|
|
93
93
|
import"./index-134d35c1.js";
|
|
94
|
-
import"./index-
|
|
95
|
-
import"./index-
|
|
96
|
-
import"./index-
|
|
97
|
-
import"./index-
|
|
94
|
+
import"./index-qqkw794p.js";
|
|
95
|
+
import"./index-ckdva4rs.js";
|
|
96
|
+
import"./index-b0eva00y.js";
|
|
97
|
+
import"./index-dg1njnms.js";
|
|
98
98
|
import"./index-c8s9a3zh.js";
|
|
99
99
|
import"./index-9ss2m4rs.js";
|
|
100
|
-
import"./index-
|
|
101
|
-
import"./index-
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
100
|
+
import"./index-ryqnn3nv.js";
|
|
101
|
+
import"./index-3xbx305x.js";
|
|
102
|
+
import"./index-jgkjxpdh.js";
|
|
103
|
+
import"./index-3m7kpnqf.js";
|
|
104
104
|
import"./index-rtry5xyf.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
105
|
+
import"./index-02cqjna3.js";
|
|
106
|
+
import"./index-8gw8p7yh.js";
|
|
107
107
|
import"./index-ae75rja9.js";
|
|
108
|
-
import"./index-
|
|
109
|
-
import"./index-
|
|
110
|
-
import"./index-
|
|
108
|
+
import"./index-dzyjb33e.js";
|
|
109
|
+
import"./index-ey29aap6.js";
|
|
110
|
+
import"./index-9c3gf2wd.js";
|
|
111
111
|
import"./index-k5jrywpr.js";
|
|
112
112
|
import"./index-n832052r.js";
|
|
113
113
|
import {
|
|
@@ -116,19 +116,19 @@ import {
|
|
|
116
116
|
init_constants,
|
|
117
117
|
init_schema,
|
|
118
118
|
stripKnownSwarmPrefix
|
|
119
|
-
} from "./index-
|
|
119
|
+
} from "./index-j0kte6gd.js";
|
|
120
120
|
import"./index-bk5tah7q.js";
|
|
121
121
|
import"./index-8fwhhayc.js";
|
|
122
122
|
import"./index-q1exe2b3.js";
|
|
123
|
-
import"./index-
|
|
123
|
+
import"./index-vg3yx648.js";
|
|
124
124
|
import"./index-wxyxf0bd.js";
|
|
125
125
|
import"./index-1kz6da87.js";
|
|
126
|
-
import"./index-
|
|
126
|
+
import"./index-73dfyfhq.js";
|
|
127
127
|
import"./index-b8zgtz81.js";
|
|
128
|
-
import"./index-
|
|
128
|
+
import"./index-d5psymdk.js";
|
|
129
129
|
import"./index-4rhhvd1a.js";
|
|
130
|
-
import"./index-
|
|
131
|
-
import"./index-
|
|
130
|
+
import"./index-hdy2nd5h.js";
|
|
131
|
+
import"./index-bfd4xfpp.js";
|
|
132
132
|
import"./index-fsrp8wp3.js";
|
|
133
133
|
import"./index-09b9zncg.js";
|
|
134
134
|
import"./index-7g4c7s5r.js";
|
|
@@ -136,9 +136,9 @@ import"./index-7a2hm51h.js";
|
|
|
136
136
|
import"./index-bpmtbmy9.js";
|
|
137
137
|
import"./index-z6xqpmqg.js";
|
|
138
138
|
import"./index-zjygnfay.js";
|
|
139
|
-
import"./index-qe3v54nb.js";
|
|
140
139
|
import"./index-zgwm4ryv.js";
|
|
141
|
-
import"./index-
|
|
140
|
+
import"./index-y6a7gjtj.js";
|
|
141
|
+
import"./index-y111zefa.js";
|
|
142
142
|
import"./index-a76rekgs.js";
|
|
143
143
|
|
|
144
144
|
// src/commands/index.ts
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
advisoryWarn,
|
|
4
4
|
init_warning_buffer
|
|
5
5
|
} from "./index-4rhhvd1a.js";
|
|
6
|
-
import {
|
|
7
|
-
bunSpawn
|
|
8
|
-
} from "./index-qe3v54nb.js";
|
|
9
6
|
import {
|
|
10
7
|
log
|
|
11
8
|
} from "./index-zgwm4ryv.js";
|
|
9
|
+
import {
|
|
10
|
+
bunSpawn
|
|
11
|
+
} from "./index-y111zefa.js";
|
|
12
12
|
import {
|
|
13
13
|
__require
|
|
14
14
|
} from "./index-a76rekgs.js";
|
|
@@ -39,7 +39,7 @@ var _internals = {
|
|
|
39
39
|
symlinkSync: fs.symlinkSync
|
|
40
40
|
},
|
|
41
41
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
42
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
42
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-h2fpgxww.js");
|
|
43
43
|
return realWrite(directory, taskId, files);
|
|
44
44
|
},
|
|
45
45
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -145,11 +145,14 @@ Field rules:
|
|
|
145
145
|
Emit a header row first, then one unprefixed data row per finding. Use pipe (|) to
|
|
146
146
|
separate fields; escape literal pipe characters inside field values as \\|.
|
|
147
147
|
|
|
148
|
-
If a standard explorer finds zero issues, emit the
|
|
149
|
-
|
|
148
|
+
If either a standard explorer or a micro-lane finds zero issues, emit the
|
|
149
|
+
header followed by exactly the matching family form:
|
|
150
|
+
[CLEAN] | lane | coverage_scope | evidence
|
|
150
151
|
[CLEAN] | micro_lane | coverage_scope | evidence
|
|
151
|
-
|
|
152
|
-
|
|
152
|
+
Replace lane or micro_lane with the exact controller-assigned value and fill
|
|
153
|
+
the remaining fields with the checks completed and concrete negative evidence.
|
|
154
|
+
Header-only output is unattested. Do NOT fall back to the default
|
|
155
|
+
PROJECT/STRUCTURE format.
|
|
153
156
|
|
|
154
157
|
For micro-lane dispatches, use the micro-lane variant:
|
|
155
158
|
[CANDIDATE] | candidate_id | micro_lane | severity | category | file:line | claim | invariant_violated | evidence_summary | confidence
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
loadPluginConfigWithMeta,
|
|
8
8
|
loadPluginConfigWithMetaAsync,
|
|
9
9
|
resolveWorktreeIsolationConfig
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-9c3gf2wd.js";
|
|
11
11
|
import {
|
|
12
12
|
ApprovalEvidenceSchema,
|
|
13
13
|
BaseEvidenceSchema,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
isQAAgent,
|
|
63
63
|
isSubagent,
|
|
64
64
|
resolveAutoReviewConfig
|
|
65
|
-
} from "./index-
|
|
65
|
+
} from "./index-j0kte6gd.js";
|
|
66
66
|
import"./index-bk5tah7q.js";
|
|
67
67
|
import {
|
|
68
68
|
MigrationStatusSchema,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bfd4xfpp.js";
|
|
5
5
|
import {
|
|
6
6
|
withEvidenceLock
|
|
7
7
|
} from "./index-09b9zncg.js";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
exports_external,
|
|
10
10
|
init_zod
|
|
11
11
|
} from "./index-bpmtbmy9.js";
|
|
12
|
-
import {
|
|
13
|
-
bunWrite
|
|
14
|
-
} from "./index-qe3v54nb.js";
|
|
15
12
|
import {
|
|
16
13
|
init_logger,
|
|
17
14
|
warn
|
|
18
15
|
} from "./index-zgwm4ryv.js";
|
|
16
|
+
import {
|
|
17
|
+
bunWrite
|
|
18
|
+
} from "./index-y111zefa.js";
|
|
19
19
|
|
|
20
20
|
// src/background/pending-delegations.ts
|
|
21
21
|
init_zod();
|
|
@@ -19,7 +19,7 @@ var package_default;
|
|
|
19
19
|
var init_package = __esm(() => {
|
|
20
20
|
package_default = {
|
|
21
21
|
name: "opencode-swarm",
|
|
22
|
-
version: "7.135.
|
|
22
|
+
version: "7.135.2",
|
|
23
23
|
description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
24
24
|
main: "dist/index.js",
|
|
25
25
|
types: "dist/index.d.ts",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-3m7kpnqf.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-02cqjna3.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-dzyjb33e.js";
|
|
16
16
|
import {
|
|
17
17
|
atomicWriteFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-ey29aap6.js";
|
|
19
19
|
import {
|
|
20
20
|
require_proper_lockfile
|
|
21
21
|
} from "./index-7g4c7s5r.js";
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
simpleGlobToRegex
|
|
4
4
|
} from "./index-z6xqpmqg.js";
|
|
5
|
-
import {
|
|
6
|
-
bunSpawnSync
|
|
7
|
-
} from "./index-qe3v54nb.js";
|
|
8
5
|
import {
|
|
9
6
|
warn
|
|
10
7
|
} from "./index-zgwm4ryv.js";
|
|
8
|
+
import {
|
|
9
|
+
bunSpawnSync
|
|
10
|
+
} from "./index-y111zefa.js";
|
|
11
11
|
import {
|
|
12
12
|
__export
|
|
13
13
|
} from "./index-a76rekgs.js";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-jgkjxpdh.js";
|
|
6
6
|
import {
|
|
7
7
|
computeOutcomeSignal,
|
|
8
8
|
readKnowledge,
|
|
9
9
|
resolveHiveKnowledgePath,
|
|
10
10
|
resolveSwarmKnowledgePath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-02cqjna3.js";
|
|
13
13
|
import {
|
|
14
14
|
effectiveRetrievalOutcomes,
|
|
15
15
|
readKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-8gw8p7yh.js";
|
|
17
17
|
import {
|
|
18
18
|
init_knowledge_types,
|
|
19
19
|
isActiveStatus
|
|
@@ -131,10 +131,16 @@ function killProcessTreeImpl(pid, signal, directKill, wasDetached) {
|
|
|
131
131
|
}
|
|
132
132
|
if (process.platform === "win32") {
|
|
133
133
|
try {
|
|
134
|
-
nodeSpawnSync("taskkill", ["/PID", String(pid), "/T", "/F"]
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
const result = nodeSpawnSync("taskkill", ["/PID", String(pid), "/T", "/F"], {
|
|
135
|
+
cwd: process.cwd(),
|
|
136
|
+
stdio: ["ignore", "ignore", "ignore"],
|
|
137
|
+
timeout: 5000,
|
|
138
|
+
windowsHide: true
|
|
139
|
+
});
|
|
140
|
+
if (!result.error && result.status === 0)
|
|
141
|
+
return;
|
|
142
|
+
} catch {}
|
|
143
|
+
directKill();
|
|
138
144
|
return;
|
|
139
145
|
}
|
|
140
146
|
if (wasDetached) {
|
|
@@ -146,18 +152,26 @@ function killProcessTreeImpl(pid, signal, directKill, wasDetached) {
|
|
|
146
152
|
directKill();
|
|
147
153
|
}
|
|
148
154
|
function streamFromNode(pipe) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
155
|
+
let collected;
|
|
156
|
+
let readerClaimed = false;
|
|
157
|
+
const collect = () => {
|
|
158
|
+
if (readerClaimed) {
|
|
159
|
+
return Promise.reject(new TypeError("Subprocess output is already consumed by a reader"));
|
|
153
160
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
161
|
+
collected ??= new Promise((resolve) => {
|
|
162
|
+
if (!pipe) {
|
|
163
|
+
resolve(Buffer.alloc(0));
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const chunks = [];
|
|
167
|
+
pipe.on("data", (chunk) => {
|
|
168
|
+
chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : chunk);
|
|
169
|
+
});
|
|
170
|
+
pipe.on("end", () => resolve(Buffer.concat(chunks)));
|
|
171
|
+
pipe.on("error", () => resolve(Buffer.concat(chunks)));
|
|
157
172
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
173
|
+
return collected;
|
|
174
|
+
};
|
|
161
175
|
const toWebReadable = () => {
|
|
162
176
|
if (!pipe) {
|
|
163
177
|
return new ReadableStream({
|
|
@@ -190,13 +204,17 @@ function streamFromNode(pipe) {
|
|
|
190
204
|
};
|
|
191
205
|
return {
|
|
192
206
|
async text() {
|
|
193
|
-
return (await
|
|
207
|
+
return (await collect()).toString("utf-8");
|
|
194
208
|
},
|
|
195
209
|
async bytes() {
|
|
196
|
-
const b = await
|
|
210
|
+
const b = await collect();
|
|
197
211
|
return new Uint8Array(b.buffer, b.byteOffset, b.byteLength);
|
|
198
212
|
},
|
|
199
213
|
getReader() {
|
|
214
|
+
if (readerClaimed || collected) {
|
|
215
|
+
throw new TypeError("Subprocess output is already consumed");
|
|
216
|
+
}
|
|
217
|
+
readerClaimed = true;
|
|
200
218
|
return toWebReadable().getReader();
|
|
201
219
|
}
|
|
202
220
|
};
|
|
@@ -282,25 +300,48 @@ function bunSpawn(cmd, options) {
|
|
|
282
300
|
if (bun?.spawn) {
|
|
283
301
|
const mergedEnv2 = mergeEnvForChild(options?.env, options?.envOverrides);
|
|
284
302
|
const spawnOpts = { ...options };
|
|
303
|
+
delete spawnOpts.killProcessTree;
|
|
285
304
|
if (mergedEnv2 !== undefined)
|
|
286
305
|
spawnOpts.env = mergedEnv2;
|
|
287
|
-
if (options?.timeout && options.timeout > 0) {
|
|
306
|
+
if (options?.timeout && options.timeout > 0 && options.killProcessTree !== true) {
|
|
288
307
|
spawnOpts.killSignal = "SIGKILL";
|
|
289
308
|
}
|
|
309
|
+
if (options?.killProcessTree === true) {
|
|
310
|
+
delete spawnOpts.timeout;
|
|
311
|
+
delete spawnOpts.killSignal;
|
|
312
|
+
spawnOpts.detached = true;
|
|
313
|
+
}
|
|
290
314
|
const proc2 = bun.spawn(cmd, spawnOpts);
|
|
315
|
+
const killBunProcess = (sig) => {
|
|
316
|
+
if (options?.killProcessTree) {
|
|
317
|
+
killProcessTreeImpl(proc2.pid, sig, () => proc2.kill(sig), true);
|
|
318
|
+
} else {
|
|
319
|
+
proc2.kill(sig);
|
|
320
|
+
}
|
|
321
|
+
};
|
|
322
|
+
let timeoutHandle2;
|
|
323
|
+
if (options?.killProcessTree === true && options.timeout && options.timeout > 0) {
|
|
324
|
+
timeoutHandle2 = setTimeout(() => {
|
|
325
|
+
try {
|
|
326
|
+
killBunProcess("SIGKILL");
|
|
327
|
+
} catch {}
|
|
328
|
+
}, options.timeout);
|
|
329
|
+
if (typeof timeoutHandle2.unref === "function")
|
|
330
|
+
timeoutHandle2.unref();
|
|
331
|
+
}
|
|
332
|
+
const exited2 = proc2.exited.finally(() => {
|
|
333
|
+
if (timeoutHandle2 !== undefined)
|
|
334
|
+
clearTimeout(timeoutHandle2);
|
|
335
|
+
});
|
|
291
336
|
return {
|
|
292
337
|
stdout: streamFromBun(proc2.stdout),
|
|
293
338
|
stderr: streamFromBun(proc2.stderr),
|
|
294
|
-
exited:
|
|
339
|
+
exited: exited2,
|
|
295
340
|
get exitCode() {
|
|
296
341
|
return proc2.exitCode;
|
|
297
342
|
},
|
|
298
343
|
kill(sig) {
|
|
299
|
-
|
|
300
|
-
killProcessTreeImpl(proc2.pid, sig, () => proc2.kill(sig), false);
|
|
301
|
-
} else {
|
|
302
|
-
proc2.kill(sig);
|
|
303
|
-
}
|
|
344
|
+
killBunProcess(sig);
|
|
304
345
|
}
|
|
305
346
|
};
|
|
306
347
|
}
|