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,20 +4,20 @@ import {
4
4
  projectDbExists,
5
5
  withImmediateTransaction,
6
6
  withProjectDbReadOnly
7
- } from "./index-9tvjwv01.js";
7
+ } from "./index-2fpv2wmc.js";
8
8
  import {
9
9
  derivePlanId,
10
10
  derivePlanIdentityHash
11
11
  } from "./index-7pmbnjvj.js";
12
12
  import {
13
13
  withEvidenceLock
14
- } from "./index-twb3f4tk.js";
14
+ } from "./index-8bx6vhzk.js";
15
15
  import {
16
16
  assertProjectRoot
17
17
  } from "./index-t7hmqgjy.js";
18
18
  import {
19
19
  emit
20
- } from "./index-d3rjvm9e.js";
20
+ } from "./index-7vnr5cmp.js";
21
21
  import {
22
22
  ExecutionProfileSchema,
23
23
  PlanSchema,
@@ -27,11 +27,11 @@ import {
27
27
  import {
28
28
  init_loader,
29
29
  loadPluginConfig
30
- } from "./index-waxvpwbv.js";
30
+ } from "./index-efztf4yw.js";
31
31
  import {
32
32
  init_package,
33
33
  package_default
34
- } from "./index-1cwmj1gs.js";
34
+ } from "./index-ha0w0a7t.js";
35
35
  import {
36
36
  criticalWarn,
37
37
  init_logger,
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  computePlanStructureHash
4
- } from "./index-bzbxn24k.js";
4
+ } from "./index-dbdkh7pq.js";
5
5
  import {
6
6
  appendCoreEventSync
7
- } from "./index-wrdktgpy.js";
7
+ } from "./index-zk6ttjkt.js";
8
8
  import {
9
9
  deleteCoordinationState,
10
10
  importCoordinationOnce,
@@ -12,10 +12,10 @@ import {
12
12
  transitionCoordinationState,
13
13
  transitionCoordinationStateWithinTransaction,
14
14
  withCoordinationTransaction
15
- } from "./index-ntda6tje.js";
15
+ } from "./index-feaxsjrt.js";
16
16
  import {
17
17
  getProjectDb
18
- } from "./index-9tvjwv01.js";
18
+ } from "./index-2fpv2wmc.js";
19
19
  import {
20
20
  canonicalExistingFilesystemPath,
21
21
  legacyCanonicalExistingFilesystemPath
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  atomicWriteSwarmFile,
34
34
  atomicWriteSwarmFileSync
35
- } from "./index-p2tqzwh6.js";
35
+ } from "./index-qs9myayh.js";
36
36
  import {
37
37
  PlanSchema
38
38
  } from "./index-gx2vp8gx.js";
