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.
Files changed (99) hide show
  1. package/.opencode/skills/swarm-pr-review/SKILL.md +26 -11
  2. package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +39 -13
  3. package/dist/cli/{ast-diff-665tewz6.js → ast-diff-ekd9v10f.js} +2 -2
  4. package/dist/cli/{config-doctor-7a2z00qt.js → config-doctor-z2wam5wn.js} +2 -2
  5. package/dist/cli/{core-50jqqm4g.js → core-k7m76ce0.js} +2 -2
  6. package/dist/cli/{curation-policy-g353f457.js → curation-policy-kd8j8cne.js} +4 -4
  7. package/dist/cli/{curator-drift-r50x1rac.js → curator-drift-fv4rttf4.js} +2 -2
  8. package/dist/cli/{curator-3t7e3hf9.js → curator-jwpm52kg.js} +31 -31
  9. package/dist/cli/curator-llm-factory-4qt8b15s.js +64 -0
  10. package/dist/cli/{dispatch-ndxbsk98.js → dispatch-w0rzasz3.js} +2 -2
  11. package/dist/cli/{evidence-summary-service-8n16gxgm.js → evidence-summary-service-90z295j3.js} +11 -11
  12. package/dist/cli/{gate-evidence-496qt72z.js → gate-evidence-3q6q71fw.js} +6 -6
  13. package/dist/cli/guardrail-explain-44xt373y.js +65 -0
  14. package/dist/cli/{guardrail-log-dy9b5qtt.js → guardrail-log-kbp5jztb.js} +4 -4
  15. package/dist/cli/guardrail-reset-vpazhh8k.js +90 -0
  16. package/dist/cli/{hive-promoter-mspppqbp.js → hive-promoter-tdrkz9nh.js} +31 -31
  17. package/dist/cli/{index-tya6ytex.js → index-016708th.js} +2 -2
  18. package/dist/cli/{index-er61pycf.js → index-07zgs6y0.js} +6 -6
  19. package/dist/cli/{index-hw1yghpg.js → index-2y14mjfn.js} +3 -3
  20. package/dist/cli/{index-w8pgjr75.js → index-4cgee5vh.js} +1 -1
  21. package/dist/cli/{index-ms46zgwb.js → index-52gnz782.js} +4 -4
  22. package/dist/cli/{index-sh8xbyca.js → index-702zx3rk.js} +10 -4
  23. package/dist/cli/{index-k5ng170v.js → index-7ac5z627.js} +2 -2
  24. package/dist/cli/{index-8py21zn6.js → index-7hctrdk8.js} +1 -1
  25. package/dist/cli/{index-yq1fxahj.js → index-9pmmexsd.js} +1 -1
  26. package/dist/cli/{index-92r9z3yk.js → index-crpb0qke.js} +32583 -31080
  27. package/dist/cli/{index-rpy0bent.js → index-d3bdr78h.js} +2 -2
  28. package/dist/cli/{index-15twmgzf.js → index-dfvh1r8g.js} +33 -33
  29. package/dist/cli/{index-20ndbsmh.js → index-dmbaaz6d.js} +8 -5
  30. package/dist/cli/{index-mfmegbz2.js → index-ffevkn7k.js} +1 -1
  31. package/dist/cli/{index-e1pxav9g.js → index-fxvgaeq4.js} +1 -1
  32. package/dist/cli/{index-z9yhhk6q.js → index-g8wwj0sz.js} +1 -1
  33. package/dist/cli/{index-w4ybhzyg.js → index-gwrv6c56.js} +6 -6
  34. package/dist/cli/{index-hmssmyvh.js → index-h879g4r4.js} +1 -1
  35. package/dist/cli/{index-b67y7an8.js → index-jpa03jcc.js} +10 -2
  36. package/dist/cli/{index-6c17bqbj.js → index-k6h5yc1j.js} +5 -5
  37. package/dist/cli/{index-argd4rp4.js → index-n0fpefqx.js} +4 -4
  38. package/dist/cli/{index-bgefx261.js → index-n96wwf56.js} +4 -4
  39. package/dist/cli/{index-abtrcs16.js → index-nj6rmyeh.js} +1 -1
  40. package/dist/cli/{index-hcb25p12.js → index-p62we2ar.js} +2 -2
  41. package/dist/cli/{index-3p4wgm0d.js → index-pgvx3rkq.js} +1 -1
  42. package/dist/cli/index-q7sjgr1y.js +52 -0
  43. package/dist/cli/{index-f75qjtn5.js → index-qcm97jfh.js} +1 -1
  44. package/dist/cli/{index-mdwvn7qe.js → index-qwj7qjjp.js} +2 -2
  45. package/dist/cli/{index-zj6t9zgx.js → index-r3mvsbtq.js} +8 -1
  46. package/dist/cli/{index-ddpkwdcb.js → index-r9wnyq0v.js} +1 -1
  47. package/dist/cli/{index-yjvtk1w2.js → index-rcjq8dm4.js} +2 -2
  48. package/dist/cli/{index-a3fky5pd.js → index-sycndcwd.js} +1 -1
  49. package/dist/cli/{index-pna97bbk.js → index-x4rxh8j9.js} +3 -3
  50. package/dist/cli/{index-p3k155dv.js → index-y586zet4.js} +1 -1
  51. package/dist/cli/{index-at1m1k5k.js → index-ykjjqg79.js} +6 -6
  52. package/dist/cli/{index-tp5ytzzg.js → index-zwpttdgn.js} +1 -1
  53. package/dist/cli/index.js +31 -31
  54. package/dist/cli/{knowledge-escalator-7gw36zj8.js → knowledge-escalator-0qnm48g8.js} +11 -11
  55. package/dist/cli/{knowledge-events-r1xak0yw.js → knowledge-events-3zv81nzp.js} +9 -9
  56. package/dist/cli/{knowledge-link-jkx8xjxp.js → knowledge-link-w91bcyx2.js} +3 -3
  57. package/dist/cli/{knowledge-store-wzzke013.js → knowledge-store-njtx6wj1.js} +4 -4
  58. package/dist/cli/{knowledge-validator-mma2bbgp.js → knowledge-validator-7eqj5afv.js} +6 -6
  59. package/dist/cli/{pending-delegations-k2yqg1sj.js → pending-delegations-k4x00mqc.js} +3 -3
  60. package/dist/cli/{pr-subscriptions-js5v2xr6.js → pr-subscriptions-x2mqc3f1.js} +3 -3
  61. package/dist/cli/{runner-q7d22d1w.js → runner-gfzkp9nv.js} +5 -5
  62. package/dist/cli/{runtime-x10qb3z1.js → runtime-wjwbpp9j.js} +2 -2
  63. package/dist/cli/{scan-cursor-0vcx58aa.js → scan-cursor-a6dhyf55.js} +5 -5
  64. package/dist/cli/{schema-qr135rxc.js → schema-p0vn1zgh.js} +1 -1
  65. package/dist/cli/{scope-persistence-x7v9mb9k.js → scope-persistence-zs97zkt7.js} +7 -7
  66. package/dist/cli/{skill-generator-aee04dwa.js → skill-generator-5qg15q1j.js} +14 -13
  67. package/dist/cli/{workspace-snapshot-kznz5e13.js → workspace-snapshot-nq25j94x.js} +2 -2
  68. package/dist/cli/{worktree-collision-ownership-xj0bsg92.js → worktree-collision-ownership-q2gswg16.js} +4 -4
  69. package/dist/cli/{worktree-isolation-ar52a7xr.js → worktree-isolation-ndb5fwys.js} +31 -31
  70. package/dist/cli/{worktree-provisioning-owner-72cyddz5.js → worktree-provisioning-owner-cve95q4f.js} +3 -3
  71. package/dist/commands/guardrail-reset.d.ts +2 -0
  72. package/dist/commands/registry.d.ts +16 -3
  73. package/dist/config/schema.d.ts +2 -0
  74. package/dist/failures/action-circuit.d.ts +69 -0
  75. package/dist/failures/action-identity.d.ts +33 -0
  76. package/dist/failures/invocation-failure.d.ts +77 -0
  77. package/dist/full-auto/oversight.d.ts +21 -0
  78. package/dist/full-auto/policy.d.ts +22 -0
  79. package/dist/full-auto/recovery.d.ts +43 -0
  80. package/dist/full-auto/severe-result.d.ts +86 -0
  81. package/dist/full-auto/state.d.ts +18 -0
  82. package/dist/hooks/full-auto-intercept.d.ts +1 -1
  83. package/dist/hooks/gate-denial-tracker.d.ts +1 -1
  84. package/dist/hooks/guardrails/nontransient-circuit.d.ts +19 -5
  85. package/dist/hooks/pr-workflow-gate.d.ts +64 -3
  86. package/dist/index.js +2866 -2816
  87. package/dist/lang/symbol-visibility.d.ts +10 -7
  88. package/dist/learning/admission.d.ts +1 -1
  89. package/dist/models/model-override-state.d.ts +47 -0
  90. package/dist/models/task-model-routing.d.ts +71 -0
  91. package/dist/services/diagnose-service.d.ts +2 -2
  92. package/dist/tools/dispatch-lanes.d.ts +16 -1
  93. package/dist/tools/repo-graph/types.d.ts +6 -4
  94. package/dist/utils/model-dispatch-fallback.d.ts +31 -10
  95. package/dist/utils/timeout.d.ts +18 -4
  96. package/package.json +1 -1
  97. package/dist/cli/curator-llm-factory-7cm4494k.js +0 -64
  98. package/dist/cli/guardrail-explain-my9zj5pj.js +0 -65
  99. package/dist/cli/index-wx8zdh4a.js +0 -24
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-w8pgjr75.js";
4
+ } from "./index-4cgee5vh.js";
5
5
  import {
6
6
  bunWrite
7
- } from "./index-zj6t9zgx.js";
7
+ } from "./index-r3mvsbtq.js";
8
8
  import {
9
9
  withEvidenceLock
10
10
  } from "./index-6q35swn2.js";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-mdwvn7qe.js";
