opencode-swarm 7.184.5 → 7.184.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 (104) hide show
  1. package/.opencode/skills/issue-tracer/SKILL.md +3 -3
  2. package/.opencode/skills/issue-tracer/assets/pr-template.md +7 -0
  3. package/.opencode/skills/issue-tracer/references/acceptance-checks.md +30 -6
  4. package/.opencode/skills/issue-tracer/references/critic-gate.md +5 -0
  5. package/.opencode/skills/issue-tracer/references/evidence-artifacts.md +18 -2
  6. package/.opencode/skills/issue-tracer/scripts/repro-check.sh +604 -77
  7. package/.opencode/skills/issue-tracer/scripts/trace-check.sh +486 -60
  8. package/.opencode/skills/issue-tracer/scripts/trace-init.sh +30 -0
  9. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  10. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  11. package/dist/cli/{coder-settlement-m3r1kmzx.js → coder-settlement-2759zt77.js} +11 -11
  12. package/dist/cli/{config-doctor-1qgq2s96.js → config-doctor-g48tz4kt.js} +3 -3
  13. package/dist/cli/{core-h7pp6xzs.js → core-1jfgxw72.js} +4 -4
  14. package/dist/cli/{curation-policy-49f8jx48.js → curation-policy-k43q6b91.js} +4 -4
  15. package/dist/cli/{curator-drift-epvr1y5j.js → curator-drift-5wc9jfmy.js} +9 -9
  16. package/dist/cli/curator-llm-factory-jjd0cxb2.js +75 -0
  17. package/dist/cli/{curator-48mky2w8.js → curator-m7sja3jp.js} +38 -38
  18. package/dist/cli/{evidence-summary-service-akzas6he.js → evidence-summary-service-sx8x12w0.js} +17 -17
  19. package/dist/cli/{gate-evidence-gmq1th1b.js → gate-evidence-znfffz94.js} +8 -6
  20. package/dist/cli/guardrail-explain-x81m4s8q.js +76 -0
  21. package/dist/cli/{guardrail-log-n2cgvbh1.js → guardrail-log-mcv4ad3t.js} +7 -7
  22. package/dist/cli/{guardrail-reset-3br6fs4n.js → guardrail-reset-ksrr2r0n.js} +38 -38
  23. package/dist/cli/{hive-promoter-a1yw6evd.js → hive-promoter-06dzq5ms.js} +38 -38
  24. package/dist/cli/{index-fnbcd9ve.js → index-0prgjynb.js} +5 -5
  25. package/dist/cli/{index-ar2gsn6b.js → index-14j1jkyy.js} +6 -6
  26. package/dist/cli/{index-2zzmthnv.js → index-16smfppa.js} +4 -4
  27. package/dist/cli/{index-k1cxzdbd.js → index-1kz2repk.js} +4 -4
  28. package/dist/cli/{index-7ge1gcd3.js → index-1npynszx.js} +12 -12
  29. package/dist/cli/{index-82hy3v8f.js → index-1nwkzj24.js} +2 -2
  30. package/dist/cli/{index-ya32wfkp.js → index-1t2ctwkd.js} +1 -1
  31. package/dist/cli/{index-8pfcj7tz.js → index-2s0gy81b.js} +3 -3
  32. package/dist/cli/{index-k53a69vb.js → index-2t4zv1ag.js} +7 -14
  33. package/dist/cli/{index-3ny2d85s.js → index-3h0f07e9.js} +2 -2
  34. package/dist/cli/{index-qf75z3xz.js → index-42pchr9f.js} +1 -1
  35. package/dist/cli/{index-6jqxstq4.js → index-4qmeshfa.js} +5 -5
  36. package/dist/cli/{index-3n5zsp31.js → index-7xv2hvr6.js} +2 -2
  37. package/dist/cli/{index-10rsjhfy.js → index-82j1een1.js} +46 -19
  38. package/dist/cli/{index-h9hvszf7.js → index-8bvpcbk8.js} +40 -40
  39. package/dist/cli/{index-wy3zpwjy.js → index-98a0rxby.js} +1 -1
  40. package/dist/cli/{index-vyjped9g.js → index-b1v0zxnh.js} +2 -2
  41. package/dist/cli/{index-cdvb33mn.js → index-bf055zyw.js} +2 -2
  42. package/dist/cli/{index-2adz24wr.js → index-c5c7hrz1.js} +3 -3
  43. package/dist/cli/{index-6bn74qs9.js → index-dyddcx8h.js} +168 -105
  44. package/dist/cli/{index-xf69xty9.js → index-e1zrgvqg.js} +1 -1
  45. package/dist/cli/{index-yqcaf6r3.js → index-eecz2kna.js} +7 -7
  46. package/dist/cli/{index-1511m10x.js → index-enjsn68b.js} +7 -7
  47. package/dist/cli/{index-wzec3c4g.js → index-ezagem2g.js} +4 -0
  48. package/dist/cli/{index-zzvxj02e.js → index-fr6x6vn2.js} +1 -1
  49. package/dist/cli/{index-475bkab8.js → index-g2r6t7by.js} +1 -1
  50. package/dist/cli/{index-tzejdtyx.js → index-kbd6apth.js} +38 -38
  51. package/dist/cli/{index-e602am4j.js → index-m8rt7a3g.js} +4 -4
  52. package/dist/cli/{index-xf6j4ypk.js → index-mp60wy1f.js} +4 -4
  53. package/dist/cli/{index-6g664sy8.js → index-q39ecyaq.js} +1 -1
  54. package/dist/cli/{index-tajh3egk.js → index-q4a0j3nh.js} +5 -5
  55. package/dist/cli/{index-earq3mda.js → index-qeqn241m.js} +1 -1
  56. package/dist/cli/{index-ae2jf510.js → index-raj6y6d3.js} +2 -2
  57. package/dist/cli/{index-f0nj3d8z.js → index-rmspt7xm.js} +1 -1
  58. package/dist/cli/{index-ezpzd88b.js → index-rwzrbcm9.js} +2 -2
  59. package/dist/cli/{index-jvk95e6y.js → index-s95ghsy1.js} +1 -1
  60. package/dist/cli/{index-f4z1ez09.js → index-sxxj47cy.js} +6 -6
  61. package/dist/cli/{index-w9hxzcz4.js → index-t0mb5a9p.js} +1 -1
  62. package/dist/cli/{index-wehwbv89.js → index-x16a0c6b.js} +7 -7
  63. package/dist/cli/{index-456awy1p.js → index-xqxqepsy.js} +2 -2
  64. package/dist/cli/{index-zeg8y1fw.js → index-ywmknn6m.js} +1 -1
  65. package/dist/cli/{index-d1bfyxj5.js → index-z1qs160n.js} +1 -1
  66. package/dist/cli/{index-gcdgtcg5.js → index-z7recmq5.js} +3 -3
  67. package/dist/cli/index.d.ts +36 -7
  68. package/dist/cli/index.js +352 -92
  69. package/dist/cli/{knowledge-escalator-rdgspj3v.js → knowledge-escalator-ghx76dcv.js} +12 -12
  70. package/dist/cli/{knowledge-events-zh16e78y.js → knowledge-events-kpw6fbmc.js} +10 -10
  71. package/dist/cli/{knowledge-link-ap2274vm.js → knowledge-link-xw6vsbx3.js} +3 -3
  72. package/dist/cli/{knowledge-store-jxke13cv.js → knowledge-store-fhdrpxdm.js} +4 -4
  73. package/dist/cli/{knowledge-validator-24myt9fp.js → knowledge-validator-7jr0aka1.js} +6 -6
  74. package/dist/cli/{mcp-a4q99fmb.js → mcp-v7cgf5tn.js} +1 -1
  75. package/dist/cli/{model-preflight-qy88p9fc.js → model-preflight-kn3xqvfk.js} +38 -38
  76. package/dist/cli/{pending-delegations-9vqyq3bj.js → pending-delegations-z7mcbecn.js} +10 -10
  77. package/dist/cli/{pr-subscriptions-hrefmtay.js → pr-subscriptions-1sb07tx3.js} +10 -10
  78. package/dist/cli/{pr-workflow-gate-1jcs4wnp.js → pr-workflow-gate-ph4fvf47.js} +38 -38
  79. package/dist/cli/{runner-yz3ysehf.js → runner-pvdhxh74.js} +4 -4
  80. package/dist/cli/{scan-cursor-krn56ew2.js → scan-cursor-7ny9bnmk.js} +5 -5
  81. package/dist/cli/{schema-zqankczb.js → schema-pjkzvcw8.js} +2 -2
  82. package/dist/cli/{scope-persistence-5qrjm5d2.js → scope-persistence-mkb8yc5s.js} +14 -14
  83. package/dist/cli/{server-7wydssat.js → server-4e853cwk.js} +38 -38
  84. package/dist/cli/{skill-generator-br4wctes.js → skill-generator-v6n0kwh0.js} +14 -14
  85. package/dist/cli/{snapshot-coordination-init-g4sg2fxv.js → snapshot-coordination-init-agx2sn6h.js} +38 -38
  86. package/dist/cli/{speckit-checkoff-82s1qy0c.js → speckit-checkoff-wfsbvt1b.js} +5 -5
  87. package/dist/cli/{workspace-snapshot-xwhhznt3.js → workspace-snapshot-553c6cd3.js} +3 -3
  88. package/dist/cli/{worktree-collision-ownership-19n9em8b.js → worktree-collision-ownership-4znww3nt.js} +11 -11
  89. package/dist/cli/{worktree-isolation-hkd7xtdp.js → worktree-isolation-w4k8q59z.js} +38 -38
  90. package/dist/commands/registry.d.ts +1 -1
  91. package/dist/gate-evidence.d.ts +51 -0
  92. package/dist/index.js +34 -34
  93. package/dist/tools/index.d.ts +1 -0
  94. package/dist/tools/manifest.d.ts +1 -0
  95. package/dist/tools/record-branch-freshness.d.ts +6 -0
  96. package/dist/tools/record-trace-validation.d.ts +11 -0
  97. package/dist/tools/recover-stage-a-task.d.ts +5 -0
  98. package/dist/tools/tool-metadata.d.ts +4 -0
  99. package/dist/workflow/settlement-recovery.d.ts +52 -0
  100. package/dist/workflow/stage-a-repair.d.ts +13 -8
  101. package/dist/workflow/task-recovery-status.d.ts +11 -2
  102. package/package.json +1 -1
  103. package/dist/cli/curator-llm-factory-782jtn0a.js +0 -75
  104. package/dist/cli/guardrail-explain-xgahzbts.js +0 -76
