opencode-swarm 7.164.6 → 7.164.7

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 (93) 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-p8wwmtnn.js} +14 -14
  5. package/dist/cli/{config-doctor-d1cbh67h.js → config-doctor-wxf488mw.js} +5 -3
  6. package/dist/cli/{core-g0cvvj3b.js → core-671ybpbt.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-nvxv8xkk.js} +7 -5
  9. package/dist/cli/{curator-q3qn89wn.js → curator-eaz5rj6k.js} +39 -37
  10. package/dist/cli/curator-llm-factory-swzyfnh6.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-deqsc8hj.js} +19 -16
  13. package/dist/cli/{gate-evidence-mhc0w7vp.js → gate-evidence-mafg71qb.js} +14 -8
  14. package/dist/cli/guardrail-explain-ygq7cx9w.js +69 -0
  15. package/dist/cli/{guardrail-log-0nd1eqvz.js → guardrail-log-k3w9dq6x.js} +9 -8
  16. package/dist/cli/{guardrail-reset-mzeyd6jh.js → guardrail-reset-ae2step4.js} +39 -37
  17. package/dist/cli/hive-promoter-a4cs5sbr.js +83 -0
  18. package/dist/cli/{index-x6zyc38w.js → index-0zjwnbze.js} +1 -1
  19. package/dist/cli/{index-qdbgc16x.js → index-1ekzd5wf.js} +20 -12
  20. package/dist/cli/{index-fxxja498.js → index-2czt53wz.js} +1 -1
  21. package/dist/cli/{index-g5714mpv.js → index-388sxv1b.js} +17 -8
  22. package/dist/cli/{index-kvb4dwgf.js → index-3kgg2n6z.js} +12 -6
  23. package/dist/cli/{index-pvp5tnn2.js → index-3sv8t7ca.js} +2 -2
  24. package/dist/cli/{index-hdapetg1.js → index-46yrz972.js} +3 -3
  25. package/dist/cli/{index-zypacgjc.js → index-4vx89ymn.js} +5 -5
  26. package/dist/cli/{index-6f9yvd67.js → index-581bcqp9.js} +2 -2
  27. package/dist/cli/{index-gwg7a00b.js → index-63enf73z.js} +20 -15
  28. package/dist/cli/index-7qefgq4j.js +71 -0
  29. package/dist/cli/{index-5p1tzpwh.js → index-8ck1jkhd.js} +3 -2
  30. package/dist/cli/{index-zfwd65c2.js → index-8ntf8jnj.js} +19 -18
  31. package/dist/cli/{index-m1nrd3yd.js → index-8psybzzf.js} +1 -1
  32. package/dist/cli/{index-2c3np82d.js → index-8tqqmsav.js} +1 -1
  33. package/dist/cli/{index-tegp2mny.js → index-93znbdam.js} +9 -5
  34. package/dist/cli/{index-x76mprg2.js → index-9qkytpwa.js} +185 -376
  35. package/dist/cli/{index-p56xc59p.js → index-9ydhzegh.js} +28 -17
  36. package/dist/cli/{index-935ww10s.js → index-bvjwmmdc.js} +1233 -1190
  37. package/dist/cli/{index-ty3vtqe2.js → index-c4j9sjcs.js} +4 -4
  38. package/dist/cli/index-cw912re7.js +200 -0
  39. package/dist/cli/{index-j3hsjynw.js → index-fq1wfsmw.js} +100 -97
  40. package/dist/cli/{index-59hvr3f4.js → index-gm65h7bh.js} +9 -6
  41. package/dist/cli/{index-jzvrvdmr.js → index-h3k3rgyr.js} +4 -4
  42. package/dist/cli/{index-12xzj0hm.js → index-jkwfajh1.js} +4 -4
  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-rysxqae0.js → index-rey1tzcw.js} +7 -7
  46. package/dist/cli/index-ry16d01s.js +107 -0
  47. package/dist/cli/{index-ay9cr8tr.js → index-ry4mwbc2.js} +1 -1
  48. package/dist/cli/{index-b0m3efpf.js → index-sxxh4ams.js} +2 -2
  49. package/dist/cli/{index-cyhw0der.js → index-t1qzjhnj.js} +13 -13
  50. package/dist/cli/{index-j645xpsm.js → index-v1fj9exz.js} +12 -5
  51. package/dist/cli/{index-3f7hqtgg.js → index-w3gtqey0.js} +4 -1
  52. package/dist/cli/{index-9qvmsyab.js → index-wgqeqy68.js} +2 -2
  53. package/dist/cli/{index-g94qqwnz.js → index-x2t2tbm2.js} +2 -2
  54. package/dist/cli/{index-zjg5ajf5.js → index-x3qzt684.js} +71 -47
  55. package/dist/cli/{index-t1nkr7cz.js → index-xc3q62ev.js} +2 -2
  56. package/dist/cli/{index-ew99d4y6.js → index-xy59dnvq.js} +1 -1
  57. package/dist/cli/{index-4k16cz8r.js → index-y75xd50f.js} +36 -27
  58. package/dist/cli/{index-7v3bb0h3.js → index-yzn1fm9a.js} +1 -1
  59. package/dist/cli/{index-yh8wxegw.js → index-zg34ngdf.js} +21 -11
  60. package/dist/cli/{index-y4z0rhsa.js → index-zg8tvjb0.js} +41 -39
  61. package/dist/cli/index.js +39 -37
  62. package/dist/cli/{knowledge-escalator-aca0nhqg.js → knowledge-escalator-t532h2ym.js} +15 -14
  63. package/dist/cli/{knowledge-events-n5t313ht.js → knowledge-events-hdtc0cxe.js} +13 -12
  64. package/dist/cli/{knowledge-link-8ea4ksda.js → knowledge-link-hhnmc4g1.js} +6 -5
  65. package/dist/cli/{knowledge-store-j97ejf6a.js → knowledge-store-45jadhmb.js} +7 -6
  66. package/dist/cli/{knowledge-validator-01evhydg.js → knowledge-validator-5e6qbq6h.js} +9 -8
  67. package/dist/cli/{model-preflight-pmnbfzjv.js → model-preflight-bq035tfh.js} +1 -1
  68. package/dist/cli/{pending-delegations-w73abdk3.js → pending-delegations-z0crvst3.js} +7 -7
  69. package/dist/cli/{pr-subscriptions-05dzvavk.js → pr-subscriptions-73fs8y3n.js} +7 -6
  70. package/dist/cli/{pr-workflow-gate-t0tnkx5f.js → pr-workflow-gate-rpdts7wy.js} +39 -37
  71. package/dist/cli/{runner-fh7t0mn9.js → runner-5qqh83e2.js} +6 -6
  72. package/dist/cli/{scan-cursor-63zx2qd8.js → scan-cursor-t75qznf3.js} +8 -7
  73. package/dist/cli/{schema-t1scx08g.js → schema-8dfjsrk6.js} +2 -2
  74. package/dist/cli/{scope-persistence-1a5qmchf.js → scope-persistence-zfmz4sws.js} +12 -10
  75. package/dist/cli/{skill-generator-7werbwgv.js → skill-generator-psdb10jw.js} +17 -16
  76. package/dist/cli/{telemetry-j14cj552.js → telemetry-85gxedng.js} +1 -1
  77. package/dist/cli/{workspace-snapshot-yq0tc49d.js → workspace-snapshot-eh18vgkn.js} +2 -1
  78. package/dist/cli/{worktree-collision-ownership-wzdzky33.js → worktree-collision-ownership-xrqssqzd.js} +12 -15
  79. package/dist/cli/{worktree-isolation-m02ay3kg.js → worktree-isolation-s9m3bgah.js} +39 -37
  80. package/dist/db/canonical-project.d.ts +10 -3
  81. package/dist/db/project-db.d.ts +4 -0
  82. package/dist/evidence/task-gate-repair.d.ts +1 -1
  83. package/dist/gate-evidence.d.ts +19 -1
  84. package/dist/index.js +581 -581
  85. package/dist/plan/ledger.d.ts +2 -0
  86. package/dist/tools/pre-check-batch.d.ts +1 -1
  87. package/dist/utils/canonical-root.d.ts +21 -1
  88. package/dist/utils/filesystem-identity.d.ts +59 -0
  89. package/package.json +2 -1
  90. package/dist/cli/curator-llm-factory-dw7md4nr.js +0 -66
  91. package/dist/cli/guardrail-explain-6cbszhw1.js +0 -67
  92. package/dist/cli/hive-promoter-w7g879cm.js +0 -81
  93. package/dist/cli/index-ddszzne4.js +0 -42
