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
@@ -4,7 +4,7 @@ import {
4
4
  readShellAuditTail,
5
5
  redactPath,
6
6
  redactShellCommand
7
- } from "./index-4p3jh14t.js";
7
+ } from "./index-enq166kw.js";
8
8
 
9
9
  // src/services/guardrail-log-service.ts
10
10
  var BLOCK_TYPES = new Set([
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  queryHistoricalOutcomes
4
- } from "./index-34vsyj15.js";
4
+ } from "./index-0yrg10jx.js";
5
5
  import {
6
6
  resolveHiveEventsPath
7
7
  } from "./index-ae75rja9.js";
8
8
  import {
9
9
  resolveKnowledgeStoreDir
10
- } from "./index-8q8783g0.js";
10
+ } from "./index-3zwhxk98.js";
11
11
  import {
12
12
  atomicWriteFile
13
- } from "./index-hh7pa3yk.js";
13
+ } from "./index-r9yvpr2m.js";
14
14
  import {
15
15
  canonicalRootKey
16
16
  } from "./index-fzpt2djt.js";
@@ -708,7 +708,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
708
708
  }
709
709
  let bumps = 0;
710
710
  if (deltas.length > 0) {
711
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-ywxjk5pb.js");
711
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-8cxv6w2n.js");
712
712
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
713
713
  }
714
714
  return {
@@ -11,7 +11,7 @@ import {
11
11
  } from "./index-fzpt2djt.js";
12
12
  import {
13
13
  atomicWriteSwarmFileSync
14
- } from "./index-p2tqzwh6.js";
14
+ } from "./index-qs9myayh.js";
15
15
 
16
16
  // src/db/project-db.ts
17
17
  import { existsSync, mkdirSync, unlinkSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFile
4
- } from "./index-hh7pa3yk.js";
4
+ } from "./index-r9yvpr2m.js";
5
5
  import {
6
6
  canonicalRootKeyFresh
7
7
  } from "./index-fzpt2djt.js";
@@ -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
  bunWrite
7
7
  } from "./index-2s7dvzff.js";
