opencode-swarm 7.140.4 → 7.140.5

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 (95) hide show
  1. package/.opencode/skills/plan/SKILL.md +40 -12
  2. package/dist/agents/architect.d.ts +2 -1
  3. package/dist/background/pending-delegations.d.ts +5 -0
  4. package/dist/cli/{config-doctor-qqe6172n.js → config-doctor-5vzpq4qa.js} +3 -3
  5. package/dist/cli/{core-52k057mf.js → core-xjzdc56e.js} +2 -2
  6. package/dist/cli/{curation-policy-9291bdat.js → curation-policy-avvb56x2.js} +6 -6
  7. package/dist/cli/{curator-04xqq68e.js → curator-5nytvg7p.js} +36 -36
  8. package/dist/cli/curator-llm-factory-rds75zhj.js +61 -0
  9. package/dist/cli/{evidence-summary-service-em58myd7.js → evidence-summary-service-zq4gyx6g.js} +14 -11
  10. package/dist/cli/gate-evidence-smn2wqft.js +51 -0
  11. package/dist/cli/guardrail-explain-an7jvam1.js +62 -0
  12. package/dist/cli/{guardrail-log-vb5zkegf.js → guardrail-log-0hnd2k9v.js} +4 -4
  13. package/dist/cli/{hive-promoter-z09khawt.js → hive-promoter-qe8pqg79.js} +36 -36
  14. package/dist/cli/{index-vrmkg8fm.js → index-01ggt2mj.js} +9 -9
  15. package/dist/cli/{index-hfwzxh3j.js → index-0r2m0vbq.js} +12 -10
  16. package/dist/cli/{index-v3xhc7kg.js → index-0rx9t9w8.js} +1 -1
  17. package/dist/cli/{index-hz0refz4.js → index-2bg901qt.js} +70 -29
  18. package/dist/cli/{index-7begd9aq.js → index-386ts4tm.js} +4 -4
  19. package/dist/cli/{index-v3x7j9ey.js → index-8rp1y4ab.js} +2 -2
  20. package/dist/cli/{index-35qep0v7.js → index-912qz4y0.js} +88 -88
  21. package/dist/cli/{index-2rb3x0fk.js → index-affh1gtg.js} +7 -7
  22. package/dist/cli/{index-c5kr20nz.js → index-c432knmy.js} +1 -1
  23. package/dist/cli/{index-v1an91bq.js → index-e0mpz2j3.js} +5 -5
  24. package/dist/cli/{index-bfhwtdsw.js → index-epvhf50h.js} +3 -3
  25. package/dist/cli/{index-s8g7jh1k.js → index-ex7r16gc.js} +2 -2
  26. package/dist/cli/{index-tj04dj06.js → index-jm4cpp4n.js} +2 -2
  27. package/dist/cli/{index-hxvkfx6t.js → index-jqsfsqbx.js} +15 -2
  28. package/dist/cli/{index-hfjvepk2.js → index-kb5q9v34.js} +3 -3
  29. package/dist/cli/{index-bn17ycxn.js → index-m9xrdjn0.js} +1 -1
  30. package/dist/cli/{index-djbhe0yh.js → index-mm2egvdt.js} +38 -38
  31. package/dist/cli/{index-pp5m7xga.js → index-nwrwy8eb.js} +70 -34
  32. package/dist/cli/index-nyjtzmsj.js +43 -0
  33. package/dist/cli/{index-4hp8nvwb.js → index-p8kk34am.js} +3 -3
  34. package/dist/cli/{index-ysa38bnr.js → index-ptn13xjn.js} +3 -3
  35. package/dist/cli/{index-1kyex7z2.js → index-qwm6vdyv.js} +32 -1
  36. package/dist/cli/{index-dtam929z.js → index-qy1nq52t.js} +1 -1
  37. package/dist/cli/{index-rrb6cz2f.js → index-s1v0wza5.js} +6 -2
  38. package/dist/cli/{index-w4etfamq.js → index-t5pytnca.js} +2 -2
  39. package/dist/cli/index-tjqzr3jc.js +623 -0
  40. package/dist/cli/{index-mrpfd1jx.js → index-vh05t3w5.js} +1 -1
  41. package/dist/cli/{index-ryq97w1x.js → index-wkt9fj06.js} +4 -4
  42. package/dist/cli/{index-wk8s1m7b.js → index-wrb0gykj.js} +217 -15
  43. package/dist/cli/{index-arza4m4j.js → index-z7h37d63.js} +2 -2
  44. package/dist/cli/{index-a1fjhx4w.js → index-z90nvqj3.js} +37836 -35986
  45. package/dist/cli/{index-b8zgtz81.js → index-zsrtt42s.js} +34 -1
  46. package/dist/cli/{index-mpytsq6k.js → index-ztgn70jz.js} +2 -2
  47. package/dist/cli/index.js +35 -35
  48. package/dist/cli/{knowledge-escalator-gdjnwszd.js → knowledge-escalator-4pfrc902.js} +12 -12
  49. package/dist/cli/{knowledge-events-581x4q7n.js → knowledge-events-3zkfnksk.js} +10 -10
  50. package/dist/cli/{knowledge-link-axx45d1h.js → knowledge-link-m9p80f4r.js} +5 -5
  51. package/dist/cli/{knowledge-store-ttg33482.js → knowledge-store-dpqgvvjt.js} +6 -6
  52. package/dist/cli/{knowledge-validator-8kywqt8b.js → knowledge-validator-2c7w87dk.js} +8 -8
  53. package/dist/cli/{pending-delegations-btwqsvz4.js → pending-delegations-cxx9tezp.js} +4 -4
  54. package/dist/cli/{pr-subscriptions-83y1cdwv.js → pr-subscriptions-2sfnb599.js} +4 -4
  55. package/dist/cli/{runner-fh3r41nw.js → runner-mky3vvht.js} +6 -6
  56. package/dist/cli/{scan-cursor-j8ytdpam.js → scan-cursor-1z60gwrw.js} +7 -7
  57. package/dist/cli/{schema-6xfqtpvn.js → schema-vpnkwvez.js} +2 -2
  58. package/dist/cli/{scope-persistence-8c72jrgp.js → scope-persistence-p9dmprry.js} +10 -5
  59. package/dist/cli/{skill-generator-n8vm1yhn.js → skill-generator-yx7ka1cj.js} +14 -14
  60. package/dist/cli/{telemetry-fb44gpba.js → telemetry-0x6kszvk.js} +1 -1
  61. package/dist/cli/{worktree-collision-ownership-f28r473k.js → worktree-collision-ownership-wm5pse49.js} +8 -8
  62. package/dist/cli/worktree-isolation-bwc6ra8e.js +102 -0
  63. package/dist/cli/worktree-provisioning-owner-sjh7te1h.js +22 -0
  64. package/dist/commands/acknowledge-spec-drift.d.ts +4 -5
  65. package/dist/config/evidence-schema.d.ts +3 -3
  66. package/dist/config/index.d.ts +2 -2
  67. package/dist/config/plan-schema.d.ts +8 -0
  68. package/dist/config/schema.d.ts +2 -2
  69. package/dist/council/council-evidence-writer.d.ts +1 -1
  70. package/dist/gate-evidence.d.ts +117 -4
  71. package/dist/hooks/delegation-gate.d.ts +21 -0
  72. package/dist/index.js +768 -743
  73. package/dist/plan/ledger.d.ts +55 -0
  74. package/dist/plan/manager.d.ts +9 -0
  75. package/dist/plan/planning-profile.d.ts +27 -0
  76. package/dist/services/spec-drift-recovery.d.ts +84 -0
  77. package/dist/session/snapshot-writer.d.ts +3 -1
  78. package/dist/state.d.ts +19 -17
  79. package/dist/summaries/schema.d.ts +2 -2
  80. package/dist/tools/convene-council.d.ts +6 -6
  81. package/dist/tools/save-plan.d.ts +8 -0
  82. package/dist/tools/submit-phase-council-verdicts.d.ts +6 -6
  83. package/dist/tools/tool-metadata.d.ts +28 -28
  84. package/dist/tools/update-task-status.d.ts +13 -0
  85. package/dist/tools/write-final-council-evidence.d.ts +6 -6
  86. package/dist/types/events.d.ts +29 -1
  87. package/dist/workflow/coder-settlement.d.ts +62 -0
  88. package/dist/workflow/task-repair.d.ts +30 -0
  89. package/dist/workflow/task-terminal.d.ts +52 -0
  90. package/package.json +1 -1
  91. package/dist/cli/curator-llm-factory-cfm8fhdw.js +0 -61
  92. package/dist/cli/gate-evidence-ezxfkb22.js +0 -32
  93. package/dist/cli/guardrail-explain-pn1bcgfz.js +0 -62
  94. package/dist/cli/index-d181x9zr.js +0 -71
  95. package/dist/cli/index-dtyeabmj.js +0 -239