4
+ } from "./index-qwj7qjjp.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-a3fky5pd.js";
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-92r9z3yk.js";
89
- import"./index-hcb25p12.js";
90
- import"./index-b67y7an8.js";
91
- import"./index-yq1fxahj.js";
92
- import"./index-at1m1k5k.js";
93
- import"./index-p3k155dv.js";
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-abtrcs16.js";
95
+ import"./index-nj6rmyeh.js";
96
96
  import"./index-y8552snf.js";
97
- import"./index-6c17bqbj.js";
98
- import"./index-tya6ytex.js";
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-z9yhhk6q.js";
103
- import"./index-3p4wgm0d.js";
104
- import"./index-20ndbsmh.js";
105
- import"./index-bgefx261.js";
106
- import"./index-tp5ytzzg.js";
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-rpy0bent.js";
110
- import"./index-e1pxav9g.js";
111
- import"./index-argd4rp4.js";
112
- import"./index-k5ng170v.js";
113
- import"./index-ms46zgwb.js";
114
- import"./index-hmssmyvh.js";
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-wx8zdh4a.js";
117
+ import"./index-q7sjgr1y.js";
118
118
  import"./index-3g0xk6tk.js";
119
119
  import"./index-85gkedsf.js";
120
- import"./index-er61pycf.js";
121
- import"./index-w4ybhzyg.js";
122
- import"./index-yjvtk1w2.js";
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-mfmegbz2.js";
125
+ import"./index-ffevkn7k.js";
126
126
  import {
127
127
  init_schema,
128
128
  stripKnownSwarmPrefix
129
- } from "./index-sh8xbyca.js";
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-w8pgjr75.js";
137
+ import"./index-4cgee5vh.js";
138
138
  import"./index-z6xqpmqg.js";
