opencode-swarm 7.189.0 → 7.190.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 (177) hide show
  1. package/README.md +42 -6
  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/agents/architect.d.ts +1 -1
  5. package/dist/background/completion-observer.d.ts +6 -0
  6. package/dist/cli/{auto-checkpoint-m7c4x8bk.js → auto-checkpoint-26m3h5f4.js} +9 -9
  7. package/dist/cli/{checkpoint-m7q9886q.js → checkpoint-7a0achpv.js} +18 -20
  8. package/dist/cli/{coder-settlement-hh81z2f7.js → coder-settlement-dsb1t39t.js} +13 -13
  9. package/dist/cli/{config-doctor-0rexy3xt.js → config-doctor-9txawzng.js} +23 -20
  10. package/dist/cli/{core-ays6stz4.js → core-kv7jz9ty.js} +4 -4
  11. package/dist/cli/{curation-policy-65ckmmd5.js → curation-policy-6p6fcfjb.js} +6 -6
  12. package/dist/cli/{curator-dfzkfgs0.js → curator-26yzg8wp.js} +44 -44
  13. package/dist/cli/{curator-drift-nts5atks.js → curator-drift-kxn5sk3z.js} +9 -9
  14. package/dist/cli/curator-llm-factory-hs2y9kmw.js +82 -0
  15. package/dist/cli/{doctor-knowledge-receipt-phase-id-ec40k5hn.js → doctor-knowledge-receipt-phase-id-z8wea03e.js} +9 -9
  16. package/dist/cli/{evidence-summary-service-vgtm72g5.js → evidence-summary-service-bg5zq78s.js} +21 -22
  17. package/dist/cli/{gate-evidence-vmn65kxe.js → gate-evidence-0beg9c7r.js} +8 -8
  18. package/dist/cli/guardrail-explain-n8bm0hpm.js +83 -0
  19. package/dist/cli/{guardrail-log-hc8fjm4x.js → guardrail-log-r2zazmbn.js} +8 -8
  20. package/dist/cli/{guardrail-reset-ct00w300.js → guardrail-reset-0q54t44w.js} +44 -44
  21. package/dist/cli/{hive-promoter-2xax6van.js → hive-promoter-7dr5b9zv.js} +44 -44
  22. package/dist/cli/{index-9gqb5nkj.js → index-0gve0mkj.js} +4 -4
  23. package/dist/cli/{index-34vsyj15.js → index-0yrg10jx.js} +5 -5
  24. package/dist/cli/{index-mfxef20k.js → index-0z8vdkvg.js} +4 -4
  25. package/dist/cli/{index-2nexf5vz.js → index-1f084tqn.js} +22223 -15395
  26. package/dist/cli/{index-qx3g1bbe.js → index-26e2s6r1.js} +1 -1
  27. package/dist/cli/{index-kqegvngt.js → index-2c47efpt.js} +4 -4
  28. package/dist/cli/{index-9tvjwv01.js → index-2fpv2wmc.js} +1 -1
  29. package/dist/cli/{index-8q8783g0.js → index-3zwhxk98.js} +1 -1
  30. package/dist/cli/{index-9j3ybyfs.js → index-4a15347d.js} +7 -7
  31. package/dist/cli/{index-5cfhwd65.js → index-67a6mk20.js} +2 -2
  32. package/dist/cli/{index-d3rjvm9e.js → index-7vnr5cmp.js} +2 -2
  33. package/dist/cli/{index-twb3f4tk.js → index-8bx6vhzk.js} +1 -1
  34. package/dist/cli/{index-0gejy4cx.js → index-ay8ggtgr.js} +2 -2
  35. package/dist/cli/{index-8xabhfwr.js → index-b2j231jy.js} +2 -2
  36. package/dist/cli/{index-cbqkag7q.js → index-bcwmn4d7.js} +3 -3
  37. package/dist/cli/{index-fbgjj7h5.js → index-bfyh3gpe.js} +101 -13
  38. package/dist/cli/{index-skdpgjar.js → index-cewpxcwm.js} +862 -1221
  39. package/dist/cli/{index-bzbxn24k.js → index-dbdkh7pq.js} +5 -5
  40. package/dist/cli/{index-w4zscz6p.js → index-dnp4qtpf.js} +5 -5
  41. package/dist/cli/{index-waxvpwbv.js → index-efztf4yw.js} +127 -13
  42. package/dist/cli/{index-4p3jh14t.js → index-enq166kw.js} +4 -4
  43. package/dist/cli/{index-g03m5jhw.js → index-f46dbyew.js} +3 -3
  44. package/dist/cli/{index-ntda6tje.js → index-feaxsjrt.js} +10 -2
  45. package/dist/cli/{index-89f56ej4.js → index-fthhppnc.js} +46 -46
  46. package/dist/cli/{index-wqa31xnf.js → index-gqb8etv4.js} +7 -7
  47. package/dist/cli/{index-1cwmj1gs.js → index-ha0w0a7t.js} +77 -16
  48. package/dist/cli/{index-nhsafbrh.js → index-hx1fmywk.js} +5 -5
  49. package/dist/cli/{index-kaqdzhj3.js → index-kfevm0n5.js} +2 -2
  50. package/dist/cli/{index-z29hksyw.js → index-m28dzyy8.js} +26 -10
  51. package/dist/cli/{index-x1eh2636.js → index-mcv0v2dp.js} +1 -1
  52. package/dist/cli/{index-9czp2dcg.js → index-mjfpaxw3.js} +7 -7
  53. package/dist/cli/{index-f6exny9m.js → index-n8q43eff.js} +2 -2
  54. package/dist/cli/{index-7hr5m7yp.js → index-nkgzkt7c.js} +1 -1
  55. package/dist/cli/{index-p2tqzwh6.js → index-qs9myayh.js} +5 -10
  56. package/dist/cli/{index-hh7pa3yk.js → index-r9yvpr2m.js} +2 -2
  57. package/dist/cli/{index-cdjxzs2r.js → index-rjzn7hf0.js} +7 -7
  58. package/dist/cli/{index-zfbxfm2m.js → index-s8b67e6h.js} +33 -12
  59. package/dist/cli/{index-bskex45z.js → index-s9cgnd2z.js} +2 -2
  60. package/dist/cli/{index-cj4mp0fm.js → index-sc7t1tev.js} +6 -6
  61. package/dist/cli/{index-3dx0c7ve.js → index-sfjpbnqs.js} +44 -44
  62. package/dist/cli/{index-16m2m4ah.js → index-spgfs5y7.js} +1 -1
  63. package/dist/cli/{index-q9kefh33.js → index-sxj143a4.js} +1 -1
  64. package/dist/cli/{index-zsrtt42s.js → index-v3bmwmqw.js} +25 -1
  65. package/dist/cli/{index-5v09zw1q.js → index-v3j9fk16.js} +18 -8
  66. package/dist/cli/{index-2btybj8w.js → index-xdq6mak1.js} +4 -4
  67. package/dist/cli/{index-k8sarme1.js → index-y9v41185.js} +1 -1
  68. package/dist/cli/{index-4a7j5f60.js → index-yy5yyyst.js} +4 -4
  69. package/dist/cli/{index-1xa8wq76.js → index-z3ahy9c2.js} +2 -2
  70. package/dist/cli/{index-wrdktgpy.js → index-zk6ttjkt.js} +2 -2
  71. package/dist/cli/index.js +45 -45
  72. package/dist/cli/{knowledge-escalator-v3c8w86g.js → knowledge-escalator-hdrqt5pj.js} +15 -15
  73. package/dist/cli/{knowledge-events-kagaccj9.js → knowledge-events-ttebc8gn.js} +13 -13
  74. package/dist/cli/{knowledge-link-h4pdcnya.js → knowledge-link-6hw3z6wn.js} +5 -5
  75. package/dist/cli/{knowledge-store-ywxjk5pb.js → knowledge-store-8cxv6w2n.js} +6 -6
  76. package/dist/cli/{knowledge-validator-210gkpec.js → knowledge-validator-kr5xmqpa.js} +8 -8
  77. package/dist/cli/{mcp-58hgx6av.js → mcp-jtk79ygp.js} +1 -1
  78. package/dist/cli/{model-preflight-e69b48n0.js → model-preflight-d6tt7479.js} +44 -44
  79. package/dist/cli/{pending-delegations-g24d3qa9.js → pending-delegations-ttk09f50.js} +12 -12
  80. package/dist/cli/{pr-subscriptions-qprh2zsm.js → pr-subscriptions-2kbeezsr.js} +12 -12
  81. package/dist/cli/{pr-workflow-gate-pj7dhkv4.js → pr-workflow-gate-3ra6p7k4.js} +44 -44
  82. package/dist/cli/{runner-4hfmp1ag.js → runner-ssnsje35.js} +6 -6
  83. package/dist/cli/{scan-cursor-s5wsxxd1.js → scan-cursor-zzccy117.js} +7 -7
  84. package/dist/cli/{schema-smgngq9m.js → schema-9prswg1x.js} +14 -2
  85. package/dist/cli/{scope-persistence-tbv2ar4w.js → scope-persistence-eqm8vwnx.js} +16 -16
  86. package/dist/cli/{server-7p2ds5w2.js → server-swjre81h.js} +45 -45
  87. package/dist/cli/{skill-generator-r4hsne71.js → skill-generator-d8dk9vps.js} +17 -17
  88. package/dist/cli/{snapshot-coordination-init-ydjwh56d.js → snapshot-coordination-init-f49y0zr0.js} +44 -44
  89. package/dist/cli/{speckit-checkoff-aj75vmjq.js → speckit-checkoff-pnb6q9gd.js} +5 -5
  90. package/dist/cli/{telemetry-kvhe94gs.js → telemetry-9szfdfqv.js} +1 -1
  91. package/dist/cli/{workspace-snapshot-30kdf018.js → workspace-snapshot-9f12p1s1.js} +3 -3
  92. package/dist/cli/{worktree-collision-ownership-0bxj9f0t.js → worktree-collision-ownership-3c7xyc4p.js} +14 -14
  93. package/dist/cli/{worktree-isolation-h0c22pm2.js → worktree-isolation-jggdf28m.js} +46 -44
  94. package/dist/commands/coupling.d.ts +21 -4
  95. package/dist/commands/epic-learning.d.ts +28 -0
  96. package/dist/commands/epic.d.ts +81 -36
  97. package/dist/commands/registry.d.ts +8 -8
  98. package/dist/commands/turbo.d.ts +16 -1
  99. package/dist/config/constants.d.ts +11 -1
  100. package/dist/config/loader.d.ts +2 -0
  101. package/dist/config/schema.d.ts +291 -77
  102. package/dist/db/coordination-store.d.ts +6 -0
  103. package/dist/epic/close.d.ts +209 -0
  104. package/dist/{turbo/epic → epic}/cochange-conflict.d.ts +5 -4
  105. package/dist/{turbo/epic → epic}/cochange-source.d.ts +10 -1
  106. package/dist/epic/components.d.ts +238 -0
  107. package/dist/epic/config-gate.d.ts +25 -0
  108. package/dist/epic/config.d.ts +101 -0
  109. package/dist/{turbo/epic → epic}/coupling-report.d.ts +3 -1
  110. package/dist/epic/declared-scopes.d.ts +37 -0
  111. package/dist/epic/epic-branch.d.ts +157 -0
  112. package/dist/epic/gate-policy.d.ts +114 -0
  113. package/dist/epic/git-once.d.ts +26 -0
  114. package/dist/epic/learning-store.d.ts +176 -0
  115. package/dist/epic/learning.d.ts +198 -0
  116. package/dist/epic/legacy-migration.d.ts +26 -0
  117. package/dist/epic/lifecycle.d.ts +437 -0
  118. package/dist/epic/markers.d.ts +123 -0
  119. package/dist/epic/merge-epoch.d.ts +90 -0
  120. package/dist/epic/next-wave-format.d.ts +101 -0
  121. package/dist/epic/next-wave.d.ts +102 -0
  122. package/dist/epic/phase-readiness.d.ts +221 -0
  123. package/dist/epic/plan-key.d.ts +104 -0
  124. package/dist/epic/plan-shaping-seam.d.ts +112 -0
  125. package/dist/epic/planning-signals.d.ts +38 -0
  126. package/dist/epic/report.d.ts +152 -0
  127. package/dist/epic/residue-commit.d.ts +151 -0
  128. package/dist/epic/scorecard.d.ts +130 -0
  129. package/dist/epic/shaping-sizing.d.ts +108 -0
  130. package/dist/epic/shaping-suggestions.d.ts +172 -0
  131. package/dist/epic/shaping.d.ts +112 -0
  132. package/dist/epic/sizing.d.ts +60 -0
  133. package/dist/epic/start.d.ts +187 -0
  134. package/dist/epic/task-landing.d.ts +83 -0
  135. package/dist/epic/wave-close.d.ts +112 -0
  136. package/dist/epic/wave-select.d.ts +95 -0
  137. package/dist/evaluation/contracts.d.ts +1 -1
  138. package/dist/evaluation/public-api.d.ts +1 -1
  139. package/dist/full-auto/policy.d.ts +12 -1
  140. package/dist/hooks/delegation-gate/worktree-isolation.d.ts +16 -0
  141. package/dist/hooks/delegation-gate.d.ts +11 -0
  142. package/dist/hooks/guardrails/index.d.ts +7 -0
  143. package/dist/hooks/promotion-evidence-store.d.ts +2 -2
  144. package/dist/index.js +814 -807
  145. package/dist/plan/manager.d.ts +6 -8
  146. package/dist/plan/parallel-verdict.d.ts +13 -2
  147. package/dist/retention/caps.d.ts +1 -1
  148. package/dist/review/contracts.d.ts +8 -1
  149. package/dist/services/config-doctor.d.ts +38 -0
  150. package/dist/session/snapshot-reader.d.ts +2 -0
  151. package/dist/session/snapshot-writer.d.ts +13 -2
  152. package/dist/state.d.ts +13 -18
  153. package/dist/tools/epic-next-wave.d.ts +20 -0
  154. package/dist/tools/epic-phase-review.d.ts +43 -0
  155. package/dist/tools/index.d.ts +2 -3
  156. package/dist/tools/manifest.d.ts +2 -3
  157. package/dist/tools/phase-complete.d.ts +5 -1
  158. package/dist/tools/save-plan.d.ts +7 -0
  159. package/dist/tools/tool-metadata.d.ts +4 -8
  160. package/dist/worktree/merge.d.ts +14 -1
  161. package/opencode-swarm.schema.json +273 -28
  162. package/package.json +1 -1
  163. package/dist/cli/curator-llm-factory-nrn6n2p1.js +0 -82
  164. package/dist/cli/guardrail-explain-9jmr8ezt.js +0 -83
  165. package/dist/tools/epic-plan-waves.d.ts +0 -79
  166. package/dist/tools/epic-record-divergence.d.ts +0 -73
  167. package/dist/tools/epic-run-phase.d.ts +0 -179
  168. package/dist/turbo/epic/activation.d.ts +0 -193
  169. package/dist/turbo/epic/calibration-engine.d.ts +0 -88
  170. package/dist/turbo/epic/calibration.d.ts +0 -80
  171. package/dist/turbo/epic/divergence-recorder.d.ts +0 -123
  172. package/dist/turbo/epic/index.d.ts +0 -24
  173. package/dist/turbo/epic/promotion-evidence.d.ts +0 -42
  174. package/dist/turbo/epic/state.d.ts +0 -69
  175. package/dist/turbo/epic/task-commit.d.ts +0 -110
  176. package/dist/turbo/epic/upstream-commits.d.ts +0 -82
  177. package/dist/turbo/epic/wave-planner.d.ts +0 -83
