opencode-swarm 7.166.0 → 7.166.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{coder-settlement-ydg2jfrk.js → coder-settlement-x0h3h6vd.js} +8 -8
- package/dist/cli/{config-doctor-drqx6tzc.js → config-doctor-pjcjeh8f.js} +5 -5
- package/dist/cli/{core-x6sftfwt.js → core-v11pd1yk.js} +4 -4
- package/dist/cli/{curator-drift-2vwtkegg.js → curator-drift-jpdfwae9.js} +3 -3
- package/dist/cli/{curator-llm-factory-7znajprp.js → curator-llm-factory-da5q3gg6.js} +26 -26
- package/dist/cli/{curator-kg2h8jjf.js → curator-ssvd7evd.js} +26 -26
- package/dist/cli/{dispatch-c7xjt7js.js → dispatch-591v13pp.js} +3 -3
- package/dist/cli/{evidence-summary-service-ry5ebnmq.js → evidence-summary-service-mw6tnsp9.js} +10 -10
- package/dist/cli/{gate-evidence-qgeceqy8.js → gate-evidence-jymaxb82.js} +6 -6
- package/dist/cli/{guardrail-explain-jdv4n2j3.js → guardrail-explain-eva1yrtf.js} +27 -27
- package/dist/cli/{guardrail-log-s7c3rpde.js → guardrail-log-kzq2sktb.js} +6 -6
- package/dist/cli/{guardrail-reset-4nmy7xas.js → guardrail-reset-ea1g3g7d.js} +26 -26
- package/dist/cli/{hive-promoter-w5tsgttc.js → hive-promoter-ghjbgsms.js} +26 -26
- package/dist/cli/{index-hrkamw9q.js → index-066xxa4q.js} +3 -3
- package/dist/cli/{index-qkq56zyr.js → index-0g5v4s0x.js} +59 -8
- package/dist/cli/{index-a0d4fp6r.js → index-0tc0pcmh.js} +1 -1
- package/dist/cli/{index-359djbj1.js → index-13egyjgv.js} +5 -5
- package/dist/cli/{index-8bdk7124.js → index-1zqf2pny.js} +1 -1
- package/dist/cli/{index-8d90gzaz.js → index-2sqgbmtq.js} +1 -1
- package/dist/cli/{index-30f4fe30.js → index-2y4kargd.js} +1 -1
- package/dist/cli/{index-an89qzd9.js → index-399nq780.js} +522 -636
- package/dist/cli/{index-ejf6w8vw.js → index-3tyym20r.js} +2 -2
- package/dist/cli/{index-mg43w8p2.js → index-52xdezsh.js} +12 -3
- package/dist/cli/{index-a5w71m8f.js → index-6rff2h8x.js} +1 -1
- package/dist/cli/{index-p04pa9c9.js → index-8fr2wn18.js} +2 -2
- package/dist/cli/{index-anxs69ad.js → index-bfr392e7.js} +1 -1
- package/dist/cli/{index-fywshabz.js → index-bkd3450m.js} +4 -4
- package/dist/cli/{index-289epdpc.js → index-crjx4sx0.js} +28 -28
- package/dist/cli/{index-z6xqpmqg.js → index-ee6ydtfe.js} +1 -1
- package/dist/cli/{index-2rm5x9ps.js → index-fc1dqzjp.js} +2 -2
- package/dist/cli/{index-4mpdy32j.js → index-gerkwyrr.js} +1 -1
- package/dist/cli/{index-9hy5q7gp.js → index-gr8ppbq3.js} +2 -2
- package/dist/cli/{index-rkn17q5e.js → index-j29nkq5d.js} +5 -5
- package/dist/cli/{index-2dvk153d.js → index-k5w284js.js} +5 -5
- package/dist/cli/{index-apxaa755.js → index-nph5g4em.js} +3 -3
- package/dist/cli/{index-52jfm5s0.js → index-w11whwn3.js} +2 -2
- package/dist/cli/{index-nb924ar6.js → index-wf12wckd.js} +2 -2
- package/dist/cli/{index-czr3jcg6.js → index-xezfx7ge.js} +1 -1
- package/dist/cli/{index-8m12y79g.js → index-xwkn5hse.js} +2 -2
- package/dist/cli/{index-bw7r2b2m.js → index-ybcxvv17.js} +1 -1
- package/dist/cli/{index-8n62bphd.js → index-yt25kpvz.js} +2 -2
- package/dist/cli/{index-jc9cxh90.js → index-zha9bdj9.js} +4 -4
- package/dist/cli/index-zpsr8rpc.js +68 -0
- package/dist/cli/index.js +26 -26
- package/dist/cli/{knowledge-escalator-xdzmr31d.js → knowledge-escalator-3pjed4tq.js} +10 -10
- package/dist/cli/{knowledge-events-1t1t0bv7.js → knowledge-events-a5dwkg30.js} +8 -8
- package/dist/cli/{knowledge-store-m2snb0xg.js → knowledge-store-h85efsak.js} +1 -1
- package/dist/cli/{knowledge-validator-tf7yq2pd.js → knowledge-validator-76qrf1ev.js} +2 -2
- package/dist/cli/{model-preflight-3s1c0zpc.js → model-preflight-b3b5pgsc.js} +2 -2
- package/dist/cli/{pending-delegations-jr8hwxrz.js → pending-delegations-zgwfqfac.js} +5 -5
- package/dist/cli/{pr-subscriptions-ca1xmf9r.js → pr-subscriptions-fzy3ks1k.js} +5 -5
- package/dist/cli/{pr-workflow-gate-fb1dj0zx.js → pr-workflow-gate-1gtsn7f0.js} +26 -26
- package/dist/cli/{scan-cursor-3gdvy0ym.js → scan-cursor-ahwkxa8j.js} +2 -2
- package/dist/cli/{schema-mzb1354k.js → schema-27sedbfk.js} +3 -3
- package/dist/cli/{scope-persistence-c4n21b5n.js → scope-persistence-q792yfxh.js} +7 -7
- package/dist/cli/{skill-generator-dvpvwt8k.js → skill-generator-g8wbjw6v.js} +11 -11
- package/dist/cli/{snapshot-coordination-init-g7v63zcm.js → snapshot-coordination-init-y6spakwm.js} +26 -26
- package/dist/cli/{worktree-collision-ownership-k15qrpy9.js → worktree-collision-ownership-pmpnftkd.js} +6 -6
- package/dist/cli/{worktree-isolation-y7ec1pm5.js → worktree-isolation-4053n0px.js} +26 -26
- package/dist/git/pr.d.ts +4 -2
- package/dist/git/safe-ref.d.ts +51 -0
- package/dist/index.js +154 -154
- package/dist/tools/co-change-analyzer.d.ts +7 -0
- package/dist/tools/gh-evidence.d.ts +15 -8
- package/dist/tools/pkg-audit.d.ts +23 -0
- package/dist/utils/gh-executable.d.ts +106 -0
- package/dist/utils/merge.d.ts +26 -0
- package/package.json +1 -1
- package/dist/cli/index-zjygnfay.js +0 -33
|
@@ -7,43 +7,43 @@ import {
|
|
|
7
7
|
isHiveEligible,
|
|
8
8
|
promoteFromSwarm,
|
|
9
9
|
promoteToHive
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-399nq780.js";
|
|
11
|
+
import"./index-2sqgbmtq.js";
|
|
12
12
|
import"./index-hvk3zs62.js";
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
13
|
+
import"./index-gr8ppbq3.js";
|
|
14
|
+
import"./index-8fr2wn18.js";
|
|
15
|
+
import"./index-0g5v4s0x.js";
|
|
16
16
|
import"./index-17yszqs5.js";
|
|
17
17
|
import"./index-txdagbh7.js";
|
|
18
18
|
import"./index-cw912re7.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
19
|
+
import"./index-066xxa4q.js";
|
|
20
|
+
import"./index-13egyjgv.js";
|
|
21
|
+
import"./index-ybcxvv17.js";
|
|
22
22
|
import"./index-70ha9e09.js";
|
|
23
23
|
import"./index-8hqkrd2j.js";
|
|
24
24
|
import"./index-9ss2m4rs.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-xezfx7ge.js";
|
|
26
26
|
import"./index-zsrtt42s.js";
|
|
27
|
-
import"./index-
|
|
27
|
+
import"./index-k5w284js.js";
|
|
28
28
|
import"./index-6chhqq2n.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-1zqf2pny.js";
|
|
30
30
|
import"./index-b43rt5ph.js";
|
|
31
31
|
import"./index-q7sjgr1y.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
32
|
+
import"./index-yt25kpvz.js";
|
|
33
|
+
import"./index-fc1dqzjp.js";
|
|
34
|
+
import"./index-w11whwn3.js";
|
|
35
|
+
import"./index-zha9bdj9.js";
|
|
36
|
+
import"./index-bfr392e7.js";
|
|
37
|
+
import"./index-ee6ydtfe.js";
|
|
38
38
|
import"./index-p612v1mv.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-6rff2h8x.js";
|
|
40
40
|
import"./index-c20gf089.js";
|
|
41
41
|
import"./index-rtry5xyf.js";
|
|
42
|
-
import"./index-
|
|
42
|
+
import"./index-nph5g4em.js";
|
|
43
43
|
import"./index-3qf1vxtb.js";
|
|
44
44
|
import"./index-n832052r.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
45
|
+
import"./index-xwkn5hse.js";
|
|
46
|
+
import"./index-2y4kargd.js";
|
|
47
47
|
import"./index-2v17wb75.js";
|
|
48
48
|
import"./index-79sr3fd1.js";
|
|
49
49
|
import"./index-jx9f4ke1.js";
|
|
@@ -53,7 +53,7 @@ import"./index-n4fzmqz8.js";
|
|
|
53
53
|
import"./index-axf65x87.js";
|
|
54
54
|
import {
|
|
55
55
|
resolveHiveKnowledgePath
|
|
56
|
-
} from "./index-
|
|
56
|
+
} from "./index-bkd3450m.js";
|
|
57
57
|
import"./index-ae75rja9.js";
|
|
58
58
|
import"./index-a7rw4g4s.js";
|
|
59
59
|
import"./index-7qefgq4j.js";
|
|
@@ -61,12 +61,12 @@ import"./index-edm41q4j.js";
|
|
|
61
61
|
import"./index-gy0nyfbw.js";
|
|
62
62
|
import"./index-hwj25q9r.js";
|
|
63
63
|
import"./index-7g4c7s5r.js";
|
|
64
|
-
import"./index-
|
|
64
|
+
import"./index-52xdezsh.js";
|
|
65
65
|
import"./index-9e6fdz2h.js";
|
|
66
66
|
import"./index-4rhhvd1a.js";
|
|
67
|
-
import"./index-
|
|
68
|
-
import"./index-
|
|
69
|
-
import"./index-
|
|
67
|
+
import"./index-wf12wckd.js";
|
|
68
|
+
import"./index-0tc0pcmh.js";
|
|
69
|
+
import"./index-zpsr8rpc.js";
|
|
70
70
|
import"./index-bk5tah7q.js";
|
|
71
71
|
import"./index-bpmtbmy9.js";
|
|
72
72
|
import"./index-q1r1cfww.js";
|
|
@@ -5,18 +5,18 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
effectiveRetrievalOutcomes,
|
|
7
7
|
readAuthoritativeKnowledgeCounterRollups
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-zha9bdj9.js";
|
|
9
9
|
import {
|
|
10
10
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
11
11
|
validateSkillPath
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-6rff2h8x.js";
|
|
13
13
|
import {
|
|
14
14
|
computeOutcomeSignal,
|
|
15
15
|
readKnowledge,
|
|
16
16
|
resolveHiveKnowledgePath,
|
|
17
17
|
resolveSwarmKnowledgePath,
|
|
18
18
|
transactKnowledge
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-bkd3450m.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalRootKeyFresh
|
|
22
22
|
} from "./index-7qefgq4j.js";
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
readTaskEvidence,
|
|
24
24
|
readTaskEvidenceRaw,
|
|
25
25
|
sanitizeTaskId
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-yt25kpvz.js";
|
|
27
27
|
import {
|
|
28
28
|
estimateCharsForTokens,
|
|
29
29
|
estimateTokens,
|
|
30
30
|
readSwarmFileAsync,
|
|
31
31
|
validateSwarmPath
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-bfr392e7.js";
|
|
33
33
|
import {
|
|
34
34
|
bunHash,
|
|
35
35
|
bunWrite,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
replayFromLedgerWithStatus,
|
|
58
58
|
takeSnapshotEvent,
|
|
59
59
|
takeSnapshotWithRetry
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-2y4kargd.js";
|
|
61
61
|
import {
|
|
62
62
|
appendCoreEventSync
|
|
63
63
|
} from "./index-2v17wb75.js";
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
} from "./index-hwj25q9r.js";
|
|
94
94
|
import {
|
|
95
95
|
PlanSchema
|
|
96
|
-
} from "./index-
|
|
96
|
+
} from "./index-52xdezsh.js";
|
|
97
97
|
import {
|
|
98
98
|
GIT_BINARY_ENV_VAR,
|
|
99
99
|
describeGitResolution,
|
|
@@ -316,6 +316,33 @@ function transientBackoff(attempt) {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
+
// src/git/safe-ref.ts
|
|
320
|
+
class UnsafeGitRefError extends Error {
|
|
321
|
+
ref;
|
|
322
|
+
context;
|
|
323
|
+
constructor(ref, context) {
|
|
324
|
+
super(`Refused unsafe git ref "${ref}" at ${context}: a ref argument ` + 'starting with "-" can be parsed by git as an option (issue #2265/#2476)');
|
|
325
|
+
this.ref = ref;
|
|
326
|
+
this.context = context;
|
|
327
|
+
this.name = "UnsafeGitRefError";
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
function isSafeGitRefArg(value) {
|
|
331
|
+
if (value.length === 0)
|
|
332
|
+
return false;
|
|
333
|
+
for (const side of value.split("..")) {
|
|
334
|
+
if (side.startsWith("-"))
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
return true;
|
|
338
|
+
}
|
|
339
|
+
function assertSafeGitRefArg(value, context) {
|
|
340
|
+
if (!isSafeGitRefArg(value)) {
|
|
341
|
+
throw new UnsafeGitRefError(value, context);
|
|
342
|
+
}
|
|
343
|
+
return value;
|
|
344
|
+
}
|
|
345
|
+
|
|
319
346
|
// src/git/branch.ts
|
|
320
347
|
var GIT_TIMEOUT_MS = 30000;
|
|
321
348
|
var GIT_MAX_BUFFER_BYTES = 5 * 1024 * 1024;
|
|
@@ -519,6 +546,8 @@ async function resetToRemoteBranch(cwd, options) {
|
|
|
519
546
|
warnings: []
|
|
520
547
|
};
|
|
521
548
|
}
|
|
549
|
+
assertSafeGitRefArg(currentBranch, "resetToRemoteBranch currentBranch");
|
|
550
|
+
assertSafeGitRefArg(defaultRemoteBranch, "resetToRemoteBranch defaultRemoteBranch");
|
|
522
551
|
const targetBranch = `origin/${defaultRemoteBranch}`;
|
|
523
552
|
if (currentBranch === "HEAD") {
|
|
524
553
|
return {
|
|
@@ -631,7 +660,12 @@ async function resetToRemoteBranch(cwd, options) {
|
|
|
631
660
|
continue;
|
|
632
661
|
}
|
|
633
662
|
try {
|
|
634
|
-
gitExec([
|
|
663
|
+
gitExec([
|
|
664
|
+
"branch",
|
|
665
|
+
"-d",
|
|
666
|
+
"--",
|
|
667
|
+
assertSafeGitRefArg(trimmedLine, "resetToRemoteBranch prune merged branch")
|
|
668
|
+
], cwd);
|
|
635
669
|
prunedBranches.push(trimmedLine);
|
|
636
670
|
} catch {
|
|
637
671
|
warnings.push(`Could not safely delete branch: ${trimmedLine}`);
|
|
@@ -653,7 +687,12 @@ async function resetToRemoteBranch(cwd, options) {
|
|
|
653
687
|
const parts = trimmedLine.split(/\s+/);
|
|
654
688
|
const branchName = parts[0];
|
|
655
689
|
try {
|
|
656
|
-
gitExec([
|
|
690
|
+
gitExec([
|
|
691
|
+
"branch",
|
|
692
|
+
"-d",
|
|
693
|
+
"--",
|
|
694
|
+
assertSafeGitRefArg(branchName, "resetToRemoteBranch prune gone branch")
|
|
695
|
+
], cwd);
|
|
657
696
|
prunedBranches.push(branchName);
|
|
658
697
|
} catch {
|
|
659
698
|
warnings.push(`Could not delete gone branch: ${branchName}`);
|
|
@@ -702,6 +741,8 @@ async function resetToMainAfterMerge(cwd, options) {
|
|
|
702
741
|
};
|
|
703
742
|
}
|
|
704
743
|
const currentBranch = getCurrentBranch(cwd);
|
|
744
|
+
assertSafeGitRefArg(currentBranch, "resetToMainAfterMerge currentBranch");
|
|
745
|
+
assertSafeGitRefArg(defaultBranch, "resetToMainAfterMerge defaultBranch");
|
|
705
746
|
const targetBranch = `origin/${defaultBranch}`;
|
|
706
747
|
if (currentBranch === "HEAD") {
|
|
707
748
|
return {
|
|
@@ -834,7 +875,12 @@ async function resetToMainAfterMerge(cwd, options) {
|
|
|
834
875
|
const isMerged = mergedOutput.split(`
|
|
835
876
|
`).some((line) => line.trim() === previousBranch || line.trim() === `* ${previousBranch}`);
|
|
836
877
|
if (isMerged) {
|
|
837
|
-
_internals.gitExec([
|
|
878
|
+
_internals.gitExec([
|
|
879
|
+
"branch",
|
|
880
|
+
"-d",
|
|
881
|
+
"--",
|
|
882
|
+
assertSafeGitRefArg(previousBranch, "resetToMainAfterMerge previousBranch")
|
|
883
|
+
], cwd);
|
|
838
884
|
branchDeleted = true;
|
|
839
885
|
} else {
|
|
840
886
|
warnings.push(`Branch ${previousBranch} is not merged into ${defaultBranch} \u2014 keeping it`);
|
|
@@ -854,7 +900,12 @@ async function resetToMainAfterMerge(cwd, options) {
|
|
|
854
900
|
continue;
|
|
855
901
|
}
|
|
856
902
|
try {
|
|
857
|
-
_internals.gitExec([
|
|
903
|
+
_internals.gitExec([
|
|
904
|
+
"branch",
|
|
905
|
+
"-d",
|
|
906
|
+
"--",
|
|
907
|
+
assertSafeGitRefArg(trimmedLine, "resetToMainAfterMerge prune branch")
|
|
908
|
+
], cwd);
|
|
858
909
|
} catch {
|
|
859
910
|
warnings.push(`Could not prune branch: ${trimmedLine}`);
|
|
860
911
|
}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
queryHistoricalOutcomes,
|
|
4
4
|
readKnowledgeEvents,
|
|
5
5
|
recordKnowledgeEvent
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-zha9bdj9.js";
|
|
7
7
|
import {
|
|
8
8
|
jaccardBigram,
|
|
9
9
|
readKnowledge,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveSwarmKnowledgePath,
|
|
12
12
|
transactKnowledge,
|
|
13
13
|
wordBigrams
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-bkd3450m.js";
|
|
15
15
|
import {
|
|
16
16
|
init_knowledge_types,
|
|
17
17
|
isActiveStatus
|
|
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
224
224
|
alreadyInactive: true
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
227
|
+
const { quarantineEntry } = await import("./knowledge-validator-76qrf1ev.js");
|
|
228
228
|
let policyConfig;
|
|
229
229
|
try {
|
|
230
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
231
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
230
|
+
const { KnowledgeConfigSchema } = await import("./schema-27sedbfk.js");
|
|
231
|
+
const { loadPluginConfigWithMeta } = await import("./index-j29nkq5d.js");
|
|
232
232
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
233
233
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
234
234
|
} catch {
|