@@ -8,7 +8,7 @@ import {
8
8
  protectedRoots,
9
9
  redactDecisionLineForArchive,
10
10
  stableCanonicalStringify
11
- } from "./index-2adz24wr.js";
11
+ } from "./index-c5c7hrz1.js";
12
12
  import {
13
13
  LANGUAGE_REGISTRY,
14
14
  _internals as _internals3,
@@ -27,7 +27,7 @@ import {
27
27
  runEvaluation,
28
28
  runExternalTool,
29
29
  withDisposableWorktree
30
- } from "./index-6g664sy8.js";
30
+ } from "./index-q39ecyaq.js";
31
31
  import {
32
32
  buildDriftInjectionText,
33
33
  canonicalProjectKey,
@@ -36,13 +36,13 @@ import {
36
36
  getGroupCommitWriter,
37
37
  importLegacyJsonl,
38
38
  readPriorDriftReports
39
- } from "./index-gcdgtcg5.js";
39
+ } from "./index-z7recmq5.js";
40
40
  import {
41
41
  detectStraySwarmDirs,
42
42
  readDoctorArtifact,
43
43
  removeStraySwarmDir,
44
44
  runConfigDoctor
45
- } from "./index-ezpzd88b.js";
45
+ } from "./index-rwzrbcm9.js";
46
46
  import {
47
47
  MAX_TRANSIENT_RETRIES,
48
48
  PlanRecoverySupersededError,
@@ -83,7 +83,7 @@ import {
83
83
  updateTaskStatus,
84
84
  validateProjectRoot,
85
85
  withPlanLifecycleLock
86
- } from "./index-7ge1gcd3.js";
86
+ } from "./index-1npynszx.js";
87
87
  import {
88
88
  EvaluationTaskV1Schema,
89
89
  GateAuditManifestV1Schema,
@@ -100,7 +100,7 @@ import {
100
100
  saveGateAuditResult,
101
101
  savePromotionDecision,
102
102
  saveTaskSetSnapshot
103
- } from "./index-ya32wfkp.js";
103
+ } from "./index-1t2ctwkd.js";
104
104
  import {
105
105
  canonicalHash,
106
106
  canonicalJson,
@@ -120,7 +120,7 @@ import {
120
120
  resolveSpeckitProjection,
121
121
  validateSpeckit,
122
122
  writeProjectedSpecSync
123
- } from "./index-d1bfyxj5.js";
123
+ } from "./index-z1qs160n.js";
124
124
  import {
125
125
  containsControlChars,
126
126
  containsPathTraversal,
@@ -148,16 +148,16 @@ import {
148
148
  retireSkill,
149
149
  selectCandidateEntries,
150
150
  syncBundledProjectSkillsIfMissingAsync
151
- } from "./index-xf6j4ypk.js";
151
+ } from "./index-mp60wy1f.js";
152
152
  import {
153
153
  buildEscalationBriefing,
154
154
  readRecentEscalations
155
- } from "./index-6jqxstq4.js";
155
+ } from "./index-4qmeshfa.js";
156
156
  import {
157
157
  alreadyCuratedThisGeneration,
158
158
  claimNextScanBatch,
159
159
  resolveCohortId
160
- } from "./index-ae2jf510.js";
160
+ } from "./index-raj6y6d3.js";
161
161
  import {
162
162
  CURATOR_CONSOLIDATION_PROMPT,
163
163
  CURATOR_INIT_PROMPT,
@@ -177,7 +177,7 @@ import {
177
177
  sweepStale,
178
178
  unsubscribe,
179
179
  updateSnapshot
180
- } from "./index-ar2gsn6b.js";
180
+ } from "./index-14j1jkyy.js";
181
181
  import {
182
182
  clearWorktreeMergeStatus,
183
183
  getAllWorktreeMergeFailures,
@@ -189,7 +189,7 @@ import {
189
189
  listCoderSettlementWalStates,
190
190
  recoverCoderSettlement,
191
191
  recoverStaleCoderSettlements
192
- } from "./index-wehwbv89.js";
192
+ } from "./index-x16a0c6b.js";
193
193
  import {
194
194
  parsePorcelainV2Snapshot,
195
195
  resolveCommitCountSince,
@@ -217,12 +217,12 @@ import {
217
217
  resolveRemoteUrlIdentity,
218
218
  resolveRemoteUrlIdentityAsync,
219
219
  switchPrFeedbackTrackingCandidateAsync
220
- } from "./index-vyjped9g.js";
220
+ } from "./index-b1v0zxnh.js";
221
221
  import {
222
222
  WORKTREE_LIFECYCLE_LOCK_FILE,
223
223
  recordWorktreeProvisioningOwner,
224
224
  removeWorktreeProvisioningOwner
225
- } from "./index-3n5zsp31.js";
225
+ } from "./index-7xv2hvr6.js";
226
226
  import {
227
227
  getLanguageForExtension
228
228
  } from "./index-pt7h91zc.js";