@@ -18,21 +18,21 @@ import {
18
18
  releaseCoordinationLease,
19
19
  transitionCoordinationState,
20
20
  withCoordinationTransaction
21
- } from "./index-ntda6tje.js";
21
+ } from "./index-feaxsjrt.js";
22
22
  import {
23
23
  getProjectDb,
24
24
  projectDbExists
25
- } from "./index-9tvjwv01.js";
25
+ } from "./index-2fpv2wmc.js";
26
26
  import {
27
27
  observeDelegationLedgerPressure
28
- } from "./index-1xa8wq76.js";
28
+ } from "./index-z3ahy9c2.js";
29
29
  import {
30
30
  EvidenceLockTimeoutError,
31
31
  withEvidenceLock
32
- } from "./index-twb3f4tk.js";
32
+ } from "./index-8bx6vhzk.js";
33
33
  import {
34
34
  telemetry
35
- } from "./index-d3rjvm9e.js";
35
+ } from "./index-7vnr5cmp.js";
36
36
  import {
37
37
  canonicalRootKeyFresh,
38
38
  sameProjectRoot
@@ -4735,7 +4735,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
4735
4735
  const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
4736
4736
  if (candidates.length === 0)
4737
4737
  return 0;
4738
- const { transferCoderSettlementToBackground } = await import("./coder-settlement-hh81z2f7.js");
4738
+ const { transferCoderSettlementToBackground } = await import("./coder-settlement-dsb1t39t.js");
4739
4739
  let transferred = 0;
4740
4740
  for (const record of candidates) {
4741
4741
  try {
@@ -5,11 +5,11 @@ import {
5
5
  import {
6
6
  atomicWriteFileAnyRoot,
7
7
  atomicWriteSwarmFileSync
8
- } from "./index-p2tqzwh6.js";
8
+ } from "./index-qs9myayh.js";
9
9
  import {
10
10
  init_loader,
11
11
  loadPluginConfig
12
- } from "./index-waxvpwbv.js";
12
+ } from "./index-efztf4yw.js";
13
13
  import {
14
14
  init_logger,
15
15
  log,
@@ -735,7 +735,7 @@ var CATALOG_SOURCE = [
735
735
  category: "plan",
736
736
  severity: "notice",
737
737
  privacyClass: "operational",
738
- producer: "src/plan/manager.ts:388",
738
+ producer: "src/plan/manager.ts:381",
739
739
  consumers: NO_CONSUMERS,
740
740
  futureOwnerIssue: ISSUE_SINK,
741
741
  retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
@@ -748,7 +748,7 @@ var CATALOG_SOURCE = [
748
748
  category: "plan",
749
749
  severity: "warning",
750
750
  privacyClass: "sensitive",
751
- producer: "src/plan/manager.ts:2207",
751
+ producer: "src/plan/manager.ts:2200",
752
752
  consumers: NO_CONSUMERS,
753
753
  futureOwnerIssue: ISSUE_SINK,
754
754
  retentionOwnerIssue: ISSUE_PLAN_EVIDENCE_RETENTION,
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-t7hmqgjy.js";
5
5
  import {
6
6
  emit
7
- } from "./index-d3rjvm9e.js";
7
+ } from "./index-7vnr5cmp.js";
8
8
  import {
9
9
  tryAcquireLock
10
10
  } from "./index-ejhxgyvm.js";
@@ -14,14 +14,14 @@ import {
14
14
  detectWindowsWrites,
15
15
  getSharedClassifierGuardrailBlock,
16
16
  resolveWriteTargets
17
- } from "./index-2nexf5vz.js";
17
+ } from "./index-1f084tqn.js";
18
18
  import {
19
19
  checkFileAuthority,
20
20
  classifyFile,
21
21
  isInDeclaredScope,
22
22
  redactPath,
23
23
  redactShellCommand
24
- } from "./index-4p3jh14t.js";
24
+ } from "./index-enq166kw.js";
25
25
 
26
26
  // src/services/guardrail-explain-service.ts
27
27
  import path from "path";
@@ -9,10 +9,10 @@ import {
9
9
  } from "./index-txdagbh7.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-hh7pa3yk.js";
12
+ } from "./index-r9yvpr2m.js";
13
13
  import {
14
14
  withEvidenceLock
15
- } from "./index-twb3f4tk.js";
15
+ } from "./index-8bx6vhzk.js";
16
16
  import {
17
17
  assertProjectRoot
18
18
  } from "./index-t7hmqgjy.js";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  readEffectiveSpecSync
4
- } from "./index-16m2m4ah.js";
4
+ } from "./index-spgfs5y7.js";
5
5
  import {
6
6
  readSwarmFileAsync
7
- } from "./index-7hr5m7yp.js";
7
+ } from "./index-nkgzkt7c.js";
8
8
  import {
9
9
  DURABILITY_CLASSES,
10
10
  DbWriteError,
@@ -13,7 +13,7 @@ import {
13
13
  classifyDbWriteError,
14
14
  getProjectDb,
15
15
  projectDbExists
16
- } from "./index-9tvjwv01.js";
16
+ } from "./index-2fpv2wmc.js";
17
17
  import {
18
18
  _internals,
19
19
  canonicalRootKeyFresh
@@ -1,27 +1,36 @@
1
1
  // @bun
2
2
  import {
3
3
  loadPlanJsonOnly
4
- } from "./index-skdpgjar.js";
4
+ } from "./index-cewpxcwm.js";
5
5
  import {
6
6
  isCanonicalPathWithinRoot
7
7
  } from "./index-6b295cas.js";
8
8
  import {
9
9
  sameExistingFilesystemPath
10
10
  } from "./index-ry16d01s.js";