@@ -3,7 +3,7 @@ import {
3
3
  ALL_AGENT_NAMES,
4
4
  SUMMARIZER_EXEMPT_TOOL_NAMES,
5
5
  init_constants
6
- } from "./index-zfbxfm2m.js";
6
+ } from "./index-s8b67e6h.js";
7
7
  import {
8
8
  OUTCOME_BLOCK_THRESHOLD,
9
9
  init_knowledge_types
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.189.0",
24
+ version: "7.190.1",
25
25
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
26
26
  main: "dist/index.js",
27
27
  types: "dist/index.d.ts",
@@ -363,6 +363,36 @@ function rejectCheckpointPrototypePollution(raw) {
363
363
  }
364
364
  return raw;
365
365
  }
366
+ function retiredEpicKeyReplacement(dotted) {
367
+ const relative = dotted.replace(/^(?:turbo\.)?epic\./, "");
368
+ return Object.hasOwn(RETIRED_EPIC_KEY_REPLACEMENTS, relative) ? RETIRED_EPIC_KEY_REPLACEMENTS[relative] : undefined;
369
+ }
370
+ function stripKeys(keys) {
371
+ return (value) => {
372
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
373
+ return value;
374
+ }
375
+ const record = value;
376
+ if (!keys.some((key) => Object.hasOwn(record, key)))
377
+ return value;
378
+ const stripped = { ...record };
379
+ for (const key of keys)
380
+ delete stripped[key];
381
+ return stripped;
382
+ };
383
+ }
384
+ function findRetiredEpicConfigKeys(raw) {
385
+ const at = (node, key) => node !== null && typeof node === "object" && !Array.isArray(node) && Object.hasOwn(node, key) ? node[key] : undefined;
386
+ const found = [];
387
+ for (const [prefix, epic] of [
388
+ ["epic", at(raw, "epic")],
389
+ ["turbo.epic", at(at(raw, "turbo"), "epic")]
390
+ ]) {
391
+ const mode = at(epic, "mode");
392
+ found.push(...RETIRED_EPIC_MODE_KEYS.filter((key) => at(mode, key) !== undefined).map((key) => `${prefix}.mode.${key}`), ...RETIRED_EPIC_KEYS.filter((key) => at(epic, key) !== undefined).map((key) => `${prefix}.${key}`));
393
+ }
394
+ return found;
395
+ }
366
396
  function resolveExternalSkillsConfig(input) {
367
397
  if (input === undefined || input === null || typeof input !== "object" || Array.isArray(input)) {
368
398
  return { ...DEFAULT_EXTERNAL_SKILLS_CONFIG };
@@ -382,7 +412,7 @@ function resolveExternalSkillsConfig(input) {
382
412
  };
383
413
  return merged;
384
414
  }
385
- var _internals, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX = 3, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_SECTION_SCHEMAS, GateConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GATE_CONFIG_READERS, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, RetentionConfigSchema, ReviewPassesConfigSchema, AUTO_REVIEW_V8_BURN_IN_DECISION, CONSERVATIVE_PRESET_BASE, AutoReviewFinalConfigSchema, AutoReviewConfigObjectSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, GitConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, INVALID_CHECKPOINT_PROTO_FIELD = "__swarm_invalid_checkpoint_proto__", FORBIDDEN_CHECKPOINT_CONFIG_KEYS, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, LearningConfigSchema, ConsensusConfigSchema, OtlpExportConfigSchema, ObservabilityConfigSchema, ForgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationAudienceSchema, SkillPropagationConfigSchema, HarnessRelativePathSchema, HarnessEvolutionConfigSchema, DEFAULT_HARNESS_EVOLUTION_CONFIG, HarnessOptConfigSchema, DEFAULT_HARNESS_OPT_CONFIG, SkillImproverConfigSchema, SkillsConfigSchema, SkillOptConfigSchema, DEFAULT_SKILL_OPT_CONFIG, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, PrFeedbackLoopConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, DEFAULT_PR_REVIEW_RESILIENCE_CONFIG, PrReviewResilienceConfigSchema, ReviewRoutingConfigSchema, DEFAULT_REVIEW_ROUTING_CONFIG, LaneLivenessWatchdogConfigSchema, DispatchProtectionConfigSchema, DashboardConfigSchema, DEFAULT_PR_REVIEW_LEGACY_TRANSCRIPT_COMPATIBILITY = false, PluginConfigSchema;
415
+ var _internals, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX = 3, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_SECTION_SCHEMAS, GateConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GATE_CONFIG_READERS, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, RetentionConfigSchema, ReviewPassesConfigSchema, AUTO_REVIEW_V8_BURN_IN_DECISION, CONSERVATIVE_PRESET_BASE, AutoReviewFinalConfigSchema, AutoReviewConfigObjectSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, GitConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, INVALID_CHECKPOINT_PROTO_FIELD = "__swarm_invalid_checkpoint_proto__", FORBIDDEN_CHECKPOINT_CONFIG_KEYS, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, LearningConfigSchema, ConsensusConfigSchema, OtlpExportConfigSchema, ObservabilityConfigSchema, ForgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationAudienceSchema, SkillPropagationConfigSchema, HarnessRelativePathSchema, HarnessEvolutionConfigSchema, DEFAULT_HARNESS_EVOLUTION_CONFIG, HarnessOptConfigSchema, DEFAULT_HARNESS_OPT_CONFIG, SkillImproverConfigSchema, SkillsConfigSchema, SkillOptConfigSchema, DEFAULT_SKILL_OPT_CONFIG, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, PrFeedbackLoopConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, RETIRED_EPIC_MODE_KEYS, RETIRED_EPIC_KEYS, RETIRED_EPIC_KEY_REPLACEMENTS, stripRetiredEpicModeKeys, stripRetiredEpicKeys, EpicConfigSchema, LegacyTurboEpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, DEFAULT_PR_REVIEW_RESILIENCE_CONFIG, PrReviewResilienceConfigSchema, ReviewRoutingConfigSchema, DEFAULT_REVIEW_ROUTING_CONFIG, LaneLivenessWatchdogConfigSchema, DispatchProtectionConfigSchema, DashboardConfigSchema, DEFAULT_PR_REVIEW_LEGACY_TRANSCRIPT_COMPATIBILITY = false, PluginConfigSchema;
386
416
  var init_schema = __esm(() => {
387
417
  init_zod();
388
418
  init_package();
@@ -1612,34 +1642,64 @@ var init_schema = __esm(() => {
1612
1642
  cache_redirects: exports_external.record(exports_external.string(), exports_external.string()).optional()
1613
1643
  }).optional()
1614
1644
  });
1615
- EpicConfigSchema = exports_external.object({
1645
+ RETIRED_EPIC_MODE_KEYS = [
1646
+ "min_commits_for_signal"
1647
+ ];
1648
+ RETIRED_EPIC_KEYS = ["calibration"];
1649
+ RETIRED_EPIC_KEY_REPLACEMENTS = {
1650
+ calibration: "Epic learning replaced it \u2014 see epic.learning.* (enabled, decay_per_epic, half_life_days, hot_excess)."
1651
+ };
1652
+ stripRetiredEpicModeKeys = stripKeys(RETIRED_EPIC_MODE_KEYS);
1653
+ stripRetiredEpicKeys = stripKeys(RETIRED_EPIC_KEYS);
1654
+ EpicConfigSchema = exports_external.preprocess(stripRetiredEpicKeys, exports_external.object({
1616
1655
  cochange: exports_external.object({
1617
1656
  enabled: exports_external.boolean().default(false),
1618
1657
  threshold: exports_external.number().min(-1).max(1).default(0.6),
1619
1658
  min_co_changes: exports_external.number().int().min(1).default(5)
1620
1659
  }).strict().optional(),
1621
- mode: exports_external.object({
1660
+ mode: exports_external.preprocess(stripRetiredEpicModeKeys, exports_external.object({
1622
1661
  enabled: exports_external.boolean().default(false),
1623
1662
  activation_threshold: exports_external.number().min(0).max(1).default(0.3),
1624
- min_commits_for_signal: exports_external.number().int().min(1).default(20)
1625
- }).strict().optional(),
1626
- calibration: exports_external.object({
1663
+ min_commits_for_signal: exports_external.number().optional().meta({
1664
+ deprecated: true,
1665
+ description: "Retired (Epic v2): accepted and ignored with a warning. Remove it."
1666
+ })
1667
+ }).strict()).optional(),
1668
+ calibration: exports_external.record(exports_external.string(), exports_external.unknown()).optional().meta({
1669
+ deprecated: true,
1670
+ description: "Retired (Epic v2): accepted and ignored with a warning \u2014 Epic learning replaced it (epic.learning). Remove it."
1671
+ }),
1672
+ learning: exports_external.object({
1627
1673
  enabled: exports_external.boolean().default(true),
1628
- floor_threshold: exports_external.number().min(0).max(1).default(0.05),
1629
- tighten_step: exports_external.number().min(0).max(1).default(0.02),
1630
- loosen_step: exports_external.number().min(0).max(1).default(0.01),
1631
- loosen_window: exports_external.number().int().min(1).default(10)
1674
+ decay_per_epic: exports_external.number().min(0).max(1).default(0.7),
1675
+ half_life_days: exports_external.number().positive().default(60),
1676
+ hot_excess: exports_external.number().min(0).max(1).default(0.25)
1677
+ }).strict().optional(),
1678
+ sizing: exports_external.object({
1679
+ min_tasks: exports_external.number().int().min(1).default(6),
1680
+ min_scope_coverage: exports_external.number().min(0).max(1).default(0.8),
1681
+ min_effective_speedup: exports_external.number().min(1).default(1.25),
1682
+ coder_fraction: exports_external.number().min(0).max(1).default(0.6)
1683
+ }).strict().optional(),
1684
+ commit_policy: exports_external.enum(["epic-branch", "current-branch"]).optional(),
1685
+ retain_refs: exports_external.boolean().optional(),
1686
+ phase_review: exports_external.object({
1687
+ timeout_ms: exports_external.number().int().min(1e4).max(1800000).default(300000)
1632
1688
  }).strict().optional()
1633
- }).strict();
1689
+ }).strict());
1690
+ LegacyTurboEpicConfigSchema = EpicConfigSchema.optional().meta({
1691
+ deprecated: true,
1692
+ description: "Deprecated (still accepted): move this block to top-level `epic` \u2014 Epic Mode no longer needs a `turbo` block. Within a file, top-level `epic` wins per key when both are set."
1693
+ });
1634
1694
  StandardTurboConfigSchema = exports_external.object({
1635
1695
  strategy: exports_external.literal("standard"),
1636
1696
  lean: LeanTurboConfigSchema.optional(),
1637
- epic: EpicConfigSchema.optional()
1697
+ epic: LegacyTurboEpicConfigSchema
1638
1698
  });
1639
1699
  LeanTurboStrategyConfigSchema = exports_external.object({
1640
1700
  strategy: exports_external.literal("lean"),
1641
1701
  lean: LeanTurboConfigSchema,
1642
- epic: EpicConfigSchema.optional()
1702
+ epic: LegacyTurboEpicConfigSchema
1643
1703
  });
1644
1704
  TurboConfigSchema = exports_external.discriminatedUnion("strategy", [
1645
1705
  StandardTurboConfigSchema,
@@ -1871,6 +1931,7 @@ var init_schema = __esm(() => {
1871
1931
  parallelization: ParallelizationConfigSchema.optional().describe("Parallelization (PR 1 dark foundation) \u2014 disabled by default; no production code path branches on enabled=true yet."),
1872
1932
  worktree: WorktreeIsolationConfigSchema.optional().describe("Worktree isolation policy for parallel coder dispatch lanes (general surface; Lean Turbo keeps its legacy per-mode fields)."),
1873
1933
  turbo: TurboConfigSchema.optional().describe("Turbo execution strategy block (Phase 1). Absent means current behavior unchanged."),
1934
+ epic: EpicConfigSchema.optional().describe("Epic Mode block: one plan = one epic delivered in conflict-free parallel waves. Opt in with `mode.enabled: true`, then `/swarm epic start`. Needs no `turbo` block (legacy `turbo.epic` is still accepted and migrated here)."),
1874
1935
  turbo_mode: exports_external.boolean().default(false).optional().describe("Bypass reviewer/test gates for rapid iteration (v6.40). When true, new sessions start with turbo mode on (session default); /swarm turbo still toggles per session. Directory-less constructions default off."),
1875
1936
  quiet: exports_external.boolean().default(true).optional().describe("Suppress non-critical startup warnings (default true keeps the TUI clean). Set false to restore verbose warnings for debugging."),
1876
1937
  version_check: exports_external.boolean().default(true).optional().describe("Background staleness check against npm, throttled to once per 24h (issue #675). Set false to fully disable the network call."),
@@ -2042,4 +2103,4 @@ var init_schema = __esm(() => {
2042
2103
  });
2043
2104
  });
2044
2105
 
2045
- export { init_package, package_default, DEFAULT_MODEL_CONTEXT_TOKENS, isUsableConfiguredWindow, isUsableContextWindow, resolveContextWindow, init_context_window, _internals, isKnownCanonicalRole, getCanonicalAgentRole, resolveGeneratedAgentRole, stripKnownSwarmPrefix, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_SECTION_SCHEMAS, GateConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GATE_CONFIG_READERS, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, RetentionConfigSchema, ReviewPassesConfigSchema, AUTO_REVIEW_V8_BURN_IN_DECISION, CONSERVATIVE_PRESET_BASE, AutoReviewConfigSchema, resolveAutoReviewConfig, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, GitConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, resolveGuardrailsConfig, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, KnowledgeConfigSchema, LearningConfigSchema, ConsensusConfigSchema, OtlpExportConfigSchema, ObservabilityConfigSchema, ForgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, HarnessEvolutionConfigSchema, DEFAULT_HARNESS_EVOLUTION_CONFIG, HarnessOptConfigSchema, DEFAULT_HARNESS_OPT_CONFIG, SkillImproverConfigSchema, SkillsConfigSchema, SkillOptConfigSchema, DEFAULT_SKILL_OPT_CONFIG, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, PrFeedbackLoopConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, resolveExternalSkillsConfig, DEFAULT_PR_REVIEW_RESILIENCE_CONFIG, PrReviewResilienceConfigSchema, ReviewRoutingConfigSchema, DEFAULT_REVIEW_ROUTING_CONFIG, LaneLivenessWatchdogConfigSchema, DispatchProtectionConfigSchema, DashboardConfigSchema, DEFAULT_PR_REVIEW_LEGACY_TRANSCRIPT_COMPATIBILITY, PluginConfigSchema, init_schema };
2106
+ export { init_package, package_default, DEFAULT_MODEL_CONTEXT_TOKENS, isUsableConfiguredWindow, isUsableContextWindow, resolveContextWindow, init_context_window, _internals, isKnownCanonicalRole, getCanonicalAgentRole, resolveGeneratedAgentRole, stripKnownSwarmPrefix, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_SECTION_SCHEMAS, GateConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GATE_CONFIG_READERS, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, RetentionConfigSchema, ReviewPassesConfigSchema, AUTO_REVIEW_V8_BURN_IN_DECISION, CONSERVATIVE_PRESET_BASE, AutoReviewConfigSchema, resolveAutoReviewConfig, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, GitConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, resolveGuardrailsConfig, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, KnowledgeConfigSchema, LearningConfigSchema, ConsensusConfigSchema, OtlpExportConfigSchema, ObservabilityConfigSchema, ForgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, HarnessEvolutionConfigSchema, DEFAULT_HARNESS_EVOLUTION_CONFIG, HarnessOptConfigSchema, DEFAULT_HARNESS_OPT_CONFIG, SkillImproverConfigSchema, SkillsConfigSchema, SkillOptConfigSchema, DEFAULT_SKILL_OPT_CONFIG, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, PrFeedbackLoopConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, RETIRED_EPIC_MODE_KEYS, RETIRED_EPIC_KEYS, RETIRED_EPIC_KEY_REPLACEMENTS, retiredEpicKeyReplacement, findRetiredEpicConfigKeys, EpicConfigSchema, LegacyTurboEpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, resolveExternalSkillsConfig, DEFAULT_PR_REVIEW_RESILIENCE_CONFIG, PrReviewResilienceConfigSchema, ReviewRoutingConfigSchema, DEFAULT_REVIEW_ROUTING_CONFIG, LaneLivenessWatchdogConfigSchema, DispatchProtectionConfigSchema, DashboardConfigSchema, DEFAULT_PR_REVIEW_LEGACY_TRANSCRIPT_COMPATIBILITY, PluginConfigSchema, init_schema };
@@ -3,7 +3,7 @@ import {
3
3
  EvaluationRunV1Schema,
4
4
  GateAuditResultV1Schema,
5
5
  getProtectedEvaluationRunIds
6
- } from "./index-8xabhfwr.js";
6
+ } from "./index-b2j231jy.js";
7
7
  import {
8
8
  TASK_WORKFLOW_SCHEMA_MARKER,
9
9
  deriveApplicableGateSet,
@@ -12,11 +12,11 @@ import {
12
12
  readTaskEvidence,
13
13
  readTaskEvidenceRaw,
14
14
  sanitizeTaskId
15
- } from "./index-5v09zw1q.js";
15
+ } from "./index-v3j9fk16.js";
16
16
  import {
17
17
  readSwarmFileAsync,
18
18
  validateSwarmPath
19
- } from "./index-7hr5m7yp.js";
19
+ } from "./index-nkgzkt7c.js";
20
20
  import {
21
21
  bunWrite
22
22
  } from "./index-2s7dvzff.js";
@@ -27,13 +27,13 @@ import {
27
27
  } from "./index-pkhbd2t5.js";
28
28
  import {
29
29
  withEvidenceLock
30
- } from "./index-twb3f4tk.js";
30
+ } from "./index-8bx6vhzk.js";
31
31
  import {
32
32
  assertProjectRoot
33
33
  } from "./index-t7hmqgjy.js";
34
34
  import {
35
35
  invalidateCachedArtifact
36
- } from "./index-p2tqzwh6.js";
36
+ } from "./index-qs9myayh.js";
37
37
  import {
38
38
  ZodError,
39
39
  init_zod
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-7hr5m7yp.js";
4
+ } from "./index-nkgzkt7c.js";
5
5
  import {
6
6
  bunSpawn
7
7
  } from "./index-2s7dvzff.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./index-fzpt2djt.js";
12
12
  import {
13
13
  atomicWriteSwarmFile
14
- } from "./index-p2tqzwh6.js";
14
+ } from "./index-qs9myayh.js";
15
15
  import {
16
16
  init_git_executable,
17
17
  resolveGitExecutable
@@ -1,13 +1,10 @@
1
1
  // @bun
2
2
  import {
3
- MAX_TRANSIENT_RETRIES,
4
3
  buildTaskCompletionDescriptor,
5
4
  ensureTaskCheckpointReceipt,
6
- isTransientSpawnError,
7
5
  loadPlan,
8
- transientBackoff,
9
6
  updateTaskCheckpointReceipt
10
- } from "./index-skdpgjar.js";
7
+ } from "./index-cewpxcwm.js";
11
8
  import {
12
9
  tool
13
10
  } from "./index-9nyqt3kb.js";
