opencode-swarm 7.144.2 → 7.144.3

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 (61) hide show
  1. package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +96 -0
  2. package/dist/background/pending-delegations.d.ts +20 -0
  3. package/dist/cli/{config-doctor-7dfvxwjb.js → config-doctor-pkr9w2nv.js} +3 -3
  4. package/dist/cli/{core-dwmwdc4y.js → core-7pymdx0b.js} +2 -2
  5. package/dist/cli/{curation-policy-pkb2eeb1.js → curation-policy-y1pqpztb.js} +5 -5
  6. package/dist/cli/curator-drift-2jbjv03a.js +1 -1
  7. package/dist/cli/{curator-llm-factory-rrs1q4hg.js → curator-llm-factory-7are9wjh.js} +32 -32
  8. package/dist/cli/{curator-w213v33y.js → curator-wbzcjd0q.js} +32 -32
  9. package/dist/cli/{evidence-summary-service-t7n2h1he.js → evidence-summary-service-rcgrdm52.js} +13 -13
  10. package/dist/cli/{gate-evidence-xvxn603y.js → gate-evidence-jmzctnhg.js} +6 -6
  11. package/dist/cli/{guardrail-explain-v1mwsnkq.js → guardrail-explain-brgw4sve.js} +33 -33
  12. package/dist/cli/{guardrail-log-dn03dpz2.js → guardrail-log-k1s9xf3h.js} +4 -4
  13. package/dist/cli/{hive-promoter-asjtj7ga.js → hive-promoter-vcj5h0e3.js} +34 -34
  14. package/dist/cli/{index-jsfghpy2.js → index-06cn7haa.js} +2 -2
  15. package/dist/cli/{index-tq5s07ta.js → index-0fgwdtvp.js} +1 -1
  16. package/dist/cli/{index-h3z64mhz.js → index-1brb14xc.js} +1 -1
  17. package/dist/cli/{index-nretd4qn.js → index-247wf23m.js} +363 -182
  18. package/dist/cli/{index-jb4tchvy.js → index-2en8s72h.js} +1 -1
  19. package/dist/cli/{index-gdd4jt6b.js → index-584grrwn.js} +1 -1
  20. package/dist/cli/{index-dhh2j2nd.js → index-6s2q144w.js} +1 -1
  21. package/dist/cli/{index-g2ajae1z.js → index-7554tecy.js} +1 -1
  22. package/dist/cli/{index-k92cagmt.js → index-8214dd7j.js} +2 -2
  23. package/dist/cli/{index-y95nwsge.js → index-8hkjk37c.js} +1 -1
  24. package/dist/cli/{index-ne8cfgw5.js → index-b227mpnk.js} +4 -4
  25. package/dist/cli/{index-w7x7qxz2.js → index-dpfphnmy.js} +1 -1
  26. package/dist/cli/{index-333kvewd.js → index-ep14xc5z.js} +3 -3
  27. package/dist/cli/{index-av0f6mm0.js → index-eya357bk.js} +9 -9
  28. package/dist/cli/{index-tg9fn2dy.js → index-ghzvxj3g.js} +35 -35
  29. package/dist/cli/{index-g1c5fgaw.js → index-j6mfyy0a.js} +3 -3
  30. package/dist/cli/{index-4fda8kkw.js → index-krxcxkdq.js} +13 -3
  31. package/dist/cli/{index-zr370283.js → index-p7hbphaq.js} +3 -3
  32. package/dist/cli/{index-hqvt3mhk.js → index-p863y7xx.js} +1 -1
  33. package/dist/cli/{index-7ca3a6gj.js → index-pag8nsb1.js} +10 -10
  34. package/dist/cli/{index-p3tnmkvc.js → index-pr8vhj6j.js} +12 -12
  35. package/dist/cli/{index-dg2w0wr4.js → index-qj22wyw2.js} +2 -2
  36. package/dist/cli/{index-qpt8ahph.js → index-satc0vs6.js} +11 -11
  37. package/dist/cli/{index-m6wv2qdr.js → index-wck434f8.js} +2 -2
  38. package/dist/cli/{index-d55crzd4.js → index-x68tw7v3.js} +5 -5
  39. package/dist/cli/{index-ckrasab9.js → index-xwpmxpb7.js} +9 -9
  40. package/dist/cli/{index-erfnw81g.js → index-zswmbm15.js} +1 -1
  41. package/dist/cli/{index-4q9vfav6.js → index-zwrqe065.js} +1 -1
  42. package/dist/cli/index.js +33 -33
  43. package/dist/cli/{knowledge-escalator-cg19dhe5.js → knowledge-escalator-x6jrcrwj.js} +12 -12
  44. package/dist/cli/{knowledge-events-yzvysaqd.js → knowledge-events-aw22r72m.js} +10 -10
  45. package/dist/cli/{knowledge-link-fn5j3r4q.js → knowledge-link-bntppte4.js} +4 -4
  46. package/dist/cli/{knowledge-store-6f77xpmm.js → knowledge-store-19xg1rw1.js} +6 -6
  47. package/dist/cli/{knowledge-validator-4b28zdxa.js → knowledge-validator-8wh82z0a.js} +8 -8
  48. package/dist/cli/{pending-delegations-thy8g30k.js → pending-delegations-1y303j3k.js} +3 -3
  49. package/dist/cli/{pr-subscriptions-jyav582d.js → pr-subscriptions-wvd041rp.js} +3 -3
  50. package/dist/cli/{runner-pde6b5sx.js → runner-jn55k8xb.js} +5 -5
  51. package/dist/cli/{scan-cursor-nqbb1xt6.js → scan-cursor-429r5db9.js} +7 -7
  52. package/dist/cli/{schema-jj2pb6zp.js → schema-jdwjcby0.js} +1 -1
  53. package/dist/cli/{scope-persistence-63nasq0z.js → scope-persistence-s0s1bz15.js} +6 -6
  54. package/dist/cli/{skill-generator-nsymtdqm.js → skill-generator-ffbj0ye5.js} +15 -15
  55. package/dist/cli/{worktree-collision-ownership-j6d33p49.js → worktree-collision-ownership-z5ftwjz3.js} +6 -6
  56. package/dist/cli/{worktree-isolation-g54kxw6x.js → worktree-isolation-y2p93438.js} +32 -32
  57. package/dist/commands/registry.d.ts +1 -1
  58. package/dist/hooks/pr-workflow-gate.d.ts +132 -3
  59. package/dist/index.js +289 -289
  60. package/package.json +1 -1
  61. package/dist/cli/{index-k31en0ja.js → index-wd24zn2e.js} +3 -3
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  stableCanonicalStringify
4
- } from "./index-g2ajae1z.js";
4
+ } from "./index-7554tecy.js";
5
5
  import {
6
6
  detectStraySwarmDirs,
7
7
  readDoctorArtifact,
8
8
  removeStraySwarmDir,
9
9
  runConfigDoctor
10
- } from "./index-jb4tchvy.js";
10
+ } from "./index-2en8s72h.js";
11
11
  import {
12
12
  MAX_TRANSIENT_RETRIES,
13
13
  archiveEvidence,
@@ -55,7 +55,7 @@ import {
55
55
  updateTaskStatus,
56
56
  validateProjectRoot,
57
57
  validateSymlinkBoundary
58
- } from "./index-qpt8ahph.js";
58
+ } from "./index-satc0vs6.js";
59
59
  import {
60
60
  loadDatabaseCtor
61
61
  } from "./index-134d35c1.js";
