@cortexkit/opencode-magic-context 0.49.93 → 0.49.96

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 (256) hide show
  1. package/dist/{announcement-4ynkaf0d.js → announcement-8nj2jd87.js} +5 -5
  2. package/dist/auto-search-worker.js +5 -5
  3. package/dist/chunk-embedding-write-worker.js +16 -16
  4. package/dist/{compaction-marker-candidates-1ndjqh9k.js → compaction-marker-candidates-a4b0anvv.js} +3 -3
  5. package/dist/compaction-marker-candidates-worker.js +1 -1
  6. package/dist/{compartment-chunk-embedding-rp4asvk0.js → compartment-chunk-embedding-re2cw7y3.js} +8 -8
  7. package/dist/config/removed-agent-config.d.ts +1 -1
  8. package/dist/config/removed-agent-config.d.ts.map +1 -1
  9. package/dist/config/schema/magic-context.d.ts +0 -75
  10. package/dist/config/schema/magic-context.d.ts.map +1 -1
  11. package/dist/{conflict-warning-hook-exf96bpt.js → conflict-warning-hook-wcq55y61.js} +8 -8
  12. package/dist/{context-jpxthqxg.js → context-gtjdrp8f.js} +237 -140
  13. package/dist/{derive-budgets-hzzq71rm.js → derive-budgets-g1sy72e8.js} +5 -5
  14. package/dist/embedding-backfill-pdymqbnh.js +29 -0
  15. package/dist/embedding-worker-process.js +2 -2
  16. package/dist/embedding-worker.js +8 -8
  17. package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
  18. package/dist/features/magic-context/dreamer/docs-proposals.d.ts +5 -2
  19. package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -1
  20. package/dist/features/magic-context/dreamer/token-budget.d.ts +2 -2
  21. package/dist/features/magic-context/dreamer/token-budget.d.ts.map +1 -1
  22. package/dist/features/magic-context/history-gap-recovery.d.ts +42 -0
  23. package/dist/features/magic-context/history-gap-recovery.d.ts.map +1 -0
  24. package/dist/features/magic-context/memory/embedding-synapse.d.ts +18 -5
  25. package/dist/features/magic-context/memory/embedding-synapse.d.ts.map +1 -1
  26. package/dist/features/magic-context/message-visibility.d.ts +10 -0
  27. package/dist/features/magic-context/message-visibility.d.ts.map +1 -0
  28. package/dist/features/magic-context/search-rerank.d.ts +2 -2
  29. package/dist/features/magic-context/search-rerank.d.ts.map +1 -1
  30. package/dist/features/magic-context/search.d.ts +4 -0
  31. package/dist/features/magic-context/search.d.ts.map +1 -1
  32. package/dist/features/magic-context/session-decision-calibration.d.ts.map +1 -1
  33. package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -1
  34. package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -1
  35. package/dist/{history-owner-xqfsvf9k.js → history-owner-74826t4n.js} +3 -3
  36. package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
  37. package/dist/hooks/magic-context/compartment-trigger.d.ts +1 -1
  38. package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
  39. package/dist/hooks/magic-context/history-boundary-repair.d.ts +2 -2
  40. package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
  41. package/dist/hooks/magic-context/hook.d.ts.map +1 -1
  42. package/dist/hooks/magic-context/inject-compartments.d.ts +6 -1
  43. package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
  44. package/dist/hooks/magic-context/lkg-persist.d.ts +3 -1
  45. package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
  46. package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +1 -0
  47. package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
  48. package/dist/hooks/magic-context/lkg-replay.d.ts +3 -0
  49. package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
  50. package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts +1 -0
  51. package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
  52. package/dist/hooks/magic-context/tail-hygiene-output-count.d.ts +4 -0
  53. package/dist/hooks/magic-context/tail-hygiene-output-count.d.ts.map +1 -1
  54. package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +2 -0
  55. package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
  56. package/dist/hooks/magic-context/transform-compartment-phase.d.ts +2 -1
  57. package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
  58. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
  59. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  60. package/dist/hooks/magic-context/transform-stage-logger.d.ts +6 -0
  61. package/dist/hooks/magic-context/transform-stage-logger.d.ts.map +1 -1
  62. package/dist/hooks/magic-context/transform.d.ts +2 -0
  63. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  64. package/dist/{index-5zrzg8r1.js → index-0bjj9yf3.js} +2 -2
  65. package/dist/{index-g9qtxv87.js → index-0sqhg9nf.js} +132 -64
  66. package/dist/{index-nxxzeq4y.js → index-0ve29s6f.js} +1 -1
  67. package/dist/{index-g6y2wk32.js → index-2afrmgy3.js} +6 -6
  68. package/dist/{index-ywrz4wy2.js → index-3fhb0j32.js} +1 -1
  69. package/dist/{index-gqf8r04r.js → index-3n4j5rqc.js} +1 -1
  70. package/dist/{index-xsqw8kbd.js → index-45qgkg8j.js} +2 -2
  71. package/dist/{index-5df2fw5b.js → index-6mryx739.js} +1 -1
  72. package/dist/{index-n9kd68vc.js → index-7m2tnk8q.js} +10 -10
  73. package/dist/{index-r4y0dczp.js → index-7sdns2ww.js} +2 -2
  74. package/dist/{index-mjy2k9jr.js → index-880a24vd.js} +1 -1
  75. package/dist/{index-pnawfv4e.js → index-89bkkgcn.js} +4 -4
  76. package/dist/{index-s32f8y67.js → index-89xg64wb.js} +2 -2
  77. package/dist/{index-hee64h6k.js → index-8sgv96kq.js} +7 -7
  78. package/dist/{index-ttdk2w0z.js → index-910gahfb.js} +6 -6
  79. package/dist/{index-kty5k23y.js → index-9jvxq5rt.js} +4 -4
  80. package/dist/{index-832w615x.js → index-azkfw78y.js} +1 -1
  81. package/dist/{index-wh9fxds5.js → index-c205x7xd.js} +1 -1
  82. package/dist/{index-mg9s2rc3.js → index-cpbr0xvk.js} +2 -2
  83. package/dist/{index-g5c67kay.js → index-cq8znmyw.js} +17 -17
  84. package/dist/{index-cr483vx6.js → index-dj64gzg5.js} +2 -2
  85. package/dist/{index-jba6ny4m.js → index-dnpcv1rg.js} +4 -4
  86. package/dist/{index-z4p0ry94.js → index-dt7cyqfe.js} +2 -1
  87. package/dist/{index-j2w79s9r.js → index-e6ay1gez.js} +2 -2
  88. package/dist/{index-y2vshk67.js → index-f154w8m4.js} +229 -84
  89. package/dist/{index-6r99v53h.js → index-fgw241hh.js} +164 -62
  90. package/dist/{index-rz47hf2m.js → index-fvfnq8n6.js} +30 -14
  91. package/dist/{index-yqha238s.js → index-gnrwgvn7.js} +127 -17
  92. package/dist/{index-fpjnjxyx.js → index-h7kta6cn.js} +3 -3
  93. package/dist/{index-q7q6qp1f.js → index-hedgz8an.js} +1 -1
  94. package/dist/{index-5pgyqgmx.js → index-hj78hvhm.js} +2 -2
  95. package/dist/{index-dr6bd4c8.js → index-hp46xe93.js} +7 -7
  96. package/dist/{index-0twg41mh.js → index-j4dcjb8t.js} +4 -4
  97. package/dist/{index-e6ncz7a6.js → index-jzrvdqb8.js} +1 -1
  98. package/dist/{index-sp5pvs95.js → index-k34hc455.js} +2 -2
  99. package/dist/{index-9ffntwyr.js → index-kj4bprep.js} +4 -4
  100. package/dist/index-mgy7g740.js +119 -0
  101. package/dist/{index-za1yx1m4.js → index-nqdwpdje.js} +154 -32
  102. package/dist/{index-hes3k87g.js → index-r1d45dsr.js} +4 -4
  103. package/dist/{index-y915t3ey.js → index-r3f85n7y.js} +5 -1
  104. package/dist/{index-1kem0xxx.js → index-t2e10rag.js} +5 -5
  105. package/dist/{index-m0pwswv9.js → index-tqtpgnhr.js} +1 -1
  106. package/dist/{index-01h7tqe3.js → index-tr4ep2ej.js} +21 -6
  107. package/dist/{index-xr1t0fxb.js → index-w7n7qkpf.js} +49 -13
  108. package/dist/{index-s7460efs.js → index-zfx7mtqa.js} +1 -1
  109. package/dist/{index-gqfy38m9.js → index-zkjx8gq3.js} +11 -11
  110. package/dist/{index-et39x9k3.js → index-zmgp0tr6.js} +3 -3
  111. package/dist/index.js +59 -56
  112. package/dist/{logger-d7c8akh9.js → logger-nmb2508f.js} +2 -2
  113. package/dist/{message-fts-rowid-map-0xx8ge09.js → message-fts-rowid-map-vcatdan0.js} +5 -5
  114. package/dist/{message-index-bounded-vjrnptar.js → message-index-bounded-abhwe610.js} +12 -12
  115. package/dist/{message-time-backfill-pz5981mf.js → message-time-backfill-zc5rsvhv.js} +3 -3
  116. package/dist/migration-worker.js +13 -13
  117. package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
  118. package/dist/{project-embedding-registry-m8zcmrsg.js → project-embedding-registry-e566q4bg.js} +15 -15
  119. package/dist/raw-ordinal-warmup-worker.js +9 -9
  120. package/dist/{read-session-chunk-zkzdc0e5.js → read-session-chunk-sde0wym3.js} +10 -10
  121. package/dist/{read-session-raw-3sc9231y.js → read-session-raw-trhdgc9z.js} +3 -3
  122. package/dist/recomp-orchestrator-d3rbpa59.js +69 -0
  123. package/dist/render-6cf1dgc4.js +43 -0
  124. package/dist/{safe-notification-target-d21swr3n.js → safe-notification-target-54ns7dv9.js} +3 -3
  125. package/dist/{search-e9bb9hpx.js → search-11aw8wpq.js} +27 -27
  126. package/dist/search-archive-s9m5szf0.js +29 -0
  127. package/dist/{send-session-notification-0779tyd9.js → send-session-notification-gxrj4w1r.js} +6 -6
  128. package/dist/shared/host-sqlite-runtime.d.ts +3 -0
  129. package/dist/shared/host-sqlite-runtime.d.ts.map +1 -0
  130. package/dist/shared/redaction.d.ts.map +1 -1
  131. package/dist/shared/storage-file-mutex.d.ts.map +1 -1
  132. package/dist/{storage-tags-gk7gjkqt.js → storage-tags-jq0c0zsn.js} +7 -7
  133. package/dist/{store-yr443ye8.js → store-29ksp6vy.js} +4 -4
  134. package/dist/{store-reader-qbq6q4v0.js → store-reader-dgh3ssxx.js} +1 -1
  135. package/dist/tools/ctx-expand/search-archive.d.ts +3 -2
  136. package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -1
  137. package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
  138. package/dist/tools/ctx-expand/v2-archive-reader.d.ts +2 -0
  139. package/dist/tools/ctx-expand/v2-archive-reader.d.ts.map +1 -1
  140. package/dist/tools/ctx-search/tools.d.ts.map +1 -1
  141. package/dist/{transform-postprocess-phase-neds90e3.js → transform-postprocess-phase-376xn40x.js} +35 -35
  142. package/dist/v2/auto-search-worker.js +5 -5
  143. package/dist/v2/chunk-embedding-write-worker.js +16 -16
  144. package/dist/v2/{compaction-marker-candidates-bp1bn579.js → compaction-marker-candidates-6nypmsr3.js} +3 -3
  145. package/dist/v2/compaction-marker-candidates-worker.js +1 -1
  146. package/dist/v2/{compartment-chunk-embedding-w7ht0t9v.js → compartment-chunk-embedding-jthtfhcd.js} +8 -8
  147. package/dist/v2/{context-ctsd80vc.js → context-vm09agrs.js} +426 -185
  148. package/dist/v2/{derive-budgets-hr4qqrnv.js → derive-budgets-wj0q7s7d.js} +6 -6
  149. package/dist/v2/embedding-backfill-16b16m38.js +29 -0
  150. package/dist/v2/embedding-worker-process.js +2 -2
  151. package/dist/v2/embedding-worker.js +8 -8
  152. package/dist/v2/fold/memory-cache.d.ts +2 -0
  153. package/dist/v2/fold/memory-cache.d.ts.map +1 -1
  154. package/dist/v2/fold/native-replay.d.ts +23 -5
  155. package/dist/v2/fold/native-replay.d.ts.map +1 -1
  156. package/dist/v2/hidden-child-native.d.ts.map +1 -1
  157. package/dist/v2/hidden-child-record.d.ts +8 -0
  158. package/dist/v2/hidden-child-record.d.ts.map +1 -1
  159. package/dist/v2/hidden-completion.d.ts.map +1 -1
  160. package/dist/v2/hidden-run-holder.d.ts +8 -2
  161. package/dist/v2/hidden-run-holder.d.ts.map +1 -1
  162. package/dist/v2/{history-owner-260djmv5.js → history-owner-8pd5ax3n.js} +3 -3
  163. package/dist/v2/hooks/context.d.ts.map +1 -1
  164. package/dist/v2/hooks/hidden-child.d.ts +3 -0
  165. package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
  166. package/dist/v2/hooks/revert-message-state.d.ts.map +1 -1
  167. package/dist/v2/hooks/session-project-backfill.d.ts +2 -1
  168. package/dist/v2/hooks/session-project-backfill.d.ts.map +1 -1
  169. package/dist/v2/{logger-zyf43np1.js → logger-58jfese9.js} +2 -2
  170. package/dist/v2/{message-fts-rowid-map-n8mcvcpz.js → message-fts-rowid-map-ax4vk78j.js} +5 -5
  171. package/dist/v2/{message-index-bounded-1vew9c37.js → message-index-bounded-qh794qxx.js} +12 -12
  172. package/dist/v2/{message-time-backfill-ynb3vg6r.js → message-time-backfill-yj773saf.js} +3 -3
  173. package/dist/v2/migration-worker.js +13 -13
  174. package/dist/v2/{project-embedding-registry-je5jam7y.js → project-embedding-registry-z05xvckg.js} +15 -15
  175. package/dist/v2/raw-ordinal-warmup-worker.js +9 -9
  176. package/dist/v2/{read-session-chunk-09sre4xv.js → read-session-chunk-8tn2dbn1.js} +10 -10
  177. package/dist/v2/{read-session-raw-wg5zc29f.js → read-session-raw-ywebck9q.js} +3 -3
  178. package/dist/v2/recomp-orchestrator-pfjpzdrb.js +69 -0
  179. package/dist/v2/render-7t5d7hkv.js +43 -0
  180. package/dist/v2/{safe-notification-target-y55z2zat.js → safe-notification-target-zrwbh6k7.js} +3 -3
  181. package/dist/v2/{search-gmye6n25.js → search-35cz80x0.js} +26 -26
  182. package/dist/v2/search-archive-5dpxv0ck.js +29 -0
  183. package/dist/v2/{send-session-notification-v69y04f5.js → send-session-notification-8x146x5y.js} +6 -6
  184. package/dist/v2/{server-z9czv2vb.js → server-11ra1pmx.js} +49 -13
  185. package/dist/v2/{server-gs2251jr.js → server-2cq3e1c1.js} +4 -4
  186. package/dist/v2/{server-39bcszk4.js → server-2qvnr3t7.js} +1 -1
  187. package/dist/v2/{server-jkj1dq6j.js → server-2sare4qg.js} +4 -4
  188. package/dist/v2/{server-jdfe07mp.js → server-2wz6y46g.js} +1 -1
  189. package/dist/v2/{server-at0v0z4t.js → server-379fd3n7.js} +1 -1
  190. package/dist/v2/{server-ds8vpfkr.js → server-40vdz8sf.js} +2 -2
  191. package/dist/v2/{server-qntmqaca.js → server-4yrvbnnm.js} +2 -2
  192. package/dist/v2/{server-x69fqsvz.js → server-5t4nzfpt.js} +1 -1
  193. package/dist/v2/{server-npdey91q.js → server-63ree5ns.js} +1 -1
  194. package/dist/v2/{server-gqkdfdvw.js → server-6qax5pds.js} +2 -2
  195. package/dist/v2/{server-qb3s0mnc.js → server-73bqw5c0.js} +1 -1
  196. package/dist/v2/{server-6chcnnhq.js → server-7h4gwphm.js} +4 -4
  197. package/dist/v2/{server-rkj44mez.js → server-7tj8yzrv.js} +2 -2
  198. package/dist/v2/{server-e6xneh68.js → server-arfzfxe8.js} +5 -1
  199. package/dist/v2/{server-6ash6z8z.js → server-av3p9c8k.js} +1 -1
  200. package/dist/v2/{server-5hwf5c7r.js → server-bx5k66qc.js} +1 -1
  201. package/dist/v2/{server-dgsjamm4.js → server-db91dxwc.js} +7 -7
  202. package/dist/v2/{server-z4p0ry94.js → server-dt7cyqfe.js} +2 -1
  203. package/dist/v2/{server-k1xc2bw1.js → server-ganavh75.js} +2 -2
  204. package/dist/v2/{server-6x40bnb7.js → server-gh2w75fn.js} +3 -3
  205. package/dist/v2/server-j1gxs1gj.js +119 -0
  206. package/dist/v2/{server-ps6zrzwj.js → server-k3ntgf6n.js} +164 -62
  207. package/dist/v2/{server-j8376q08.js → server-kzrrdjp5.js} +1 -1
  208. package/dist/v2/{server-1rrmxhd1.js → server-n33hyq9t.js} +2 -2
  209. package/dist/v2/{server-0tv6kytx.js → server-n34vzyfm.js} +1 -1
  210. package/dist/v2/{server-vc5fta6s.js → server-nnh81jqy.js} +6 -6
  211. package/dist/v2/{server-g53asaqt.js → server-pcq2d1wh.js} +30 -14
  212. package/dist/v2/{server-bnkc9kph.js → server-ppy2dj7g.js} +6 -6
  213. package/dist/v2/{server-96nm9vk4.js → server-rr5c0xcg.js} +2 -2
  214. package/dist/v2/{server-j4jjtdc5.js → server-rt8t6s2a.js} +2 -2
  215. package/dist/v2/{server-2xm0gxke.js → server-svccj9rd.js} +4 -4
  216. package/dist/v2/{server-5sbsnpkn.js → server-tq523gj6.js} +1 -1
  217. package/dist/v2/{server-00adcfjd.js → server-vj0xbbrc.js} +17 -3
  218. package/dist/v2/{server-4ecpanyn.js → server-vntc961c.js} +127 -17
  219. package/dist/v2/{server-btgnkr9z.js → server-vsx9tsks.js} +11 -11
  220. package/dist/v2/{server-vtgeyhq6.js → server-vtkbxzw1.js} +21 -6
  221. package/dist/v2/{server-cvp9w5gs.js → server-w35ep6wn.js} +192 -84
  222. package/dist/v2/{server-myp4pc6x.js → server-z2nv8jdv.js} +132 -64
  223. package/dist/v2/{server-pcarsvj2.js → server-z5cv5wm5.js} +10 -10
  224. package/dist/v2/{server-barj0mjz.js → server-zemnpv92.js} +4 -4
  225. package/dist/v2/server.js +9 -9
  226. package/dist/v2/{storage-tags-nccqr0kr.js → storage-tags-pcenytad.js} +7 -7
  227. package/dist/v2/{store-enef5jcn.js → store-gx19qc3a.js} +4 -4
  228. package/dist/v2/{store-reader-jbaqv1yp.js → store-reader-qt2msa8z.js} +1 -1
  229. package/dist/v2/store-reader.d.ts +1 -1
  230. package/dist/v2/store-reader.d.ts.map +1 -1
  231. package/dist/v2/{v2-archive-reader-7vmng8q7.js → v2-archive-reader-jqrwz7b8.js} +1 -1
  232. package/dist/v2/{wrapup-orchestrator-7r4y0bf6.js → wrapup-orchestrator-kcq3cv7y.js} +35 -35
  233. package/dist/{v2-archive-reader-7s90gfax.js → v2-archive-reader-64h2gtam.js} +1 -1
  234. package/dist/wrapup-orchestrator-knyac7jp.js +56 -0
  235. package/package.json +1 -1
  236. package/src/config/index.test.ts +23 -5
  237. package/src/config/live-run-config.test.ts +7 -7
  238. package/src/config/removed-agent-config.ts +14 -1
  239. package/src/config/schema/magic-context.ts +5 -1
  240. package/src/shared/host-sqlite-runtime.test.ts +21 -0
  241. package/src/shared/host-sqlite-runtime.ts +32 -0
  242. package/src/shared/redaction.test.ts +11 -8
  243. package/src/shared/redaction.ts +5 -1
  244. package/src/shared/storage-file-mutex-review.test.ts +110 -0
  245. package/src/shared/storage-file-mutex.ts +12 -0
  246. package/dist/embedding-backfill-6wzc4p2n.js +0 -29
  247. package/dist/index-52x68mj4.js +0 -58
  248. package/dist/recomp-orchestrator-qb2hymj5.js +0 -69
  249. package/dist/render-34p0kek8.js +0 -43
  250. package/dist/search-archive-08ppk0q5.js +0 -27
  251. package/dist/v2/embedding-backfill-40g0anxh.js +0 -29
  252. package/dist/v2/recomp-orchestrator-mgcty3we.js +0 -69
  253. package/dist/v2/render-ygcmyn9x.js +0 -43
  254. package/dist/v2/search-archive-nrsqqmk5.js +0 -27
  255. package/dist/v2/server-52x68mj4.js +0 -58
  256. package/dist/wrapup-orchestrator-m2p89973.js +0 -56