@@ -11,9 +11,11 @@ import {
11
11
  GATE_CONFIG_KNOWN_SECTION_KEYS,
12
12
  GateConfigSchema,
13
13
  PluginConfigSchema,
14
+ findRetiredEpicConfigKeys,
14
15
  init_schema,
15
- resolveExternalSkillsConfig
16
- } from "./index-1cwmj1gs.js";
16
+ resolveExternalSkillsConfig,
17
+ retiredEpicKeyReplacement
18
+ } from "./index-ha0w0a7t.js";
17
19
  import {
18
20
  DangerousMergeKeyError,
19
21
  MAX_MERGE_DEPTH,
@@ -25,6 +27,88 @@ import {
25
27
  __export
26
28
  } from "./index-a76rekgs.js";
27
29
 
30
+ // src/epic/config.ts
31
+ function resolveEpicConfig(config) {
32
+ return config?.epic ?? config?.turbo?.epic ?? undefined;
33
+ }
34
+ function isEpicModeConfigEnabled(config) {
35
+ return resolveEpicConfig(config)?.mode?.enabled === true;
36
+ }
37
+ function isEpicCochangeConfigEnabled(config) {
38
+ return resolveEpicConfig(config)?.cochange?.enabled === true;
39
+ }
40
+ function isPlainRecord(value) {
41
+ return value !== null && typeof value === "object" && !Array.isArray(value);
42
+ }
43
+ function mergeWinnerFirst(loser, winner) {
44
+ const out = { ...loser };
45
+ for (const [key, value] of Object.entries(winner)) {
46
+ const prior = Object.hasOwn(out, key) ? out[key] : undefined;
47
+ Object.defineProperty(out, key, {
48
+ value: isPlainRecord(prior) && isPlainRecord(value) ? mergeWinnerFirst(prior, value) : value,
49
+ enumerable: true,
50
+ writable: true,
51
+ configurable: true
52
+ });
53
+ }
54
+ return out;
55
+ }
56
+ function hasLegacyEpicConfig(raw) {
57
+ return isPlainRecord(raw) && isPlainRecord(raw.turbo) && Object.hasOwn(raw.turbo, "epic");
58
+ }
59
+ function migrateLegacyEpicConfig(raw) {
60
+ if (!hasLegacyEpicConfig(raw))
61
+ return raw;
62
+ const { epic: legacy, ...turboRest } = raw.turbo;
63
+ const top = raw.epic;
64
+ let epic;
65
+ if (top === undefined)
66
+ epic = legacy;
67
+ else if (isPlainRecord(top) && isPlainRecord(legacy)) {
68
+ epic = mergeWinnerFirst(legacy, top);
69
+ } else
70
+ epic = top;
71
+ const { turbo: _turbo, ...rest } = raw;
72
+ return {
73
+ ...rest,
74
+ ...Object.keys(turboRest).length > 0 ? { turbo: turboRest } : {},
75
+ epic
76
+ };
77
+ }
78
+ function ownPathExists(node, path) {
79
+ let current = node;
80
+ for (const key of path) {
81
+ if (!isPlainRecord(current) || !Object.hasOwn(current, key))
82
+ return false;
83
+ current = current[key];
84
+ }
85
+ return true;
86
+ }
87
+ function legacyEpicIssuePath(raw, path) {
88
+ if (path[0] !== "epic" || !hasLegacyEpicConfig(raw) || Object.hasOwn(raw, "epic")) {
89
+ return [...path];
90
+ }
91
+ return ["turbo", ...path];
92
+ }
93
+ function annotateLegacyEpicKeys(keys, rawFiles) {
94
+ const legacy = rawFiles.filter(hasLegacyEpicConfig);
95
+ if (legacy.length === 0)
96
+ return keys;
97
+ const tops = rawFiles.filter((raw) => isPlainRecord(raw) && Object.hasOwn(raw, "epic"));
98
+ return keys.map((key) => {
99
+ if (key !== "epic" && !key.startsWith("epic."))
100
+ return key;
101
+ const rel = key === "epic" ? [] : key.slice("epic.".length).split(".");
102
+ const inLegacy = legacy.some((raw) => ownPathExists(raw.turbo.epic, rel));
103
+ const inTop = tops.some((raw) => ownPathExists(raw.epic, rel));
104
+ return inLegacy && !inTop ? `${key} (from turbo.epic)` : key;
105
+ });
106
+ }
107
+ var LEGACY_EPIC_CONFIG_WARNING;
108
+ var init_config = __esm(() => {
109
+ LEGACY_EPIC_CONFIG_WARNING = "[opencode-swarm] turbo.epic is deprecated \u2014 move it to top-level epic " + '(`{ "epic": { "mode": { "enabled": true } } }`; no `turbo` block or ' + "`turbo.strategy` is needed). The legacy path keeps working: its keys are " + "used where top-level `epic` does not set them. See docs/configuration.md (Epic Mode).";
110
+ });
111
+
28
112
  // src/config/sanitize-malformed-values.ts
29
113
  function dotted(p) {
30
114
  return p.map(String).join(".");
@@ -497,6 +581,22 @@ function enforceGitBinaryProvenance(mergedRaw, rawUserConfig) {
497
581
  return rebuilt;
498
582
  }
499
583
  function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, configHadErrors) {
584
+ const rawEpicFiles = [rawUserConfig, rawProjectConfig];
585
+ const retiredEpicKeys = [
586
+ ...new Set(rawEpicFiles.flatMap((raw) => findRetiredEpicConfigKeys(raw)))
587
+ ];
588
+ const annotateEpicKeys = (keys) => annotateLegacyEpicKeys(keys, rawEpicFiles);
589
+ if (rawEpicFiles.some(hasLegacyEpicConfig)) {
590
+ if (rawUserConfig)
591
+ rawUserConfig = migrateLegacyEpicConfig(rawUserConfig);
592
+ if (rawProjectConfig) {
593
+ rawProjectConfig = migrateLegacyEpicConfig(rawProjectConfig);
594
+ }
595
+ if (!legacyEpicConfigWarned) {
596
+ legacyEpicConfigWarned = true;
597
+ advisoryWarn(LEGACY_EPIC_CONFIG_WARNING);
598
+ }
599
+ }
500
600
  let mergedRaw = rawUserConfig ?? {};
501
601
  if (rawProjectConfig) {
502
602
  try {
@@ -533,6 +633,13 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
533
633
  advisoryWarn(`[opencode-swarm] Ignored ${unknownTopLevel.length} unknown top-level config key(s): ${unknownTopLevel.join(", ")}. These keys have no effect \u2014 see docs/configuration.md (Top-level configuration keys) for the valid key list.`);
534
634
  }
535
635
  }
636
+ if (retiredEpicKeys.length > 0) {
637
+ const signature = retiredEpicKeys.join("\x00");
638
+ if (signature !== lastRetiredEpicKeysSig) {
639
+ lastRetiredEpicKeysSig = signature;
640
+ advisoryWarn(`[opencode-swarm] Ignored ${retiredEpicKeys.length} retired Epic config key(s): ${retiredEpicKeys.join(", ")}. They have no effect (the rest of the Epic block is kept) \u2014 remove them; see docs/configuration.md (Epic Mode).${retiredEpicKeys.map((key) => retiredEpicKeyReplacement(key)).filter((hint) => hint !== undefined).map((hint) => ` ${hint}`).join("")}`);
641
+ }
642
+ }
536
643
  const secure = (cfg) => loadedFromFile && configHadErrors ? PluginConfigSchema.parse({
537
644
  ...cfg,
538
645
  guardrails: { enabled: true }
@@ -558,7 +665,8 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
558
665
  rawGates
559
666
  };
560
667
  }
561
- const { cleaned, removed } = stripUnrecognizedKeys(mergedRaw, firstResult.error);
668
+ const { cleaned, removed: strictRemoved } = stripUnrecognizedKeys(mergedRaw, firstResult.error);
669
+ const removed = annotateEpicKeys(strictRemoved);
562
670
  if (removed.length > 0) {
563
671
  const recovered = PluginConfigSchema.safeParse(cleaned);
564
672
  if (recovered.success) {
@@ -597,15 +705,12 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
597
705
  if (userStripped.removed.length > 0) {
598
706
  const userRecovered = PluginConfigSchema.safeParse(userStripped.cleaned);
599
707
  if (userRecovered.success) {
600
- advisoryWarn(`[opencode-swarm] Project config ignored; also ignored ${userStripped.removed.length} unrecognized user-config key(s): ${userStripped.removed.join(", ")}.`);
708
+ const userRemoved = annotateEpicKeys(userStripped.removed);
709
+ advisoryWarn(`[opencode-swarm] Project config ignored; also ignored ${userRemoved.length} unrecognized user-config key(s): ${userRemoved.join(", ")}.`);
601
710
  return {
602
711
  config: secure(userRecovered.data),
603
712
  recovery: "user_only",
604
- removedKeys: [
605
- ...gatesStripped,
606
- ...userGatesStripped,
607
- ...userStripped.removed
608
- ],
713
+ removedKeys: [...gatesStripped, ...userGatesStripped, ...userRemoved],
609
714
  warnings: [
610
715
  "Project config ignored due to validation errors; using user config."
611
716
  ],
@@ -622,7 +727,7 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
622
727
  if (recoveredParse.success) {
623
728
  const removedKeys = [
624
729
  ...gatesStripped,
625
- ...valueRecovery.recoveryWarnings.map((w) => w.section)
730
+ ...annotateEpicKeys(valueRecovery.recoveryWarnings.map((w) => w.section))
626
731
  ];
627
732
  const secureParse = PluginConfigSchema.safeParse({
628
733
  ...recoveredParse.data,
@@ -644,7 +749,7 @@ function buildConfigWithMeta(rawUserConfig, rawProjectConfig, loadedFromFile, co
644
749
  }
645
750
  }
646
751
  }
647
- const offending = stripUnrecognizedKeys(mergedRaw, firstResult.error).removed;
752
+ const offending = annotateEpicKeys(stripUnrecognizedKeys(mergedRaw, firstResult.error).removed);
648
753
  if (offending.length > 0) {
649
754
  advisoryWarn(`[opencode-swarm] Merged config validation failed. Unrecognized key(s): ${offending.join(", ")}.`);
650
755
  } else {
@@ -698,6 +803,8 @@ function loadGateOverrides(directory) {
698
803
  function resetConfigAdvisoryDedup() {
699
804
  gatesAdvisorySignatures.clear();
700
805
  lastUnknownTopLevelSig = null;
806
+ lastRetiredEpicKeysSig = null;
807
+ legacyEpicConfigWarned = false;
701
808
  }
702
809
  function getSafeDefaultConfigLoadResult() {
703
810
  const { config, recovery, removedKeys, warnings } = buildConfigWithMeta(null, null, false, false);
@@ -789,8 +896,9 @@ function loadAgentPrompt(agentName) {
789
896
  }
790
897
  return result;
791
898
  }
792
- var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400, lastUnknownTopLevelSig = null, gatesAdvisorySignatures, MAX_GATES_ADVISORY_SIGNATURES = 64, _internals;
899
+ var CONFIG_FILENAME = "opencode-swarm.json", PROMPTS_DIR_NAME = "opencode-swarm", MAX_CONFIG_FILE_BYTES = 102400, lastUnknownTopLevelSig = null, lastRetiredEpicKeysSig = null, legacyEpicConfigWarned = false, gatesAdvisorySignatures, MAX_GATES_ADVISORY_SIGNATURES = 64, _internals;
793
900
  var init_loader = __esm(() => {
901
+ init_config();
794
902
  init_warning_buffer();
795
903
  init_git_executable();
796
904
  init_sanitize_malformed_values();
@@ -802,10 +910,16 @@ var init_loader = __esm(() => {
802
910
  resetUnknownTopLevelKeyWarning() {
803
911
  lastUnknownTopLevelSig = null;
804
912
  },
913
+ resetRetiredEpicKeyWarning() {
914
+ lastRetiredEpicKeysSig = null;
915
+ },
916
+ resetLegacyEpicConfigWarning() {
917
+ legacyEpicConfigWarned = false;
918
+ },
805
919
  resetGatesAdvisoryDedup() {
806
920
  gatesAdvisorySignatures.clear();
807
921
  }
808
922
  };
809
923
  });
810
924
 
811
- export { loadPluginConfig, loadPluginConfigWithMeta, loadGateOverrides, resetConfigAdvisoryDedup, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader };
925
+ export { resolveEpicConfig, isEpicModeConfigEnabled, isEpicCochangeConfigEnabled, hasLegacyEpicConfig, migrateLegacyEpicConfig, legacyEpicIssuePath, init_config, loadPluginConfig, loadPluginConfigWithMeta, loadGateOverrides, resetConfigAdvisoryDedup, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader };
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  observeStoreHealth
4
- } from "./index-1xa8wq76.js";
4
+ } from "./index-z3ahy9c2.js";
5
5
  import {
6
6
  telemetry
7
- } from "./index-d3rjvm9e.js";
7
+ } from "./index-7vnr5cmp.js";
8
8
  import {
9
9
  init_schema,
10
10
  stripKnownSwarmPrefix
11
- } from "./index-1cwmj1gs.js";
11
+ } from "./index-ha0w0a7t.js";
12
12
  import {
13
13
  init_constants
14
- } from "./index-zfbxfm2m.js";
14
+ } from "./index-s8b67e6h.js";
15
15
  import {
16
16
  getPathFlavor,
17
17
  init_path_identity,
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-waxvpwbv.js";
5
+ } from "./index-efztf4yw.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-1cwmj1gs.js";
8
+ } from "./index-ha0w0a7t.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
12
- } from "./index-zfbxfm2m.js";
12
+ } from "./index-s8b67e6h.js";
13
13
 
14
14
  // src/config/index.ts
15
15
  init_constants();
@@ -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
 
9
9
  // src/db/coordination-store.ts
10
10
  import { createHash } from "crypto";
@@ -112,6 +112,14 @@ function listCoordinationStates(directory, namespace, limit = 5000) {
112
112
  }
113
113
  return states;
114
114
  }
115
+ function listCoordinationStateKeys(directory, namespace, limit) {
116
+ if (!projectDbExists(directory))
117
+ return [];
118
+ const boundedLimit = Number.isFinite(limit) ? Math.max(0, Math.min(MAX_COORDINATION_STATE_LIST_ROWS, Math.trunc(limit))) : 0;
119
+ if (boundedLimit === 0)
120
+ return [];
121
+ return getProjectDb(directory).query("SELECT entity_key FROM coordination_state WHERE namespace = ? ORDER BY entity_key LIMIT ?").all(namespace, boundedLimit).map((row) => row.entity_key);
122
+ }
115
123
  function countCoordinationStates(directory, namespace) {
116
124
  if (!projectDbExists(directory))
117
125
  return 0;
@@ -366,4 +374,4 @@ function deleteCoordinationImports(directory, sources) {
366
374
  });
367
375
  }
368
376
 
369
- export { MAX_COORDINATION_STATE_LIST_ROWS, getCoordinationStateRaw, withCoordinationTransaction, getCoordinationState, listCoordinationStates, countCoordinationStates, deleteCoordinationState, deleteCoordinationStateWithinTransaction, transitionCoordinationStateWithinTransaction, transitionCoordinationState, getCoordinationLease, acquireCoordinationLease, releaseCoordinationLease, importCoordinationOnce, deleteCoordinationImports };
377
+ export { MAX_COORDINATION_STATE_LIST_ROWS, getCoordinationStateRaw, withCoordinationTransaction, getCoordinationState, listCoordinationStates, listCoordinationStateKeys, countCoordinationStates, deleteCoordinationState, deleteCoordinationStateWithinTransaction, transitionCoordinationStateWithinTransaction, transitionCoordinationState, getCoordinationLease, acquireCoordinationLease, releaseCoordinationLease, importCoordinationOnce, deleteCoordinationImports };
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-0gejy4cx.js";
4
+ } from "./index-ay8ggtgr.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-qx3g1bbe.js";
7
+ } from "./index-26e2s6r1.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  DEFAULT_CI_DEADLINE_MS,
@@ -97,82 +97,82 @@ import {
97
97
  handleWriteRetroCommand,
98
98
  normalizeSwarmCommandInput,
99
99
  resolveCommand
100
- } from "./index-2nexf5vz.js";
101
- import"./index-4p3jh14t.js";
102
- import"./index-fbgjj7h5.js";
103
- import"./index-nhsafbrh.js";
100
+ } from "./index-1f084tqn.js";
101
+ import"./index-enq166kw.js";
102
+ import"./index-bfyh3gpe.js";
103
+ import"./index-hx1fmywk.js";
104
104
  import"./index-j2vv0h13.js";
