opencode-swarm 7.166.0 → 7.166.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/background/candidate-contract.d.ts +14 -0
- package/dist/background/pr-subscriptions.d.ts +33 -1
- package/dist/background/workspace-snapshot.d.ts +41 -0
- package/dist/cli/{coder-settlement-ydg2jfrk.js → coder-settlement-pv86n7n4.js} +14 -14
- package/dist/cli/{config-doctor-drqx6tzc.js → config-doctor-fy1aytwt.js} +5 -5
- package/dist/cli/{core-x6sftfwt.js → core-1d9vqbt4.js} +4 -4
- package/dist/cli/{curation-policy-jtzwz6bc.js → curation-policy-gnpgc3z7.js} +7 -5
- package/dist/cli/{curator-kg2h8jjf.js → curator-a4rbehfr.js} +40 -40
- package/dist/cli/{curator-drift-2vwtkegg.js → curator-drift-efmgp1v2.js} +6 -6
- package/dist/cli/curator-llm-factory-cwg62ynw.js +70 -0
- package/dist/cli/{dispatch-c7xjt7js.js → dispatch-tmb929w8.js} +3 -3
- package/dist/cli/{evidence-summary-service-ry5ebnmq.js → evidence-summary-service-dvp1kbm4.js} +18 -18
- package/dist/cli/{gate-evidence-qgeceqy8.js → gate-evidence-qf27gdfx.js} +10 -9
- package/dist/cli/guardrail-explain-zskpzgsr.js +71 -0
- package/dist/cli/guardrail-log-qhw3knjt.js +23 -0
- package/dist/cli/{guardrail-reset-4nmy7xas.js → guardrail-reset-84ydxdg3.js} +40 -40
- package/dist/cli/hive-promoter-y2daybf6.js +85 -0
- package/dist/cli/{index-mg43w8p2.js → index-0a0jsbhg.js} +16 -7
- package/dist/cli/{index-a0d4fp6r.js → index-0tc0pcmh.js} +1 -1
- package/dist/cli/{index-a7rw4g4s.js → index-14z9en94.js} +3 -3
- package/dist/cli/{index-gy0nyfbw.js → index-19hjpqsy.js} +61 -16
- package/dist/cli/{index-fywshabz.js → index-22sannyk.js} +7 -7
- package/dist/cli/{index-p04pa9c9.js → index-2n1v8ft1.js} +2 -2
- package/dist/cli/{index-jc9cxh90.js → index-3nww2vnx.js} +11 -11
- package/dist/cli/{index-9hy5q7gp.js → index-3wtfrjcx.js} +4 -4
- package/dist/cli/{index-anxs69ad.js → index-4kwxpnf8.js} +13 -6
- package/dist/cli/{index-8m12y79g.js → index-7mxrqy4r.js} +7 -7
- package/dist/cli/{index-jx9f4ke1.js → index-7pp8fz4j.js} +1 -1
- package/dist/cli/{index-a5w71m8f.js → index-8nv3bc9h.js} +4 -4
- package/dist/cli/{index-30f4fe30.js → index-9ccxcjdm.js} +4 -4
- package/dist/cli/{index-hwj25q9r.js → index-bks56jbg.js} +70 -53
- package/dist/cli/{index-8hqkrd2j.js → index-bysyj3z4.js} +1 -1
- package/dist/cli/{index-8n62bphd.js → index-c0eyq4rp.js} +4 -4
- package/dist/cli/{index-c20gf089.js → index-c23w8t46.js} +1 -1
- package/dist/cli/{index-8d90gzaz.js → index-d5qf7hvh.js} +3 -3
- package/dist/cli/{index-nb924ar6.js → index-e0bjbadr.js} +2 -2
- package/dist/cli/{index-z6xqpmqg.js → index-ee6ydtfe.js} +1 -1
- package/dist/cli/{index-axf65x87.js → index-fkk7x6sy.js} +5 -5
- package/dist/cli/{index-17yszqs5.js → index-ft1tnx0e.js} +1 -1
- package/dist/cli/{index-an89qzd9.js → index-gy55mc55.js} +749 -755
- package/dist/cli/{index-2dvk153d.js → index-hbjax6hy.js} +17 -17
- package/dist/cli/{index-2v17wb75.js → index-hgphhnrp.js} +2 -2
- package/dist/cli/{index-hvk3zs62.js → index-j81kpway.js} +1 -1
- package/dist/cli/{index-hrkamw9q.js → index-jgtje76m.js} +7 -7
- package/dist/cli/{index-czr3jcg6.js → index-jr6tppv9.js} +47 -13
- package/dist/cli/{index-apxaa755.js → index-kd68b6mg.js} +3 -3
- package/dist/cli/{index-289epdpc.js → index-nrdj94za.js} +42 -42
- package/dist/cli/{index-79sr3fd1.js → index-nthqfxzz.js} +2 -2
- package/dist/cli/{index-6chhqq2n.js → index-p0r5fn7y.js} +94 -3
- package/dist/cli/{index-2rm5x9ps.js → index-qmp4gxac.js} +2 -2
- package/dist/cli/{index-rkn17q5e.js → index-st47knj6.js} +5 -5
- package/dist/cli/{index-edm41q4j.js → index-sxe3t040.js} +2 -2
- package/dist/cli/{index-52jfm5s0.js → index-sxsyd7kf.js} +9 -9
- package/dist/cli/{index-359djbj1.js → index-ty0wg9yp.js} +5 -5
- package/dist/cli/{index-qkq56zyr.js → index-wz258yje.js} +69 -18
- package/dist/cli/{index-bw7r2b2m.js → index-x4azb6qj.js} +2 -2
- package/dist/cli/{index-8bdk7124.js → index-x8cvbkjs.js} +2 -2
- package/dist/cli/{index-aftapk6j.js → index-y3dtdn2f.js} +3 -3
- package/dist/cli/{index-4mpdy32j.js → index-ytsts0zj.js} +1 -1
- package/dist/cli/{index-ejf6w8vw.js → index-z1kmkh72.js} +2 -2
- package/dist/cli/index-zpsr8rpc.js +68 -0
- package/dist/cli/index.js +40 -40
- package/dist/cli/{knowledge-escalator-xdzmr31d.js → knowledge-escalator-aq7gzhpd.js} +15 -15
- package/dist/cli/{knowledge-events-1t1t0bv7.js → knowledge-events-9z5sskyv.js} +13 -13
- package/dist/cli/{knowledge-link-1zykfk1p.js → knowledge-link-ps2v4s18.js} +6 -4
- package/dist/cli/{knowledge-store-m2snb0xg.js → knowledge-store-1hzt2a0t.js} +7 -5
- package/dist/cli/{knowledge-validator-tf7yq2pd.js → knowledge-validator-xe1fza7c.js} +9 -7
- package/dist/cli/{model-preflight-3s1c0zpc.js → model-preflight-b3b5pgsc.js} +2 -2
- package/dist/cli/{pending-delegations-jr8hwxrz.js → pending-delegations-0nfjg7vp.js} +13 -13
- package/dist/cli/{pr-subscriptions-ca1xmf9r.js → pr-subscriptions-8974hwa0.js} +19 -13
- package/dist/cli/{pr-workflow-gate-fb1dj0zx.js → pr-workflow-gate-xgak5wvz.js} +40 -40
- package/dist/cli/{runner-j3acybhs.js → runner-7zqbp81n.js} +8 -5
- package/dist/cli/{scan-cursor-3gdvy0ym.js → scan-cursor-hc4v0c90.js} +8 -6
- package/dist/cli/{schema-mzb1354k.js → schema-w1hsvw1h.js} +3 -3
- package/dist/cli/{scope-persistence-c4n21b5n.js → scope-persistence-k17003v4.js} +17 -16
- package/dist/cli/{skill-generator-dvpvwt8k.js → skill-generator-tbxgpc9x.js} +17 -17
- package/dist/cli/{snapshot-coordination-init-g7v63zcm.js → snapshot-coordination-init-vaf34wf0.js} +40 -40
- package/dist/cli/{telemetry-9h1z2w9d.js → telemetry-8qn4eag5.js} +5 -1
- package/dist/cli/{workspace-snapshot-6z9rk7xw.js → workspace-snapshot-y85jy6gs.js} +11 -1
- package/dist/cli/{worktree-collision-ownership-k15qrpy9.js → worktree-collision-ownership-r3jdke7h.js} +14 -14
- package/dist/cli/{worktree-isolation-y7ec1pm5.js → worktree-isolation-sa1tbqff.js} +40 -40
- package/dist/evidence/phase-participation.d.ts +1 -1
- package/dist/git/pr.d.ts +4 -2
- package/dist/git/safe-ref.d.ts +51 -0
- package/dist/hooks/guardrails/execution-stall.d.ts +10 -5
- package/dist/hooks/hive-promoter.d.ts +28 -5
- package/dist/hooks/repo-graph-builder.d.ts +14 -0
- package/dist/hooks/system-enhancer.d.ts +21 -0
- package/dist/index.js +250 -248
- package/dist/observability/catalog.d.ts +1 -1
- package/dist/session/snapshot-writer.d.ts +42 -0
- package/dist/telemetry.d.ts +31 -1
- 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/atomic-write.d.ts +32 -0
- package/dist/utils/gh-executable.d.ts +106 -0
- package/dist/utils/merge.d.ts +26 -0
- package/dist/utils/swarm-artifact-cache.d.ts +6 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-7znajprp.js +0 -70
- package/dist/cli/guardrail-explain-jdv4n2j3.js +0 -71
- package/dist/cli/guardrail-log-s7c3rpde.js +0 -23
- package/dist/cli/hive-promoter-w5tsgttc.js +0 -85
- package/dist/cli/index-zjygnfay.js +0 -33
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-4kwxpnf8.js";
|
|
5
5
|
import {
|
|
6
6
|
bunWrite
|
|
7
7
|
} from "./index-p612v1mv.js";
|
|
@@ -18,22 +18,22 @@ import {
|
|
|
18
18
|
releaseCoordinationLease,
|
|
19
19
|
transitionCoordinationState,
|
|
20
20
|
withCoordinationTransaction
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-7pp8fz4j.js";
|
|
22
22
|
import {
|
|
23
23
|
getProjectDb,
|
|
24
24
|
projectDbExists
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-y3dtdn2f.js";
|
|
26
26
|
import {
|
|
27
27
|
observeDelegationLedgerPressure
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-fkk7x6sy.js";
|
|
29
|
+
import {
|
|
30
|
+
EvidenceLockTimeoutError,
|
|
31
|
+
withEvidenceLock
|
|
32
|
+
} from "./index-sxe3t040.js";
|
|
29
33
|
import {
|
|
30
34
|
canonicalRootKeyFresh,
|
|
31
35
|
sameProjectRoot
|
|
32
36
|
} from "./index-7qefgq4j.js";
|
|
33
|
-
import {
|
|
34
|
-
EvidenceLockTimeoutError,
|
|
35
|
-
withEvidenceLock
|
|
36
|
-
} from "./index-edm41q4j.js";
|
|
37
37
|
import {
|
|
38
38
|
exports_external,
|
|
39
39
|
init_zod
|
|
@@ -4524,7 +4524,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
|
|
|
4524
4524
|
const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
|
|
4525
4525
|
if (candidates.length === 0)
|
|
4526
4526
|
return 0;
|
|
4527
|
-
const { transferCoderSettlementToBackground } = await import("./coder-settlement-
|
|
4527
|
+
const { transferCoderSettlementToBackground } = await import("./coder-settlement-pv86n7n4.js");
|
|
4528
4528
|
let transferred = 0;
|
|
4529
4529
|
for (const record of candidates) {
|
|
4530
4530
|
try {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
queryHistoricalOutcomes,
|
|
4
4
|
readKnowledgeEvents,
|
|
5
5
|
recordKnowledgeEvent
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-3nww2vnx.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-22sannyk.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-xe1fza7c.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-w1hsvw1h.js");
|
|
231
|
+
const { loadPluginConfigWithMeta } = await import("./index-st47knj6.js");
|
|
232
232
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
233
233
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
234
234
|
} catch {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EvaluationRunV1Schema,
|
|
4
4
|
GateAuditResultV1Schema,
|
|
5
5
|
getProtectedEvaluationRunIds
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-ft1tnx0e.js";
|
|
7
7
|
import {
|
|
8
8
|
validateWorkspaceRoot
|
|
9
9
|
} from "./index-cw912re7.js";
|
|
@@ -23,13 +23,13 @@ import {
|
|
|
23
23
|
readTaskEvidence,
|
|
24
24
|
readTaskEvidenceRaw,
|
|
25
25
|
sanitizeTaskId
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-c0eyq4rp.js";
|
|
27
27
|
import {
|
|
28
28
|
estimateCharsForTokens,
|
|
29
29
|
estimateTokens,
|
|
30
30
|
readSwarmFileAsync,
|
|
31
31
|
validateSwarmPath
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-4kwxpnf8.js";
|
|
33
33
|
import {
|
|
34
34
|
bunHash,
|
|
35
35
|
bunWrite,
|
|
@@ -57,10 +57,10 @@ import {
|
|
|
57
57
|
replayFromLedgerWithStatus,
|
|
58
58
|
takeSnapshotEvent,
|
|
59
59
|
takeSnapshotWithRetry
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-9ccxcjdm.js";
|
|
61
61
|
import {
|
|
62
62
|
appendCoreEventSync
|
|
63
|
-
} from "./index-
|
|
63
|
+
} from "./index-hgphhnrp.js";
|
|
64
64
|
import {
|
|
65
65
|
derivePlanId,
|
|
66
66
|
derivePlanIdentityHash,
|
|
@@ -68,32 +68,32 @@ import {
|
|
|
68
68
|
importCoordinationOnce,
|
|
69
69
|
listCoordinationStates,
|
|
70
70
|
transitionCoordinationState
|
|
71
|
-
} from "./index-
|
|
71
|
+
} from "./index-7pp8fz4j.js";
|
|
72
72
|
import {
|
|
73
73
|
DURABILITY_CLASSES,
|
|
74
74
|
getProjectDb,
|
|
75
75
|
projectDbExists,
|
|
76
76
|
withDurabilityClass
|
|
77
|
-
} from "./index-
|
|
78
|
-
import {
|
|
79
|
-
canonicalRootKeyFresh
|
|
80
|
-
} from "./index-7qefgq4j.js";
|
|
77
|
+
} from "./index-y3dtdn2f.js";
|
|
81
78
|
import {
|
|
82
79
|
assertProjectRoot,
|
|
83
80
|
tryAcquireLock,
|
|
84
81
|
withEvidenceLock
|
|
85
|
-
} from "./index-
|
|
82
|
+
} from "./index-sxe3t040.js";
|
|
86
83
|
import {
|
|
87
84
|
atomicWriteSwarmFileSync,
|
|
88
85
|
invalidateCachedArtifact,
|
|
89
86
|
readCachedParsedFile
|
|
90
|
-
} from "./index-
|
|
87
|
+
} from "./index-19hjpqsy.js";
|
|
91
88
|
import {
|
|
92
89
|
emit
|
|
93
|
-
} from "./index-
|
|
90
|
+
} from "./index-bks56jbg.js";
|
|
91
|
+
import {
|
|
92
|
+
canonicalRootKeyFresh
|
|
93
|
+
} from "./index-7qefgq4j.js";
|
|
94
94
|
import {
|
|
95
95
|
PlanSchema
|
|
96
|
-
} from "./index-
|
|
96
|
+
} from "./index-0a0jsbhg.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
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readKnowledge,
|
|
4
4
|
transactKnowledge
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-22sannyk.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveKnowledgeStoreDir
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-14z9en94.js";
|
|
9
9
|
import {
|
|
10
10
|
init_git_executable,
|
|
11
11
|
resolveGitExecutableAsync
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-4kwxpnf8.js";
|
|
5
5
|
import {
|
|
6
6
|
atomicWriteSwarmFileSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-19hjpqsy.js";
|
|
8
8
|
|
|
9
9
|
// src/hooks/delegation-gate/worktree-provisioning-owner.ts
|
|
10
10
|
import { createHash } from "crypto";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
loadDatabaseCtor
|
|
7
7
|
} from "./index-n4fzmqz8.js";
|
|
8
|
+
import {
|
|
9
|
+
atomicWriteSwarmFileSync
|
|
10
|
+
} from "./index-19hjpqsy.js";
|
|
8
11
|
import {
|
|
9
12
|
canonicalRootKeyFresh,
|
|
10
13
|
lexicalRootAliasKey
|
|
11
14
|
} from "./index-7qefgq4j.js";
|
|
12
|
-
import {
|
|
13
|
-
atomicWriteSwarmFileSync
|
|
14
|
-
} from "./index-gy0nyfbw.js";
|
|
15
15
|
|
|
16
16
|
// src/db/project-db.ts
|
|
17
17
|
import { existsSync, mkdirSync, unlinkSync } from "fs";
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
detectWindowsWrites,
|
|
15
15
|
getSharedClassifierGuardrailBlock,
|
|
16
16
|
resolveWriteTargets
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-gy55mc55.js";
|
|
18
18
|
import {
|
|
19
19
|
checkFileAuthority,
|
|
20
20
|
classifyFile,
|
|
21
21
|
isInDeclaredScope,
|
|
22
22
|
redactPath,
|
|
23
23
|
redactShellCommand
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-3wtfrjcx.js";
|
|
25
25
|
|
|
26
26
|
// src/services/guardrail-explain-service.ts
|
|
27
27
|
import path from "path";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
__esm
|
|
4
|
+
} from "./index-a76rekgs.js";
|
|
5
|
+
|
|
6
|
+
// src/utils/merge.ts
|
|
7
|
+
function scanOverrideForDangerousKeys(value, path, depth) {
|
|
8
|
+
if (depth >= MAX_MERGE_DEPTH)
|
|
9
|
+
return;
|
|
10
|
+
if (Array.isArray(value)) {
|
|
11
|
+
for (let i = 0;i < value.length; i++) {
|
|
12
|
+
scanOverrideForDangerousKeys(value[i], `${path}[${i}]`, depth + 1);
|
|
13
|
+
}
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (typeof value !== "object" || value === null)
|
|
17
|
+
return;
|
|
18
|
+
for (const key of Object.keys(value)) {
|
|
19
|
+
if (DANGEROUS_MERGE_KEYS.has(key)) {
|
|
20
|
+
throw new DangerousMergeKeyError(key, path);
|
|
21
|
+
}
|
|
22
|
+
scanOverrideForDangerousKeys(value[key], `${path}.${key}`, depth + 1);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function deepMergeInternal(base, override, depth, path) {
|
|
26
|
+
if (depth >= MAX_MERGE_DEPTH) {
|
|
27
|
+
throw new Error(`deepMerge exceeded maximum depth of ${MAX_MERGE_DEPTH}`);
|
|
28
|
+
}
|
|
29
|
+
const result = { ...base };
|
|
30
|
+
for (const key of Object.keys(override)) {
|
|
31
|
+
const baseVal = base[key];
|
|
32
|
+
const overrideVal = override[key];
|
|
33
|
+
if (typeof baseVal === "object" && baseVal !== null && typeof overrideVal === "object" && overrideVal !== null && !Array.isArray(baseVal) && !Array.isArray(overrideVal)) {
|
|
34
|
+
result[key] = deepMergeInternal(baseVal, overrideVal, depth + 1, `${path}.${key}`);
|
|
35
|
+
} else {
|
|
36
|
+
result[key] = overrideVal;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
function deepMerge(base, override) {
|
|
42
|
+
if (!base)
|
|
43
|
+
return override;
|
|
44
|
+
if (!override)
|
|
45
|
+
return base;
|
|
46
|
+
scanOverrideForDangerousKeys(override, "$", 0);
|
|
47
|
+
return deepMergeInternal(base, override, 0, "$");
|
|
48
|
+
}
|
|
49
|
+
var MAX_MERGE_DEPTH = 10, DANGEROUS_MERGE_KEYS, DangerousMergeKeyError;
|
|
50
|
+
var init_merge = __esm(() => {
|
|
51
|
+
DANGEROUS_MERGE_KEYS = new Set([
|
|
52
|
+
"__proto__",
|
|
53
|
+
"constructor",
|
|
54
|
+
"prototype"
|
|
55
|
+
]);
|
|
56
|
+
DangerousMergeKeyError = class DangerousMergeKeyError extends Error {
|
|
57
|
+
key;
|
|
58
|
+
path;
|
|
59
|
+
constructor(key, path) {
|
|
60
|
+
super(`deepMerge refused dangerous key "${key}" at "${path}": ` + "prototype-pollution carriers (__proto__/constructor/prototype) are never merged");
|
|
61
|
+
this.key = key;
|
|
62
|
+
this.path = path;
|
|
63
|
+
this.name = "DangerousMergeKeyError";
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export { MAX_MERGE_DEPTH, DangerousMergeKeyError, deepMerge, init_merge };
|
package/dist/cli/index.js
CHANGED
|
@@ -13,72 +13,72 @@ 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-
|
|
16
|
+
} from "./index-gy55mc55.js";
|
|
17
|
+
import"./index-d5qf7hvh.js";
|
|
18
|
+
import"./index-j81kpway.js";
|
|
19
|
+
import"./index-3wtfrjcx.js";
|
|
20
|
+
import"./index-2n1v8ft1.js";
|
|
21
|
+
import"./index-wz258yje.js";
|
|
22
|
+
import"./index-ft1tnx0e.js";
|
|
23
23
|
import"./index-txdagbh7.js";
|
|
24
24
|
import"./index-cw912re7.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
25
|
+
import"./index-jgtje76m.js";
|
|
26
|
+
import"./index-ty0wg9yp.js";
|
|
27
|
+
import"./index-x4azb6qj.js";
|
|
28
28
|
import"./index-70ha9e09.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-bysyj3z4.js";
|
|
30
30
|
import"./index-9ss2m4rs.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-jr6tppv9.js";
|
|
32
32
|
import"./index-zsrtt42s.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-hbjax6hy.js";
|
|
34
|
+
import"./index-p0r5fn7y.js";
|
|
35
|
+
import"./index-x8cvbkjs.js";
|
|
36
36
|
import"./index-b43rt5ph.js";
|
|
37
37
|
import"./index-q7sjgr1y.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-z6xqpmqg.js";
|
|
38
|
+
import"./index-c0eyq4rp.js";
|
|
39
|
+
import"./index-qmp4gxac.js";
|
|
40
|
+
import"./index-sxsyd7kf.js";
|
|
41
|
+
import"./index-3nww2vnx.js";
|
|
42
|
+
import"./index-4kwxpnf8.js";
|
|
44
43
|
import"./index-p612v1mv.js";
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
44
|
+
import"./index-8nv3bc9h.js";
|
|
45
|
+
import"./index-c23w8t46.js";
|
|
47
46
|
import"./index-rtry5xyf.js";
|
|
48
|
-
import"./index-
|
|
47
|
+
import"./index-kd68b6mg.js";
|
|
49
48
|
import"./index-3qf1vxtb.js";
|
|
50
49
|
import"./index-n832052r.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
54
|
-
import"./index-
|
|
55
|
-
import"./index-
|
|
56
|
-
import"./index-
|
|
50
|
+
import"./index-7mxrqy4r.js";
|
|
51
|
+
import"./index-9ccxcjdm.js";
|
|
52
|
+
import"./index-hgphhnrp.js";
|
|
53
|
+
import"./index-nthqfxzz.js";
|
|
54
|
+
import"./index-7pp8fz4j.js";
|
|
55
|
+
import"./index-y3dtdn2f.js";
|
|
57
56
|
import"./index-ry16d01s.js";
|
|
58
57
|
import"./index-n4fzmqz8.js";
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
58
|
+
import"./index-fkk7x6sy.js";
|
|
59
|
+
import"./index-22sannyk.js";
|
|
61
60
|
import"./index-ae75rja9.js";
|
|
62
|
-
import"./index-
|
|
61
|
+
import"./index-14z9en94.js";
|
|
62
|
+
import"./index-sxe3t040.js";
|
|
63
|
+
import"./index-19hjpqsy.js";
|
|
64
|
+
import"./index-bks56jbg.js";
|
|
63
65
|
import"./index-7qefgq4j.js";
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-gy0nyfbw.js";
|
|
66
|
-
import"./index-hwj25q9r.js";
|
|
66
|
+
import"./index-ee6ydtfe.js";
|
|
67
67
|
import"./index-7g4c7s5r.js";
|
|
68
|
-
import"./index-
|
|
68
|
+
import"./index-0a0jsbhg.js";
|
|
69
69
|
import"./index-9e6fdz2h.js";
|
|
70
70
|
import"./index-4rhhvd1a.js";
|
|
71
71
|
import {
|
|
72
72
|
init_package,
|
|
73
73
|
package_default
|
|
74
|
-
} from "./index-
|
|
74
|
+
} from "./index-e0bjbadr.js";
|
|
75
75
|
import {
|
|
76
76
|
DEFAULT_AGENT_CONFIGS,
|
|
77
77
|
init_constants
|
|
78
|
-
} from "./index-
|
|
79
|
-
import"./index-zjygnfay.js";
|
|
78
|
+
} from "./index-0tc0pcmh.js";
|
|
80
79
|
import"./index-bk5tah7q.js";
|
|
81
80
|
import"./index-bpmtbmy9.js";
|
|
81
|
+
import"./index-zpsr8rpc.js";
|
|
82
82
|
import"./index-q1r1cfww.js";
|
|
83
83
|
import"./index-yzjaj53h.js";
|
|
84
84
|
import"./index-zgwm4ryv.js";
|
|
@@ -9,31 +9,31 @@ import {
|
|
|
9
9
|
maybeEscalateOnViolation,
|
|
10
10
|
maybeQuarantineOnContradiction,
|
|
11
11
|
readRecentEscalations
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-z6xqpmqg.js";
|
|
12
|
+
} from "./index-ty0wg9yp.js";
|
|
13
|
+
import"./index-3nww2vnx.js";
|
|
14
|
+
import"./index-4kwxpnf8.js";
|
|
16
15
|
import"./index-p612v1mv.js";
|
|
17
|
-
import"./index-
|
|
16
|
+
import"./index-kd68b6mg.js";
|
|
18
17
|
import"./index-3qf1vxtb.js";
|
|
19
18
|
import"./index-n832052r.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
19
|
+
import"./index-fkk7x6sy.js";
|
|
20
|
+
import"./index-22sannyk.js";
|
|
22
21
|
import"./index-ae75rja9.js";
|
|
23
|
-
import"./index-
|
|
22
|
+
import"./index-14z9en94.js";
|
|
23
|
+
import"./index-sxe3t040.js";
|
|
24
|
+
import"./index-19hjpqsy.js";
|
|
25
|
+
import"./index-bks56jbg.js";
|
|
24
26
|
import"./index-7qefgq4j.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-gy0nyfbw.js";
|
|
27
|
-
import"./index-hwj25q9r.js";
|
|
27
|
+
import"./index-ee6ydtfe.js";
|
|
28
28
|
import"./index-7g4c7s5r.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-0a0jsbhg.js";
|
|
30
30
|
import"./index-9e6fdz2h.js";
|
|
31
31
|
import"./index-4rhhvd1a.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-zjygnfay.js";
|
|
32
|
+
import"./index-e0bjbadr.js";
|
|
33
|
+
import"./index-0tc0pcmh.js";
|
|
35
34
|
import"./index-bk5tah7q.js";
|
|
36
35
|
import"./index-bpmtbmy9.js";
|
|
36
|
+
import"./index-zpsr8rpc.js";
|
|
37
37
|
import"./index-zgwm4ryv.js";
|
|
38
38
|
import"./index-a76rekgs.js";
|
|
39
39
|
export {
|
|
@@ -29,29 +29,29 @@ import {
|
|
|
29
29
|
resolveKnowledgeCounterBaselinePath,
|
|
30
30
|
resolveKnowledgeEventsPath,
|
|
31
31
|
resolveLegacyApplicationLogPath
|
|
32
|
-
} from "./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-z6xqpmqg.js";
|
|
32
|
+
} from "./index-3nww2vnx.js";
|
|
33
|
+
import"./index-4kwxpnf8.js";
|
|
35
34
|
import"./index-p612v1mv.js";
|
|
36
|
-
import"./index-
|
|
35
|
+
import"./index-kd68b6mg.js";
|
|
37
36
|
import"./index-3qf1vxtb.js";
|
|
38
37
|
import"./index-n832052r.js";
|
|
39
|
-
import"./index-
|
|
38
|
+
import"./index-fkk7x6sy.js";
|
|
40
39
|
import"./index-ae75rja9.js";
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-14z9en94.js";
|
|
41
|
+
import"./index-sxe3t040.js";
|
|
42
|
+
import"./index-19hjpqsy.js";
|
|
43
|
+
import"./index-bks56jbg.js";
|
|
42
44
|
import"./index-7qefgq4j.js";
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-gy0nyfbw.js";
|
|
45
|
-
import"./index-hwj25q9r.js";
|
|
45
|
+
import"./index-ee6ydtfe.js";
|
|
46
46
|
import"./index-7g4c7s5r.js";
|
|
47
|
-
import"./index-
|
|
47
|
+
import"./index-0a0jsbhg.js";
|
|
48
48
|
import"./index-9e6fdz2h.js";
|
|
49
49
|
import"./index-4rhhvd1a.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-zjygnfay.js";
|
|
50
|
+
import"./index-e0bjbadr.js";
|
|
51
|
+
import"./index-0tc0pcmh.js";
|
|
53
52
|
import"./index-bk5tah7q.js";
|
|
54
53
|
import"./index-bpmtbmy9.js";
|
|
54
|
+
import"./index-zpsr8rpc.js";
|
|
55
55
|
import"./index-zgwm4ryv.js";
|
|
56
56
|
import"./index-a76rekgs.js";
|
|
57
57
|
export {
|
|
@@ -12,13 +12,15 @@ import {
|
|
|
12
12
|
resolveLinkDir,
|
|
13
13
|
sanitizeLinkId,
|
|
14
14
|
writeLinkPointer
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-14z9en94.js";
|
|
16
|
+
import"./index-sxe3t040.js";
|
|
17
|
+
import"./index-19hjpqsy.js";
|
|
18
|
+
import"./index-bks56jbg.js";
|
|
16
19
|
import"./index-7qefgq4j.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-gy0nyfbw.js";
|
|
19
|
-
import"./index-hwj25q9r.js";
|
|
20
|
+
import"./index-ee6ydtfe.js";
|
|
20
21
|
import"./index-7g4c7s5r.js";
|
|
21
22
|
import"./index-bpmtbmy9.js";
|
|
23
|
+
import"./index-zpsr8rpc.js";
|
|
22
24
|
import"./index-zgwm4ryv.js";
|
|
23
25
|
import"./index-a76rekgs.js";
|
|
24
26
|
export {
|
|
@@ -42,18 +42,20 @@ import {
|
|
|
42
42
|
transactKnowledge,
|
|
43
43
|
transactKnowledgeWithCas,
|
|
44
44
|
wordBigrams
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-22sannyk.js";
|
|
46
46
|
import {
|
|
47
47
|
resolveHiveDataDir
|
|
48
48
|
} from "./index-ae75rja9.js";
|
|
49
|
-
import"./index-
|
|
49
|
+
import"./index-14z9en94.js";
|
|
50
|
+
import"./index-sxe3t040.js";
|
|
51
|
+
import"./index-19hjpqsy.js";
|
|
52
|
+
import"./index-bks56jbg.js";
|
|
50
53
|
import"./index-7qefgq4j.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-gy0nyfbw.js";
|
|
53
|
-
import"./index-hwj25q9r.js";
|
|
54
|
+
import"./index-ee6ydtfe.js";
|
|
54
55
|
import"./index-7g4c7s5r.js";
|
|
55
56
|
import"./index-bk5tah7q.js";
|
|
56
57
|
import"./index-bpmtbmy9.js";
|
|
58
|
+
import"./index-zpsr8rpc.js";
|
|
57
59
|
import"./index-zgwm4ryv.js";
|
|
58
60
|
import"./index-a76rekgs.js";
|
|
59
61
|
export {
|