opencode-swarm 7.147.0 → 7.148.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/.opencode/skills/swarm-pr-review/SKILL.md +26 -11
- package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +39 -13
- package/dist/cli/{ast-diff-665tewz6.js → ast-diff-ekd9v10f.js} +2 -2
- package/dist/cli/{config-doctor-7a2z00qt.js → config-doctor-z2wam5wn.js} +2 -2
- package/dist/cli/{core-50jqqm4g.js → core-k7m76ce0.js} +2 -2
- package/dist/cli/{curation-policy-g353f457.js → curation-policy-kd8j8cne.js} +4 -4
- package/dist/cli/{curator-drift-r50x1rac.js → curator-drift-fv4rttf4.js} +2 -2
- package/dist/cli/{curator-3t7e3hf9.js → curator-jwpm52kg.js} +31 -31
- package/dist/cli/curator-llm-factory-4qt8b15s.js +64 -0
- package/dist/cli/{dispatch-ndxbsk98.js → dispatch-w0rzasz3.js} +2 -2
- package/dist/cli/{evidence-summary-service-8n16gxgm.js → evidence-summary-service-90z295j3.js} +11 -11
- package/dist/cli/{gate-evidence-496qt72z.js → gate-evidence-3q6q71fw.js} +6 -6
- package/dist/cli/guardrail-explain-44xt373y.js +65 -0
- package/dist/cli/{guardrail-log-dy9b5qtt.js → guardrail-log-kbp5jztb.js} +4 -4
- package/dist/cli/guardrail-reset-vpazhh8k.js +90 -0
- package/dist/cli/{hive-promoter-mspppqbp.js → hive-promoter-tdrkz9nh.js} +31 -31
- package/dist/cli/{index-tya6ytex.js → index-016708th.js} +2 -2
- package/dist/cli/{index-er61pycf.js → index-07zgs6y0.js} +6 -6
- package/dist/cli/{index-hw1yghpg.js → index-2y14mjfn.js} +3 -3
- package/dist/cli/{index-w8pgjr75.js → index-4cgee5vh.js} +1 -1
- package/dist/cli/{index-ms46zgwb.js → index-52gnz782.js} +4 -4
- package/dist/cli/{index-sh8xbyca.js → index-702zx3rk.js} +10 -4
- package/dist/cli/{index-k5ng170v.js → index-7ac5z627.js} +2 -2
- package/dist/cli/{index-8py21zn6.js → index-7hctrdk8.js} +1 -1
- package/dist/cli/{index-yq1fxahj.js → index-9pmmexsd.js} +1 -1
- package/dist/cli/{index-92r9z3yk.js → index-crpb0qke.js} +32583 -31080
- package/dist/cli/{index-rpy0bent.js → index-d3bdr78h.js} +2 -2
- package/dist/cli/{index-15twmgzf.js → index-dfvh1r8g.js} +33 -33
- package/dist/cli/{index-20ndbsmh.js → index-dmbaaz6d.js} +8 -5
- package/dist/cli/{index-mfmegbz2.js → index-ffevkn7k.js} +1 -1
- package/dist/cli/{index-e1pxav9g.js → index-fxvgaeq4.js} +1 -1
- package/dist/cli/{index-z9yhhk6q.js → index-g8wwj0sz.js} +1 -1
- package/dist/cli/{index-w4ybhzyg.js → index-gwrv6c56.js} +6 -6
- package/dist/cli/{index-hmssmyvh.js → index-h879g4r4.js} +1 -1
- package/dist/cli/{index-b67y7an8.js → index-jpa03jcc.js} +10 -2
- package/dist/cli/{index-6c17bqbj.js → index-k6h5yc1j.js} +5 -5
- package/dist/cli/{index-argd4rp4.js → index-n0fpefqx.js} +4 -4
- package/dist/cli/{index-bgefx261.js → index-n96wwf56.js} +4 -4
- package/dist/cli/{index-abtrcs16.js → index-nj6rmyeh.js} +1 -1
- package/dist/cli/{index-hcb25p12.js → index-p62we2ar.js} +2 -2
- package/dist/cli/{index-3p4wgm0d.js → index-pgvx3rkq.js} +1 -1
- package/dist/cli/index-q7sjgr1y.js +52 -0
- package/dist/cli/{index-f75qjtn5.js → index-qcm97jfh.js} +1 -1
- package/dist/cli/{index-mdwvn7qe.js → index-qwj7qjjp.js} +2 -2
- package/dist/cli/{index-zj6t9zgx.js → index-r3mvsbtq.js} +8 -1
- package/dist/cli/{index-ddpkwdcb.js → index-r9wnyq0v.js} +1 -1
- package/dist/cli/{index-yjvtk1w2.js → index-rcjq8dm4.js} +2 -2
- package/dist/cli/{index-a3fky5pd.js → index-sycndcwd.js} +1 -1
- package/dist/cli/{index-pna97bbk.js → index-x4rxh8j9.js} +3 -3
- package/dist/cli/{index-p3k155dv.js → index-y586zet4.js} +1 -1
- package/dist/cli/{index-at1m1k5k.js → index-ykjjqg79.js} +6 -6
- package/dist/cli/{index-tp5ytzzg.js → index-zwpttdgn.js} +1 -1
- package/dist/cli/index.js +31 -31
- package/dist/cli/{knowledge-escalator-7gw36zj8.js → knowledge-escalator-0qnm48g8.js} +11 -11
- package/dist/cli/{knowledge-events-r1xak0yw.js → knowledge-events-3zv81nzp.js} +9 -9
- package/dist/cli/{knowledge-link-jkx8xjxp.js → knowledge-link-w91bcyx2.js} +3 -3
- package/dist/cli/{knowledge-store-wzzke013.js → knowledge-store-njtx6wj1.js} +4 -4
- package/dist/cli/{knowledge-validator-mma2bbgp.js → knowledge-validator-7eqj5afv.js} +6 -6
- package/dist/cli/{pending-delegations-k2yqg1sj.js → pending-delegations-k4x00mqc.js} +3 -3
- package/dist/cli/{pr-subscriptions-js5v2xr6.js → pr-subscriptions-x2mqc3f1.js} +3 -3
- package/dist/cli/{runner-q7d22d1w.js → runner-gfzkp9nv.js} +5 -5
- package/dist/cli/{runtime-x10qb3z1.js → runtime-wjwbpp9j.js} +2 -2
- package/dist/cli/{scan-cursor-0vcx58aa.js → scan-cursor-a6dhyf55.js} +5 -5
- package/dist/cli/{schema-qr135rxc.js → schema-p0vn1zgh.js} +1 -1
- package/dist/cli/{scope-persistence-x7v9mb9k.js → scope-persistence-zs97zkt7.js} +7 -7
- package/dist/cli/{skill-generator-aee04dwa.js → skill-generator-5qg15q1j.js} +14 -13
- package/dist/cli/{workspace-snapshot-kznz5e13.js → workspace-snapshot-nq25j94x.js} +2 -2
- package/dist/cli/{worktree-collision-ownership-xj0bsg92.js → worktree-collision-ownership-q2gswg16.js} +4 -4
- package/dist/cli/{worktree-isolation-ar52a7xr.js → worktree-isolation-ndb5fwys.js} +31 -31
- package/dist/cli/{worktree-provisioning-owner-72cyddz5.js → worktree-provisioning-owner-cve95q4f.js} +3 -3
- package/dist/commands/guardrail-reset.d.ts +2 -0
- package/dist/commands/registry.d.ts +16 -3
- package/dist/config/schema.d.ts +2 -0
- package/dist/failures/action-circuit.d.ts +69 -0
- package/dist/failures/action-identity.d.ts +33 -0
- package/dist/failures/invocation-failure.d.ts +77 -0
- package/dist/full-auto/oversight.d.ts +21 -0
- package/dist/full-auto/policy.d.ts +22 -0
- package/dist/full-auto/recovery.d.ts +43 -0
- package/dist/full-auto/severe-result.d.ts +86 -0
- package/dist/full-auto/state.d.ts +18 -0
- package/dist/hooks/full-auto-intercept.d.ts +1 -1
- package/dist/hooks/gate-denial-tracker.d.ts +1 -1
- package/dist/hooks/guardrails/nontransient-circuit.d.ts +19 -5
- package/dist/hooks/pr-workflow-gate.d.ts +64 -3
- package/dist/index.js +2866 -2816
- package/dist/lang/symbol-visibility.d.ts +10 -7
- package/dist/learning/admission.d.ts +1 -1
- package/dist/models/model-override-state.d.ts +47 -0
- package/dist/models/task-model-routing.d.ts +71 -0
- package/dist/services/diagnose-service.d.ts +2 -2
- package/dist/tools/dispatch-lanes.d.ts +16 -1
- package/dist/tools/repo-graph/types.d.ts +6 -4
- package/dist/utils/model-dispatch-fallback.d.ts +31 -10
- package/dist/utils/timeout.d.ts +18 -4
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-7cm4494k.js +0 -64
- package/dist/cli/guardrail-explain-my9zj5pj.js +0 -65
- package/dist/cli/index-wx8zdh4a.js +0 -24
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-qwj7qjjp.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-sycndcwd.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -85,48 +85,48 @@ import {
|
|
|
85
85
|
handleWriteRetroCommand,
|
|
86
86
|
normalizeSwarmCommandInput,
|
|
87
87
|
resolveCommand
|
|
88
|
-
} from "./index-
|
|
89
|
-
import"./index-
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
92
|
-
import"./index-
|
|
93
|
-
import"./index-
|
|
88
|
+
} from "./index-crpb0qke.js";
|
|
89
|
+
import"./index-p62we2ar.js";
|
|
90
|
+
import"./index-jpa03jcc.js";
|
|
91
|
+
import"./index-9pmmexsd.js";
|
|
92
|
+
import"./index-ykjjqg79.js";
|
|
93
|
+
import"./index-y586zet4.js";
|
|
94
94
|
import"./index-134d35c1.js";
|
|
95
|
-
import"./index-
|
|
95
|
+
import"./index-nj6rmyeh.js";
|
|
96
96
|
import"./index-y8552snf.js";
|
|
97
|
-
import"./index-
|
|
98
|
-
import"./index-
|
|
97
|
+
import"./index-k6h5yc1j.js";
|
|
98
|
+
import"./index-016708th.js";
|
|
99
99
|
import"./index-70ha9e09.js";
|
|
100
100
|
import"./index-c8s9a3zh.js";
|
|
101
101
|
import"./index-9ss2m4rs.js";
|
|
102
|
-
import"./index-
|
|
103
|
-
import"./index-
|
|
104
|
-
import"./index-
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
102
|
+
import"./index-g8wwj0sz.js";
|
|
103
|
+
import"./index-pgvx3rkq.js";
|
|
104
|
+
import"./index-dmbaaz6d.js";
|
|
105
|
+
import"./index-n96wwf56.js";
|
|
106
|
+
import"./index-zwpttdgn.js";
|
|
107
107
|
import"./index-rtry5xyf.js";
|
|
108
108
|
import"./index-zsrtt42s.js";
|
|
109
|
-
import"./index-
|
|
110
|
-
import"./index-
|
|
111
|
-
import"./index-
|
|
112
|
-
import"./index-
|
|
113
|
-
import"./index-
|
|
114
|
-
import"./index-
|
|
109
|
+
import"./index-d3bdr78h.js";
|
|
110
|
+
import"./index-fxvgaeq4.js";
|
|
111
|
+
import"./index-n0fpefqx.js";
|
|
112
|
+
import"./index-7ac5z627.js";
|
|
113
|
+
import"./index-52gnz782.js";
|
|
114
|
+
import"./index-h879g4r4.js";
|
|
115
115
|
import"./index-556ja8an.js";
|
|
116
116
|
import"./index-b43rt5ph.js";
|
|
117
|
-
import"./index-
|
|
117
|
+
import"./index-q7sjgr1y.js";
|
|
118
118
|
import"./index-3g0xk6tk.js";
|
|
119
119
|
import"./index-85gkedsf.js";
|
|
120
|
-
import"./index-
|
|
121
|
-
import"./index-
|
|
122
|
-
import"./index-
|
|
120
|
+
import"./index-07zgs6y0.js";
|
|
121
|
+
import"./index-gwrv6c56.js";
|
|
122
|
+
import"./index-rcjq8dm4.js";
|
|
123
123
|
import"./index-gprxjmm7.js";
|
|
124
124
|
import"./index-n832052r.js";
|
|
125
|
-
import"./index-
|
|
125
|
+
import"./index-ffevkn7k.js";
|
|
126
126
|
import {
|
|
127
127
|
init_schema,
|
|
128
128
|
stripKnownSwarmPrefix
|
|
129
|
-
} from "./index-
|
|
129
|
+
} from "./index-702zx3rk.js";
|
|
130
130
|
import {
|
|
131
131
|
AGENT_TOOL_MAP,
|
|
132
132
|
ORCHESTRATOR_NAME,
|
|
@@ -134,15 +134,15 @@ import {
|
|
|
134
134
|
} from "./index-cpg98bh1.js";
|
|
135
135
|
import"./index-9e6fdz2h.js";
|
|
136
136
|
import"./index-4rhhvd1a.js";
|
|
137
|
-
import"./index-
|
|
137
|
+
import"./index-4cgee5vh.js";
|
|
138
138
|
import"./index-z6xqpmqg.js";
|
|
139
|
-
import"./index-
|
|
139
|
+
import"./index-r3mvsbtq.js";
|
|
140
140
|
import"./index-zjygnfay.js";
|
|
141
141
|
import"./index-ae75rja9.js";
|
|
142
|
-
import"./index-
|
|
143
|
-
import"./index-
|
|
142
|
+
import"./index-qcm97jfh.js";
|
|
143
|
+
import"./index-7hctrdk8.js";
|
|
144
144
|
import"./index-bk5tah7q.js";
|
|
145
|
-
import"./index-
|
|
145
|
+
import"./index-2y14mjfn.js";
|
|
146
146
|
import"./index-6q35swn2.js";
|
|
147
147
|
import"./index-q81s0m8k.js";
|
|
148
148
|
import"./index-7g4c7s5r.js";
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-n96wwf56.js";
|
|
6
|
+
import {
|
|
7
|
+
withTimeoutSignal
|
|
8
|
+
} from "./index-q7sjgr1y.js";
|
|
6
9
|
import {
|
|
7
10
|
computeOutcomeSignal,
|
|
8
11
|
readKnowledge,
|
|
9
12
|
resolveHiveKnowledgePath,
|
|
10
13
|
resolveSwarmKnowledgePath,
|
|
11
14
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
15
|
+
} from "./index-07zgs6y0.js";
|
|
13
16
|
import {
|
|
14
17
|
effectiveRetrievalOutcomes,
|
|
15
18
|
readAuthoritativeKnowledgeCounterRollups
|
|
16
|
-
} from "./index-
|
|
19
|
+
} from "./index-gwrv6c56.js";
|
|
17
20
|
import {
|
|
18
21
|
advisoryWarn,
|
|
19
22
|
init_warning_buffer
|
|
@@ -25,7 +28,7 @@ import {
|
|
|
25
28
|
import {
|
|
26
29
|
atomicWriteFileAnyRoot,
|
|
27
30
|
atomicWriteSwarmFile
|
|
28
|
-
} from "./index-
|
|
31
|
+
} from "./index-2y14mjfn.js";
|
|
29
32
|
import {
|
|
30
33
|
init_logger,
|
|
31
34
|
log,
|
|
@@ -1685,7 +1688,7 @@ async function autoApplyProposals(directory, llmDelegate) {
|
|
|
1685
1688
|
].join(`
|
|
1686
1689
|
`);
|
|
1687
1690
|
try {
|
|
1688
|
-
const response = await llmDelegate("", prompt,
|
|
1691
|
+
const response = await withTimeoutSignal((signal) => llmDelegate("", prompt, signal), 30000, new Error("Skill proposal evaluation timed out after 30000ms"));
|
|
1689
1692
|
const verdict = response.trim().toUpperCase();
|
|
1690
1693
|
if (verdict === "APPROVE") {
|
|
1691
1694
|
const activation = await activateProposal(directory, proposal.slug, false, {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
loadPluginConfigWithMeta
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-ffevkn7k.js";
|
|
5
5
|
import {
|
|
6
6
|
KnowledgeConfigSchema,
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-702zx3rk.js";
|
|
9
9
|
import {
|
|
10
10
|
validateSwarmPath
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-4cgee5vh.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveHiveEventsPath
|
|
14
14
|
} from "./index-ae75rja9.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveKnowledgeStoreDir
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-qcm97jfh.js";
|
|
18
18
|
import {
|
|
19
19
|
atomicWriteFile
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-7hctrdk8.js";
|
|
21
21
|
import {
|
|
22
22
|
assertProjectRoot
|
|
23
23
|
} from "./index-6q35swn2.js";
|
|
@@ -2693,7 +2693,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
|
|
|
2693
2693
|
}
|
|
2694
2694
|
let bumps = 0;
|
|
2695
2695
|
if (deltas.length > 0) {
|
|
2696
|
-
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-
|
|
2696
|
+
const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-njtx6wj1.js");
|
|
2697
2697
|
bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
|
|
2698
2698
|
}
|
|
2699
2699
|
return {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
init_schema,
|
|
13
13
|
stripKnownSwarmPrefix
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-702zx3rk.js";
|
|
15
15
|
import {
|
|
16
16
|
init_constants
|
|
17
17
|
} from "./index-cpg98bh1.js";
|
|
@@ -2574,6 +2574,14 @@ function checkFileAuthority(agentName, filePath, cwd, authorityConfig, options =
|
|
|
2574
2574
|
|
|
2575
2575
|
// src/hooks/guardrails/helpers.ts
|
|
2576
2576
|
init_constants();
|
|
2577
|
+
|
|
2578
|
+
// src/hooks/normalize-tool-name.ts
|
|
2579
|
+
var NAMESPACE_PREFIX_PATTERN = /^[^:]+[:.]/;
|
|
2580
|
+
function normalizeToolNameLowerCase(toolName) {
|
|
2581
|
+
return toolName.replace(NAMESPACE_PREFIX_PATTERN, "").toLowerCase();
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
// src/hooks/guardrails/helpers.ts
|
|
2577
2585
|
function isInDeclaredScope(filePath, scopeEntries, cwd) {
|
|
2578
2586
|
return isPathWithinDeclaredScope(filePath, scopeEntries, cwd);
|
|
2579
2587
|
}
|
|
@@ -2615,4 +2623,4 @@ function redactPath(filePath) {
|
|
|
2615
2623
|
return normalized;
|
|
2616
2624
|
}
|
|
2617
2625
|
|
|
2618
|
-
export { classifyFile, stableCanonicalStringify, checkFileAuthority, isInDeclaredScope, redactShellCommand, redactPath };
|
|
2626
|
+
export { classifyFile, stableCanonicalStringify, checkFileAuthority, normalizeToolNameLowerCase, isInDeclaredScope, redactShellCommand, redactPath };
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-07zgs6y0.js";
|
|
10
10
|
import {
|
|
11
11
|
queryHistoricalOutcomes,
|
|
12
12
|
readKnowledgeEvents,
|
|
13
13
|
recordKnowledgeEvent
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-gwrv6c56.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-7eqj5afv.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-p0vn1zgh.js");
|
|
231
|
+
const { loadPluginConfigWithMeta } = await import("./index-x4rxh8j9.js");
|
|
232
232
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
233
233
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
234
234
|
} catch {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
autoCommitDirty,
|
|
4
4
|
cleanUntrackedFiles
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-7ac5z627.js";
|
|
6
6
|
import {
|
|
7
7
|
isPathWithinDeclaredScope,
|
|
8
8
|
unsafePathTextReason
|
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
} from "./index-4rhhvd1a.js";
|
|
18
18
|
import {
|
|
19
19
|
validateSwarmPath
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-4cgee5vh.js";
|
|
21
21
|
import {
|
|
22
22
|
bunSpawn,
|
|
23
23
|
classifySpawnFailure
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-r3mvsbtq.js";
|
|
25
25
|
import {
|
|
26
26
|
atomicWriteFile,
|
|
27
27
|
taskEvidencePath,
|
|
28
28
|
withTaskEvidenceLock
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-7hctrdk8.js";
|
|
30
30
|
import {
|
|
31
31
|
assertProjectRoot
|
|
32
32
|
} from "./index-6q35swn2.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-zwpttdgn.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-07zgs6y0.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-qcm97jfh.js";
|
|
16
16
|
import {
|
|
17
17
|
atomicWriteFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-7hctrdk8.js";
|
|
19
19
|
import {
|
|
20
20
|
require_proper_lockfile
|
|
21
21
|
} from "./index-7g4c7s5r.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
readEvaluationRun,
|
|
10
10
|
saveEvaluationRun,
|
|
11
11
|
saveTaskSetSnapshot
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-y586zet4.js";
|
|
13
13
|
import {
|
|
14
14
|
canonicalHash,
|
|
15
15
|
computeCandidateInputContentHash,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./index-y8552snf.js";
|
|
21
21
|
import {
|
|
22
22
|
bunSpawn
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-r3mvsbtq.js";
|
|
24
24
|
import {
|
|
25
25
|
exports_external,
|
|
26
26
|
init_zod
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/utils/timeout.ts
|
|
3
|
+
async function withTimeout(promise, ms, timeoutError) {
|
|
4
|
+
let timer;
|
|
5
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
6
|
+
timer = setTimeout(() => reject(timeoutError), ms);
|
|
7
|
+
});
|
|
8
|
+
try {
|
|
9
|
+
return await Promise.race([promise, timeoutPromise]);
|
|
10
|
+
} finally {
|
|
11
|
+
if (timer !== undefined)
|
|
12
|
+
clearTimeout(timer);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
async function withTimeoutSignal(operation, ms, timeoutError) {
|
|
16
|
+
if (!Number.isFinite(ms) || ms < 0) {
|
|
17
|
+
throw new RangeError("timeout must be a finite non-negative number");
|
|
18
|
+
}
|
|
19
|
+
if (timeoutError.name === "Error") {
|
|
20
|
+
try {
|
|
21
|
+
timeoutError.name = "TimeoutError";
|
|
22
|
+
} catch {}
|
|
23
|
+
}
|
|
24
|
+
const controller = new AbortController;
|
|
25
|
+
let timer;
|
|
26
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
27
|
+
timer = _internals.setTimeout(() => {
|
|
28
|
+
controller.abort(timeoutError);
|
|
29
|
+
reject(timeoutError);
|
|
30
|
+
}, ms);
|
|
31
|
+
});
|
|
32
|
+
try {
|
|
33
|
+
return await Promise.race([
|
|
34
|
+
Promise.resolve().then(() => operation(controller.signal)),
|
|
35
|
+
timeoutPromise
|
|
36
|
+
]);
|
|
37
|
+
} finally {
|
|
38
|
+
if (timer !== undefined)
|
|
39
|
+
_internals.clearTimeout(timer);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
var _internals = {
|
|
43
|
+
setTimeout,
|
|
44
|
+
clearTimeout
|
|
45
|
+
};
|
|
46
|
+
function yieldToEventLoop() {
|
|
47
|
+
return new Promise((resolve) => {
|
|
48
|
+
setTimeout(resolve, 0);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { withTimeout, withTimeoutSignal, yieldToEventLoop };
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
detectPosixWrites,
|
|
13
13
|
detectWindowsWrites,
|
|
14
14
|
resolveWriteTargets
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-crpb0qke.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-jpa03jcc.js";
|
|
23
23
|
|
|
24
24
|
// src/services/guardrail-explain-service.ts
|
|
25
25
|
import path from "path";
|
|
@@ -104,6 +104,13 @@ async function bunWrite(filePath, data) {
|
|
|
104
104
|
const stats = await fsPromises.stat(filePath);
|
|
105
105
|
return stats.size;
|
|
106
106
|
}
|
|
107
|
+
function sleep(ms) {
|
|
108
|
+
const bun = getBun();
|
|
109
|
+
if (bun?.sleep) {
|
|
110
|
+
return bun.sleep(ms);
|
|
111
|
+
}
|
|
112
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
113
|
+
}
|
|
107
114
|
function bunHash(input) {
|
|
108
115
|
const bun = getBun();
|
|
109
116
|
if (bun?.hash) {
|
|
@@ -639,4 +646,4 @@ function bunSpawnSync(cmd, options) {
|
|
|
639
646
|
};
|
|
640
647
|
}
|
|
641
648
|
|
|
642
|
-
export { bunFile, bunWrite, bunHash, classifySpawnFailure, mergeEnvForChild, bunSpawn, bunSpawnSync };
|
|
649
|
+
export { bunFile, bunWrite, sleep, bunHash, classifySpawnFailure, mergeEnvForChild, bunSpawn, bunSpawnSync };
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-ffevkn7k.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-702zx3rk.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
_internals,
|
|
4
4
|
resolveWorktreeIsolationConfig
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-rcjq8dm4.js";
|
|
6
6
|
import {
|
|
7
7
|
ApprovalEvidenceSchema,
|
|
8
8
|
BaseEvidenceSchema,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
loadPluginConfig,
|
|
43
43
|
loadPluginConfigWithMeta,
|
|
44
44
|
loadPluginConfigWithMetaAsync
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-ffevkn7k.js";
|
|
46
46
|
import {
|
|
47
47
|
AUTO_REVIEW_V8_BURN_IN_DECISION,
|
|
48
48
|
AgentOverrideConfigSchema,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
TurboConfigSchema,
|
|
65
65
|
WorktreeIsolationConfigSchema,
|
|
66
66
|
resolveAutoReviewConfig
|
|
67
|
-
} from "./index-
|
|
67
|
+
} from "./index-702zx3rk.js";
|
|
68
68
|
import {
|
|
69
69
|
ALL_AGENT_NAMES,
|
|
70
70
|
ALL_SUBAGENT_NAMES,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EvaluationRunV1Schema,
|
|
4
4
|
GateAuditResultV1Schema,
|
|
5
5
|
getProtectedEvaluationRunIds
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-y586zet4.js";
|
|
7
7
|
import {
|
|
8
8
|
loadDatabaseCtor
|
|
9
9
|
} from "./index-134d35c1.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
readTaskEvidence,
|
|
24
24
|
readTaskEvidenceRaw,
|
|
25
25
|
sanitizeTaskId
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-n0fpefqx.js";
|
|
27
27
|
import {
|
|
28
28
|
LedgerStaleWriterError,
|
|
29
29
|
appendLedgerEvent,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
replayFromLedgerWithStatus,
|
|
44
44
|
takeSnapshotEvent,
|
|
45
45
|
takeSnapshotWithRetry
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-h879g4r4.js";
|
|
47
47
|
import {
|
|
48
48
|
init_executor,
|
|
49
49
|
isUntrustedEnvKey,
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
} from "./index-gprxjmm7.js";
|
|
57
57
|
import {
|
|
58
58
|
PlanSchema
|
|
59
|
-
} from "./index-
|
|
59
|
+
} from "./index-ffevkn7k.js";
|
|
60
60
|
import {
|
|
61
61
|
GIT_BINARY_ENV_VAR,
|
|
62
62
|
describeGitResolution,
|
|
@@ -66,12 +66,12 @@ import {
|
|
|
66
66
|
import {
|
|
67
67
|
readSwarmFileAsync,
|
|
68
68
|
validateSwarmPath
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-4cgee5vh.js";
|
|
70
70
|
import {
|
|
71
71
|
bunHash,
|
|
72
72
|
bunWrite,
|
|
73
73
|
mergeEnvForChild
|
|
74
|
-
} from "./index-
|
|
74
|
+
} from "./index-r3mvsbtq.js";
|
|
75
75
|
import {
|
|
76
76
|
assertProjectRoot,
|
|
77
77
|
tryAcquireLock,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
readLinkPointer,
|
|
8
8
|
resolveKnowledgeStoreDir,
|
|
9
9
|
resolveLinkDir
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-qcm97jfh.js";
|
|
11
11
|
|
|
12
12
|
// src/knowledge/curation-policy.ts
|
|
13
13
|
import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
|