@@ -257,10 +257,10 @@ import {
257
257
  readWorkflowWalFile,
258
258
  recoverMergeBackFromImmutableCoordinates,
259
259
  startupOrphanRecovery,
260
- transitionTaskWorkflowEvidence,
260
+ transitionTaskWorkflowEvidenceWithStatus,
261
261
  withTaskEvidenceTransaction,
262
262
  writeWorkflowWalFile
263
- } from "./index-10rsjhfy.js";
263
+ } from "./index-82j1een1.js";
264
264
  import {
265
265
  isPathUnderSwarmWorktreeBase,
266
266
  listLiveLaneOwners,
@@ -269,7 +269,7 @@ import {
269
269
  recordLiveLaneOwner,
270
270
  removeWorktree,
271
271
  resolveWorktreeBaseDir
272
- } from "./index-k1cxzdbd.js";
272
+ } from "./index-1kz2repk.js";
273
273
  import {
274
274
  DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
275
275
  DELEGATION_COMPACTION_HIGH_WATER_BYTES,
@@ -303,7 +303,7 @@ import {
303
303
  scanBackgroundCoderReservationsForAdmission,
304
304
  scanDelegationsForRecovery,
305
305
  sweepStaleDelegations
306
- } from "./index-f4z1ez09.js";
306
+ } from "./index-sxxj47cy.js";
307
307
  import {
308
308
  MAX_EVENT_LOG_ENTRIES,
309
309
  _internals,
@@ -322,7 +322,7 @@ import {
322
322
  recordKnowledgeEvent,
323
323
  recordPhaseCloseIntent,
324
324
  resolveKnowledgeEventsPath
325
- } from "./index-yqcaf6r3.js";
325
+ } from "./index-eecz2kna.js";
326
326
  import {
327
327
  estimateCharsForTokens,
328
328
  estimateTokens,
@@ -330,7 +330,7 @@ import {
330
330
  readSwarmFileAsync,
331
331
  safeHook,
332
332
  validateSwarmPath
333
- } from "./index-wy3zpwjy.js";
333
+ } from "./index-98a0rxby.js";
334
334
  import {
335
335
  bunFile,
336
336
  bunSpawn,
@@ -350,18 +350,18 @@ import {
350
350
  validateActionableFields,
351
351
  validateLesson,
352
352
  validateSkillPath
353
- } from "./index-e602am4j.js";
353
+ } from "./index-m8rt7a3g.js";
354
354
  import {
355
355
  MAX_CURATION_PROPOSALS,
356
356
  authorizeCuration,
357
357
  buildConfigFingerprintInput
358
- } from "./index-earq3mda.js";
358
+ } from "./index-qeqn241m.js";
359
359
  import {
360
360
  cohortConfigFingerprint
361
361
  } from "./index-rtry5xyf.js";
362
362
  import {
363
363
  resolveWorktreeIsolationConfig
364
- } from "./index-8pfcj7tz.js";
364
+ } from "./index-2s0gy81b.js";
365
365
  import {
366
366
  RetrospectiveEvidenceSchema
367
367
  } from "./index-frcemc0b.js";
@@ -373,7 +373,7 @@ import {
373
373
  clearScopeBindings,
374
374
  readAuthoritativeScopeBindingSet,
375
375
  readDeclaredScopeFilesFromBindings
376
- } from "./index-fnbcd9ve.js";
376
+ } from "./index-0prgjynb.js";
377
377
  import {
378
378
  clearPlanLedgerForReset,
379
379
  computePlanStructureHash,
@@ -389,7 +389,7 @@ import {
389
389
  replayFromLedgerWithStatus,
390
390
  resolvePlanningProfile,
391
391
  takeSnapshotEvent
392
- } from "./index-tajh3egk.js";
392
+ } from "./index-q4a0j3nh.js";
393
393
  import {
394
394
  CORE_EVENT_LOCKED,
395
395
  appendCoreEventSync,
@@ -399,7 +399,7 @@ import {
399
399
  hasSpecDriftAuditEvent,
400
400
  hasTaskRepairAuditEvent,
401
401
  readCoreEvents
402
- } from "./index-jvk95e6y.js";
402
+ } from "./index-s95ghsy1.js";
403
403
  import {
404
404
  DEFAULT_QA_GATES,
405
405
  computeProfileHash,
@@ -407,7 +407,7 @@ import {
407
407
  getEffectiveGates,
408
408
  getProfileLookupForIdentity,
409
409
  setGatesForIdentity
410
- } from "./index-456awy1p.js";
410
+ } from "./index-xqxqepsy.js";
411
411
  import {
412
412
  MAX_COORDINATION_STATE_LIST_ROWS,
413
413
  deleteCoordinationImports,
@@ -420,7 +420,7 @@ import {
420
420
  listCoordinationStates,
421
421
  transitionCoordinationState,
422
422
  withCoordinationTransaction
423
- } from "./index-f0nj3d8z.js";
423
+ } from "./index-rmspt7xm.js";
424
424
  import {
425
425
  DURABILITY_CLASSES,
426
426
  closeAllProjectDbs,
@@ -429,7 +429,7 @@ import {
429
429
  projectDbExists,
430
430
  projectDbPath,
431
431
  withImmediateTransaction
432
- } from "./index-w9hxzcz4.js";
432
+ } from "./index-t0mb5a9p.js";
433
433
  import {
434
434
  loadDatabaseCtor
435
435
  } from "./index-rdm3px0g.js";