@@ -75,7 +75,7 @@ import {
75
75
  resolveExecutableFromPath,
76
76
  runEvaluation,
77
77
  runExternalTool
78
- } from "./index-4q9vfav6.js";
78
+ } from "./index-zwrqe065.js";
79
79
  import {
80
80
  EvaluationTaskV1Schema,
81
81
  GateAuditManifestV1Schema,
@@ -92,7 +92,7 @@ import {
92
92
  saveGateAuditResult,
93
93
  savePromotionDecision,
94
94
  saveTaskSetSnapshot
95
- } from "./index-k92cagmt.js";
95
+ } from "./index-8214dd7j.js";
96
96
  import {
97
97
  canonicalHash,
98
98
  canonicalJson,
@@ -108,7 +108,7 @@ import {
108
108
  alreadyCuratedThisGeneration,
109
109
  claimNextScanBatch,
110
110
  resolveCohortId
111
- } from "./index-m6wv2qdr.js";
111
+ } from "./index-wck434f8.js";
112
112
  import {
113
113
  CURATOR_INIT_PROMPT,
114
114
  CURATOR_PHASE_PROMPT,
@@ -126,24 +126,6 @@ import {
126
126
  validateSpeckit,
127
127
  writeProjectedSpecSync
128
128
  } from "./index-9ss2m4rs.js";
129
- import {
130
- TASK_WORKFLOW_SCHEMA_MARKER,
131
- _internals as _internals2,
132
- attemptMergeBackFromDirty,
133
- cleanupOrphanedBranches,
134
- compareTaskWorkflowStateRank,
135
- getMergeStrategy,
136
- getTaskWorkflowSnapshot,
137
- listRecoveryRecords,
138
- parseTaskEvidence,
139
- postMergeCleanup,
140
- pruneStaleWorktreeMetadata,
141
- readWorkflowWalFile,
142
- reconcileLandedMerge,
143
- startupOrphanRecovery,
144
- withTaskEvidenceTransaction,
145
- writeWorkflowWalFile
146
- } from "./index-d55crzd4.js";
147
129
  import {
148
130
  changedFilesSinceSnapshot,
149
131
  parsePorcelainV2Snapshot,
@@ -170,6 +152,12 @@ import {
170
152
  resolveRemoteRefsContainingHeadAsync,
171
153
  switchPrFeedbackTrackingCandidateAsync
172
154
  } from "./index-74hpm6sh.js";
155
+ import {
156
+ buildCorrelationId,
157
+ listActive,
158
+ subscribe,
159
+ unsubscribe
160
+ } from "./index-584grrwn.js";
173
161
  import {
174
162
  BUNDLED_PROJECT_SKILL_ROOT,
175
163
  DEFAULT_SKILL_MIN_CONFIDENCE,
@@ -190,50 +178,34 @@ import {
190
178
  retireSkill,
191
179
  selectCandidateEntries,
192
180
  syncBundledProjectSkillsIfMissingAsync
193
- } from "./index-7ca3a6gj.js";
181
+ } from "./index-pag8nsb1.js";
194
182
  import {
195
183
  readRecentEscalations
196
- } from "./index-av0f6mm0.js";
184
+ } from "./index-eya357bk.js";
197
185
  import {
198
- MAX_PENDING_SCOPE_BINDINGS,
199
- canonicalWorkspaceIdentity,
200
- clearAllScopes,
201
- clearScopeBindingFromDisk,
202
- clearScopeBindings
203
- } from "./index-zr370283.js";
204
- import {
205
- appendLedgerEvent,
206
- computePlanHash,
207
- computePlanStructureHash,
208
- derivePlanId,
209
- derivePlanIdentityHash,
210
- getOrAdoptPlanEpochUnderLock,
211
- initLedger,
212
- readLedgerEvents,
213
- readPlanEpochIdentity,
214
- replayFromLedgerWithStatus,
215
- takeSnapshotEvent
216
- } from "./index-g1c5fgaw.js";
186
+ appendUnactionable,
187
+ quarantineEntry,
188
+ resolveUnactionablePath,
189
+ restoreEntry,
190
+ unarchiveEntry,
191
+ validateActionability,
192
+ validateActionableFields,
193
+ validateLesson,
194
+ validateSkillPath
195
+ } from "./index-b227mpnk.js";
217
196
  import {
218
- isPathWithinDeclaredScope
219
- } from "./index-556ja8an.js";
197
+ authorizeCuration,
198
+ buildConfigFingerprintInput
199
+ } from "./index-0fgwdtvp.js";
220
200
  import {
221
- buildCorrelationId,
222
- listActive,
223
- subscribe,
224
- unsubscribe
225
- } from "./index-gdd4jt6b.js";
201
+ cohortConfigFingerprint
202
+ } from "./index-rtry5xyf.js";
226
203
  import {
227
204
  clearWorktreeMergeStatus,
228
205
  getAllWorktreeMergeFailures,
229
206
  initDurableStatusPath,
230
207
  recordWorktreeMergeFailure
231
208
  } from "./index-zsrtt42s.js";
232
- import {
233
- WORKTREE_LIFECYCLE_LOCK_FILE,
234
- recordWorktreeProvisioningOwner,
235
- removeWorktreeProvisioningOwner
236
- } from "./index-k3cxyk66.js";
237
209
  import {
238
210
  DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
239
211
  DELEGATION_COMPACTION_HIGH_WATER_BYTES,
@@ -243,15 +215,57 @@ import {
243
215
  findByBatchId,
244
216
  readDelegations,
245
217
  sweepStaleDelegations
246
- } from "./index-4fda8kkw.js";
218
+ } from "./index-krxcxkdq.js";
219
+ import {
220
+ WORKTREE_LIFECYCLE_LOCK_FILE,
221
+ recordWorktreeProvisioningOwner,
222
+ removeWorktreeProvisioningOwner
223
+ } from "./index-k3cxyk66.js";
224
+ import {
225
+ TASK_WORKFLOW_SCHEMA_MARKER,
226
+ _internals,
227
+ attemptMergeBackFromDirty,
228
+ cleanupOrphanedBranches,
229
+ compareTaskWorkflowStateRank,
230
+ getMergeStrategy,
231
+ getTaskWorkflowSnapshot,
232
+ listRecoveryRecords,
233
+ parseTaskEvidence,
234
+ postMergeCleanup,
235
+ pruneStaleWorktreeMetadata,
236
+ readWorkflowWalFile,
237
+ reconcileLandedMerge,
238
+ startupOrphanRecovery,
239
+ withTaskEvidenceTransaction,
240
+ writeWorkflowWalFile
241
+ } from "./index-x68tw7v3.js";
247
242
  import {
248
243
  provisionWorktree,
249
244
  removeWorktree
250
- } from "./index-dhh2j2nd.js";
245
+ } from "./index-6s2q144w.js";
251
246
  import {
252
- SandboxCapabilityProbe,
253
- init_capability_probe
254
- } from "./index-8fwhhayc.js";
247
+ MAX_PENDING_SCOPE_BINDINGS,
248
+ canonicalWorkspaceIdentity,
249
+ clearAllScopes,
250
+ clearScopeBindingFromDisk,
251
+ clearScopeBindings
252
+ } from "./index-p7hbphaq.js";
253
+ import {
254
+ appendLedgerEvent,
255
+ computePlanHash,
256
+ computePlanStructureHash,
257
+ derivePlanId,
258
+ derivePlanIdentityHash,
259
+ getOrAdoptPlanEpochUnderLock,
260
+ initLedger,
261
+ readLedgerEvents,
262
+ readPlanEpochIdentity,
263
+ replayFromLedgerWithStatus,
264
+ takeSnapshotEvent
265
+ } from "./index-j6mfyy0a.js";
266
+ import {
267
+ isPathWithinDeclaredScope
268
+ } from "./index-556ja8an.js";
255
269
  import {
256
270
  getLanguageForExtension
257
271
  } from "./index-7sy3aa9m.js";
@@ -259,9 +273,43 @@ import {
259
273
  withTimeout,
260
274
  yieldToEventLoop
261
275
  } from "./index-wx8zdh4a.js";
