@cortexkit/opencode-magic-context 0.49.11 → 0.49.12

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 (206) hide show
  1. package/README.md +1 -1
  2. package/dist/agents/smart-notes-dreamer-gate.fixture.d.ts +28 -0
  3. package/dist/agents/smart-notes-dreamer-gate.fixture.d.ts.map +1 -0
  4. package/dist/{announcement-hdbkt8v5.js → announcement-g789dmt6.js} +2 -2
  5. package/dist/auto-search-worker.js +4 -4
  6. package/dist/{compaction-marker-candidates-xxz35vwp.js → compaction-marker-candidates-v5c6997n.js} +3 -3
  7. package/dist/compaction-marker-candidates-worker.js +1 -1
  8. package/dist/config/agent-disable.d.ts +14 -0
  9. package/dist/config/agent-disable.d.ts.map +1 -1
  10. package/dist/config/dependency-notes.d.ts +34 -0
  11. package/dist/config/dependency-notes.d.ts.map +1 -0
  12. package/dist/config/schema/magic-context.d.ts.map +1 -1
  13. package/dist/{conflict-warning-hook-xwkfncav.js → conflict-warning-hook-f4x5wed7.js} +8 -8
  14. package/dist/{context-twz3s0cg.js → context-dam8p201.js} +106 -96
  15. package/dist/{derive-budgets-3nbxsyss.js → derive-budgets-5306b1jt.js} +3 -3
  16. package/dist/embedding-backfill-qbfcbp87.js +21 -0
  17. package/dist/embedding-worker-process.js +2 -2
  18. package/dist/embedding-worker.js +6 -6
  19. package/dist/features/magic-context/dreamer/task-config.d.ts +22 -4
  20. package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -1
  21. package/dist/features/magic-context/dreamer/task-registry.d.ts +22 -0
  22. package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
  23. package/dist/features/magic-context/dreamer/task-scheduler.d.ts +4 -1
  24. package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
  25. package/dist/features/magic-context/memory/embedding-openai.d.ts +32 -0
  26. package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
  27. package/dist/features/magic-context/memory/project-identity.d.ts +1 -0
  28. package/dist/features/magic-context/memory/project-identity.d.ts.map +1 -1
  29. package/dist/features/magic-context/memory/unborn-head.d.ts +34 -0
  30. package/dist/features/magic-context/memory/unborn-head.d.ts.map +1 -0
  31. package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
  32. package/dist/features/magic-context/storage-tags.d.ts +2 -0
  33. package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
  34. package/dist/{history-owner-ty29fz0f.js → history-owner-xp3pngv7.js} +3 -3
  35. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  36. package/dist/hooks/magic-context/compartment-prompt.d.ts +6 -0
  37. package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -1
  38. package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
  39. package/dist/hooks/magic-context/compartment-runner-types.d.ts +3 -0
  40. package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
  41. package/dist/hooks/magic-context/compartment-trigger-error.d.ts +12 -0
  42. package/dist/hooks/magic-context/compartment-trigger-error.d.ts.map +1 -0
  43. package/dist/hooks/magic-context/historian-prompt-fit.d.ts +2 -0
  44. package/dist/hooks/magic-context/historian-prompt-fit.d.ts.map +1 -1
  45. package/dist/hooks/magic-context/hook.d.ts.map +1 -1
  46. package/dist/hooks/magic-context/pending-materialization.d.ts +2 -0
  47. package/dist/hooks/magic-context/pending-materialization.d.ts.map +1 -1
  48. package/dist/hooks/magic-context/protected-tail-boundary.d.ts +12 -0
  49. package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
  50. package/dist/hooks/magic-context/raw-exact-ordinal-read.d.ts +58 -0
  51. package/dist/hooks/magic-context/raw-exact-ordinal-read.d.ts.map +1 -0
  52. package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts +7 -0
  53. package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
  54. package/dist/hooks/magic-context/read-session-raw.d.ts +19 -0
  55. package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
  56. package/dist/hooks/magic-context/recomp-orchestrator.d.ts +2 -0
  57. package/dist/hooks/magic-context/recomp-orchestrator.d.ts.map +1 -1
  58. package/dist/hooks/magic-context/transform-compartment-phase.d.ts +2 -0
  59. package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
  60. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  61. package/dist/hooks/magic-context/transform.d.ts +4 -0
  62. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  63. package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
  64. package/dist/{index-g40wgxxt.js → index-05n6ykca.js} +4 -4
  65. package/dist/{index-bzp9s8z2.js → index-1d289pq2.js} +2 -2
  66. package/dist/{index-w28y7d0z.js → index-1sarmj9z.js} +15 -15
  67. package/dist/{index-hqnggmxn.js → index-1wwh38fk.js} +128 -66
  68. package/dist/{index-0abg88h2.js → index-2pgxcncf.js} +4 -4
  69. package/dist/{index-84j7jq8a.js → index-6sytd5w3.js} +10 -10
  70. package/dist/{index-yhrrx7qa.js → index-6sz25c3s.js} +3 -3
  71. package/dist/{index-4jkhhpn1.js → index-7h8a1xpc.js} +3 -3
  72. package/dist/{index-se1w3v2m.js → index-7zd5asz9.js} +140 -17
  73. package/dist/{index-jw4gbfkv.js → index-8ketfacn.js} +2 -2
  74. package/dist/{index-q3qck7j2.js → index-95s8xaj1.js} +6 -5
  75. package/dist/{index-bmwfzz28.js → index-9vqb5p1s.js} +4 -4
  76. package/dist/{index-0jz47061.js → index-a8bvhwqs.js} +190 -30
  77. package/dist/{index-qr1mkc2y.js → index-b16gpywn.js} +9 -9
  78. package/dist/{index-g7jkrz0x.js → index-bp5083x2.js} +1 -1
  79. package/dist/{index-mp2kghkv.js → index-dyvbsvga.js} +1 -1
  80. package/dist/{index-s178h9z8.js → index-f71thw8j.js} +1 -1
  81. package/dist/{index-kvw6xew3.js → index-fkx2qnvw.js} +2 -2
  82. package/dist/{index-f8cn4xqa.js → index-fwefky9w.js} +18 -5
  83. package/dist/{index-4ccdr7yw.js → index-fx90bvjd.js} +5 -5
  84. package/dist/{index-0sahzkwr.js → index-g2q4htwp.js} +46 -2
  85. package/dist/{index-9159kk15.js → index-gf0psee3.js} +5 -5
  86. package/dist/{index-mw7c950g.js → index-gp3kcpc4.js} +1 -1
  87. package/dist/{index-gjvjh960.js → index-hqkczed7.js} +1 -1
  88. package/dist/{index-mvvephtj.js → index-j75v2476.js} +1 -1
  89. package/dist/{index-150zz6fh.js → index-k29z4aqh.js} +1 -1
  90. package/dist/{index-b64n4d0h.js → index-kee4kn5j.js} +1 -1
  91. package/dist/index-ksdyrrav.js +52 -0
  92. package/dist/{index-angx1s0k.js → index-mmfa86mt.js} +16 -6
  93. package/dist/{index-9jvab89d.js → index-n6m03s3n.js} +2 -2
  94. package/dist/{index-q28hsbpg.js → index-nj7yykkx.js} +1 -1
  95. package/dist/{index-ghc9f0n7.js → index-p5y3k4g7.js} +29 -1
  96. package/dist/{index-kkvxnbt8.js → index-qtbdx42g.js} +54 -25
  97. package/dist/{index-a865mj02.js → index-tdn0zkw4.js} +4 -4
  98. package/dist/{index-0j6crjgh.js → index-wqs4q74r.js} +8 -8
  99. package/dist/{index-xztdf9t7.js → index-x2xjyq8f.js} +11 -11
  100. package/dist/{index-a4b0gbyg.js → index-y9f76s3f.js} +1 -1
  101. package/dist/{index-z7avx6rw.js → index-yx5kgp2x.js} +197 -98
  102. package/dist/index.d.ts.map +1 -1
  103. package/dist/index.js +95 -67
  104. package/dist/{logger-wn328tfg.js → logger-jm3sqqzr.js} +2 -2
  105. package/dist/{message-index-bounded-0rbbg9rd.js → message-index-bounded-nq6rp8xa.js} +16 -16
  106. package/dist/{message-index-ct5x2kwa.js → message-index-df7swgy1.js} +16 -16
  107. package/dist/{message-time-backfill-nb5hhnrt.js → message-time-backfill-qjge9044.js} +3 -3
  108. package/dist/migration-worker.js +11 -11
  109. package/dist/plugin/dream-timer.d.ts.map +1 -1
  110. package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
  111. package/dist/plugin/tool-registry.d.ts.map +1 -1
  112. package/dist/{project-embedding-registry-ft9gh2e2.js → project-embedding-registry-q0ysjyzc.js} +11 -11
  113. package/dist/raw-ordinal-warmup-worker.js +12 -7
  114. package/dist/{read-session-chunk-y3hhsbzw.js → read-session-chunk-ax05f7gr.js} +11 -11
  115. package/dist/{read-session-raw-gm6xj30v.js → read-session-raw-m56hc7v2.js} +7 -3
  116. package/dist/{recomp-orchestrator-67k45s0b.js → recomp-orchestrator-a0mvby4e.js} +29 -29
  117. package/dist/{safe-notification-target-jdynm677.js → safe-notification-target-1szv1k5k.js} +3 -3
  118. package/dist/{search-jd8xh721.js → search-fm002702.js} +23 -23
  119. package/dist/{send-session-notification-vzhj8bsg.js → send-session-notification-y2wg3fkh.js} +6 -6
  120. package/dist/shared/data-path.d.ts +4 -0
  121. package/dist/shared/data-path.d.ts.map +1 -1
  122. package/dist/{storage-tags-35m4gms2.js → storage-tags-yygfb9c8.js} +7 -5
  123. package/dist/{task-config-cgpg0nvh.js → task-config-x3qmayd2.js} +6 -2
  124. package/dist/tools/ctx-note/tools.d.ts.map +1 -1
  125. package/dist/{transform-postprocess-phase-pmqxfq4q.js → transform-postprocess-phase-s84rdf32.js} +29 -29
  126. package/dist/v2/auto-search-worker.js +4 -4
  127. package/dist/v2/{compaction-marker-candidates-a15w3mqh.js → compaction-marker-candidates-1vqwr3s5.js} +2 -2
  128. package/dist/v2/compaction-marker-candidates-worker.js +1 -1
  129. package/dist/v2/{context-p1zfcw41.js → context-x60fa16g.js} +181 -83
  130. package/dist/v2/{derive-budgets-0rmpmxjw.js → derive-budgets-z25jw3py.js} +3 -3
  131. package/dist/v2/embedding-backfill-mbjyza2a.js +20 -0
  132. package/dist/v2/embedding-worker-process.js +1 -1
  133. package/dist/v2/embedding-worker.js +5 -5
  134. package/dist/v2/{history-owner-2cr9py37.js → history-owner-42e16w0n.js} +2 -2
  135. package/dist/v2/hooks/context.d.ts.map +1 -1
  136. package/dist/v2/hooks/dream-manual.d.ts.map +1 -1
  137. package/dist/v2/hooks/dream-trigger.d.ts +1 -1
  138. package/dist/v2/hooks/dream-trigger.d.ts.map +1 -1
  139. package/dist/v2/hooks/transform-features.d.ts +1 -0
  140. package/dist/v2/hooks/transform-features.d.ts.map +1 -1
  141. package/dist/v2/{logger-te6e1j72.js → logger-7qt02bnb.js} +1 -1
  142. package/dist/v2/{message-index-cjhv92m2.js → message-index-5nayhm1r.js} +15 -15
  143. package/dist/v2/{message-index-bounded-7wcbp975.js → message-index-bounded-pgv1ndpb.js} +15 -15
  144. package/dist/v2/{message-time-backfill-rz1pnpaj.js → message-time-backfill-bsteyc4d.js} +2 -2
  145. package/dist/v2/migration-worker.js +10 -10
  146. package/dist/v2/{project-embedding-registry-g34gcf74.js → project-embedding-registry-jbmjc0p4.js} +10 -10
  147. package/dist/v2/raw-ordinal-warmup-worker.js +12 -7
  148. package/dist/v2/{read-session-chunk-8d3v87vr.js → read-session-chunk-hr3w5bjk.js} +10 -10
  149. package/dist/v2/{read-session-raw-h4azh85b.js → read-session-raw-b3tf6ra1.js} +6 -2
  150. package/dist/v2/recomp-orchestrator-8w3449eb.js +59 -0
  151. package/dist/v2/{safe-notification-target-936374xx.js → safe-notification-target-qg7n2s77.js} +2 -2
  152. package/dist/v2/{search-a1acjwf8.js → search-mhmxgq0e.js} +22 -22
  153. package/dist/v2/{send-session-notification-z5mcjdea.js → send-session-notification-jevgj9fe.js} +5 -5
  154. package/dist/v2/{server-npm52h2q.js → server-05xjtq6c.js} +1 -1
  155. package/dist/v2/{server-s6jqh8bj.js → server-0ppsweh6.js} +1 -1
  156. package/dist/v2/server-0s95v3en.js +49 -0
  157. package/dist/v2/{server-pbpp8r8h.js → server-25tg45b4.js} +9 -9
  158. package/dist/v2/{server-83d71zab.js → server-2x42esxd.js} +3 -3
  159. package/dist/v2/{server-5x7kmyz8.js → server-37ngj8qw.js} +10 -51
  160. package/dist/v2/{server-kn7skz9r.js → server-4c10404h.js} +3 -3
  161. package/dist/v2/{server-erfp0xb6.js → server-50mkkhy1.js} +10 -10
  162. package/dist/v2/{server-7fvmt15t.js → server-5gvkzzrf.js} +192 -49
  163. package/dist/v2/{server-7dv9wt9r.js → server-6pmqg9m4.js} +1 -1
  164. package/dist/v2/{server-h3wc20sv.js → server-83ygfha2.js} +4 -4
  165. package/dist/v2/{server-rxcq4t50.js → server-9ewkzqgd.js} +5 -5
  166. package/dist/v2/{server-kmapq3v0.js → server-bxpwy6fy.js} +18 -5
  167. package/dist/v2/{server-d6t16r89.js → server-d8tj10db.js} +1 -1
  168. package/dist/v2/{server-cxsr0ng6.js → server-da07v4xp.js} +1 -1
  169. package/dist/v2/{server-9e5r8y60.js → server-f2xf5gcb.js} +46 -2
  170. package/dist/v2/{server-hn9fb3v0.js → server-f7jfmrrz.js} +2 -2
  171. package/dist/v2/{server-f27he3j1.js → server-fa75w6gp.js} +4 -4
  172. package/dist/v2/{server-njnx39q2.js → server-gvkm8xaj.js} +189 -29
  173. package/dist/v2/{server-ckrb5rm8.js → server-h0410h0v.js} +1 -1
  174. package/dist/v2/{server-nveratm5.js → server-kn9n2qgd.js} +1 -1
  175. package/dist/v2/{server-wkhfyzpg.js → server-m97brnat.js} +9 -9
  176. package/dist/v2/{server-d3f4g62c.js → server-nmrm2rjy.js} +8 -8
  177. package/dist/v2/{server-bx59ezg6.js → server-prg55b7k.js} +16 -6
  178. package/dist/v2/{server-89fcbe37.js → server-pwv4ezb0.js} +1 -1
  179. package/dist/v2/{server-r5p3b1wy.js → server-qd11g795.js} +29 -1
  180. package/dist/v2/{server-988cqjme.js → server-rrqpvwqd.js} +2 -2
  181. package/dist/v2/{server-sg68np13.js → server-sz8jj92q.js} +140 -17
  182. package/dist/v2/{server-jc8v585p.js → server-th4y11y7.js} +15 -15
  183. package/dist/v2/{server-ewqshbs8.js → server-vknbt0gq.js} +5 -5
  184. package/dist/v2/{server-63ha7f0f.js → server-yrvqaswb.js} +1 -1
  185. package/dist/v2/{server-xqf2d2mg.js → server-zs8d0s3b.js} +2 -2
  186. package/dist/v2/server.d.ts.map +1 -1
  187. package/dist/v2/server.js +13 -6
  188. package/dist/v2/{storage-tags-c4zfcxv4.js → storage-tags-a2gq6dw7.js} +6 -4
  189. package/dist/v2/{task-config-x0hq3qfd.js → task-config-nvz8mapa.js} +6 -2
  190. package/dist/v2/{wrapup-orchestrator-87q9d5e2.js → wrapup-orchestrator-r82y780v.js} +30 -29
  191. package/dist/wrapup-orchestrator-vmt6z3q5.js +47 -0
  192. package/package.json +1 -1
  193. package/src/agents/smart-notes-dreamer-gate.fixture.ts +171 -0
  194. package/src/agents/smart-notes-dreamer-gate.golden.json +245 -0
  195. package/src/agents/smart-notes-dreamer-gate.test.ts +161 -0
  196. package/src/config/agent-disable.ts +13 -0
  197. package/src/config/dependency-notes.test.ts +114 -0
  198. package/src/config/dependency-notes.ts +80 -0
  199. package/src/config/schema/magic-context.ts +23 -14
  200. package/src/features/magic-context/dreamer/task-registry.ts +40 -0
  201. package/src/shared/data-path.test.ts +35 -1
  202. package/src/shared/data-path.ts +57 -1
  203. package/dist/embedding-backfill-fjbfh1dt.js +0 -21
  204. package/dist/v2/embedding-backfill-xcw3t6hp.js +0 -20
  205. package/dist/v2/recomp-orchestrator-n0pq36f0.js +0 -59
  206. package/dist/wrapup-orchestrator-jqapepw0.js +0 -47