105
- import"./index-k8sarme1.js";
106
- import"./index-8xabhfwr.js";
105
+ import"./index-y9v41185.js";
106
+ import"./index-b2j231jy.js";
107
107
  import"./index-txdagbh7.js";
108
- import"./index-bskex45z.js";
108
+ import"./index-s9cgnd2z.js";
109
109
  import"./index-rdec0y3z.js";
110
- import"./index-cbqkag7q.js";
111
- import"./index-wqa31xnf.js";
112
- import"./index-9gqb5nkj.js";
113
- import"./index-cj4mp0fm.js";
114
- import"./index-kaqdzhj3.js";
115
- import"./index-9czp2dcg.js";
110
+ import"./index-bcwmn4d7.js";
111
+ import"./index-gqb8etv4.js";
112
+ import"./index-0gve0mkj.js";
113
+ import"./index-sc7t1tev.js";
114
+ import"./index-kfevm0n5.js";
115
+ import"./index-mjfpaxw3.js";
116
116
  import"./index-cjapb4hy.js";
117
- import"./index-f6exny9m.js";
117
+ import"./index-n8q43eff.js";
118
118
  import"./index-pt7h91zc.js";
119
119
  import"./index-q7sjgr1y.js";
120
- import"./index-z29hksyw.js";
121
- import"./index-skdpgjar.js";
120
+ import"./index-m28dzyy8.js";
121
+ import"./index-cewpxcwm.js";
122
122
  import"./index-6b295cas.js";