@@ -0,0 +1,71 @@
1
+ // @bun
2
+ // src/utils/canonical-root.ts
3
+ import * as fsSync from "fs";
4
+ import * as path from "path";
5
+ var SESSION_KEY_SEPARATOR = String.fromCharCode(0);
6
+ var canonicalRootMemo = new Map;
7
+ var MAX_CANONICAL_ROOT_CACHE = 128;
8
+ var _internals = {
9
+ realpathSyncNative: fsSync.realpathSync.native,
10
+ realpathSync: fsSync.realpathSync,
11
+ lstatSync: fsSync.lstatSync,
12
+ platform: () => process.platform
13
+ };
14
+ function normalizeIdentityPath(resolved) {
15
+ const normalized = _internals.platform() === "win32" ? path.win32.normalize(resolved) : path.posix.normalize(resolved);
16
+ return _internals.platform() === "win32" ? normalized.toLowerCase() : normalized;
17
+ }
18
+ function lexicalRootAliasKey(directory) {
19
+ return normalizeIdentityPath(path.resolve(directory));
20
+ }
21
+ function resolveCanonicalRootKey(directory) {
22
+ let resolved = path.resolve(directory);
23
+ try {
24
+ resolved = _internals.realpathSyncNative(resolved);
25
+ } catch {
26
+ try {
27
+ resolved = _internals.realpathSync(resolved);
28
+ } catch {}
29
+ }
30
+ return normalizeIdentityPath(resolved);
31
+ }
32
+ function canonicalRootKey(directory) {
33
+ const memoized = canonicalRootMemo.get(directory);
34
+ if (memoized !== undefined) {
35
+ try {
36
+ if (!_internals.lstatSync(directory).isSymbolicLink())
37
+ return memoized;
38
+ } catch {
39
+ return memoized;
40
+ }
41
+ const fresh = resolveCanonicalRootKey(directory);
42
+ if (fresh !== memoized)
43
+ canonicalRootMemo.set(directory, fresh);
44
+ return fresh;
45
+ }
46
+ const key = resolveCanonicalRootKey(directory);
47
+ if (!canonicalRootMemo.has(directory)) {
48
+ while (canonicalRootMemo.size >= MAX_CANONICAL_ROOT_CACHE) {
49
+ const oldest = canonicalRootMemo.keys().next().value;
50
+ if (oldest === undefined)
51
+ break;
52
+ canonicalRootMemo.delete(oldest);
53
+ }
54
+ }
55
+ canonicalRootMemo.set(directory, key);
56
+ return key;
57
+ }
58
+ function canonicalRootKeyFresh(directory) {
59
+ return resolveCanonicalRootKey(directory);
60
+ }
61
+ function sameProjectRoot(a, b) {
62
+ return canonicalRootKeyFresh(a) === canonicalRootKeyFresh(b);
63
+ }
64
+ function compositeSessionKey(directory, sessionId) {
65
+ return `${canonicalRootKey(directory)}${SESSION_KEY_SEPARATOR}${sessionId}`;
66
+ }
67
+ function sessionKeySuffix(sessionId) {
68
+ return `${SESSION_KEY_SEPARATOR}${sessionId}`;
69
+ }
70
+
71
+ export { _internals, lexicalRootAliasKey, canonicalRootKey, canonicalRootKeyFresh, sameProjectRoot, compositeSessionKey, sessionKeySuffix };
@@ -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.7",
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
  },