@@ -0,0 +1,49 @@
1
+ // src/config/agent-disable.ts
2
+ var COMPACTION_ENABLED_PATH = `compaction${"."}enabled`;
3
+ function isDreamerRunnable(config) {
4
+ return !!config.dreamer && config.dreamer.disable !== true;
5
+ }
6
+ function isSmartNoteSurfaceAvailable(config) {
7
+ return config.smart_notes?.enabled !== false && isDreamerRunnable(config);
8
+ }
9
+ function isCompactionEnabled(config) {
10
+ return config.compaction?.enabled !== false;
11
+ }
12
+ function clonePlainObject(value) {
13
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
14
+ return;
15
+ }
16
+ return { ...value };
17
+ }
18
+ function migrateLegacyEnabledForAgent(args) {
19
+ const agent = clonePlainObject(args.patched[args.agentName]);
20
+ if (!agent || !("enabled" in agent))
21
+ return;
22
+ const enabled = agent.enabled;
23
+ const disable = agent.disable;
24
+ delete agent.enabled;
25
+ if (args.agentName === "historian") {
26
+ args.warnings.push('Removed invalid "historian.enabled" in-memory (run doctor to persist).');
27
+ args.patched.historian = agent;
28
+ return;
29
+ }
30
+ if (disable !== true && enabled === false) {
31
+ agent.disable = true;
32
+ args.warnings.push('Migrated "dreamer.enabled=false" → "dreamer.disable=true" in-memory (run doctor to persist). This now also disables manual /ctx-dream; for manual-only remove disable and set schedule="".');
33
+ }
34
+ args.patched.dreamer = agent;
35
+ }
36
+ function migrateLegacyAgentEnabledInMemory(rawConfig, warnings) {
37
+ const shouldPatch = ["dreamer", "historian"].some((key) => {
38
+ const agent = rawConfig[key];
39
+ return typeof agent === "object" && agent !== null && !Array.isArray(agent) && "enabled" in agent;
40
+ });
41
+ if (!shouldPatch)
42
+ return rawConfig;
43
+ const patched = { ...rawConfig };
44
+ migrateLegacyEnabledForAgent({ patched, agentName: "dreamer", warnings });
45
+ migrateLegacyEnabledForAgent({ patched, agentName: "historian", warnings });
46
+ return patched;
47
+ }
48
+
49
+ export { COMPACTION_ENABLED_PATH, isDreamerRunnable, isSmartNoteSurfaceAvailable, isCompactionEnabled, migrateLegacyAgentEnabledInMemory };
@@ -6,21 +6,21 @@ import {
6
6
  StaleRouteHandleError,
7
7
  SubcClient,
8
8
  isConsumerReconnectTransient
9
- } from "./server-988cqjme.js";
9
+ } from "./server-rrqpvwqd.js";
10
10
  import {
11
11
  getHarness2
12
12
  } from "./server-pavzsdc6.js";