11
+ import {
12
+ hasLegacyEpicConfig,
13
+ init_config,
14
+ legacyEpicIssuePath,
15
+ migrateLegacyEpicConfig,
16
+ resolveEpicConfig
17
+ } from "./index-efztf4yw.js";
11
18
  import {
12
19
  FALLBACK_MODELS_MAX,
13
20
  GATE_CONFIG_KNOWN_SECTION_KEYS,
14
21
  GateConfigSchema,
15
22
  PluginConfigSchema,
23
+ findRetiredEpicConfigKeys,
16
24
  init_schema,
25
+ retiredEpicKeyReplacement,
17
26
  stripKnownSwarmPrefix
18
- } from "./index-1cwmj1gs.js";
27
+ } from "./index-ha0w0a7t.js";
19
28
  import {
20
29
  ALL_AGENT_NAMES,
21
30
  TOOL_NAME_SET,
22
31
  init_constants,
23
32
  init_tool_metadata
24
- } from "./index-zfbxfm2m.js";
33
+ } from "./index-s8b67e6h.js";
25
34
  import {
26
35
  log
27
36
  } from "./index-zgwm4ryv.js";
@@ -515,9 +524,16 @@ var CONFIG_CONSUMERS = {
515
524
  turbo: {
516
525
  consumers: [
517
526
  "src/agents/index.ts:createSwarmAgents",
518
- "src/commands/epic.ts:renderCalibration",
519
527
  "src/commands/turbo.ts:handleTurboCommand",
520
- "src/config/worktree-isolation-config.ts:resolveWorktreeIsolationConfig"
528
+ "src/config/worktree-isolation-config.ts:resolveWorktreeIsolationConfig",
529
+ "src/epic/config.ts:resolveEpicConfig",
530
+ "src/epic/shaping-sizing.ts:epicWaveWidth"
531
+ ]
532
+ },
533
+ epic: {
534
+ consumers: [
535
+ "src/epic/config.ts:resolveEpicConfig",
536
+ "src/epic/config.ts:migrateLegacyEpicConfig"
521
537
  ]
522
538
  },
523
539
  turbo_mode: {
@@ -590,9 +606,11 @@ var CONFIG_CONSUMERS = {
590
606
  ]
591
607
  }
592
608
  };
609
+ Object.freeze(CONFIG_CONSUMERS);
593
610
 
594
611
  // src/services/config-doctor.ts
595
612
  init_schema();
613
+ init_config();
596
614
  init_tool_metadata();
597
615
  var CONFIG_DOCTOR_MAX_CONFIG_FILE_BYTES = 102400;
598
616
  var KNOWN_TOP_LEVEL_KEYS = new Set(Object.keys(PluginConfigSchema.shape));