@@ -20,13 +17,13 @@ import {
20
17
  } from "./index-g4fs6z4e.js";
21
18
  import {
22
19
  validateSwarmPath
23
- } from "./index-7hr5m7yp.js";
20
+ } from "./index-nkgzkt7c.js";
24
21
  import {
25
22
  readLedgerEvents
26
- } from "./index-bzbxn24k.js";
23
+ } from "./index-dbdkh7pq.js";
27
24
  import {
28
25
  appendCoreEventSync
29
- } from "./index-wrdktgpy.js";
26
+ } from "./index-zk6ttjkt.js";
30
27
  import {
31
28
  derivePlanId,
32
29
  derivePlanIdentityHash
@@ -41,10 +38,10 @@ import {
41
38
  } from "./index-ejhxgyvm.js";
42
39
  import {
43
40
  atomicWriteSwarmFileSync
44
- } from "./index-p2tqzwh6.js";
41
+ } from "./index-qs9myayh.js";
45
42
  import {
46
43
  loadPluginConfigWithMeta
47
- } from "./index-waxvpwbv.js";
44
+ } from "./index-efztf4yw.js";
48
45
  import {
49
46
  init_git_executable,
50
47
  resolveGitExecutable
@@ -550,6 +547,25 @@ function measureGitDestruction(directory, targetSha) {
550
547
  // src/tools/checkpoint.ts
551
548
  init_git_executable();
552
549
 
550
+ // src/utils/transient-retry.ts
551
+ var MAX_TRANSIENT_RETRIES = 5;
552
+ var RETRY_BASE_DELAY_MS = 200;
553
+ function isTransientSpawnError(error) {
554
+ if (!error || typeof error !== "object")
555
+ return false;
556
+ const code = error.code;
557
+ return code === "ETIMEDOUT";
558
+ }
559
+ function transientBackoff(attempt) {
560
+ const delay = RETRY_BASE_DELAY_MS * 2 ** attempt;
561
+ try {
562
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, delay);
563
+ } catch {
564
+ const start = Date.now();
565
+ while (Date.now() - start < delay) {}
566
+ }
567
+ }
568
+
553
569
  // src/tools/create-tool.ts
554
570
  init_zod();
555
571
 
@@ -1515,4 +1531,4 @@ var checkpoint = createSwarmTool({
1515
1531
  }
1516
1532
  });