123
123
  import"./index-9nyqt3kb.js";
124
- import"./index-16m2m4ah.js";
125
- import"./index-zsrtt42s.js";
126
- import"./index-5cfhwd65.js";
127
- import"./index-5v09zw1q.js";
128
- import"./index-mfxef20k.js";
124
+ import"./index-spgfs5y7.js";
125
+ import"./index-v3bmwmqw.js";
126
+ import"./index-67a6mk20.js";
127
+ import"./index-v3j9fk16.js";
128
+ import"./index-0z8vdkvg.js";
129
129
  import"./index-g4fs6z4e.js";
130
- import"./index-9j3ybyfs.js";
131
- import"./index-kqegvngt.js";
132
- import"./index-34vsyj15.js";
130
+ import"./index-4a15347d.js";
131
+ import"./index-2c47efpt.js";
132
+ import"./index-0yrg10jx.js";
133
133
  import"./index-m9zzj4ee.js";
134
- import"./index-7hr5m7yp.js";
134
+ import"./index-nkgzkt7c.js";
135
135
  import"./index-2s7dvzff.js";
136
- import"./index-2btybj8w.js";
137
- import"./index-q9kefh33.js";
136
+ import"./index-xdq6mak1.js";
137
+ import"./index-sxj143a4.js";
138
138
  import"./index-rtry5xyf.js";
