opencode-swarm 7.164.6 → 7.164.8

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 (96) hide show
  1. package/README.md +1 -1
  2. package/dist/background/pending-delegations.d.ts +3 -0
  3. package/dist/background/pr-subscriptions.d.ts +1 -8
  4. package/dist/cli/{coder-settlement-6qgvzx40.js → coder-settlement-qrtjv4jk.js} +14 -14
  5. package/dist/cli/{config-doctor-d1cbh67h.js → config-doctor-hp9dj0fg.js} +5 -3
  6. package/dist/cli/{core-g0cvvj3b.js → core-bmmrm36k.js} +2 -2
  7. package/dist/cli/{curation-policy-7f8x9yg6.js → curation-policy-de7emfqc.js} +7 -6
  8. package/dist/cli/{curator-drift-0r0scc8r.js → curator-drift-5sykmtf5.js} +8 -6
  9. package/dist/cli/{curator-q3qn89wn.js → curator-k8xdr1mn.js} +40 -38
  10. package/dist/cli/curator-llm-factory-pe61p0r6.js +68 -0
  11. package/dist/cli/{dispatch-q4v8x2pk.js → dispatch-dqybvj8v.js} +10 -6
  12. package/dist/cli/{evidence-summary-service-3meyb8rc.js → evidence-summary-service-qzpkdv7a.js} +20 -17
  13. package/dist/cli/{gate-evidence-mhc0w7vp.js → gate-evidence-jmns4e76.js} +14 -8
  14. package/dist/cli/guardrail-explain-vzwbmvyf.js +69 -0
  15. package/dist/cli/{guardrail-log-0nd1eqvz.js → guardrail-log-kckc7cg4.js} +9 -8
  16. package/dist/cli/{guardrail-reset-mzeyd6jh.js → guardrail-reset-acndbsv9.js} +40 -38
  17. package/dist/cli/hive-promoter-wvt5kk99.js +83 -0
  18. package/dist/cli/{index-x6zyc38w.js → index-0zjwnbze.js} +1 -1
  19. package/dist/cli/{index-x76mprg2.js → index-29w778rw.js} +185 -376
  20. package/dist/cli/{index-fxxja498.js → index-2czt53wz.js} +1 -1
  21. package/dist/cli/{index-pvp5tnn2.js → index-3sv8t7ca.js} +2 -2
  22. package/dist/cli/{index-kvb4dwgf.js → index-4pm3v7yc.js} +12 -6
  23. package/dist/cli/{index-jzvrvdmr.js → index-4v28t7jh.js} +4 -4
  24. package/dist/cli/{index-935ww10s.js → index-52m9kter.js} +1236 -1193
  25. package/dist/cli/index-7qefgq4j.js +71 -0
  26. package/dist/cli/{index-zfwd65c2.js → index-8ntf8jnj.js} +19 -18
  27. package/dist/cli/{index-m1nrd3yd.js → index-8psybzzf.js} +1 -1
  28. package/dist/cli/{index-2c3np82d.js → index-8tqqmsav.js} +1 -1
  29. package/dist/cli/{index-tegp2mny.js → index-93znbdam.js} +9 -5
  30. package/dist/cli/{index-hdapetg1.js → index-9ek9d96g.js} +3 -3
  31. package/dist/cli/{index-p56xc59p.js → index-9ydhzegh.js} +28 -17
  32. package/dist/cli/{index-ew99d4y6.js → index-apdp9bc1.js} +1 -1
  33. package/dist/cli/{index-12xzj0hm.js → index-b10yvv6h.js} +4 -4
  34. package/dist/cli/{index-zjg5ajf5.js → index-bv90qkyw.js} +72 -48
  35. package/dist/cli/{index-zypacgjc.js → index-bz8vsc8r.js} +5 -5
  36. package/dist/cli/{index-4k16cz8r.js → index-bzesypf5.js} +36 -27
  37. package/dist/cli/{index-ay9cr8tr.js → index-chcv8c7n.js} +1 -1
  38. package/dist/cli/index-cw912re7.js +200 -0
  39. package/dist/cli/{index-ty3vtqe2.js → index-espcjyrx.js} +4 -4
  40. package/dist/cli/{index-gwg7a00b.js → index-g2e8b3wm.js} +20 -15
  41. package/dist/cli/{index-rysxqae0.js → index-ghnbpez3.js} +7 -7
  42. package/dist/cli/{index-t1nkr7cz.js → index-gkqrk8dd.js} +2 -2
  43. package/dist/cli/{index-1dz8hv7p.js → index-kvq1e82k.js} +3 -3
  44. package/dist/cli/{index-ze5zyv28.js → index-mr3h3sm5.js} +2 -2
  45. package/dist/cli/{index-zaab1wz9.js → index-n4fzmqz8.js} +3 -1
  46. package/dist/cli/{index-g5714mpv.js → index-px4a2ve0.js} +17 -8
  47. package/dist/cli/index-ry16d01s.js +107 -0
  48. package/dist/cli/{index-j3hsjynw.js → index-s3z936wh.js} +100 -97
  49. package/dist/cli/{index-yh8wxegw.js → index-s6ejwhew.js} +21 -11
  50. package/dist/cli/{index-b0m3efpf.js → index-sxxh4ams.js} +2 -2
  51. package/dist/cli/{index-cyhw0der.js → index-t1qzjhnj.js} +13 -13
  52. package/dist/cli/{index-3f7hqtgg.js → index-w3gtqey0.js} +4 -1
  53. package/dist/cli/{index-9qvmsyab.js → index-wgqeqy68.js} +2 -2
  54. package/dist/cli/{index-y4z0rhsa.js → index-whz6am0v.js} +42 -40
  55. package/dist/cli/{index-g94qqwnz.js → index-wtnx33hz.js} +2 -2
  56. package/dist/cli/{index-j645xpsm.js → index-y6s0gpn3.js} +12 -5
  57. package/dist/cli/{index-6f9yvd67.js → index-ya4ta1pd.js} +2 -2
  58. package/dist/cli/{index-5p1tzpwh.js → index-ypjffdrg.js} +3 -2
  59. package/dist/cli/{index-59hvr3f4.js → index-yscwyq3t.js} +9 -6
  60. package/dist/cli/{index-7v3bb0h3.js → index-yzn1fm9a.js} +1 -1
  61. package/dist/cli/{index-qdbgc16x.js → index-z39vxvdx.js} +20 -12
  62. package/dist/cli/index.js +40 -38
  63. package/dist/cli/{knowledge-escalator-aca0nhqg.js → knowledge-escalator-h9834mrp.js} +15 -14
  64. package/dist/cli/{knowledge-events-n5t313ht.js → knowledge-events-e8hrmjf0.js} +13 -12
  65. package/dist/cli/{knowledge-link-8ea4ksda.js → knowledge-link-hhnmc4g1.js} +6 -5
  66. package/dist/cli/{knowledge-store-j97ejf6a.js → knowledge-store-w3w9gchr.js} +7 -6
  67. package/dist/cli/{knowledge-validator-01evhydg.js → knowledge-validator-exd900vc.js} +9 -8
  68. package/dist/cli/{model-preflight-pmnbfzjv.js → model-preflight-bq035tfh.js} +1 -1
  69. package/dist/cli/{pending-delegations-w73abdk3.js → pending-delegations-p4ak2e86.js} +7 -7
  70. package/dist/cli/{pr-subscriptions-05dzvavk.js → pr-subscriptions-73fs8y3n.js} +7 -6
  71. package/dist/cli/{pr-workflow-gate-t0tnkx5f.js → pr-workflow-gate-pvt2ra6e.js} +40 -38
  72. package/dist/cli/{runner-fh7t0mn9.js → runner-5qqh83e2.js} +6 -6
  73. package/dist/cli/{scan-cursor-63zx2qd8.js → scan-cursor-ysd8b563.js} +8 -7
  74. package/dist/cli/{schema-t1scx08g.js → schema-mbb9g4w4.js} +2 -2
  75. package/dist/cli/{scope-persistence-1a5qmchf.js → scope-persistence-jrbnhxvx.js} +12 -10
  76. package/dist/cli/{skill-generator-7werbwgv.js → skill-generator-b4ng5xky.js} +17 -16
  77. package/dist/cli/{sqlite-loader-8zefc142.js → sqlite-loader-xrnf6bq8.js} +1 -1
  78. package/dist/cli/{telemetry-j14cj552.js → telemetry-85gxedng.js} +1 -1
  79. package/dist/cli/{workspace-snapshot-yq0tc49d.js → workspace-snapshot-eh18vgkn.js} +2 -1
  80. package/dist/cli/{worktree-collision-ownership-wzdzky33.js → worktree-collision-ownership-ns8p2fks.js} +12 -15
  81. package/dist/cli/{worktree-isolation-m02ay3kg.js → worktree-isolation-j6zxhjab.js} +40 -38
  82. package/dist/db/canonical-project.d.ts +10 -3
  83. package/dist/db/driver-parity.d.ts +12 -0
  84. package/dist/db/project-db.d.ts +4 -0
  85. package/dist/evidence/task-gate-repair.d.ts +1 -1
  86. package/dist/gate-evidence.d.ts +19 -1
  87. package/dist/index.js +581 -581
  88. package/dist/plan/ledger.d.ts +2 -0
  89. package/dist/tools/pre-check-batch.d.ts +1 -1
  90. package/dist/utils/canonical-root.d.ts +21 -1
  91. package/dist/utils/filesystem-identity.d.ts +59 -0
  92. package/package.json +2 -1
  93. package/dist/cli/curator-llm-factory-dw7md4nr.js +0 -66
  94. package/dist/cli/guardrail-explain-6cbszhw1.js +0 -67
  95. package/dist/cli/hive-promoter-w7g879cm.js +0 -81
  96. package/dist/cli/index-ddszzne4.js +0 -42