@@ -445,7 +445,7 @@ import {
445
445
  observeModelLimitResolution,
446
446
  observeStoreHealth,
447
447
  readLearningHealth
448
- } from "./index-zzvxj02e.js";
448
+ } from "./index-fr6x6vn2.js";
449
449
  import {
450
450
  appendKnowledge,
451
451
  appendRejectedLesson,
@@ -476,7 +476,7 @@ import {
476
476
  transactFile,
477
477
  transactKnowledge,
478
478
  wordBigrams
479
- } from "./index-1511m10x.js";
479
+ } from "./index-enjsn68b.js";
480
480
  import {
481
481
  readTailJsonl,
482
482
  readTailJsonlDetailed,
@@ -497,11 +497,11 @@ import {
497
497
  resolveLinkDir,
498
498
  sanitizeLinkId,
499
499
  writeLinkPointer
500
- } from "./index-475bkab8.js";
500
+ } from "./index-g2r6t7by.js";
501
501
  import {
502
502
  atomicWriteFile,
503
503
  withEvidenceLock
504
- } from "./index-xf69xty9.js";
504
+ } from "./index-e1zrgvqg.js";
505
505
  import {
506
506
  assertProjectRoot,
507
507
  hasExplicitProjectBoundary,
@@ -543,7 +543,7 @@ import {
543
543
  matchTempGrammar,
544
544
  parseTargetBasename,
545
545
  resetSwarmArtifactCache
546
- } from "./index-k53a69vb.js";
546
+ } from "./index-2t4zv1ag.js";
547
547
  import {
548
548
  PlanSchema,
549
549
  TaskStatusSchema,
@@ -557,7 +557,7 @@ import {
557
557
  loadGateOverrides,
558
558
  loadPluginConfig,
559
559
  loadPluginConfigWithMeta
560
- } from "./index-qf75z3xz.js";
560
+ } from "./index-42pchr9f.js";
561
561
  import {
562
562
  addDeferredWarning,
563
563
  advisoryWarn,
@@ -589,7 +589,7 @@ import {
589
589
  resolveContextWindow,
590
590
  resolveGeneratedAgentRole,
591
591
  stripKnownSwarmPrefix
592
- } from "./index-3ny2d85s.js";
592
+ } from "./index-3h0f07e9.js";
593
593
  import {
594
594
  AGENT_TOOL_MAP,
595
595
  ALL_AGENT_NAMES,
@@ -612,7 +612,7 @@ import {
612
612
  init_agent_names,
613
613
  init_constants,
614
614
  init_tool_metadata
615
- } from "./index-wzec3c4g.js";
615
+ } from "./index-ezagem2g.js";
616
616
  import {
617
617
  KNOWLEDGE_SCHEMA_VERSION,
618
618
  OUTCOME_BLOCK_THRESHOLD,
@@ -3352,7 +3352,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
3352
3352
  return null;
3353
3353
  throw error2;
3354
3354
  }
3355
- const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-1jcs4wnp.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
3355
+ const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-ph4fvf47.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
3356
3356
  if (!legacy)
3357
3357
  return null;
3358
3358
  const namespace = workflowGateStateCoordinationNamespace(sessionID);
@@ -3439,7 +3439,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
3439
3439
  let recoveryState = null;