@@ -10,13 +10,13 @@ import {
10
10
  tokenCountUsesByteBound,
11
11
  estimateTokens,
12
12
  createTokenCountMemo
13
- } from "./index-s7460efs.js";
13
+ } from "./index-zfx7mtqa.js";
14
14
  import {
15
15
  getHarness2
16
16
  } from "./index-pavzsdc6.js";
17
17
  import {
18
18
  sessionLog2
19
- } from "./index-ywrz4wy2.js";
19
+ } from "./index-3fhb0j32.js";
20
20
  import {
21
21
  tagIdentityRevisionKey,
22
22
  tagOrderConstraintIndex,
@@ -25,14 +25,14 @@ import {
25
25
  getToolDefinitionMeasurementSignature,
26
26
  getMeasuredToolDefinitionTokens,
27
27
  getSessionToolDefinitionTokens
28
- } from "./index-mg9s2rc3.js";
28
+ } from "./index-cpbr0xvk.js";
29
29
  import {
30
30
  resolveModelConfigValue,
31
31
  DEFAULT_PROTECTED_TOOLS,
32
32
  normalizeProtectedToolName,
33
33
  mergeProtectedTools,
34
34
  deriveDefaultProtectedTokens
35
- } from "./index-y915t3ey.js";
35
+ } from "./index-r3f85n7y.js";
36
36
  import {
37
37
  getTagIdentityWriteGeneration2,
38
38
  getSqliteDatabasePath2,
@@ -44,7 +44,7 @@ import {
44
44
  } from "./index-avwt563y.js";
45
45
  import {
46
46
  logSlowWriteTransaction
47
- } from "./index-m0pwswv9.js";
47
+ } from "./index-tqtpgnhr.js";
48
48
 
