@cortexkit/opencode-magic-context 0.49.97 → 0.49.99

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 (207) hide show
  1. package/dist/{announcement-8nj2jd87.js → announcement-p2xjv6cp.js} +4 -5
  2. package/dist/auto-search-worker.js +5 -5
  3. package/dist/chunk-embedding-write-worker.js +15 -16
  4. package/dist/{compaction-marker-candidates-a4b0anvv.js → compaction-marker-candidates-2apg7ewt.js} +2 -3
  5. package/dist/compaction-marker-candidates-worker.js +1 -1
  6. package/dist/{compartment-chunk-embedding-re2cw7y3.js → compartment-chunk-embedding-gnemmf79.js} +7 -8
  7. package/dist/{conflict-warning-hook-wcq55y61.js → conflict-warning-hook-x1ynwzwz.js} +7 -8
  8. package/dist/{context-br04s0b6.js → context-z77a2jpx.js} +377 -60
  9. package/dist/{derive-budgets-g1sy72e8.js → derive-budgets-vbv0fwsd.js} +4 -5
  10. package/dist/embedding-backfill-79br4kk6.js +28 -0
  11. package/dist/embedding-worker-process.js +1 -2
  12. package/dist/embedding-worker.js +6 -7
  13. package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
  14. package/dist/features/magic-context/memory/embedding-probe.d.ts +10 -9
  15. package/dist/features/magic-context/memory/embedding-probe.d.ts.map +1 -1
  16. package/dist/features/magic-context/memory/embedding-response-slots.d.ts +13 -0
  17. package/dist/features/magic-context/memory/embedding-response-slots.d.ts.map +1 -0
  18. package/dist/features/magic-context/storage-native-replay.d.ts +2 -0
  19. package/dist/features/magic-context/storage-native-replay.d.ts.map +1 -1
  20. package/dist/{history-owner-74826t4n.js → history-owner-8dj31nyf.js} +2 -3
  21. package/dist/hooks/magic-context/apply-operations.d.ts +1 -1
  22. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  23. package/dist/hooks/magic-context/execute-flush.d.ts +1 -1
  24. package/dist/hooks/magic-context/execute-flush.d.ts.map +1 -1
  25. package/dist/hooks/magic-context/tag-messages.d.ts +1 -1
  26. package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
  27. package/dist/hooks/magic-context/transform.d.ts +2 -0
  28. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  29. package/dist/{index-tbdy1hk0.js → index-0wj3jr8n.js} +6 -6
  30. package/dist/{index-j4dcjb8t.js → index-1vv1ka4a.js} +4 -4
  31. package/dist/{index-zfx7mtqa.js → index-2m3t73wk.js} +1 -1
  32. package/dist/{index-3fhb0j32.js → index-34xvre52.js} +223 -5
  33. package/dist/{index-pkxkeezb.js → index-4qc8d9by.js} +17 -17
  34. package/dist/{index-mmf6e740.js → index-507a56zb.js} +7 -7
  35. package/dist/{index-qdjxrbnr.js → index-5nf2a14a.js} +52 -45
  36. package/dist/{index-w9hxgntq.js → index-5xrj3zp4.js} +5 -5
  37. package/dist/{index-kj4bprep.js → index-61a853ky.js} +4 -4
  38. package/dist/{index-zmgp0tr6.js → index-74w347am.js} +3 -3
  39. package/dist/{index-hp46xe93.js → index-8hhmv0ff.js} +6 -6
  40. package/dist/{index-c205x7xd.js → index-8k9qpyjf.js} +1 -1
  41. package/dist/{index-tqtpgnhr.js → index-9awtk18w.js} +1 -1
  42. package/dist/{index-h7kta6cn.js → index-9eqt7755.js} +3 -3
  43. package/dist/{index-x49x59ar.js → index-9q7wzca8.js} +23 -25
  44. package/dist/{index-880a24vd.js → index-ab86c21b.js} +1 -1
  45. package/dist/{index-3n4j5rqc.js → index-abhmtj00.js} +1 -1
  46. package/dist/{index-tr4ep2ej.js → index-ajmy0v5j.js} +31 -0
  47. package/dist/{index-dj64gzg5.js → index-cayqdwf9.js} +2 -2
  48. package/dist/{index-0sqhg9nf.js → index-dnxnj42p.js} +12 -12
  49. package/dist/{index-0bjj9yf3.js → index-e6s2jpr8.js} +2 -2
  50. package/dist/{index-8v1brm5n.js → index-em72jhc0.js} +11 -11
  51. package/dist/{index-910gahfb.js → index-esym6cw4.js} +6 -8
  52. package/dist/{index-7sdns2ww.js → index-fd3hkyk1.js} +2 -2
  53. package/dist/{index-fgw241hh.js → index-gcf2x04k.js} +2 -2
  54. package/dist/{index-89xg64wb.js → index-geph2sa6.js} +2 -2
  55. package/dist/{index-45qgkg8j.js → index-h1qh9n8b.js} +2 -2
  56. package/dist/{index-9jvxq5rt.js → index-h1xvt8fw.js} +4 -4
  57. package/dist/{index-0ve29s6f.js → index-hbqxxb2n.js} +1 -1
  58. package/dist/{index-dnpcv1rg.js → index-hyvxmz3e.js} +4 -4
  59. package/dist/{index-hedgz8an.js → index-jsbgw33b.js} +1 -1
  60. package/dist/{index-mgy7g740.js → index-kjdys7e2.js} +1 -1
  61. package/dist/{index-e6ay1gez.js → index-mfx7hzyc.js} +2 -2
  62. package/dist/{index-7m2tnk8q.js → index-mhdavdd4.js} +31 -28
  63. package/dist/{index-r1d45dsr.js → index-nyjztqyj.js} +3 -3
  64. package/dist/{index-azkfw78y.js → index-qxzk5s30.js} +1 -1
  65. package/dist/{index-6mryx739.js → index-t7st85f5.js} +1 -1
  66. package/dist/{index-89bkkgcn.js → index-tyjx0dwz.js} +4 -4
  67. package/dist/{index-k34hc455.js → index-vdzd98ry.js} +2 -2
  68. package/dist/{index-hj78hvhm.js → index-vegw385y.js} +2 -2
  69. package/dist/{index-w7n7qkpf.js → index-w6kcwhhj.js} +4 -4
  70. package/dist/{index-xcej5kpt.js → index-xbna9akt.js} +5 -5
  71. package/dist/{index-cpbr0xvk.js → index-xtv4d4hv.js} +2 -2
  72. package/dist/{index-zkjx8gq3.js → index-xw608ytx.js} +11 -11
  73. package/dist/{index-jzrvdqb8.js → index-y5f5yg5a.js} +1 -1
  74. package/dist/index.js +55 -56
  75. package/dist/{logger-nmb2508f.js → logger-dgtrf43g.js} +1 -2
  76. package/dist/{message-fts-rowid-map-vcatdan0.js → message-fts-rowid-map-cfq59g6g.js} +4 -5
  77. package/dist/{message-index-bounded-abhwe610.js → message-index-bounded-6y7p974x.js} +10 -11
  78. package/dist/{message-time-backfill-zc5rsvhv.js → message-time-backfill-av870n4c.js} +2 -3
  79. package/dist/migration-worker.js +12 -13
  80. package/dist/plugin/rpc-handlers.d.ts +1 -0
  81. package/dist/plugin/rpc-handlers.d.ts.map +1 -1
  82. package/dist/{project-embedding-registry-e566q4bg.js → project-embedding-registry-xy8dcdys.js} +13 -14
  83. package/dist/raw-ordinal-warmup-worker.js +8 -8
  84. package/dist/{read-session-chunk-sde0wym3.js → read-session-chunk-9ejnbe07.js} +8 -9
  85. package/dist/{read-session-raw-trhdgc9z.js → read-session-raw-pgc9gxtn.js} +2 -3
  86. package/dist/{recomp-orchestrator-dapm3e4v.js → recomp-orchestrator-9k91tkyx.js} +32 -33
  87. package/dist/render-9712q3gp.js +42 -0
  88. package/dist/{safe-notification-target-54ns7dv9.js → safe-notification-target-01j8km9e.js} +2 -3
  89. package/dist/{search-archive-4bbn3ztv.js → search-archive-5jr011gc.js} +11 -12
  90. package/dist/{search-11aw8wpq.js → search-yhaxy3e6.js} +25 -26
  91. package/dist/{send-session-notification-gxrj4w1r.js → send-session-notification-tfhs4dbc.js} +5 -6
  92. package/dist/shared/rpc-types.d.ts +5 -0
  93. package/dist/shared/rpc-types.d.ts.map +1 -1
  94. package/dist/shared/status-view-check.d.ts.map +1 -1
  95. package/dist/shared/status-view.d.ts +8 -0
  96. package/dist/shared/status-view.d.ts.map +1 -1
  97. package/dist/shared/transcript.d.ts +1 -1
  98. package/dist/shared/transcript.d.ts.map +1 -1
  99. package/dist/{storage-tags-jq0c0zsn.js → storage-tags-vd3sgd4s.js} +5 -6
  100. package/dist/{store-29ksp6vy.js → store-235fjtsn.js} +6 -4
  101. package/dist/{store-reader-dgh3ssxx.js → store-reader-01e8t5j0.js} +4 -1
  102. package/dist/{transform-postprocess-phase-1xrjg6be.js → transform-postprocess-phase-mf5js6cs.js} +33 -34
  103. package/dist/v2/auto-search-worker.js +5 -5
  104. package/dist/v2/checkpoint-instruction-status.d.ts +13 -0
  105. package/dist/v2/checkpoint-instruction-status.d.ts.map +1 -0
  106. package/dist/v2/chunk-embedding-write-worker.js +15 -16
  107. package/dist/v2/{compaction-marker-candidates-6nypmsr3.js → compaction-marker-candidates-3rxg3f1e.js} +2 -3
  108. package/dist/v2/compaction-marker-candidates-worker.js +1 -1
  109. package/dist/v2/{compartment-chunk-embedding-jthtfhcd.js → compartment-chunk-embedding-6v74y2r3.js} +7 -8
  110. package/dist/v2/{context-43r0mzkp.js → context-4fej2dzv.js} +390 -69
  111. package/dist/v2/{derive-budgets-wj0q7s7d.js → derive-budgets-9237wmq5.js} +5 -6
  112. package/dist/v2/embedding-backfill-nhgp8znm.js +28 -0
  113. package/dist/v2/embedding-worker-process.js +1 -2
  114. package/dist/v2/embedding-worker.js +6 -7
  115. package/dist/v2/fold/idle.d.ts +11 -1
  116. package/dist/v2/fold/idle.d.ts.map +1 -1
  117. package/dist/v2/fold/instruction-supersession.d.ts +22 -1
  118. package/dist/v2/fold/instruction-supersession.d.ts.map +1 -1
  119. package/dist/v2/fold/native-replay-v3.d.ts +1 -0
  120. package/dist/v2/fold/native-replay-v3.d.ts.map +1 -1
  121. package/dist/v2/fold/native-replay.d.ts +73 -0
  122. package/dist/v2/fold/native-replay.d.ts.map +1 -1
  123. package/dist/v2/{history-owner-8pd5ax3n.js → history-owner-k4gx50a0.js} +2 -3
  124. package/dist/v2/hooks/context.d.ts.map +1 -1
  125. package/dist/v2/{logger-58jfese9.js → logger-0ys28353.js} +1 -2
  126. package/dist/v2/{message-fts-rowid-map-ax4vk78j.js → message-fts-rowid-map-88x2zbyj.js} +4 -5
  127. package/dist/v2/{message-index-bounded-qh794qxx.js → message-index-bounded-wj5rs9az.js} +10 -11
  128. package/dist/v2/{message-time-backfill-yj773saf.js → message-time-backfill-5p4vwd79.js} +2 -3
  129. package/dist/v2/migration-worker.js +12 -13
  130. package/dist/v2/{project-embedding-registry-z05xvckg.js → project-embedding-registry-qz9x79kn.js} +13 -14
  131. package/dist/v2/raw-ordinal-warmup-worker.js +8 -8
  132. package/dist/v2/{read-session-chunk-8tn2dbn1.js → read-session-chunk-89ep8br4.js} +8 -9
  133. package/dist/v2/{read-session-raw-ywebck9q.js → read-session-raw-seh1kcvp.js} +2 -3
  134. package/dist/v2/recomp-orchestrator-9wap1z1d.js +68 -0
  135. package/dist/v2/render-bzzypsgy.js +42 -0
  136. package/dist/v2/{safe-notification-target-zrwbh6k7.js → safe-notification-target-3e2rq2ys.js} +2 -3
  137. package/dist/v2/{search-archive-8zqsf9e6.js → search-archive-4yr4hw2m.js} +11 -12
  138. package/dist/v2/{search-35cz80x0.js → search-ymm2crs3.js} +24 -25
  139. package/dist/v2/{send-session-notification-8x146x5y.js → send-session-notification-vtnk598k.js} +5 -6
  140. package/dist/v2/{server-vj0xbbrc.js → server-0b3ms151.js} +2 -2
  141. package/dist/v2/{server-r3h4fy4k.js → server-1bks09js.js} +5 -5
  142. package/dist/v2/{server-nnh81jqy.js → server-2ek9exbe.js} +6 -8
  143. package/dist/v2/{server-63ree5ns.js → server-2xng77ch.js} +1 -1
  144. package/dist/v2/{server-2sare4qg.js → server-3mb205v9.js} +4 -4
  145. package/dist/v2/{server-n34vzyfm.js → server-3qeqa3b6.js} +1 -1
  146. package/dist/v2/{server-av3p9c8k.js → server-54nc921b.js} +1 -1
  147. package/dist/v2/{server-2qvnr3t7.js → server-5zx51pm4.js} +1 -1
  148. package/dist/v2/{server-vsx9tsks.js → server-62t1852h.js} +11 -11
  149. package/dist/v2/{server-svccj9rd.js → server-6mq43ear.js} +4 -4
  150. package/dist/v2/{server-1fnsfm3a.js → server-6r3b0re0.js} +24 -26
  151. package/dist/v2/{server-db91dxwc.js → server-7861dnm3.js} +6 -6
  152. package/dist/v2/{server-6qax5pds.js → server-7c5p0bh1.js} +2 -2
  153. package/dist/v2/{server-z5cv5wm5.js → server-7wpw3wc6.js} +31 -28
  154. package/dist/v2/{server-11ra1pmx.js → server-8xgs110k.js} +4 -4
  155. package/dist/v2/{server-40vdz8sf.js → server-98xd6j4r.js} +2 -2
  156. package/dist/v2/{server-k3ntgf6n.js → server-b5eg9ct6.js} +2 -2
  157. package/dist/v2/{server-2cq3e1c1.js → server-b65sqz7y.js} +4 -4
  158. package/dist/v2/{server-ganavh75.js → server-bhr92yb4.js} +2 -2
  159. package/dist/v2/{server-4yrvbnnm.js → server-bzebqckc.js} +2 -2
  160. package/dist/v2/{server-rt8t6s2a.js → server-cc58mckk.js} +2 -2
  161. package/dist/v2/{server-xekyjy4w.js → server-d0h1gjz2.js} +6 -6
  162. package/dist/v2/{server-73bqw5c0.js → server-d46xewmt.js} +1 -1
  163. package/dist/v2/{server-rr5c0xcg.js → server-d4h86y7v.js} +2 -2
  164. package/dist/v2/{server-7tj8yzrv.js → server-e14d7ebh.js} +2 -2
  165. package/dist/v2/{server-gh2w75fn.js → server-e8ybwfv8.js} +3 -3
  166. package/dist/v2/{server-zemnpv92.js → server-ghk96d57.js} +4 -4
  167. package/dist/v2/{server-j1gxs1gj.js → server-h95cdc30.js} +1 -1
  168. package/dist/v2/{server-5t4nzfpt.js → server-j09jx1n9.js} +1 -1
  169. package/dist/v2/{server-n33hyq9t.js → server-jrs4gny6.js} +2 -2
  170. package/dist/v2/{server-7h4gwphm.js → server-pqgnjf38.js} +3 -3
  171. package/dist/v2/{server-379fd3n7.js → server-rbxtp4sm.js} +1 -1
  172. package/dist/v2/{server-2wz6y46g.js → server-sfffm587.js} +1 -1
  173. package/dist/v2/{server-bx5k66qc.js → server-vgy98kcd.js} +1 -1
  174. package/dist/v2/{server-kzrrdjp5.js → server-xc7t2r4k.js} +223 -5
  175. package/dist/v2/{server-z2nv8jdv.js → server-xn7fpv2b.js} +12 -12
  176. package/dist/v2/{server-tq523gj6.js → server-yacpgq4s.js} +1 -1
  177. package/dist/v2/{server-vtkbxzw1.js → server-ysg14rv1.js} +31 -0
  178. package/dist/v2/{server-qjjky07w.js → server-zedjjdc5.js} +11 -11
  179. package/dist/v2/server.js +8 -9
  180. package/dist/v2/{storage-tags-pcenytad.js → storage-tags-8kktww54.js} +5 -6
  181. package/dist/v2/{store-gx19qc3a.js → store-0kjfynwp.js} +6 -4
  182. package/dist/v2/{store-reader-qt2msa8z.js → store-reader-w0srb18d.js} +4 -1
  183. package/dist/v2/store-reader.d.ts +1 -0
  184. package/dist/v2/store-reader.d.ts.map +1 -1
  185. package/dist/v2/tui/index.d.ts +1 -1
  186. package/dist/v2/tui/index.d.ts.map +1 -1
  187. package/dist/v2/{v2-archive-reader-hvdyz30c.js → v2-archive-reader-veyqp15a.js} +1 -1
  188. package/dist/v2/{wrapup-orchestrator-0d4ceff3.js → wrapup-orchestrator-89cg7p41.js} +33 -34
  189. package/dist/{v2-archive-reader-qs24chs6.js → v2-archive-reader-3s332fn7.js} +1 -1
  190. package/dist/wrapup-orchestrator-41rt7etq.js +55 -0
  191. package/package.json +2 -2
  192. package/src/shared/rpc-types.ts +6 -0
  193. package/src/shared/status-view-check.ts +11 -0
  194. package/src/shared/status-view.ts +24 -1
  195. package/src/shared/tag-transcript.ts +5 -4
  196. package/src/shared/test-preload-leak-scan.test.ts +56 -0
  197. package/src/shared/transcript.ts +1 -1
  198. package/src/v2/tui/index.ts +8 -1
  199. package/src/v2/tui/status-dialog-fallback.test.ts +21 -0
  200. package/dist/embedding-backfill-pdymqbnh.js +0 -29
  201. package/dist/index-dt7cyqfe.js +0 -223
  202. package/dist/render-6vmqzcem.js +0 -43
  203. package/dist/v2/embedding-backfill-16b16m38.js +0 -29
  204. package/dist/v2/recomp-orchestrator-vzygyqwn.js +0 -69
  205. package/dist/v2/render-9b5dxp9e.js +0 -43
  206. package/dist/v2/server-dt7cyqfe.js +0 -223
  207. package/dist/wrapup-orchestrator-v1mhjw55.js +0 -56
