opencode-swarm 7.180.0 → 7.180.1

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 (82) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/agents/architect.d.ts +67 -0
  4. package/dist/agents/council-prompts.d.ts +3 -3
  5. package/dist/agents/index.d.ts +1 -1
  6. package/dist/cli/{coder-settlement-34z9xgnx.js → coder-settlement-b57917a3.js} +7 -7
  7. package/dist/cli/{config-doctor-tkfrwztz.js → config-doctor-ebat06eq.js} +2 -2
  8. package/dist/cli/{core-z9ybzpvr.js → core-8k41qh0d.js} +1 -1
  9. package/dist/cli/{curation-policy-gwzmjmt7.js → curation-policy-m3x9mkj9.js} +4 -4
  10. package/dist/cli/{curator-zv4qs07j.js → curator-8yb3qkxs.js} +30 -30
  11. package/dist/cli/{curator-drift-3bbn011w.js → curator-drift-3av9hffm.js} +4 -4
  12. package/dist/cli/{curator-llm-factory-e162g7xp.js → curator-llm-factory-htgqafq0.js} +30 -30
  13. package/dist/cli/{evidence-summary-service-wrfth5tr.js → evidence-summary-service-s258ea5t.js} +13 -13
  14. package/dist/cli/{gate-evidence-adqbxnm7.js → gate-evidence-fqxpf3xz.js} +4 -4
  15. package/dist/cli/{guardrail-explain-dn96802k.js → guardrail-explain-r0qxa4zy.js} +31 -31
  16. package/dist/cli/{guardrail-log-rcza6v3y.js → guardrail-log-j2wdmvmy.js} +6 -6
  17. package/dist/cli/{guardrail-reset-fjn42e0n.js → guardrail-reset-wb2eqbvf.js} +30 -30
  18. package/dist/cli/{hive-promoter-hgqqn7qw.js → hive-promoter-kxpc3r17.js} +30 -30
  19. package/dist/cli/{index-zvxy0mev.js → index-12ewkms0.js} +1 -1
  20. package/dist/cli/{index-ekgc71m1.js → index-2q5m4m2r.js} +7 -7
  21. package/dist/cli/{index-htrb9ec3.js → index-38cfx8g8.js} +2 -2
  22. package/dist/cli/{index-1p8fk9jb.js → index-3bbjpbmn.js} +2 -2
  23. package/dist/cli/{index-ret97f1t.js → index-3zvp7t5d.js} +5 -5
  24. package/dist/cli/{index-5gmn0a3j.js → index-50v672wd.js} +3 -3
  25. package/dist/cli/{index-jmrsfhwq.js → index-516j9vsk.js} +1 -1
  26. package/dist/cli/{index-7w6dnpvc.js → index-600aqfvm.js} +32 -30
  27. package/dist/cli/{index-5yc5n4ae.js → index-6gcxgx84.js} +1 -1
  28. package/dist/cli/{index-qt0793qm.js → index-6mwha20t.js} +3 -3
  29. package/dist/cli/{index-mhrn7hbb.js → index-855qxtdm.js} +3 -3
  30. package/dist/cli/{index-3jap3516.js → index-as4xaams.js} +1 -1
  31. package/dist/cli/{index-1hzqyx13.js → index-bhmrgbyv.js} +1 -1
  32. package/dist/cli/{index-jrfv2am8.js → index-cj64vp08.js} +3 -3
  33. package/dist/cli/{index-5m378633.js → index-dzm5nfh7.js} +4 -4
  34. package/dist/cli/{index-0v1rtanv.js → index-ea9fk6v0.js} +1 -1
  35. package/dist/cli/{index-bx70zs8d.js → index-g062wnw1.js} +1 -1
  36. package/dist/cli/{index-7pj0x345.js → index-gw5egd8j.js} +32 -32
  37. package/dist/cli/{index-pnt98k7z.js → index-gy3tcmk4.js} +6 -6
  38. package/dist/cli/{index-caj76d0f.js → index-k5vwnnym.js} +3 -3
  39. package/dist/cli/{index-dcttq1mn.js → index-k6f0nryj.js} +2 -2
  40. package/dist/cli/{index-8b1f2t5q.js → index-n5carmk0.js} +1 -1
  41. package/dist/cli/{index-jscqefqm.js → index-rejpbgxp.js} +1 -1
  42. package/dist/cli/{index-defq2crz.js → index-rp4akjrm.js} +1 -1
  43. package/dist/cli/{index-aspxz5r5.js → index-s0zgz4p1.js} +1 -1
  44. package/dist/cli/{index-06crt1ej.js → index-tnhk72rs.js} +3 -3
  45. package/dist/cli/{index-v1sc1gxv.js → index-v0par978.js} +4 -4
  46. package/dist/cli/{index-b9z9gvx0.js → index-v7fx8q3z.js} +1 -1
  47. package/dist/cli/{index-x6kjbjya.js → index-wx3wz7ya.js} +4 -4
  48. package/dist/cli/{index-kp654qcw.js → index-xd0e4amf.js} +9 -9
  49. package/dist/cli/{index-zptq8mp1.js → index-xj5z92qz.js} +1 -1
  50. package/dist/cli/{index-93vk5s7v.js → index-y30y1rkg.js} +3 -3
  51. package/dist/cli/{index-2h0qng38.js → index-yf7tdhpz.js} +2 -2
  52. package/dist/cli/{index-cxgr6ad5.js → index-z2xf153n.js} +4 -4
  53. package/dist/cli/{index-dnbqmay5.js → index-z2zrcecq.js} +182 -74
  54. package/dist/cli/index.js +31 -31
  55. package/dist/cli/{knowledge-escalator-x8vcmb6k.js → knowledge-escalator-n30h6ran.js} +10 -10
  56. package/dist/cli/{knowledge-events-naf9kyyc.js → knowledge-events-k2qqase2.js} +8 -8
  57. package/dist/cli/{knowledge-link-g0q25hqv.js → knowledge-link-s2qs178z.js} +3 -3
  58. package/dist/cli/{knowledge-store-dnv0ph42.js → knowledge-store-zy226v5a.js} +4 -4
  59. package/dist/cli/{knowledge-validator-a1rfzkmv.js → knowledge-validator-qgyxdpc9.js} +6 -6
  60. package/dist/cli/{mcp-hnb0m05a.js → mcp-pj7acze3.js} +1 -1
  61. package/dist/cli/{pending-delegations-05p6cmbh.js → pending-delegations-sgnnyw55.js} +6 -6
  62. package/dist/cli/{pr-subscriptions-a2djfzyx.js → pr-subscriptions-7fb7xm3q.js} +6 -6
  63. package/dist/cli/{pr-workflow-gate-wkmx8nr6.js → pr-workflow-gate-5dqcrkz6.js} +30 -30
  64. package/dist/cli/{runner-hkbds12j.js → runner-p9hstpxn.js} +4 -4
  65. package/dist/cli/{scan-cursor-4khfn5pm.js → scan-cursor-jc7wwb7e.js} +5 -5
  66. package/dist/cli/{schema-a5zb02h8.js → schema-5k68crjb.js} +1 -1
  67. package/dist/cli/{scope-persistence-nsw324ce.js → scope-persistence-xeg4khwk.js} +10 -10
  68. package/dist/cli/{server-exj4wt8j.js → server-ej6tzd7t.js} +30 -30
  69. package/dist/cli/{skill-generator-r2cdtx7b.js → skill-generator-nspt9b3n.js} +12 -12
  70. package/dist/cli/{snapshot-coordination-init-sad6q0a2.js → snapshot-coordination-init-3rs3zpaa.js} +30 -30
  71. package/dist/cli/{speckit-checkoff-46g9sqak.js → speckit-checkoff-dqf636ya.js} +3 -3
  72. package/dist/cli/{telemetry-qxav5cdk.js → telemetry-zhcgfe70.js} +1 -1
  73. package/dist/cli/{worktree-collision-ownership-4znkfq1t.js → worktree-collision-ownership-rbzgbvj4.js} +6 -6
  74. package/dist/cli/{worktree-isolation-mv9ee00v.js → worktree-isolation-6zpnzr70.js} +30 -30
  75. package/dist/council/disagreement-detector.d.ts +23 -1
  76. package/dist/council/general-council-service.d.ts +40 -3
  77. package/dist/failures/invocation-failure.d.ts +11 -0
  78. package/dist/hooks/system-enhancer.d.ts +4 -2
  79. package/dist/hooks/system-render-boundary.d.ts +68 -0
  80. package/dist/index.js +17 -15
  81. package/dist/utils/provider-error-classification.d.ts +11 -0
  82. package/package.json +1 -1