139
- import"./index-zj6t9zgx.js";
139
+ import"./index-r3mvsbtq.js";
140
140
  import"./index-zjygnfay.js";
141
141
  import"./index-ae75rja9.js";
142
- import"./index-f75qjtn5.js";
143
- import"./index-8py21zn6.js";
142
+ import"./index-qcm97jfh.js";
143
+ import"./index-7hctrdk8.js";
144
144
  import"./index-bk5tah7q.js";
145
- import"./index-hw1yghpg.js";
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-bgefx261.js";
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-er61pycf.js";
15
+ } from "./index-07zgs6y0.js";
13
16
  import {
14
17
  effectiveRetrievalOutcomes,
15
18
  readAuthoritativeKnowledgeCounterRollups
16
- } from "./index-w4ybhzyg.js";
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-hw1yghpg.js";
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, AbortSignal.timeout(30000));
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, {
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  resolveExternalSkillsConfig
9
- } from "./index-sh8xbyca.js";
9
+ } from "./index-702zx3rk.js";
10
10
  import {
11
11
  GIT_BINARY_ENV_VAR,
12
12
  init_git_executable
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-w8pgjr75.js";
4
+ } from "./index-4cgee5vh.js";
5
5
 
6
6
  // src/hooks/delegation-gate/worktree-provisioning-owner.ts
7
7
  import { createHash, randomBytes } from "crypto";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./index-9e6fdz2h.js";
6
6
  import {
7
7
  bunSpawn
8
- } from "./index-zj6t9zgx.js";
8
+ } from "./index-r3mvsbtq.js";
9
9
 
10
10
  // src/background/workspace-snapshot.ts
11
11
  import * as child_process from "child_process";
@@ -1,23 +1,23 @@
1
1
  // @bun
2
2
  import {
3
3
  loadPluginConfigWithMeta
4
- } from "./index-mfmegbz2.js";
4
+ } from "./index-ffevkn7k.js";
5
5
  import {
6
6
  KnowledgeConfigSchema,
7
7
  init_schema
8
- } from "./index-sh8xbyca.js";
8
+ } from "./index-702zx3rk.js";
9
9
  import {
10
10
  validateSwarmPath
11
- } from "./index-w8pgjr75.js";
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-f75qjtn5.js";
17
+ } from "./index-qcm97jfh.js";
18
18
  import {
19
19
  atomicWriteFile
20
- } from "./index-8py21zn6.js";
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-wzzke013.js");
2696
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-njtx6wj1.js");
2697
2697
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
2698
2698
  }