3440
3440
  if (!currentAuthoritative) {
3441
3441
  if (options.allowSalvagedRead) {
3442
- const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-1jcs4wnp.js");
3442
+ const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-ph4fvf47.js");
3443
3443
  recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
3444
3444
  }
3445
3445
  if (!recoveryState) {
@@ -14824,7 +14824,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
14824
14824
  return extracted === expectedSessionId;
14825
14825
  }
14826
14826
  async function inspectStandardWorktreeCollisionOwnership(identity) {
14827
- const collisionOwnership = await import("./worktree-collision-ownership-19n9em8b.js");
14827
+ const collisionOwnership = await import("./worktree-collision-ownership-4znww3nt.js");
14828
14828
  return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
14829
14829
  }
14830
14830
  async function runRecoveryGit(directory, args, timeoutMs = 15000) {
@@ -15250,7 +15250,7 @@ async function precreateStandardWorktreeSession(args) {
15250
15250
  const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
15251
15251
  if (laneProfile) {
15252
15252
  try {
15253
- const { writeLaneProfileToDiskReal } = await import("./core-h7pp6xzs.js");
15253
+ const { writeLaneProfileToDiskReal } = await import("./core-1jfgxw72.js");
15254
15254
  await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
15255
15255
  } catch {}
15256
15256
  }
@@ -16229,7 +16229,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
16229
16229
  }
16230
16230
  clearWorktreeMergeStatus(statusKey);
16231
16231
  try {
16232
- const { removeLaneProfileFromDiskReal } = await import("./core-h7pp6xzs.js");
16232
+ const { removeLaneProfileFromDiskReal } = await import("./core-1jfgxw72.js");
16233
16233
  await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
16234
16234
  } catch {}
16235
16235
  const state = serializationStateBySessionID.get(dispatch.parentSessionID);
@@ -23858,7 +23858,7 @@ function clearCriticalShownIds(sessionID) {
23858
23858
  async function rehydratePrSubscriptions(sessionID, directory) {
23859
23859
  const map = new Map;
23860
23860
  try {
23861
- const { listActive: listActive2 } = await import("./pr-subscriptions-hrefmtay.js");
23861
+ const { listActive: listActive2 } = await import("./pr-subscriptions-1sb07tx3.js");
23862
23862
  const records = await listActive2(directory);
23863
23863
  for (const record of records) {
23864
23864
  if (record.sessionID !== sessionID)
@@ -40983,9 +40983,9 @@ function hashContent(content) {
40983
40983
  return createHash25("sha1").update(content).digest("hex");
40984
40984
  }
40985
40985
  async function loadConfigForPolicyCurator(directory) {
40986
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-zqankczb.js");
40986
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-pjkzvcw8.js");
40987
40987
  try {
40988
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-2zzmthnv.js");
40988
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-16smfppa.js");
40989
40989
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
40990
40990
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
40991
40991
  } catch {
@@ -44043,7 +44043,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
44043
44043
  const seam = _internals38.createCuratorLLMDelegate;
44044
44044
  if (seam)
44045
44045
  return seam(directory, mode, sessionId);
44046
- const { createCuratorLLMDelegate } = await import("./curator-llm-factory-782jtn0a.js");
44046
+ const { createCuratorLLMDelegate } = await import("./curator-llm-factory-jjd0cxb2.js");
44047
44047
  return createCuratorLLMDelegate(directory, mode, sessionId);
44048
44048
  }
44049
44049
  async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
@@ -44438,7 +44438,7 @@ async function runFinalizeStage(ctx) {
44438
44438
  }
44439
44439
  }
44440
44440
  try {
44441
- const { CuratorConfigSchema: CCS } = await import("./schema-zqankczb.js");
44441
+ const { CuratorConfigSchema: CCS } = await import("./schema-pjkzvcw8.js");
44442
44442
  const { config: pmLoadedConfig } = _internals38.loadPluginConfigWithMeta(ctx.directory);
44443
44443
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
44444
44444
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -46624,7 +46624,7 @@ function serializeAgentSession(s) {
46624
46624
  }
46625
46625
  async function writeSnapshot(directory, state) {
46626
46626
  try {
46627
- const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-g4sg2fxv.js");
46627
+ const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-agx2sn6h.js");
46628
46628
  await ensureSnapshotCoordinationReady(directory);
46629
46629
  const snapshot = {
46630
46630
  version: 3,
@@ -49802,7 +49802,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
49802
49802
  };
49803
49803
  }
49804
49804
  async function sweepActiveNearDuplicates(directory, options = {}) {
49805
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-2zzmthnv.js");
49805
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-16smfppa.js");
49806
49806
  const { config } = loadPluginConfigWithMeta2(directory);
49807
49807
  const sweepConfig = config.learning?.dedup_sweep;
49808
49808
  if (sweepConfig?.enabled === false)
@@ -50926,7 +50926,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
50926
50926
  }
50927
50927
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
50928
50928
  try {
50929
- const skillModule = await import("./skill-generator-br4wctes.js");
50929
+ const skillModule = await import("./skill-generator-v6n0kwh0.js");
50930
50930
  for (const cand of skillCandidates) {
50931
50931
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
50932
50932
  continue;
@@ -51398,7 +51398,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
51398
51398
  } catch {}
51399
51399
  }
51400
51400
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
51401
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-rdgspj3v.js");
51401
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-ghx76dcv.js");
51402
51402
  for (const { id } of contradictedEntries) {
51403
51403
  try {
51404
51404
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -52230,7 +52230,7 @@ async function runCuratorPostMortem(directory, options = {}) {
52230
52230
  warnings.push("Failed to collect knowledge summary.");
52231
52231
  }
52232
52232
  try {
52233
- const { getScanStatus } = await import("./scan-cursor-krn56ew2.js");
52233
+ const { getScanStatus } = await import("./scan-cursor-7ny9bnmk.js");
52234
52234
  const scanStatus = await getScanStatus(directory);
52235
52235
  if (scanStatus.remaining_estimate > 0) {
52236
52236
  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.`);
@@ -52402,9 +52402,9 @@ var _internals57 = {
52402
52402
  verifyPostMortemKnowledgeActions,
52403
52403
  repairPostMortemActions,
52404
52404
  loadDefaultKnowledgeConfig: async (directory) => {
52405
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-zqankczb.js");
52405
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-pjkzvcw8.js");
52406
52406
  try {
52407
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-2zzmthnv.js");
52407
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-16smfppa.js");
52408
52408
  const loaded = loadPluginConfigWithMeta2(directory);
52409
52409
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
52410
52410
  } catch {
@@ -52412,11 +52412,11 @@ var _internals57 = {
52412
52412
  }
52413
52413
  },
52414
52414
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
52415
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-48mky2w8.js");
52415
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-m7sja3jp.js");
52416
52416
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
52417
52417
  },
52418
52418
  checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
52419
- const { checkHivePromotions } = await import("./hive-promoter-a1yw6evd.js");
52419
+ const { checkHivePromotions } = await import("./hive-promoter-06dzq5ms.js");
52420
52420
  return checkHivePromotions(entries2, knowledgeConfig, directory);
52421
52421
  },
52422
52422
  applyProposalTriage: async (directory, triage) => {
@@ -52425,7 +52425,7 @@ var _internals57 = {
52425
52425
  activateProposal,
52426
52426
  listSkills: listSkills2,
52427
52427
  sanitizeSlug
52428
- } = await import("./skill-generator-br4wctes.js");
52428
+ } = await import("./skill-generator-v6n0kwh0.js");
52429
52429
  const result = {
52430
52430
  approved: [],
52431
52431
  rejected: [],
@@ -52467,7 +52467,7 @@ var _internals57 = {
52467
52467
  return result;
52468
52468
  },
52469
52469
  readPriorDriftReports: async (directory) => {
52470
- const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-epvr1y5j.js");
52470
+ const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-5wc9jfmy.js");
52471
52471
  return readPriorDriftReports2(directory);
52472
52472
  },
52473
52473
  readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
@@ -62263,9 +62263,9 @@ var _internals67 = {
62263
62263
  loadPluginConfigWithMeta,
62264
62264
  loadCuratorDeps: async () => {
62265
62265
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
62266
- import("./schema-zqankczb.js"),
62267
- import("./curator-48mky2w8.js"),
62268
- import("./curator-llm-factory-782jtn0a.js")
62266
+ import("./schema-pjkzvcw8.js"),
62267
+ import("./curator-m7sja3jp.js"),
62268
+ import("./curator-llm-factory-jjd0cxb2.js")
62269
62269
  ]);
62270
62270
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
62271
62271
  }
@@ -64017,7 +64017,7 @@ function classifySettlementWalState(entry, workflow) {
64017
64017
  suggestedNextCommand: ""
64018
64018
  };
64019
64019
  }
64020
- function classifyEvidenceRecoveryTask(taskId, evidence2, greenPreCheck) {
64020
+ function classifyEvidenceRecoveryTask(taskId, evidence2, greenPreCheck, options) {
64021
64021
  const snapshot = evidence2?.workflow !== undefined && evidence2.workflow !== null ? { ...evidence2.workflow, authoritative: true } : null;
64022
64022
  if (snapshot === null) {
64023
64023
  return {
@@ -64047,6 +64047,16 @@ function classifyEvidenceRecoveryTask(taskId, evidence2, greenPreCheck) {
64047
64047
  };
64048
64048
  }
64049
64049
  }
64050
+ if (options?.settlementCommittedAccepted === true && (snapshot.state === "idle" || snapshot.state === "blocked")) {
64051
+ return {
64052
+ ...base,
64053
+ category: "settlement_wedge",
64054
+ repairAllowed: greenPreCheck === true,
64055
+ uncertainExternalEffect: false,
64056
+ explanation: `settlement-backed task wedge \u2014 workflow at ${snapshot.state} while a COMMITTED accepted coder settlement still justifies Stage A for generation ${snapshot.generation}${greenPreCheck === true ? " and green post-settlement pre-check bundles exist: the missing Stage A record is deterministically repairable without re-running the coder or editing evidence" : greenPreCheck === false ? " but pre-check proof is missing or not green: run pre_check_batch first \u2014 the repair refuses to mark Stage A passed without proof" : ""}`,
64057
+ suggestedNextCommand: `/swarm recover ${taskId}`
64058
+ };
64059
+ }
64050
64060
  return {
64051
64061
  ...base,
64052
64062
  category: "healthy",
@@ -64134,15 +64144,65 @@ async function enumerateStageACandidates(directory, requested) {
64134
64144
  truncated
64135
64145
  };
64136
64146
  }
64147
+ function latestCommittedAcceptedSettlementMs(taskId, walStates) {
64148
+ let latest = null;
64149
+ for (const state of walStates) {
64150
+ if (state.taskId !== taskId)
64151
+ continue;
64152
+ if (state.state !== "COMMITTED")
64153
+ continue;
64154
+ if (state.accepted !== true)
64155
+ continue;
64156
+ if (state.recordedAt === undefined)
64157
+ continue;
64158
+ const parsed = Date.parse(state.recordedAt);
64159
+ if (!Number.isFinite(parsed))
64160
+ continue;
64161
+ latest = latest === null ? parsed : Math.max(latest, parsed);
64162
+ }
64163
+ return latest;
64164
+ }
64137
64165
  async function scanStageATask(directory, taskId, walStates) {
64138
64166
  const evidence2 = await readTaskEvidence(directory, taskId);
64139
64167
  const workflow = getTaskWorkflowSnapshot(evidence2);
64140
- if (workflow.state !== "coder_delegated") {
64168
+ if (workflow.state === "coder_delegated") {
64169
+ if (!evidence2?.gates?.pre_check) {
64170
+ const greenness = await hasGreenPostSettlementPreCheck(directory, liveWedgeSettledAfterMs(taskId, workflow, walStates));
64171
+ if (!greenness.green) {
64172
+ return { kind: "not_green", reason: greenness.reason, evidence: evidence2 };
64173
+ }
64174
+ return {
64175
+ kind: "repairable",
64176
+ mode: "live_wedge",
64177
+ generation: workflow.generation,
64178
+ green: true,
64179
+ predecessorTransitionId: workflow.lastTransitionId ?? null,
64180
+ evidence: evidence2
64181
+ };
64182
+ }
64141
64183
  return { kind: "not_wedged", state: workflow.state, evidence: evidence2 };
64142
64184
  }
64143
- if (evidence2?.gates?.pre_check) {
64185
+ if (workflow.state === "idle" || workflow.state === "blocked") {
64186
+ const settledAfterMs = latestCommittedAcceptedSettlementMs(taskId, walStates);
64187
+ if (settledAfterMs !== null && (workflow.state === "blocked" || !evidence2?.gates?.pre_check)) {
64188
+ const greenness = await hasGreenPostSettlementPreCheck(directory, settledAfterMs);
64189
+ if (!greenness.green) {
64190
+ return { kind: "not_green", reason: greenness.reason, evidence: evidence2 };
64191
+ }
64192
+ return {
64193
+ kind: "repairable",
64194
+ mode: "settlement_wedge",
64195
+ generation: workflow.generation,
64196
+ green: true,
64197
+ predecessorTransitionId: workflow.lastTransitionId ?? null,
64198
+ evidence: evidence2
64199
+ };
64200
+ }
64144
64201
  return { kind: "not_wedged", state: workflow.state, evidence: evidence2 };
64145
64202
  }
64203
+ return { kind: "not_wedged", state: workflow.state, evidence: evidence2 };
64204
+ }
64205
+ function liveWedgeSettledAfterMs(taskId, workflow, walStates) {
64146
64206
  let settledAfterMs = null;
64147
64207
  for (const state of walStates) {
64148
64208
  if (state.taskId !== taskId)
@@ -64161,17 +64221,7 @@ async function scanStageATask(directory, taskId, walStates) {
64161
64221
  if (Number.isFinite(fallbackTs))
64162
64222
  settledAfterMs = fallbackTs;
64163
64223
  }
64164
- const greenness = await hasGreenPostSettlementPreCheck(directory, settledAfterMs);
64165
- if (!greenness.green) {
64166
- return { kind: "not_green", reason: greenness.reason, evidence: evidence2 };
64167
- }
64168
- return {
64169
- kind: "repairable",
64170
- generation: workflow.generation,
64171
- green: true,
64172
- predecessorTransitionId: workflow.lastTransitionId ?? null,
64173
- evidence: evidence2
64174
- };
64224
+ return settledAfterMs;
64175
64225
  }
64176
64226
  async function scanWedgedStageA(directory, options) {
64177
64227
  const { selected, truncated } = await enumerateStageACandidates(directory, options?.taskIds);
@@ -64181,9 +64231,13 @@ async function scanWedgedStageA(directory, options) {
64181
64231
  try {
64182
64232
  const verdict = await scanStageATask(directory, taskId, walStates);
64183
64233
  if (verdict.kind === "repairable") {
64184
- results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, verdict.green));
64234
+ results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, verdict.green, {
64235
+ settlementCommittedAccepted: verdict.mode === "settlement_wedge"
64236
+ }));
64185
64237
  } else if (verdict.kind === "not_green") {
64186
- results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, false));
64238
+ results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, false, {
64239
+ settlementCommittedAccepted: verdict.evidence !== null && ["idle", "blocked"].includes(getTaskWorkflowSnapshot(verdict.evidence).state) && latestCommittedAcceptedSettlementMs(taskId, walStates) !== null
64240
+ }));
64187
64241
  } else {
64188
64242
  results.push(classifyEvidenceRecoveryTask(taskId, verdict.evidence, null));
64189
64243
  }
@@ -64216,18 +64270,23 @@ async function repairWedgedStageA(directory, options) {
64216
64270
  continue;
64217
64271
  }
64218
64272
  const transitionId = `stage-a-repair:${taskId}:${scan.generation}`;
64219
- await transitionTaskWorkflowEvidence(directory, taskId, {
64273
+ const { duplicated } = await transitionTaskWorkflowEvidenceWithStatus(directory, taskId, {
64220
64274
  type: "stage_a_passed",
64275
+ ...scan.mode === "settlement_wedge" ? { settlementRecovery: true } : {},
64221
64276
  expectedGeneration: scan.generation,
64222
64277
  transitionId
64223
64278
  });
64224
- await appendStageARepairEvent(directory, {
64225
- action: "repaired",
64226
- taskId,
64227
- transitionId,
64228
- generation: scan.generation,
64229
- predecessorTransitionId: scan.predecessorTransitionId
64230
- });
64279
+ if (!duplicated) {
64280
+ await appendStageARepairEvent(directory, {
64281
+ action: "repaired",
64282
+ taskId,
64283
+ transitionId,
64284
+ generation: scan.generation,
64285
+ ...scan.mode === "settlement_wedge" ? { settlementRecovery: true } : {},
64286
+ via: "swarm-recover",
64287
+ predecessorTransitionId: scan.predecessorTransitionId
64288
+ });
64289
+ }
64231
64290
  results.push({
64232
64291
  taskId,
64233
64292
  outcome: "repaired",
@@ -64599,7 +64658,7 @@ async function computeCurationDiagnostics(directory, entries2) {
64599
64658
  let scanCompleted = false;
64600
64659
  let scanRemaining = 0;
64601
64660
  try {
64602
- const { getScanStatus } = await import("./scan-cursor-krn56ew2.js");
64661
+ const { getScanStatus } = await import("./scan-cursor-7ny9bnmk.js");
64603
64662
  const status = await getScanStatus(directory);
64604
64663
  scanGeneration = status.generation;
64605
64664
  scanCompleted = status.completed;
@@ -64607,19 +64666,19 @@ async function computeCurationDiagnostics(directory, entries2) {
64607
64666
  } catch {}
64608
64667
  let configMatch = null;
64609
64668
  try {
64610
- const { isLinked: isLinked2 } = await import("./knowledge-link-ap2274vm.js");
64669
+ const { isLinked: isLinked2 } = await import("./knowledge-link-xw6vsbx3.js");
64611
64670
  if (isLinked2(directory)) {
64612
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-zqankczb.js");
64671
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-pjkzvcw8.js");
64613
64672
  let config;
64614
64673
  try {
64615
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-2zzmthnv.js");
64674
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-16smfppa.js");
64616
64675
  const loaded = loadPluginConfigWithMeta2(directory);
64617
64676
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
64618
64677
  } catch {
64619
64678
  config = KnowledgeConfigSchema2.parse({});
64620
64679
  }
64621
64680
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
64622
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-49f8jx48.js");
64681
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-k43q6b91.js");
64623
64682
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
64624
64683
  const cohortFp = await readCohortConfigFingerprint(directory);
64625
64684
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -65625,7 +65684,7 @@ async function getDiagnoseData(directory, sessionID) {
65625
65684
  settlementStatuses.push(classifySettlementWalState(entry, workflow));
65626
65685
  }
65627
65686
  const wedgeScan = await scanWedgedStageA(directory);
65628
- const wedgeStatuses = wedgeScan.results.filter((status) => status.category === "live_wedge");
65687
+ const wedgeStatuses = wedgeScan.results.filter((status) => status.category === "live_wedge" || status.category === "settlement_wedge");
65629
65688
  const knownTaskIds = new Set([
65630
65689
  ...settlementStates.map((entry) => entry.taskId),
65631
65690
  ...wedgeScan.results.map((status) => status.taskId)
@@ -65644,7 +65703,8 @@ async function getDiagnoseData(directory, sessionID) {
65644
65703
  ...wedgeStatuses
65645
65704
  ];
65646
65705
  const missingLines = missingStatuses.map(renderTaskRecoveryLine).filter(Boolean);
65647
- const healthyCount = settlementStatuses.filter((s) => s.category === "healthy").length;
65706
+ const wedgeTaskIds = new Set(wedgeStatuses.map((s) => s.taskId));
65707
+ const healthyCount = settlementStatuses.filter((s) => s.category === "healthy" && !wedgeTaskIds.has(s.taskId)).length;
65648
65708
  if (nonHealthy.length === 0 && !truncated) {
65649
65709
  checks.push({
65650
65710
  name: "Coder Settlements",
@@ -65665,7 +65725,7 @@ async function getDiagnoseData(directory, sessionID) {
65665
65725
  checks.push({
65666
65726
  name: "Coder Settlements",
65667
65727
  status: "\u26A0\uFE0F",
65668
- detail: `${lines.join("; ")}${healthyCount > 0 ? `; ${healthyCount} healthy settlement(s)` : ""}. Categories: missing/stale/ambiguous/corrupt/live_wedge \u2014 stale settlements block dispatches with CODER_DISPATCH_IN_PROGRESS. ${renderRecoveryInvocationQuickForms()}${truncationNote}`
65728
+ detail: `${lines.join("; ")}${healthyCount > 0 ? `; ${healthyCount} healthy settlement(s)` : ""}. Categories: missing/stale/ambiguous/corrupt/live_wedge/settlement_wedge \u2014 stale settlements block dispatches with CODER_DISPATCH_IN_PROGRESS. ${renderRecoveryInvocationQuickForms()}${truncationNote}`
65669
65729
  });
65670
65730
  }
65671
65731
  } catch (error2) {
@@ -66066,7 +66126,7 @@ async function handleDoctorCommand(directory, args) {
66066
66126
  const result = runConfigDoctor(config, directory);
66067
66127
  let output;
66068
66128
  if (enableAutoFix && result.hasAutoFixableIssues) {
66069
- const { runConfigDoctorWithFixes } = await import("./config-doctor-1qgq2s96.js");
66129
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-g48tz4kt.js");
66070
66130
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
66071
66131
  applyLossy: true
66072
66132
  });
@@ -66104,7 +66164,7 @@ async function handleDoctorCommand(directory, args) {
66104
66164
  `;
66105
66165
  }
66106
66166
  try {
66107
- const { runModelPreflight } = await import("./model-preflight-qy88p9fc.js");
66167
+ const { runModelPreflight } = await import("./model-preflight-kn3xqvfk.js");
66108
66168
  const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
66109
66169
  const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
66110
66170
  const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
@@ -67031,7 +67091,7 @@ async function handleEvidenceCommand(directory, args) {
67031
67091
  return formatTaskEvidenceMarkdown(evidenceData);
67032
67092
  }
67033
67093
  async function handleEvidenceSummaryCommand(directory) {
67034
- const { buildEvidenceSummary } = await import("./evidence-summary-service-akzas6he.js");
67094
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-sx8x12w0.js");
67035
67095
  const artifact = await buildEvidenceSummary(directory);
67036
67096
  if (!artifact) {
67037
67097
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -91305,7 +91365,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
91305
91365
  }
91306
91366
  const sdkOpts = signal ? { signal } : {};
91307
91367
  try {
91308
- const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-tzejdtyx.js");
91368
+ const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-kbd6apth.js");
91309
91369
  const createResult = await client.session.create({
91310
91370
  ...sessionId ? {
91311
91371
  body: {
@@ -93278,7 +93338,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
93278
93338
  clearedEvents: []
93279
93339
  };
93280
93340
  try {
93281
- const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-1jcs4wnp.js");
93341
+ const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-ph4fvf47.js");
93282
93342
  await cancelPrFeedbackPublication2(directory, sessionID, reason);
93283
93343
  } catch (err) {
93284
93344
  warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
@@ -101143,6 +101203,9 @@ function renderStageARepairOutcome(outcome) {
101143
101203
  if (outcome.state === "rework_required") {
101144
101204
  return `\u23ED\uFE0F Task ${outcome.taskId}: workflow state is rework_required \u2014 not a coder_delegated Stage A wedge, nothing to repair here. If the Stage B verdict did not require a code change, have the architect run the recover_rework_task tool for this task; otherwise delegate the coder to repair first.`;
101145
101205
  }
101206
+ if (outcome.state === "idle" || outcome.state === "blocked") {
101207
+ return `\u23ED\uFE0F Task ${outcome.taskId}: workflow state is ${outcome.state} \u2014 no Stage A repair is needed or provable here (a mechanical repair requires a COMMITTED accepted coder settlement AND green post-settlement pre-check evidence AND no Stage A proof already recorded). When Stage A is already recorded the task needs nothing; when the receipts exist but the mechanical envelope excludes them, the architect can run the audited recover_stage_a_task tool. --force does not override Stage A wedge-classification refusals.`;
101208
+ }
101146
101209
  return `\u23ED\uFE0F Task ${outcome.taskId}: workflow state is ${outcome.state} with pre_check proof present or not settled \u2014 nothing to repair`;
101147
101210
  case "skipped_not_green":
101148
101211
  return `\u23ED\uFE0F Task ${outcome.taskId}: no green post-settlement pre-check evidence (${outcome.reason === "no_pre_check_bundles" ? "missing or non-green secretscan/SAST bundle \u2014 run pre_check_batch first" : "latest pre-check run failed or predates the settlement"}) \u2014 refusing to mark Stage A passed without proof`;
@@ -106813,7 +106876,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
106813
106876
  if (!input.dispatcher) {
106814
106877
  throw new Error("no evaluation dispatcher available (cannot run validation)");
106815
106878
  }
106816
- const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-yz3ysehf.js");
106879
+ const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-pvdhxh74.js");
106817
106880
  const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
106818
106881
  const result = await withProtectedSetIntegrity([evalInputRoot, ...protectedRoots(input.directory)], () => _internals128.evaluateCandidateV1({
106819
106882
  projectRoot: input.directory,
@@ -109442,7 +109505,7 @@ function buildDetailedHelp(commandName, entry) {
109442
109505
  async function handleHelpCommand(ctx) {
109443
109506
  const targetCommand = ctx.args.join(" ");
109444
109507
  if (!targetCommand) {
109445
- const { buildHelpText } = await import("./index-h9hvszf7.js");
109508
+ const { buildHelpText } = await import("./index-8bvpcbk8.js");
109446
109509
  return buildHelpText();
109447
109510
  }
109448
109511
  const tokens = targetCommand.split(/\s+/);
@@ -109456,7 +109519,7 @@ async function handleHelpCommand(ctx) {
109456
109519
  > Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
109457
109520
  }
109458
109521
  const similar = _internals26.findSimilarCommands(targetCommand);
109459
- const { buildHelpText: fullHelp } = await import("./index-h9hvszf7.js");
109522
+ const { buildHelpText: fullHelp } = await import("./index-8bvpcbk8.js");
109460
109523
  if (similar.length > 0) {
109461
109524
  return `Command '/swarm ${targetCommand}' not found.
109462
109525
 
@@ -109771,7 +109834,7 @@ var COMMAND_REGISTRY = {
109771
109834
  },
109772
109835
  "guardrail explain": {
109773
109836
  handler: async (ctx) => {
109774
- const { handleGuardrailExplain } = await import("./guardrail-explain-xgahzbts.js");
109837
+ const { handleGuardrailExplain } = await import("./guardrail-explain-x81m4s8q.js");
109775
109838
  return handleGuardrailExplain(ctx.directory, ctx.args);
109776
109839
  },
109777
109840
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -109781,7 +109844,7 @@ var COMMAND_REGISTRY = {
109781
109844
  },
109782
109845
  "guardrail reset": {
109783
109846
  handler: async (ctx) => {
109784
- const { handleGuardrailReset } = await import("./guardrail-reset-3br6fs4n.js");
109847
+ const { handleGuardrailReset } = await import("./guardrail-reset-ksrr2r0n.js");
109785
109848
  return handleGuardrailReset(ctx.args, ctx.sessionID);
109786
109849
  },
109787
109850
  description: "Reset one exact active invocation/action circuit after repair",
@@ -109802,7 +109865,7 @@ var COMMAND_REGISTRY = {
109802
109865
  },
109803
109866
  "guardrail-log": {
109804
109867
  handler: async (ctx) => {
109805
- const { handleGuardrailLog } = await import("./guardrail-log-n2cgvbh1.js");
109868
+ const { handleGuardrailLog } = await import("./guardrail-log-mcv4ad3t.js");
109806
109869
  return handleGuardrailLog(ctx.directory, ctx.args);
109807
109870
  },
109808
109871
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -110579,7 +110642,7 @@ Subcommands:
110579
110642
  recover: {
110580
110643
  handler: (ctx) => handleRecoverCommand(ctx.directory, ctx.args),
110581
110644
  description: "Recover wedged coder settlements [task_id] [--force]",
110582
- details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ \u2014 the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Also repairs tasks wedged at coder_delegated with unattributed green pre_check evidence \u2014 the post-reset TASK_WORKFLOW_STAGE_A_REQUIRED wedge \u2014 by writing the missing stage_a_passed transition directly (audit events land in .swarm/events.jsonl); pass [task_id] to scope both phases to one task. Diagnose and repair emit per-category status explanations (missing/stale/ambiguous/corrupt/live_wedge) with shell-correct invocation guidance per host \u2014 see docs/troubleshooting/recovery-runbook.md (#2665). Human-only.",
110645
+ details: "Settles stale coder-settlement WALs in .swarm/coder-settlements/ \u2014 the CODER_DISPATCH_IN_PROGRESS wedge where a dispatch's completion never fired (issue #2268). Safe mode recovers settlements whose owner process is gone. --force also releases ownership keys held by this process: use only when no dispatch is genuinely running (a late completion then reports CODER_SETTLEMENT_IDEMPOTENCY_CONFLICT, safe to ignore). Never interrupts another live OpenCode process. Also repairs tasks wedged at coder_delegated with unattributed green pre_check evidence \u2014 the post-reset TASK_WORKFLOW_STAGE_A_REQUIRED wedge \u2014 and the settlement-wedge class (issue #2828): a task whose workflow drifted to idle or blocked while a COMMITTED accepted coder settlement and green post-settlement pre-check evidence still justify Stage A gets the missing stage_a_passed written directly, with a settlementRecovery marker and a stage_a_repair audit event in .swarm/events.jsonl; the architect-side audited escape hatch for the same receipts is the recover_stage_a_task tool. Note that --force affects only in-process settlement-WAL ownership and does not override Stage A wedge-classification refusals. Pass [task_id] to scope both phases to one task. Diagnose and repair emit per-category status explanations (missing/stale/ambiguous/corrupt/live_wedge/settlement_wedge) with shell-correct invocation guidance per host \u2014 see docs/troubleshooting/recovery-runbook.md (#2665). Human-only.",
110583
110646
  args: "[task_id] [--force]",
110584
110647
  category: "utility",
110585
110648
  toolPolicy: "human-only"