1517
1533
 
1518
- export { GIT_STATUS_ARGS, parseTrackedDirtyPaths, recheckBeforeDestructive, previewDestructivePurge, issueConfirmToken, consumeConfirmToken, executeDestructivePurge, backupSwarmStateBeforeReset, ROLLBACK_GIT_KIND, ROLLBACK_PHASE_KIND, trackedDirtyCandidates, swarmOverwriteCandidates, measureGitDestruction, resolveWorkingDirectory, createSwarmTool, _internals2 as _internals, saveCheckpointRecord, checkpoint };
1534
+ export { MAX_TRANSIENT_RETRIES, isTransientSpawnError, transientBackoff, GIT_STATUS_ARGS, parseTrackedDirtyPaths, recheckBeforeDestructive, previewDestructivePurge, issueConfirmToken, consumeConfirmToken, executeDestructivePurge, backupSwarmStateBeforeReset, ROLLBACK_GIT_KIND, ROLLBACK_PHASE_KIND, trackedDirtyCandidates, swarmOverwriteCandidates, measureGitDestruction, resolveWorkingDirectory, createSwarmTool, _internals2 as _internals, saveCheckpointRecord, checkpoint };
@@ -4,7 +4,7 @@ import {
4
4
  getProjectDb,
5
5
  projectDbExists,
6
6
  withImmediateTransaction
7
- } from "./index-9tvjwv01.js";
7
+ } from "./index-2fpv2wmc.js";
8
8
  import {
9
9
  derivePlanId,
10
10
  derivePlanIdentityHash
@@ -1,27 +1,27 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-7hr5m7yp.js";
4
+ } from "./index-nkgzkt7c.js";
5
5
  import {
6
6
  deleteCoordinationState,
7
7
  importCoordinationOnce,
8
8
  listCoordinationStates,
9
9
  transitionCoordinationState,
10
10
  withCoordinationTransaction
11
- } from "./index-ntda6tje.js";
11
+ } from "./index-feaxsjrt.js";
12
12
  import {
13
13
  getProjectDb,
14
14
  projectDbExists
15
- } from "./index-9tvjwv01.js";
15
+ } from "./index-2fpv2wmc.js";
16
16
  import {
17
17
  observeStoreHealth
18
- } from "./index-1xa8wq76.js";
18
+ } from "./index-z3ahy9c2.js";
19
19
  import {
20
20
  withEvidenceLock
21
- } from "./index-twb3f4tk.js";
21
+ } from "./index-8bx6vhzk.js";
22
22
  import {
23
23
  telemetry
24
- } from "./index-d3rjvm9e.js";
24
+ } from "./index-7vnr5cmp.js";
25
25
  import {
26
26
  canonicalRootKey,
27
27
  canonicalRootKeyFresh,
@@ -29,7 +29,7 @@ import {
29
29
  } from "./index-fzpt2djt.js";
30
30
  import {
31
31
  atomicWriteSwarmFileSync
32
- } from "./index-p2tqzwh6.js";
32
+ } from "./index-qs9myayh.js";
33
33
  import {
34
34
  exports_external,
35
35
  init_zod
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-7hr5m7yp.js";
4
+ } from "./index-nkgzkt7c.js";
5
5
  import {
6
6
  atomicWriteSwarmFileSync
7
- } from "./index-p2tqzwh6.js";
7
+ } from "./index-qs9myayh.js";
8
8
 