13
13
  import {
14
14
  getDataDir,
15
15
  log2
16
- } from "./server-9e5r8y60.js";
16
+ } from "./server-f2xf5gcb.js";
17
17
  import {
18
18
  inRootAsyncContext2
19
19
  } from "./server-wafzvyhg.js";
20
20
  import {
21
21
  buildCanonicalChunkTextFromFts,
22
22
  loadCompartmentChunkEmbeddingsForSearch
23
- } from "./server-ewqshbs8.js";
23
+ } from "./server-vknbt0gq.js";
24
24
  import {
25
25
  recordEmbeddingMeasurement,
26
26
  saveCommitEmbedding,
@@ -37,7 +37,7 @@ import {
37
37
  enqueueShadowEmbeddingItems2,
38
38
  getProjectEmbeddingSnapshot2,
39
39
  embedItemsForProject2
40
- } from "./server-sg68np13.js";
40
+ } from "./server-sz8jj92q.js";
41
41
  import {
42
42
  getProjectEmbeddings2
43
43
  } from "./server-4dhv7mqz.js";
@@ -46,7 +46,7 @@ import {
46
46
  isEmbeddingEnabled,
47
47
  embedText,
48
48
  ensureMemoryEmbeddings2
49
- } from "./server-rxcq4t50.js";
49
+ } from "./server-9ewkzqgd.js";
50
50
  import {
51
51
  ModuleMemoryAuthorityError2,
52
52
  getMemoriesByProject2,
@@ -61,20 +61,20 @@ import {
61
61
  sanitizeFtsQuery,
62
62
  searchMemoriesFTS,
63
63
  searchMemoriesFTSUnion
64
- } from "./server-kn7skz9r.js";
64
+ } from "./server-4c10404h.js";
65
65
  import {
66
66
  isRecord
67
- } from "./server-kmapq3v0.js";
67
+ } from "./server-bxpwy6fy.js";
68
68
  import {
69
69
  getIndexedMessageCorpusSize2
70
- } from "./server-d3f4g62c.js";
70
+ } from "./server-nmrm2rjy.js";
71
71
  import {
72
72
  resolveWorkspaceShareCategories,
73
73
  resolveWorkspaceIdentitySet,
74
74
  expandWorkspaceIdentitySetWithAliases,
75
75
  resolveStoredPathWorkspaceIdentity,
76
76
  sourceNameForMemory
77
- } from "./server-f27he3j1.js";
77
+ } from "./server-fa75w6gp.js";
78
78
  import {
79
79
  isKnownAutocommit
80
80
  } from "./server-8ajstryz.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_LOCAL_EMBEDDING_MODEL