@@ -8,7 +8,7 @@ import {
8
8
  protectedRoots,
9
9
  redactDecisionLineForArchive,
10
10
  stableCanonicalStringify
11
- } from "./index-06crt1ej.js";
11
+ } from "./index-tnhk72rs.js";
12
12
  import {
13
13
  LANGUAGE_REGISTRY,
14
14
  _internals as _internals3,
@@ -26,7 +26,7 @@ import {
26
26
  resolveExecutableFromPath,
27
27
  runEvaluation,
28
28
  runExternalTool
29
- } from "./index-jscqefqm.js";
29
+ } from "./index-rejpbgxp.js";
30
30
  import {
31
31
  canonicalProjectKey,
32
32
  closeGroupCommitWriter,
@@ -39,7 +39,7 @@ import {
39
39
  readDoctorArtifact,
40
40
  removeStraySwarmDir,
41
41
  runConfigDoctor
42
- } from "./index-1hzqyx13.js";
42
+ } from "./index-bhmrgbyv.js";
43
43
  import {
44
44
  MAX_TRANSIENT_RETRIES,
45
45
  archiveEvidence,
@@ -76,7 +76,7 @@ import {
76
76
  updateTaskStatus,
77
77
  validateProjectRoot,
78
78
  withPlanLifecycleLock
79
- } from "./index-kp654qcw.js";
79
+ } from "./index-xd0e4amf.js";
80
80
  import {
81
81
  EvaluationTaskV1Schema,
82
82
  GateAuditManifestV1Schema,
@@ -93,7 +93,7 @@ import {
93
93
  saveGateAuditResult,
94
94
  savePromotionDecision,
95
95
  saveTaskSetSnapshot
96
- } from "./index-aspxz5r5.js";
96
+ } from "./index-s0zgz4p1.js";
97
97
  import {
98
98
  canonicalHash,
99
99
  canonicalJson,
@@ -113,7 +113,7 @@ import {
113
113
  resolveSpeckitProjection,
114
114
  validateSpeckit,
115
115
  writeProjectedSpecSync
116
- } from "./index-bx70zs8d.js";
116
+ } from "./index-g062wnw1.js";
117
117
  import {
118
118
  containsControlChars,
119
119
  containsPathTraversal,
@@ -141,15 +141,15 @@ import {
141
141
  retireSkill,
142
142
  selectCandidateEntries,
143
143
  syncBundledProjectSkillsIfMissingAsync
144
- } from "./index-5gmn0a3j.js";
144
+ } from "./index-50v672wd.js";
145
145
  import {
146
146
  readRecentEscalations
147
- } from "./index-ret97f1t.js";
147
+ } from "./index-3zvp7t5d.js";
148
148
  import {
149
149
  alreadyCuratedThisGeneration,
150
150
  claimNextScanBatch,
151
151
  resolveCohortId
152
- } from "./index-2h0qng38.js";
152
+ } from "./index-yf7tdhpz.js";
153
153
  import {
154
154
  CURATOR_CONSOLIDATION_PROMPT,
155
155
  CURATOR_INIT_PROMPT,
@@ -169,7 +169,7 @@ import {
169
169
  sweepStale,
170
170
  unsubscribe,
171
171
  updateSnapshot
172
- } from "./index-93vk5s7v.js";
172
+ } from "./index-y30y1rkg.js";
173
173
  import {
174
174
  clearWorktreeMergeStatus,
175
175
  getAllWorktreeMergeFailures,
@@ -181,7 +181,7 @@ import {
181
181
  listCoderSettlementWalStates,
182
182
  recoverCoderSettlement,
183
183
  recoverStaleCoderSettlements
184
- } from "./index-cxgr6ad5.js";
184
+ } from "./index-z2xf153n.js";
185
185
  import {
186
186
  parsePorcelainV2Snapshot,
187
187
  resolveCommitCountSince,
@@ -252,7 +252,7 @@ import {
252
252
  transitionTaskWorkflowEvidence,
253
253
  withTaskEvidenceTransaction,
254
254
  writeWorkflowWalFile
255
- } from "./index-caj76d0f.js";
255
+ } from "./index-k5vwnnym.js";
256
256
  import {
257
257
  isPathUnderSwarmWorktreeBase,
258
258
  listLiveLaneOwners,
@@ -261,7 +261,7 @@ import {
261
261
  recordLiveLaneOwner,
262
262
  removeWorktree,
263
263
  resolveWorktreeBaseDir
264
- } from "./index-8b1f2t5q.js";
264
+ } from "./index-n5carmk0.js";
265
265
  import {
266
266
  DEFAULT_STALE_DELEGATION_TIMEOUT_MS,
267
267
  DELEGATION_COMPACTION_HIGH_WATER_BYTES,
@@ -295,7 +295,7 @@ import {
295
295
  scanBackgroundCoderReservationsForAdmission,
296
296
  scanDelegationsForRecovery,
297
297
  sweepStaleDelegations
298
- } from "./index-v1sc1gxv.js";
298
+ } from "./index-v0par978.js";
299
299
  import {
300
300
  MAX_EVENT_LOG_ENTRIES,
301
301
  _internals,
@@ -311,7 +311,7 @@ import {
311
311
  recordKnowledgeEvent,
312
312
  recordPhaseCloseIntent,
313
313
  resolveKnowledgeEventsPath
314
- } from "./index-ekgc71m1.js";
314
+ } from "./index-2q5m4m2r.js";
315
315
  import {
316
316
  estimateTokens,
317
317
  readSwarmFileAsync,
@@ -337,18 +337,18 @@ import {
337
337
  validateActionableFields,
338
338
  validateLesson,
339
339
  validateSkillPath
340
- } from "./index-5m378633.js";
340
+ } from "./index-dzm5nfh7.js";
341
341
  import {
342
342
  MAX_CURATION_PROPOSALS,
343
343
  authorizeCuration,
344
344
  buildConfigFingerprintInput
345
- } from "./index-5yc5n4ae.js";
345
+ } from "./index-6gcxgx84.js";
346
346
  import {
347
347
  cohortConfigFingerprint
348
348
  } from "./index-rtry5xyf.js";
349
349
  import {
350
350
  resolveWorktreeIsolationConfig
351
- } from "./index-dcttq1mn.js";
351
+ } from "./index-k6f0nryj.js";
352
352
  import {
353
353
  RetrospectiveEvidenceSchema
354
354
  } from "./index-frcemc0b.js";