276
+ import {
277
+ SandboxCapabilityProbe,
278
+ init_capability_probe
279
+ } from "./index-8fwhhayc.js";
280
+ import {
281
+ appendKnowledge,
282
+ appendRejectedLesson,
283
+ appendRetractionRecord,
284
+ appendRewriteHistory,
285
+ bumpKnowledgeConfidenceBatch,
286
+ computeConfidence,
287
+ computeContentHash,
288
+ computeOutcomeSignal,
289
+ dedupeCapped,
290
+ enforceKnowledgeCap,
291
+ findActiveSwarmNearDuplicate,
292
+ findNearDuplicate,
293
+ getArchivedKnowledgeIds,
294
+ inferTags,
295
+ isActiveSwarmKnowledgeEntry,
296
+ jaccardBigram,
297
+ normalize,
298
+ readKnowledge,
299
+ readRejectedLessons,
300
+ readRetractionRecords,
301
+ reinforceSwarmKnowledgeEntry,
302
+ resolveHiveKnowledgePath as resolveHiveKnowledgePath2,
303
+ resolveSwarmKnowledgePath,
304
+ rewriteKnowledge,
305
+ selectKnowledgeCapSurvivors,
306
+ transactFile,
307
+ transactKnowledge,
308
+ wordBigrams
309
+ } from "./index-xwpmxpb7.js";
262
310
  import {
263
311
  MAX_EVENT_LOG_ENTRIES,
264
- _internals,
312
+ _internals as _internals2,
265
313
  effectiveRetrievalOutcomes,
266
314
  queryHistoricalOutcomes,
267
315
  readAuthoritativeKnowledgeCounterRollups,
@@ -272,20 +320,25 @@ import {
272
320
  recordKnowledgeEvent,
273
321
  recordPhaseCloseIntent,
274
322
  resolveKnowledgeEventsPath
275
- } from "./index-p3tnmkvc.js";
323
+ } from "./index-pr8vhj6j.js";
276
324
  import {
277
325
  resolveWorktreeIsolationConfig
278
- } from "./index-dg2w0wr4.js";
326
+ } from "./index-qj22wyw2.js";
279
327
  import {
280
328
  RetrospectiveEvidenceSchema
281
329
  } from "./index-gprxjmm7.js";
330
+ import {
331
+ readSwarmFileAsync,
332
+ safeHook,
333
+ validateSwarmPath
334
+ } from "./index-rn0eq85g.js";
282
335
  import {
283
336
  PlanSchema,
284
337
  exports_loader,
285
338
  init_loader,
286
339
  loadPluginConfig,
287
340
  loadPluginConfigWithMeta
288
- } from "./index-y95nwsge.js";
341
+ } from "./index-8hkjk37c.js";
289
342
  import {
290
343
  DEFAULT_SKILL_OPT_CONFIG,
291
344
  FALLBACK_MODELS_MAX,
@@ -299,12 +352,7 @@ import {
299
352
  package_default,
300
353
  resolveAutoReviewConfig,
301
354
  stripKnownSwarmPrefix
302
- } from "./index-h3z64mhz.js";
303
- import {
304
- readSwarmFileAsync,
305
- safeHook,
306
- validateSwarmPath
307
- } from "./index-rn0eq85g.js";
355
+ } from "./index-1brb14xc.js";
308
356
  import {
309
357
  advisoryWarn,
310
358
  getDeferredWarnings,
@@ -324,54 +372,6 @@ import {
324
372
  init_constants,
325
373
  init_tool_metadata
326
374
  } from "./index-whezv7vc.js";
327
- import {
328
- appendUnactionable,
329
- quarantineEntry,
330
- resolveUnactionablePath,
331
- restoreEntry,
332
- unarchiveEntry,
333
- validateActionability,
334
- validateActionableFields,
335
- validateLesson,
336
- validateSkillPath
337
- } from "./index-ne8cfgw5.js";
338
- import {
339
- authorizeCuration,
340
- buildConfigFingerprintInput
341
- } from "./index-tq5s07ta.js";
342
- import {
343
- cohortConfigFingerprint
344
- } from "./index-rtry5xyf.js";
345
- import {
346
- appendKnowledge,
347
- appendRejectedLesson,
348
- appendRetractionRecord,
349
- appendRewriteHistory,
350
- bumpKnowledgeConfidenceBatch,
351
- computeConfidence,
352
- computeContentHash,
353
- computeOutcomeSignal,
354
- dedupeCapped,
355
- enforceKnowledgeCap,
356
- findActiveSwarmNearDuplicate,
357
- findNearDuplicate,
358
- getArchivedKnowledgeIds,
359
- inferTags,
360
- isActiveSwarmKnowledgeEntry,
361
- jaccardBigram,
362
- normalize,
363
- readKnowledge,
364
- readRejectedLessons,
365
- readRetractionRecords,
366
- reinforceSwarmKnowledgeEntry,
367
- resolveHiveKnowledgePath as resolveHiveKnowledgePath2,
368
- resolveSwarmKnowledgePath,
369
- rewriteKnowledge,
370
- selectKnowledgeCapSurvivors,
371
- transactFile,
372
- transactKnowledge,
373
- wordBigrams
374
- } from "./index-ckrasab9.js";
375
375
  import {
376
376
  resolveHiveDataDir,
377
377
  resolveHiveEventsPath,
@@ -387,35 +387,35 @@ import {
387
387
  resolveLinkDir,
388
388
  sanitizeLinkId,
389
389
  writeLinkPointer
390
- } from "./index-w7x7qxz2.js";
390
+ } from "./index-dpfphnmy.js";
391
391
  import {
392
392
  atomicWriteFile
393
- } from "./index-erfnw81g.js";
393
+ } from "./index-zswmbm15.js";
394
+ import {
395
+ invalidateCachedArtifact,
396
+ resetSwarmArtifactCache
397
+ } from "./index-ed5ykebp.js";
394
398
  import {
395
399
  KNOWLEDGE_SCHEMA_VERSION,
396
400
  OUTCOME_BLOCK_THRESHOLD,
397
401
  init_knowledge_types,
398
402
  isActiveStatus
399
403
  } from "./index-bk5tah7q.js";
400
- import {
401
- invalidateCachedArtifact,
402
- resetSwarmArtifactCache
403
- } from "./index-ed5ykebp.js";
404
404
  import {
405
405
  assertProjectRoot,
406
406
  hasExplicitProjectBoundary,
407
407
  isStrictPathDescendant,
408
408
  tryAcquireLock,
409
409
  withEvidenceLock
410
- } from "./index-k31en0ja.js";
411
- import {
412
- require_proper_lockfile
413
- } from "./index-7g4c7s5r.js";
410
+ } from "./index-wd24zn2e.js";
414
411
  import {
415
412
  emit,
416
413
  getLastHeartbeat,
417
414
  telemetry
418
415
  } from "./index-s2rcz51a.js";
416
+ import {
417
+ require_proper_lockfile
418
+ } from "./index-7g4c7s5r.js";
419
419
  import {
420
420
  exports_external,
421
421
  init_zod
@@ -4163,7 +4163,7 @@ async function cleanupRecoveredWorktree(directory, descriptor) {
4163
4163
  awaitingMergeByCallID,
4164
4164
  cleanupStandardWorktreeForCallId,
4165
4165
  standardWorktreeByCallID
4166
- } = await import("./worktree-isolation-g54kxw6x.js");
4166
+ } = await import("./worktree-isolation-y2p93438.js");
4167
4167
  standardWorktreeByCallID.delete(descriptor.callID);
4168
4168
  if (hasResidue)
