opencode-swarm 7.135.0 → 7.135.2

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