139
- import"./index-g03m5jhw.js";
139
+ import"./index-f46dbyew.js";
140
140
  import"./index-pkhbd2t5.js";
141
141
  import"./index-0725jpp7.js";
142
- import"./index-w4zscz6p.js";
143
- import"./index-bzbxn24k.js";
144
- import"./index-wrdktgpy.js";
145
- import"./index-x1eh2636.js";
146
- import"./index-ntda6tje.js";
147
- import"./index-9tvjwv01.js";
142
+ import"./index-dnp4qtpf.js";
143
+ import"./index-dbdkh7pq.js";
144
+ import"./index-zk6ttjkt.js";
145
+ import"./index-mcv0v2dp.js";
146
+ import"./index-feaxsjrt.js";
147
+ import"./index-2fpv2wmc.js";
148
148
  import"./index-ry16d01s.js";
149
149
  import"./index-rdm3px0g.js";
150
150
  import"./index-7pmbnjvj.js";
151
- import"./index-1xa8wq76.js";
152
- import"./index-cdjxzs2r.js";
151
+ import"./index-z3ahy9c2.js";
152
+ import"./index-rjzn7hf0.js";
153
153
  import"./index-vzm6zre7.js";
154
154
  import"./index-ae75rja9.js";
155
- import"./index-8q8783g0.js";
156
- import"./index-hh7pa3yk.js";
157
- import"./index-twb3f4tk.js";
155
+ import"./index-3zwhxk98.js";
156
+ import"./index-r9yvpr2m.js";
157
+ import"./index-8bx6vhzk.js";
158
158
  import"./index-t7hmqgjy.js";