@@ -360,7 +360,7 @@ import {
360
360
  clearScopeBindings,
361
361
  readAuthoritativeScopeBindingSet,
362
362
  readDeclaredScopeFilesFromBindings
363
- } from "./index-jrfv2am8.js";
363
+ } from "./index-cj64vp08.js";
364
364
  import {
365
365
  clearPlanLedgerForReset,
366
366
  computePlanStructureHash,
@@ -376,7 +376,7 @@ import {
376
376
  replayFromLedgerWithStatus,
377
377
  resolvePlanningProfile,
378
378
  takeSnapshotEvent
379
- } from "./index-x6kjbjya.js";
379
+ } from "./index-wx3wz7ya.js";
380
380
  import {
381
381
  CORE_EVENT_LOCKED,
382
382
  appendCoreEventSync,
@@ -386,7 +386,7 @@ import {
386
386
  hasSpecDriftAuditEvent,
387
387
  hasTaskRepairAuditEvent,
388
388
  readCoreEvents
389
- } from "./index-htrb9ec3.js";
389
+ } from "./index-38cfx8g8.js";
390
390
  import {
391
391
  DEFAULT_QA_GATES,
392
392
  computeProfileHash,
@@ -430,7 +430,7 @@ import {
430
430
  observeCuratorCompliance,
431
431
  observeStoreHealth,
432
432
  readLearningHealth
433
- } from "./index-jmrsfhwq.js";
433
+ } from "./index-516j9vsk.js";
434
434
  import {
435
435
  appendKnowledge,
436
436
  appendRejectedLesson,
@@ -460,7 +460,7 @@ import {
460
460
  transactFile,
461
461
  transactKnowledge,
462
462
  wordBigrams
463
- } from "./index-pnt98k7z.js";
463
+ } from "./index-gy3tcmk4.js";
464
464
  import {
465
465
  readTailJsonl,
466
466
  readTailJsonlDetailed,
@@ -481,14 +481,14 @@ import {
481
481
  resolveLinkDir,
482
482
  sanitizeLinkId,
483
483
  writeLinkPointer
484
- } from "./index-zvxy0mev.js";
484
+ } from "./index-12ewkms0.js";
485
485
  import {
486
486
  assertProjectRoot,
487
487
  atomicWriteFile,
488
488
  hasExplicitProjectBoundary,
489
489
  isStrictPathDescendant,
490
490
  withEvidenceLock
491
- } from "./index-0v1rtanv.js";
491
+ } from "./index-ea9fk6v0.js";
492
492
  import {
493
493
  OPENINFERENCE_MAPPING_VERSION,
494
494
  OTEL_GENAI_MAPPING_VERSION,
@@ -499,7 +499,7 @@ import {
499
499
  pseudonymousRef,
500
500
  resolveLineageSalt,
501
501
  telemetry
502
- } from "./index-qt0793qm.js";
502
+ } from "./index-6mwha20t.js";
503
503
  import {
504
504
  canonicalRootKey,
505
505
  canonicalRootKeyFresh,
@@ -536,7 +536,7 @@ import {
536
536
  loadGateOverrides,
537
537
  loadPluginConfig,
538
538
  loadPluginConfigWithMeta
539
- } from "./index-zptq8mp1.js";
539
+ } from "./index-xj5z92qz.js";
540
540
  import {
541
541
  addDeferredWarning,
542
542
  advisoryWarn,
@@ -563,7 +563,7 @@ import {
563
563
  resolveAutoReviewConfig,
564
564
  resolveGeneratedAgentRole,
565
565
  stripKnownSwarmPrefix
566
- } from "./index-defq2crz.js";
566
+ } from "./index-rp4akjrm.js";
567
567
  import {
568
568
  AGENT_TOOL_MAP,
569
569
  ALL_AGENT_NAMES,
@@ -3257,7 +3257,7 @@ async function importLegacyPrWorkflowGateStateIfNeeded(directory, sessionID, all
3257
3257
  return null;
3258
3258
  throw error2;
3259
3259
  }
3260
- const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-wkmx8nr6.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
3260
+ const legacy = allowSalvagedImport ? (await (await import("./pr-workflow-gate-5dqcrkz6.js")).readPrWorkflowGateStateForRecovery(directory, sessionID))?.state ?? null : await readPrWorkflowGateStateFileFromDisk(filePath, sessionID);
3261
3261
  if (!legacy)
3262
3262
  return null;
3263
3263
  const namespace = workflowGateStateCoordinationNamespace(sessionID);
@@ -3344,7 +3344,7 @@ async function deleteStateWhileLocked(directory, sessionID, options = {}) {
3344
3344
  let recoveryState = null;
3345
3345
  if (!currentAuthoritative) {
3346
3346
  if (options.allowSalvagedRead) {
3347
- const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-wkmx8nr6.js");
3347
+ const { readPrWorkflowGateStateForRecovery } = await import("./pr-workflow-gate-5dqcrkz6.js");
3348
3348
  recoveryState = (await readPrWorkflowGateStateForRecovery(directory, normalizedSessionID))?.state ?? null;
3349
3349
  }
3350
3350
  if (!recoveryState) {
@@ -14491,7 +14491,7 @@ function isLaneOwnedByCurrentSession(branchName, expectedSessionId) {
14491
14491
  return extracted === expectedSessionId;
14492
14492
  }
14493
14493
  async function inspectStandardWorktreeCollisionOwnership(identity) {
14494
- const collisionOwnership = await import("./worktree-collision-ownership-4znkfq1t.js");
14494
+ const collisionOwnership = await import("./worktree-collision-ownership-rbzgbvj4.js");
14495
14495
  return collisionOwnership.inspectStandardWorktreeCollisionOwnership(identity);
14496
14496
  }
14497
14497
  async function runRecoveryGit(directory, args, timeoutMs = 15000) {
@@ -14917,7 +14917,7 @@ async function precreateStandardWorktreeSession(args) {
14917
14917
  const laneProfile = computeLaneRuntimeProfile(worktreeConfig.runtime_isolation, laneIndex, handle.worktreePath);
14918
14918
  if (laneProfile) {
14919
14919
  try {
14920
- const { writeLaneProfileToDiskReal } = await import("./core-z9ybzpvr.js");
14920
+ const { writeLaneProfileToDiskReal } = await import("./core-8k41qh0d.js");
14921
14921
  await writeLaneProfileToDiskReal(handle.worktreePath, laneProfile.laneIndex, laneProfile.envOverrides);
14922
14922
  } catch {}
14923
14923
  }
@@ -15896,7 +15896,7 @@ async function finishStandardWorktreeDispatch(directory, dispatch, config, callI
15896
15896
  }
15897
15897
  clearWorktreeMergeStatus(statusKey);
15898
15898
  try {
15899
- const { removeLaneProfileFromDiskReal } = await import("./core-z9ybzpvr.js");
15899
+ const { removeLaneProfileFromDiskReal } = await import("./core-8k41qh0d.js");
15900
15900
  await removeLaneProfileFromDiskReal(dispatch.handle.worktreePath, dispatch.laneIndex);
15901
15901
  } catch {}
15902
15902
  const state = serializationStateBySessionID.get(dispatch.parentSessionID);
@@ -16269,6 +16269,7 @@ function extractStatusCode(errorMsg) {
16269
16269
  }
16270
16270
  var TRANSIENT_MODEL_ERROR_PATTERN = /rate.?limit|429|500|502|503|504|529|timeout|overloaded|model.?not.?found|temporarily.?unavailable|provider[_\s-]?unavailable|server.?error|network.?connection.?lost|connection.?(refused|reset|timeout|lost)|bad.?gateway|gateway.?timeout|internal.?server.?error|service.?unavailable|ECONNRESET|ECONNREFUSED|ETIMEDOUT|EPIPE|ENOTFOUND|broken.?pipe|dns(?:[\s_-]+(?:resolution)?)?[\s_-]+fail|name.?not.?resolved|EAI_AGAIN/i;
16271
16271
  var QUOTA_ERROR_PATTERN = /quota|usage.?limit|insufficient.?(?:quota|credits?)|\b402\b|payment.?required|credit.?balance|out of credits|billing.?(?:hard.?)?limit/i;
16272
+ var REQUEST_SHAPE_REJECTION_PATTERN = /\b(?:single|one|only|exactly)[^.]{0,48}?\bsystem\s+messages?\b|\bmultiple\s+system\s+messages?\b|\bsystem\s+messages?\s+(?:are\s+)?not\s+supported\b/i;
16272
16273
  function isTransientProviderError(signal) {
16273
16274
  if (!signal)
16274
16275
  return false;
@@ -16819,6 +16820,18 @@ function classifyProviderFailure(error2, action2) {
16819
16820
  statusCode
16820
16821
  });
16821
16822
  }
16823
+ if (REQUEST_SHAPE_REJECTION_PATTERN.test(signal)) {
16824
+ return buildRecord({
16825
+ source: "provider",
16826
+ category: "provider.request_shape",
16827
+ retryClass: "do_not_retry",
16828
+ risk: "low",
16829
+ action: action2,
16830
+ display: signal,
16831
+ code,
16832
+ statusCode
16833
+ });
16834
+ }
16822
16835
  return buildRecord({
16823
16836
  source: "provider",
16824
16837
  category: lowered.length > 0 ? "provider.unknown" : "provider.cancelled",
@@ -22826,7 +22839,7 @@ function getDisplayFinalPromptPressure() {
22826
22839
  async function rehydratePrSubscriptions(sessionID, directory) {
22827
22840
  const map = new Map;
22828
22841
  try {
22829
- const { listActive: listActive2 } = await import("./pr-subscriptions-a2djfzyx.js");
22842
+ const { listActive: listActive2 } = await import("./pr-subscriptions-7fb7xm3q.js");
22830
22843
  const records = await listActive2(directory);
22831
22844
  for (const record of records) {
22832
22845
  if (record.sessionID !== sessionID)
@@ -39770,9 +39783,9 @@ function hashContent(content) {
39770
39783
  return createHash24("sha1").update(content).digest("hex");
39771
39784
  }
39772
39785
  async function loadConfigForPolicyCurator(directory) {
39773
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-a5zb02h8.js");
39786
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-5k68crjb.js");
39774
39787
  try {
39775
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-mhrn7hbb.js");
39788
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-855qxtdm.js");
39776
39789
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
39777
39790
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
39778
39791
  } catch {
@@ -42830,7 +42843,7 @@ async function resolveCuratorLLMDelegate(directory, mode, sessionId) {
42830
42843
  const seam = _internals36.createCuratorLLMDelegate;
42831
42844
  if (seam)
42832
42845
  return seam(directory, mode, sessionId);
42833
- const { createCuratorLLMDelegate } = await import("./curator-llm-factory-e162g7xp.js");
42846
+ const { createCuratorLLMDelegate } = await import("./curator-llm-factory-htgqafq0.js");
42834
42847
  return createCuratorLLMDelegate(directory, mode, sessionId);
42835
42848
  }
42836
42849
  async function reconcileCloseTerminalStateForPlan(directory, targetPlan, options) {
@@ -43225,7 +43238,7 @@ async function runFinalizeStage(ctx) {
43225
43238
  }
43226
43239
  }
43227
43240
  try {
43228
- const { CuratorConfigSchema: CCS } = await import("./schema-a5zb02h8.js");
43241
+ const { CuratorConfigSchema: CCS } = await import("./schema-5k68crjb.js");
43229
43242
  const { config: pmLoadedConfig } = _internals36.loadPluginConfigWithMeta(ctx.directory);
43230
43243
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
43231
43244
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -45337,7 +45350,7 @@ function serializeAgentSession(s) {
45337
45350
  }
45338
45351
  async function writeSnapshot(directory, state) {
45339
45352
  try {
45340
- const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-sad6q0a2.js");
45353
+ const { ensureSnapshotCoordinationReady } = await import("./snapshot-coordination-init-3rs3zpaa.js");
45341
45354
  await ensureSnapshotCoordinationReady(directory);
45342
45355
  const snapshot = {
45343
45356
  version: 3,
@@ -48354,7 +48367,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
48354
48367
  };
48355
48368
  }
48356
48369
  async function sweepActiveNearDuplicates(directory, options = {}) {
48357
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-mhrn7hbb.js");
48370
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-855qxtdm.js");
48358
48371
  const { config } = loadPluginConfigWithMeta2(directory);
48359
48372
  const sweepConfig = config.learning?.dedup_sweep;
48360
48373
  if (sweepConfig?.enabled === false)
@@ -49478,7 +49491,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
49478
49491
  }
49479
49492
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
49480
49493
  try {
49481
- const skillModule = await import("./skill-generator-r2cdtx7b.js");
49494
+ const skillModule = await import("./skill-generator-nspt9b3n.js");
49482
49495
  for (const cand of skillCandidates) {
49483
49496
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
49484
49497
  continue;
@@ -49950,7 +49963,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
49950
49963
  } catch {}
49951
49964
  }
49952
49965
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
49953
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-x8vcmb6k.js");
49966
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-n30h6ran.js");
49954
49967
  for (const { id } of contradictedEntries) {
49955
49968
  try {
49956
49969
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -50782,7 +50795,7 @@ async function runCuratorPostMortem(directory, options = {}) {
50782
50795
  warnings.push("Failed to collect knowledge summary.");
50783
50796
  }
50784
50797
  try {
50785
- const { getScanStatus } = await import("./scan-cursor-4khfn5pm.js");
50798
+ const { getScanStatus } = await import("./scan-cursor-jc7wwb7e.js");
50786
50799
  const scanStatus = await getScanStatus(directory);
50787
50800
  if (scanStatus.remaining_estimate > 0) {
50788
50801
  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.`);
@@ -50954,9 +50967,9 @@ var _internals54 = {
50954
50967
  verifyPostMortemKnowledgeActions,
50955
50968
  repairPostMortemActions,
50956
50969
  loadDefaultKnowledgeConfig: async (directory) => {
50957
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-a5zb02h8.js");
50970
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-5k68crjb.js");
50958
50971
  try {
50959
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-mhrn7hbb.js");
50972
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-855qxtdm.js");
50960
50973
  const loaded = loadPluginConfigWithMeta2(directory);
50961
50974
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
50962
50975
  } catch {
@@ -50964,11 +50977,11 @@ var _internals54 = {
50964
50977
  }
50965
50978
  },
50966
50979
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
50967
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-zv4qs07j.js");
50980
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-8yb3qkxs.js");
50968
50981
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
50969
50982
  },
50970
50983
  checkHivePromotions: async (entries2, knowledgeConfig, directory) => {
50971
- const { checkHivePromotions } = await import("./hive-promoter-hgqqn7qw.js");
50984
+ const { checkHivePromotions } = await import("./hive-promoter-kxpc3r17.js");
50972
50985
  return checkHivePromotions(entries2, knowledgeConfig, directory);
50973
50986
  },
50974
50987
  applyProposalTriage: async (directory, triage) => {
@@ -50977,7 +50990,7 @@ var _internals54 = {
50977
50990
  activateProposal,
50978
50991
  listSkills: listSkills2,
50979
50992
  sanitizeSlug
50980
- } = await import("./skill-generator-r2cdtx7b.js");
50993
+ } = await import("./skill-generator-nspt9b3n.js");
50981
50994
  const result = {
50982
50995
  approved: [],
50983
50996
  rejected: [],
@@ -51019,7 +51032,7 @@ var _internals54 = {
51019
51032
  return result;
51020
51033
  },
51021
51034
  readPriorDriftReports: async (directory) => {
51022
- const { readPriorDriftReports } = await import("./curator-drift-3bbn011w.js");
51035
+ const { readPriorDriftReports } = await import("./curator-drift-3av9hffm.js");
51023
51036
  return readPriorDriftReports(directory);
51024
51037
  },
51025
51038
  readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
@@ -59463,7 +59476,7 @@ function wireCloseInternals() {
59463
59476
  archiveEvidence,
59464
59477
  endAgentSession,
59465
59478
  flushAndDrainTelemetry: async () => {
59466
- const { flushAndDrainTelemetry } = await import("./telemetry-qxav5cdk.js");
59479
+ const { flushAndDrainTelemetry } = await import("./telemetry-zhcgfe70.js");
59467
59480
  return flushAndDrainTelemetry();
59468
59481
  },
59469
59482
  finalizeContextTelemetry,
@@ -60815,9 +60828,9 @@ var _internals64 = {
60815
60828
  loadPluginConfigWithMeta,
60816
60829
  loadCuratorDeps: async () => {
60817
60830
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate }] = await Promise.all([
60818
- import("./schema-a5zb02h8.js"),
60819
- import("./curator-zv4qs07j.js"),
60820
- import("./curator-llm-factory-e162g7xp.js")
60831
+ import("./schema-5k68crjb.js"),
60832
+ import("./curator-8yb3qkxs.js"),
60833
+ import("./curator-llm-factory-htgqafq0.js")
60821
60834
  ]);
60822
60835
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate };
60823
60836
  }
@@ -63149,7 +63162,7 @@ async function computeCurationDiagnostics(directory, entries2) {
63149
63162
  let scanCompleted = false;
63150
63163
  let scanRemaining = 0;
63151
63164
  try {
63152
- const { getScanStatus } = await import("./scan-cursor-4khfn5pm.js");
63165
+ const { getScanStatus } = await import("./scan-cursor-jc7wwb7e.js");
63153
63166
  const status = await getScanStatus(directory);
63154
63167
  scanGeneration = status.generation;
63155
63168
  scanCompleted = status.completed;
@@ -63157,19 +63170,19 @@ async function computeCurationDiagnostics(directory, entries2) {
63157
63170
  } catch {}
63158
63171
  let configMatch = null;
63159
63172
  try {
63160
- const { isLinked: isLinked2 } = await import("./knowledge-link-g0q25hqv.js");
63173
+ const { isLinked: isLinked2 } = await import("./knowledge-link-s2qs178z.js");
63161
63174
  if (isLinked2(directory)) {
63162
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-a5zb02h8.js");
63175
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-5k68crjb.js");
63163
63176
  let config;
63164
63177
  try {
63165
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-mhrn7hbb.js");
63178
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-855qxtdm.js");
63166
63179
  const loaded = loadPluginConfigWithMeta2(directory);
63167
63180
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
63168
63181
  } catch {
63169
63182
  config = KnowledgeConfigSchema2.parse({});
63170
63183
  }
63171
63184
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
63172
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-gwzmjmt7.js");
63185
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-m3x9mkj9.js");
63173
63186
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
63174
63187
  const cohortFp = await readCohortConfigFingerprint(directory);
63175
63188
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -64605,7 +64618,7 @@ async function handleDoctorCommand(directory, args) {
64605
64618
  const result = runConfigDoctor(config, directory);
64606
64619
  let output;
64607
64620
  if (enableAutoFix && result.hasAutoFixableIssues) {
64608
- const { runConfigDoctorWithFixes } = await import("./config-doctor-tkfrwztz.js");
64621
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-ebat06eq.js");
64609
64622
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
64610
64623
  applyLossy: true
64611
64624
  });
@@ -65559,7 +65572,7 @@ async function handleEvidenceCommand(directory, args) {
65559
65572
  return formatTaskEvidenceMarkdown(evidenceData);
65560
65573
  }
65561
65574
  async function handleEvidenceSummaryCommand(directory) {
65562
- const { buildEvidenceSummary } = await import("./evidence-summary-service-wrfth5tr.js");
65575
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-s258ea5t.js");
65563
65576
  const artifact = await buildEvidenceSummary(directory);
65564
65577
  if (!artifact) {
65565
65578
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -86040,7 +86053,7 @@ function createCuratorLLMDelegate(directory, mode = "init", sessionId) {
86040
86053
  }
86041
86054
  const sdkOpts = signal ? { signal } : {};
86042
86055
  try {
86043
- const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-7w6dnpvc.js");
86056
+ const { getSwarmAgents: getSwarmAgents2, resolveFallbackModel: resolveFallbackModel2 } = await import("./index-600aqfvm.js");
86044
86057
  const createResult = await client.session.create({
86045
86058
  ...sessionId ? {
86046
86059
  body: {
@@ -86782,7 +86795,7 @@ async function cancelPrFeedbackLoop(directory, sessionID, reason) {
86782
86795
  clearedEvents: []
86783
86796
  };
86784
86797
  try {
86785
- const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-wkmx8nr6.js");
86798
+ const { cancelPrFeedbackPublication: cancelPrFeedbackPublication2 } = await import("./pr-workflow-gate-5dqcrkz6.js");
86786
86799
  await cancelPrFeedbackPublication2(directory, sessionID, reason);
86787
86800
  } catch (err) {
86788
86801
  warn(`[pr-feedback-loop] cancelPrFeedbackPublication failed (fail-open): ${err instanceof Error ? err.message : String(err)}`);
@@ -101112,7 +101125,7 @@ async function runValidationWithTransientRetry(input, candidateContent, baseline
101112
101125
  if (!input.dispatcher) {
101113
101126
  throw new Error("no evaluation dispatcher available (cannot run validation)");
101114
101127
  }
101115
- const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-hkbds12j.js");
101128
+ const { createModelEvaluationExecutor: createModelEvaluationExecutor2 } = await import("./runner-p9hstpxn.js");
101116
101129
  const executor = createModelEvaluationExecutor2(input.dispatcher, input.sessionId);
101117
101130
  const result = await withProtectedSetIntegrity([evalInputRoot, ...protectedRoots(input.directory)], () => _internals122.evaluateCandidateV1({
101118
101131
  projectRoot: input.directory,
@@ -103741,7 +103754,7 @@ function buildDetailedHelp(commandName, entry) {
103741
103754
  async function handleHelpCommand(ctx) {
103742
103755
  const targetCommand = ctx.args.join(" ");
103743
103756
  if (!targetCommand) {
103744
- const { buildHelpText } = await import("./index-7pj0x345.js");
103757
+ const { buildHelpText } = await import("./index-gw5egd8j.js");
103745
103758
  return buildHelpText();
103746
103759
  }
103747
103760
  const tokens = targetCommand.split(/\s+/);
@@ -103755,7 +103768,7 @@ async function handleHelpCommand(ctx) {
103755
103768
  > Note: \`/swarm ${resolved.key}\` is a deprecated alias for \`/swarm ${aliasTarget}\`.` : detailed;
103756
103769
  }
103757
103770
  const similar = _internals24.findSimilarCommands(targetCommand);
103758
- const { buildHelpText: fullHelp } = await import("./index-7pj0x345.js");
103771
+ const { buildHelpText: fullHelp } = await import("./index-gw5egd8j.js");
103759
103772
  if (similar.length > 0) {
103760
103773
  return `Command '/swarm ${targetCommand}' not found.
103761
103774
 
@@ -104070,7 +104083,7 @@ var COMMAND_REGISTRY = {
104070
104083
  },
104071
104084
  "guardrail explain": {
104072
104085
  handler: async (ctx) => {
104073
- const { handleGuardrailExplain } = await import("./guardrail-explain-dn96802k.js");
104086
+ const { handleGuardrailExplain } = await import("./guardrail-explain-r0qxa4zy.js");
104074
104087
  return handleGuardrailExplain(ctx.directory, ctx.args);
104075
104088
  },
104076
104089
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -104080,7 +104093,7 @@ var COMMAND_REGISTRY = {
104080
104093
  },
104081
104094
  "guardrail reset": {
104082
104095
  handler: async (ctx) => {
104083
- const { handleGuardrailReset } = await import("./guardrail-reset-fjn42e0n.js");
104096
+ const { handleGuardrailReset } = await import("./guardrail-reset-wb2eqbvf.js");
104084
104097
  return handleGuardrailReset(ctx.args, ctx.sessionID);
104085
104098
  },
104086
104099
  description: "Reset one exact active invocation/action circuit after repair",
@@ -104101,7 +104114,7 @@ var COMMAND_REGISTRY = {
104101
104114
  },
104102
104115
  "guardrail-log": {
104103
104116
  handler: async (ctx) => {
104104
- const { handleGuardrailLog } = await import("./guardrail-log-rcza6v3y.js");
104117
+ const { handleGuardrailLog } = await import("./guardrail-log-j2wdmvmy.js");
104105
104118
  return handleGuardrailLog(ctx.directory, ctx.args);
104106
104119
  },
104107
104120
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -105235,6 +105248,57 @@ function resolveRegistryEntry(key) {
105235
105248
  init_constants();
105236
105249
  init_warning_buffer();
105237
105250
  var ARCHITECT_MEMORY_OUTCOME_GUIDANCE = `After using recalled memory or a graph answer, call \`swarm_memory_outcome\` to record whether it was \`useful\`, a \`dead_end\`, or \`corrected\`, with the relevant file/symbol anchors. If you correct a memory-backed claim, record \`corrected\` and include the corrected explanation in \`correction\`.`;
105251
+ var ARCHITECT_PROMPT_BUDGET_CHARS = 161000;
105252
+ var ARCHITECT_TOOL_DESCRIPTION_PROMPT_CAP_CHARS = 240;
105253
+ function estimateModelTokens(text) {
105254
+ return Math.ceil(text.length / 4);
105255
+ }
105256
+ function measureArchitectPromptBudget(prompt) {
105257
+ const chars = prompt.length;
105258
+ return {
105259
+ chars,
105260
+ tokenEstimate: estimateModelTokens(prompt),
105261
+ withinBudget: chars < ARCHITECT_PROMPT_BUDGET_CHARS
105262
+ };
105263
+ }
105264
+ var emittedBudgetAdvisories = new Set;
105265
+ var MAX_ARCHITECT_BUDGET_SIGNATURES = 100;
105266
+ function budgetAdvisorySignature(error2) {
105267
+ return error2.replace(/\d+/g, "N");
105268
+ }
105269
+ function warnArchitectPromptBudgetExceededOnce(error2) {
105270
+ const signature = budgetAdvisorySignature(error2);
105271
+ if (emittedBudgetAdvisories.has(signature))
105272
+ return;
105273
+ if (emittedBudgetAdvisories.size >= MAX_ARCHITECT_BUDGET_SIGNATURES) {
105274
+ const oldest = emittedBudgetAdvisories.values().next().value;
105275
+ if (oldest !== undefined)
105276
+ emittedBudgetAdvisories.delete(oldest);
105277
+ }
105278
+ emittedBudgetAdvisories.add(signature);
105279
+ advisoryWarn(error2);
105280
+ }
105281
+ function resetArchitectPromptBudgetAdvisories() {
105282
+ emittedBudgetAdvisories.clear();
105283
+ }
105284
+ function enforceArchitectPromptBudget(label, prompt) {
105285
+ const metrics = measureArchitectPromptBudget(prompt);
105286
+ if (metrics.withinBudget) {
105287
+ return {
105288
+ ok: true,
105289
+ chars: metrics.chars,
105290
+ tokenEstimate: metrics.tokenEstimate
105291
+ };
105292
+ }
105293
+ const boundedLabel = label.slice(0, 200);
105294
+ const error2 = `ARCHITECT_PROMPT_BUDGET_EXCEEDED: composed architect prompt for '${boundedLabel}' ` + `is ${metrics.chars} chars (> ${ARCHITECT_PROMPT_BUDGET_CHARS} ceiling, ~${metrics.tokenEstimate} model-token estimate). ` + "The full prompt is kept (guidance is never dropped silently); shorten user-variable inputs " + "(e.g. swarm names) or trim feature prose.";
105295
+ return {
105296
+ ok: false,
105297
+ error: error2.slice(0, 400),
105298
+ chars: metrics.chars,
105299
+ tokenEstimate: metrics.tokenEstimate
105300
+ };
105301
+ }
105238
105302
  var ARCHITECT_PROMPT = `You are Architect - orchestrator of a multi-agent swarm.
105239
105303
 
105240
105304
  ## COMMAND NAMESPACE \u2014 CRITICAL
@@ -106550,6 +106614,45 @@ function buildYourToolsList(council, memoryEnabled = false, externalSkillsEnable
106550
106614
  const sorted2 = [...tools].sort();
106551
106615
  return `Task (delegation), ${sorted2.join(", ")}.`;
106552
106616
  }
106617
+ function capToolDescriptionForPrompt(description) {
106618
+ if (description.length <= ARCHITECT_TOOL_DESCRIPTION_PROMPT_CAP_CHARS) {
106619
+ return description;
106620
+ }
106621
+ const depthOf = (s) => {
106622
+ let depth2 = 0;
106623
+ for (let i = 0;i < s.length; i++) {
106624
+ if (s[i] === "(")
106625
+ depth2++;
106626
+ else if (s[i] === ")")
106627
+ depth2--;
106628
+ }
106629
+ return depth2;
106630
+ };
106631
+ let end = ARCHITECT_TOOL_DESCRIPTION_PROMPT_CAP_CHARS;
106632
+ let capped = description.slice(0, end);
106633
+ let depth = depthOf(capped);
106634
+ while (depth < 0 && capped.endsWith(")")) {
106635
+ capped = capped.slice(0, -1).trimEnd();
106636
+ depth = depthOf(capped);
106637
+ }
106638
+ while (depth > 0 && end + depth > ARCHITECT_TOOL_DESCRIPTION_PROMPT_CAP_CHARS) {
106639
+ end -= end + depth - ARCHITECT_TOOL_DESCRIPTION_PROMPT_CAP_CHARS;
106640
+ if (end <= 0) {
106641
+ return "";
106642
+ }
106643
+ capped = description.slice(0, end);
106644
+ depth = depthOf(capped);
106645
+ }
106646
+ return capped.trimEnd() + ")".repeat(Math.max(depth, 0));
106647
+ }
106648
+ function renderToolPromptDescription(tool2, description) {
106649
+ if (!description)
106650
+ return tool2;
106651
+ if (description.length <= ARCHITECT_TOOL_DESCRIPTION_PROMPT_CAP_CHARS) {
106652
+ return `${tool2} (${description})`;
106653
+ }
106654
+ return `${tool2} (${capToolDescriptionForPrompt(description)}\u2026)`;
106655
+ }
106553
106656
  function buildAvailableToolsList(council, memoryEnabled = false, externalSkillsEnabled = false, turboEnabled = false, skillsEnabled = false) {
106554
106657
  const qaCouncilEnabled = council?.enabled === true;
106555
106658
  const generalCouncilEnabled = council?.general?.enabled === true;
@@ -106563,10 +106666,7 @@ function buildAvailableToolsList(council, memoryEnabled = false, externalSkillsE
106563
106666
  ...skillsEnabled ? SKILL_AGENT_TOOL_MAP.architect ?? [] : []
106564
106667
  ];
106565
106668
  const sorted2 = [...tools].sort();
106566
- return sorted2.map((t) => {
106567
- const desc = TOOL_DESCRIPTIONS[t];
106568
- return desc ? `${t} (${desc})` : t;
106569
- }).join(", ");
106669
+ return sorted2.map((t) => renderToolPromptDescription(t, TOOL_DESCRIPTIONS[t])).join(", ");
106570
106670
  }
106571
106671
  function buildSlashCommandsList() {
106572
106672
  const SKIP_ALIASES = new Set(Object.entries(COMMAND_REGISTRY).filter(([, entry]) => entry.aliasOf).map(([name]) => name));
@@ -106766,6 +106866,10 @@ ${archBlock}`;
106766
106866
 
106767
106867
  ${ARCHITECT_MEMORY_OUTCOME_GUIDANCE}`.trim();
106768
106868
  }
106869
+ const budgetEnforcement = enforceArchitectPromptBudget("architect", prompt ?? "");
106870
+ if (!budgetEnforcement.ok) {
106871
+ warnArchitectPromptBudgetExceededOnce(budgetEnforcement.error);
106872
+ }
106769
106873
  return {
106770
106874
  name: "architect",
106771
106875
  description: "Central orchestrator of the development pipeline. Analyzes requests, coordinates SME consultation, manages code generation, and triages QA feedback.",
@@ -107086,7 +107190,7 @@ Reply with a single fenced JSON block. No prose outside the block.
107086
107190
  "memberId": "<your hardcoded memberId>",
107087
107191
  "role": "<your hardcoded role>",
107088
107192
  "round": 1,
107089
- "response": "Your full answer (Round 1) or stance + reasoning (Round 2). Markdown OK inside the string.",
107193
+ "response": "Your full answer (Round 1) or stance + reasoning (Round 2). Markdown OK inside the string; the Round 2 stance keyword (MAINTAIN/CONCEDE/NUANCE) must remain the bare first word of its paragraph.",
107090
107194
  "searchQueries": [],
107091
107195
  "sources": [
107092
107196
  { "title": "...", "url": "...", "snippet": "...", "query": "..." }
@@ -108854,6 +108958,10 @@ If you call @coder instead of @${swarmId}_coder, the call will FAIL or go to the
108854
108958
  `;
108855
108959
  architect.config.prompt = swarmHeader + architect.config.prompt;
108856
108960
  }
108961
+ const prefixedBudget = enforceArchitectPromptBudget(prefixName("architect"), architect.config.prompt ?? "");
108962
+ if (!prefixedBudget.ok) {
108963
+ warnArchitectPromptBudgetExceededOnce(prefixedBudget.error);
108964
+ }
108857
108965
  agents.push(applyOverrides(architect, swarmAgents, swarmPrefix, quiet));
108858
108966
  }
108859
108967
  for (const { name, factory } of TYPE_A_AGENTS) {
@@ -109245,4 +109353,4 @@ function getAgentConfigs(config, directory, sessionId, projectContext) {
109245
109353
  return result;
109246
109354
  }
109247
109355
 
109248
- export { resetActionCircuitExternally, getBlockingActionCircuit, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, getSharedClassifierGuardrailBlock, classifyCommand, MAX_PARALLEL_VERDICT_TASKS, computeParallelVerdict, createArchitectAgent, createCoderAgent, GENERALIST_COUNCIL_PROMPT, SKEPTIC_COUNCIL_PROMPT, DOMAIN_EXPERT_COUNCIL_PROMPT, createCriticAgent, createCuratorAgent, createDesignerAgent, createDocsAgent, createResearcherAgent, SECURITY_CATEGORIES, createReviewerAgent, createSMEAgent, createTestEngineerAgent, _internals125 as _internals, stripSwarmPrefix, extractSwarmIdFromAgentName, resolveFallbackModel, getSwarmAgents, createAgents, resolvePrimaryAgentNames, getAgentConfigs, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, getAgentSession, parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, getStandardWorktreeDegradationReason, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals22 as _internals1, redactSecrets, prWorkflowSessionFileStem, ensurePrWorkflowSafeParentDirectory, writePrWorkflowAtomicJson, PrWorkflowCheckoutMutationTimeoutError, withPrWorkflowCheckoutMutationLock, PR_REVIEW_REPORT_VERDICTS, allowedPrReviewReportVerdicts, normalizePrReviewPartialBaseCoverageRecord, rollbackPrReviewPartialBaseCoverageAdmission, readPrReviewTerminalCoverageForReport, PR_REVIEW_REQUIRED_MICRO_LANE_IDS, PR_REVIEW_DEPTH_TIER_THRESHOLDS, PR_REVIEW_BASE_LANE_FLOORS, PR_REVIEW_TIER_L_CONSOLIDATED_LANE_FLOOR, PR_REVIEW_MICRO_LANE_FLOORS, computePrReviewDepthTier, MAX_PR_FEEDBACK_INVENTORY_AMENDMENTS, activatePrWorkflow, readPrWorkflowGateState, submitPrReviewResult, withPrWorkflowCheckoutPreparationLock, withInactivePrWorkflowCheckoutRestoreLock, clearPrWorkflowGateState, terminalizePrWorkflowGateForSession2 as terminalizePrWorkflowGateForSession, collectPrWorkflowPendingLaneLiveness, settlePresumedStalePrWorkflowLanes, abortPrWorkflow, recoverArmedPrWorkflow, bindPrWorkflowHead, rebindPrFeedbackHead, bindPrReviewBase, assertCurrentCheckoutHead, assertPrReviewCleanCheckout, enforcePrWorkflowDispatchLanesAsync, PrReviewResilienceCircuitOpenError, PrReviewResilienceRetryExhaustedError, enforcePrReviewBaseDimensions, rollbackPrReviewBaseAdmissionIfUnlaunched, admitPrReviewPartialBaseCoverage2 as admitPrReviewPartialBaseCoverage, assertPrReviewBaseCoverageSettled2 as assertPrReviewBaseCoverageSettled, recordPrReviewValidationBatch, assertPrReviewValidationSettled, declarePrFeedbackInventory, enforcePrFeedbackVerificationOwnership, assertPrFeedbackVerificationSettled, recordPrFeedbackStageA, recordPrFeedbackGateBatch, assertPrFeedbackGatePhaseSettled, assertPrFeedbackReadyToPublish, invalidatePrFeedbackPublication, describePrWorkflowPublicationSection, findDanglingLivePublicationGeneration, recordPrFeedbackPushAttemptResult, cancelPrFeedbackPublication, resolvePrReviewWriterRunId, markPrReviewTriggerEvaluationComplete, bindPrReviewTriggerLedger, assertPrReviewArtifactBoundary, assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts, markPrReviewArtifactBoundary, markPrReviewHandoffComplete, readPrReviewFinalFindingPolicyForReport, transitionPrReviewToFeedback, declarePrFeedbackScope, resolvePrFeedbackScopeDeclaration, consumePrFeedbackScopeDeclaration, validatePrFeedbackScopeBinding, enforcePrWorkflowToolBefore, readPrReviewReentryBindingContext, hasActivePrReviewReentryAuthorization, reserveActivePrReviewReentryAuthorization, completePrWorkflow, _test_exports2 as _test_exports, normalizePrWorkflowShellCommand, describePrWorkflowRevisionDigestFailure, readAuthoritativePrReviewCriticSettlements, readAuthoritativePrReviewCriticVerdicts, formatPrReviewLaneValidationFailure, validatePrReviewDiscoveryLaneCompletion2 as validatePrReviewDiscoveryLaneCompletion, validatePrWorkflowTransportRecovery, prReviewDiscoveryArtifactCoversLane, MAX_SALVAGED_SCHEMA_ERROR_CHARS, readPrWorkflowGateStateForRecovery, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleApproveWriteCommand, handleArchiveCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, createSwarmTool, handleCheckpointCommand, DEFAULT_CI_DEADLINE_MS2 as DEFAULT_CI_DEADLINE_MS, createSignalCancellation, handleCiCommand, handleCiSimulateCommand, handleClarifyCommand, safeRealpathSync, buildSynonymIndex, expandTokens, readSynonymMap, createCuratorLLMDelegate, startSnapshotCoordinationInitialization, ensureSnapshotCoordinationReady, retrySnapshotCoordinationInitialization, getSnapshotCoordinationStatus, beginSnapshotCoordinationReset, closeSnapshotCoordinationInitialization, markSnapshotCoordinationClosing, _snapshotCoordinationInternals, handleCloseCommand, _internals53 as _internals2, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals57 as _internals3, createHivePromoterHook, promoteToHive, promoteFromSwarm, createMemoryGateway, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, getCoChangePairs, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getHostConfigDir, getPluginCachePaths, getPluginLockFilePaths, VERSION_PINNED_LEAF, discoverVersionPinnedCachePaths, readCachePackageVersion, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, computeQualityBudget, computeSastScan, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleBlueprintValidateCommand, handleBlueprintCurrentCommand, handleBlueprintHistoryCommand, handleBlueprintDiffCommand, handleBlueprintExportCommand, handleHarnessCandidateValidateCommand, handleHarnessCandidateShowCommand, handleHarnessCandidateDiffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, symbols, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleRecoverCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, isCommandFailure, COMMAND_REGISTRY, VALID_COMMANDS, _internals24 as _internals4, resolveCommand, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand };
109356
+ export { resetActionCircuitExternally, getBlockingActionCircuit, dcNormalizeCommand, dcUnwrapWrappers, dcSplitSegments, dcExtractRecursiveRmTargets, dcEvaluateRecursiveDeleteTargets, dcCheckJunctionCreation, dcExtractWindowsCmdTargets, dcExtractPowerShellTargets, getSharedClassifierGuardrailBlock, classifyCommand, MAX_PARALLEL_VERDICT_TASKS, computeParallelVerdict, resetArchitectPromptBudgetAdvisories, createArchitectAgent, createCoderAgent, GENERALIST_COUNCIL_PROMPT, SKEPTIC_COUNCIL_PROMPT, DOMAIN_EXPERT_COUNCIL_PROMPT, createCriticAgent, createCuratorAgent, createDesignerAgent, createDocsAgent, createResearcherAgent, SECURITY_CATEGORIES, createReviewerAgent, createSMEAgent, createTestEngineerAgent, _internals125 as _internals, stripSwarmPrefix, extractSwarmIdFromAgentName, resolveFallbackModel, getSwarmAgents, createAgents, resolvePrimaryAgentNames, getAgentConfigs, SWARM_COMMAND_TOOL_COMMANDS, SWARM_COMMAND_TOOL_ALLOWLIST, HUMAN_ONLY_SWARM_COMMANDS, classifySwarmCommandToolUse, classifySwarmCommandChatFallbackUse, detectPosixWrites, detectWindowsWrites, resolveWriteTargets, getAgentSession, parseLeanLaneIndex, computeLaneRuntimeProfile, MAX_TRACKED_STANDARD_WORKTREE_CALLS, awaitingMergeByCallID, standardWorktreeByCallID, standardWorktreeSerializationSessions, getStandardWorktreeDegradationReason, resetStandardWorktreeIsolationState, checkStandardWorktreeSerializationRelease, sanitizeWorktreeTaskId, preProvisionCollisionCheck, isLaneOwnedByCurrentSession, precreateStandardWorktreeSession, preserveBackgroundWorktreeOwnershipForCallId, preserveDirtyWorktreeForCallId, preserveDirtyWorktreeAtPath, cleanupStandardWorktreeForCallId, abortStandardWorktreeDispatch, finishStandardWorktreeDispatch, readLaneEnvFileFromDisk, _internals22 as _internals1, redactSecrets, prWorkflowSessionFileStem, ensurePrWorkflowSafeParentDirectory, writePrWorkflowAtomicJson, PrWorkflowCheckoutMutationTimeoutError, withPrWorkflowCheckoutMutationLock, PR_REVIEW_REPORT_VERDICTS, allowedPrReviewReportVerdicts, normalizePrReviewPartialBaseCoverageRecord, rollbackPrReviewPartialBaseCoverageAdmission, readPrReviewTerminalCoverageForReport, PR_REVIEW_REQUIRED_MICRO_LANE_IDS, PR_REVIEW_DEPTH_TIER_THRESHOLDS, PR_REVIEW_BASE_LANE_FLOORS, PR_REVIEW_TIER_L_CONSOLIDATED_LANE_FLOOR, PR_REVIEW_MICRO_LANE_FLOORS, computePrReviewDepthTier, MAX_PR_FEEDBACK_INVENTORY_AMENDMENTS, activatePrWorkflow, readPrWorkflowGateState, submitPrReviewResult, withPrWorkflowCheckoutPreparationLock, withInactivePrWorkflowCheckoutRestoreLock, clearPrWorkflowGateState, terminalizePrWorkflowGateForSession2 as terminalizePrWorkflowGateForSession, collectPrWorkflowPendingLaneLiveness, settlePresumedStalePrWorkflowLanes, abortPrWorkflow, recoverArmedPrWorkflow, bindPrWorkflowHead, rebindPrFeedbackHead, bindPrReviewBase, assertCurrentCheckoutHead, assertPrReviewCleanCheckout, enforcePrWorkflowDispatchLanesAsync, PrReviewResilienceCircuitOpenError, PrReviewResilienceRetryExhaustedError, enforcePrReviewBaseDimensions, rollbackPrReviewBaseAdmissionIfUnlaunched, admitPrReviewPartialBaseCoverage2 as admitPrReviewPartialBaseCoverage, assertPrReviewBaseCoverageSettled2 as assertPrReviewBaseCoverageSettled, recordPrReviewValidationBatch, assertPrReviewValidationSettled, declarePrFeedbackInventory, enforcePrFeedbackVerificationOwnership, assertPrFeedbackVerificationSettled, recordPrFeedbackStageA, recordPrFeedbackGateBatch, assertPrFeedbackGatePhaseSettled, assertPrFeedbackReadyToPublish, invalidatePrFeedbackPublication, describePrWorkflowPublicationSection, findDanglingLivePublicationGeneration, recordPrFeedbackPushAttemptResult, cancelPrFeedbackPublication, resolvePrReviewWriterRunId, markPrReviewTriggerEvaluationComplete, bindPrReviewTriggerLedger, assertPrReviewArtifactBoundary, assertPrReviewArtifactRecordsMatchAuthoritativeVerdicts, markPrReviewArtifactBoundary, markPrReviewHandoffComplete, readPrReviewFinalFindingPolicyForReport, transitionPrReviewToFeedback, declarePrFeedbackScope, resolvePrFeedbackScopeDeclaration, consumePrFeedbackScopeDeclaration, validatePrFeedbackScopeBinding, enforcePrWorkflowToolBefore, readPrReviewReentryBindingContext, hasActivePrReviewReentryAuthorization, reserveActivePrReviewReentryAuthorization, completePrWorkflow, _test_exports2 as _test_exports, normalizePrWorkflowShellCommand, describePrWorkflowRevisionDigestFailure, readAuthoritativePrReviewCriticSettlements, readAuthoritativePrReviewCriticVerdicts, formatPrReviewLaneValidationFailure, validatePrReviewDiscoveryLaneCompletion2 as validatePrReviewDiscoveryLaneCompletion, validatePrWorkflowTransportRecovery, prReviewDiscoveryArtifactCoversLane, MAX_SALVAGED_SCHEMA_ERROR_CHARS, readPrWorkflowGateStateForRecovery, handleAcknowledgeSpecDriftCommand, handleAgentsCommand, handleAnalyzeCommand, handleApproveWriteCommand, handleArchiveCommand, handleAutoProceedCommand, handleBenchmarkCommand, handleBrainstormCommand, createSwarmTool, handleCheckpointCommand, DEFAULT_CI_DEADLINE_MS2 as DEFAULT_CI_DEADLINE_MS, createSignalCancellation, handleCiCommand, handleCiSimulateCommand, handleClarifyCommand, safeRealpathSync, buildSynonymIndex, expandTokens, readSynonymMap, createCuratorLLMDelegate, startSnapshotCoordinationInitialization, ensureSnapshotCoordinationReady, retrySnapshotCoordinationInitialization, getSnapshotCoordinationStatus, beginSnapshotCoordinationReset, closeSnapshotCoordinationInitialization, markSnapshotCoordinationClosing, _snapshotCoordinationInternals, handleCloseCommand, _internals53 as _internals2, normalizeRecommendationEntryIdToken, parseKnowledgeRecommendations, parseKnowledgeRecommendationsWithDiagnostics, parseStructuredCuratorBlocks, readCuratorSummary, writeCuratorSummary, appendCuratorRecommendation, mergeCuratorPhaseSummary, filterPhaseEvents, checkPhaseCompliance, runCuratorInit, runCuratorPhase, applyCuratorKnowledgeUpdates, isHiveEligible, countDistinctProjects, checkHivePromotions, _internals57 as _internals3, createHivePromoterHook, promoteToHive, promoteFromSwarm, createMemoryGateway, handleCodebaseReviewCommand, handleConcurrencyCommand, handleConfigCommand, handleConsolidateCommand, handleCostsCommand, handleCouncilCommand, getCoChangePairs, handleCurateCommand, handleDarkMatterCommand, handleDeepDiveCommand, handleDeepResearchCommand, getHostConfigDir, getPluginCachePaths, getPluginLockFilePaths, VERSION_PINNED_LEAF, discoverVersionPinnedCachePaths, readCachePackageVersion, handleDiagnoseCommand, handleDoctorCommand, handleEvidenceCommand, handleEvidenceSummaryCommand, handleExportCommand, handleFullAutoCommand, computeQualityBudget, computeSastScan, handleGateAuditCommand, handleGateStatsCommand, handleHandoffCommand, handleBlueprintValidateCommand, handleBlueprintCurrentCommand, handleBlueprintHistoryCommand, handleBlueprintDiffCommand, handleBlueprintExportCommand, handleHarnessCandidateValidateCommand, handleHarnessCandidateShowCommand, handleHarnessCandidateDiffCommand, handleHistoryCommand, handleKnowledgeQuarantineCommand, handleKnowledgeRestoreCommand, handleKnowledgeMigrateCommand, handleKnowledgeListCommand, handleKnowledgeUnactionableCommand, handleKnowledgeRetryHardeningCommand, handleLearningCommand, handleLinkCommand, symbols, handleMemoryCommand, handleMemoryStatusCommand, handleMemoryValueLogCommand, handleMemoryMigrateCommand, handleMemoryImportCommand, handleMemoryExportCommand, handlePlanCommand, handlePreflightCommand, handlePromoteCommand, handleQaGatesCommand, handleRecoverCommand, handleResetCommand, handleResetSessionCommand, handleRetrieveCommand, handleReviewCommand, handleRollbackCommand, handleSddStatusCommand, handleSddValidateCommand, handleSddProjectCommand, handleSddCommand, handleSimulateCommand, handleSpecifyCommand, handleStatusCommand, handleSyncPlanCommand, handleTurboCommand, handleUnlinkCommand, handleWriteRetroCommand, handleHelpCommand, isCommandFailure, COMMAND_REGISTRY, VALID_COMMANDS, _internals24 as _internals4, resolveCommand, normalizeSwarmCommandInput, canonicalCommandKey, formatCommandNotFound, executeSwarmCommand };