4169
4169
  awaitingMergeByCallID.set(descriptor.callID, {
@@ -4242,7 +4242,7 @@ async function recoverCoderSettlement(directory, taskId) {
4242
4242
  awaitingMergeByCallID,
4243
4243
  finishStandardWorktreeDispatch,
4244
4244
  standardWorktreeByCallID
4245
- } = await import("./worktree-isolation-g54kxw6x.js");
4245
+ } = await import("./worktree-isolation-y2p93438.js");
4246
4246
  const descriptor = wal.worktree;
4247
4247
  const reconstructedDispatch = {
4248
4248
  callID: descriptor.callID,
@@ -6924,6 +6924,64 @@ var PR_WORKFLOW_STALE_LANE_TIMEOUT_MS = DEFAULT_STALE_DELEGATION_TIMEOUT_MS;
6924
6924
  var MAX_DISCLOSED_LANE_IDS = 10;
6925
6925
  var PR_WORKFLOW_SWEEPABLE_LANE_STATUSES = new Set(["pending", "running"]);
6926
6926
  var CAS_ESCAPE_DISCLOSURE = "state revision unsalvageable; cleared without compare-and-swap";
6927
+ var PR_WORKFLOW_LANE_LIVENESS_PROBE_TIMEOUT_MS = 5000;
6928
+ var LIVE_SESSION_STATUS_TYPES = new Set([
6929
+ "busy",
6930
+ "retry"
6931
+ ]);
6932
+ function isLiveSessionStatusType(type) {
6933
+ return LIVE_SESSION_STATUS_TYPES.has(type);
6934
+ }
6935
+ var defaultGetSessionOps = () => swarmState.opencodeClient?.session ?? null;
6936
+ async function probeAlivePrWorkflowLaneSessions(directory, records) {
6937
+ const session = _test_exports.getSessionOps();
6938
+ const statusOp = session?.status;
6939
+ if (!session || typeof statusOp !== "function") {
6940
+ return { alive: new Set, degradedReason: "probe-unavailable" };
6941
+ }
6942
+ const timeoutError = new Error("PR workflow lane liveness probe exceeded its deadline");
6943
+ let response;
6944
+ try {
6945
+ response = await withTimeout((async () => statusOp.call(session, { query: { directory } }))(), _test_exports.laneLivenessProbeTimeoutMs, timeoutError);
6946
+ } catch (error2) {
6947
+ return {
6948
+ alive: new Set,
6949
+ degradedReason: error2 === timeoutError ? "probe-timeout" : "probe-error"
6950
+ };
6951
+ }
6952
+ try {
6953
+ if (response?.error) {
6954
+ return { alive: new Set, degradedReason: "probe-error" };
6955
+ }
6956
+ const data = response?.data;
6957
+ if (data === null || data === undefined) {
6958
+ return { alive: new Set, degradedReason: "probe-no-data" };
6959
+ }
6960
+ const accumulated = new Set;
6961
+ for (const record of records) {
6962
+ const subagentSessionId = record.subagentSessionId;
6963
+ if (!subagentSessionId)
6964
+ continue;
6965
+ const type = data[subagentSessionId]?.type;
6966
+ if (typeof type === "string" && isLiveSessionStatusType(type)) {
6967
+ accumulated.add(subagentSessionId);
6968
+ }
6969
+ }
6970
+ return { alive: accumulated };
6971
+ } catch {
6972
+ return { alive: new Set, degradedReason: "probe-error" };
6973
+ }
6974
+ }
6975
+ function describePrWorkflowLaneProbe(settlement) {
6976
+ const parts = [];
6977
+ if (settlement.probedAliveLaneIds?.length) {
6978
+ parts.push(`liveness probe reports still running: ${settlement.probedAliveLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}`);
6979
+ }
6980
+ if (settlement.probeDegradedReason) {
6981
+ parts.push(`liveness probe degraded (${settlement.probeDegradedReason})`);
6982
+ }
6983
+ return parts.length > 0 ? ` (${parts.join("; ")})` : "";
6984
+ }
6927
6985
  function prWorkflowLaneLabel(record) {
6928
6986
  return record.laneId ?? record.subagentSessionId ?? "unknown";
6929
6987
  }
@@ -6943,15 +7001,58 @@ async function settlePresumedStalePrWorkflowLanes(directory, sessionID) {
6943
7001
  open2.push(record);
6944
7002
  }
6945
7003
  }
6946
- const presumedStaleLaneIds = presumedStale.map(prWorkflowLaneLabel);
6947
- const openLaneIds = open2.map(prWorkflowLaneLabel);
6948
7004
  if (presumedStale.length === 0) {
6949
- return { openLaneIds, openLanes: open2.length, presumedStaleLaneIds };
7005
+ const freshOnlyLaneIds = open2.map(prWorkflowLaneLabel);
7006
+ return {
7007
+ openLaneIds: freshOnlyLaneIds,
7008
+ openLanes: open2.length,
7009
+ freshOpenLanes: open2.length,
7010
+ presumedStaleLaneIds: []
7011
+ };
6950
7012
  }
6951
- const disclosure = `${presumedStaleLaneIds.length} lane(s) stale >` + `${Math.round(PR_WORKFLOW_STALE_LANE_TIMEOUT_MS / 60000)}min, ` + `treated as settled: ${presumedStaleLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}`;
6952
- await sweepStaleDelegations(directory, PR_WORKFLOW_STALE_LANE_TIMEOUT_MS, {
6953
- statuses: PR_WORKFLOW_SWEEPABLE_LANE_STATUSES
6954
- });
7013
+ let probe;
7014
+ try {
7015
+ probe = await _test_exports.probeLaneLivenessAsync(directory, presumedStale);
7016
+ } catch {
7017
+ probe = { alive: new Set, degradedReason: "probe-error" };
7018
+ }
7019
+ const probeRetained = [];
7020
+ const settled = [];
7021
+ for (const record of presumedStale) {
7022
+ if (record.subagentSessionId && probe.alive.has(record.subagentSessionId)) {
7023
+ probeRetained.push(record);
7024
+ } else {
7025
+ settled.push(record);
7026
+ }
7027
+ }
7028
+ const probedAliveLaneIds = probeRetained.map(prWorkflowLaneLabel);
7029
+ const openLaneIds = [...open2.map(prWorkflowLaneLabel), ...probedAliveLaneIds];
7030
+ const retentionDisclosure = probeRetained.length > 0 ? `${probeRetained.length} lane(s) past the horizon retained: ` + `liveness probe reports still running: ${probedAliveLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}` : undefined;
7031
+ const retentionFields = {
7032
+ ...probedAliveLaneIds.length > 0 ? {
7033
+ probedAliveLaneIds,
7034
+ probeRetainedCorrelationIds: probeRetained.map((record) => record.correlationId)
7035
+ } : {},
7036
+ ...probe.degradedReason ? { probeDegradedReason: probe.degradedReason } : {}
7037
+ };
7038
+ if (settled.length === 0) {
7039
+ return {
7040
+ openLaneIds,
7041
+ openLanes: openLaneIds.length,
7042
+ freshOpenLanes: open2.length,
7043
+ presumedStaleLaneIds: [],
7044
+ ...retentionFields,
7045
+ disclosure: retentionDisclosure
7046
+ };
7047
+ }
7048
+ const presumedStaleLaneIds = settled.map(prWorkflowLaneLabel);
7049
+ const disclosure = `${presumedStaleLaneIds.length} lane(s) stale >` + `${Math.round(PR_WORKFLOW_STALE_LANE_TIMEOUT_MS / 60000)}min, ` + `treated as settled: ${presumedStaleLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}` + (probe.degradedReason ? `; settled despite liveness probe failure (${probe.degradedReason})` : "; liveness probe found no live session") + (retentionDisclosure ? `; ${retentionDisclosure}` : "");
7050
+ try {
7051
+ await _test_exports.sweepStaleDelegationsAsync(directory, PR_WORKFLOW_STALE_LANE_TIMEOUT_MS, {
7052
+ statuses: PR_WORKFLOW_SWEEPABLE_LANE_STATUSES,
7053
+ excludeCorrelationIds: new Set(probeRetained.map((record) => record.correlationId))
7054
+ });
7055
+ } catch {}
6955
7056
  try {
6956
7057
  await fsp2.appendFile(validateSwarmPath(directory, "events.jsonl"), `${JSON.stringify({
6957
7058
  type: "pr_workflow_lanes_presumed_stale",
@@ -6959,17 +7060,48 @@ async function settlePresumedStalePrWorkflowLanes(directory, sessionID) {
6959
7060
  sessionID,
6960
7061
  presumedStaleLanes: presumedStaleLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS),
6961
7062
  staleTimeoutMs: PR_WORKFLOW_STALE_LANE_TIMEOUT_MS,
7063
+ probeStatus: probe.degradedReason ?? "ok",
7064
+ probedAliveLanes: probedAliveLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS),
6962
7065
  disclosure
6963
7066
  })}
6964
7067
  `, "utf-8");
6965
7068
  } catch {}
6966
7069
  return {
6967
7070
  openLaneIds,
6968
- openLanes: open2.length,
7071
+ openLanes: openLaneIds.length,
7072
+ freshOpenLanes: open2.length,
6969
7073
  presumedStaleLaneIds,
7074
+ ...retentionFields,
6970
7075
  disclosure
6971
7076
  };
6972
7077
  }
