opencode-swarm 7.187.2 → 7.188.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +18 -1
  2. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  3. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  4. package/dist/background/delegation-lifecycle.d.ts +4 -0
  5. package/dist/cli/{auto-checkpoint-2xmptd5t.js → auto-checkpoint-hm3qjke6.js} +7 -7
  6. package/dist/cli/{checkpoint-2y7z19y5.js → checkpoint-z3eprns8.js} +12 -12
  7. package/dist/cli/{coder-settlement-s4d28fa6.js → coder-settlement-enhpgjdh.js} +8 -8
  8. package/dist/cli/{config-doctor-312afzhr.js → config-doctor-pfwj6c8d.js} +11 -11
  9. package/dist/cli/{core-2bywxc4w.js → core-r7ypbkzn.js} +1 -1
  10. package/dist/cli/{curation-policy-sr29thf5.js → curation-policy-v64ctcbd.js} +5 -5
  11. package/dist/cli/{curator-drift-xx8pp4g9.js → curator-drift-4e9p7afg.js} +5 -5
  12. package/dist/cli/{curator-llm-factory-4g2nvr76.js → curator-llm-factory-gnx5wyx0.js} +35 -35
  13. package/dist/cli/{curator-dvhf6jex.js → curator-m1f5tpmq.js} +35 -35
  14. package/dist/cli/{doctor-knowledge-receipt-phase-id-m239pgbz.js → doctor-knowledge-receipt-phase-id-mdvra07t.js} +6 -6
  15. package/dist/cli/{evidence-summary-service-9et04fjh.js → evidence-summary-service-64nqgkaw.js} +15 -15
  16. package/dist/cli/{gate-evidence-73vj3bgm.js → gate-evidence-22eweae0.js} +5 -5
  17. package/dist/cli/{guardrail-explain-8n4fx9zv.js → guardrail-explain-e6z5x5jt.js} +36 -36
  18. package/dist/cli/{guardrail-log-9gmfvnd7.js → guardrail-log-x53wpnp0.js} +6 -6
  19. package/dist/cli/{guardrail-reset-k3mrq25e.js → guardrail-reset-zr13a010.js} +35 -35
  20. package/dist/cli/{hive-promoter-bp3rz0q6.js → hive-promoter-knbj0apv.js} +35 -35
  21. package/dist/cli/{index-b308erem.js → index-00mqbc83.js} +3 -3
  22. package/dist/cli/{index-3ckfawjf.js → index-0dvkbkhg.js} +3 -3
  23. package/dist/cli/{index-jyxgkp4a.js → index-0v2svrev.js} +1 -1
  24. package/dist/cli/{index-m1vsqmyr.js → index-170k2yeh.js} +1 -1
  25. package/dist/cli/{index-3g3n9fjq.js → index-1wzsp7ag.js} +3 -3
  26. package/dist/cli/{index-f6pft90q.js → index-2bdebshy.js} +3 -3
  27. package/dist/cli/{index-3y0nr248.js → index-41v699sv.js} +3 -3
  28. package/dist/cli/{index-dx6bhbd6.js → index-4htcpbs4.js} +70 -51
  29. package/dist/cli/{index-y81jjedn.js → index-4ws5agzc.js} +6 -6
  30. package/dist/cli/{index-pqffq9mm.js → index-64s3825r.js} +2 -2
  31. package/dist/cli/{index-wpxy7099.js → index-6j6fmw3r.js} +1 -1
  32. package/dist/cli/{index-kc635w60.js → index-6qef1jtq.js} +4 -4
  33. package/dist/cli/{index-33345434.js → index-6zpfvs4t.js} +3 -3
  34. package/dist/cli/{index-85cx1mmb.js → index-78ag9dsc.js} +4 -4
  35. package/dist/cli/{index-6t7ygevg.js → index-7sbyvk99.js} +1 -1
  36. package/dist/cli/{index-b5tthmy2.js → index-7vrnbtsk.js} +1 -1
  37. package/dist/cli/{index-z04d01pv.js → index-8b0gmpm6.js} +7 -7
  38. package/dist/cli/{index-j5db3v56.js → index-8tqt8fbf.js} +4 -4
  39. package/dist/cli/{index-exj7czz9.js → index-8xzsncfk.js} +4 -4
  40. package/dist/cli/{index-xs070yr9.js → index-9yw1fgpp.js} +2 -2
  41. package/dist/cli/{index-tq6sbcys.js → index-aahk3yq1.js} +157 -108
  42. package/dist/cli/{index-4g39nne8.js → index-af1qsczg.js} +2 -2
  43. package/dist/cli/{index-e9ry78z5.js → index-b9pz70d0.js} +2 -2
  44. package/dist/cli/{index-tngc1erw.js → index-bd4agttq.js} +2 -2
  45. package/dist/cli/{index-dqberkr3.js → index-dfyjz036.js} +77 -11
  46. package/dist/cli/{index-jh9nrshe.js → index-ggdwbsc3.js} +1 -1
  47. package/dist/cli/{index-9jafghwk.js → index-j5ecgr3f.js} +35 -35
  48. package/dist/cli/{index-26zs9wsj.js → index-jd3hvnqn.js} +2 -2
  49. package/dist/cli/{index-tkm2rj27.js → index-jj222n0z.js} +1 -1
  50. package/dist/cli/{index-310h5192.js → index-k333nq26.js} +2 -2
  51. package/dist/cli/{index-v9y0230d.js → index-mb1reyw3.js} +1 -1
  52. package/dist/cli/{index-w0bvez8c.js → index-nf22t88g.js} +1 -1
  53. package/dist/cli/{index-tmp07h7b.js → index-qe3e6z5c.js} +37 -37
  54. package/dist/cli/{index-n8kqhxay.js → index-rwabrcsg.js} +1 -1
  55. package/dist/cli/{index-xv0t2sed.js → index-txecan4h.js} +14 -9
  56. package/dist/cli/{index-rtdxyjrg.js → index-w4309fkk.js} +6 -6
  57. package/dist/cli/{index-n55exns2.js → index-x73e0zkb.js} +1 -1
  58. package/dist/cli/{index-efbhea00.js → index-xgr0rjhh.js} +1 -1
  59. package/dist/cli/{index-7fxy1s86.js → index-zwbheerv.js} +4 -4
  60. package/dist/cli/{index-n45kz69m.js → index-zwgh0gty.js} +1 -1
  61. package/dist/cli/index.js +36 -36
  62. package/dist/cli/{knowledge-escalator-fnqctvxz.js → knowledge-escalator-w043k3ah.js} +12 -12
  63. package/dist/cli/{knowledge-events-mr1vh3nb.js → knowledge-events-krd8ndqh.js} +10 -10
  64. package/dist/cli/{knowledge-link-93nzznwd.js → knowledge-link-9gx2djyd.js} +4 -4
  65. package/dist/cli/{knowledge-store-dxy4s9k6.js → knowledge-store-0x9ejztz.js} +5 -5
  66. package/dist/cli/{knowledge-validator-gy39attk.js → knowledge-validator-y7pr7h3g.js} +7 -7
  67. package/dist/cli/{mcp-bxb59wsq.js → mcp-tf5b5aqa.js} +1 -1
  68. package/dist/cli/{model-preflight-2kje0sp0.js → model-preflight-pt6n1re7.js} +35 -35
  69. package/dist/cli/{pending-delegations-fm2nx2k0.js → pending-delegations-rqfgnay0.js} +7 -7
  70. package/dist/cli/{pr-subscriptions-g4f9rehb.js → pr-subscriptions-1frpr34c.js} +7 -7
  71. package/dist/cli/{pr-workflow-gate-qtq1wq95.js → pr-workflow-gate-dhzvaqj8.js} +35 -35
  72. package/dist/cli/{runner-verr6er5.js → runner-x8sbydkw.js} +5 -5
  73. package/dist/cli/{scan-cursor-8taj944f.js → scan-cursor-nm6h3gdd.js} +6 -6
  74. package/dist/cli/{schema-yxq3bjmd.js → schema-4fxm5b9r.js} +1 -1
  75. package/dist/cli/{scope-persistence-jppvjncr.js → scope-persistence-3hs7yy2b.js} +11 -11
  76. package/dist/cli/{server-2s7wqg9e.js → server-tmjef10y.js} +35 -35
  77. package/dist/cli/{skill-generator-pyf95aqw.js → skill-generator-qk0gpwhq.js} +14 -14
  78. package/dist/cli/{snapshot-coordination-init-8gbxw9sa.js → snapshot-coordination-init-pqsgthaa.js} +35 -35
  79. package/dist/cli/{speckit-checkoff-x2z0jamv.js → speckit-checkoff-9kx59cdb.js} +3 -3
  80. package/dist/cli/{telemetry-xwj899pd.js → telemetry-d0j31j5d.js} +1 -1
  81. package/dist/cli/{worktree-collision-ownership-455bdcnk.js → worktree-collision-ownership-d890zzka.js} +7 -7
  82. package/dist/cli/{worktree-isolation-8x4p7tvm.js → worktree-isolation-45hj9jy7.js} +35 -35
  83. package/dist/commands/close/align-stage.d.ts +26 -0
  84. package/dist/commands/close/context.d.ts +8 -0
  85. package/dist/commands/close/internals.d.ts +1 -1
  86. package/dist/commands/destructive-purge.d.ts +55 -27
  87. package/dist/commands/registry.d.ts +1 -1
  88. package/dist/hooks/knowledge-validator.d.ts +18 -1
  89. package/dist/index.js +25 -24
  90. package/dist/models/model-override-state.d.ts +24 -1
  91. package/dist/models/task-model-routing.d.ts +58 -1
  92. package/dist/observability/catalog.d.ts +3 -3
  93. package/dist/telemetry.d.ts +15 -1
  94. package/dist/tools/repo-map.d.ts +4 -0
  95. package/package.json +1 -1
