@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
@@ -35,19 +35,17 @@ import {
35
35
  getRawSessionTagKeysThrough2,
36
36
  getLegacyProtectedTailStartOrdinal2,
37
37
  readSessionChunk2
38
- } from "./index-hp46xe93.js";
38
+ } from "./index-8hhmv0ff.js";
39
39
  import {
40
40
  getHarness2,
41
41
  harnessOwnsOpenCodeStore2
42
42
  } from "./index-pavzsdc6.js";
43
43
  import {
44
44
  getMagicContextHistorianSessionDir,
45
+ sanitizeDiagnosticText,
45
46
  log2,
46
47
  sessionLog2
47
- } from "./index-3fhb0j32.js";
48
- import {
49
- sanitizeDiagnosticText
50
- } from "./index-dt7cyqfe.js";
48
+ } from "./index-34xvre52.js";
51
49
  import {
52
50
  createScanner,
53
51
  parseTree,
@@ -64,7 +62,7 @@ import {
64
62
  import {
65
63
  ensureStorageDirectorySync,
66
64
  writeStorageFileAtomicSync
67
- } from "./index-6mryx739.js";
65
+ } from "./index-t7st85f5.js";
68
66
  import {
69
67
  catalogOutputReserve,
70
68
  setOutputReserveConfig,
@@ -74,7 +72,7 @@ import {
74
72
  deriveTriggerBudget2,
75
73
  resolveHistorianProducerLimits2,
76
74
  producerSourceLocalBudget2
77
- } from "./index-45qgkg8j.js";
75
+ } from "./index-h1qh9n8b.js";
78
76
  import {
79
77
  isCompactionEnabled,
80
78
  migrateLegacyAgentEnabledInMemory,
@@ -104,10 +102,10 @@ import {
104
102
  estimateTokens,
105
103
  createTokenCountMemo,
106
104
  estimateFixedPromptTokens
107
- } from "./index-zfx7mtqa.js";
105
+ } from "./index-2m3t73wk.js";
108
106
  import {
109
107
  FAIL_CLOSED_DOCTOR_COMMAND
110
- } from "./index-c205x7xd.js";
108
+ } from "./index-8k9qpyjf.js";
111
109
  import {
112
110
  inRootAsyncContext2,
113
111
  Database2,
@@ -118,13 +116,13 @@ import {
118
116
  import {
119
117
  shouldSkipHomeProjectMemory,
120
118
  resolveProjectIdentity
121
- } from "./index-hj78hvhm.js";
119
+ } from "./index-vegw385y.js";
122
120
  import {
123
121
  getSchemaFenceRejection,
124
122
  LATEST_SUPPORTED_VERSION,
125
123
  getPersistedSchemaVersion,
126
124
  openDatabase
127
- } from "./index-zkjx8gq3.js";
125
+ } from "./index-xw608ytx.js";
128
126
  import {
129
127
  areRustHistorianSyntheticParts2,
130
128
  isStrictGapHealingMessage2,
@@ -132,7 +130,7 @@ import {
132
130
  RawOrdinalsNotReady2,
133
131
  dropRawSessionOrdinalCheckpoints2,
134
132
  runSessionWarmupWorker
135
- } from "./index-hedgz8an.js";
133
+ } from "./index-jsbgw33b.js";
136
134
  import {
137
135
  parseCompartmentOutput,
138
136
  resolveWorkspaceShareCategories,
@@ -141,10 +139,10 @@ import {
141
139
  resolveStoredPathWorkspaceIdentity,
142
140
  sourceNameForMemory,
143
141
  computeWorkspaceEpochFingerprint
144
- } from "./index-dnpcv1rg.js";
142
+ } from "./index-hyvxmz3e.js";
145
143
  import {
146
144
  BoundedSessionMap
147
- } from "./index-cpbr0xvk.js";
145
+ } from "./index-xtv4d4hv.js";
148
146
  import {
149
147
  V2_MEMORY_CATEGORIES,
150
148
  CATEGORY_PRIORITY,
@@ -168,7 +166,7 @@ import {
168
166
  replaceCompartmentChunkEmbeddings2,
169
167
  deleteChunkEmbedBackoffForSession2,
170
168
  chunkWindowSourceKey2
171
- } from "./index-j4dcjb8t.js";
169
+ } from "./index-1vv1ka4a.js";
172
170
  import {
173
171
  COMPARTMENT_LEASE_RENEWAL_MS,
174
172
  getCompartmentLeaseBlocker,
@@ -216,14 +214,14 @@ import {
216
214
  getProjectState,
217
215
  recordSubagentInvocation,
218
216
  getLatestHistorianInvocationId
219
- } from "./index-8v1brm5n.js";
217
+ } from "./index-em72jhc0.js";
220
218
  import {
221
219
  clearCompressionDepth,
222
220
  clearCompressionDepthRange,
223
221
  toMessageIndexSource,
224
222
  clearIndexedMessagesInTransaction,
225
223
  indexSourcesAfterOrdinal
226
- } from "./index-89bkkgcn.js";
224
+ } from "./index-tyjx0dwz.js";
227
225
  import {
228
226
  stripWellFormedLeadingTagPrefix,
229
227
  peelLeadingMcTagNotation,
@@ -274,17 +272,17 @@ import {
274
272
  foldShrunkPartTags2,
275
273
  getTagNumberByMessageId2,
276
274
  getActiveTagsBySession2
277
- } from "./index-w7n7qkpf.js";
275
+ } from "./index-w6kcwhhj.js";
278
276
  import {
279
277
  openCodeDbExists,
280
278
  withReadOnlySessionDb,
281
279
  getMessageTimesFromOpenCodeDb
282
- } from "./index-k34hc455.js";
280
+ } from "./index-vdzd98ry.js";
283
281
  import {
284
282
  getSessionNotes,
285
283
  getReadySmartNotes,
286
284
  insertPrimerCandidates
287
- } from "./index-880a24vd.js";
285
+ } from "./index-ab86c21b.js";
288
286
  import {
289
287
  pushNotification2
290
288
  } from "./index-y14pawe1.js";