@@ -3,10 +3,13 @@ import {
3
3
  DbWriteError,
4
4
  applySynchronousForClass,
5
5
  batchDurabilityClass,
6
- canonicalProjectKey,
7
6
  classifyDbWriteError,
8
7
  getProjectDb
9
- } from "./index-zjg5ajf5.js";
8
+ } from "./index-bv90qkyw.js";
9
+ import {
10
+ _internals,
11
+ canonicalRootKeyFresh
12
+ } from "./index-7qefgq4j.js";
10
13
  import {
11
14
  init_logger,
12
15
  log,
@@ -80,6 +83,13 @@ function getGlobalEventBus() {
80
83
  return globalEventBus;
81
84
  }
82
85
 
86
+ // src/db/canonical-project.ts
87
+ var defaultCanonicalRootRealpath = _internals.realpathSync;
88
+ var defaultCanonicalRootNativeRealpath = _internals.realpathSyncNative;
89
+ function canonicalProjectKey(directory) {
90
+ return canonicalRootKeyFresh(directory);
91
+ }
92
+
83
93
  // src/db/group-commit-writer.ts
84
94
  init_logger();
85
95
  function isClosedHandleError(err) {
@@ -90,7 +100,7 @@ var MAX_QUEUED_OPS = 1024;
90
100
  var FLUSH_THRESHOLD_OPS = 64;
91
101
  var DEGRADED_COOLDOWN_MS = 60000;
92
102
  var _writers = new Map;
93
- var _internals = {
103
+ var _internals2 = {
94
104
  getProjectDb,
95
105
  isClosedHandleError
96
106
  };
@@ -136,7 +146,7 @@ class GroupCommitWriter {
136
146
  } catch (err) {
137
147
  if (!isClosedHandleError(err) || this.registryKey === null)
138
148
  throw err;
139
- this.db = _internals.getProjectDb(this.registryKey);
149
+ this.db = _internals2.getProjectDb(this.registryKey);
140
150
  this.applyBatch(batch);
141
151
  }
142
152
  } catch (err) {
@@ -247,7 +257,7 @@ function renameWithRetry(from, to) {
247
257
  let lastErr;
248
258
  for (let attempt = 0;attempt < RENAME_RETRIES; attempt++) {
249
259
  try {
250
- _internals2.renameSync(from, to);
260
+ _internals3.renameSync(from, to);
251
261
  return;
252
262
  } catch (err) {
253
263
  lastErr = err;
@@ -266,7 +276,7 @@ function warnStaleLegacyOnce(key, fileName) {
266
276
  warnedStaleLegacy.add(guard);
267
277
  warn(`[swarm.db] legacy artifact ${fileName} is present but the target table is non-empty; leaving the file untouched (it is inert \u2014 readers use swarm.db)`);
268
278
  }
269
- var _internals2 = {
279
+ var _internals3 = {
270
280
  renameSync,
271
281
  warnStaleLegacyOnce,
272
282
  maxLegacyImportBytes: () => MAX_LEGACY_IMPORT_BYTES
@@ -280,7 +290,7 @@ function importLegacyJsonl(directory, opts) {
280
290
  const db = getProjectDb(directory);
281
291
  let content;
282
292
  try {
283
- if (statSync(filePath).size > _internals2.maxLegacyImportBytes()) {
293
+ if (statSync(filePath).size > _internals3.maxLegacyImportBytes()) {
284
294
  warn(`[swarm.db] legacy artifact ${opts.fileName} exceeds the import size cap; leaving it inert (not imported, not renamed)`);
285
295
  return { imported: 0, skipped: 0, archived: false };
286
296
  }
@@ -327,7 +337,7 @@ function importLegacyJsonl(directory, opts) {
327
337
  }
328
338
  }
329
339
  if (payloads.length > 0) {
330
- _internals2.warnStaleLegacyOnce(root, opts.fileName);
340
+ _internals3.warnStaleLegacyOnce(root, opts.fileName);
331
341
  }
332
342
  return { imported: 0, skipped, archived: false };
333
343
  }
@@ -356,7 +366,7 @@ function importLegacyJsonFiles(directory, opts) {
356
366
  }
357
367
  try {
358
368
  const abs = join(swarmDir, fileName);
359
- if (statSync(abs).size > _internals2.maxLegacyImportBytes()) {
369
+ if (statSync(abs).size > _internals3.maxLegacyImportBytes()) {
360
370
  skipped++;
361
371
  continue;
362
372
  }
@@ -395,9 +405,9 @@ function importLegacyJsonFiles(directory, opts) {
395
405
  return { imported, skipped, archived: archivedNames.length > 0 };
396
406
  }
397
407
  if (parsed.length > 0) {
398
- _internals2.warnStaleLegacyOnce(root, `${opts.filePrefix}*`);
408
+ _internals3.warnStaleLegacyOnce(root, `${opts.filePrefix}*`);
399
409
  }
400
410
  return { imported: 0, skipped, archived: false };
401
411
  }
402
412
 
403
- export { getGroupCommitWriter, closeGroupCommitWriter, importLegacyJsonl, importLegacyJsonFiles, getGlobalEventBus };
413
+ export { canonicalProjectKey, getGroupCommitWriter, closeGroupCommitWriter, importLegacyJsonl, importLegacyJsonFiles, getGlobalEventBus };
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-2c3np82d.js";
4
+ } from "./index-8tqqmsav.js";
5
5
  import {
6
6
  atomicWriteSwarmFileSync
7
- } from "./index-cyhw0der.js";
7
+ } from "./index-t1qzjhnj.js";
8
8
 
9
9
  // src/hooks/delegation-gate/worktree-provisioning-owner.ts
10
10
  import { createHash } from "crypto";
@@ -177,7 +177,7 @@ var SWARM_TEMP_GRAMMARS = [
177
177
  "src/commands/handoff.ts:48 (pre-#2035)",
178
178
  "src/commands/handoff.ts:79 (pre-#2035)",
179
179
  "src/memory/local-jsonl-provider.ts:1288",
180
- "src/config/bundled-skills.ts:250"
180
+ "src/config/bundled-skills.ts:251"
181
181
  ]
182
182
  },
183
183
  {
@@ -213,16 +213,16 @@ var SWARM_TEMP_GRAMMARS = [
213
213
  "src/evidence/task-file.ts:67 (pre-#2035)",
214
214
  "src/scope/scope-persistence.ts:2304 (pre-#2035)",
215
215
  "src/scope/scope-persistence.ts:2318 (pre-#2035)",
216
- "src/plan/manager.ts:629",
217
- "src/plan/manager.ts:1785",
218
- "src/plan/manager.ts:1831",
216
+ "src/plan/manager.ts:630",
217
+ "src/plan/manager.ts:1786",
218
+ "src/plan/manager.ts:1832",
219
219
  "src/review/evidence.ts:175",
220
220
  "src/turbo/lean/evidence.ts:182",
221
221
  "src/summaries/manager.ts:122",
222
222
  "src/evidence/manager.ts:288",
223
223
  "src/evidence/manager.ts:456",
224
224
  "src/tools/sast-baseline.ts:199",
225
- "src/tools/repo-graph/storage.ts:493",
225
+ "src/tools/repo-graph/storage.ts:494",
226
226
  "src/memory/reflection-service.ts:547 (pre-#2035)",
227
227
  "src/hooks/review-receipt.ts:608",
228
228
  "src/hooks/review-receipt.ts:674",
@@ -231,12 +231,12 @@ var SWARM_TEMP_GRAMMARS = [
231
231
  "src/evidence/phase-participation.ts:303 (pre-#2035)",
232
232
  "src/turbo/lean/integration.ts:426",
233
233
  "src/turbo/lean/reviewer.ts:403",
234
- "src/plan/ledger.ts:737",
234
+ "src/plan/ledger.ts:746",
235
235
  "src/services/synonym-map.ts:389",
236
236
  "src/services/skill-optimizer/store.ts:340",
237
237
  "src/services/skill-optimizer/store.ts:503",
238
- "src/turbo/epic/state.ts:177",
239
- "src/turbo/epic/calibration.ts:197",
238
+ "src/turbo/epic/state.ts:182",
239
+ "src/turbo/epic/calibration.ts:202",
240
240
  "src/commands/archive-sqlite.ts:318",
241
241
  "src/memory/jsonl-migration.ts:161"
242
242
  ],
@@ -250,7 +250,7 @@ var SWARM_TEMP_GRAMMARS = [
250
250
  quarantineEligible: true,
251
251
  parsesTarget: true,
252
252
  producers: [
253
- "src/turbo/lean/state.ts:246",
253
+ "src/turbo/lean/state.ts:251",
254
254
  "src/turbo/lean/recovery.ts:175",
255
255
  "src/hooks/delegation-gate/worktree-merge-status.ts:110"
256
256
  ]
@@ -270,7 +270,7 @@ var SWARM_TEMP_GRAMMARS = [
270
270
  "src/tools/spec-write.ts:98",
271
271
  "src/sdd/effective-spec.ts:1149",
272
272
  "src/background/lane-output-store.ts:353",
273
- "src/background/pending-delegations.ts:1114",
273
+ "src/background/pending-delegations.ts:1117",
274
274
  "src/background/delegation-health.ts:391",
275
275
  "src/tools/submit-phase-council-verdicts.ts:458",
276
276
  "src/summaries/store.ts:46 (pre-#2035)"
@@ -340,7 +340,7 @@ var SWARM_TEMP_GRAMMARS = [
340
340
  token: "instance",
341
341
  quarantineEligible: true,
342
342
  parsesTarget: true,
343
- producers: ["src/plan/manager.ts:1971", "src/plan/manager.ts:2160"],
343
+ producers: ["src/plan/manager.ts:1972", "src/plan/manager.ts:2161"],
344
344
  note: "plan-durability (invariant 5) fd-write paths; grammars registered, writers unchanged in this PR"
345
345
  },
346
346
  {
@@ -402,8 +402,8 @@ var SWARM_TEMP_GRAMMARS = [
402
402
  "src/hooks/skill-usage-log.ts:1675",
403
403
  "src/hooks/skill-usage-pending.ts:817",
404
404
  "src/parallel/file-locks.ts:113",
405
- "src/plan/ledger.ts:1333",
406
- "src/plan/ledger.ts:1334"
405
+ "src/plan/ledger.ts:1344",
406
+ "src/plan/ledger.ts:1345"
407
407
  ],
408
408
  note: "constant-name temps: reported when stale, never auto-quarantined. file-locks meta sidecars live under the scanner-skipped .swarm/locks/ subtree; the ledger reconcile temp embeds instance tokens but its .tmp-suffix shape maps here (conservatively report-only)"
409
409
  }
@@ -6,6 +6,9 @@ import {
6
6
  init_git_executable,
7
7
  resolveGitExecutable
8
8
  } from "./index-9e6fdz2h.js";
9
+ import {
10
+ sameProjectRoot
11
+ } from "./index-7qefgq4j.js";
9
12
 
10
13
  // src/background/workspace-snapshot.ts
11
14
  import * as child_process from "child_process";
@@ -1167,7 +1170,7 @@ function changedFilesSinceSnapshot(directory, baseline) {
1167
1170
  function workspaceSnapshotMatches(expected, current) {
1168
1171
  if (!expected)
1169
1172
  return { ok: true };
1170
- if (path.resolve(expected.directory) !== path.resolve(current.directory)) {
1173
+ if (!sameProjectRoot(expected.directory, current.directory)) {
1171
1174
  return {
1172
1175
  ok: false,
1173
1176
  reason: `directory changed: expected ${expected.directory}, got ${current.directory}`
@@ -9,11 +9,11 @@ import {
9
9
  } from "./index-txdagbh7.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-ze5zyv28.js";
12
+ } from "./index-mr3h3sm5.js";
13
13
  import {
14
14
  assertProjectRoot,
15
15
  withEvidenceLock
16
- } from "./index-fxxja498.js";
16
+ } from "./index-2czt53wz.js";
17
17
  import {
18
18
  exports_external,
19
19
  init_zod
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-g94qqwnz.js";
4
+ } from "./index-wtnx33hz.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-ay9cr8tr.js";
7
+ } from "./index-chcv8c7n.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -94,69 +94,71 @@ import {
94
94
  handleWriteRetroCommand,
95
95
  normalizeSwarmCommandInput,
96
96
  resolveCommand
97
- } from "./index-935ww10s.js";
98
- import"./index-7v3bb0h3.js";
99
- import"./index-12xzj0hm.js";
100
- import"./index-kvb4dwgf.js";
101
- import"./index-x76mprg2.js";
102
- import"./index-9qvmsyab.js";
97
+ } from "./index-52m9kter.js";
98
+ import"./index-yzn1fm9a.js";
99
+ import"./index-b10yvv6h.js";
100
+ import"./index-4pm3v7yc.js";
101
+ import"./index-29w778rw.js";
102
+ import"./index-wgqeqy68.js";
103
103
  import"./index-txdagbh7.js";
104
+ import"./index-cw912re7.js";
104
105
  import"./index-3146wmgv.js";
105
- import"./index-59hvr3f4.js";
106
- import"./index-zypacgjc.js";
107
- import"./index-6f9yvd67.js";
106
+ import"./index-yscwyq3t.js";
107
+ import"./index-bz8vsc8r.js";
108
+ import"./index-ya4ta1pd.js";
108
109
  import"./index-70ha9e09.js";
109
- import"./index-yh8wxegw.js";
110
- import"./index-zjg5ajf5.js";
111
- import"./index-zaab1wz9.js";
112
- import"./index-zfwd65c2.js";
110
+ import"./index-s6ejwhew.js";
111
+ import"./index-bv90qkyw.js";
112
+ import"./index-n4fzmqz8.js";
113
+ import"./index-8ntf8jnj.js";
113
114
  import"./index-zsrtt42s.js";
114
- import"./index-4k16cz8r.js";
115
- import"./index-3f7hqtgg.js";
116
- import"./index-b0m3efpf.js";
117
- import"./index-jzvrvdmr.js";
118
- import"./index-x6zyc38w.js";
115
+ import"./index-bzesypf5.js";
116
+ import"./index-w3gtqey0.js";
117
+ import"./index-sxxh4ams.js";
118
+ import"./index-4v28t7jh.js";
119
+ import"./index-0zjwnbze.js";
119
120
  import"./index-rtry5xyf.js";
120
- import"./index-g5714mpv.js";
121
- import"./index-t1nkr7cz.js";
122
- import"./index-qdbgc16x.js";
123
- import"./index-ddszzne4.js";
124
- import"./index-j3hsjynw.js";
125
- import"./index-j645xpsm.js";
126
- import"./index-pvp5tnn2.js";
121
+ import"./index-px4a2ve0.js";
122
+ import"./index-gkqrk8dd.js";
123
+ import"./index-z39vxvdx.js";
124
+ import"./index-s3z936wh.js";
125
+ import"./index-y6s0gpn3.js";
126
+ import"./index-ry16d01s.js";
127
+ import"./index-3sv8t7ca.js";
127
128
  import"./index-556ja8an.js";
128
129
  import"./index-4fwbbad3.js";
129
130
  import"./index-b43rt5ph.js";
130
131
  import"./index-q7sjgr1y.js";
131
- import"./index-rysxqae0.js";
132
- import"./index-gwg7a00b.js";
133
- import"./index-hdapetg1.js";
132
+ import"./index-ghnbpez3.js";
133
+ import"./index-g2e8b3wm.js";
134
+ import"./index-9ek9d96g.js";
134
135
  import"./index-zg9d392c.js";
135
136
  import"./index-n832052r.js";
136
- import"./index-2c3np82d.js";
137
+ import"./index-8tqqmsav.js";
137
138
  import"./index-z6xqpmqg.js";
138
139
  import"./index-r3mvsbtq.js";
139
- import"./index-ew99d4y6.js";
140
+ import"./index-apdp9bc1.js";
140
141
  import {
141
142
  init_schema,
142
143
  stripKnownSwarmPrefix
143
- } from "./index-5p1tzpwh.js";
144
+ } from "./index-ypjffdrg.js";
144
145
  import"./index-9e6fdz2h.js";
145
146
  import"./index-4rhhvd1a.js";
146
- import"./index-p56xc59p.js";
147
+ import"./index-9ydhzegh.js";
147
148
  import {
148
149
  AGENT_TOOL_MAP,
149
150
  ORCHESTRATOR_NAME,
150
151
  init_constants
151
- } from "./index-m1nrd3yd.js";
152
+ } from "./index-8psybzzf.js";
152
153
  import"./index-zjygnfay.js";
153
154
  import"./index-ae75rja9.js";
154
- import"./index-tegp2mny.js";
155
- import"./index-ze5zyv28.js";
155
+ import"./index-93znbdam.js";
156
+ import"./index-mr3h3sm5.js";
156
157
  import"./index-bk5tah7q.js";
157
- import"./index-fxxja498.js";
158
- import"./index-cyhw0der.js";
159
- import"./index-1dz8hv7p.js";
158
+ import"./index-7qefgq4j.js";
159
+ import"./index-2czt53wz.js";
160
+ import"./index-t1qzjhnj.js";
161
+ import"./index-kvq1e82k.js";
160
162
  import"./index-7g4c7s5r.js";
161
163
  import"./index-bpmtbmy9.js";
162
164
  import"./index-zgwm4ryv.js";
@@ -14,14 +14,14 @@ import {
14
14
  detectWindowsWrites,
15
15
  getSharedClassifierGuardrailBlock,
16
16
  resolveWriteTargets
17
- } from "./index-935ww10s.js";
17
+ } from "./index-52m9kter.js";
18
18
  import {
19
19
  checkFileAuthority,
20
20
  classifyFile,
21
21
  isInDeclaredScope,
22
22
  redactPath,
23
23
  redactShellCommand
24
- } from "./index-12xzj0hm.js";
24
+ } from "./index-b10yvv6h.js";
25
25
 
26
26
  // src/services/guardrail-explain-service.ts
27
27
  import path from "path";
@@ -4,14 +4,14 @@ import {
4
4
  PlanSchema,
5
5
  TaskStatusSchema,
6
6
  init_loader
7
- } from "./index-ew99d4y6.js";
7
+ } from "./index-apdp9bc1.js";
8
8
  import {
9
9
  assertProjectRoot,
10
10
  withEvidenceLock
11
- } from "./index-fxxja498.js";
11
+ } from "./index-2czt53wz.js";
12
12
  import {
13
13
  emit
14
- } from "./index-1dz8hv7p.js";
14
+ } from "./index-kvq1e82k.js";
15
15
  import {
16
16
  criticalWarn,
17
17
  init_logger,
@@ -85,6 +85,12 @@ function getLedgerPath(directory) {
85
85
  function getPlanJsonPath(directory) {
86
86
  return path.join(directory, ".swarm", PLAN_JSON_FILENAME);
87
87
  }
88
+ function compareCodeUnits(a, b) {
89
+ return a < b ? -1 : a > b ? 1 : 0;
90
+ }
91
+ function readLedgerDirectory(directory) {
92
+ return fs.readdirSync(directory);
93
+ }
88
94
  function asRecord(value) {
89
95
  if (value && typeof value === "object" && !Array.isArray(value)) {
90
96
  return value;
@@ -619,7 +625,7 @@ async function replaceTruncatedLedgerWithRecoveryRoot(directory, plan, expected)
619
625
  let archiveName = `plan-ledger.reconcile-archive.${Date.now()}.${Math.floor(Math.random() * 1e9)}${archiveSuffix}`;
620
626
  let archivePath = path.join(swarmDir, archiveName);
621
627
  let archiveNeedsWrite = true;
622
- for (const candidate of fs.readdirSync(swarmDir)) {
628
+ for (const candidate of _internals.readLedgerDirectory(swarmDir).sort(compareCodeUnits)) {
623
629
  if (!candidate.startsWith("plan-ledger.reconcile-archive.") || !candidate.endsWith(archiveSuffix)) {
624
630
  continue;
625
631
  }
@@ -877,7 +883,7 @@ async function quarantineLedgerSuffix(directory, badSuffix) {
877
883
  const hash = crypto.createHash("sha256").update(badSuffix, "utf8").digest("hex").slice(0, 12);
878
884
  const swarmDir = path.join(directory, ".swarm");
879
885
  try {
880
- const existing = fs.readdirSync(swarmDir).filter((name) => name.startsWith("plan-ledger.quarantine.") && name.endsWith(`.${hash}`));
886
+ const existing = _internals.readLedgerDirectory(swarmDir).sort(compareCodeUnits).filter((name) => name.startsWith("plan-ledger.quarantine.") && name.endsWith(`.${hash}`));
881
887
  for (const name of existing) {
882
888
  const existingPath = path.join(swarmDir, name);
883
889
  if (fs.readFileSync(existingPath, "utf8") === badSuffix) {
@@ -959,6 +965,7 @@ var _internals = {
959
965
  getPlanJsonPath,
960
966
  writeFileFsyncedThenRename,
961
967
  fsyncRecoveryDirectory,
968
+ readLedgerDirectory,
962
969
  randomUUID: () => crypto.randomUUID()
963
970
  };
964
971
 
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-rysxqae0.js";
5
+ } from "./index-ghnbpez3.js";
6
6
  import {
7
7
  init_git_executable,
8
8
  resolveGitExecutableAsync
9
9
  } from "./index-9e6fdz2h.js";
10
10
  import {
11
11
  resolveKnowledgeStoreDir
12
- } from "./index-tegp2mny.js";
12
+ } from "./index-93znbdam.js";
13
13
  import {
14
14
  init_knowledge_types,
15
15
  isActiveStatus
@@ -3,7 +3,7 @@ import {
3
3
  ALL_AGENT_NAMES,
4
4
  SUMMARIZER_EXEMPT_TOOL_NAMES,
5
5
  init_constants
6
- } from "./index-m1nrd3yd.js";
6
+ } from "./index-8psybzzf.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.164.6",
24
+ version: "7.164.8",
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",
@@ -148,6 +148,7 @@ var init_package = __esm(() => {
148
148
  "check:gate-portability": "bun run scripts/check-gate-portability.ts",
149
149
  "check:bare-spawn": "bun run scripts/check-bare-executable-spawn.ts",
150
150
  "check:error-channel-discard": "bun run scripts/check-error-channel-discard.ts",
151
+ "check:path-identity": "bun run scripts/check-path-identity.ts",
151
152
  "check:registry-citations": "bun run scripts/check-registry-citations.ts",
152
153
  "check:memory-recall": "bun run scripts/memory-recall-regression.ts"
153
154
  },
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-jzvrvdmr.js";
5
+ } from "./index-4v28t7jh.js";
6
6
  import {
7
7
  withTimeoutSignal
8
8
  } from "./index-q7sjgr1y.js";
@@ -12,11 +12,11 @@ import {
12
12
  resolveHiveKnowledgePath,
13
13
  resolveSwarmKnowledgePath,
14
14
  transactKnowledge
15
- } from "./index-rysxqae0.js";
15
+ } from "./index-ghnbpez3.js";
16
16
  import {
17
17
  effectiveRetrievalOutcomes,
18
18
  readAuthoritativeKnowledgeCounterRollups
19
- } from "./index-gwg7a00b.js";
19
+ } from "./index-g2e8b3wm.js";
20
20
  import {
21
21
  advisoryWarn,
22
22
  init_warning_buffer
@@ -25,10 +25,13 @@ import {
25
25
  init_knowledge_types,
26
26
  isActiveStatus
27
27
  } from "./index-bk5tah7q.js";
28
+ import {
29
+ canonicalRootKeyFresh
30
+ } from "./index-7qefgq4j.js";
28
31
  import {
29
32
  atomicWriteFileAnyRoot,
30
33
  atomicWriteSwarmFile
31
- } from "./index-cyhw0der.js";
34
+ } from "./index-t1qzjhnj.js";
32
35
  import {
33
36
  init_logger,
34
37
  log,
@@ -45,10 +48,10 @@ import * as path4 from "path";
45
48
 
46
49
  // src/config/bundled-skills.ts
47
50
  init_warning_buffer();
48
- init_logger();
49
51
  import { randomUUID } from "crypto";
50
52
  import * as fsp from "fs/promises";
51
53
  import * as path from "path";
54
+ init_logger();
52
55
  var BUNDLED_PROJECT_SKILLS = [
53
56
  "brainstorm",
54
57
  "specify",
@@ -355,7 +358,7 @@ async function performBundledProjectSkillSyncAsync(projectDirectory, packageRoot
355
358
  }
356
359
  }
357
360
  async function syncBundledProjectSkillsIfMissingAsync(projectDirectory, packageRoot, quiet = false) {
358
- const syncKey = path.resolve(projectDirectory, BUNDLED_PROJECT_SKILL_ROOT);
361
+ const syncKey = `${canonicalRootKeyFresh(projectDirectory)}\x00${BUNDLED_PROJECT_SKILL_ROOT}`;
359
362
  const existing = inFlightSyncs.get(syncKey);
360
363
  if (existing)
361
364
  return existing;
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-9qvmsyab.js";
12
+ } from "./index-wgqeqy68.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,
@@ -1,20 +1,21 @@
1
1
  // @bun
2
- import {
3
- canonicalRootKeyFresh
4
- } from "./index-ddszzne4.js";
5
2
  import {
6
3
  validateSwarmPath
7
- } from "./index-2c3np82d.js";
4
+ } from "./index-8tqqmsav.js";
8
5
  import {
9
6
  bunWrite
10
7
  } from "./index-r3mvsbtq.js";
11
8
  import {
12
9
  observeDelegationLedgerPressure
13
- } from "./index-p56xc59p.js";
10
+ } from "./index-9ydhzegh.js";
11
+ import {
12
+ canonicalRootKeyFresh,
13
+ sameProjectRoot
14
+ } from "./index-7qefgq4j.js";
14
15
  import {
15
16
  EvidenceLockTimeoutError,
16
17
  withEvidenceLock
17
- } from "./index-fxxja498.js";
18
+ } from "./index-2czt53wz.js";
18
19
  import {
19
20
  exports_external,
20
21
  init_zod
@@ -1578,7 +1579,7 @@ function loadFoldedState(directory, options) {
1578
1579
  return loadLegacyLedger(directory, options.strict);
1579
1580
  }
1580
1581
  const manifest = manifestRead.manifest;
1581
- if (manifest.rootPath !== path2.resolve(directory)) {
1582
+ if (!sameProjectRoot(manifest.rootPath, directory)) {
1582
1583
  return {
1583
1584
  status: "uncertain",
1584
1585
  reason: "background delegation checkpoint is bound to a different project root",
@@ -2892,6 +2893,9 @@ var RETRYABLE_LEGACY_SETTLEMENT_ERROR_CODES = new Set([
2892
2893
  ]);
2893
2894
  var legacyCoderSettlementReconcilers = new Map;
2894
2895
  var legacyCoderSettlementReconcilerOrder = [];
2896
+ function compareCodeUnits(a, b) {
2897
+ return a < b ? -1 : a > b ? 1 : 0;
2898
+ }
2895
2899
  function registerLegacyCoderSettlementReconciler(directory, reconciler) {
2896
2900
  const key = canonicalRootKeyFresh(directory);
2897
2901
  if (legacyCoderSettlementReconcilers.has(key)) {
@@ -2916,6 +2920,7 @@ function getLegacyCoderSettlementReconciler(directory) {
2916
2920
  }
2917
2921
  var _internals = {
2918
2922
  getLegacyCoderSettlementReconciler,
2923
+ readFallbackDirectory,
2919
2924
  getLegacyCoderSettlementReconcilerOrder: () => [
2920
2925
  ...legacyCoderSettlementReconcilerOrder
2921
2926
  ],
@@ -3371,6 +3376,11 @@ function fallbackPath(directory, correlationId) {
3371
3376
  function fallbackDirectoryPath(directory) {
3372
3377
  return path2.dirname(validateSwarmPath(directory, path2.join(BACKGROUND_DELEGATION_FALLBACK_DIR, ".containment-anchor")));
3373
3378
  }
3379
+ function readFallbackDirectory(directory) {
3380
+ return fs2.readdirSync(fallbackDirectoryPath(directory), {
3381
+ withFileTypes: true
3382
+ });
3383
+ }
3374
3384
  async function readFallbackFile(directory, correlationId) {
3375
3385
  for (let attempt = 0;attempt < 5; attempt++) {
3376
3386
  try {
@@ -3400,9 +3410,7 @@ async function readDelegationFallback(directory, correlationId) {
3400
3410
  async function listDelegationFallbacks(directory) {
3401
3411
  let entries;
3402
3412
  try {
3403
- entries = fs2.readdirSync(fallbackDirectoryPath(directory), {
3404
- withFileTypes: true
3405
- }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).slice(0, MAX_LIVE_BACKGROUND_FALLBACKS);
3413
+ entries = _internals.readFallbackDirectory(directory).sort((a, b) => compareCodeUnits(a.name, b.name)).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).slice(0, MAX_LIVE_BACKGROUND_FALLBACKS);
3406
3414
  } catch {
3407
3415
  return [];
3408
3416
  }
@@ -3422,7 +3430,7 @@ async function scanDelegationFallbacksForRecovery(directory) {
3422
3430
  let entries;
3423
3431
  try {
3424
3432
  fallbackDir = fallbackDirectoryPath(directory);
3425
- entries = fs2.readdirSync(fallbackDir, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json"));
3433
+ entries = _internals.readFallbackDirectory(directory).sort((a, b) => compareCodeUnits(a.name, b.name)).filter((entry) => entry.isFile() && entry.name.endsWith(".json"));
3426
3434
  } catch (error) {
3427
3435
  if (error.code === "ENOENT") {
3428
3436
  return { status: "ok", owners: [] };
@@ -3980,7 +3988,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
3980
3988
  const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
3981
3989
  if (candidates.length === 0)
3982
3990
  return 0;
3983
- const { transferCoderSettlementToBackground } = await import("./coder-settlement-6qgvzx40.js");
3991
+ const { transferCoderSettlementToBackground } = await import("./coder-settlement-qrtjv4jk.js");
3984
3992
  let transferred = 0;
3985
3993
  for (const record of candidates) {
3986
3994
  try {