@@ -8,14 +8,14 @@ import {
8
8
  protectedRoots,
9
9
  redactDecisionLineForArchive,
10
10
  stableCanonicalStringify
11
- } from "./index-3g3n9fjq.js";
11
+ } from "./index-1wzsp7ag.js";
12
12
  import {
13
13
  detectStraySwarmDirs,
14
14
  readDoctorArtifact,
15
15
  removeStraySwarmDir,
16
16
  resolvePlanParallelizationFlag,
17
17
  runConfigDoctor
18
- } from "./index-pqffq9mm.js";
18
+ } from "./index-64s3825r.js";
19
19
  import {
20
20
  archiveEvidence,
21
21
  checkRequirementCoverage,
@@ -27,7 +27,7 @@ import {
27
27
  sanitizeTaskId,
28
28
  saveEvidence,
29
29
  validateProjectRoot
30
- } from "./index-f6pft90q.js";
30
+ } from "./index-2bdebshy.js";
31
31
  import {
32
32
  JAVA_SYMBOL_GRAMMAR,
33
33
  LANGUAGE_REGISTRY,
@@ -48,7 +48,7 @@ import {
48
48
  runEvaluation,
49
49
  runExternalTool,
50
50
  withDisposableWorktree
51
- } from "./index-n55exns2.js";
51
+ } from "./index-x73e0zkb.js";
52
52
  import {
53
53
  EvaluationTaskV1Schema,
54
54
  GateAuditManifestV1Schema,
@@ -65,7 +65,7 @@ import {
65
65
  saveGateAuditResult,
66
66
  savePromotionDecision,
67
67
  saveTaskSetSnapshot
68
- } from "./index-26zs9wsj.js";
68
+ } from "./index-jd3hvnqn.js";
69
69
  import {
70
70
  canonicalHash,
71
71
  canonicalJson,
@@ -81,7 +81,7 @@ import {
81
81
  alreadyCuratedThisGeneration,
82
82
  claimNextScanBatch,
83
83
  resolveCohortId
84
- } from "./index-4g39nne8.js";
84
+ } from "./index-af1qsczg.js";
85
85
  import {
86
86
  CURATOR_CONSOLIDATION_PROMPT,
87
87
  CURATOR_INIT_PROMPT,
@@ -100,13 +100,13 @@ import {
100
100
  getGroupCommitWriter,
101
101
  importLegacyJsonl,
102
102
  readPriorDriftReports
103
- } from "./index-tkm2rj27.js";
103
+ } from "./index-jj222n0z.js";
104
104
  import {
105
105
  assertNoUnsettledCoderDispatch,
106
106
  listCoderSettlementWalStates,
107
107
  recoverCoderSettlement,
108
108
  recoverStaleCoderSettlements
109
- } from "./index-85cx1mmb.js";
109
+ } from "./index-78ag9dsc.js";
110
110
  import {
111
111
  BUNDLED_PROJECT_SKILL_ROOT,
112
112
  DEFAULT_SKILL_MIN_CONFIDENCE,
@@ -127,11 +127,11 @@ import {
127
127
  retireSkill,
128
128
  selectCandidateEntries,
129
129
  syncBundledProjectSkillsIfMissingAsync
130
- } from "./index-3ckfawjf.js";
130
+ } from "./index-0dvkbkhg.js";
131
131
  import {
132
132
  buildEscalationBriefing,
133
133
  readRecentEscalations
134
- } from "./index-rtdxyjrg.js";
134
+ } from "./index-w4309fkk.js";
135
135
  import {
136
136
  parsePorcelainV2Snapshot,
137
137
  resolveCommitCountSince,
@@ -180,7 +180,7 @@ import {
180
180
  sweepStale,
181
181
  unsubscribe,
182
182
  updateSnapshot
183
- } from "./index-3y0nr248.js";
183
+ } from "./index-41v699sv.js";
184
184
  import {
185
185
  WORKTREE_LIFECYCLE_LOCK_FILE,
186
186
  recordWorktreeProvisioningOwner,
@@ -195,6 +195,7 @@ import {
195
195
  yieldToEventLoop
196
196
  } from "./index-q7sjgr1y.js";
197
197
  import {
198
+ GIT_STATUS_ARGS,
198
199
  ROLLBACK_GIT_KIND,
199
200
  ROLLBACK_PHASE_KIND,
200
201
  backupSwarmStateBeforeReset,
@@ -204,11 +205,13 @@ import {
204
205
  executeDestructivePurge,
205
206
  issueConfirmToken,
206
207
  measureGitDestruction,
208
+ parseTrackedDirtyPaths,
207
209
  previewDestructivePurge,
210
+ recheckBeforeDestructive,
208
211
  resolveWorkingDirectory,
209
212
  swarmOverwriteCandidates,
210
213
  trackedDirtyCandidates
211
- } from "./index-dqberkr3.js";
214
+ } from "./index-dfyjz036.js";
212
215
  import {
213
216
  MAX_TRANSIENT_RETRIES,
214
217
  PlanRecoverySupersededError,
@@ -235,7 +238,7 @@ import {
235
238
  transientBackoff,
236
239
  updateTaskStatus,
237
240
  withPlanLifecycleLock
238
- } from "./index-z04d01pv.js";
241
+ } from "./index-8b0gmpm6.js";
239
242
  import {
240
243
  containsControlChars,
241
244
  containsPathTraversal,
@@ -251,7 +254,7 @@ import {
251
254
  resolveSpeckitProjection,
252
255
  validateSpeckit,
253
256
  writeProjectedSpecSync
254
- } from "./index-efbhea00.js";
257
+ } from "./index-xgr0rjhh.js";
255
258
  import {
256
259
  clearWorktreeMergeStatus,
257
260
  getAllWorktreeMergeFailures,
@@ -282,7 +285,7 @@ import {
282
285
  transitionTaskWorkflowEvidenceWithStatus,
283
286
  withTaskEvidenceTransaction,
284
287
  writeWorkflowWalFile
285
- } from "./index-b308erem.js";
288
+ } from "./index-00mqbc83.js";
286
289
  import {
287
290
  isPathUnderSwarmWorktreeBase,
288
291
  listLiveLaneOwners,
@@ -291,7 +294,7 @@ import {
291
294
  recordLiveLaneOwner,
292
295
  removeWorktree,
293
296
  resolveWorktreeBaseDir
294
- } from "./index-jh9nrshe.js";
297
+ } from "./index-ggdwbsc3.js";
295
298
  import {
296
299
  DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
297
300
  DELEGATION_COMPACTION_HIGH_WATER_BYTES,
@@ -325,7 +328,7 @@ import {
325
328
  scanBackgroundCoderReservationsForAdmission,
326
329
  scanDelegationsForRecovery,
327
330
  sweepStaleDelegations
328
- } from "./index-exj7czz9.js";
331
+ } from "./index-8xzsncfk.js";
329
332
  import {
330
333
  MAX_EVENT_LOG_ENTRIES,
331
334
  _internals,
@@ -337,7 +340,7 @@ import {
337
340
  recordHiveKnowledgeEvent,
338
341
  recordKnowledgeEvent,
339
342
  resolveKnowledgeEventsPath
340
- } from "./index-kc635w60.js";
343
+ } from "./index-6qef1jtq.js";
341
344
  import {
342
345
  commitDisplayedMembership,
343
346
  commitEmptyRetrieval,
@@ -350,7 +353,7 @@ import {
350
353
  queryLiveMemberships,
351
354
  reconcilePhaseClose,
352
355
  recordPhaseCloseIntent
353
- } from "./index-j5db3v56.js";
356
+ } from "./index-8tqt8fbf.js";
354
357
  import {
355
358
  sanitizeContextText
356
359
  } from "./index-m9zzj4ee.js";
@@ -381,18 +384,18 @@ import {
381
384
  validateActionableFields,
382
385
  validateLesson,
383
386
  validateSkillPath
384
- } from "./index-xv0t2sed.js";
387
+ } from "./index-txecan4h.js";
385
388
  import {
386
389
  MAX_CURATION_PROPOSALS,
387
390
  authorizeCuration,
388
391
  buildConfigFingerprintInput
389
- } from "./index-n8kqhxay.js";
392
+ } from "./index-rwabrcsg.js";
390
393
  import {
391
394
  cohortConfigFingerprint
392
395
  } from "./index-rtry5xyf.js";