49
49
  // src/shared/record-type-guard.ts
50
50
  function isRecord(value) {
@@ -151,9 +151,13 @@ function isThinkingPart(part) {
151
151
  }
152
152
 
153
153
  // src/hooks/magic-context/tail-hygiene-output-count.ts
154
+ var CTX_REDUCE_OUTPUT = Symbol.for("magic-context.ctx-reduce-output");
155
+ function isCtxReduceTool(name) {
156
+ return normalizeProtectedToolName(name) === "ctx_reduce";
157
+ }
154
158
  var CURRENT_OUTPUT_COUNT = Symbol.for("magic-context.current-reclaimable-tool-output-count");
155
159
  function countReclaimableToolOutputs(parts) {
156
- return parts.filter((part) => part.kind === "toolOutput" && part.uTokens > 0).length;
160
+ return parts.filter((part) => part.kind === "toolOutput" && part.uTokens > 0 && !part[CTX_REDUCE_OUTPUT]).length;
157
161
  }
158
162
  function rememberCurrentToolOutputCount(baseline, measurement) {
159
163
  return Object.assign(baseline, {
@@ -1105,6 +1109,10 @@ function buildTagAttribution(args) {
1105
1109
  function reclaimableTailTokens(part) {
1106
1110
  return part.tagStatus === "active" && !part.protected && !part.queuedForDrop && part.kind !== "excluded" && part.kind !== "text" ? part.tokens : 0;
1107
1111
  }
1112
+ function isCtxReduceResult(part, tag) {
1113
+ const name = isRecord(part) ? part.type === "tool" ? part.tool : part.toolName : null;
1114
+ return isCtxReduceTool(typeof name === "string" ? name : tag?.toolName ?? null);
1115
+ }
1108
1116
  function snapshot(args) {
1109
1117
  const memo = memoizedContent(args.kind, args.content);
1110
1118
  const tag = args.tag;
@@ -1280,6 +1288,7 @@ function measureWithReplay(input, replay) {
1280
1288
  const tag = prior.kind === "text" ? attribution.messageTags.get(`${message.info.id}:p${partIndex}`) : prior.kind === "file" ? attribution.messageTags.get(`${message.info.id}:file${partIndex}`) : prior.kind === "toolInput" || prior.kind === "toolOutput" ? attribution.toolTagsByPart.get(message.parts[partIndex]) : undefined;
1281
1289
  const protectedPart = tag ? attribution.protectedNumbers.has(tag.tagNumber) : false;
1282
1290
  const queuedForDrop = tag ? pendingDropTagNumbers.has(tag.tagNumber) : false;
1291
+ const ctxReduceOutput = prior.kind === "toolOutput" && isCtxReduceResult(message.parts[partIndex], tag);
1283
1292
  const uTokens = reclaimableTailTokens({
1284
1293
  kind: prior.kind,
1285
1294
  tokens: prior.tokens,
@@ -1287,12 +1296,13 @@ function measureWithReplay(input, replay) {
1287
1296
  protected: protectedPart,
1288
1297
  queuedForDrop
1289
1298
  });
1290
- const measured = prior.tagNumber === (tag?.tagNumber ?? null) && prior.tagStatus === (tag?.status ?? null) && prior.protected === protectedPart && prior.queuedForDrop === queuedForDrop && prior.uTokens === uTokens ? prior : {
1299
+ const measured = prior.tagNumber === (tag?.tagNumber ?? null) && prior.tagStatus === (tag?.status ?? null) && prior.protected === protectedPart && prior.queuedForDrop === queuedForDrop && Boolean(prior[CTX_REDUCE_OUTPUT]) === ctxReduceOutput && prior.uTokens === uTokens ? prior : {
1291
1300
  ...prior,
1292
1301
  tagNumber: tag?.tagNumber ?? null,
1293
1302
  tagStatus: tag?.status ?? null,
1294
1303
  protected: protectedPart,
1295
1304
  queuedForDrop,
1305
+ ...ctxReduceOutput || prior[CTX_REDUCE_OUTPUT] ? { [CTX_REDUCE_OUTPUT]: ctxReduceOutput } : {},
1296
1306
  uTokens
1297
1307
  };
1298
1308
  parts.push(measured);
@@ -1398,6 +1408,8 @@ function measureWithReplay(input, replay) {
1398
1408
  protectedNumbers: attribution.protectedNumbers,
1399
1409
  pendingDropTagNumbers
1400
1410
  });
1411
+ if (isCtxReduceResult(part, tag))
1412
+ measured[CTX_REDUCE_OUTPUT] = true;
1401
1413
  parts.push(measured);
1402
1414
  t += measured.tokens;
1403
1415
  u += measured.uTokens;
@@ -2250,9 +2262,30 @@ function thawCalibration(frozen) {
2250
2262
  function sameCalibration(left, right) {
2251
2263
  return left.revision === right.revision && left.providerId === right.providerId && left.modelId === right.modelId && left.systemRatio === right.systemRatio && left.toolsRatio === right.toolsRatio && left.proseRatio === right.proseRatio && left.source === right.source;
2252
2264
  }
2253
- function persistNamespace(db, sessionId, root, namespace) {
2254
- root[CALIBRATION_STATE_KEY] = namespace;
2255
- db.prepare("UPDATE session_meta SET deferred_execute_state = ? WHERE session_id = ?").run(JSON.stringify(root), sessionId);
2265
+ function persistNamespace(db, sessionId, observedState, root, namespace) {
2266
+ const observed = observedState ?? null;
2267
+ try {
2268
+ const update = db.prepare(`UPDATE session_meta SET deferred_execute_state = json_set(
2269
+ CASE
2270
+ WHEN deferred_execute_state IS ? THEN ?
2271
+ WHEN json_type(deferred_execute_state) = 'object' THEN deferred_execute_state
2272
+ ELSE '{}'
2273
+ END, '$.${CALIBRATION_STATE_KEY}', json(?))
2274
+ WHERE session_id = ? AND (deferred_execute_state IS ? OR json_valid(deferred_execute_state))`).run(observed, JSON.stringify(root), JSON.stringify(namespace), sessionId, observed);
2275
+ if (update.changes > 0)
2276
+ return;
2277
+ } catch (error) {
2278
+ if (!(error instanceof Error) || !/malformed JSON/i.test(error.message))
2279
+ throw error;
2280
+ }
2281
+ db.transaction(() => {
2282
+ const current = db.prepare("SELECT deferred_execute_state FROM session_meta WHERE session_id = ?").get(sessionId);
2283
+ if (!current)
2284
+ return;
2285
+ const latestRoot = parseStateRoot(current.deferred_execute_state);
2286
+ latestRoot[CALIBRATION_STATE_KEY] = namespace;
2287
+ db.prepare("UPDATE session_meta SET deferred_execute_state = ? WHERE session_id = ?").run(JSON.stringify(latestRoot), sessionId);
2288
+ }).immediate();
2256
2289
  }
2257
2290
  function sessionDecisionCalibration(db, sessionId, pass) {
2258
2291
  const row = readSessionRow(db, sessionId);
@@ -2265,7 +2298,10 @@ function sessionDecisionCalibration(db, sessionId, pass) {
2265
2298
  const candidate = freezeCalibration(calibrationForModelKey(key));
2266
2299
  if (!namespace.active || !sameCalibration(namespace.active, candidate)) {
2267
2300
  const previousRevision = namespace.active?.revision ?? "unfrozen";
2268
- persistNamespace(db, sessionId, root, { ...namespace, active: candidate });
2301
+ persistNamespace(db, sessionId, row?.deferred_execute_state, root, {
2302
+ ...namespace,
2303
+ active: candidate
2304
+ });
2269
2305
  if (namespace.active) {
2270
2306
  pass.onAdopt?.(`calibration revision ${previousRevision} → ${candidate.revision} adopted (bust=${pass.bustReason ?? "unknown"})`);
2271
2307
  }
@@ -2308,7 +2344,7 @@ function transitionSessionHygieneUnits(db, sessionId, bustPermitted, calibration
2308
2344
  nudgeLevel.postReduceGraceBaselineU = grace;
2309
2345
  }
2310
2346
  db.prepare("UPDATE session_meta SET last_nudge_undropped = COALESCE(?, last_nudge_undropped), last_nudge_level = COALESCE(?, last_nudge_level) WHERE session_id = ?").run(lastNudge, nudgeLevel ? JSON.stringify(nudgeLevel) : null, sessionId);
2311
- persistNamespace(db, sessionId, root, {
2347
+ persistNamespace(db, sessionId, row?.deferred_execute_state, root, {
2312
2348
  ...namespace,
2313
2349
  hygieneUnitsVersion: HYGIENE_PROVIDER_UNITS_VERSION
2314
2350
  });
@@ -9023,4 +9059,4 @@ function deleteToolTagsByOwner(db, sessionId, ownerMsgId) {
9023
9059
  return getDeleteToolTagsByOwnerStatement(db).all(sessionId, ownerMsgId).length;
9024
9060
  }
9025
9061
 
9026
- export { protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isThinkingPart, currentReclaimableToolOutputCount, isRecord, contentTagOwnerMessageId, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, CLEARED_TODO_STATE_JSON, normalizeTodoStateJson, buildSyntheticTodoPart, computeSyntheticCallId, isSyntheticTodoPart, countRealUserMessages, tailHygieneStructuralSignature, sameTailHygieneStructuralSignature, formatTailHygienePrefixMismatch, refreshTailHygieneBaseline, effectiveTailHygiene, assertTailHygieneContentUnchangedIfEnabled, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, isDroppedToolOutput, toolOutputTokens, decideChannel1, evaluateChannel2, formatChannel1Evaluation, formatChannel2Evaluation, buildChannel2Reminder, buildChannel1Reminder, createFinalWireIncompleteLogger, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, readFrozenMergedReasoningParts, MAX_EXECUTE_THRESHOLD, escalationBands, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, readEpochFloorSnapshot, getProtectionWindowForSession, CACHED_TRIM_PARTIAL_SQL, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, clearCachedM0, withReplayEnvelopeSnapshot, invalidateReplayEnvelopeSnapshot, isRustMarkerAdmissionFenced, setRustMarkerAdmissionFence, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isEmergencyRecoveryArmed, isProviderOverflowReconfirmed, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadPersistedUsage, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, resetProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, getPersistedReasoningWatermark, setPersistedReasoningWatermark, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, removeNoteNudgeAnchorByMessageId, pruneAutoSearchHintDecisions, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, removeAutoSearchHintDecisionByMessageId, getPersistedTodoPermissionDenied, setPersistedTodoPermissionDenied, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, setNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, loadTransformPassStateSnapshot, recordOverflowDetected, recordDetectedContextLimit, clearEmergencyRecovery, clearDetectedContextLimit, getPersistedCompactionMarkerState, getCompactionMarkerPublicationState, compareAndSetCompactionMarkerPublicationState, setPersistedCompactionMarkerState, getDeferredClearedCompactionMarkerState, retireDeferredClearedCompactionMarkerState, parseStrippedPlaceholderState, serializeStrippedPlaceholderState, getStrippedPlaceholderIds, applyStrippedPlaceholderDelta, removeStrippedPlaceholderId, THINKING_BINDING_RECOVERY_FROZEN_PREFIX, THINKING_BINDING_STRIP_ORDER_END_MARKER, thinkingBindingRecoveryFrozenId, COMPACTION_OFF_THINKING_FROZEN_PREFIX, compactionOffThinkingFrozenId, compactionOffFrozenThinkingIds, getThinkingBindingRecoveryTarget, armThinkingBindingRecovery, noteBindingRecoveryAwaitingClear, bindingRecoveryAwaitingClear, retryBindingRecoveryClear, clearThinkingBindingRecoveryIf, getMergedReasoningStrippedIds, addMergedReasoningStrippedIds, getTrailingBlankDecisions, addTrailingBlankDecisions, demoteTrailingBlankKeepDecisions, getStaleReduceStrippedIds, addStaleReduceStrippedIds, getProcessedImageStrippedIds, parseProcessedImageMarkers, serializeProcessedImageMarkers, getProcessedImageMarkers, addProcessedImageStrippedIds, getPendingCompactionMarkerState, getCompactionMarkerHealth, loadPostprocessReplaySnapshot, setPendingCompactionMarkerState, replacePendingCompactionMarkerStateIf, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, logPiCompactionMarkerClear, getSessionsWithPendingMarker, cachedHeadCoversPendingCompactionMarker, getObservedEpochFloor, resolveEpochFloorForPass, getReasoningRemovalState, addRemovedReasoningIds, markDropLeavesReasoning, detectThinkingBindingMismatch, detectLatestTurnThinkingMismatch, isPrefixBoundThinkingModel, detectOverflow, overflowLimitToStore, isProviderRateLimit, modelAcceptsEmptyContent, isAnthropicFamilyRoute, neutralizeDroppedReasoningPart, restoreNeutralizedReasoningPart, isNeutralizedReasoningPart, variantChangeBustsProviderCache, makeSentinel, makeWholeMessageSentinel, isSentinel, replaySentinelByMessageIds, isInActiveAnthropicTurn, activeAnthropicTurnStart, hasAnthropicReasoning, markServedShapeRepair, prepareServedShapeRepair, stripSystemInjectedMessages, stripDroppedPlaceholderMessages, replayClearedReasoning, replayStrippedInlineThinking, clearOldReasoning, stripClearedReasoning, captureInlineThinkingRepairs, stripInlineThinking, findReasoningBearingAssistantIds, findLatestAssistantReasoningMutationExemptMessage, snapshotTrailingBlankSourceDecisions, findTrailingBlankDecisionCandidates, applyFrozenTrailingBlankDecisions, stripReasoningFromAssistantIds, findMergedReasoningStripDecisions, stripReasoningFromMergedAssistants, getEmptyImageParts, stripProcessedImages, projectOpencodeReasoningBudgetCutoff, DEFAULT_KEEP_REASONING_TOKENS, resolveKeepReasoningTokens, reasoningStepCost, reasoningBudgetCutoff, reasoningTextAndOpaque, opencodeReasoningBudgetCutoff, describeFinalWireTail, estimatePartImageTokens, openCode2ThinkingPayload, estimateMessageTokens, wireContentBytes, createFinalWireUsageTracker, estimateFinalWireInputTokens, estimateAppendedWireTokens, estimateEmergencyDropReclaimTokens, planEmergencyDrop, measureEmergencyTag, snapshotEmergencyServedMass, tagsSinceReading, emergencyServedMassRemovedSince, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, hasPendingDropOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, TagOwnerSummaryNotReady2, scanTagOwnerSummary2, cachedTagOwnerRatios2, tagOwnerWarmupState2, scanTagOwnerDelta2, installTagOwnerDelta2, installTagOwnerSummary2, isTagOwnerSummaryReady2, tagTokenCountIsNull2, backfillTagTokenCounts2, insertTag2, updateTagStatus2, markTagDropped2, markWhitespaceAssistantTagInert2, getInertWhitespaceAssistantTags2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTailHygieneTags2, getDroppedTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
9062
+ export { protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isThinkingPart, currentReclaimableToolOutputCount, isRecord, TEXT_TAG_IDENTITY_MARKER, contentTagOwnerMessageId, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, CLEARED_TODO_STATE_JSON, normalizeTodoStateJson, buildSyntheticTodoPart, computeSyntheticCallId, isSyntheticTodoPart, countRealUserMessages, tailHygieneStructuralSignature, sameTailHygieneStructuralSignature, formatTailHygienePrefixMismatch, refreshTailHygieneBaseline, effectiveTailHygiene, assertTailHygieneContentUnchangedIfEnabled, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, isDroppedToolOutput, toolOutputTokens, decideChannel1, evaluateChannel2, formatChannel1Evaluation, formatChannel2Evaluation, buildChannel2Reminder, buildChannel1Reminder, createFinalWireIncompleteLogger, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, readFrozenMergedReasoningParts, MAX_EXECUTE_THRESHOLD, escalationBands, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, readEpochFloorSnapshot, getProtectionWindowForSession, CACHED_TRIM_PARTIAL_SQL, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, clearCachedM0, withReplayEnvelopeSnapshot, invalidateReplayEnvelopeSnapshot, isRustMarkerAdmissionFenced, setRustMarkerAdmissionFence, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isEmergencyRecoveryArmed, isProviderOverflowReconfirmed, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadPersistedUsage, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, resetProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, EMERGENCY_DRAIN_FAILURE_BACKOFF_MS, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, getPersistedReasoningWatermark, setPersistedReasoningWatermark, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, removeNoteNudgeAnchorByMessageId, pruneAutoSearchHintDecisions, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, removeAutoSearchHintDecisionByMessageId, getPersistedTodoPermissionDenied, setPersistedTodoPermissionDenied, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, setNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, loadTransformPassStateSnapshot, recordOverflowDetected, recordDetectedContextLimit, clearEmergencyRecovery, clearDetectedContextLimit, getPersistedCompactionMarkerState, getCompactionMarkerPublicationState, compareAndSetCompactionMarkerPublicationState, setPersistedCompactionMarkerState, getDeferredClearedCompactionMarkerState, retireDeferredClearedCompactionMarkerState, parseStrippedPlaceholderState, serializeStrippedPlaceholderState, getStrippedPlaceholderIds, applyStrippedPlaceholderDelta, removeStrippedPlaceholderId, THINKING_BINDING_RECOVERY_FROZEN_PREFIX, THINKING_BINDING_STRIP_ORDER_END_MARKER, thinkingBindingRecoveryFrozenId, COMPACTION_OFF_THINKING_FROZEN_PREFIX, compactionOffThinkingFrozenId, compactionOffFrozenThinkingIds, getThinkingBindingRecoveryTarget, armThinkingBindingRecovery, noteBindingRecoveryAwaitingClear, bindingRecoveryAwaitingClear, retryBindingRecoveryClear, clearThinkingBindingRecoveryIf, getMergedReasoningStrippedIds, addMergedReasoningStrippedIds, getTrailingBlankDecisions, addTrailingBlankDecisions, demoteTrailingBlankKeepDecisions, getStaleReduceStrippedIds, addStaleReduceStrippedIds, getProcessedImageStrippedIds, parseProcessedImageMarkers, serializeProcessedImageMarkers, getProcessedImageMarkers, addProcessedImageStrippedIds, getPendingCompactionMarkerState, getCompactionMarkerHealth, loadPostprocessReplaySnapshot, setPendingCompactionMarkerState, replacePendingCompactionMarkerStateIf, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, logPiCompactionMarkerClear, getSessionsWithPendingMarker, cachedHeadCoversPendingCompactionMarker, getObservedEpochFloor, resolveEpochFloorForPass, getReasoningRemovalState, addRemovedReasoningIds, markDropLeavesReasoning, detectThinkingBindingMismatch, detectLatestTurnThinkingMismatch, isPrefixBoundThinkingModel, detectOverflow, overflowLimitToStore, isProviderRateLimit, modelAcceptsEmptyContent, isAnthropicFamilyRoute, neutralizeDroppedReasoningPart, restoreNeutralizedReasoningPart, isNeutralizedReasoningPart, variantChangeBustsProviderCache, makeSentinel, makeWholeMessageSentinel, isSentinel, replaySentinelByMessageIds, isInActiveAnthropicTurn, activeAnthropicTurnStart, hasAnthropicReasoning, markServedShapeRepair, prepareServedShapeRepair, stripSystemInjectedMessages, stripDroppedPlaceholderMessages, replayClearedReasoning, replayStrippedInlineThinking, clearOldReasoning, stripClearedReasoning, captureInlineThinkingRepairs, stripInlineThinking, findReasoningBearingAssistantIds, findLatestAssistantReasoningMutationExemptMessage, snapshotTrailingBlankSourceDecisions, findTrailingBlankDecisionCandidates, applyFrozenTrailingBlankDecisions, stripReasoningFromAssistantIds, findMergedReasoningStripDecisions, stripReasoningFromMergedAssistants, getEmptyImageParts, stripProcessedImages, projectOpencodeReasoningBudgetCutoff, DEFAULT_KEEP_REASONING_TOKENS, resolveKeepReasoningTokens, reasoningStepCost, reasoningBudgetCutoff, reasoningTextAndOpaque, opencodeReasoningBudgetCutoff, describeFinalWireTail, estimatePartImageTokens, openCode2ThinkingPayload, estimateMessageTokens, wireContentBytes, createFinalWireUsageTracker, estimateFinalWireInputTokens, estimateAppendedWireTokens, estimateEmergencyDropReclaimTokens, planEmergencyDrop, measureEmergencyTag, snapshotEmergencyServedMass, tagsSinceReading, emergencyServedMassRemovedSince, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, hasPendingDropOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, TagOwnerSummaryNotReady2, scanTagOwnerSummary2, cachedTagOwnerRatios2, tagOwnerWarmupState2, scanTagOwnerDelta2, installTagOwnerDelta2, installTagOwnerSummary2, isTagOwnerSummaryReady2, tagTokenCountIsNull2, backfillTagTokenCounts2, insertTag2, updateTagStatus2, markTagDropped2, markWhitespaceAssistantTagInert2, getInertWhitespaceAssistantTags2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTailHygieneTags2, getDroppedTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  log2
3
- } from "./index-ywrz4wy2.js";
3
+ } from "./index-3fhb0j32.js";
4
4
 
5
5
  // src/hooks/magic-context/read-session-formatting.ts
6
6
  import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./index-gzy5w8ya.js";
14
14
  import {
15
15
  scheduleAfterBootQuiet
16
- } from "./index-5pgyqgmx.js";
16
+ } from "./index-hj78hvhm.js";
17
17
  import {
18
18
  getHarness2,
19
19
  harnessOwnsOpenCodeStore2
@@ -24,7 +24,7 @@ import {
24
24
  importPluginModule,
25
25
  writeForwardedLogLine2,
26
26
  log2
27
- } from "./index-ywrz4wy2.js";
27
+ } from "./index-3fhb0j32.js";
28
28
  import {
29
29
  isOwnRpcServerRecord,
30
30
  isPidAlive,
@@ -35,7 +35,7 @@ import {
35
35
  parseRpcPortFile,
36
36
  inspectProcessesAsync,
37
37
  inspectWindowsProcessesSync
38
- } from "./index-gqf8r04r.js";
38
+ } from "./index-3n4j5rqc.js";
39
39
  import {
40
40
  configureContextDatabasePragmas2
41
41
  } from "./index-fb3zxn06.js";
@@ -46,16 +46,16 @@ import {
46
46
  copyStorageFileSync,
47
47
  copyStorageTreeSync,
48
48
  tightenStorageTreeSync
49
- } from "./index-5df2fw5b.js";
49
+ } from "./index-6mryx739.js";
50
50
  import {
51
51
  attachFailClosedBlockingProcessEvidence
52
- } from "./index-wh9fxds5.js";
52
+ } from "./index-c205x7xd.js";
53
53
  import {
54
54
  reuseWorker
55
55
  } from "./index-96ztjvkn.js";
56
56
  import {
57
57
  startMessageFtsRowidMapBackfill2
58
- } from "./index-s32f8y67.js";
58
+ } from "./index-89xg64wb.js";
59
59
  import {
60
60
  LKG_SLOT_CHUNKS_DDL,
61
61
  SESSION_REPLAY_DECISIONS_DDL,
@@ -65,14 +65,14 @@ import {
65
65
  hasPendingMigrations,
66
66
  getMainThreadMigrationBodyCount,
67
67
  runMigrations
68
- } from "./index-jba6ny4m.js";
68
+ } from "./index-dnpcv1rg.js";
69
69
  import {
70
70
  installTagIdentityRevisionTrigger,
71
71
  ensureColumn,
72
72
  installV95PerfSchema,
73
73
  setDatabase,
74
74
  loadToolDefinitionMeasurements
75
- } from "./index-mg9s2rc3.js";
75
+ } from "./index-cpbr0xvk.js";
76
76
  import {
77
77
  resolveOpenCodeDbPath,
78
78
  hasV1MessageTables
@@ -85,7 +85,7 @@ import {
85
85
  } from "./index-8ajstryz.js";
86
86
  import {
87
87
  logSlowWriteTransaction
88
- } from "./index-m0pwswv9.js";
88
+ } from "./index-tqtpgnhr.js";
89
89
 
90
90
  // src/features/magic-context/storage-db.ts
91
91
  import {
@@ -1084,8 +1084,8 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1084
1084
  state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
1085
1085
  if (signal.aborted || !readsOpenCodeStore)
1086
1086
  return;
1087
- const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-zkzdc0e5.js"));
1088
- const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-pz5981mf.js"));
1087
+ const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-sde0wym3.js"));
1088
+ const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-zc5rsvhv.js"));
1089
1089
  if (signal.aborted)
1090
1090
  return;
1091
1091
  await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  importPluginModule,
3
3
  log2
4
- } from "./index-ywrz4wy2.js";
4
+ } from "./index-3fhb0j32.js";
5
5
  import {
6
6
  sendStatusNotification2
7
- } from "./index-9ffntwyr.js";
7
+ } from "./index-kj4bprep.js";
8
8
  import {
9
9
  formatConflictShort
10
- } from "./index-nxxzeq4y.js";
10
+ } from "./index-0ve29s6f.js";
11
11
 
12
12
  // src/plugin/conflict-warning-hook.ts
13
13
  import { existsSync, readFileSync } from "node:fs";
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  recordToolParameters,
5
5
  createDroppedInputToolExecuteBeforeHook,
6
6
  readRawSessionMessages2
7
- } from "./index-dr6bd4c8.js";
7
+ } from "./index-hp46xe93.js";
8
8
  import {
9
9
  setHarness2
10
10
  } from "./index-pavzsdc6.js";
@@ -18,8 +18,8 @@ import {
18
18
  log2,
19
19
  sessionLog2,
20
20
  flushLogger2
21
- } from "./index-ywrz4wy2.js";
22
- import"./index-z4p0ry94.js";
21
+ } from "./index-3fhb0j32.js";
22
+ import"./index-dt7cyqfe.js";
23
23
  import {
24
24
  withContentLanguageDirective,
25
25
  string,
@@ -31,7 +31,7 @@ import {
31
31
  record,
32
32
  DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE,
33
33
  DEFAULT_HISTORIAN_TIMEOUT_MS
34
- } from "./index-y915t3ey.js";
34
+ } from "./index-r3f85n7y.js";
35
35
  import {
36
36
  denyTaskRoutingToCallerAgents,
37
37
  buildHiddenAgentRegistrations,
@@ -58,15 +58,15 @@ import {
58
58
  checkCompactionMarkerConsistency,
59
59
  clearInjectionCache,
60
60
  clearNoteNudgeTriggerOnly
61
- } from "./index-za1yx1m4.js";
61
+ } from "./index-nqdwpdje.js";
62
62
  import"./index-sd3egckz.js";
63
- import"./index-gqf8r04r.js";
63
+ import"./index-3n4j5rqc.js";
64
64
  import {
65
65
  setStoragePrivatePermissionEnforcement,
66
66
  ensureStorageDirectorySync,
67
67
  writeStorageFileSync,
68
68
  writeStorageFileAtomicSync
69
- } from "./index-5df2fw5b.js";
69
+ } from "./index-6mryx739.js";
70
70
  import {
71
71
  hasTrustedAbsoluteWall,
72
72
  refreshModelLimitsFromApi,
@@ -75,7 +75,7 @@ import {
75
75
  deriveHistorianChunkTokens2,
76
76
  resolveKnownHistorianContextLimit2,
77
77
  resolveHistorianContextLimit2
78
- } from "./index-xsqw8kbd.js";
78
+ } from "./index-45qgkg8j.js";
79
79
  import {
80
80
  isDreamerRunnable,
81
81
  isSmartNoteSurfaceAvailable,
@@ -116,6 +116,7 @@ import {
116
116
  buildStatusDetail,
117
117
  isDebugRpcEnabled,
118
118
  registerRpcHandlers,
119
+ recordHostSqliteRuntime,
119
120
  maybeAutoEmbedSessionBackfill,
120
121
  clearTransformDecisionSession,
121
122
  scheduleOpenCodeTransformDecisionWrite,
@@ -146,7 +147,7 @@ import {
146
147
  parameterDescriptionsFor,
147
148
  MagicContextRpcServer,
148
149
  applyHiddenSubagentTemperature
149
- } from "./index-y2vshk67.js";
150
+ } from "./index-f154w8m4.js";
150
151
  import {
151
152
  resolveOpenCodeDbPath,
152
153
  openCodeDbPathExists,
@@ -162,7 +163,7 @@ import {
162
163
  recordHookInitFailure,
163
164
  clearHookInitFailure,
164
165
  getLastHookInitFailure
165
- } from "./index-wh9fxds5.js";
166
+ } from "./index-c205x7xd.js";
166
167
  import {
167
168
  setHomeProjectPermission,
168
169
  ProjectIdentityError,
@@ -173,13 +174,13 @@ import {
173
174
  beginBootQuietPeriod,
174
175
  bootQuietRemainingMs,
175
176
  scheduleAfterBootQuiet
176
- } from "./index-5pgyqgmx.js";
177
+ } from "./index-hj78hvhm.js";
177
178
  import {
178
179
  BoundedSessionMap,
179
180
  deleteTemporalDecision,
180
181
  recordToolDefinition,
181
182
  getCurrentToolSetHash
182
- } from "./index-mg9s2rc3.js";
183
+ } from "./index-cpbr0xvk.js";
183
184
  import {
184
185
  observeSessionActivity,
185
186
  backfillSessionActivity,
@@ -198,10 +199,10 @@ import {
198
199
  dropServedRecord,
199
200
  registerLkgPersistence,
200
201
  dropSlot
201
- } from "./index-yqha238s.js";
202
+ } from "./index-gnrwgvn7.js";
202
203
  import {
203
204
  recordSessionProjectIdentity
204
- } from "./index-r4y0dczp.js";
205
+ } from "./index-7sdns2ww.js";
205
206
  import"./index-fb3zxn06.js";
206
207
  import {
207
208
  startBootDeadline,
@@ -212,7 +213,7 @@ import {
212
213
  openDatabaseAsync,
213
214
  isDatabasePersisted,
214
215
  getDatabasePersistenceError
215
- } from "./index-gqfy38m9.js";
216
+ } from "./index-zkjx8gq3.js";
216
217
  import {
217
218
  registerExitAbort,
218
219
  unregisterExitAbort
@@ -221,38 +222,38 @@ import"./index-96ztjvkn.js";
221
222
  import"./index-1d042x6w.js";
222
223
  import {
223
224
  forgetRawSessionOrdinalWatermark2
224
- } from "./index-q7q6qp1f.js";
225
- import"./index-s32f8y67.js";
226
- import"./index-jba6ny4m.js";
225
+ } from "./index-hedgz8an.js";
226
+ import"./index-89xg64wb.js";
227
+ import"./index-dnpcv1rg.js";
227
228
  import"./index-fr0wbhdn.js";
228
229
  import {
229
230
  preloadTokenizer
230
- } from "./index-s7460efs.js";
231
- import"./index-6r99v53h.js";
231
+ } from "./index-zfx7mtqa.js";
232
+ import"./index-fgw241hh.js";
232
233
  import {
233
234
  getDefaultSubcConnectionFile,
234
235
  SubcModuleTransport
235
- } from "./index-g9qtxv87.js";
236
+ } from "./index-0sqhg9nf.js";
236
237
  import"./index-qt1qqasc.js";