2699
2699
  return {
@@ -4,7 +4,7 @@ import {
4
4
  PlanSchema,
5
5
  TaskStatusSchema,
6
6
  init_loader
7
- } from "./index-mfmegbz2.js";
7
+ } from "./index-ffevkn7k.js";
8
8
  import {
9
9
  assertProjectRoot,
10
10
  withEvidenceLock
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  init_schema,
13
13
  stripKnownSwarmPrefix
14
- } from "./index-sh8xbyca.js";
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-er61pycf.js";
9
+ } from "./index-07zgs6y0.js";
10
10
  import {
11
11
  queryHistoricalOutcomes,
12
12
  readKnowledgeEvents,
13
13
  recordKnowledgeEvent
14
- } from "./index-w4ybhzyg.js";
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-mma2bbgp.js");
227
+ const { quarantineEntry } = await import("./knowledge-validator-7eqj5afv.js");
228
228
  let policyConfig;
229
229
  try {
230
- const { KnowledgeConfigSchema } = await import("./schema-qr135rxc.js");
231
- const { loadPluginConfigWithMeta } = await import("./index-pna97bbk.js");
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-k5ng170v.js";
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-w8pgjr75.js";
20
+ } from "./index-4cgee5vh.js";
21
21
  import {
22
22
  bunSpawn,
23
23
  classifySpawnFailure
24
- } from "./index-zj6t9zgx.js";
24
+ } from "./index-r3mvsbtq.js";
25
25
  import {
26
26
  atomicWriteFile,
27
27
  taskEvidencePath,
28
28
  withTaskEvidenceLock
29
- } from "./index-8py21zn6.js";
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-tp5ytzzg.js";
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-er61pycf.js";
12
+ } from "./index-07zgs6y0.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
- } from "./index-f75qjtn5.js";
15
+ } from "./index-qcm97jfh.js";
16
16
  import {
17
17
  atomicWriteFile
18
- } from "./index-8py21zn6.js";
18
+ } from "./index-7hctrdk8.js";
19
19
  import {
20
20
  require_proper_lockfile
21
21
  } from "./index-7g4c7s5r.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-z6xqpmqg.js";
5
5
  import {
6
6
  bunSpawnSync
7
- } from "./index-zj6t9zgx.js";
7
+ } from "./index-r3mvsbtq.js";
8
8
  import {
9
9
  warn
10
10
  } from "./index-zgwm4ryv.js";
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-p3k155dv.js";
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-zj6t9zgx.js";
23
+ } from "./index-r3mvsbtq.js";
24
24
  import {
25
25
  exports_external,
26
26
  init_zod
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-w8pgjr75.js";
4
+ } from "./index-4cgee5vh.js";
5
5
  import {
6
6
  withEvidenceLock
7
7
  } from "./index-6q35swn2.js";
@@ -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 };
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFile
4
- } from "./index-8py21zn6.js";
4
+ } from "./index-7hctrdk8.js";
5
5
  import {
6
6
  init_logger,
7
7
  warn
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-92r9z3yk.js";
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-b67y7an8.js";
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 };
@@ -5,7 +5,7 @@ import {
5
5
  } from "./index-7ryh498h.js";
6
6
  import {
7
7
  withTimeout
8
- } from "./index-wx8zdh4a.js";
8
+ } from "./index-q7sjgr1y.js";
9
9
 
10
10
  // src/lang/runtime.ts
11
11
  import { existsSync, statSync } from "fs";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-mfmegbz2.js";
5
+ } from "./index-ffevkn7k.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-sh8xbyca.js";
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
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-b67y7an8.js";
5
+ } from "./index-jpa03jcc.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  _internals,
4
4
  resolveWorktreeIsolationConfig
5
- } from "./index-yjvtk1w2.js";
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-mfmegbz2.js";
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-sh8xbyca.js";
67
+ } from "./index-702zx3rk.js";
68
68
  import {
69
69
  ALL_AGENT_NAMES,
70
70
  ALL_SUBAGENT_NAMES,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./index-y8552snf.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-8py21zn6.js";
12
+ } from "./index-7hctrdk8.js";
13
13
  import {
14
14
  assertProjectRoot,
15
15
  withEvidenceLock
@@ -3,7 +3,7 @@ import {
3
3
  EvaluationRunV1Schema,
4
4
  GateAuditResultV1Schema,
5
5
  getProtectedEvaluationRunIds
6
- } from "./index-p3k155dv.js";
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-argd4rp4.js";
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-hmssmyvh.js";
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-mfmegbz2.js";
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-w8pgjr75.js";
69
+ } from "./index-4cgee5vh.js";
70
70
  import {
71
71
  bunHash,
72
72
  bunWrite,
73
73
  mergeEnvForChild
74
- } from "./index-zj6t9zgx.js";
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-f75qjtn5.js";
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";