393
396
  import {
394
397
  resolveWorktreeIsolationConfig
395
- } from "./index-tngc1erw.js";
398
+ } from "./index-bd4agttq.js";
396
399
  import {
397
400
  RetrospectiveEvidenceSchema
398
401
  } from "./index-kbkk7vnh.js";
@@ -404,7 +407,7 @@ import {
404
407
  clearScopeBindings,
405
408
  readAuthoritativeScopeBindingSet,
406
409
  readDeclaredScopeFilesFromBindings
407
- } from "./index-310h5192.js";
410
+ } from "./index-k333nq26.js";
408
411
  import {
409
412
  clearPlanLedgerForReset,
410
413
  computePlanStructureHash,
@@ -420,7 +423,7 @@ import {
420
423
  replayFromLedgerWithStatus,
421
424
  resolvePlanningProfile,
422
425
  takeSnapshotEvent
423
- } from "./index-7fxy1s86.js";
426
+ } from "./index-zwbheerv.js";
424
427
  import {
425
428
  CORE_EVENT_LOCKED,
426
429
  appendCoreEventSync,
@@ -430,7 +433,7 @@ import {
430
433
  hasSpecDriftAuditEvent,
431
434
  hasTaskRepairAuditEvent,
432
435
  readCoreEvents
433
- } from "./index-e9ry78z5.js";
436
+ } from "./index-b9pz70d0.js";
434
437
  import {
435
438
  DEFAULT_QA_GATES,
436
439
  computeProfileHash,
@@ -478,7 +481,7 @@ import {
478
481
  observeModelLimitResolution,
479
482
  observeStoreHealth,
480
483
  readLearningHealth
481
- } from "./index-v9y0230d.js";
484
+ } from "./index-mb1reyw3.js";
482
485
  import {
483
486
  appendKnowledge,
484
487
  appendRejectedLesson,
@@ -509,7 +512,7 @@ import {
509
512
  transactFile,
510
513
  transactKnowledge,
511
514
  wordBigrams
512
- } from "./index-y81jjedn.js";
515
+ } from "./index-4ws5agzc.js";
513
516
  import {
514
517
  readTailJsonl,
515
518
  readTailJsonlDetailed,
@@ -530,13 +533,13 @@ import {
530
533
  resolveLinkDir,
531
534
  sanitizeLinkId,
532
535
  writeLinkPointer
533
- } from "./index-n45kz69m.js";
536
+ } from "./index-zwgh0gty.js";
534
537
  import {
535
538
  atomicWriteFile
536
- } from "./index-6t7ygevg.js";
539
+ } from "./index-7sbyvk99.js";
537
540
  import {
538
541
  withEvidenceLock
539
- } from "./index-jyxgkp4a.js";
542
+ } from "./index-0v2svrev.js";
540
543
  import {
541
544
  assertProjectRoot
542
545
  } from "./index-t7hmqgjy.js";