9
9
  // src/hooks/delegation-gate/worktree-provisioning-owner.ts
10
10
  import { createHash } from "crypto";
@@ -10,7 +10,7 @@ import {
10
10
  readCachedTextFile,
11
11
  wasObservedToExist,
12
12
  wasRecentlyWrittenByThisProcess
13
- } from "./index-p2tqzwh6.js";
13
+ } from "./index-qs9myayh.js";
14
14
  import {
15
15
  warn
16
16
  } from "./index-zgwm4ryv.js";
@@ -229,9 +229,9 @@ var SWARM_TEMP_GRAMMARS = [
229
229
  "src/evidence/task-file.ts (pre-#2035; migrated-to=src/evidence/task-file.ts:atomicWriteFile)",
230
230
  "src/scope/scope-persistence.ts (pre-#2035; migrated-to=src/scope/scope-persistence.ts:atomicWrite)",
231
231
  "src/scope/scope-persistence.ts (pre-#2035; migrated-to=src/scope/scope-persistence.ts:atomicWriteSync)",
232
- "src/plan/manager.ts:695",
233
- "src/plan/manager.ts:2122",
234
- "src/plan/manager.ts:2182",
232
+ "src/plan/manager.ts:688",
233
+ "src/plan/manager.ts:2115",
234
+ "src/plan/manager.ts:2175",
235
235
  "src/review/evidence.ts:179",
236
236
  "src/turbo/lean/evidence.ts:182",
237
237
  "src/summaries/manager.ts:163",
@@ -251,7 +251,6 @@ var SWARM_TEMP_GRAMMARS = [
251
251
  "src/services/synonym-map.ts:389",
252
252
  "src/services/skill-optimizer/store.ts:340",
253
253
  "src/services/skill-optimizer/store.ts:503",
254
- "src/turbo/epic/calibration.ts:234",
255
254
  "src/commands/archive-sqlite.ts:318",
256
255
  "src/memory/jsonl-migration.ts:161"
257
256
  ],
@@ -291,8 +290,7 @@ var SWARM_TEMP_GRAMMARS = [
291
290
  "src/tools/submit-phase-council-verdicts.ts:458",
292
291
  "src/summaries/store.ts (pre-#2035; migrated-to=src/summaries/store.ts:writeRawSidecar)",
293
292
  "src/retention/jsonl-cap.ts:213",
294
- "src/services/skill-changelog.ts:58",
295
- "src/turbo/epic/divergence-recorder.ts:108"
293
+ "src/services/skill-changelog.ts:58"
296
294
  ],
297
295
  note: "background lane/delegation stores keep bounded-retry rename semantics wired into their callers (#2034/#2276 delivery contracts); migration candidates for a follow-up but grammars registered"
298
296
  },