7078
+ async function finalizeOverriddenProbeRetainedLanes(directory, sessionID, correlationIds) {
7079
+ try {
7080
+ await _test_exports.sweepStaleDelegationsAsync(directory, PR_WORKFLOW_STALE_LANE_TIMEOUT_MS, {
7081
+ statuses: PR_WORKFLOW_SWEEPABLE_LANE_STATUSES,
7082
+ includeCorrelationIds: new Set(correlationIds)
7083
+ });
7084
+ } catch {}
7085
+ const targeted = new Set(correlationIds);
7086
+ const outcome = {
7087
+ sessionOpenLaneIds: [],
7088
+ finalizedLaneIds: [],
7089
+ sparedLaneDescriptions: []
7090
+ };
7091
+ for (const record of readDelegations(directory)) {
7092
+ if (isOpenPrWorkflowLane(record, sessionID)) {
7093
+ outcome.sessionOpenLaneIds.push(record.correlationId);
7094
+ }
7095
+ if (!targeted.has(record.correlationId))
7096
+ continue;
7097
+ if (record.status === "stale") {
7098
+ outcome.finalizedLaneIds.push(record.correlationId);
7099
+ } else if (record.status !== "pending" && record.status !== "running") {
7100
+ outcome.sparedLaneDescriptions.push(`${record.correlationId} (${record.status})`);
7101
+ }
7102
+ }
7103
+ return outcome;
7104
+ }
6973
7105
  async function abortPrWorkflow(directory, sessionID, options = { kind: "recovery", reason: "" }) {
6974
7106
  const recovery = await readPrWorkflowGateStateForRecovery(directory, sessionID);
6975
7107
  if (!recovery)
@@ -6982,14 +7114,18 @@ async function abortPrWorkflow(directory, sessionID, options = { kind: "recovery
6982
7114
  throw new Error(`BLOCKED: ${state.mode} is armed for publication; abort is blocked. Complete the workflow with complete_pr_workflow (or push the bound commit first) before aborting.` + (recovery.armedShapeUnreadable ? " The publication-arming record is itself unreadable, so it is treated as armed (fail-closed)." : ""));
6983
7115
  }
6984
7116
  const laneSettlement = await settlePresumedStalePrWorkflowLanes(directory, state.sessionID);
6985
- if (laneSettlement.openLanes > 0) {
7117
+ const probeRetainedLanes = laneSettlement.probedAliveLaneIds ?? [];
7118
+ const overridesProbeRetention = options.kind === "force" && laneSettlement.freshOpenLanes === 0 && probeRetainedLanes.length > 0;
7119
+ if (laneSettlement.openLanes > 0 && !overridesProbeRetention) {
6986
7120
  const laneIds = laneSettlement.openLaneIds.filter(Boolean).slice(0, MAX_DISCLOSED_LANE_IDS).join(", ");
6987
- throw new Error(`BLOCKED: ${state.mode} abort refused while ${laneSettlement.openLanes} PR workflow lane(s) are still in flight (lane ids: ${laneIds}). Collect their results or let them settle before aborting.`);
7121
+ throw new Error(`BLOCKED: ${state.mode} abort refused while ${laneSettlement.openLanes} PR workflow lane(s) are still in flight (lane ids: ${laneIds}). Collect their results or let them settle before aborting.` + describePrWorkflowLaneProbe(laneSettlement));
6988
7122
  }
6989
7123
  const sanitizedReason = typeof options.reason === "string" && options.reason.trim().length > 0 ? options.reason.trim().slice(0, 500) : undefined;
6990
7124
  if (sanitizedReason === undefined) {
6991
7125
  throw new Error(`BLOCKED: ${state.mode} abort requires a non-empty reason (recorded to the audit trail).`);
6992
7126
  }
7127
+ const overrideTargetedLaneIds = overridesProbeRetention ? laneSettlement.probeRetainedCorrelationIds ?? [] : [];
7128
+ const probeRetentionOverrideDecision = overridesProbeRetention ? `force abort overrode ${probeRetainedLanes.length} lane(s) past the staleness horizon that the liveness probe reported as still running: ${probeRetainedLanes.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}. Their sessions were NOT stopped and their output was NOT collected.` : undefined;
6993
7129
  const abortEvent = {
6994
7130
  type: "pr_workflow_aborted",
6995
7131
  timestamp: isoNow(),
@@ -7003,6 +7139,14 @@ async function abortPrWorkflow(directory, sessionID, options = { kind: "recovery
7003
7139
  presumedStaleLanes: laneSettlement.presumedStaleLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS),
7004
7140
  presumedStaleDisclosure: laneSettlement.disclosure
7005
7141
  } : {},
7142
+ ...probeRetainedLanes.length > 0 ? {
7143
+ probeRetainedLanes: probeRetainedLanes.slice(0, MAX_DISCLOSED_LANE_IDS)
7144
+ } : {},
7145
+ ...probeRetentionOverrideDecision ? { probeRetentionOverrideDisclosure: probeRetentionOverrideDecision } : {},
7146
+ ...overridesProbeRetention ? {
7147
+ probeRetentionOverrideLanes: overrideTargetedLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS)
7148
+ } : {},
7149
+ ...laneSettlement.probeDegradedReason ? { probeStatus: laneSettlement.probeDegradedReason } : {},
7006
7150
  ...recovery.salvaged ? {
7007
7151
  stateSalvaged: true,
7008
7152
  stateSalvageDisclosure: recovery.disclosure,
@@ -7028,13 +7172,23 @@ async function abortPrWorkflow(directory, sessionID, options = { kind: "recovery
7028
7172
  mode: state.mode,
7029
7173
  ...state.prHeadSha ? { prHeadSha: state.prHeadSha } : {},
7030
7174
  reason: sanitizedReason,
7175
+ ...overridesProbeRetention ? {
7176
+ probeRetentionOverrideLanes: overrideTargetedLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS),
7177
+ probeRetentionOverrideFinalized: false
7178
+ } : {},
7031
7179
  failure: (error2 instanceof Error ? error2.message : String(error2)).slice(0, MAX_BASE_COVERAGE_DIAGNOSTIC_CHARS),
7032
- disclosure: "RETRACTION: the pr_workflow_aborted record for this session did NOT complete \u2014 " + "the clear failed and the gate state may still be active. Revalidate the current " + "session state before retrying the abort."
7180
+ disclosure: "RETRACTION: the pr_workflow_aborted record for this session did NOT complete \u2014 " + "the clear failed and the gate state may still be active. Revalidate the current " + "session state before retrying the abort." + (overridesProbeRetention ? " The probe-retention override finalized no record: it runs only after the " + "clear succeeds, and this clear failed. Other lanes in the same settlement " + "batch may already have been finalized as presumed-stale, and a concurrent abort for this session may have finalized more \u2014 revalidate the lane records rather than assuming they are untouched." : "")
7033
7181
  })}
7034
7182
  `, "utf-8");
7035
7183
  } catch {}
7036
7184
  throw error2;
7037
7185
  }
7186
+ const overrideOutcome = overridesProbeRetention ? await finalizeOverriddenProbeRetainedLanes(directory, state.sessionID, overrideTargetedLaneIds) : {
7187
+ sessionOpenLaneIds: [],
7188
+ finalizedLaneIds: [],
7189
+ sparedLaneDescriptions: []
7190
+ };
7191
+ const probeRetentionOverrideDisclosure = probeRetentionOverrideDecision ? probeRetentionOverrideDecision + (overrideOutcome.finalizedLaneIds.length === 0 ? "" : ` Their delegation records were finalized (correlationId: ${overrideOutcome.finalizedLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}); whatever those lanes still produce is no longer collectable.`) + (overrideOutcome.sparedLaneDescriptions.length === 0 ? "" : ` ${overrideOutcome.sparedLaneDescriptions.length} of the overridden lane(s) were NOT finalized: the sweep left those records intact at the status they had already reached (${overrideOutcome.sparedLaneDescriptions.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}). This abort did not discard them \u2014 check collect_lane_results before assuming that work is gone.`) + (overrideOutcome.sessionOpenLaneIds.length === 0 ? " A new PR workflow can now be started for this session." : ` WARNING: ${overrideOutcome.sessionOpenLaneIds.length} PR workflow delegation record(s) for this session are still open (correlationId: ${overrideOutcome.sessionOpenLaneIds.slice(0, MAX_DISCLOSED_LANE_IDS).join(", ")}) and will keep refusing PR workflow checkout preparation for this session until they settle.`) : undefined;
7038
7192
  return {
7039
7193
  mode: state.mode,
7040
7194
  ...state.prHeadSha ? { prHeadSha: state.prHeadSha } : {},
@@ -7043,6 +7197,9 @@ async function abortPrWorkflow(directory, sessionID, options = { kind: "recovery
7043
7197
  presumedStaleLanes: laneSettlement.presumedStaleLaneIds,
7044
7198
  presumedStaleDisclosure: laneSettlement.disclosure
7045
7199
  } : {},
7200
+ ...probeRetainedLanes.length > 0 ? { probeRetainedLanes } : {},
7201
+ ...probeRetentionOverrideDisclosure ? { probeRetentionOverrideDisclosure } : {},
7202
+ ...laneSettlement.probeDegradedReason ? { probeDegradedReason: laneSettlement.probeDegradedReason } : {},
7046
7203
  ...recovery.salvaged ? {
7047
7204
  stateSalvaged: true,
7048
7205
  stateSalvageDisclosure: recovery.disclosure
@@ -7454,7 +7611,7 @@ async function assertPrReviewTerminalReady(directory, sessionID) {
7454
7611
  await assertPrReviewCleanCheckout(directory, "PR_REVIEW");
7455
7612
  const laneSettlement = await settlePresumedStalePrWorkflowLanes(directory, state.sessionID);
7456
7613
  if (laneSettlement.openLanes > 0) {
7457
- throw new Error(`BLOCKED: PR_REVIEW transition has ${laneSettlement.openLanes} unsettled PR workflow lane(s)`);
7614
+ throw new Error(`BLOCKED: PR_REVIEW transition has ${laneSettlement.openLanes} unsettled PR workflow lane(s)` + describePrWorkflowLaneProbe(laneSettlement));
7458
7615
  }
7459
7616
  const ctx = await createPrReviewGateContext(directory, state);
7460
7617
  await assertPrReviewBaseCoverageSettled(directory, sessionID, ctx);
@@ -7614,6 +7771,10 @@ var _test_exports = {
7614
7771
  _test_exports.removeCheckoutLock = removeCheckoutLockFile;
7615
7772
  _test_exports.checkoutMutationActionTimeoutMs = CHECKOUT_MUTATION_ACTION_TIMEOUT_MS;
7616
7773
  _test_exports.classifyPrWorkflowGitStateAsync = classifyPrWorkflowGitState;
7774
+ _test_exports.sweepStaleDelegationsAsync = sweepStaleDelegations;
7775
+ _test_exports.probeLaneLivenessAsync = probeAlivePrWorkflowLaneSessions;
7776
+ _test_exports.getSessionOps = defaultGetSessionOps;
7777
+ _test_exports.laneLivenessProbeTimeoutMs = PR_WORKFLOW_LANE_LIVENESS_PROBE_TIMEOUT_MS;
7617
7778
  },
7618
7779
  beforeTerminalClear: undefined,
7619
7780
  beforeAbortClear: undefined,
@@ -7631,6 +7792,10 @@ var _test_exports = {
7631
7792
  removeCheckoutLock: removeCheckoutLockFile,
7632
7793
  checkoutMutationActionTimeoutMs: CHECKOUT_MUTATION_ACTION_TIMEOUT_MS,
7633
7794
  classifyPrWorkflowGitStateAsync: classifyPrWorkflowGitState,
7795
+ sweepStaleDelegationsAsync: sweepStaleDelegations,
7796
+ probeLaneLivenessAsync: probeAlivePrWorkflowLaneSessions,
7797
+ getSessionOps: defaultGetSessionOps,
7798
+ laneLivenessProbeTimeoutMs: PR_WORKFLOW_LANE_LIVENESS_PROBE_TIMEOUT_MS,
7634
7799
  resolveCurrentGitHead,
7635
7800
  resolveCurrentGitHeadAsync,
7636
7801
  resolveCurrentUpstreamPushTarget,
@@ -9645,7 +9810,22 @@ var USAGE = [
9645
9810
  " gate always has a non-empty reason. The agent tool call must supply its own.",
9646
9811
  "",
9647
9812
  "Refuses while the workflow is armed for publication (call complete_pr_workflow",
9648
- "instead) or while PR workflow lanes are still in flight (collect their results first)."
9813
+ "instead) or while PR workflow lanes are still in flight (collect their results first).",
9814
+ "",
9815
+ "Lane liveness (issue #2251): a lane past the 30-minute staleness horizon whose",
9816
+ "session the host still reports as busy or retrying is RETAINED rather than settled,",
9817
+ "and keeps blocking every exit. Because nothing ever makes such a lane go idle on a",
9818
+ "schedule, this human-only force path is the override: when probe-retained lanes are",
9819
+ "the ONLY thing left blocking, it clears the gate anyway and discloses exactly which",
9820
+ "lanes it overrode. Those sessions are NOT stopped and their output is NOT collected.",
9821
+ "Their delegation records ARE finalized once the gate has actually cleared, so a new",
9822
+ "PR workflow can be started for the session \u2014 without that, checkout preparation would",
9823
+ "refuse forever. The warning names only the records it OBSERVED go terminal; a lane that",
9824
+ "had already moved on is named with its actual status and left intact, so check",
9825
+ "collect_lane_results before assuming that work is gone. If any delegation record for this",
9826
+ "session is still open afterwards, the warning names it too, instead of claiming the",
9827
+ "session is restartable.",
9828
+ "A lane with a fresh updatedAt is never overridden \u2014 force does not weaken that."
9649
9829
  ].join(`
9650
9830
  `);
9651
9831
  var KNOWN_MODES = new Set(["PR_REVIEW", "PR_FEEDBACK"]);
@@ -9673,7 +9853,8 @@ ${USAGE}`;
9673
9853
  ...knownMode ? { expectedMode: knownMode } : {}
9674
9854
  });