@@ -22,7 +22,7 @@ export declare function sidebarText(snapshot: SidebarSnapshot | undefined): stri
22
22
  *
23
23
  * Exported for test access.
24
24
  */
25
- export declare function statusText(detail: Pick<StatusDetail, "contextLimit" | "usagePercentage" | "inputTokens" | "compaction_enabled" | "historianRunning" | "compartmentCount" | "memoryBlockCount" | "memoryCount" | "pendingOpsCount" | "configGeneration" | "configAdoptedAt" | "configReloadFailure" | "lastTransformError" | "projectBindingWarning">): string;
25
+ export declare function statusText(detail: Pick<StatusDetail, "contextLimit" | "usagePercentage" | "inputTokens" | "compaction_enabled" | "historianRunning" | "compartmentCount" | "memoryBlockCount" | "memoryCount" | "pendingOpsCount" | "configGeneration" | "configAdoptedAt" | "configReloadFailure" | "lastTransformError" | "projectBindingWarning" | "checkpointInstructions">): string;
26
26
  /**
27
27
  * Plain-text status for one checked result: the status lines above, or the
28
28
  * "status unavailable" view as text when there is no usable snapshot. A
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v2/tui/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAI5E,OAAO,EAOH,KAAK,kBAAkB,EAC1B,MAAM,2BAA2B,CAAC;AAUnC,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;AAY5D;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,SAAS,GAAG,MAAM,CA4BzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACtB,MAAM,EAAE,IAAI,CACR,YAAY,EACV,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,uBAAuB,CAC5B,GACF,MAAM,CA8BR;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAoBhE;AAOD,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;AAE5E,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAqM9F;AAED,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAStE;;;;;AAED,wBAAuD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v2/tui/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO5E,OAAO,EAOH,KAAK,kBAAkB,EAC1B,MAAM,2BAA2B,CAAC;AAUnC,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,SAAS,CAAC;AAY5D;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,SAAS,GAAG,MAAM,CA4BzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACtB,MAAM,EAAE,IAAI,CACR,YAAY,EACV,cAAc,GACd,iBAAiB,GACjB,aAAa,GACb,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,aAAa,GACb,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,GACrB,oBAAoB,GACpB,uBAAuB,GACvB,wBAAwB,CAC7B,GACF,MAAM,CAiCR;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAoBhE;AAOD,KAAK,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC;AAE5E,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAqM9F;AAED,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAStE;;;;;AAED,wBAAuD"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readV2ArchiveOffThread2,
3
3
  serveV2ArchiveReads2
4
- } from "./server-r3h4fy4k.js";
4
+ } from "./server-1bks09js.js";
5
5
  import"./server-v0p37hm2.js";
6
6
  import"./server-gzy5w8ya.js";
7
7
  import"./server-1d042x6w.js";
@@ -1,9 +1,8 @@
1
1
  import"./server-pavzsdc6.js";
2
2
  import {
3
3
  sessionLog2
4
- } from "./server-kzrrdjp5.js";
5
- import"./server-dt7cyqfe.js";
6
- import"./server-2wz6y46g.js";
4
+ } from "./server-xc7t2r4k.js";
5
+ import"./server-sfffm587.js";
7
6
  import {
8
7
  COMPARTMENT_LEASE_RENEWAL_MS,
9
8
  acquireCompartmentLease,
@@ -12,20 +11,20 @@ import {
12
11
  getCompartments,
13
12
  getLastCompartmentEndMessage,
14
13
  requestPendingMaterialization
15
- } from "./server-qjjky07w.js";
14
+ } from "./server-zedjjdc5.js";
16
15
  import"./server-2amn2s73.js";
17
- import"./server-73bqw5c0.js";
18
- import"./server-k3ntgf6n.js";
16
+ import"./server-d46xewmt.js";
17
+ import"./server-b5eg9ct6.js";
19
18
  import {
20
19
  inRootAsyncContext2
21
20
  } from "./server-gzy5w8ya.js";
22
21
  import"./server-v0p37hm2.js";
23
22
  import"./server-96ztjvkn.js";
24
23
  import"./server-1d042x6w.js";
25
- import"./server-av3p9c8k.js";
26
- import"./server-40vdz8sf.js";
27
- import"./server-zemnpv92.js";
28
- import"./server-svccj9rd.js";
24
+ import"./server-54nc921b.js";
25
+ import"./server-98xd6j4r.js";
26
+ import"./server-ghk96d57.js";
27
+ import"./server-6mq43ear.js";
29
28
  import {
30
29
  getWrapupInProgressState,
31
30
  acquireWrapupInProgress,
@@ -33,28 +32,28 @@ import {
33
32
  releaseWrapupInProgress,
34
33
  getHistorianFailureState,
35
34
  clearEmergencyRecovery
36
- } from "./server-11ra1pmx.js";
37
- import"./server-4yrvbnnm.js";
38
- import"./server-vsx9tsks.js";
35
+ } from "./server-8xgs110k.js";
36
+ import"./server-bzebqckc.js";
37
+ import"./server-62t1852h.js";
39
38
  import"./server-1zx87sdm.js";
40
39
  import"./server-arfzfxe8.js";
41
40
  import"./server-2ra6pwf3.js";
42
- import"./server-bx5k66qc.js";
41
+ import"./server-vgy98kcd.js";
43
42
  import {
44
43
  prepareRawSessionOrdinals2
45
- } from "./server-db91dxwc.js";
44
+ } from "./server-7861dnm3.js";
46
45
  import"./server-fr0wbhdn.js";
47
- import"./server-2sare4qg.js";
48
- import"./server-n34vzyfm.js";
49
- import"./server-n33hyq9t.js";
50
- import"./server-vtkbxzw1.js";
46
+ import"./server-3mb205v9.js";
47
+ import"./server-3qeqa3b6.js";
48
+ import"./server-jrs4gny6.js";
49
+ import"./server-ysg14rv1.js";
51
50
  import"./server-fb3zxn06.js";
52
- import"./server-2qvnr3t7.js";
53
- import"./server-5t4nzfpt.js";
51
+ import"./server-5zx51pm4.js";
52
+ import"./server-j09jx1n9.js";
54
53
  import {
55
54
  pushNotification2
56
55
  } from "./server-y14pawe1.js";
57
- import"./server-379fd3n7.js";
56
+ import"./server-rbxtp4sm.js";
58
57
  import {
59
58
  describeBoundaryDiagnostics,
60
59
  resolveWrapupProtectedTailBoundary,
@@ -65,24 +64,24 @@ import {
65
64
  registerActiveCompartmentRun,
66
65
  setRecompStarting2,
67
66
  setRecompTerminal2
68
- } from "./server-1fnsfm3a.js";
67
+ } from "./server-6r3b0re0.js";
69
68
  import"./server-qt1qqasc.js";
70
- import"./server-z5cv5wm5.js";
71
- import"./server-6qax5pds.js";
69
+ import"./server-7wpw3wc6.js";
70
+ import"./server-7c5p0bh1.js";
72
71
  import"./server-qjwpqvnf.js";
73
- import"./server-7h4gwphm.js";
74
- import"./server-nnh81jqy.js";
75
- import"./server-ganavh75.js";
72
+ import"./server-pqgnjf38.js";
73
+ import"./server-2ek9exbe.js";
74
+ import"./server-bhr92yb4.js";
76
75
  import"./server-9emdjcb5.js";
77
- import"./server-vj0xbbrc.js";
78
- import"./server-rr5c0xcg.js";
76
+ import"./server-0b3ms151.js";
77
+ import"./server-d4h86y7v.js";
79
78
  import"./server-n5wn7d9b.js";
80
- import"./server-rt8t6s2a.js";
81
- import"./server-63ree5ns.js";
79
+ import"./server-cc58mckk.js";
80
+ import"./server-2xng77ch.js";
82
81
  import {
83
82
  sendStatusNotification2
84
- } from "./server-2cq3e1c1.js";
85
- import"./server-tq523gj6.js";
83
+ } from "./server-b65sqz7y.js";
84
+ import"./server-yacpgq4s.js";
86
85
 
87
86
  // src/hooks/magic-context/wrapup-orchestrator.ts
88
87
  import * as crypto from "node:crypto";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readV2ArchiveOffThread2,
3
3
  serveV2ArchiveReads2
4
- } from "./index-xcej5kpt.js";
4
+ } from "./index-xbna9akt.js";
5
5
  import"./index-v0p37hm2.js";
6
6
  import"./index-gzy5w8ya.js";
7
7
  import"./index-1d042x6w.js";
@@ -0,0 +1,55 @@
1
+ import {
2
+ runManagedWrapup2
3
+ } from "./index-507a56zb.js";
4
+ import"./index-5xrj3zp4.js";
5
+ import"./index-9q7wzca8.js";
6
+ import"./index-qxzk5s30.js";
7
+ import"./index-sd3egckz.js";
8
+ import"./index-esym6cw4.js";
9
+ import"./index-e6s2jpr8.js";
10
+ import"./index-9emdjcb5.js";
11
+ import"./index-mhdavdd4.js";
12
+ import"./index-qjwpqvnf.js";
13
+ import"./index-em72jhc0.js";
14
+ import"./index-ab86c21b.js";
15
+ import"./index-tyjx0dwz.js";
16
+ import"./index-2amn2s73.js";
17
+ import"./index-ajmy0v5j.js";
18
+ import"./index-h1qh9n8b.js";
19
+ import"./index-fqth7850.js";
20
+ import"./index-61a853ky.js";
21
+ import"./index-qt1qqasc.js";
22
+ import"./index-8hhmv0ff.js";
23
+ import"./index-w6kcwhhj.js";
24
+ import"./index-1zx87sdm.js";
25
+ import"./index-vdzd98ry.js";
26
+ import"./index-y14pawe1.js";
27
+ import"./index-y5f5yg5a.js";
28
+ import"./index-nyjztqyj.js";
29
+ import"./index-r3f85n7y.js";
30
+ import"./index-fd3hkyk1.js";
31
+ import"./index-1vv1ka4a.js";
32
+ import"./index-gcf2x04k.js";
33
+ import"./index-xw608ytx.js";
34
+ import"./index-fb3zxn06.js";
35
+ import"./index-hyvxmz3e.js";
36
+ import"./index-fr0wbhdn.js";
37
+ import"./index-vegw385y.js";
38
+ import"./index-geph2sa6.js";
39
+ import"./index-8k9qpyjf.js";
40
+ import"./index-xtv4d4hv.js";
41
+ import"./index-jsbgw33b.js";
42
+ import"./index-96ztjvkn.js";
43
+ import"./index-v0p37hm2.js";
44
+ import"./index-58e3y90n.js";
45
+ import"./index-9awtk18w.js";
46
+ import"./index-t7st85f5.js";
47
+ import"./index-abhmtj00.js";
48
+ import"./index-2m3t73wk.js";
49
+ import"./index-gzy5w8ya.js";
50
+ import"./index-34xvre52.js";
51
+ import"./index-pavzsdc6.js";
52
+ import"./index-1d042x6w.js";
53
+ export {
54
+ runManagedWrapup2 as runManagedWrapup
55
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/opencode-magic-context",
3
- "version": "0.49.97",
3
+ "version": "0.49.99",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",
@@ -44,7 +44,7 @@
44
44
  "check:transformers-node-wasm": "bun scripts/verify-transformers-node-wasm.ts",
45
45
  "typecheck": "tsc -p ../retina-local-fs/tsconfig.build.json && tsc --noEmit && tsc -p tsconfig.scripts.json",
46
46
  "test": "bun ../../scripts/check-bun.mjs && bun install --frozen-lockfile && MC_SLOW_TESTS=0 MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test --parallel=4 --timeout 30000 --test-name-pattern '^(?!.*\\[slow\\] )'",
47
- "test:active-session-backfill": "MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test src/hooks/magic-context/auto-embed-session.test.ts --test-name-pattern 're-embeds old chunks' --timeout 120000",
47
+ "test:active-session-backfill": "MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test ./src/hooks/magic-context/auto-embed-session.test.ts --test-name-pattern 're-embeds old chunks' --timeout 120000",
48
48
  "test:serial": "bun install --frozen-lockfile && MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test --timeout 30000",
49
49
  "test:parallel:probe": "bun scripts/verify-parallel-db-isolation.ts",
50
50
  "lint": "bun ../../scripts/check-bun.mjs && biome check .",
@@ -193,7 +193,13 @@ export interface RunnerStatus {
193
193
  observed: "last_completion" | "resolved_for_route";
194
194
  }
195
195
 
196
+ export interface CheckpointInstructionEstimate {
197
+ rows: number;
198
+ tokens: number;
199
+ }
200
+
196
201
  export interface StatusDetail extends SidebarSnapshot {
202
+ checkpointInstructions?: CheckpointInstructionEstimate;
197
203
  /**
198
204
  * Version of the Magic Context package the answering server runs. The TUI
199
205
  * compares it with its own so the status dialog can say when the two differ
@@ -303,6 +303,17 @@ export function checkStatusViewSource(candidate: unknown):
303
303
  compressionUsage: optional.read("compressionUsage", isNullableString) ?? null,
304
304
  executeThresholdClamped: optional.read("executeThresholdClamped", isBoolean),
305
305
  windowGeometry: optional.read("windowGeometry", isWindowGeometry),
306
+ checkpointInstructions: optional.read(
307
+ "checkpointInstructions",
308
+ (value): value is NonNullable<StatusViewSource["checkpointInstructions"]> =>
309
+ isRecord(value) &&
310
+ isFiniteNumber(value.rows) &&
311
+ Number.isSafeInteger(value.rows) &&
312
+ value.rows > 0 &&
313
+ isFiniteNumber(value.tokens) &&
314
+ Number.isSafeInteger(value.tokens) &&
315
+ value.tokens > 0,
316
+ ),
306
317
  tailHygiene: optional.read("tailHygiene", isTailHygiene),
307
318
  tagCountsAuthoritative: optional.read("tagCountsAuthoritative", isBoolean),
308
319
  compactionMarker: optional.read("compactionMarker", isCompactionMarker),
@@ -186,6 +186,7 @@ export interface StatusViewSource {
186
186
  };
187
187
  readonly hiddenVariantWarnings?: readonly string[];
188
188
  readonly projectBindingWarning?: string;
189
+ readonly checkpointInstructions?: { readonly rows: number; readonly tokens: number };
189
190
  }
190
191
 
191
192
  declare const checkedStatusViewSource: unique symbol;
@@ -206,6 +207,13 @@ export interface StatusViewOptions {
206
207
  readonly now?: number;
207
208
  }
208
209
 
210
+ export function checkpointInstructionStatusText(estimate: {
211
+ rows: number;
212
+ tokens: number;
213
+ }): string {
214
+ return `${estimate.rows.toLocaleString()} update ${estimate.rows === 1 ? "row" : "rows"} (about ${estimate.tokens.toLocaleString()} tokens) since the last checkpoint. /compact removes them.`;
215
+ }
216
+
209
217
  /**
210
218
  * Category palette, kept identical to the sidebar breakdown
211
219
  * (`src/tui/slots/sidebar-content.tsx`) so one colour means one category
@@ -682,7 +690,22 @@ function statusSections(source: StatusViewSource, now: number): StatusSection[]
682
690
  ],
683
691
  },
684
692
  { title: "Cache TTL", labelWidth: 14, rows: cacheRows(source, now) },
685
- { title: "History Compression", labelWidth: 14, rows: historyRows(source, now) },
693
+ {
694
+ title: "History Compression",
695
+ labelWidth: 14,
696
+ rows: [
697
+ ...historyRows(source, now),
698
+ ...(source.checkpointInstructions?.tokens
699
+ ? [
700
+ {
701
+ label: "Instructions",
702
+ value: checkpointInstructionStatusText(source.checkpointInstructions),
703
+ tone: "muted" as const,
704
+ },
705
+ ]
706
+ : []),
707
+ ],
708
+ },
686
709
  ...configSection,
687
710
  {
688
711
  title: "Memory",
@@ -1425,10 +1425,10 @@ function buildAggregateTarget(
1425
1425
 
1426
1426
  // Whether the host keeps this kept call's real arguments. Asks every call
1427
1427
  // occurrence, so the host learns about each call it must send that way.
1428
- const keepsRealArgumentsWhenKept = (): boolean => {
1428
+ const keepsRealArgumentsWhenKept = (force?: boolean): boolean => {
1429
1429
  let keeps = false;
1430
1430
  for (const occ of occurrences) {
1431
- if (occ.kind === "tool_use" && occ.part.keepsRealArgumentsWhenKept?.() === true)
1431
+ if (occ.kind === "tool_use" && occ.part.keepsRealArgumentsWhenKept?.(force) === true)
1432
1432
  keeps = true;
1433
1433
  }
1434
1434
  return keeps;
@@ -1512,7 +1512,7 @@ function buildAggregateTarget(
1512
1512
  }
1513
1513
  return occurrences[0]?.part.getText() ?? null;
1514
1514
  },
1515
- drop(): "removed" | "truncated" | "absent" | "incomplete" {
1515
+ drop(keepRealArguments?: boolean): "removed" | "truncated" | "absent" | "incomplete" {
1516
1516
  if (!complete()) return "incomplete";
1517
1517
  if (!requiresToolArcSkeleton) {
1518
1518
  const authorization = occurrences.map((occ) => occ.part.canRemove?.());
@@ -1548,7 +1548,8 @@ function buildAggregateTarget(
1548
1548
  // whose model allowed it), this renders the bytes of a
1549
1549
  // `skeleton_real` row: real arguments, `[dropped §N§]` result. The
1550
1550
  // row stays `full`, so a later pass that can remove the call does.
1551
- if (keepsRealArgumentsWhenKept()) return skeletonReal();
1551
+ if (keepsRealArgumentsWhenKept(keepRealArguments) || keepRealArguments)
1552
+ return skeletonReal();
1552
1553
  // Otherwise the call keeps its place with a `{"dropped": …}` marker
1553
1554
  // in its arguments. That is the form such a row has had since it was
1554
1555
  // dropped, and replaying it keeps the cached prompt's bytes: a `full`
@@ -0,0 +1,56 @@
1
+ import { expect, test } from "bun:test";
2
+ import { spawnSync } from "node:child_process";
3
+ import { mkdirSync, writeFileSync } from "node:fs";
4
+ import { join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { withTestTempDir } from "./test-temp-dir";
7
+
8
+ const preload = fileURLToPath(new URL("../../test-preload.ts", import.meta.url));
9
+
10
+ /**
11
+ * Runs one passing test file under the package preload with `cwd` set to a
12
+ * fresh folder that stands in for the repository root, after writing a
13
+ * `context.db` at `store` (relative to that folder). The preload's leak scan
14
+ * then walks that folder.
15
+ */
16
+ function runWithStoreAt(store: string) {
17
+ return withTestTempDir("mc-plugin-preload-leak-scan-", (cwd) => {
18
+ const path = join(cwd, store);
19
+ mkdirSync(join(path, ".."), { recursive: true });
20
+ writeFileSync(path, "a store this run did not create\n");
21
+ const probe = join(cwd, "probe.test.ts");
22
+ writeFileSync(
23
+ probe,
24
+ 'import { expect, test } from "bun:test";\ntest("probe", () => expect(1).toBe(1));\n',
25
+ );
26
+ const child = spawnSync(process.execPath, ["test", "--preload", preload, probe], {
27
+ cwd,
28
+ encoding: "utf8",
29
+ timeout: 30_000,
30
+ windowsHide: true,
31
+ });
32
+ if (child.error) throw child.error;
33
+ return { status: child.status, output: child.stdout + child.stderr, store };
34
+ });
35
+ }
36
+
37
+ test("the preload leak scan skips a store under the cwd's top-level target folder", () => {
38
+ const run = runWithStoreAt("target/scratch/other-task/crates/testdata/context.db");
39
+ expect(run.output).not.toContain("Test storage leaked");
40
+ expect(run.output).toContain("1 pass");
41
+ expect(run.status).toBe(0);
42
+ });
43
+
44
+ test("the preload leak scan still fails on a store inside a package folder", () => {
45
+ const run = runWithStoreAt("packages/plugin/leaked/context.db");
46
+ expect(run.status).toBe(1);
47
+ expect(run.output).toContain("Test storage leaked into the package directory");
48
+ expect(run.output).toContain(run.store);
49
+ });
50
+
51
+ test("the preload leak scan skips only the top-level target folder, not a nested one", () => {
52
+ const run = runWithStoreAt("packages/plugin/target/context.db");
53
+ expect(run.status).toBe(1);
54
+ expect(run.output).toContain("Test storage leaked into the package directory");
55
+ expect(run.output).toContain(run.store);
56
+ });
@@ -184,7 +184,7 @@ export interface TranscriptPart {
184
184
  * means the marker. A host that answers true may note the call, so every
185
185
  * copy of it the host sends carries the same arguments.
186
186
  */
187
- keepsRealArgumentsWhenKept?(): boolean;
187
+ keepsRealArgumentsWhenKept?(force?: boolean): boolean;
188
188
 
189
189
  /** Remove one half of a complete tool arc. Callers must remove both halves together. */
190
190
  remove?(): boolean;
@@ -3,7 +3,10 @@ import { COMPACTION_ENABLED_PATH } from "../../config/agent-disable";
3
3
  import { log } from "../../shared/logger";
4
4
  import { pluginPackageVersion } from "../../shared/plugin-package-version";
5
5
  import type { SidebarSnapshot, StatusDetail } from "../../shared/rpc-types";
6
- import { buildUnavailableStatusView } from "../../shared/status-view";
6
+ import {
7
+ buildUnavailableStatusView,
8
+ checkpointInstructionStatusText,
9
+ } from "../../shared/status-view";
7
10
  import { statusVersionNotice } from "../../shared/status-view-check";
8
11
  import { compactionOffSidebarRows, nativeCompactionContextLabel } from "../../tui/compaction-off";
9
12
  import {
@@ -103,6 +106,7 @@ export function statusText(
103
106
  | "configReloadFailure"
104
107
  | "lastTransformError"
105
108
  | "projectBindingWarning"
109
+ | "checkpointInstructions"
106
110
  >,
107
111
  ): string {
108
112
  const context =
@@ -120,6 +124,9 @@ export function statusText(
120
124
  `Compartments: ${detail.compartmentCount}`,
121
125
  `Memories: ${detail.memoryBlockCount} injected / ${detail.memoryCount} stored`,
122
126
  `Pending reductions: ${detail.pendingOpsCount}`,
127
+ ...(detail.checkpointInstructions?.tokens
128
+ ? [`Instructions: ${checkpointInstructionStatusText(detail.checkpointInstructions)}`]
129
+ : []),
123
130
  `Harness: opencode2`,
124
131
  ...(detail.configGeneration === undefined
125
132
  ? []
@@ -95,3 +95,24 @@ test("the text dialog carries the status a component dialog would have drawn", (
95
95
  ].join("\n"),
96
96
  );
97
97
  });
98
+
99
+ test("OpenCode 2 text status explains how to remove instruction update rows", () => {
100
+ const detail = {
101
+ usagePercentage: 10,
102
+ inputTokens: 1_000,
103
+ contextLimit: 10_000,
104
+ historianRunning: false,
105
+ compartmentCount: 0,
106
+ memoryBlockCount: 0,
107
+ memoryCount: 0,
108
+ pendingOpsCount: 0,
109
+ lastTransformError: null,
110
+ checkpointInstructions: { rows: 2, tokens: 24 },
111
+ } as StatusDetail;
112
+ expect(statusText(detail)).toContain(
113
+ "Instructions: 2 update rows (about 24 tokens) since the last checkpoint. /compact removes them.",
114
+ );
115
+ expect(statusText({ ...detail, checkpointInstructions: { rows: 0, tokens: 0 } })).not.toContain(
116
+ "Instructions:",
117
+ );
118
+ });
@@ -1,29 +0,0 @@
1
- import {
2
- ensureMemoryEmbeddings2
3
- } from "./index-0bjj9yf3.js";
4
- import"./index-7m2tnk8q.js";
5
- import"./index-qjwpqvnf.js";
6
- import"./index-2amn2s73.js";
7
- import"./index-qt1qqasc.js";
8
- import"./index-r1d45dsr.js";
9
- import"./index-r3f85n7y.js";
10
- import"./index-7sdns2ww.js";
11
- import"./index-j4dcjb8t.js";
12
- import"./index-fgw241hh.js";
13
- import"./index-hj78hvhm.js";
14
- import"./index-89xg64wb.js";
15
- import"./index-hedgz8an.js";
16
- import"./index-96ztjvkn.js";
17
- import"./index-v0p37hm2.js";
18
- import"./index-tqtpgnhr.js";
19
- import"./index-6mryx739.js";
20
- import"./index-3n4j5rqc.js";
21
- import"./index-zfx7mtqa.js";
22
- import"./index-gzy5w8ya.js";
23
- import"./index-3fhb0j32.js";
24
- import"./index-pavzsdc6.js";
25
- import"./index-dt7cyqfe.js";
26
- import"./index-1d042x6w.js";
27
- export {
28
- ensureMemoryEmbeddings2 as ensureMemoryEmbeddings
29
- };