3
- } from "./server-jc8v585p.js";
3
+ } from "./server-th4y11y7.js";
4
4
  import {
5
5
  getHarness2
6
6
  } from "./server-pavzsdc6.js";
@@ -8,10 +8,10 @@ import {
8
8
  getMagicContextStorageDir,
9
9
  importPluginModule,
10
10
  log2
11
- } from "./server-9e5r8y60.js";
11
+ } from "./server-f2xf5gcb.js";
12
12
  import {
13
13
  getSynapseLaneIdentity
14
- } from "./server-988cqjme.js";
14
+ } from "./server-rrqpvwqd.js";
15
15
  import {
16
16
  inRootAsyncContext2
17
17
  } from "./server-wafzvyhg.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  log2
3
- } from "./server-9e5r8y60.js";
3
+ } from "./server-f2xf5gcb.js";
4
4
  import {
5
5
  setOutputReserveConfig
6
- } from "./server-nveratm5.js";
6
+ } from "./server-kn9n2qgd.js";
7
7
  import {
8
8
  DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE,
9
9
  PROTECTED_TOKENS_MIN,
@@ -11,15 +11,19 @@ import {
11
11
  PER_HARNESS_MODEL_KEYS,
12
12
  ConfigProfilesSchema,
13
13
  MagicContextConfigSchema
14
- } from "./server-jc8v585p.js";
14
+ } from "./server-th4y11y7.js";
15
+ import {
16
+ isCompactionEnabled,
17
+ migrateLegacyAgentEnabledInMemory
18
+ } from "./server-0s95v3en.js";
15
19
 