@@ -302,13 +300,13 @@ import {
302
300
  getProjectChunkEmbeddingModelId2,
303
301
  getProjectEmbeddingMaxInputTokens2,
304
302
  embedItemsWindowBounded2
305
- } from "./index-7m2tnk8q.js";
303
+ } from "./index-mhdavdd4.js";
306
304
  import {
307
305
  renderUserFacingFailure,
308
306
  userFacingFailureCode,
309
307
  promoteSessionFactsDurable,
310
308
  embedPromotedFacts
311
- } from "./index-910gahfb.js";
309
+ } from "./index-esym6cw4.js";
312
310
  import {
313
311
  isMarkerCandidateBasisCurrent2,
314
312
  invalidateMarkerCandidateBasis2,
@@ -319,10 +317,10 @@ import {
319
317
  certifiedMarkerReferenceFloor2,
320
318
  readMarkerReferenceRows2,
321
319
  readKnownMarkerReferenceRows2
322
- } from "./index-azkfw78y.js";
320
+ } from "./index-qxzk5s30.js";
323
321
  import {
324
322
  sendStatusNotification2
325
- } from "./index-kj4bprep.js";
323
+ } from "./index-61a853ky.js";
326
324
  import {
327
325
  retreatPastHostUnservedRows,
328
326
  snapTerminalCompartmentToServedRow,
@@ -342,7 +340,7 @@ import {
342
340
  import {
343
341
  logSlowWriteTransaction,
344
342
  WriteTransactionSteps
345
- } from "./index-tqtpgnhr.js";
343
+ } from "./index-9awtk18w.js";
346
344
  import {
347
345
  sameProjectDirectory
348
346
  } from "./index-knvkbfvh.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./index-gzy5w8ya.js";
7
7
  import {
8
8
  managedAuthorityNoteRow
9
- } from "./index-dnpcv1rg.js";
9
+ } from "./index-hyvxmz3e.js";
10
10
 
11
11
  // src/features/magic-context/storage-notes.ts
12
12
  var NOTE_TYPES = new Set(["session", "smart"]);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  log2
3
- } from "./index-3fhb0j32.js";
3
+ } from "./index-34xvre52.js";
4
4
  import {
5
5
  canonicalProjectDirectory
6
6
  } from "./index-knvkbfvh.js";