237
- import"./index-e6ncz7a6.js";
238
+ import"./index-jzrvdqb8.js";
238
239
  import {
239
240
  latestTrackedOpenCodeAssistantId,
240
241
  observeOpenCodeTurnEvent,
241
242
  clearTrackedOpenCodeSession,
242
243
  findLastAssistantModelFromOpenCodeDb
243
- } from "./index-sp5pvs95.js";
244
+ } from "./index-k34hc455.js";
244
245
  import {
245
246
  sendCommandResult2,
246
247
  sendStatusNotification2
247
- } from "./index-9ffntwyr.js";
248
+ } from "./index-kj4bprep.js";
248
249
  import {
249
250
  detectConflicts,
250
251
  resolveCompactionForBoot
251
- } from "./index-nxxzeq4y.js";
252
+ } from "./index-0ve29s6f.js";
252
253
  import {
253
254
  sendConflictWarning2,
254
255
  cleanupConflictWarnings2
255
- } from "./index-et39x9k3.js";
256
+ } from "./index-zmgp0tr6.js";
256
257
  import"./index-1zx87sdm.js";
257
258
  import {
258
259
  stripPersistedAssistantText,
@@ -284,7 +285,7 @@ import {
284
285
  isAnthropicFamilyRoute,
285
286
  deleteTagsByMessageId2,
286
287
  getMaxTagNumberBySession2
287
- } from "./index-xr1t0fxb.js";
288
+ } from "./index-w7n7qkpf.js";
288
289
  import {
289
290
  resolveHistorianModel2,
290
291
  resolveOpenCodeAgentOverrides2,
@@ -300,24 +301,24 @@ import {
300
301
  getEmbedDrainUiStatus,
301
302
  clearEmbedSessionState
302
303
  } from "./index-2amn2s73.js";
303
- import"./index-0twg41mh.js";
304
+ import"./index-j4dcjb8t.js";
304
305
  import {
305
306
  deleteIndexedMessage
306
- } from "./index-pnawfv4e.js";
307
- import"./index-01h7tqe3.js";
308
- import"./index-mjy2k9jr.js";
307
+ } from "./index-89bkkgcn.js";
308
+ import"./index-tr4ep2ej.js";
309
+ import"./index-880a24vd.js";
309
310
  import {
310
311
  pushNotification2
311
312
  } from "./index-y14pawe1.js";