@@ -1,19 +1,24 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-2c3np82d.js";
4
+ } from "./index-8tqqmsav.js";
5
5
  import {
6
6
  observeStoreHealth
7
- } from "./index-p56xc59p.js";
7
+ } from "./index-9ydhzegh.js";
8
+ import {
9
+ canonicalRootKey,
10
+ canonicalRootKeyFresh,
11
+ sameProjectRoot
12
+ } from "./index-7qefgq4j.js";
8
13
  import {
9
14
  withEvidenceLock
10
- } from "./index-fxxja498.js";
15
+ } from "./index-2czt53wz.js";
11
16
  import {
12
17
  atomicWriteSwarmFileSync
13
- } from "./index-cyhw0der.js";
18
+ } from "./index-t1qzjhnj.js";
14
19
  import {
15
20
  telemetry
16
- } from "./index-1dz8hv7p.js";
21
+ } from "./index-kvq1e82k.js";
17
22
  import {
18
23
  exports_external,
19
24
  init_zod
@@ -166,13 +171,6 @@ function ensureSwarmDir(directory) {
166
171
  function buildCorrelationId(sessionID, repoFullName, prNumber) {
167
172
  return `${sessionID}::${repoFullName}::${prNumber}`;
168
173
  }
169
- function sameProjectRoot(recorded, current) {
170
- const a = path.resolve(recorded);
171
- const b = path.resolve(current);
172
- if (process.platform === "win32")
173
- return a.toLowerCase() === b.toLowerCase();
174
- return a === b;
175
- }
176
174
  function fileSizeOrNull(filePath) {
177
175
  try {
178
176
  return fs.statSync(filePath).size;
@@ -887,22 +885,24 @@ function emitHealthTelemetry(directory, trigger, checkpoint) {
887
885
  }
888
886
  var legacyOverLimitWarned = new Map;
889
887
  function warnLegacyOverLimit(directory, size) {
890
- if (legacyOverLimitWarned.has(directory))
888
+ const key = canonicalRootKey(directory);
889
+ if (legacyOverLimitWarned.has(key))
891
890
  return;
892
891
  if (legacyOverLimitWarned.size >= 32) {
893
892
  legacyOverLimitWarned.delete(legacyOverLimitWarned.keys().next().value);
894
893
  }
895
- legacyOverLimitWarned.set(directory, true);
894
+ legacyOverLimitWarned.set(key, true);
896
895
  log(`[pr-monitor] legacy subscriptions.jsonl is ${size} bytes (>${PR_SUBSCRIPTION_LIMITS.legacySourceMaxBytes}); refusing to fold it \u2014 archive or split the file so its subscriptions can be re-subscribed, then remove it (reported via /swarm pr status)`);
897
896
  }
898
897
  var migrationCapacityWarned = new Map;
899
898
  function warnMigrationCapacity(directory, records) {
900
- if (migrationCapacityWarned.has(directory))
899
+ const key = canonicalRootKey(directory);
900
+ if (migrationCapacityWarned.has(key))
901
901
  return;
902
902
  if (migrationCapacityWarned.size >= 32) {
903
903
  migrationCapacityWarned.delete(migrationCapacityWarned.keys().next().value);
904
904
  }
905
- migrationCapacityWarned.set(directory, true);
905
+ migrationCapacityWarned.set(key, true);
906
906
  log(`[pr-monitor] legacy subscriptions.jsonl folds to ${records} records (>checkpoint capacity ${PR_SUBSCRIPTION_LIMITS.maxCheckpointRecords}); migration refused \u2014 archive or split the file so its subscriptions can be re-subscribed, then remove it`);
907
907
  }
908
908
  function overlayLegacy(directory, checkpoint) {
@@ -1044,12 +1044,13 @@ async function loadViewForRead(directory) {
1044
1044
  }
1045
1045
  var bootstrapAttempted = new Map;
1046
1046
  async function bootstrapCheckpointFromLegacy(directory) {
1047
- if (bootstrapAttempted.has(directory))
1047
+ const key = canonicalRootKeyFresh(directory);
1048
+ if (bootstrapAttempted.has(key))
1048
1049
  return;
1049
1050
  if (bootstrapAttempted.size >= 32) {
1050
1051
  bootstrapAttempted.delete(bootstrapAttempted.keys().next().value);
1051
1052
  }
1052
- bootstrapAttempted.set(directory, true);
1053
+ bootstrapAttempted.set(key, true);
1053
1054
  try {
1054
1055
  await withEvidenceLock(directory, PR_SUBSCRIPTIONS_FILE, STORE_LOCK_AGENT, STORE_LOCK_TASK, async () => {
1055
1056
  if (readCheckpoint(directory).kind !== "absent")
@@ -462,7 +462,7 @@ var init_tool_metadata = __esm(() => {
462
462
  agents: ["architect"]
463
463
  },
464
464
  repair_gate_evidence: {
465
- description: "quarantine corrupt exact-task gate evidence and install a fresh blocked generation that requires every gate to rerun",
465
+ description: "quarantine recoverable exact-task gate evidence, rebuild from durable requirements, recover receipt-backed legacy marker wedges or the exact sentinel-only historical reset, and refuse every other receipt-less reconstruction",
466
466
  agents: ["architect"]
467
467
  },
468
468
  repair_knowledge_receipt_ledger: {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./index-r3mvsbtq.js";
8
8
  import {
9
9
  readCachedTextFile
10
- } from "./index-cyhw0der.js";
10
+ } from "./index-t1qzjhnj.js";
11
11
  import {
12
12
  warn
13
13
  } from "./index-zgwm4ryv.js";
@@ -1,7 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFile
4
- } from "./index-ze5zyv28.js";
4
+ } from "./index-mr3h3sm5.js";
5
+ import {
6
+ canonicalRootKeyFresh
7
+ } from "./index-7qefgq4j.js";
5
8
  import {
6
9
  init_logger,
7
10
  warn
@@ -189,8 +192,9 @@ function pointerStatFingerprint(directory) {
189
192
  }
190
193
  function resolveKnowledgeStoreDir(directory) {
191
194
  const localSwarm = path.join(directory, ".swarm");
195
+ const cacheKey = canonicalRootKeyFresh(directory);
192
196
  const now = Date.now();
193
- const cached = _resolutionCache.get(directory);
197
+ const cached = _resolutionCache.get(cacheKey);
194
198
  const currentStat = pointerStatFingerprint(directory);
195
199
  if (cached && now < cached.expires && cached.pointerStat === currentStat) {
196
200
  return cached.linkDir ?? localSwarm;
@@ -211,12 +215,12 @@ function resolveKnowledgeStoreDir(directory) {
211
215
  } catch {
212
216
  linkDir = null;
213
217
  }
214
- if (!_resolutionCache.has(directory) && _resolutionCache.size >= MAX_CACHE_ENTRIES) {
218
+ if (!_resolutionCache.has(cacheKey) && _resolutionCache.size >= MAX_CACHE_ENTRIES) {
215
219
  const oldest = _resolutionCache.keys().next().value;
216
220
  if (oldest !== undefined)
217
221
  _resolutionCache.delete(oldest);
218
222
  }
219
- _resolutionCache.set(directory, {
223
+ _resolutionCache.set(cacheKey, {
220
224
  linkDir,
221
225
  expires: now + CACHE_TTL_MS,
222
226
  pointerStat: currentStat
@@ -228,7 +232,7 @@ function invalidateKnowledgeStoreDirCache(directory) {
228
232
  _resolutionCache.clear();
229
233
  return;
230
234
  }
231
- _resolutionCache.delete(directory);
235
+ _resolutionCache.delete(canonicalRootKeyFresh(directory));
232
236
  }
233
237
  function isLinked(directory) {
234
238
  return readLinkPointer(directory) !== null;