@@ -361,7 +359,7 @@ var SWARM_TEMP_GRAMMARS = [
361
359
  token: "instance",
362
360
  quarantineEligible: true,
363
361
  parsesTarget: true,
364
- producers: ["src/plan/manager.ts:2381", "src/plan/manager.ts:2443"],
362
+ producers: ["src/plan/manager.ts:2374", "src/plan/manager.ts:2436"],
365
363
  note: "plan-durability (invariant 5) fd-write paths; grammars registered, writers unchanged in this PR"
366
364
  },
367
365
  {
@@ -464,7 +462,6 @@ var WRITER_CLASSIFICATION = Object.freeze({
464
462
  "src/observability/otlp-exporter.ts": "registered-bespoke",
465
463
  "src/retention/jsonl-cap.ts": "registered-bespoke",
466
464
  "src/services/skill-changelog.ts": "registered-bespoke",
467
- "src/turbo/epic/divergence-recorder.ts": "registered-bespoke",
468
465
  "src/background/delegation-health.ts": "registered-bespoke",
469
466
  "src/background/lane-output-store.ts": "registered-bespoke",
470
467
  "src/background/pending-delegations.ts": "registered-bespoke",
@@ -503,8 +500,6 @@ var WRITER_CLASSIFICATION = Object.freeze({
503
500
  "src/session/snapshot-writer.ts": "registered-bespoke",
504
501
  "src/summaries/manager.ts": "registered-bespoke",
505
502
  "src/test-impact/history-store.ts": "registered-bespoke",
506
- "src/turbo/epic/calibration.ts": "registered-bespoke",
507
- "src/turbo/epic/state.ts": "registered-bespoke",
508
503
  "src/turbo/lean/evidence.ts": "registered-bespoke",
509
504
  "src/turbo/lean/integration.ts": "registered-bespoke",
510
505
  "src/turbo/lean/recovery.ts": "registered-bespoke",
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  withEvidenceLock
4
- } from "./index-twb3f4tk.js";
4
+ } from "./index-8bx6vhzk.js";
5
5
  import {
6
6
  atomicWriteFileAnyRoot
7
- } from "./index-p2tqzwh6.js";
7
+ } from "./index-qs9myayh.js";
8
8
 
9
9
  // src/evidence/task-file.ts
10
10
  import * as path from "path";
@@ -11,16 +11,16 @@ import {
11
11
  } from "./index-ae75rja9.js";
12
12
  import {
13
13
  resolveKnowledgeStoreDir
14
- } from "./index-8q8783g0.js";
14
+ } from "./index-3zwhxk98.js";
15
15
  import {
16
16
  atomicWriteFile
17
- } from "./index-hh7pa3yk.js";
17
+ } from "./index-r9yvpr2m.js";
18
18
  import {
19
19
  require_proper_lockfile
20
20
  } from "./index-7g4c7s5r.js";