312
- import"./index-hes3k87g.js";
313
+ import"./index-r1d45dsr.js";
313
314
  import {
314
315
  getEmbeddingCoverageStatus2
315
- } from "./index-n9kd68vc.js";
316
+ } from "./index-7m2tnk8q.js";
316
317
  import"./index-qjwpqvnf.js";
317
- import"./index-ttdk2w0z.js";
318
- import"./index-5zrzg8r1.js";
318
+ import"./index-910gahfb.js";
319
+ import"./index-0bjj9yf3.js";
319
320
  import"./index-9emdjcb5.js";
320
- import"./index-832w615x.js";
321
+ import"./index-azkfw78y.js";
321
322
  import {
322
323
  recordOpenCodeProvenInputFloor,
323
324
  resolveOpenCodeProvenInputFloor,
@@ -338,25 +339,25 @@ import {
338
339
  armBindingRecoverySafely,
339
340
  collectForeignTextParts,
340
341
  resetDegradedCacheCount2
341
- } from "./index-g5c67kay.js";
342
+ } from "./index-cq8znmyw.js";
342
343
  import {
343
344
  scheduleClearAndReindex
344
- } from "./index-kty5k23y.js";
345
+ } from "./index-9jvxq5rt.js";
345
346
  import {
346
347
  runManagedRecomp2
347
- } from "./index-1kem0xxx.js";
348
+ } from "./index-t2e10rag.js";
348
349
  import {
349
350
  isValidSemver,
350
351
  compareSemverCore
351
- } from "./index-cr483vx6.js";
352
+ } from "./index-dj64gzg5.js";
352
353
  import"./index-fmsr7v69.js";