@@ -550,7 +553,7 @@ import {
550
553
  pseudonymousRef,
551
554
  resolveLineageSalt,
552
555
  telemetry
553
- } from "./index-dx6bhbd6.js";
556
+ } from "./index-4htcpbs4.js";
554
557
  import {
555
558
  SESSION_KEY_SEPARATOR,
556
559
  canonicalRootKey,
@@ -590,7 +593,7 @@ import {
590
593
  loadGateOverrides,
591
594
  loadPluginConfig,
592
595
  loadPluginConfigWithMeta
593
- } from "./index-w0bvez8c.js";
596
+ } from "./index-nf22t88g.js";
594
597
  import {
595
598
  addDeferredWarning,
596
599
  advisoryWarn,
@@ -622,7 +625,7 @@ import {
622
625
  resolveContextWindow,
623
626
  resolveGeneratedAgentRole,
624
627
  stripKnownSwarmPrefix
625
- } from "./index-b5tthmy2.js";
628
+ } from "./index-7vrnbtsk.js";
626
629
  import {
627
630
  AGENT_TOOL_MAP,
628
631
  ALL_AGENT_NAMES,
@@ -3411,7 +3414,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
3411
3414
  return null;
3412
3415
  throw error2;
3413
3416
  }
3414
- const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-qtq1wq95.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
3417
+ const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-dhzvaqj8.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
3415
3418
  if (!legacy)
3416
3419
  return null;
3417
3420
  const namespace = workflowGateStateCoordinationNamespace(sessionID);
@@ -3498,7 +3501,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
3498
3501
  let recoveryState = null;