@@ -5,6 +5,9 @@ import {
5
5
  import {
6
6
  Database2
7
7
  } from "./index-gzy5w8ya.js";
8
+ import {
9
+ estimateTokens
10
+ } from "./index-2m3t73wk.js";
8
11
  import {
9
12
  sameProjectDirectory
10
13
  } from "./index-knvkbfvh.js";
@@ -14,6 +17,31 @@ import { createHash } from "node:crypto";
14
17
  import { statSync } from "node:fs";
15
18
  import { hostname } from "node:os";
16
19
  import { resolve } from "node:path";
20
+
21
+ // src/v2/checkpoint-instruction-status.ts
22
+ function estimateRows(rows) {
23
+ let rowsCount = 0;
24
+ let tokens = 0;
25
+ for (const row of rows) {
26
+ const { text, metadata } = JSON.parse(row.data);
27
+ const sources = metadata?.instructionSources;
28
+ if (metadata?.notice !== "instructions" || !Array.isArray(sources) || sources.length === 0 || !sources.every((source) => typeof source === "string" && source.length > 0) || typeof text !== "string")
29
+ continue;
30
+ rowsCount++;
31
+ tokens += estimateTokens(text);
32
+ }
33
+ return { rows: rowsCount, tokens };
34
+ }
35
+ function readCheckpointInstructionEstimate(db, sessionID) {
36
+ return estimateRows(db.prepare(`SELECT data FROM session_message
37
+ WHERE session_id = ? AND type = 'system' AND seq > COALESCE((
38
+ SELECT seq FROM session_message WHERE session_id = ? AND type = 'compaction'
39
+ AND CASE WHEN json_valid(data) THEN json_extract(data, '$.status') END = 'completed'
40
+ ORDER BY seq DESC LIMIT 1
41
+ ), -1) ORDER BY seq`).iterate(sessionID, sessionID));
42
+ }
43
+
44
+ // src/v2/store-reader.ts
17
45
  function gaDatabasePath2(dataHome, channel = "latest", env = process.env) {
18
46
  return resolveOpenCodeDbPath("v2", { dataHome, channel, env }).path;
19
47
  }
@@ -734,6 +762,9 @@ class V2StoreReader2 {
734
762
  ORDER BY seq ASC`).all(sessionID, throughSeq).map(decode);
735
763
  });
736
764
  }
765
+ checkpointInstructionEstimate(sessionID) {
766
+ return readCheckpointInstructionEstimate(this.db, sessionID);
767
+ }
737
768
  sequenceForId(sessionID, id) {
738
769
  if (!id)
739
770
  return;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getMagicContextStorageDir
3
- } from "./index-3fhb0j32.js";
3
+ } from "./index-34xvre52.js";
4
4
  import {
5
5
  ensureStorageDirectorySync,
6
6
  writeStorageFileAtomicSync
7
- } from "./index-6mryx739.js";
7
+ } from "./index-t7st85f5.js";
8
8
 
9
9
  // src/hooks/auto-update-checker/semver.ts
10
10
  function isValidSemver(version) {
@@ -6,14 +6,14 @@ import {
6
6
  StaleRouteHandleError,
7
7
  SubcClient,
8
8
  isConsumerReconnectTransient
9
- } from "./index-fgw241hh.js";
9
+ } from "./index-gcf2x04k.js";
10
10
  import {
11
11
  getHarness2
12
12
  } from "./index-pavzsdc6.js";
13
13
  import {
14
14
  getDataDir,
15
15
  log2
16
- } from "./index-3fhb0j32.js";
16
+ } from "./index-34xvre52.js";
17
17
  import {
18
18
  inRootAsyncContext2
19
19
  } from "./index-gzy5w8ya.js";
@@ -23,7 +23,7 @@ import {
23
23
  trackCompartmentChunkSearchPool2,
24
24
  peekCompartmentChunkSearchPool2,
25
25
  warmCompartmentChunkSearchPool2
26
- } from "./index-j4dcjb8t.js";
26
+ } from "./index-1vv1ka4a.js";
27
27
  import {
28
28
  saveCommitEmbedding,
29
29
  loadProjectCommitEmbeddings,
@@ -39,7 +39,7 @@ import {
39
39
  enqueueShadowEmbeddingItems2,
40
40
  getProjectEmbeddingSnapshot2,
41
41
  embedItemsForProject2
42
- } from "./index-7m2tnk8q.js";
42
+ } from "./index-mhdavdd4.js";
43
43
  import {
44
44
  recordEmbeddingMeasurement
45
45
  } from "./index-2amn2s73.js";
@@ -55,7 +55,7 @@ import {
55
55
  sanitizeFtsQuery,
56
56
  searchMemoriesFTS,
57
57
  searchMemoriesFTSUnion
58
- } from "./index-910gahfb.js";
58
+ } from "./index-esym6cw4.js";
59
59
  import {
60
60
  ModuleMemoryAuthorityError2,
61
61
  getMemoriesByProject2,
@@ -65,36 +65,36 @@ import {
65
65
  import {
66
66
  matchedSearchSnippet,
67
67
  getIndexedMessageCorpusSize
68
- } from "./index-89bkkgcn.js";
68
+ } from "./index-tyjx0dwz.js";
69
69
  import {
70
70
  getMessageIndexEpoch,
71
71
  isMessageIndexSearchable,
72
72
  withMemoryHintContent,
73
73
  autoSearchRelevance,
74
74
  recordAutoSearchLane
75
- } from "./index-9jvxq5rt.js";
75
+ } from "./index-h1xvt8fw.js";
76
76
  import {
77
77
  ensureMemoryEmbeddings2
78
- } from "./index-0bjj9yf3.js";
78
+ } from "./index-e6s2jpr8.js";
79
79
  import {
80
80
  MESSAGE_FTS_SESSION_FILTER_SQL,
81
81
  withMessageFtsSessionFilter,
82
82
  messageTextVisibleInRequestSql
83
- } from "./index-mgy7g740.js";
83
+ } from "./index-kjdys7e2.js";
84
84
  import {
85
85
  isRecord
86
- } from "./index-w7n7qkpf.js";
86
+ } from "./index-w6kcwhhj.js";
87
87
  import {
88
88
  resolveWorkspaceShareCategories,
89
89
  resolveWorkspaceIdentitySet,
90
90
  expandWorkspaceIdentitySetWithAliases,
91
91
  resolveStoredPathWorkspaceIdentity,
92
92
  sourceNameForMemory
93
- } from "./index-dnpcv1rg.js";
93
+ } from "./index-hyvxmz3e.js";
94
94
  import {
95
95
  getNotes,
96
96
  getActivePrimers
97
- } from "./index-880a24vd.js";
97
+ } from "./index-ab86c21b.js";
98
98
  import {
99
99
  isKnownAutocommit
100
100
  } from "./index-8ajstryz.js";
@@ -3,14 +3,14 @@ import {
3
3
  } from "./index-qt1qqasc.js";
4
4
  import {
5
5
  log2
6
- } from "./index-3fhb0j32.js";
6
+ } from "./index-34xvre52.js";
7
7
  import {
8
8
  contentSha2562,
9
9
  getProjectEmbeddingSnapshot2,
10
10
  readSearchBackfillCursor2,
11
11
  writeSearchBackfillCursor2,
12
12
  embedItemsWindowBounded2
13
- } from "./index-7m2tnk8q.js";
13
+ } from "./index-mhdavdd4.js";
14
14
  import {
15
15
  saveEmbeddingIfHashMatches
16
16
  } from "./index-qjwpqvnf.js";
@@ -7,7 +7,7 @@ import {
7
7
  deleteTagIdentityRevisions,
8
8
  getTableColumnNames,
9
9
  getMeasuredToolDefinitionTokens
10
- } from "./index-cpbr0xvk.js";
10
+ } from "./index-xtv4d4hv.js";
11
11
  import {
12
12
  invalidateAutoEmbedSession,
13
13
  drainBackgroundBatches
@@ -20,7 +20,7 @@ import {
20
20
  getMagicContextStorageDir,
21
21
  log2,
22
22
  sessionLog2
23
- } from "./index-3fhb0j32.js";
23
+ } from "./index-34xvre52.js";
24
24
  import {
25
25
  prepareCachedStatement2,
26
26
  withSqliteBackgroundWriter2,
@@ -28,14 +28,14 @@ import {
28
28
  } from "./index-gzy5w8ya.js";
29
29
  import {
30
30
  deleteUnmappedMessageFtsRows2
31
- } from "./index-89xg64wb.js";
31
+ } from "./index-geph2sa6.js";
32
32
  import {
33
33
  deleteChunkEmbedBackoffForSession2
34
- } from "./index-j4dcjb8t.js";
34
+ } from "./index-1vv1ka4a.js";
35
35
  import {
36
36
  isPidAlive,
37
37
  readProcessStartTime
38
- } from "./index-3n4j5rqc.js";
38
+ } from "./index-abhmtj00.js";
39
39
  import {
40
40
  stripTagPrefix,
41
41
  isRecord,
@@ -68,25 +68,25 @@ import {
68
68
  getPendingPiCompactionMarkerState,
69
69
  logPiCompactionMarkerClear,
70
70
  isPrefixBoundThinkingModel
71
- } from "./index-w7n7qkpf.js";
71
+ } from "./index-w6kcwhhj.js";
72
72
  import {
73
73
  withReadOnlySessionDb
74
- } from "./index-k34hc455.js";
74
+ } from "./index-vdzd98ry.js";
75
75
  import {
76
76
  layoutLkgPrefix,
77
77
  assembleLkgPrefix
78
- } from "./index-dnpcv1rg.js";
78
+ } from "./index-hyvxmz3e.js";
79
79
  import {
80
80
  ensurePrivateStorageDirectorySync,
81
81
  writeStorageFileSync,
82
82
  writeStorageFileAtomicSync,
83
83
  syncStorageDirectorySync,
84
84
  writeStorageFileDurableAtomicSync
85
- } from "./index-6mryx739.js";
85
+ } from "./index-t7st85f5.js";
86
86
  import {
87
87
  gaDatabasePath2,
88
88
  V2StoreReader2
89
- } from "./index-tr4ep2ej.js";
89
+ } from "./index-ajmy0v5j.js";
90
90
  import {
91
91
  markHostInstructionRow,
92
92
  hostInstructionRowID,
@@ -99,7 +99,7 @@ import {
99
99
  } from "./index-avwt563y.js";
100
100
  import {
101
101
  logSlowWriteTransaction
102
- } from "./index-tqtpgnhr.js";
102
+ } from "./index-9awtk18w.js";
103
103
 
104
104
  // src/features/magic-context/session-activity.ts
105
105
  var PREFIX = "retrospective_activity:";
@@ -1,6 +1,7 @@
1
1
  import {
2
- sanitizeDiagnosticText
3
- } from "./index-dt7cyqfe.js";
2
+ sanitizeDiagnosticText,
3
+ sessionLog2
4
+ } from "./index-34xvre52.js";
4
5
  import {
5
6
  PROMOTABLE_CATEGORIES,
6
7
  CATEGORY_DEFAULT_TTL
@@ -8,20 +9,17 @@ import {
8
9
  import {
9
10
  DEFAULT_LOCAL_EMBEDDING_MODEL
10
11
  } from "./index-r3f85n7y.js";
11
- import {
12
- sessionLog2
13
- } from "./index-3fhb0j32.js";
14
12
  import {
15
13
  isSynapseEmbeddingTruncated,
16
14
  SynapseEmbeddingProvider
17
- } from "./index-fgw241hh.js";
15
+ } from "./index-gcf2x04k.js";
18
16
  import {
19
17
  LocalEmbeddingProvider
20
- } from "./index-r1d45dsr.js";
18
+ } from "./index-nyjztqyj.js";
21
19
  import {
22
20
  OpenAICompatibleEmbeddingProvider,
23
21
  embedTextForProject2
24
- } from "./index-7m2tnk8q.js";
22
+ } from "./index-mhdavdd4.js";
25
23
  import {
26
24
  saveEmbeddingIfHashMatches
27
25
  } from "./index-qjwpqvnf.js";
@@ -3,10 +3,10 @@ import {
3
3
  } from "./index-pavzsdc6.js";
4
4
  import {
5
5
  isUserHomeDirectory
6
- } from "./index-hj78hvhm.js";
6
+ } from "./index-vegw385y.js";
7
7
  import {
8
8
  logSlowWriteTransaction
9
- } from "./index-tqtpgnhr.js";
9
+ } from "./index-9awtk18w.js";
10
10
 
11
11
  // src/features/magic-context/session-project-storage.ts
12
12
  var SESSION_CHUNK_REPAIR_BATCH_SIZE = 100;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  estimateTokens
3
- } from "./index-zfx7mtqa.js";
3
+ } from "./index-2m3t73wk.js";
4
4
  import {
5
5
  getHarness2
6
6
  } from "./index-pavzsdc6.js";
7
7
  import {
8
8
  log2
9
- } from "./index-3fhb0j32.js";
9
+ } from "./index-34xvre52.js";
10
10
  import {
11
11
  inRootAsyncContext2
12
12
  } from "./index-gzy5w8ya.js";
@@ -5,10 +5,10 @@ import {
5
5
  } from "./index-gzy5w8ya.js";
6
6
  import {
7
7
  runSessionWarmupWorker
8
- } from "./index-hedgz8an.js";
8
+ } from "./index-jsbgw33b.js";
9
9
  import {
10
10
  logSlowWriteTransaction
11
- } from "./index-tqtpgnhr.js";
11
+ } from "./index-9awtk18w.js";
12
12
 
13
13
  // src/features/magic-context/message-fts-rowid-map.ts
14
14
  import { createHash } from "node:crypto";
@@ -5,10 +5,10 @@ import {
5
5
  getMagicContextStorageDir,
6
6
  log2,
7
7
  sessionLog2
8
- } from "./index-3fhb0j32.js";
8
+ } from "./index-34xvre52.js";
9
9
  import {
10
10
  writeStorageFileAtomicSync
11
- } from "./index-6mryx739.js";
11
+ } from "./index-t7st85f5.js";
12
12
  import {
13
13
  localBudget,
14
14
  calibrationForModelKey
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  log2,
6
6
  sessionLog2
7
- } from "./index-3fhb0j32.js";
7
+ } from "./index-34xvre52.js";
8
8
  import {
9
9
  inRootAsyncContext2,
10
10
  getSqliteDatabasePath2,
@@ -13,10 +13,10 @@ import {
13
13
  } from "./index-gzy5w8ya.js";
14
14
  import {
15
15
  runSessionWarmupWorker
16
- } from "./index-hedgz8an.js";
16
+ } from "./index-jsbgw33b.js";
17
17
  import {
18
18
  scheduleAfterBootQuiet
19
- } from "./index-hj78hvhm.js";
19
+ } from "./index-vegw385y.js";
20
20
  import {
21
21
  cleanSearchText,
22
22
  hintKeywordRelevance,
@@ -28,7 +28,7 @@ import {
28
28
  clearIndexedMessages,
29
29
  indexSingleMessage,
30
30
  indexMessagesAfterOrdinal
31
- } from "./index-89bkkgcn.js";
31
+ } from "./index-tyjx0dwz.js";
32
32
 
33
33
  // src/features/magic-context/message-index-async.ts
34
34
  var indexCancellations = new Map;
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-sd3egckz.js";
4
4
  import {
5
5
  log2
6
- } from "./index-3fhb0j32.js";
6
+ } from "./index-34xvre52.js";
7
7
 
8
8
  // src/shared/conflict-detector.ts
9
9
  import { homedir as homedir2 } from "node:os";
@@ -3,12 +3,12 @@ import {
3
3
  } from "./index-fr0wbhdn.js";
4
4
  import {
5
5
  log2
6
- } from "./index-3fhb0j32.js";
6
+ } from "./index-34xvre52.js";
7
7
  import {
8
8
  ensureColumn,
9
9
  healAllNullColumns,
10
10
  installV95PerfSchema
11
- } from "./index-cpbr0xvk.js";
11
+ } from "./index-xtv4d4hv.js";
12
12
  import {
13
13
  resolveOpenCodeDbPath,
14
14
  openCodeDbPathExists,
@@ -20,10 +20,10 @@ import {
20
20
  import {
21
21
  normalizeStoredProjectPath,
22
22
  storedPathBelongsToIdentity
23
- } from "./index-hj78hvhm.js";
23
+ } from "./index-vegw385y.js";
24
24
  import {
25
25
  logSlowWriteTransaction
26
- } from "./index-tqtpgnhr.js";
26
+ } from "./index-9awtk18w.js";
27
27
 
28
28
  // src/features/magic-context/lkg-prefix-chunks.ts
29
29
  import { createHash } from "node:crypto";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-v0p37hm2.js";
4
4
  import {
5
5
  log2
6
- } from "./index-3fhb0j32.js";
6
+ } from "./index-34xvre52.js";
7
7
  import {
8
8
  inRootAsyncContext2,
9
9
  getSqliteDatabasePath2,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TEXT_TAG_IDENTITY_MARKER
3
- } from "./index-w7n7qkpf.js";
3
+ } from "./index-w6kcwhhj.js";
4
4
 
5
5
  // src/features/magic-context/message-fts-session-filter.ts
6
6
  var MESSAGE_FTS_SESSION_FILTER_SQL = `+message_history_fts.rowid IN (
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  formatFailClosedBlockingSummary
3
- } from "./index-c205x7xd.js";
3
+ } from "./index-8k9qpyjf.js";
4
4
  import {
5
5
  RAW_MESSAGE_TYPES2
6
- } from "./index-tr4ep2ej.js";
6
+ } from "./index-ajmy0v5j.js";
7
7
  import {
8
8
  markHostUnservedRow
9
9
  } from "./index-s9x93tfs.js";