159
- import"./index-d3rjvm9e.js";
159
+ import"./index-7vnr5cmp.js";
160
160
  import"./index-fzpt2djt.js";
161
161
  import"./index-ejhxgyvm.js";
162
162
  import"./index-7g4c7s5r.js";
163
- import"./index-p2tqzwh6.js";
163
+ import"./index-qs9myayh.js";
164
164
  import"./index-gx2vp8gx.js";
165
- import"./index-waxvpwbv.js";
165
+ import"./index-efztf4yw.js";
166
166
  import"./index-zxdawwc7.js";
167
167
  import {
168
168
  init_schema,
169
169
  stripKnownSwarmPrefix
170
- } from "./index-1cwmj1gs.js";
170
+ } from "./index-ha0w0a7t.js";
171
171
  import {
172
172
  AGENT_TOOL_MAP,
173
173
  ORCHESTRATOR_NAME,
174
174
  init_constants
175
- } from "./index-zfbxfm2m.js";
175
+ } from "./index-s8b67e6h.js";
176
176
  import"./index-bk5tah7q.js";
177
177
  import"./index-gknz3bv1.js";
178
178
  import"./index-zpsr8rpc.js";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  captureWorkspaceSnapshotAsync,
4
4
  changedFilesSinceSnapshotAsync