@@ -693,7 +711,7 @@ function emitObjectTypeMismatch(key, value, findings) {
693
711
  function isPlainObject(value) {
694
712
  return typeof value === "object" && value !== null && !Array.isArray(value);
695
713
  }
696
- function collectRawInertKeyFindings(directory) {
714
+ function collectRawInertKeyFindings(directory, consumers = CONFIG_CONSUMERS) {
697
715
  const findings = [];
698
716
  const { userConfigPath, projectConfigPath } = getConfigPaths(directory);
699
717
  const seen = new Set;
@@ -710,7 +728,7 @@ function collectRawInertKeyFindings(directory) {
710
728
  for (const key of Object.keys(raw)) {
711
729
  if (seen.has(key))
712
730
  continue;
713
- const declaration = CONFIG_CONSUMERS[key];
731
+ const declaration = Object.hasOwn(consumers, key) ? consumers[key] : undefined;
714
732
  if (!declaration || !("inert" in declaration))
715
733
  continue;
716
734
  seen.add(key);
@@ -905,7 +923,7 @@ function collectRawStrictSectionFindings(directory) {
905
923
  const raw = JSON.parse(fs.readFileSync(configPath, "utf-8"));
906
924
  if (!isPlainObject(raw))
907
925
  continue;
908
- const parsed = PluginConfigSchema.safeParse(raw);
926
+ const parsed = PluginConfigSchema.safeParse(migrateLegacyEpicConfig(raw));
909
927
  if (parsed.success)
910
928
  continue;
911
929
  const seen = new Set;
@@ -915,8 +933,9 @@ function collectRawStrictSectionFindings(directory) {
915
933
  if (issue.path[0] === "gates")
916
934
  continue;
917
935
  const keys = issue.keys ?? [];
936
+ const issuePath = legacyEpicIssuePath(raw, issue.path);
918
937
  for (const key of keys) {
919
- const dotted = [...issue.path.map(String), key].join(".");
938
+ const dotted = [...issuePath.map(String), key].join(".");
920
939
  if (seen.has(dotted))
921
940
  continue;
922
941
  seen.add(dotted);
@@ -935,6 +954,68 @@ function collectRawStrictSectionFindings(directory) {
935
954
  }
936
955
  return findings;
937
956
  }
957
+ function readRawEpicConfigFiles(directory) {
958
+ const out = [];
959
+ const { userConfigPath, projectConfigPath } = getConfigPaths(directory);
960
+ for (const configPath of [userConfigPath, projectConfigPath]) {
961
+ if (!fs.existsSync(configPath))
962
+ continue;
963
+ try {
964
+ const stats = fs.statSync(configPath);
965
+ if (stats.size > CONFIG_DOCTOR_MAX_CONFIG_FILE_BYTES)
966
+ continue;
967
+ const content = fs.readFileSync(configPath, "utf-8");
968
+ out.push({
969
+ configPath,
970
+ raw: JSON.parse(content.charCodeAt(0) === 65279 ? content.slice(1) : content)
971
+ });
972
+ } catch {}
973
+ }
974
+ return out;
975
+ }
976
+ function collectRawRetiredEpicKeyFindings(config, directory) {
977
+ const findings = [];
978
+ if (resolveEpicConfig(config) === undefined)
979
+ return findings;
980
+ const seen = new Set;
981
+ for (const { configPath, raw } of readRawEpicConfigFiles(directory)) {
982
+ for (const dotted of findRetiredEpicConfigKeys(raw)) {
983
+ if (seen.has(`${configPath}\x00${dotted}`))
984
+ continue;
985
+ seen.add(`${configPath}\x00${dotted}`);
986
+ const hint = retiredEpicKeyReplacement(dotted);
987
+ findings.push({
988
+ id: "retired-config-key",
989
+ title: "Retired config key",
990
+ description: `"${dotted}" in ${configPath} was retired by Epic Mode v2 and is ignored.${hint ? ` ${hint}` : ""} Remove it.`,
991
+ severity: "warn",
992
+ path: dotted,
993
+ currentValue: undefined,
994
+ autoFixable: false
995
+ });
996
+ }
997
+ }
998
+ return findings;
999
+ }
1000
+ function collectRawLegacyEpicConfigFindings(config, directory) {
1001
+ const findings = [];
1002
+ if (resolveEpicConfig(config) === undefined)
1003
+ return findings;
1004
+ for (const { configPath, raw } of readRawEpicConfigFiles(directory)) {
1005
+ if (!hasLegacyEpicConfig(raw))
1006
+ continue;
1007
+ findings.push({
1008
+ id: "legacy-epic-config-path",
1009
+ title: "Deprecated Epic config path",
1010
+ description: `"turbo.epic" in ${configPath} is deprecated: move the block to top-level "epic" (Epic Mode no longer needs a "turbo" block). It still works \u2014 the loader migrates it; within this file a top-level "epic" wins every key both set, and across files the project config wins over the user config as usual.`,
1011
+ severity: "warn",
1012
+ path: "turbo.epic",
1013
+ currentValue: undefined,
1014
+ autoFixable: false
1015
+ });
1016
+ }
1017
+ return findings;
1018
+ }
938
1019
  function getRawValueAtPath(raw, issuePath) {
939
1020
  let node = raw;
940
1021
  for (const seg of issuePath) {
@@ -960,7 +1041,7 @@ function collectRawValueConstraintFindings(directory) {
960
1041
  const raw = JSON.parse(fs.readFileSync(configPath, "utf-8"));
961
1042
  if (!isPlainObject(raw))
962
1043
  continue;
963
- const parsed = PluginConfigSchema.safeParse(raw);
1044
+ const parsed = PluginConfigSchema.safeParse(migrateLegacyEpicConfig(raw));
964
1045
  if (parsed.success)
965
1046
  continue;
966
1047
  for (const issue of parsed.error.issues) {
@@ -968,12 +1049,13 @@ function collectRawValueConstraintFindings(directory) {
968
1049
  continue;
969
1050
  if (issue.path[0] === "gates")
970
1051
  continue;
971
- const dotted = issue.path.map(String).join(".");
1052
+ const issuePath = legacyEpicIssuePath(raw, issue.path);
1053
+ const dotted = issuePath.map(String).join(".");
972
1054
  const dedupeKey = `${dotted}|${issue.code}`;
973
1055
  if (seen.has(dedupeKey))
974
1056
  continue;
975
1057
  seen.add(dedupeKey);
976
- const current = getRawValueAtPath(raw, issue.path);
1058
+ const current = getRawValueAtPath(raw, issuePath);
977
1059
  if (issue.code === "too_big" && dotted.endsWith("fallback_models") && Array.isArray(current) && current.length > FALLBACK_MODELS_MAX) {
978
1060
  const trimmed = current.slice(0, FALLBACK_MODELS_MAX);
979
1061
  const dropped = current.slice(FALLBACK_MODELS_MAX).map(String);
@@ -1881,6 +1963,10 @@ function validateConfigKey(path2, value) {
1881
1963
  emitObjectTypeMismatch("turbo", value, findings);
1882
1964
  break;
1883
1965
  }
1966
+ case "epic": {
1967
+ emitObjectTypeMismatch("epic", value, findings);
1968
+ break;
1969
+ }
1884
1970
  case "turbo_mode": {
1885
1971
  if (value !== undefined && typeof value !== "boolean") {
1886
1972
  findings.push({
@@ -2099,6 +2185,8 @@ function runConfigDoctor(config, directory, planParallelizationEnabled = null) {
2099
2185
  findings.push(...collectRawGatesConfigFindings(directory));
2100
2186
  findings.push(...collectRawCouncilPolicyFindings(directory));
2101
2187
  findings.push(...collectRawStrictSectionFindings(directory));
2188
+ findings.push(...collectRawRetiredEpicKeyFindings(config, directory));
2189
+ findings.push(...collectRawLegacyEpicConfigFindings(config, directory));
2102
2190
  findings.push(...collectRawValueConstraintFindings(directory));
2103
2191
  findings.push(...collectRawAutoReviewCompatibilityFindings(directory));
2104
2192
  findings.push(...collectRawInertKeyFindings(directory));
@@ -2582,4 +2670,4 @@ function removeStraySwarmDir(projectRoot, strayPath) {
2582
2670
  }
2583
2671
  }
2584
2672
 
2585
- export { CURRENT_CONFIG_FORMAT_VERSION, DEFAULT_FLIPS, LEAN_TURBO_GATE_PRODUCERS, collectLeanTurboGateSatisfiabilityFindings, _internals, resolvePlanParallelizationFlag, getConfigPaths, createConfigBackup, writeBackupArtifact, restoreFromBackup, runConfigDoctor, applySafeAutoFixes, readDoctorArtifact, writeDoctorArtifact, shouldRunOnStartup, runConfigDoctorWithFixes, detectStraySwarmDirs, removeStraySwarmDir };
2673
+ export { CURRENT_CONFIG_FORMAT_VERSION, DEFAULT_FLIPS, collectRawInertKeyFindings, LEAN_TURBO_GATE_PRODUCERS, collectLeanTurboGateSatisfiabilityFindings, collectRawRetiredEpicKeyFindings, collectRawLegacyEpicConfigFindings, _internals, resolvePlanParallelizationFlag, getConfigPaths, createConfigBackup, writeBackupArtifact, restoreFromBackup, runConfigDoctor, applySafeAutoFixes, readDoctorArtifact, writeDoctorArtifact, shouldRunOnStartup, runConfigDoctorWithFixes, detectStraySwarmDirs, removeStraySwarmDir };