16
20
  // src/config/index.ts
17
21
  import { existsSync as existsSync4 } from "node:fs";
18
22
 
19
23
  // src/shared/builtin-commands.ts
20
- var COMPACTION_ENABLED_PATH2 = `compaction${".enabled"}`;
24
+ var COMPACTION_ENABLED_PATH = `compaction${".enabled"}`;
21
25
  function getMagicContextBuiltinCommands(compactionEnabled = true) {
22
- const unavailableInCompactionOff = (command) => `Unavailable when ${COMPACTION_ENABLED_PATH2} is false: /${command} manages compacted history.`;
26
+ const unavailableInCompactionOff = (command) => `Unavailable when ${COMPACTION_ENABLED_PATH} is false: /${command} manages compacted history.`;
23
27
  return {
24
28
  "ctx-status": {
25
29
  template: "ctx-status",
@@ -1638,51 +1642,6 @@ function detectConfigFile(basePath) {
1638
1642
  return { format: "none", path: jsoncPath };
1639
1643
  }
1640
1644
 
1641
- // src/config/agent-disable.ts
1642
- var COMPACTION_ENABLED_PATH = `compaction${"."}enabled`;
1643
- function isDreamerRunnable(config) {
1644
- return !!config.dreamer && config.dreamer.disable !== true;
1645
- }
1646
- function isCompactionEnabled(config) {
1647
- return config.compaction?.enabled !== false;
1648
- }
1649
- function clonePlainObject(value) {
1650
- if (typeof value !== "object" || value === null || Array.isArray(value)) {
1651
- return;
1652
- }
1653
- return { ...value };
1654
- }
1655
- function migrateLegacyEnabledForAgent(args) {
1656
- const agent = clonePlainObject(args.patched[args.agentName]);
1657
- if (!agent || !("enabled" in agent))
1658
- return;
1659
- const enabled = agent.enabled;
1660
- const disable = agent.disable;
1661
- delete agent.enabled;
1662
- if (args.agentName === "historian") {
1663
- args.warnings.push('Removed invalid "historian.enabled" in-memory (run doctor to persist).');
1664
- args.patched.historian = agent;
1665
- return;
1666
- }
1667
- if (disable !== true && enabled === false) {
1668
- agent.disable = true;
1669
- args.warnings.push('Migrated "dreamer.enabled=false" → "dreamer.disable=true" in-memory (run doctor to persist). This now also disables manual /ctx-dream; for manual-only remove disable and set schedule="".');
1670
- }
1671
- args.patched.dreamer = agent;
1672
- }
1673
- function migrateLegacyAgentEnabledInMemory(rawConfig, warnings) {
1674
- const shouldPatch = ["dreamer", "historian"].some((key) => {
1675
- const agent = rawConfig[key];
1676
- return typeof agent === "object" && agent !== null && !Array.isArray(agent) && "enabled" in agent;
1677
- });
1678
- if (!shouldPatch)
1679
- return rawConfig;
1680
- const patched = { ...rawConfig };
1681
- migrateLegacyEnabledForAgent({ patched, agentName: "dreamer", warnings });
1682
- migrateLegacyEnabledForAgent({ patched, agentName: "historian", warnings });
1683
- return patched;
1684
- }
1685
-
1686
1645
  // src/config/deprecated-config.ts
1687
1646
  var MURAL_MODEL_DEPRECATION_WARNING = "mural.model is deprecated and ignored; compress-cues now uses the dreamer model for each harness, like every other dreamer task. To override it, set dreamer.opencode.tasks.compress-cues.model (or the pi/omp equivalent). This key no longer does anything; remove it.";
1688
1647
  var WINDOW_OVERLAY_PATH_DEPRECATION_WARNING = "models.window_overlay_path is deprecated and ignored; Fusiform no longer publishes window-overlay data, so this setting no longer changes model window geometry. Remove this key.";
@@ -3884,4 +3843,4 @@ function loadPluginConfigDetailed(directory, applyRuntimeGlobals = true) {
3884
3843
  };
3885
3844
  }
3886
3845
 
3887
- export { getMagicContextBuiltinCommands, parseJsoncRecovering, readJsoncFile, detectConfigFile, COMPACTION_ENABLED_PATH, isDreamerRunnable, isCompactionEnabled, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, resolveLegacyConfigSourcesForHarness, getProtectedTokensTierOverrides, loadPluginConfigDetailed };
3846
+ export { getMagicContextBuiltinCommands, parseJsoncRecovering, readJsoncFile, detectConfigFile, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, resolveLegacyConfigSourcesForHarness, getProtectedTokensTierOverrides, loadPluginConfigDetailed };
@@ -11,13 +11,13 @@ import {
11
11
  import {
12
12
  sanitizeDiagnosticText,
13
13
  sessionLog2
14
- } from "./server-9e5r8y60.js";
14
+ } from "./server-f2xf5gcb.js";
15
15
  import {
16
16
  managedAuthorityNoteRow
17
- } from "./server-f27he3j1.js";
17
+ } from "./server-fa75w6gp.js";
18
18
  import {
19
19
  embedTextForProject2
20
- } from "./server-sg68np13.js";
20
+ } from "./server-sz8jj92q.js";
21
21
  import {
22
22
  saveEmbeddingIfHashMatches
23
23
  } from "./server-4dhv7mqz.js";