5
- } from "./index-kaqdzhj3.js";
5
+ } from "./index-kfevm0n5.js";
6
6
  import {
7
7
  removeWorktreeProvisioningOwner
8
- } from "./index-f6exny9m.js";
8
+ } from "./index-n8q43eff.js";
9
9
  import {
10
10
  SOURCE_WORKTREE_GONE_STAGE,
11
11
  ensureTaskGateRequirementsReceiptForSettledTransition,
@@ -14,13 +14,13 @@ import {
14
14
  reconcileLandedMerge,
15
15
  withTaskEvidenceTransaction,
16
16
  writeWorkflowWalFile
17
- } from "./index-5v09zw1q.js";
17
+ } from "./index-v3j9fk16.js";
18
18
  import {
19
19
  validateSwarmPath
20
- } from "./index-7hr5m7yp.js";
20
+ } from "./index-nkgzkt7c.js";
21
21
  import {
22
22
  appendCoreEventSync
23
- } from "./index-wrdktgpy.js";
23
+ } from "./index-zk6ttjkt.js";
24
24
  import {
25
25
  canonicalRootKeyFresh
26
26
  } from "./index-fzpt2djt.js";
@@ -512,7 +512,7 @@ async function cleanupRecoveredWorktree(directory, descriptor, options) {
512
512
  awaitingMergeByCallID,
513
513
  cleanupStandardWorktreeForCallId,
514
514
  standardWorktreeByCallID
515
- } = await import("./worktree-isolation-h0c22pm2.js");
515
+ } = await import("./worktree-isolation-jggdf28m.js");
516
516
  standardWorktreeByCallID.delete(descriptor.callID);
517
517
  if (hasResidue)
518
518
  awaitingMergeByCallID.set(descriptor.callID, {
@@ -648,7 +648,7 @@ async function recoverCoderSettlement(directory, taskId) {
648
648
  awaitingMergeByCallID,
649
649
  finishStandardWorktreeDispatch,
650
650
  standardWorktreeByCallID
651
- } = await import("./worktree-isolation-h0c22pm2.js");
651
+ } = await import("./worktree-isolation-jggdf28m.js");
652
652
  const descriptor = wal.worktree;
653
653
  const reconstructedDispatch = {
654
654
  callID: descriptor.callID,