9675
9855
  const headLine = summary.prHeadSha ? ` (was bound to PR head ${summary.prHeadSha})` : " (was not bound to a PR head)";
9676
- return `Aborted active ${summary.mode} mechanical gate for session ${sessionID}${headLine} (force). The durable gate state has been cleared and the auto-resume loop will stop. An audit event was appended to .swarm/events.jsonl. If checkout preparation preserved changes, continue with prepare_pr_workflow_checkout operation=restore (or follow the preserved receipt manually).`;
9856
+ const overrideLine = summary.probeRetentionOverrideDisclosure ? ` WARNING: ${summary.probeRetentionOverrideDisclosure}` : "";
9857
+ return `Aborted active ${summary.mode} mechanical gate for session ${sessionID}${headLine} (force). The durable gate state has been cleared and the auto-resume loop will stop. An audit event was appended to .swarm/events.jsonl. If checkout preparation preserved changes, continue with prepare_pr_workflow_checkout operation=restore (or follow the preserved receipt manually).${overrideLine}`;
9677
9858
  } catch (error2) {
9678
9859
  const message = error2 instanceof Error ? error2.message : String(error2);
9679
9860
  return `Error: ${message}
@@ -15114,7 +15295,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
15114
15295
  };
15115
15296
  }
15116
15297
  async function sweepActiveNearDuplicates(directory, options = {}) {
15117
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-333kvewd.js");
15298
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ep14xc5z.js");
15118
15299
  const { config } = loadPluginConfigWithMeta2(directory);
15119
15300
  const sweepConfig = config.learning?.dedup_sweep;
15120
15301
  if (sweepConfig?.enabled === false)
@@ -16198,7 +16379,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
16198
16379
  }
16199
16380
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
16200
16381
  try {
16201
- const skillModule = await import("./skill-generator-nsymtdqm.js");
16382
+ const skillModule = await import("./skill-generator-ffbj0ye5.js");
16202
16383
  for (const cand of skillCandidates) {
16203
16384
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
16204
16385
  continue;
@@ -16658,7 +16839,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
16658
16839
  } catch {}
16659
16840
  }
16660
16841
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
16661
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-cg19dhe5.js");
16842
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-x6jrcrwj.js");
16662
16843
  for (const { id } of contradictedEntries) {
16663
16844
  try {
16664
16845
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -17477,7 +17658,7 @@ async function runCuratorPostMortem(directory, options = {}) {
17477
17658
  warnings.push("Failed to collect knowledge summary.");
17478
17659
  }
17479
17660
  try {
17480
- const { getScanStatus } = await import("./scan-cursor-nqbb1xt6.js");
17661
+ const { getScanStatus } = await import("./scan-cursor-429r5db9.js");
17481
17662
  const scanStatus = await getScanStatus(directory);
17482
17663
  if (scanStatus.remaining_estimate > 0) {
17483
17664
  warnings.push(`Fair scan: reviewed ${knowledgeSummary.length} entries this sweep (generation ${scanStatus.generation}); ${scanStatus.remaining_estimate} more eligible entries will be visited in future curation sweeps.`);
@@ -17649,9 +17830,9 @@ var _internals23 = {
17649
17830
  verifyPostMortemKnowledgeActions,
17650
17831
  repairPostMortemActions,
17651
17832
  loadDefaultKnowledgeConfig: async (directory) => {
17652
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-jj2pb6zp.js");
17833
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-jdwjcby0.js");
17653
17834
  try {
17654
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-333kvewd.js");
17835
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ep14xc5z.js");
17655
17836
  const loaded = loadPluginConfigWithMeta2(directory);
17656
17837
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
17657
17838
  } catch {
@@ -17659,11 +17840,11 @@ var _internals23 = {
17659
17840
  }
17660
17841
  },
17661
17842
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
17662
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-w213v33y.js");
17843
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-wbzcjd0q.js");
17663
17844
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
17664
17845
  },
17665
17846
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
17666
- const { checkHivePromotions } = await import("./hive-promoter-asjtj7ga.js");
17847
+ const { checkHivePromotions } = await import("./hive-promoter-vcj5h0e3.js");
17667
17848
  return checkHivePromotions(entries, knowledgeConfig, directory);
17668
17849
  },
17669
17850
  applyProposalTriage: async (directory, triage) => {
@@ -17672,7 +17853,7 @@ var _internals23 = {
17672
17853
  activateProposal,
17673
17854
  listSkills: listSkills2,
17674
17855
  sanitizeSlug
17675
- } = await import("./skill-generator-nsymtdqm.js");
17856
+ } = await import("./skill-generator-ffbj0ye5.js");
17676
17857
  const result = {
17677
17858
  approved: [],
17678
17859
  rejected: [],
@@ -19008,9 +19189,9 @@ function hashContent(content) {
19008
19189
  return createHash7("sha1").update(content).digest("hex");
19009
19190
  }
19010
19191
  async function loadConfigForPolicyCurator(directory) {
19011
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-jj2pb6zp.js");
19192
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-jdwjcby0.js");
19012
19193
  try {
19013
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-333kvewd.js");
19194
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ep14xc5z.js");
19014
19195
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
19015
19196
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
19016
19197
  } catch {
@@ -28672,7 +28853,7 @@ async function runFinalizeStage(ctx) {
28672
28853
  }
28673
28854
  }
28674
28855
  try {
28675
- const { CuratorConfigSchema: CCS } = await import("./schema-jj2pb6zp.js");
28856
+ const { CuratorConfigSchema: CCS } = await import("./schema-jdwjcby0.js");
28676
28857
  const { config: pmLoadedConfig } = _internals36.loadPluginConfigWithMeta(ctx.directory);
28677
28858
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
28678
28859
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -30950,9 +31131,9 @@ var _internals41 = {
30950
31131
  loadPluginConfigWithMeta,
30951
31132
  loadCuratorDeps: async () => {
30952
31133
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
30953
- import("./schema-jj2pb6zp.js"),
30954
- import("./curator-w213v33y.js"),
30955
- import("./curator-llm-factory-rrs1q4hg.js")
31134
+ import("./schema-jdwjcby0.js"),
31135
+ import("./curator-wbzcjd0q.js"),
31136
+ import("./curator-llm-factory-7are9wjh.js")
30956
31137
  ]);
30957
31138
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
30958
31139
  }
@@ -31857,7 +32038,7 @@ async function computeCurationDiagnostics(directory, entries) {
31857
32038
  let scanCompleted = false;
31858
32039
  let scanRemaining = 0;
31859
32040
  try {
31860
- const { getScanStatus } = await import("./scan-cursor-nqbb1xt6.js");
32041
+ const { getScanStatus } = await import("./scan-cursor-429r5db9.js");
31861
32042
  const status = await getScanStatus(directory);
31862
32043
  scanGeneration = status.generation;
31863
32044
  scanCompleted = status.completed;
@@ -31865,19 +32046,19 @@ async function computeCurationDiagnostics(directory, entries) {
31865
32046
  } catch {}
31866
32047
  let configMatch = null;
31867
32048
  try {
31868
- const { isLinked: isLinked2 } = await import("./knowledge-link-fn5j3r4q.js");
32049
+ const { isLinked: isLinked2 } = await import("./knowledge-link-bntppte4.js");
31869
32050
  if (isLinked2(directory)) {
31870
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-jj2pb6zp.js");
32051
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-jdwjcby0.js");
31871
32052
  let config;
31872
32053
  try {
31873
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-333kvewd.js");
32054
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-ep14xc5z.js");
31874
32055
  const loaded = loadPluginConfigWithMeta2(directory);
31875
32056
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
31876
32057
  } catch {
31877
32058
  config = KnowledgeConfigSchema2.parse({});
31878
32059
  }
31879
32060
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
31880
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-pkb2eeb1.js");
32061
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-y1pqpztb.js");
31881
32062
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
31882
32063
  const cohortFp = await readCohortConfigFingerprint(directory);
31883
32064
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -33088,7 +33269,7 @@ async function handleDoctorCommand(directory, args) {
33088
33269
  const result = runConfigDoctor(config, directory);
33089
33270
  let output;
33090
33271
  if (enableAutoFix && result.hasAutoFixableIssues) {
33091
- const { runConfigDoctorWithFixes } = await import("./config-doctor-7dfvxwjb.js");
33272
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-pkr9w2nv.js");
33092
33273
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
33093
33274
  applyLossy: true
33094
33275
  });
@@ -33925,7 +34106,7 @@ async function handleEvidenceCommand(directory, args) {
33925
34106
  return formatTaskEvidenceMarkdown(evidenceData);
33926
34107
  }
33927
34108
  async function handleEvidenceSummaryCommand(directory) {
33928
- const { buildEvidenceSummary } = await import("./evidence-summary-service-t7n2h1he.js");
34109
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-rcgrdm52.js");
33929
34110
  const artifact = await buildEvidenceSummary(directory);
33930
34111
  if (!artifact) {
33931
34112
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -41458,7 +41639,7 @@ function sumCounters(destination, source) {
41458
41639
  ...existing,
41459
41640
  violation_timestamps: [...existing.violation_timestamps]
41460
41641
  };
41461
- _internals.mergeRollupInto(merged, srcRollup);
41642
+ _internals2.mergeRollupInto(merged, srcRollup);
41462
41643
  result[id] = merged;
41463
41644
  skipped++;
41464
41645
  } else {
@@ -60729,7 +60910,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
60729
60910
  if (!input.dispatcher) {
60730
60911
  throw new Error("no evaluation dispatcher available (cannot run validation)");
60731
60912
  }
60732
- const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-pde6b5sx.js");
60913
+ const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-jn55k8xb.js");
60733
60914
  const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
60734
60915
  const result = await _internals88.evaluateCandidateV1({
60735
60916
  projectRoot: input.directory,
@@ -62632,7 +62813,7 @@ function buildDetailedHelp(commandName, entry) {
62632
62813
  async function handleHelpCommand(ctx) {
62633
62814
  const targetCommand = ctx.args.join(" ");
62634
62815
  if (!targetCommand) {
62635
- const { buildHelpText } = await import("./index-tg9fn2dy.js");
62816
+ const { buildHelpText } = await import("./index-ghzvxj3g.js");
62636
62817
  return buildHelpText();
62637
62818
  }
62638
62819
  const tokens = targetCommand.split(/\s+/);
@@ -62641,7 +62822,7 @@ async function handleHelpCommand(ctx) {
62641
62822
  return _internals91.buildDetailedHelp(resolved.key, resolved.entry);
62642
62823
  }
62643
62824
  const similar = _internals91.findSimilarCommands(targetCommand);
62644
- const { buildHelpText: fullHelp } = await import("./index-tg9fn2dy.js");
62825
+ const { buildHelpText: fullHelp } = await import("./index-ghzvxj3g.js");
62645
62826
  if (similar.length > 0) {
62646
62827
  return `Command '/swarm ${targetCommand}' not found.
62647
62828
 
@@ -62818,7 +62999,7 @@ var COMMAND_REGISTRY = {
62818
62999
  },
62819
63000
  "guardrail explain": {
62820
63001
  handler: async (ctx) => {
62821
- const { handleGuardrailExplain } = await import("./guardrail-explain-v1mwsnkq.js");
63002
+ const { handleGuardrailExplain } = await import("./guardrail-explain-brgw4sve.js");
62822
63003
  return handleGuardrailExplain(ctx.directory, ctx.args);
62823
63004
  },
62824
63005
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -62828,7 +63009,7 @@ var COMMAND_REGISTRY = {
62828
63009
  },
62829
63010
  "guardrail-explain": {
62830
63011
  handler: async (ctx) => {
62831
- const { handleGuardrailExplain } = await import("./guardrail-explain-v1mwsnkq.js");
63012
+ const { handleGuardrailExplain } = await import("./guardrail-explain-brgw4sve.js");
62832
63013
  return handleGuardrailExplain(ctx.directory, ctx.args);
62833
63014
  },
62834
63015
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -62838,7 +63019,7 @@ var COMMAND_REGISTRY = {
62838
63019
  },
62839
63020
  "guardrail-log": {
62840
63021
  handler: async (ctx) => {
62841
- const { handleGuardrailLog } = await import("./guardrail-log-dn03dpz2.js");
63022
+ const { handleGuardrailLog } = await import("./guardrail-log-k1s9xf3h.js");
62842
63023
  return handleGuardrailLog(ctx.directory, ctx.args);
62843
63024
  },
62844
63025
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -63284,7 +63465,7 @@ Subcommands:
63284
63465
  handler: (ctx) => handleAbortPrWorkflowCommand(ctx.directory, ctx.args, ctx.sessionID),
63285
63466
  description: "Clear a stuck PR_REVIEW/PR_FEEDBACK mechanical gate and stop the auto-resume loop [mode] [reason]",
63286
63467
  args: "[PR_REVIEW|PR_FEEDBACK] [reason...]",
63287
- details: "Human-only escape hatch for an unrecoverable PR_REVIEW or PR_FEEDBACK mechanical gate. When the architect cannot reach complete_pr_workflow \u2014 for example a compound `git fetch && git checkout` was rejected as read-only shell syntax, the PR head cannot be fetched, or the working tree is on the wrong branch \u2014 running this clears the durable gate state for the current session and stops the auto-resume loop without depending on the trapped model. The agent itself cannot run this command; it must call the abort_pr_workflow tool (or ask you to run this command). Both paths funnel into the same fail-closed abortPrWorkflow hook, which refuses while the workflow is armed for publication or while PR workflow lanes are still in flight. When checkout preparation preserved a stash, the result instructs the caller to run prepare_pr_workflow_checkout operation=restore after the clear. An audit event is appended to .swarm/events.jsonl.",
63468
+ details: "Human-only escape hatch for an unrecoverable PR_REVIEW or PR_FEEDBACK mechanical gate. When the architect cannot reach complete_pr_workflow \u2014 for example a compound `git fetch && git checkout` was rejected as read-only shell syntax, the PR head cannot be fetched, or the working tree is on the wrong branch \u2014 running this clears the durable gate state for the current session and stops the auto-resume loop without depending on the trapped model. The agent itself cannot run this command; it must call the abort_pr_workflow tool (or ask you to run this command). Both paths funnel into the same fail-closed abortPrWorkflow hook, which refuses while the workflow is armed for publication or while PR workflow lanes are still in flight. This human-only force path has exactly one exception to that second refusal (issue #2251): when the ONLY lanes still blocking are ones past the 30-minute staleness horizon that the liveness probe reports as still running \u2014 a lane nothing will ever settle on a schedule \u2014 it clears the gate anyway, names exactly which lanes it overrode, and finalizes their delegation records so the session can start a new PR workflow. Those sessions are NOT stopped and their output is NOT collected. A lane with a fresh updatedAt still blocks even under force, and any delegation record that still keeps the session blocked is named in the warning. When checkout preparation preserved a stash, the result instructs the caller to run prepare_pr_workflow_checkout operation=restore after the clear. An audit event is appended to .swarm/events.jsonl.",
63288
63469
  category: "utility",
63289
63470
  toolPolicy: "restricted"
63290
63471
  },
@@ -69815,7 +69996,7 @@ function getDisplayBudget() {
69815
69996
  async function rehydratePrSubscriptions(sessionID, directory) {
69816
69997
  const map = new Map;
69817
69998
  try {
69818
- const { listActive: listActive2 } = await import("./pr-subscriptions-jyav582d.js");
69999
+ const { listActive: listActive2 } = await import("./pr-subscriptions-wvd041rp.js");
69819
70000
  const records = await listActive2(directory);
69820
70001
  for (const record of records) {
69821
70002
  if (record.sessionID !== sessionID)
@@ -70201,11 +70382,11 @@ async function preProvisionCollisionCheck(taskId, directory, _sessionId) {
70201
70382
  return { collision: false };
70202
70383
  }
70203
70384
  function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
70204
- const extracted = _internals2.extractSessionId(branchName);
70385
+ const extracted = _internals.extractSessionId(branchName);
70205
70386
  return extracted === expectedSessionId;
70206
70387
  }
70207
70388
  async function inspectStandardWorktreeCollisionOwnership(identity) {
70208
- const collisionOwnership = await import("./worktree-collision-ownership-j6d33p49.js");
70389
+ const collisionOwnership = await import("./worktree-collision-ownership-z5ftwjz3.js");
70209
70390
  return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
70210
70391
  }
70211
70392
  async function precreateStandardWorktreeSession(args) {
@@ -70353,7 +70534,7 @@ async function precreateStandardWorktreeSession(args) {
70353
70534
  const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, provisionResult.worktreePath);
70354
70535
  if (laneProfile) {
70355
70536
  try {
70356
- const { writeLaneProfileToDiskReal } = await import("./core-dwmwdc4y.js");
70537
+ const { writeLaneProfileToDiskReal } = await import("./core-7pymdx0b.js");
70357
70538
  await writeLaneProfileToDiskReal(provisionResult.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
70358
70539
  } catch {}
70359
70540
  }
@@ -70852,7 +71033,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
70852
71033
  }
70853
71034
  clearWorktreeMergeStatus(statusKey);
70854
71035
  try {
70855
- const { removeLaneProfileFromDiskReal } = await import("./core-dwmwdc4y.js");
71036
+ const { removeLaneProfileFromDiskReal } = await import("./core-7pymdx0b.js");
70856
71037
  await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
70857
71038
  } catch {}
70858
71039
  const state = serializationStateBySessionID.get(dispatch.parentSessionID);
@@ -70994,4 +71175,4 @@ var _internals93 = {
70994
71175
  bunSpawn
70995
71176
  };
70996
71177
 
70997
- export { handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals93 as _internals, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, handleArchiveCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, handleCiSimulateCommand, handleClarifyCommand, createCuratorLLMDelegate, _internals22 as _internals1, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals26 as _internals2, createHivePromoterHook, promoteToHive, promoteFromSwarm, handleCloseCommand, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getPluginConfigDir, getPluginCachePaths, getPluginLockFilePaths, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, safeRealpathSync, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, COMMAND_REGISTRY, VALID_COMMANDS, _internals91 as _internals3, resolveCommand };
71178
+ export { parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals93 as _internals, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleArchiveCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, handleCheckpointCommand, handleCiSimulateCommand, handleClarifyCommand, createCuratorLLMDelegate, _internals22 as _internals1, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals26 as _internals2, createHivePromoterHook, promoteToHive, promoteFromSwarm, handleCloseCommand, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getPluginConfigDir, getPluginCachePaths, getPluginLockFilePaths, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, safeRealpathSync, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, COMMAND_REGISTRY, VALID_COMMANDS, _internals91 as _internals3, resolveCommand };