@@ -8,16 +8,89 @@ import {
8
8
  } from "./index-zgwm4ryv.js";
9
9
  import {
10
10
  emit
11
- } from "./index-bfhwtdsw.js";
11
+ } from "./index-epvhf50h.js";
12
12
  import {
13
13
  __toESM
14
14
  } from "./index-a76rekgs.js";
15
15
 
16
+ // src/parallel/file-locks.ts
17
+ var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
18
+ import * as crypto from "crypto";
19
+ import * as fs from "fs";
20
+ import * as path from "path";
21
+ var LOCKS_DIR = ".swarm/locks";
22
+ var LOCK_TIMEOUT_MS = 5 * 60 * 1000;
23
+ var _internals = {
24
+ tryAcquireLock,
25
+ writeFile: fs.promises.writeFile
26
+ };
27
+ function getLockFilePath(directory, filePath) {
28
+ const normalized = path.resolve(directory, filePath);
29
+ const baseDir = path.resolve(directory) + path.sep;
30
+ const pathOk = process.platform === "win32" ? normalized.toLowerCase().startsWith(baseDir.toLowerCase()) : normalized.startsWith(baseDir);
31
+ if (!pathOk) {
32
+ throw new Error("Invalid file path: path traversal not allowed");
33
+ }
34
+ const pathForHash = process.platform === "win32" ? normalized.toLowerCase() : normalized;
35
+ const hash = crypto.createHash("sha256").update(pathForHash).digest("hex");
36
+ const lockPath = path.join(directory, LOCKS_DIR, `${hash}.lock`);
37
+ const legacyPaths = [pathForHash];
38
+ if (process.platform === "win32" && normalized !== pathForHash) {
39
+ legacyPaths.push(normalized);
40
+ }
41
+ for (const legacyPath of legacyPaths) {
42
+ const oldHash = Buffer.from(legacyPath).toString("base64").replace(/[/+=]/g, "_");
43
+ const oldLockPath = path.join(directory, LOCKS_DIR, `${oldHash}.lock`);
44
+ if (fs.existsSync(oldLockPath)) {
45
+ return oldLockPath;
46
+ }
47
+ }
48
+ return lockPath;
49
+ }
50
+ async function tryAcquireLock(directory, filePath, agent, taskId) {
51
+ const lockPath = getLockFilePath(directory, filePath);
52
+ const locksDir = path.dirname(lockPath);
53
+ if (!fs.existsSync(locksDir)) {
54
+ fs.mkdirSync(locksDir, { recursive: true });
55
+ }
56
+ if (!fs.existsSync(lockPath)) {
57
+ fs.writeFileSync(lockPath, "", "utf-8");
58
+ }
59
+ let release;
60
+ try {
61
+ release = await import_proper_lockfile.default.lock(lockPath, {
62
+ stale: LOCK_TIMEOUT_MS,
63
+ retries: {
64
+ retries: 5,
65
+ minTimeout: 10,
66
+ maxTimeout: 500,
67
+ factor: 2
68
+ },
69
+ realpath: false
70
+ });
71
+ } catch (err) {
72
+ const code = err.code;
73
+ if (code === "ELOCKED" || code === "EEXIST") {
74
+ return { acquired: false };
75
+ }
76
+ throw err;
77
+ }
78
+ const lock = {
79
+ filePath,
80
+ agent,
81
+ taskId,
82
+ timestamp: new Date().toISOString(),
83
+ expiresAt: Date.now() + LOCK_TIMEOUT_MS,
84
+ _release: release
85
+ };
86
+ return { acquired: true, lock };
87
+ }
88
+
16
89
  // src/utils/project-boundary.ts