3499
3502
  if (!currentAuthoritative) {
3500
3503
  if (options.allowSalvagedRead) {
3501
- const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-qtq1wq95.js");
3504
+ const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-dhzvaqj8.js");
3502
3505
  recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
3503
3506
  }
3504
3507
  if (!recoveryState) {
@@ -15071,7 +15074,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
15071
15074
  return extracted === expectedSessionId;
15072
15075
  }
15073
15076
  async function inspectStandardWorktreeCollisionOwnership(identity) {
15074
- const collisionOwnership = await import("./worktree-collision-ownership-455bdcnk.js");
15077
+ const collisionOwnership = await import("./worktree-collision-ownership-d890zzka.js");
15075
15078
  return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
15076
15079
  }
15077
15080
  async function runRecoveryGit(directory, args, timeoutMs = 15000) {
@@ -15497,7 +15500,7 @@ async function precreateStandardWorktreeSession(args) {
15497
15500
  const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
15498
15501
  if (laneProfile) {
15499
15502
  try {
15500
- const { writeLaneProfileToDiskReal } = await import("./core-2bywxc4w.js");
15503
+ const { writeLaneProfileToDiskReal } = await import("./core-r7ypbkzn.js");
15501
15504
  await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
15502
15505
  } catch {}
15503
15506
  }
@@ -16476,7 +16479,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
16476
16479
  }
16477
16480
  clearWorktreeMergeStatus(statusKey);
16478
16481
  try {
16479
- const { removeLaneProfileFromDiskReal } = await import("./core-2bywxc4w.js");
16482
+ const { removeLaneProfileFromDiskReal } = await import("./core-r7ypbkzn.js");
16480
16483
  await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
16481
16484
  } catch {}
16482
16485
  const state = serializationStateBySessionID.get(dispatch.parentSessionID);
@@ -22236,12 +22239,18 @@ function resetScopedModelSelection(scope, expectedGeneration) {
22236
22239
  }
22237
22240
  return scopedModelOverrides.delete(key);
22238
22241
  }
22239
- function clearScopedModelSelectionsForSession(sessionID) {
22242
+ function clearScopedModelSelectionsForSession(sessionID, opts) {
22240
22243
  const normalizedSessionID = normalizeText(sessionID);
22244
+ const primaryScopes = opts?.primaryScopes ?? true;
22241
22245
  for (const [key, entry] of scopedModelOverrides) {
22242
- if (key.startsWith(`${normalizedSessionID}\u241F`)) {
22243
- scopedModelOverrides.delete(entry.key);
22246
+ if (!key.startsWith(`${normalizedSessionID}\u241F`))
22247
+ continue;
22248
+ if (!primaryScopes) {
22249
+ const invocationID = key.split("\u241F")[1] ?? "";
22250
+ if (invocationID === "")
22251
+ continue;
22244
22252
  }
22253
+ scopedModelOverrides.delete(entry.key);
22245
22254
  }
22246
22255
  }
22247
22256
  function getScopedModelSelectionSnapshot() {
@@ -22266,12 +22275,13 @@ function resetScopedModelSelectionStateForTests() {
22266
22275
 
22267
22276
  // src/models/task-model-routing.ts
22268
22277
  var PENDING_TASK_MODEL_ROUTE_TTL_MS = 30 * 60000;
22278
+ var sessionChatAgentBySession = new Map;
22269
22279
  var routesByParentCall = new Map;
22270
22280
  var routeKeyByChildSession = new Map;
22271
22281
  function normalizeText2(value) {
22272
22282
  return value?.trim() ?? "";
22273
22283
  }
22274
- function clearPendingTaskModelRoutesForSession(sessionID) {
22284
+ function clearPendingTaskModelRoutesForSession(sessionID, mode = "session") {
22275
22285
  const normalizedSessionID = normalizeText2(sessionID);
22276
22286
  for (const [key, route] of routesByParentCall) {
22277
22287
  if (route.parentSessionID === normalizedSessionID || route.childSessionID === normalizedSessionID) {
@@ -22281,7 +22291,12 @@ function clearPendingTaskModelRoutesForSession(sessionID) {
22281
22291
  }
22282
22292
  }
22283
22293
  }
22284
- clearScopedModelSelectionsForSession(normalizedSessionID);
22294
+ clearScopedModelSelectionsForSession(normalizedSessionID, {
22295
+ primaryScopes: mode === "session"
22296
+ });
22297
+ if (mode === "session") {
22298
+ sessionChatAgentBySession.delete(normalizedSessionID);
22299
+ }
22285
22300
  }
22286
22301
  function getPendingTaskModelRouteSnapshot() {
22287
22302
  return [...routesByParentCall.values()].map((route) => ({ ...route }));
@@ -22295,6 +22310,7 @@ function getTaskModelRoutingStateSnapshot() {
22295
22310
  function clearAllTaskModelRoutingState() {
22296
22311
  routesByParentCall.clear();
22297
22312
  routeKeyByChildSession.clear();
22313
+ sessionChatAgentBySession.clear();
22298
22314
  resetScopedModelSelectionStateForTests();
22299
22315
  }
22300
22316
 
@@ -23494,7 +23510,7 @@ function beginInvocation(sessionId, agentName) {
23494
23510
  const lastId = session.lastInvocationIdByAgent[stripped] || 0;
23495
23511
  if (lastId > 0) {
23496
23512
  clearInvocationActionCircuits(sessionId, lastId);
23497
- clearPendingTaskModelRoutesForSession(sessionId);
23513
+ clearPendingTaskModelRoutesForSession(sessionId, "invocation");
23498
23514
  }
23499
23515
  const newId = lastId + 1;
23500
23516
  session.lastInvocationIdByAgent[stripped] = newId;
@@ -24030,7 +24046,7 @@ function clearCriticalShownIds(sessionID) {
24030
24046
  async function rehydratePrSubscriptions(sessionID, directory) {
24031
24047
  const map = new Map;
24032
24048
  try {
24033
- const { listActive: listActive2 } = await import("./pr-subscriptions-g4f9rehb.js");
24049
+ const { listActive: listActive2 } = await import("./pr-subscriptions-1frpr34c.js");
24034
24050
  const records = await listActive2(directory);
24035
24051
  for (const record of records) {
24036
24052
  if (record.sessionID !== sessionID)
@@ -36641,6 +36657,9 @@ async function handleClarifyCommand(_directory2, args) {
36641
36657
  return "[MODE: CLARIFY-SPEC] Please enter MODE: CLARIFY-SPEC and clarify the existing spec.";
36642
36658
  }
36643
36659
 
36660
+ // src/commands/close/align-stage.ts
36661
+ init_logger();
36662
+
36644
36663
  // src/commands/close/internals.ts
36645
36664
  import * as fsSync2 from "fs";
36646
36665
  import { promises as fs23 } from "fs";
@@ -37058,6 +37077,36 @@ var _internals38 = {
37058
37077
  };
37059
37078
 
37060
37079
  // src/commands/close/align-stage.ts
37080
+ function renderRecheckRefusal(reason, newDirtyPaths) {
37081
+ const listed = newDirtyPaths.slice(0, 10);
37082
+ const overflow = newDirtyPaths.length - listed.length;
37083
+ const swarmHint = newDirtyPaths.some((p) => p.startsWith(".swarm/")) ? "One or more changed paths are under .swarm/ \u2014 this project tracks swarm runtime state in git. Consider `git rm -r --cached .swarm/` and re-adding `.swarm/` to .git/info/exclude; close never confirms runtime state as destructive scope." : undefined;
37084
+ return [
37085
+ `\uD83D\uDED1 Git alignment aborted (fail-closed): ${reason} \u2014 this destructive scope was never confirmed${listed[0] ? ` (first: ${listed[0]})` : ""}.`,
37086
+ ...listed.map((p) => ` - ${p}`),
37087
+ ...overflow > 0 ? [` \u2026 and ${overflow} more`] : [],
37088
+ ...swarmHint ? [swarmHint] : [],
37089
+ "Nothing was reset or checked out; the session is finalized (finalize/archive/clean completed). Complete git alignment manually if still wanted."
37090
+ ].join(`
37091
+ `);
37092
+ }
37093
+ async function guardResetWithRecheck(real, cwd, options) {
37094
+ const recheck = recheckBeforeDestructive(cwd, options?.expectedDirtyPaths ?? []);
37095
+ if (recheck.ok) {
37096
+ return real(cwd, { pruneBranches: options?.pruneBranches });
37097
+ }
37098
+ log(`[close-align] re-check refused destructive reset: ${recheck.reason} (${recheck.newDirtyPaths.length} newly-dirty path(s))`);
37099
+ return {
37100
+ success: false,
37101
+ targetBranch: "",
37102
+ previousBranch: "",
37103
+ message: renderRecheckRefusal(recheck.reason, recheck.newDirtyPaths),
37104
+ branchDeleted: false,
37105
+ changesDiscarded: false,
37106
+ warnings: [],
37107
+ recheckRefused: true
37108
+ };
37109
+ }
37061
37110
  async function runAlignStage(ctx) {
37062
37111
  const pruneBranches = ctx.args.includes("--prune-branches");
37063
37112
  let gitAlignResult = "";
@@ -37065,8 +37114,14 @@ async function runAlignStage(ctx) {
37065
37114
  const gitStatus = _internals38.getGitRepositoryStatus(ctx.directory);
37066
37115
  if (gitStatus.isRepo) {
37067
37116
  const aggressiveResult = await _internals38.resetToMainAfterMerge(ctx.directory, {
37068
- pruneBranches
37117
+ pruneBranches,
37118
+ expectedDirtyPaths: ctx.purgeGateDirtyPaths ?? []
37069
37119
  });
37120
+ if (aggressiveResult.recheckRefused) {
37121
+ gitAlignResult = aggressiveResult.message;
37122
+ ctx.warnings.push(aggressiveResult.message);
37123
+ return { gitAlignResult, prunedBranches };
37124
+ }
37070
37125
  if (aggressiveResult.success) {
37071
37126
  gitAlignResult = aggressiveResult.message;
37072
37127
  for (const w of aggressiveResult.warnings) {
@@ -40538,9 +40593,9 @@ function hashContent(content) {
40538
40593
  return createHash27("sha1").update(content).digest("hex");
40539
40594
  }
40540
40595
  async function loadConfigForPolicyCurator(directory) {
40541
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-yxq3bjmd.js");
40596
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-4fxm5b9r.js");
40542
40597
  try {
40543
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
40598
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-6zpfvs4t.js");
40544
40599
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
40545
40600
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
40546
40601
  } catch {
@@ -43598,7 +43653,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
43598
43653
  const seam = _internals38.createCuratorLLMDelegate;
43599
43654
  if (seam)
43600
43655
  return seam(directory, mode, sessionId);
43601
- const { createCuratorLLMDelegate } = await import("./curator-llm-factory-4g2nvr76.js");
43656
+ const { createCuratorLLMDelegate } = await import("./curator-llm-factory-gnx5wyx0.js");
43602
43657
  return createCuratorLLMDelegate(directory, mode, sessionId);
43603
43658
  }
43604
43659
  async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
@@ -43993,7 +44048,7 @@ async function runFinalizeStage(ctx) {
43993
44048
  }
43994
44049
  }
43995
44050
  try {
43996
- const { CuratorConfigSchema: CCS } = await import("./schema-yxq3bjmd.js");
44051
+ const { CuratorConfigSchema: CCS } = await import("./schema-4fxm5b9r.js");
43997
44052
  const { config: pmLoadedConfig } = _internals38.loadPluginConfigWithMeta(ctx.directory);
43998
44053
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
43999
44054
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -46179,7 +46234,7 @@ function serializeAgentSession(s) {
46179
46234
  }
46180
46235
  async function writeSnapshot(directory, state) {
46181
46236
  try {
46182
- const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-8gbxw9sa.js");
46237
+ const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-pqsgthaa.js");
46183
46238
  await ensureSnapshotCoordinationReady(directory);
46184
46239
  const snapshot = {
46185
46240
  version: 3,
@@ -46688,6 +46743,16 @@ function isReadinessEntryClosing(entry) {
46688
46743
  }
46689
46744
  var entries = new Map;
46690
46745
  var nextAttemptId = 1;
46746
+ var supersessionStats = { count: 0 };
46747
+ function recordSupersession(trigger) {
46748
+ supersessionStats.count += 1;
46749
+ try {
46750
+ telemetry.planRecoverySuperseded({
46751
+ count: supersessionStats.count,
46752
+ trigger
46753
+ });
46754
+ } catch {}
46755
+ }
46691
46756
  function isRetryableArchiveError(error2) {
46692
46757
  const code = error2?.code;
46693
46758
  return code === "EBUSY" || code === "EPERM" || code === "EACCES";
@@ -46846,6 +46911,7 @@ function startSnapshotCoordinationInitialization(directory) {
46846
46911
  if (outcome === "superseded") {
46847
46912
  entry.state = "superseded";
46848
46913
  entry.error = "coordination initialization superseded by a newer hydration generation";
46914
+ recordSupersession("coordination_fence");
46849
46915
  return;
46850
46916
  }
46851
46917
  entry.state = "succeeded";
@@ -46854,6 +46920,7 @@ function startSnapshotCoordinationInitialization(directory) {
46854
46920
  if (entry.state !== "closing" && entries.get(root) === entry) {
46855
46921
  entry.state = "superseded";
46856
46922
  entry.error = error2.message;
46923
+ recordSupersession("plan_recovery");
46857
46924
  }
46858
46925
  } else {
46859
46926
  entry.state = "failed";
@@ -46866,7 +46933,7 @@ function startSnapshotCoordinationInitialization(directory) {
46866
46933
  entry.underlying = underlying;
46867
46934
  entries.set(root, entry);
46868
46935
  withTimeout(underlying, _snapshotCoordinationInternals.timeoutMs, new Error("coordination initialization timed out")).catch((error2) => {
46869
- if (!entry.settled && entries.get(root) === entry) {
46936
+ if (!entry.settled && entry.state !== "closing" && entries.get(root) === entry) {
46870
46937
  entry.state = "timed_out";
46871
46938
  entry.error = error2 instanceof Error ? error2.message : String(error2);
46872
46939
  advisoryWarn("[opencode-swarm] SQLite coordination initialization is still running; authority operations remain fail-closed.");
@@ -47008,6 +47075,7 @@ function runCloseGateGit(args, cwd) {
47008
47075
  cwd,
47009
47076
  encoding: "utf8",
47010
47077
  timeout: 1e4,
47078
+ maxBuffer: 1024 * 1024,
47011
47079
  windowsHide: true,
47012
47080
  stdio: ["ignore", "pipe", "pipe"]
47013
47081
  });
@@ -47026,28 +47094,8 @@ function isRealGitRepository(directory) {
47026
47094
  return fsSync7.existsSync(path59.join(directory, ".git", "HEAD"));
47027
47095
  }
47028
47096
  function evaluateClosePurgeGate(directory, swarmDir) {
47029
- const statusOutput = _closeGateInternals.runGit(["status", "--porcelain"], directory);
47030
- const dirtyPaths = [];
47031
- if (statusOutput !== null) {
47032
- for (const line of statusOutput.split(`
47033
- `)) {
47034
- if (!line)
47035
- continue;
47036
- if (line.startsWith("??"))
47037
- continue;
47038
- const filePath = line.slice(3).trim().replace(/^"|"$/g, "");
47039
- if (!filePath)
47040
- continue;
47041
- if (line.startsWith("R") && filePath.includes(" -> ")) {
47042
- for (const side of filePath.split(" -> ")) {
47043
- if (side)
47044
- dirtyPaths.push(side);
47045
- }
47046
- } else {
47047
- dirtyPaths.push(filePath);
47048
- }
47049
- }
47050
- }
47097
+ const statusOutput = _closeGateInternals.runGit([...GIT_STATUS_ARGS], directory);
47098
+ const dirtyPaths = statusOutput === null ? [] : parseTrackedDirtyPaths(statusOutput);
47051
47099
  const candidates = dirtyPaths.map((p) => ({
47052
47100
  path: path59.join(directory, p),
47053
47101
  reason: "uncommitted tracked change \u2014 discarded by git alignment"
@@ -47246,7 +47294,8 @@ This project was already finalized in a previous /swarm close run. The plan has
47246
47294
  timestamp: "",
47247
47295
  archiveDir: "",
47248
47296
  archiveSuffix: "",
47249
- args
47297
+ args,
47298
+ purgeGateDirtyPaths: purgeGate.dirtyPaths
47250
47299
  };
47251
47300
  ctx.fullAuto = options.sessionID ? _internals38.detectFullAuto(directory, options.sessionID) : false;
47252
47301
  await runFinalizeStage(ctx);
@@ -49195,7 +49244,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
49195
49244
  };
49196
49245
  }
49197
49246
  async function sweepActiveNearDuplicates(directory, options = {}) {
49198
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
49247
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-6zpfvs4t.js");
49199
49248
  const { config } = loadPluginConfigWithMeta2(directory);
49200
49249
  const sweepConfig = config.learning?.dedup_sweep;
49201
49250
  if (sweepConfig?.enabled === false)
@@ -50319,7 +50368,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
50319
50368
  }
50320
50369
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
50321
50370
  try {
50322
- const skillModule = await import("./skill-generator-pyf95aqw.js");
50371
+ const skillModule = await import("./skill-generator-qk0gpwhq.js");
50323
50372
  for (const cand of skillCandidates) {
50324
50373
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
50325
50374
  continue;
@@ -50791,7 +50840,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
50791
50840
  } catch {}
50792
50841
  }
50793
50842
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
50794
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-fnqctvxz.js");
50843
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-w043k3ah.js");
50795
50844
  for (const { id } of contradictedEntries) {
50796
50845
  try {
50797
50846
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -51623,7 +51672,7 @@ async function runCuratorPostMortem(directory, options = {}) {
51623
51672
  warnings.push("Failed to collect knowledge summary.");
51624
51673
  }
51625
51674
  try {
51626
- const { getScanStatus } = await import("./scan-cursor-8taj944f.js");
51675
+ const { getScanStatus } = await import("./scan-cursor-nm6h3gdd.js");
51627
51676
  const scanStatus = await getScanStatus(directory);
51628
51677
  if (scanStatus.remaining_estimate > 0) {
51629
51678
  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.`);
@@ -51795,9 +51844,9 @@ var _internals56 = {
51795
51844
  verifyPostMortemKnowledgeActions,
51796
51845
  repairPostMortemActions,
51797
51846
  loadDefaultKnowledgeConfig: async (directory) => {
51798
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-yxq3bjmd.js");
51847
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-4fxm5b9r.js");
51799
51848
  try {
51800
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
51849
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-6zpfvs4t.js");
51801
51850
  const loaded = loadPluginConfigWithMeta2(directory);
51802
51851
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
51803
51852
  } catch {
@@ -51805,11 +51854,11 @@ var _internals56 = {
51805
51854
  }
51806
51855
  },
51807
51856
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
51808
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-dvhf6jex.js");
51857
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-m1f5tpmq.js");
51809
51858
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
51810
51859
  },
51811
51860
  checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
51812
- const { checkHivePromotions } = await import("./hive-promoter-bp3rz0q6.js");
51861
+ const { checkHivePromotions } = await import("./hive-promoter-knbj0apv.js");
51813
51862
  return checkHivePromotions(entries2, knowledgeConfig, directory);
51814
51863
  },
51815
51864
  applyProposalTriage: async (directory, triage) => {
@@ -51818,7 +51867,7 @@ var _internals56 = {
51818
51867
  activateProposal,
51819
51868
  listSkills: listSkills2,
51820
51869
  sanitizeSlug
51821
- } = await import("./skill-generator-pyf95aqw.js");
51870
+ } = await import("./skill-generator-qk0gpwhq.js");
51822
51871
  const result = {
51823
51872
  approved: [],
51824
51873
  rejected: [],
@@ -51860,7 +51909,7 @@ var _internals56 = {
51860
51909
  return result;
51861
51910
  },
51862
51911
  readPriorDriftReports: async (directory) => {
51863
- const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-xx8pp4g9.js");
51912
+ const { readPriorDriftReports: readPriorDriftReports2 } = await import("./curator-drift-4e9p7afg.js");
51864
51913
  return readPriorDriftReports2(directory);
51865
51914
  },
51866
51915
  readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
@@ -60293,7 +60342,7 @@ function wireCloseInternals() {
60293
60342
  sleep,
60294
60343
  collectGarbageBestEffort,
60295
60344
  getGitRepositoryStatus,
60296
- resetToMainAfterMerge,
60345
+ resetToMainAfterMerge: (cwd, options) => guardResetWithRecheck(resetToMainAfterMerge, cwd, options),
60297
60346
  resetToRemoteBranch,
60298
60347
  loadPluginConfigWithMeta,
60299
60348
  curateAndStoreSwarm,
@@ -60304,7 +60353,7 @@ function wireCloseInternals() {
60304
60353
  archiveEvidence,
60305
60354
  endAgentSession,
60306
60355
  flushAndDrainTelemetry: async () => {
60307
- const { flushAndDrainTelemetry } = await import("./telemetry-xwj899pd.js");
60356
+ const { flushAndDrainTelemetry } = await import("./telemetry-d0j31j5d.js");
60308
60357
  return flushAndDrainTelemetry();
60309
60358
  },
60310
60359
  finalizeContextTelemetry,
@@ -61663,9 +61712,9 @@ var _internals66 = {
61663
61712
  loadPluginConfigWithMeta,
61664
61713
  loadCuratorDeps: async () => {
61665
61714
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
61666
- import("./schema-yxq3bjmd.js"),
61667
- import("./curator-dvhf6jex.js"),
61668
- import("./curator-llm-factory-4g2nvr76.js")
61715
+ import("./schema-4fxm5b9r.js"),
61716
+ import("./curator-m1f5tpmq.js"),
61717
+ import("./curator-llm-factory-gnx5wyx0.js")
61669
61718
  ]);
61670
61719
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
61671
61720
  }
@@ -64063,7 +64112,7 @@ async function computeCurationDiagnostics(directory, entries2) {
64063
64112
  let scanCompleted = false;
64064
64113
  let scanRemaining = 0;
64065
64114
  try {
64066
- const { getScanStatus } = await import("./scan-cursor-8taj944f.js");
64115
+ const { getScanStatus } = await import("./scan-cursor-nm6h3gdd.js");
64067
64116
  const status = await getScanStatus(directory);
64068
64117
  scanGeneration = status.generation;
64069
64118
  scanCompleted = status.completed;
@@ -64071,19 +64120,19 @@ async function computeCurationDiagnostics(directory, entries2) {
64071
64120
  } catch {}
64072
64121
  let configMatch = null;
64073
64122
  try {
64074
- const { isLinked: isLinked2 } = await import("./knowledge-link-93nzznwd.js");
64123
+ const { isLinked: isLinked2 } = await import("./knowledge-link-9gx2djyd.js");
64075
64124
  if (isLinked2(directory)) {
64076
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-yxq3bjmd.js");
64125
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-4fxm5b9r.js");
64077
64126
  let config;
64078
64127
  try {
64079
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-33345434.js");
64128
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-6zpfvs4t.js");
64080
64129
  const loaded = loadPluginConfigWithMeta2(directory);
64081
64130
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
64082
64131
  } catch {
64083
64132
  config = KnowledgeConfigSchema2.parse({});
64084
64133
  }
64085
64134
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
64086
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-sr29thf5.js");
64135
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-v64ctcbd.js");
64087
64136
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
64088
64137
  const cohortFp = await readCohortConfigFingerprint(directory);
64089
64138
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -65532,7 +65581,7 @@ async function handleDoctorCommand(directory, args) {
65532
65581
  const result = runConfigDoctor(config, directory, planParallelizationEnabled);
65533
65582
  let output;
65534
65583
  if (enableAutoFix && result.hasAutoFixableIssues) {
65535
- const { runConfigDoctorWithFixes } = await import("./config-doctor-312afzhr.js");
65584
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-pfwj6c8d.js");
65536
65585
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
65537
65586
  applyLossy: true
65538
65587
  });
@@ -65570,7 +65619,7 @@ async function handleDoctorCommand(directory, args) {
65570
65619
  `;
65571
65620
  }
65572
65621
  try {
65573
- const { runModelPreflight } = await import("./model-preflight-2kje0sp0.js");
65622
+ const { runModelPreflight } = await import("./model-preflight-pt6n1re7.js");
65574
65623
  const preflight = await runModelPreflight(config, swarmState.opencodeClient, { generatedAgentNames: swarmState.generatedAgentNames });
65575
65624
  const missingSelection = preflight.resolutions.filter((resolution) => resolution.status === "missing-selection");
65576
65625
  const unresolved = preflight.catalogAvailable ? preflight.resolutions.filter((resolution) => resolution.status === "unresolved") : [];
@@ -65604,7 +65653,7 @@ async function handleDoctorCommand(directory, args) {
65604
65653
  }
65605
65654
  } catch {}
65606
65655
  try {
65607
- const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-m239pgbz.js");
65656
+ const { renderKnowledgeReceiptPhaseIdSection } = await import("./doctor-knowledge-receipt-phase-id-mdvra07t.js");
65608
65657
  output += await renderKnowledgeReceiptPhaseIdSection(directory, enableAutoFix);
65609
65658
  } catch {}
65610
65659
  const strayDirs = detectStraySwarmDirs(directory);
@@ -66501,7 +66550,7 @@ async function handleEvidenceCommand(directory, args) {
66501
66550
  return formatTaskEvidenceMarkdown(evidenceData);
66502
66551
  }
66503
66552
  async function handleEvidenceSummaryCommand(directory) {
66504
- const { buildEvidenceSummary } = await import("./evidence-summary-service-9et04fjh.js");
66553
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-64nqgkaw.js");
66505
66554
  const artifact = await buildEvidenceSummary(directory);
66506
66555
  if (!artifact) {
66507
66556
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -90952,7 +91001,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
90952
91001
  }
90953
91002
  const sdkOpts = signal ? { signal } : {};
90954
91003
  try {
90955
- const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-9jafghwk.js");
91004
+ const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-j5ecgr3f.js");
90956
91005
  const createResult = await client.session.create({
90957
91006
  ...sessionId ? {
90958
91007
  body: {
@@ -93289,7 +93338,7 @@ async function cancelPrFeedbackLoopUnlocked(directory, sessionID, reason) {
93289
93338
  clearedEvents: []
93290
93339
  };
93291
93340
  try {
93292
- const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-qtq1wq95.js");
93341
+ const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-dhzvaqj8.js");
93293
93342
  await cancelPrFeedbackPublication2(directory, sessionID, reason);
93294
93343
  } catch (err) {
93295
93344
  warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
@@ -107030,7 +107079,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
107030
107079
  if (!input.dispatcher) {
107031
107080
  throw new Error("no evaluation dispatcher available (cannot run validation)");
107032
107081
  }
107033
- const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-verr6er5.js");
107082
+ const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-x8sbydkw.js");
107034
107083
  const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
107035
107084
  const result = await withProtectedSetIntegrity([evalInputRoot, ...protectedRoots(input.directory)], () => _internals128.evaluateCandidateV1({
107036
107085
  projectRoot: input.directory,
@@ -109659,7 +109708,7 @@ function buildDetailedHelp(commandName, entry) {
109659
109708
  async function handleHelpCommand(ctx) {
109660
109709
  const targetCommand = ctx.args.join(" ");
109661
109710
  if (!targetCommand) {
109662
- const { buildHelpText } = await import("./index-tmp07h7b.js");
109711
+ const { buildHelpText } = await import("./index-qe3e6z5c.js");
109663
109712
  return buildHelpText();
109664
109713
  }
109665
109714
  const tokens = targetCommand.split(/\s+/);
@@ -109673,7 +109722,7 @@ async function handleHelpCommand(ctx) {
109673
109722
  > Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
109674
109723
  }
109675
109724
  const similar = _internals27.findSimilarCommands(targetCommand);
109676
- const { buildHelpText: fullHelp } = await import("./index-tmp07h7b.js");
109725
+ const { buildHelpText: fullHelp } = await import("./index-qe3e6z5c.js");
109677
109726
  if (similar.length > 0) {
109678
109727
  return `Command '/swarm ${targetCommand}' not found.
109679
109728
 
@@ -110001,7 +110050,7 @@ var COMMAND_REGISTRY = {
110001
110050
  },
110002
110051
  "guardrail explain": {
110003
110052
  handler: async (ctx) => {
110004
- const { handleGuardrailExplain } = await import("./guardrail-explain-8n4fx9zv.js");
110053
+ const { handleGuardrailExplain } = await import("./guardrail-explain-e6z5x5jt.js");
110005
110054
  return handleGuardrailExplain(ctx.directory, ctx.args);
110006
110055
  },
110007
110056
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -110011,7 +110060,7 @@ var COMMAND_REGISTRY = {
110011
110060
  },
110012
110061
  "guardrail reset": {
110013
110062
  handler: async (ctx) => {
110014
- const { handleGuardrailReset } = await import("./guardrail-reset-k3mrq25e.js");
110063
+ const { handleGuardrailReset } = await import("./guardrail-reset-zr13a010.js");
110015
110064
  return handleGuardrailReset(ctx.args, ctx.sessionID);
110016
110065
  },
110017
110066
  description: "Reset one exact active invocation/action circuit after repair",
@@ -110032,7 +110081,7 @@ var COMMAND_REGISTRY = {
110032
110081
  },
110033
110082
  "guardrail-log": {
110034
110083
  handler: async (ctx) => {
110035
- const { handleGuardrailLog } = await import("./guardrail-log-9gmfvnd7.js");
110084
+ const { handleGuardrailLog } = await import("./guardrail-log-x53wpnp0.js");
110036
110085
  return handleGuardrailLog(ctx.directory, ctx.args);
110037
110086
  },
110038
110087
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -110442,7 +110491,7 @@ var COMMAND_REGISTRY = {
110442
110491
  sessionID: ctx.sessionID
110443
110492
  }),
110444
110493
  description: "Use /swarm finalize to finalize the swarm project and archive evidence",
110445
- details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs aggressive git reset --hard to the default remote branch, discarding uncommitted changes and gitignored build artifacts (user-created untracked files are preserved); falls back to a cautious reset that preserves uncommitted changes when the aggressive path cannot proceed. WARNING: alignment discards local changes and gitignored files. Resets agent sessions, delegation chains, and active-agent mappings. Reads .swarm/close-lessons.md for explicit lessons and runs curation. Cleanup: knowledge.jsonl is preserved; plan.json, plan.md, events.jsonl, handoff.*, run-memory.jsonl, and summaries/ are removed. Use --skill-review to run the quota-bounded skill_improver in proposal mode. Use --dry-run to preview what finalize would archive, clean, and align without taking the lock or changing anything.",
110494
+ details: "Idempotent 4-stage terminal finalization: (1) finalize writes retrospectives for in-progress phases, (2) archive creates timestamped bundle of swarm artifacts and evidence, (3) clean removes active-state files for a clean slate, (4) align performs aggressive git reset --hard to the default remote branch, discarding uncommitted changes and gitignored build artifacts (user-created untracked files are preserved); falls back to a cautious reset that preserves uncommitted changes when the aggressive path cannot proceed. Alignment re-verifies the tracked tree immediately before its destructive reset and aborts fail-closed (leaving alignment undone) when tracked files changed after the close gate was verified or the status cannot be re-read (#2953). WARNING: alignment discards local changes and gitignored files. Resets agent sessions, delegation chains, and active-agent mappings. Reads .swarm/close-lessons.md for explicit lessons and runs curation. Cleanup: knowledge.jsonl is preserved; plan.json, plan.md, events.jsonl, handoff.*, run-memory.jsonl, and summaries/ are removed. Use --skill-review to run the quota-bounded skill_improver in proposal mode. Use --dry-run to preview what finalize would archive, clean, and align without taking the lock or changing anything.",
110446
110495
  args: "--prune-branches, --skill-review, --dry-run",
110447
110496
  category: "core",
110448
110497
  toolPolicy: "none"