21
21
  import {
22
22
  readCachedParsedFile
23
- } from "./index-p2tqzwh6.js";
23
+ } from "./index-qs9myayh.js";
24
24
  import {
25
25
  init_knowledge_types,
26
26
  isActiveStatus
@@ -739,7 +739,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
739
739
  const {
740
740
  readAuthoritativeKnowledgeCounterRollups,
741
741
  effectiveRetrievalOutcomes
742
- } = await import("./knowledge-events-kagaccj9.js");
742
+ } = await import("./knowledge-events-ttebc8gn.js");
743
743
  const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
744
744
  const flagIds = new Set;
745
745
  for (const e of atFloor) {
@@ -806,11 +806,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
806
806
  });
807
807
  }
808
808
  if (action === "quarantine" && toQuarantine.length > 0) {
809
- const { quarantineEntry } = await import("./knowledge-validator-210gkpec.js");
810
- const { KnowledgeConfigSchema } = await import("./schema-smgngq9m.js");
809
+ const { quarantineEntry } = await import("./knowledge-validator-kr5xmqpa.js");
810
+ const { KnowledgeConfigSchema } = await import("./schema-9prswg1x.js");
811
811
  let config;
812
812
  try {
813
- const { loadPluginConfigWithMeta } = await import("./index-4a7j5f60.js");
813
+ const { loadPluginConfigWithMeta } = await import("./index-yy5yyyst.js");
814
814
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
815
815
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
816
816
  } catch {
@@ -932,17 +932,13 @@ var init_tool_metadata = __esm(() => {
932
932
  description: "Revoke a previously promoted external skill. Returns a disabled message when external_skills.curation_enabled is false.",
933
933
  agents: []
934
934
  },
935
- epic_decide_phase: {
936
- description: "Compute the Epic Mode verdict for a phase WITHOUT dispatching coders. Runs preflight + calibration + the three gates (p-threshold, hot-module, greenfield), persists the decision, and returns the verdict so the architect can dispatch waves via the visible Task tool (promote) or fall back to per-task serial (demote). Pair with `epic_plan_waves` to get the wave plan when promoted. Use when /swarm epic is on for the session.",
937
- agents: ["architect"]
938
- },
939
- epic_plan_waves: {
940
- description: "Partition a phase's pending tasks into ordered concurrent waves for Epic Mode dispatch. " + "A wave is a set of tasks with mutually disjoint declared scopes and all dependencies satisfied by prior waves. " + "Returns `{ waves: [{ waveId, taskIds, files }, ...], serializedTasks, degradedTasks }`. " + 'For each wave in order, the architect dispatches one `Task(subagent_type="coder", ...)` per `taskId` \u2014 all in one assistant message \u2014 so the wave runs concurrently and each coder appears as a visible subagent. ' + "Wait for the wave to finish before dispatching the next. " + "Pair with `epic_decide_phase` (called first; this tool is only relevant on a `promote` verdict). " + "Preflight reject reasons: `no-plan`, `no-phase`, `phase-empty`, `phase-already-complete`, `scopes-missing` (call `declare_scope` for `missingScopes`), `git-failed` (transient \u2014 retry), `planner-error`.",
941
- agents: ["architect"]
935
+ epic_next_wave: {
936
+ description: "Epic Mode: the single, idempotent way forward while an epic is open. Closes the active wave once every task is resolved (recording per-task outcomes and declared-vs-actual divergence, which Epic learning uses to plan later waves), keeps phases in order, and issues the next wave of disjoint tasks with dispatch instructions. Returns a status: dispatch | declare-scopes | in-progress | blocked | phase-ready-for-review | epic-complete | refused. Requires `epic.mode.enabled: true` and an epic opened by `/swarm epic start`.",
937
+ agents: []
942
938
  },
943
- epic_record_divergence: {
944
- description: "After every `update_task_status(completed)`, record the task's declared-vs-actual divergence to .swarm/epic/divergence.jsonl. Feeds Epic Mode's self-calibration loop (Capability D). Best-effort: never blocks.",
945
- agents: ["architect"]
939
+ epic_phase_review: {
940
+ description: "Epic Mode phase readiness: dispatch a read-only phase reviewer, then (only if it APPROVES) a read-only phase critic over the completed phase; parse both verdicts from the agents and record them to .swarm/evidence/{phase}/epic-phase-review.json. Required by phase_complete while an epic is open for the current plan; re-run after any fix (evidence is bound to the plan and phase task evidence).",
941
+ agents: []
946
942
  }
947
943
  };
948
944
  TOOL_NAMES = Object.keys(TOOL_METADATA);
@@ -1002,7 +998,7 @@ function isQAAgent(name) {
1002
998
  function isSubagent(name) {
1003
999
  return ALL_SUBAGENT_NAMES.includes(name);
1004
1000
  }
1005
- var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, OPENCODE_NATIVE_COMMANDS, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_TOOL_NAMES, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_TOOL_NAMES, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_TOOL_NAMES, TURBO_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, PR_REVIEW_CHILD_TOOL_NAMES, PR_REVIEW_CHILD_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, SWARM_WORKTREE_DIR_NAME = ".swarm-worktrees", DEFAULT_WORKTREE_ISOLATION_CONFIG;
1001
+ var OPENCODE_NATIVE_AGENTS, CLAUDE_CODE_NATIVE_COMMANDS, OPENCODE_NATIVE_COMMANDS, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_TOOL_NAMES, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_TOOL_NAMES, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_TOOL_NAMES, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_TOOL_NAMES, TURBO_AGENT_TOOL_MAP, EPIC_TOOL_NAMES, EPIC_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, PR_REVIEW_CHILD_TOOL_NAMES, PR_REVIEW_CHILD_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, DEFAULT_LEAN_TURBO_CONFIG, SWARM_WORKTREE_DIR_NAME = ".swarm-worktrees", DEFAULT_WORKTREE_ISOLATION_CONFIG;
1006
1002
  var init_constants = __esm(() => {
1007
1003
  init_agent_names();
1008
1004
  init_tool_metadata();
@@ -1222,6 +1218,13 @@ var init_constants = __esm(() => {
1222
1218
  TURBO_AGENT_TOOL_MAP = {
1223
1219
  architect: [...TURBO_TOOL_NAMES]
1224
1220
  };
1221
+ EPIC_TOOL_NAMES = [
1222
+ "epic_next_wave",
1223
+ "epic_phase_review"
1224
+ ];
1225
+ EPIC_AGENT_TOOL_MAP = {
1226
+ architect: [...EPIC_TOOL_NAMES]
1227
+ };
1225
1228
  SKILL_TOOL_NAMES = [
1226
1229
  "skill_generate",
1227
1230
  "skill_list",
@@ -1378,6 +1381,24 @@ var init_constants = __esm(() => {
1378
1381
  fallback_models: ["opencode/mimo-v2.6-flash-free"]
1379
1382
  }
1380
1383
  };
1384
+ DEFAULT_LEAN_TURBO_CONFIG = {
1385
+ max_parallel_coders: 4,
1386
+ require_declared_scope: true,
1387
+ conflict_policy: "serialize",
1388
+ degrade_on_risk: true,
1389
+ phase_reviewer: true,
1390
+ phase_critic: true,
1391
+ integrated_diff_required: true,
1392
+ allow_docs_only_without_reviewer: false,
1393
+ worktree_isolation: true,
1394
+ merge_strategy: "merge",
1395
+ worktree_dir: undefined,
1396
+ deps_strategy: "skip",
1397
+ runtime_isolation: {
1398
+ enabled: false,
1399
+ port_stride: 1
1400
+ }
1401
+ };
1381
1402
  DEFAULT_WORKTREE_ISOLATION_CONFIG = {
1382
1403
  policy: "auto",
1383
1404
  merge_strategy: "merge",
@@ -1394,4 +1415,4 @@ var init_constants = __esm(() => {
1394
1415
  };
1395
1416
  });
1396
1417
 
1397
- export { QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, init_agent_names, TOOL_METADATA, TOOL_NAMES, TOOL_NAME_SET, getPrWorkflowToolCapability, TOOL_DESCRIPTIONS, AGENT_TOOL_MAP, init_tool_metadata, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, isQAAgent, isSubagent, SWARM_WORKTREE_DIR_NAME, DEFAULT_WORKTREE_ISOLATION_CONFIG, init_constants };
1418
+ export { QA_AGENTS, PIPELINE_AGENTS, ORCHESTRATOR_NAME, ALL_SUBAGENT_NAMES, ALL_AGENT_NAMES, init_agent_names, TOOL_METADATA, TOOL_NAMES, TOOL_NAME_SET, getPrWorkflowToolCapability, TOOL_DESCRIPTIONS, AGENT_TOOL_MAP, init_tool_metadata, MEMORY_AGENT_TOOL_MAP, EXTERNAL_SKILL_AGENT_TOOL_MAP, COUNCIL_AGENT_TOOL_MAP, GENERAL_COUNCIL_AGENT_TOOL_MAP, TURBO_AGENT_TOOL_MAP, EPIC_TOOL_NAMES, EPIC_AGENT_TOOL_MAP, SKILL_TOOL_NAMES, SKILL_AGENT_TOOL_MAP, WRITE_TOOL_NAMES, SUMMARIZER_EXEMPT_TOOL_NAMES, DEFAULT_MODELS, DEFAULT_AGENT_CONFIGS, isQAAgent, isSubagent, DEFAULT_LEAN_TURBO_CONFIG, SWARM_WORKTREE_DIR_NAME, DEFAULT_WORKTREE_ISOLATION_CONFIG, init_constants };
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-cdjxzs2r.js";
5
+ } from "./index-rjzn7hf0.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
- } from "./index-8q8783g0.js";
8
+ } from "./index-3zwhxk98.js";
9
9
  import {
10
10
  init_git_executable,
11
11
  resolveGitExecutableAsync
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  readKnowledgeEvents,
4
4
  recordKnowledgeEvent
5
- } from "./index-kqegvngt.js";
5
+ } from "./index-2c47efpt.js";
6
6
  import {
7
7
  queryHistoricalOutcomes
8
- } from "./index-34vsyj15.js";
8
+ } from "./index-0yrg10jx.js";
9
9
  import {
10
10
  jaccardBigram,
11
11
  readKnowledge,
@@ -13,7 +13,7 @@ import {
13
13
  resolveSwarmKnowledgePath,
14
14
  transactKnowledge,
15
15
  wordBigrams
16
- } from "./index-cdjxzs2r.js";
16
+ } from "./index-rjzn7hf0.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -226,11 +226,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
226
226
  alreadyInactive: true
227
227
  };
228
228
  }
229
- const { quarantineEntry } = await import("./knowledge-validator-210gkpec.js");
229
+ const { quarantineEntry } = await import("./knowledge-validator-kr5xmqpa.js");
230
230
  let policyConfig;
231
231
  try {
232
- const { KnowledgeConfigSchema } = await import("./schema-smgngq9m.js");
233
- const { loadPluginConfigWithMeta } = await import("./index-4a7j5f60.js");
232
+ const { KnowledgeConfigSchema } = await import("./schema-9prswg1x.js");
233
+ const { loadPluginConfigWithMeta } = await import("./index-yy5yyyst.js");
234
234
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
235
235
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
236
236
  } catch {