17
90
  init_logger();
18
- import * as fs from "fs";
91
+ import * as fs2 from "fs";
19
92
  import * as os from "os";
20
- import * as path from "path";
93
+ import * as path2 from "path";
21
94
  var MAX_PROJECT_ROOT_DEPTH = 20;
22
95
  var PROJECT_ROOT_INDICATORS = [
23
96
  "package.json",
@@ -40,14 +113,14 @@ var PROJECT_BOUNDARY_MARKERS = [
40
113
  { name: ".opencode", accepts: (stat) => stat.isDirectory() }
41
114
  ];
42
115
  function isAbsoluteDirectoryInput(value) {
43
- return typeof value === "string" && value.trim().length > 0 && path.isAbsolute(value);
116
+ return typeof value === "string" && value.trim().length > 0 && path2.isAbsolute(value);
44
117
  }
45
118
  function hasExplicitProjectBoundary(directory) {
46
119
  if (!isAbsoluteDirectoryInput(directory))
47
120
  return false;
48
121
  for (const marker of PROJECT_BOUNDARY_MARKERS) {
49
122
  try {
50
- const stat = _internals.lstatSync(path.join(directory, marker.name));
123
+ const stat = _internals2.lstatSync(path2.join(directory, marker.name));
51
124
  if (!stat.isSymbolicLink() && marker.accepts(stat))
52
125
  return true;
53
126
  } catch {}
@@ -58,8 +131,8 @@ function isStrictPathDescendant(candidate, root) {
58
131
  if (!isAbsoluteDirectoryInput(candidate) || !isAbsoluteDirectoryInput(root)) {
59
132
  return false;
60
133
  }
61
- const relative2 = path.relative(root, candidate);
62
- return relative2 !== "" && relative2 !== ".." && !relative2.startsWith(`..${path.sep}`) && !path.isAbsolute(relative2);
134
+ const relative2 = path2.relative(root, candidate);
135
+ return relative2 !== "" && relative2 !== ".." && !relative2.startsWith(`..${path2.sep}`) && !path2.isAbsolute(relative2);
63
136
  }
64
137
  function isMissingPathError(error) {
65
138
  const code = error?.code;
@@ -70,8 +143,8 @@ function isWeakConfigContainerRoot(directory, dependencies) {
70
143
  const resolved = dependencies.realpathSync(directory);
71
144
  return resolved === dependencies.realpathSync(os.tmpdir()) || resolved === dependencies.realpathSync(os.homedir());
72
145
  } catch {
73
- const resolved = path.resolve(directory);
74
- return resolved === path.resolve(os.tmpdir()) || resolved === path.resolve(os.homedir());
146
+ const resolved = path2.resolve(directory);
147
+ return resolved === path2.resolve(os.tmpdir()) || resolved === path2.resolve(os.homedir());
75
148
  }
76
149
  }
77
150
  function projectIndicatorState(directory, dependencies, options = {}) {
@@ -80,7 +153,7 @@ function projectIndicatorState(directory, dependencies, options = {}) {
80
153
  if (!allowConfigOnly && indicator === ".opencode")
81
154
  continue;
82
155
  try {
83
- const indicatorStat = dependencies.statSync(path.join(directory, indicator));
156
+ const indicatorStat = dependencies.statSync(path2.join(directory, indicator));
84
157
  if (indicatorStat.isFile() || indicatorStat.isDirectory())
85
158
  return "present";
86
159
  } catch (error) {
@@ -90,7 +163,7 @@ function projectIndicatorState(directory, dependencies, options = {}) {
90
163
  }
91
164
  return "absent";
92
165
  }
93
- function assertProjectRoot(directory, dependencies = fs, artifactLabel = "runtime state") {
166
+ function assertProjectRoot(directory, dependencies = fs2, artifactLabel = "runtime state") {
94
167
  let resolved;
95
168
  try {
96
169
  resolved = dependencies.realpathSync(directory);
@@ -108,14 +181,14 @@ function assertProjectRoot(directory, dependencies = fs, artifactLabel = "runtim
108
181
  throw new Error(`Cannot verify project root for "${resolved}" \u2014 ancestor search exceeded ${MAX_PROJECT_ROOT_DEPTH} levels`);
109
182
  }
110
183
  depth++;
111
- const parent = path.dirname(current);
184
+ const parent = path2.dirname(current);
112
185
  if (parent === current)
113
186
  break;
114
- if (path.dirname(parent) === parent) {
187
+ if (path2.dirname(parent) === parent) {
115
188
  current = parent;
116
189
  continue;
117
190
  }
118
- const parentSwarm = path.join(parent, ".swarm");
191
+ const parentSwarm = path2.join(parent, ".swarm");
119
192
  let parentSwarmStat;
120
193
  try {
121
194
  parentSwarmStat = dependencies.statSync(parentSwarm);
@@ -143,82 +216,9 @@ function assertProjectRoot(directory, dependencies = fs, artifactLabel = "runtim
143
216
  current = parent;
144
217
  }
145
218
  }
146
- var _internals = {
147
- lstatSync: fs.lstatSync
148
- };
149
-
150
- // src/parallel/file-locks.ts
151
- var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
152
- import * as crypto from "crypto";
153
- import * as fs2 from "fs";
154
- import * as path2 from "path";
155
- var LOCKS_DIR = ".swarm/locks";
156
- var LOCK_TIMEOUT_MS = 5 * 60 * 1000;
157
219
  var _internals2 = {
158
- tryAcquireLock,
159
- writeFile: fs2.promises.writeFile
220
+ lstatSync: fs2.lstatSync
160
221
  };
161
- function getLockFilePath(directory, filePath) {
162
- const normalized = path2.resolve(directory, filePath);
163
- const baseDir = path2.resolve(directory) + path2.sep;
164
- const pathOk = process.platform === "win32" ? normalized.toLowerCase().startsWith(baseDir.toLowerCase()) : normalized.startsWith(baseDir);
165
- if (!pathOk) {
166
- throw new Error("Invalid file path: path traversal not allowed");
167
- }
168
- const pathForHash = process.platform === "win32" ? normalized.toLowerCase() : normalized;
169
- const hash = crypto.createHash("sha256").update(pathForHash).digest("hex");
170
- const lockPath = path2.join(directory, LOCKS_DIR, `${hash}.lock`);
171
- const legacyPaths = [pathForHash];
172
- if (process.platform === "win32" && normalized !== pathForHash) {
173
- legacyPaths.push(normalized);
174
- }
175
- for (const legacyPath of legacyPaths) {
176
- const oldHash = Buffer.from(legacyPath).toString("base64").replace(/[/+=]/g, "_");
177
- const oldLockPath = path2.join(directory, LOCKS_DIR, `${oldHash}.lock`);
178
- if (fs2.existsSync(oldLockPath)) {
179
- return oldLockPath;
180
- }
181
- }
182
- return lockPath;
183
- }
184
- async function tryAcquireLock(directory, filePath, agent, taskId) {
185
- const lockPath = getLockFilePath(directory, filePath);
186
- const locksDir = path2.dirname(lockPath);
187
- if (!fs2.existsSync(locksDir)) {
188
- fs2.mkdirSync(locksDir, { recursive: true });
189
- }
190
- if (!fs2.existsSync(lockPath)) {
191
- fs2.writeFileSync(lockPath, "", "utf-8");
192
- }
193
- let release;
194
- try {
195
- release = await import_proper_lockfile.default.lock(lockPath, {
196
- stale: LOCK_TIMEOUT_MS,
197
- retries: {
198
- retries: 5,
199
- minTimeout: 10,
200
- maxTimeout: 500,
201
- factor: 2
202
- },
203
- realpath: false
204
- });
205
- } catch (err) {
206
- const code = err.code;
207
- if (code === "ELOCKED" || code === "EEXIST") {
208
- return { acquired: false };
209
- }
210
- throw err;
211
- }
212
- const lock = {
213
- filePath,
214
- agent,
215
- taskId,
216
- timestamp: new Date().toISOString(),
217
- expiresAt: Date.now() + LOCK_TIMEOUT_MS,
218
- _release: release
219
- };
220
- return { acquired: true, lock };
221
- }
222
222
 
223
223
  // src/evidence/lock.ts
224
224
  class EvidenceLockTimeoutError extends Error {
@@ -7,19 +7,19 @@ import {
7
7
  } from "./index-ae75rja9.js";
8
8
  import {
9
9
  resolveKnowledgeStoreDir
10
- } from "./index-mrpfd1jx.js";
10
+ } from "./index-vh05t3w5.js";
11
11
  import {
12
12
  atomicWriteFile
13
- } from "./index-4hp8nvwb.js";
13
+ } from "./index-p8kk34am.js";
14
14
  import {
15
15
  assertProjectRoot
16
- } from "./index-35qep0v7.js";
16
+ } from "./index-912qz4y0.js";
17
17
  import {
18
18
  require_proper_lockfile
19
19
  } from "./index-7g4c7s5r.js";
20
20
  import {
21
21
  loadPluginConfigWithMeta
22
- } from "./index-pp5m7xga.js";
22
+ } from "./index-nwrwy8eb.js";
23
23
  import {
24
24
  init_logger,
25
25
  warn
@@ -27,10 +27,10 @@ import {
27
27
  import {
28
28
  KnowledgeConfigSchema,
29
29
  init_schema
30
- } from "./index-tj04dj06.js";
30
+ } from "./index-jm4cpp4n.js";
31
31
  import {
32
32
  emit
33
- } from "./index-bfhwtdsw.js";
33
+ } from "./index-epvhf50h.js";
34
34
  import {
35
35
  __require,
36
36
  __toESM
@@ -2514,7 +2514,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
2514
2514
  }
2515
2515
  let bumps = 0;
2516
2516
  if (deltas.length > 0) {
2517
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-ttg33482.js");
2517
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-dpqgvvjt.js");
2518
2518
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
2519
2519
  }
2520
2520
  return {
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-w4etfamq.js";
12
+ } from "./index-t5pytnca.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,
@@ -3,7 +3,7 @@ import {
3
3
  queryHistoricalOutcomes,
4
4
  readKnowledgeEvents,
5
5
  recordKnowledgeEvent
6
- } from "./index-2rb3x0fk.js";
6
+ } from "./index-affh1gtg.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-vrmkg8fm.js";
14
+ } from "./index-01ggt2mj.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-8kywqt8b.js");
227
+ const { quarantineEntry } = await import("./knowledge-validator-2c7w87dk.js");
228
228
  let policyConfig;
229
229
  try {
230
- const { KnowledgeConfigSchema } = await import("./schema-6xfqtpvn.js");
231
- const { loadPluginConfigWithMeta } = await import("./index-hfwzxh3j.js");
230
+ const { KnowledgeConfigSchema } = await import("./schema-vpnkwvez.js");
231
+ const { loadPluginConfigWithMeta } = await import("./index-0r2m0vbq.js");
232
232
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
233
233
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
234
234
  } catch {
@@ -532,7 +532,7 @@ var CATALOG_SOURCE = [
532
532
  category: "plan",
533
533
  severity: "notice",
534
534
  privacyClass: "operational",
535
- producer: "src/plan/manager.ts:341",
535
+ producer: "src/plan/manager.ts:344",
536
536
  consumers: NO_CONSUMERS,
537
537
  futureOwnerIssue: ISSUE_SINK,
538
538
  retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
@@ -545,7 +545,7 @@ var CATALOG_SOURCE = [
545
545
  category: "plan",
546
546
  severity: "warning",
547
547
  privacyClass: "sensitive",
548
- producer: "src/plan/manager.ts:1780",
548
+ producer: "src/plan/manager.ts:1842",
549
549
  consumers: NO_CONSUMERS,
550
550
  futureOwnerIssue: ISSUE_SINK,
551
551
  retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
@@ -558,7 +558,7 @@ var CATALOG_SOURCE = [
558
558
  category: "plan",
559
559
  severity: "error",
560
560
  privacyClass: "sensitive",
561
- producer: "src/plan/ledger.ts:707",
561
+ producer: "src/plan/ledger.ts:762",
562
562
  consumers: NO_CONSUMERS,
563
563
  futureOwnerIssue: ISSUE_SINK,
564
564
  retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-a1fjhx4w.js";
15
+ } from "./index-z90nvqj3.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-ysa38bnr.js";
22
+ } from "./index-ptn13xjn.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -3,7 +3,7 @@ import {
3
3
  ALL_AGENT_NAMES,
4
4
  SUMMARIZER_EXEMPT_TOOL_NAMES,
5
5
  init_constants
6
- } from "./index-hxvkfx6t.js";
6
+ } from "./index-jqsfsqbx.js";
7
7
  import {
8
8
  OUTCOME_BLOCK_THRESHOLD,
9
9
  init_knowledge_types
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.140.4",
24
+ version: "7.140.5",
25
25
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
26
26
  main: "dist/index.js",
27
27
  types: "dist/index.d.ts",
@@ -922,7 +922,7 @@ function isQAAgent(name) {
922
922
  function isSubagent(name) {
923
923
  return ALL_SUBAGENT_NAMES.includes(name);
924
924
  }
925
- var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_TOOL_NAMES, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_TOOL_NAMES, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_TOOL_NAMES, TURBO_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, SWARM_WORKTREE_DIR_NAME = ".swarm-worktrees", DEFAULT_WORKTREE_ISOLATION_CONFIG;
925
+ var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_TOOL_NAMES, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_TOOL_NAMES, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_TOOL_NAMES, TURBO_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, SWARM_WORKTREE_DIR_NAME = ".swarm-worktrees", DEFAULT_WORKTREE_ISOLATION_CONFIG;
926
926
  var init_constants = __esm(() => {
927
927
  init_agent_names();
928
928
  init_tool_metadata();
@@ -1096,6 +1096,19 @@ var init_constants = __esm(() => {
1096
1096
  SKILL_AGENT_TOOL_MAP = {
1097
1097
  architect: [...SKILL_TOOL_NAMES]
1098
1098
  };
1099
+ WRITE_TOOL_NAMES = [
1100
+ "write",
1101
+ "edit",
1102
+ "patch",
1103
+ "apply_patch",
1104
+ "swarm_apply_patch",
1105
+ "create_file",
1106
+ "insert",
1107
+ "replace",
1108
+ "append",
1109
+ "prepend",
1110
+ "extract_code_blocks"
1111
+ ];
1099
1112
  SUMMARIZER_EXEMPT_TOOL_NAMES = [
1100
1113
  "retrieve_summary",
1101
1114
  "retrieve_lane_output",
@@ -1236,4 +1249,4 @@ var init_constants = __esm(() => {
1236
1249
  };
1237
1250
  });
1238
1251
 
1239
- export { QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, init_agent_names, TOOL_NAMES, TOOL_NAME_SET, AGENT_TOOL_MAP, init_tool_metadata, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, isQAAgent, isSubagent, SWARM_WORKTREE_DIR_NAME, DEFAULT_WORKTREE_ISOLATION_CONFIG, init_constants };
1252
+ export { QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, init_agent_names, TOOL_NAMES, TOOL_NAME_SET, AGENT_TOOL_MAP, init_tool_metadata, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, isQAAgent, isSubagent, SWARM_WORKTREE_DIR_NAME, DEFAULT_WORKTREE_ISOLATION_CONFIG, init_constants };
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  effectiveRetrievalOutcomes,
4
4
  readAuthoritativeKnowledgeCounterRollups
5
- } from "./index-2rb3x0fk.js";
5
+ } from "./index-affh1gtg.js";
6
6
  import {
7
7
  ALLOWED_SKILL_PATH_PREFIXES,
8
8
  validateSkillPath
9
- } from "./index-7begd9aq.js";
9
+ } from "./index-386ts4tm.js";
10
10
  import {
11
11
  computeOutcomeSignal,
12
12
  readKnowledge,
13
13
  resolveHiveKnowledgePath,
14
14
  resolveSwarmKnowledgePath,
15
15
  transactKnowledge
16
- } from "./index-vrmkg8fm.js";
16
+ } from "./index-01ggt2mj.js";
17
17
  import {
18
18
  advisoryWarn,
19
19
  init_warning_buffer
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-k46me75h.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-35qep0v7.js";
7
+ } from "./index-912qz4y0.js";
8
8
  import {
9
9
  log
10
10
  } from "./index-zgwm4ryv.js";
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-s8g7jh1k.js";
4
+ } from "./index-ex7r16gc.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-v3xhc7kg.js";
7
+ } from "./index-0rx9t9w8.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
11
11
  SWARM_COMMAND_TOOL_COMMANDS,
12
12
  VALID_COMMANDS,
13
- _internals2 as _internals,
13
+ _internals3 as _internals,
14
14
  canonicalCommandKey,
15
15
  classifySwarmCommandChatFallbackUse,
16
16
  classifySwarmCommandToolUse,
@@ -84,66 +84,66 @@ import {
84
84
  handleWriteRetroCommand,
85
85
  normalizeSwarmCommandInput,
86
86
  resolveCommand
87
- } from "./index-a1fjhx4w.js";
88
- import"./index-41hkt36g.js";
89
- import"./index-c5kr20nz.js";
90
- import"./index-ysa38bnr.js";
91
- import"./index-arza4m4j.js";
92
- import"./index-hz0refz4.js";
93
- import"./index-w4etfamq.js";
94
- import"./index-y8552snf.js";
87
+ } from "./index-z90nvqj3.js";
95
88
  import"./index-4905hd2m.js";
96
- import"./index-134d35c1.js";
97
- import"./index-hfjvepk2.js";
98
- import"./index-v1an91bq.js";
99
- import"./index-mpytsq6k.js";
100
- import"./index-v2xrer41.js";
89
+ import"./index-41hkt36g.js";
90
+ import"./index-c432knmy.js";
91
+ import"./index-ptn13xjn.js";
101
92
  import"./index-c8s9a3zh.js";
93
+ import"./index-z7h37d63.js";
94
+ import"./index-2bg901qt.js";
95
+ import"./index-134d35c1.js";
96
+ import"./index-t5pytnca.js";
97
+ import"./index-y8552snf.js";
102
98
  import"./index-9ss2m4rs.js";
103
- import"./index-bn17ycxn.js";
104
- import"./index-ryq97w1x.js";
105
- import"./index-556ja8an.js";
106
- import"./index-wk8s1m7b.js";
107
- import"./index-1kyex7z2.js";
108
- import"./index-b8zgtz81.js";
109
- import"./index-v3x7j9ey.js";
110
- import"./index-rrb6cz2f.js";
111
99
  import"./index-74hpm6sh.js";
112
- import"./index-dtyeabmj.js";
100
+ import"./index-kb5q9v34.js";
101
+ import"./index-e0mpz2j3.js";
102
+ import"./index-ztgn70jz.js";
103
+ import"./index-v2xrer41.js";
104
+ import"./index-m9xrdjn0.js";
105
+ import"./index-wkt9fj06.js";
106
+ import"./index-556ja8an.js";
107
+ import"./index-wrb0gykj.js";
108
+ import"./index-zsrtt42s.js";
109
+ import"./index-8rp1y4ab.js";
110
+ import"./index-qwm6vdyv.js";
111
+ import"./index-tjqzr3jc.js";
112
+ import"./index-s1v0wza5.js";
113
113
  import"./index-8fwhhayc.js";
114
114
  import"./index-q1exe2b3.js";
115
- import"./index-2rb3x0fk.js";
115
+ import"./index-affh1gtg.js";
116
116
  import"./index-k46me75h.js";
117
117
  import"./index-ee3x66a5.js";
118
- import"./index-7begd9aq.js";
119
- import"./index-dtam929z.js";
118
+ import"./index-386ts4tm.js";
119
+ import"./index-qy1nq52t.js";
120
120
  import"./index-rtry5xyf.js";
121
- import"./index-vrmkg8fm.js";
121
+ import"./index-01ggt2mj.js";
122
122
  import"./index-ae75rja9.js";
123
- import"./index-mrpfd1jx.js";
124
- import"./index-4hp8nvwb.js";
125
- import"./index-ed5ykebp.js";
126
- import"./index-35qep0v7.js";
123
+ import"./index-vh05t3w5.js";
124
+ import"./index-p8kk34am.js";
125
+ import"./index-912qz4y0.js";
127
126
  import"./index-7g4c7s5r.js";
127
+ import"./index-ed5ykebp.js";
128
128
  import"./index-4nt52yr9.js";
129
- import"./index-pp5m7xga.js";
129
+ import"./index-nyjtzmsj.js";
130
130
  import"./index-gprxjmm7.js";
131
131
  import"./index-n832052r.js";
132
- import"./index-d181x9zr.js";
132
+ import"./index-nwrwy8eb.js";
133
133
  import"./index-4rhhvd1a.js";
134
134
  import"./index-zgwm4ryv.js";
135
135
  import {
136
136
  init_schema,
137
137
  stripKnownSwarmPrefix
138
- } from "./index-tj04dj06.js";
138
+ } from "./index-jm4cpp4n.js";
139
139
  import {
140
140
  AGENT_TOOL_MAP,
141
141
  ORCHESTRATOR_NAME,
142
142
  init_constants
143
- } from "./index-hxvkfx6t.js";
143
+ } from "./index-jqsfsqbx.js";
144
144
  import"./index-zjygnfay.js";
145
145
  import"./index-bk5tah7q.js";
146
- import"./index-bfhwtdsw.js";
146
+ import"./index-epvhf50h.js";
147
147
  import"./index-bpmtbmy9.js";
148
148
  import"./index-a76rekgs.js";
149
149