353
354
  import {
354
355
  runManagedWrapup2
355
- } from "./index-hee64h6k.js";
356
- import"./index-fpjnjxyx.js";
357
- import"./index-52x68mj4.js";
358
- import"./index-g6y2wk32.js";
359
- import"./index-rz47hf2m.js";
356
+ } from "./index-8sgv96kq.js";
357
+ import"./index-h7kta6cn.js";
358
+ import"./index-mgy7g740.js";
359
+ import"./index-2afrmgy3.js";
360
+ import"./index-fvfnq8n6.js";
360
361
  import {
361
362
  __toESM,
362
363
  __commonJS
@@ -370,7 +371,7 @@ import {
370
371
  import {
371
372
  closeQuietly
372
373
  } from "./index-8ajstryz.js";
373
- import"./index-m0pwswv9.js";
374
+ import"./index-tqtpgnhr.js";
374
375
 
375
376
  // ../../node_modules/.bun/esprima@4.0.1/node_modules/esprima/dist/esprima.js
376
377
  var require_esprima = __commonJS(function(exports, module) {
@@ -8212,7 +8213,7 @@ var require_src2 = __commonJS(function(exports, module) {
8212
8213
  // package.json
8213
8214
  var package_default = {
8214
8215
  name: "@cortexkit/opencode-magic-context",
8215
- version: "0.49.93",
8216
+ version: "0.49.96",
8216
8217
  type: "module",
8217
8218
  description: "OpenCode plugin for Magic Context — cross-session memory and context management",
8218
8219
  main: "dist/index.js",
@@ -11002,6 +11003,8 @@ async function createMagicContextHookAsync(deps) {
11002
11003
  });
11003
11004
  return null;
11004
11005
  }
11006
+ if (database && isDatabasePersisted(database))
11007
+ recordHostSqliteRuntime(database, "opencode");
11005
11008
  return createMagicContextHook({
11006
11009
  ...deps,
11007
11010
  openDatabaseForHook: () => database
@@ -11860,7 +11863,7 @@ function disableNativeAutoCompaction(config) {
11860
11863
 
11861
11864
  // src/plugin/refusal-notice.ts
11862
11865
  async function sendOpenCodeRefusal(client, sessionId, message, refusal) {
11863
- const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-0779tyd9.js"));
11866
+ const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gxrj4w1r.js"));
11864
11867
  const storageBusy = refusal instanceof StorageBusyRefusalError;
11865
11868
  const toast = { toastDurationMs: 15000 };
11866
11869
  const delivery = await sendStatusNotification(client, sessionId, message, storageBusy ? toast : { ...toast, toastTitle: "Magic Context", toastVariant: "error", liveOnly: true });
@@ -11868,7 +11871,7 @@ async function sendOpenCodeRefusal(client, sessionId, message, refusal) {
11868
11871
  sessionLog2(sessionId, "refusal notice skipped: no terminal viewing the session", refusal.name);
11869
11872
  }
11870
11873
  if (storageBusy) {
11871
- const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-neds90e3.js"));
11874
+ const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-376xn40x.js"));
11872
11875
  await abortSessionFailClosed(client, sessionId);
11873
11876
  }
11874
11877
  }
@@ -12138,7 +12141,7 @@ async function setup(context) {
12138
12141
  if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
12139
12142
  log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
12140
12143
  }
12141
- const { registerContext } = await import("./context-jpxthqxg.js");
12144
+ const { registerContext } = await import("./context-gtjdrp8f.js");
12142
12145
  setHarness2("opencode2");
12143
12146
  bindStaleBuildNotice({}, import.meta.url, "opencode2");
12144
12147
  const duties = await registerContext(context);
@@ -12217,7 +12220,7 @@ var server = async (ctx) => {
12217
12220
  if (hasBannerEntries)
12218
12221
  setTimeout(async () => {
12219
12222
  try {
12220
- const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-0779tyd9.js"));
12223
+ const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gxrj4w1r.js"));
12221
12224
  const clientWithSessions = ctx.client;
12222
12225
  const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
12223
12226
  const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
@@ -12235,7 +12238,7 @@ var server = async (ctx) => {
12235
12238
  log2(`[magic-context] opencode_db_missing path=${openCodeDbResolution.path} source=${openCodeDbResolution.source}`);
12236
12239
  setTimeout(async () => {
12237
12240
  try {
12238
- const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-0779tyd9.js"));
12241
+ const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gxrj4w1r.js"));
12239
12242
  const clientWithSessions = ctx.client;
12240
12243
  const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
12241
12244
  const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
@@ -12508,12 +12511,12 @@ var server = async (ctx) => {
12508
12511
  {
12509
12512
  const fence = getSchemaFenceRejection();
12510
12513
  if (fence) {
12511
- importPluginModule(() => import("./conflict-warning-hook-exf96bpt.js")).then(({ sendSchemaFenceWarning }) => sendSchemaFenceWarning(ctx.client, ctx.directory, fence)).catch((error) => log2("[magic-context] schema-fence warning unavailable:", error));
12514
+ importPluginModule(() => import("./conflict-warning-hook-wcq55y61.js")).then(({ sendSchemaFenceWarning }) => sendSchemaFenceWarning(ctx.client, ctx.directory, fence)).catch((error) => log2("[magic-context] schema-fence warning unavailable:", error));
12512
12515
  }
12513
12516
  }
12514
12517
  const serverUrl = ctx.serverUrl;
12515
12518
  const serverUrlStr = serverUrl instanceof URL ? serverUrl.toString().replace(/\/$/, "") : typeof serverUrl === "string" ? serverUrl.replace(/\/$/, "") : undefined;
12516
- importPluginModule(() => import("./send-session-notification-0779tyd9.js")).then(({ setNotificationServerUrl }) => {
12519
+ importPluginModule(() => import("./send-session-notification-gxrj4w1r.js")).then(({ setNotificationServerUrl }) => {
12517
12520
  setNotificationServerUrl(serverUrlStr);
12518
12521
  }).catch((error) => log2("[magic-context] notification transport unavailable:", error));
12519
12522
  if (conflictResult?.hasConflict) {
@@ -12527,7 +12530,7 @@ var server = async (ctx) => {
12527
12530
  }
12528
12531
  if (pluginConfig.enabled && !conflictResult?.hasConflict) {
12529
12532
  setTimeout(() => {
12530
- importPluginModule(() => import("./announcement-4ynkaf0d.js")).then(({
12533
+ importPluginModule(() => import("./announcement-8nj2jd87.js")).then(({
12531
12534
  shouldShowAnnouncement,
12532
12535
  ANNOUNCEMENT_VERSION,
12533
12536
  ANNOUNCEMENT_FEATURES,
@@ -12536,7 +12539,7 @@ var server = async (ctx) => {
12536
12539
  }) => {
12537
12540
  if (!shouldShowAnnouncement())
12538
12541
  return;
12539
- return importPluginModule(() => import("./conflict-warning-hook-exf96bpt.js")).then(({ sendStartupAnnouncement }) => sendStartupAnnouncement(ctx.client, ctx.directory, ANNOUNCEMENT_VERSION, ANNOUNCEMENT_FEATURES, ANNOUNCEMENT_FOOTER, markAnnouncementSeen));
12542
+ return importPluginModule(() => import("./conflict-warning-hook-wcq55y61.js")).then(({ sendStartupAnnouncement }) => sendStartupAnnouncement(ctx.client, ctx.directory, ANNOUNCEMENT_VERSION, ANNOUNCEMENT_FEATURES, ANNOUNCEMENT_FOOTER, markAnnouncementSeen));
12540
12543
  }).catch(() => {});
12541
12544
  }, 8000);
12542
12545
  }
@@ -6,9 +6,9 @@ import {
6
6
  getLoggerDiagnostics2,
7
7
  flushLogger2,
8
8
  getLogFilePath2
9
- } from "./index-ywrz4wy2.js";
9
+ } from "./index-3fhb0j32.js";
10
10
  import"./index-pavzsdc6.js";
11
- import"./index-z4p0ry94.js";
11
+ import"./index-dt7cyqfe.js";
12
12
  export {
13
13
  flushLogger2 as flushLogger,
14
14
  getLogFilePath2 as getLogFilePath,