@@ -12,7 +12,7 @@ import {
12
12
  import {
13
13
  bootQuietRemainingMs,
14
14
  scheduleAfterBootQuiet
15
- } from "./server-njnx39q2.js";
15
+ } from "./server-gvkm8xaj.js";
16
16
  import {
17
17
  getHarness2,
18
18
  harnessOwnsOpenCodeStore2
@@ -24,7 +24,7 @@ import {
24
24
  importPluginModule,
25
25
  writeForwardedLogLine2,
26
26
  log2
27
- } from "./server-9e5r8y60.js";
27
+ } from "./server-f2xf5gcb.js";
28
28
  import {
29
29
  isOwnRpcServerRecord,
30
30
  isPidAlive,
@@ -35,13 +35,13 @@ import {
35
35
  parseRpcPortFile,
36
36
  inspectProcessesAsync,
37
37
  inspectWindowsProcessesSync
38
- } from "./server-cxsr0ng6.js";
38
+ } from "./server-da07v4xp.js";
39
39
  import {
40
40
  configureContextDatabasePragmas2
41
41
  } from "./server-fb3zxn06.js";
42
42
  import {
43
43
  startMessageFtsRowidMapBackfill
44
- } from "./server-63ha7f0f.js";
44
+ } from "./server-yrvqaswb.js";
45
45
  import {
46
46
  LKG_SLOT_CHUNKS_DDL,
47
47
  SESSION_REPLAY_DECISIONS_DDL,
@@ -51,12 +51,12 @@ import {
51
51
  hasPendingMigrations,
52
52
  getMainThreadMigrationBodyCount,
53
53
  runMigrations
54
- } from "./server-f27he3j1.js";
54
+ } from "./server-fa75w6gp.js";
55
55
  import {
56
56
  ensureColumn,
57
57
  installV95PerfSchema,
58
58
  installTagIdentityRevisionTrigger
59
- } from "./server-89fcbe37.js";
59
+ } from "./server-pwv4ezb0.js";
60
60
  import {
61
61
  resolveOpenCodeDbPath,
62
62
  hasV1MessageTables
@@ -64,7 +64,7 @@ import {
64
64
  import {
65
65
  setDatabase,
66
66
  loadToolDefinitionMeasurements
67
- } from "./server-xqf2d2mg.js";
67
+ } from "./server-zs8d0s3b.js";
68
68
  import {
69
69
  getErrorMessage
70
70
  } from "./server-y8v6yerm.js";
@@ -81,7 +81,7 @@ import {
81
81
  } from "./server-8ajstryz.js";
82
82
  import {
83
83
  logSlowWriteTransaction
84
- } from "./server-7dv9wt9r.js";
84
+ } from "./server-6pmqg9m4.js";
85
85
 
86
86
  // src/features/magic-context/storage-db.ts
87
87
  import {
@@ -1212,8 +1212,8 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1212
1212
  startMessageFtsRowidMapBackfill(db).then(async () => {
1213
1213
  if (!readsOpenCodeStore)
1214
1214
  return;
1215
- const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-8d3v87vr.js"));
1216
- const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-rz1pnpaj.js"));
1215
+ const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-hr3w5bjk.js"));
1216
+ const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-bsteyc4d.js"));
1217
1217
  await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
1218
1218
  readPage: readRawSessionMessagePage
1219
1219
  }));