@cortexkit/opencode-magic-context 0.49.33 → 0.49.35

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 (229) hide show
  1. package/dist/auto-search-worker.js +11 -6
  2. package/dist/chunk-embedding-write-worker.js +16 -14
  3. package/dist/{compaction-marker-candidates-31h86ph0.js → compaction-marker-candidates-g0p67ced.js} +3 -2
  4. package/dist/compaction-marker-candidates-worker.js +1 -1
  5. package/dist/{compartment-chunk-embedding-5q5gj67r.js → compartment-chunk-embedding-y4136are.js} +8 -7
  6. package/dist/{conflict-warning-hook-xgskea1v.js → conflict-warning-hook-hhw8z5ak.js} +9 -8
  7. package/dist/{context-jyzkstnr.js → context-fk8e3h9p.js} +1400 -701
  8. package/dist/{derive-budgets-pqybnx09.js → derive-budgets-htj16n4x.js} +3 -2
  9. package/dist/embedding-backfill-q6n72sy0.js +27 -0
  10. package/dist/embedding-worker-process.js +2 -1
  11. package/dist/embedding-worker.js +5 -4
  12. package/dist/expand-attachments-h33jbgyz.js +21 -0
  13. package/dist/features/magic-context/auto-search-diagnostics.d.ts +21 -0
  14. package/dist/features/magic-context/auto-search-diagnostics.d.ts.map +1 -0
  15. package/dist/features/magic-context/compaction-marker.d.ts +22 -6
  16. package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
  17. package/dist/features/magic-context/compartment-chunk-embedding.d.ts +1 -1
  18. package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
  19. package/dist/features/magic-context/search.d.ts +4 -0
  20. package/dist/features/magic-context/search.d.ts.map +1 -1
  21. package/dist/features/magic-context/storage-meta-persisted.d.ts +7 -0
  22. package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
  23. package/dist/features/magic-context/store-generation-rebase-labels.d.ts +6 -0
  24. package/dist/features/magic-context/store-generation-rebase-labels.d.ts.map +1 -0
  25. package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -1
  26. package/dist/{history-owner-36wp3mkb.js → history-owner-0z620wgz.js} +3 -2
  27. package/dist/hooks/magic-context/apply-operations.d.ts +20 -3
  28. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  29. package/dist/hooks/magic-context/auto-search-observation.d.ts +13 -0
  30. package/dist/hooks/magic-context/auto-search-observation.d.ts.map +1 -0
  31. package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
  32. package/dist/hooks/magic-context/auto-search-worker-client.d.ts +5 -1
  33. package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
  34. package/dist/hooks/magic-context/compaction-marker-manager.d.ts +5 -5
  35. package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
  36. package/dist/hooks/magic-context/compaction-marker-publication.d.ts +9 -0
  37. package/dist/hooks/magic-context/compaction-marker-publication.d.ts.map +1 -0
  38. package/dist/hooks/magic-context/compartment-commit-hashes.d.ts +4 -0
  39. package/dist/hooks/magic-context/compartment-commit-hashes.d.ts.map +1 -0
  40. package/dist/hooks/magic-context/compartment-runner-validation.d.ts +1 -0
  41. package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
  42. package/dist/hooks/magic-context/event-resolvers.d.ts.map +1 -1
  43. package/dist/hooks/magic-context/final-wire-completeness.d.ts +15 -0
  44. package/dist/hooks/magic-context/final-wire-completeness.d.ts.map +1 -0
  45. package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
  46. package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
  47. package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts +1 -0
  48. package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
  49. package/dist/hooks/magic-context/read-session-chunk.d.ts +11 -0
  50. package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
  51. package/dist/hooks/magic-context/read-session-formatting.d.ts +2 -0
  52. package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
  53. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  54. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  55. package/dist/{index-as2amvn3.js → index-0c7p8mq5.js} +6 -531
  56. package/dist/{index-51rdvtkz.js → index-1rhgxqs8.js} +2 -2
  57. package/dist/index-2amn2s73.js +123 -0
  58. package/dist/{index-c7phnbvk.js → index-2p37txes.js} +1 -1
  59. package/dist/index-2qbtqg1w.js +529 -0
  60. package/dist/{index-waktfbjy.js → index-2v6nvy3k.js} +4 -4
  61. package/dist/{index-dq5xzeb9.js → index-3d3872c6.js} +7 -5
  62. package/dist/{index-qr2mb02j.js → index-3j9t1v4n.js} +55 -21
  63. package/dist/{index-2xh37qn5.js → index-4bgk5ztz.js} +576 -5524
  64. package/dist/{index-b88dwwrh.js → index-4xyjr62e.js} +1 -1
  65. package/dist/index-66a50f3e.js +777 -0
  66. package/dist/{index-94ef0qe2.js → index-87ctnzz9.js} +33 -5
  67. package/dist/{index-xrnsygfq.js → index-9wnbnx8f.js} +1 -1
  68. package/dist/{index-3fkk2gwj.js → index-b6xz3qbe.js} +246 -420
  69. package/dist/{index-0fe4q77z.js → index-brg2w6qc.js} +146 -134
  70. package/dist/{index-spwjbkc7.js → index-dnqqqc5f.js} +1 -1
  71. package/dist/index-dy7w6wm4.js +194 -0
  72. package/dist/{index-3jmx3fae.js → index-ezv6dz3y.js} +37 -7
  73. package/dist/index-f297z1n8.js +4557 -0
  74. package/dist/{index-qgh1qwjj.js → index-f9b3vtt1.js} +1 -1
  75. package/dist/{index-v15ne3a3.js → index-faxb7mck.js} +2 -2
  76. package/dist/{index-rrv26qjz.js → index-fw42ms3m.js} +1 -1
  77. package/dist/{index-t5pck3ss.js → index-fxbk7gk3.js} +1 -1
  78. package/dist/{index-wfybj1dw.js → index-g4t7850m.js} +2 -2
  79. package/dist/{index-hbt0sbv2.js → index-gyaa159j.js} +18 -276
  80. package/dist/{index-4pnsgvfk.js → index-hacf2tyx.js} +1 -1
  81. package/dist/{index-s1n8dd2n.js → index-jkanybgq.js} +2 -2
  82. package/dist/{index-2743x98y.js → index-jn0ddrhp.js} +29 -138
  83. package/dist/{index-h7tgn49j.js → index-jrfre9ah.js} +5 -222
  84. package/dist/{index-kfyb3k6n.js → index-jz5bk7xd.js} +2 -2
  85. package/dist/{index-np3rgfw4.js → index-ksv0a31x.js} +3 -3
  86. package/dist/{index-7kkphb6c.js → index-nj360hcs.js} +4 -4
  87. package/dist/{index-gkee6p4g.js → index-p56dszfp.js} +3 -3
  88. package/dist/{index-4s4zq97n.js → index-pq0dpwrc.js} +4 -4
  89. package/dist/{index-rfxzazzy.js → index-pswsyf1w.js} +4 -4
  90. package/dist/{index-y1qwzvxn.js → index-pztqab6k.js} +2 -2
  91. package/dist/{index-rverk2vz.js → index-qncw9hey.js} +1 -1
  92. package/dist/index-qx8j6kds.js +270 -0
  93. package/dist/{index-kq5w68dp.js → index-txs8tce6.js} +1 -1
  94. package/dist/index-vzhhr1ht.js +532 -0
  95. package/dist/index-wh9fxds5.js +265 -0
  96. package/dist/{index-b7w46fp2.js → index-x2mrq5xv.js} +170 -48
  97. package/dist/{index-43vqx0za.js → index-xwwsbsd3.js} +15 -13
  98. package/dist/index-z4p0ry94.js +222 -0
  99. package/dist/index-z9zygwse.js +89 -0
  100. package/dist/{index-v7287tzq.js → index-zhqwda72.js} +19 -8
  101. package/dist/index.js +83 -72
  102. package/dist/{logger-94kew5wm.js → logger-qwnbcfj9.js} +2 -1
  103. package/dist/{message-fts-rowid-map-va36knh4.js → message-fts-rowid-map-xg7hr0mk.js} +5 -4
  104. package/dist/{message-index-bounded-zq7a5nm6.js → message-index-bounded-narw7bnz.js} +12 -11
  105. package/dist/{message-time-backfill-4qva0b4f.js → message-time-backfill-39bm498k.js} +3 -2
  106. package/dist/migration-worker.js +13 -11
  107. package/dist/{project-embedding-registry-6yex0r9f.js → project-embedding-registry-tdz7985n.js} +13 -11
  108. package/dist/raw-ordinal-warmup-worker.js +12 -7
  109. package/dist/{read-session-chunk-1ndphmb8.js → read-session-chunk-vmg1zjg0.js} +15 -10
  110. package/dist/{read-session-raw-b2sd67v4.js → read-session-raw-mncmzbm9.js} +3 -2
  111. package/dist/recomp-orchestrator-qyyhnc9b.js +68 -0
  112. package/dist/render-c5p0k846.js +43 -0
  113. package/dist/{safe-notification-target-mkr9yzvr.js → safe-notification-target-wztd7bgk.js} +3 -2
  114. package/dist/{search-archive-sr07c6aj.js → search-archive-0ny7p3bw.js} +13 -11
  115. package/dist/{search-040pac3a.js → search-f6hwvcxk.js} +26 -23
  116. package/dist/{send-session-notification-vz86nt79.js → send-session-notification-0gwcz3fw.js} +7 -6
  117. package/dist/{storage-tags-6hvkk01c.js → storage-tags-zx1023km.js} +5 -4
  118. package/dist/store-620rjzt9.js +21 -0
  119. package/dist/store-reader-yh19h38c.js +14 -0
  120. package/dist/tools/ctx-expand/render.d.ts +5 -3
  121. package/dist/tools/ctx-expand/render.d.ts.map +1 -1
  122. package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -1
  123. package/dist/tools/ctx-expand/tools.d.ts +2 -0
  124. package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
  125. package/dist/tools/ctx-expand/v2-archive-reader.d.ts +33 -0
  126. package/dist/tools/ctx-expand/v2-archive-reader.d.ts.map +1 -0
  127. package/dist/{transform-postprocess-phase-zx1peqma.js → transform-postprocess-phase-807ff6t2.js} +36 -30
  128. package/dist/v2/auto-search-worker.js +11 -6
  129. package/dist/v2/chunk-embedding-write-worker.js +16 -14
  130. package/dist/v2/{compaction-marker-candidates-m4vmye3w.js → compaction-marker-candidates-t1aq6gsj.js} +3 -2
  131. package/dist/v2/compaction-marker-candidates-worker.js +1 -1
  132. package/dist/v2/{compartment-chunk-embedding-rc31e6md.js → compartment-chunk-embedding-ncsk0r9e.js} +8 -7
  133. package/dist/v2/{context-3c4z2wj5.js → context-znqfkap4.js} +1725 -1095
  134. package/dist/v2/{derive-budgets-knf763tt.js → derive-budgets-sa0v7bz0.js} +4 -3
  135. package/dist/v2/embedding-backfill-11j425e0.js +26 -0
  136. package/dist/v2/embedding-worker-process.js +2 -1
  137. package/dist/v2/embedding-worker.js +5 -4
  138. package/dist/v2/expand-attachments-h33jbgyz.js +21 -0
  139. package/dist/v2/fold/idle.d.ts +15 -0
  140. package/dist/v2/fold/idle.d.ts.map +1 -0
  141. package/dist/v2/fold/native-replay-v3.d.ts +68 -0
  142. package/dist/v2/fold/native-replay-v3.d.ts.map +1 -0
  143. package/dist/v2/fold/native-replay.d.ts +58 -2
  144. package/dist/v2/fold/native-replay.d.ts.map +1 -1
  145. package/dist/v2/fold/policy.d.ts +2 -1
  146. package/dist/v2/fold/policy.d.ts.map +1 -1
  147. package/dist/v2/{history-owner-ad0crnrn.js → history-owner-fpka43cn.js} +3 -2
  148. package/dist/v2/hooks/context.d.ts.map +1 -1
  149. package/dist/v2/hooks/expand-attachments.d.ts +8 -0
  150. package/dist/v2/hooks/expand-attachments.d.ts.map +1 -0
  151. package/dist/v2/hooks/overflow-recovery.d.ts +45 -0
  152. package/dist/v2/hooks/overflow-recovery.d.ts.map +1 -0
  153. package/dist/v2/hooks/store.d.ts +7 -2
  154. package/dist/v2/hooks/store.d.ts.map +1 -1
  155. package/dist/v2/{logger-p34mjtja.js → logger-4cj6d03m.js} +2 -1
  156. package/dist/v2/{message-fts-rowid-map-78awh03v.js → message-fts-rowid-map-rmk571mb.js} +5 -4
  157. package/dist/v2/{message-index-bounded-jvgz7vk9.js → message-index-bounded-620bppw7.js} +12 -11
  158. package/dist/v2/{message-time-backfill-zvthw6xb.js → message-time-backfill-0c4h7sg6.js} +3 -2
  159. package/dist/v2/migration-worker.js +13 -11
  160. package/dist/v2/ordinal-range.fixture.d.ts +7 -0
  161. package/dist/v2/ordinal-range.fixture.d.ts.map +1 -0
  162. package/dist/v2/{project-embedding-registry-1x5qe2fy.js → project-embedding-registry-bm5fe1a8.js} +13 -11
  163. package/dist/v2/raw-ordinal-warmup-worker.js +12 -7
  164. package/dist/v2/{read-session-chunk-djzgm4jg.js → read-session-chunk-qfwv1k71.js} +15 -10
  165. package/dist/v2/{read-session-raw-5x088amc.js → read-session-raw-q294t8xs.js} +3 -2
  166. package/dist/v2/recomp-orchestrator-fcnjref7.js +67 -0
  167. package/dist/v2/render-98a1qv0b.js +42 -0
  168. package/dist/v2/{safe-notification-target-khnzg57c.js → safe-notification-target-gphhast7.js} +3 -2
  169. package/dist/v2/{search-archive-n3dhns4r.js → search-archive-r0y1bafr.js} +13 -11
  170. package/dist/v2/{search-q3wkpe8t.js → search-z1zqzsmh.js} +25 -22
  171. package/dist/v2/{send-session-notification-x5nzy34v.js → send-session-notification-fst6hkg7.js} +7 -6
  172. package/dist/v2/{server-rb8m4vry.js → server-1xesqm5h.js} +146 -134
  173. package/dist/v2/server-2amn2s73.js +123 -0
  174. package/dist/v2/{server-6g98c227.js → server-3schkz95.js} +4 -4
  175. package/dist/v2/server-468mya5v.js +209 -0
  176. package/dist/v2/server-55v5hpth.js +270 -0
  177. package/dist/v2/server-5jp38p98.js +532 -0
  178. package/dist/v2/{server-qjvk4a9t.js → server-69m30b21.js} +1 -1
  179. package/dist/v2/{server-d01pe8q5.js → server-7ccxt4nq.js} +14 -216
  180. package/dist/v2/{server-3mz2qh5a.js → server-969cdpmg.js} +1 -1
  181. package/dist/v2/{server-835q39kd.js → server-9k0mjef7.js} +2 -2
  182. package/dist/v2/{server-qc915kw2.js → server-bez34e60.js} +4 -4
  183. package/dist/v2/{server-nxas8v1d.js → server-bpvsvtph.js} +3 -3
  184. package/dist/v2/{server-ab8017gw.js → server-bxpz2dcn.js} +29 -138
  185. package/dist/v2/{server-bsgd4dk1.js → server-dcws5831.js} +2 -2
  186. package/dist/v2/server-ef1mskas.js +777 -0
  187. package/dist/v2/{server-1bw1wcbp.js → server-f0j864ma.js} +1 -1
  188. package/dist/v2/{server-aqbm9c8d.js → server-fqj6ddpr.js} +632 -5540
  189. package/dist/v2/{server-rr4cbkr0.js → server-hnknwaz8.js} +37 -7
  190. package/dist/v2/{server-h1byrhwx.js → server-hsf0qsn5.js} +19 -8
  191. package/dist/v2/{server-6495nmn9.js → server-jb6tjyeb.js} +5 -222
  192. package/dist/v2/{server-2aasmpsp.js → server-kkxzwa6w.js} +4 -4
  193. package/dist/v2/{server-a7x00tw8.js → server-mfn1yf9d.js} +1 -1
  194. package/dist/v2/{server-tkdabx8q.js → server-q0z2q2dx.js} +5 -530
  195. package/dist/v2/{server-n14edf07.js → server-qa74bj91.js} +77 -17
  196. package/dist/v2/server-qf2kzsh2.js +4513 -0
  197. package/dist/v2/{server-gyy4k6mf.js → server-qmmkhz2z.js} +1 -1
  198. package/dist/v2/{server-29qp8nz4.js → server-qxzbmtqt.js} +1 -1
  199. package/dist/v2/{server-hwag0khr.js → server-r3chnxs5.js} +4 -4
  200. package/dist/v2/{server-vr4szghm.js → server-rktnzs89.js} +2 -2
  201. package/dist/v2/{server-6vd2n183.js → server-s9xgyyj9.js} +1 -1
  202. package/dist/v2/{server-53eh1r8r.js → server-sd8hvzte.js} +2 -2
  203. package/dist/v2/{server-k3t06fxr.js → server-sefxj8k1.js} +1 -1
  204. package/dist/v2/{server-v77xa5wj.js → server-tpt7bwq8.js} +1 -1
  205. package/dist/v2/{server-awr8qa4c.js → server-ws5exe6q.js} +2 -2
  206. package/dist/v2/server-x4m6xcn4.js +194 -0
  207. package/dist/v2/{server-806rzhs6.js → server-xbtw0p9t.js} +1 -1
  208. package/dist/v2/{server-cqjvxyrp.js → server-xy7w7hrd.js} +2 -2
  209. package/dist/v2/server-ypf1ap0v.js +529 -0
  210. package/dist/v2/server-z4p0ry94.js +222 -0
  211. package/dist/v2/server-z9zygwse.js +89 -0
  212. package/dist/v2/{server-ab1g0wn9.js → server-zzgtgqmd.js} +2 -2
  213. package/dist/v2/server.js +6 -5
  214. package/dist/v2/{storage-tags-18nbaanf.js → storage-tags-19s0ebf0.js} +5 -4
  215. package/dist/v2/store-reader-cgx47zkp.js +14 -0
  216. package/dist/v2/store-reader.d.ts +9 -2
  217. package/dist/v2/store-reader.d.ts.map +1 -1
  218. package/dist/v2/store-vdm8v3jd.js +21 -0
  219. package/dist/v2/v2-archive-reader-t2c0eypn.js +11 -0
  220. package/dist/v2/{wrapup-orchestrator-ga5vfmwr.js → wrapup-orchestrator-aqpqsveg.js} +46 -39
  221. package/dist/v2-archive-reader-tm2eayp2.js +11 -0
  222. package/dist/wrapup-orchestrator-k5yp19a6.js +55 -0
  223. package/package.json +1 -1
  224. package/src/shared/sqlite-transaction-mode-guard.test.ts +4 -0
  225. package/dist/embedding-backfill-0jgtqxen.js +0 -25
  226. package/dist/recomp-orchestrator-skqzzvby.js +0 -62
  227. package/dist/v2/embedding-backfill-f43hd8y6.js +0 -24
  228. package/dist/v2/recomp-orchestrator-qfqdvbta.js +0 -61
  229. package/dist/wrapup-orchestrator-dy8r3gp8.js +0 -49
@@ -1,26 +1,25 @@
1
- import {
2
- inRootAsyncContext2,
3
- getSqliteDatabasePath2,
4
- withSqliteBackgroundWriter2,
5
- withoutSqliteTransformPass2,
6
- isTransientSqliteError2
7
- } from "./index-gzy5w8ya.js";
8
1
  import {
9
2
  estimateTokens
10
- } from "./index-b88dwwrh.js";
3
+ } from "./index-4xyjr62e.js";
11
4
  import {
12
5
  getHarness2
13
6
  } from "./index-pavzsdc6.js";
14
7
  import {
15
- sanitizeDiagnosticText,
8
+ sanitizeDiagnosticText
9
+ } from "./index-z4p0ry94.js";
10
+ import {
16
11
  log2
17
- } from "./index-h7tgn49j.js";
12
+ } from "./index-jrfre9ah.js";
18
13
  import {
19
14
  SYNAPSE_DEFAULT_MODEL,
20
15
  isSynapseEmbeddingTruncated,
21
16
  getSynapseBatchRequestKey,
22
17
  SynapseEmbeddingProvider
23
- } from "./index-wfybj1dw.js";
18
+ } from "./index-g4t7850m.js";
19
+ import {
20
+ inRootAsyncContext2,
21
+ getSqliteDatabasePath2
22
+ } from "./index-gzy5w8ya.js";
24
23
  import {
25
24
  createWorkerShutdown
26
25
  } from "./index-cpjk5jd2.js";
@@ -41,7 +40,7 @@ import {
41
40
  countSessionCompartmentEmbedCoverage2,
42
41
  countSessionCompartmentEmbedCoveragePolite2,
43
42
  countUnembeddedSessionCompartmentsPolite2
44
- } from "./index-v7287tzq.js";
43
+ } from "./index-zhqwda72.js";
45
44
  import {
46
45
  DEFAULT_LOCAL_EMBEDDING_MODEL
47
46
  } from "./index-nxrsns5x.js";
@@ -54,10 +53,18 @@ import {
54
53
  getEmbeddingProviderIdentity,
55
54
  dominantEmbeddingFailure,
56
55
  LocalEmbeddingProvider
57
- } from "./index-51rdvtkz.js";
56
+ } from "./index-1rhgxqs8.js";
57
+ import {
58
+ embedPauseBySession,
59
+ activeEmbeddingSessions,
60
+ drainBackgroundBatches,
61
+ beginSynapseBatchLedger,
62
+ finishSynapseBatchLedger,
63
+ pruneSynapseBatchLedgerForProject
64
+ } from "./index-2amn2s73.js";
58
65
  import {
59
66
  setBootQuietPeriodForTests
60
- } from "./index-kq5w68dp.js";
67
+ } from "./index-txs8tce6.js";
61
68
  import {
62
69
  isEmbeddingHostBusy2
63
70
  } from "./index-qt1qqasc.js";
@@ -68,7 +75,7 @@ import {
68
75
  acquireGitSweepLease,
69
76
  renewGitSweepLease,
70
77
  releaseGitSweepLease
71
- } from "./index-kfyb3k6n.js";
78
+ } from "./index-jz5bk7xd.js";
72
79
  import {
73
80
  saveEmbeddingIfHashMatches,
74
81
  getMemoryEmbedCoverage,
@@ -79,126 +86,10 @@ import {
79
86
  } from "./index-8ajstryz.js";
80
87
  import {
81
88
  logSlowWriteTransaction
82
- } from "./index-t5pck3ss.js";
83
-
84
- // src/hooks/magic-context/embed-session-state.ts
85
- var embedPauseBySession = new Set;
86
- var embedRunStateBySession = new Map;
87
- var activeEmbeddingSessions = new Map;
88
- var autoEmbedAttemptedBySession = new Set;
89
- var autoEmbedIdentityBySession = new Map;
90
- var autoEmbedRetryAfterBySession = new Map;
91
- function invalidateAutoEmbedSession(sessionId) {
92
- autoEmbedAttemptedBySession.delete(sessionId);
93
- autoEmbedIdentityBySession.delete(sessionId);
94
- autoEmbedRetryAfterBySession.delete(sessionId);
95
- }
96
- function getEmbedDrainUiStatus(sessionId, progress) {
97
- if (embedPauseBySession.has(sessionId)) {
98
- return { status: "paused" };
99
- }
100
- const activeRun = embedRunStateBySession.get(sessionId);
101
- if (activeRun && !activeRun.signal.aborted || progress?.kind === "embed" && progress.phase === "recomp") {
102
- return { status: "running" };
103
- }
104
- if (progress?.kind === "embed" && (progress.phase === "failed" || progress.phase === "skipped") && progress.message) {
105
- if (/provider/i.test(progress.message)) {
106
- return { status: "stopped", detail: progress.message };
107
- }
108
- }
109
- return { status: "idle" };
110
- }
111
- function clearEmbedSessionState(sessionId) {
112
- activeEmbeddingSessions.delete(sessionId);
113
- embedPauseBySession.delete(sessionId);
114
- const ctrl = embedRunStateBySession.get(sessionId);
115
- if (ctrl) {
116
- ctrl.abort();
117
- embedRunStateBySession.delete(sessionId);
118
- }
119
- invalidateAutoEmbedSession(sessionId);
120
- }
121
-
122
- // src/shared/background-batch-drain.ts
123
- async function drainBackgroundBatches(step, options = {}) {
124
- const now = options.now ?? (() => performance.now());
125
- const deadline = now() + (options.budgetMs ?? 2000);
126
- const yieldFn = options.yieldFn ?? (() => new Promise((resolve) => setTimeout(resolve, 0)));
127
- let batches = 0;
128
- while (now() < deadline) {
129
- try {
130
- if (!withoutSqliteTransformPass2(() => withSqliteBackgroundWriter2(step)))
131
- break;
132
- } catch (error) {
133
- if (isTransientSqliteError2(error))
134
- break;
135
- throw error;
136
- }
137
- batches++;
138
- await yieldFn();
139
- }
140
- return batches;
141
- }
142
-
143
- // src/features/magic-context/storage-embedding-measurements.ts
144
- import { createHash } from "node:crypto";
145
- function normalizedQueryHash(query) {
146
- const normalized = query.trim().replace(/\s+/g, " ").toLowerCase();
147
- return createHash("sha256").update(normalized).digest("hex");
148
- }
149
- var MEASUREMENT_CORPUS_SESSION_ROW_CAP = 2000;
150
- function recordEmbeddingMeasurement(db, input, cap = MEASUREMENT_CORPUS_SESSION_ROW_CAP) {
151
- const queryTextHash = normalizedQueryHash(input.queryText);
152
- const dedupKey = queryTextHash;
153
- const result = db.prepare(`INSERT OR IGNORE INTO embedding_measurement_corpus
154
- (session_id, project_path, dedup_key, cohort_key, query_text_hash,
155
- primary_result_ids_json, shadow_result_ids_json, primary_latency_ms, shadow_latency_ms,
156
- primary_failed, shadow_failed, primary_model_id, shadow_model_id,
157
- primary_fingerprint, shadow_fingerprint, primary_epoch, shadow_epoch,
158
- corpus_hash, coverage_json, created_at)
159
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`).run(input.sessionId, input.projectPath, dedupKey, input.cohortKey, queryTextHash, JSON.stringify(input.primaryResultIds.slice(0, 10)), JSON.stringify(input.shadowResultIds.slice(0, 10)), input.primaryLatencyMs, input.shadowLatencyMs, input.primaryFailed ? 1 : 0, input.shadowFailed ? 1 : 0, input.primaryModelId, input.shadowModelId, input.primaryFingerprint, input.shadowFingerprint, input.primaryEpoch, input.shadowEpoch, input.corpusHash, JSON.stringify(input.coverage), Date.now());
160
- if (result.changes > 0) {
161
- const rowCount = db.prepare("SELECT COUNT(*) AS count FROM embedding_measurement_corpus WHERE session_id = ?").get(input.sessionId).count;
162
- const overflow = rowCount - cap;
163
- if (overflow > 0) {
164
- db.prepare(`DELETE FROM embedding_measurement_corpus
165
- WHERE session_id = ?
166
- AND id IN (
167
- SELECT id FROM embedding_measurement_corpus
168
- WHERE session_id = ?
169
- ORDER BY id ASC
170
- LIMIT ?
171
- )`).run(input.sessionId, input.sessionId, overflow);
172
- }
173
- }
174
- return result.changes > 0;
175
- }
176
- function beginSynapseBatchLedger(db, input, now = Date.now()) {
177
- db.prepare(`INSERT INTO synapse_batch_ledger
178
- (session_id, project_path, scope, manifest_json, request_key, status, created_at, updated_at)
179
- VALUES (?, ?, ?, ?, ?, 'pending', ?, ?)
180
- ON CONFLICT(session_id, request_key) DO UPDATE SET
181
- manifest_json = excluded.manifest_json,
182
- updated_at = excluded.updated_at`).run(input.sessionId, input.projectPath, input.scope, JSON.stringify(input.manifest), input.requestKey, now, now);
183
- }
184
- function finishSynapseBatchLedger(db, sessionId, requestKey, status, now = Date.now()) {
185
- db.prepare("UPDATE synapse_batch_ledger SET status = ?, updated_at = ? WHERE session_id = ? AND request_key = ?").run(status, now, sessionId, requestKey);
186
- }
187
- var SYNAPSE_BATCH_LEDGER_TTL_MS = 14 * 24 * 60 * 60 * 1000;
188
- function pruneSynapseBatchLedgerForProject(db, projectIdentity, ttlMs = SYNAPSE_BATCH_LEDGER_TTL_MS) {
189
- const ledgerTable = db.prepare("SELECT 1 AS present FROM sqlite_master WHERE type = 'table' AND name = 'synapse_batch_ledger'").get();
190
- if (!ledgerTable)
191
- return 0;
192
- const shadow = `shadow:${projectIdentity}`;
193
- const cutoff = Date.now() - ttlMs;
194
- const predicate = "session_id IN (?, ?) AND updated_at < ?";
195
- if (!db.prepare(`SELECT 1 FROM synapse_batch_ledger WHERE ${predicate} LIMIT 1`).get(projectIdentity, shadow, cutoff))
196
- return 0;
197
- return db.prepare(`DELETE FROM synapse_batch_ledger WHERE ${predicate}`).run(projectIdentity, shadow, cutoff).changes;
198
- }
89
+ } from "./index-fxbk7gk3.js";
199
90
 
200
91
  // src/features/magic-context/memory/embedding-openai.ts
201
- import { createHash as createHash2 } from "node:crypto";
92
+ import { createHash } from "node:crypto";
202
93
 
203
94
  // src/features/magic-context/memory/embedding-ssrf.ts
204
95
  var METADATA_HOSTNAMES = new Set(["metadata.google.internal", "metadata.goog"]);
@@ -305,7 +196,7 @@ var RATE_LIMIT_BACKOFF_CAP_MS = 30000;
305
196
  var RATE_LIMIT_BACKOFF_JITTER = 0.25;
306
197
  var rateLimitStates = new Map;
307
198
  function rateLimitStateKey(endpoint, apiKey) {
308
- const keyHash = apiKey ? createHash2("sha256").update(apiKey).digest("hex").slice(0, 16) : "";
199
+ const keyHash = apiKey ? createHash("sha256").update(apiKey).digest("hex").slice(0, 16) : "";
309
200
  return `${endpoint}\x00${keyHash}`;
310
201
  }
311
202
  function parseRetryAfterMs(value, nowMs) {
@@ -717,7 +608,7 @@ class OpenAICompatibleEmbeddingProvider {
717
608
  }
718
609
 
719
610
  // src/features/magic-context/project-embedding-registry.ts
720
- import { createHash as createHash3, randomUUID } from "node:crypto";
611
+ import { createHash as createHash2, randomUUID } from "node:crypto";
721
612
 
722
613
  // src/features/magic-context/chunk-embedding-writer.ts
723
614
  import { Worker } from "node:worker_threads";
@@ -1405,10 +1296,10 @@ function stableStringify(value) {
1405
1296
  return JSON.stringify(value);
1406
1297
  }
1407
1298
  function sha256Prefix(value, length = 16) {
1408
- return createHash3("sha256").update(value).digest("hex").slice(0, length);
1299
+ return createHash2("sha256").update(value).digest("hex").slice(0, length);
1409
1300
  }
1410
1301
  function contentSha2562(value) {
1411
- return createHash3("sha256").update(value).digest("hex");
1302
+ return createHash2("sha256").update(value).digest("hex");
1412
1303
  }
1413
1304
  function getRuntimeFingerprint(config) {
1414
1305
  if (config.provider === "off") {
@@ -3209,4 +3100,4 @@ function _resetProjectEmbeddingRegistryForTests2() {
3209
3100
  setBootQuietPeriodForTests(null);
3210
3101
  }
3211
3102
 
3212
- export { embedPauseBySession, embedRunStateBySession, activeEmbeddingSessions, autoEmbedAttemptedBySession, autoEmbedIdentityBySession, autoEmbedRetryAfterBySession, invalidateAutoEmbedSession, getEmbedDrainUiStatus, clearEmbedSessionState, drainBackgroundBatches, recordEmbeddingMeasurement, OpenAICompatibleEmbeddingProvider, saveCommitEmbedding, loadProjectCommitEmbeddings, loadUnembeddedCommits, countEmbeddedCommits, upsertCommits, getLatestIndexedCommitSha, enforceProjectCap, describeShadowBackfillWriteRefusal2, listShadowBackfillStalls2, retainProjectEmbedding2, getShadowBackfillStopReason2, markProjectLoadUntrusted2, contentSha2562, drainProjectEmbeddingIdentityMaintenance2, drainStaleEmbeddingIdentitiesForProject2, registerProjectEmbedding2, registerProjectShadowEmbedding2, getShadowEmbeddingMeasurementCohort2, getPrimaryEmbeddingMeasurementCohort2, embedShadowTextForProject2, enqueueShadowEmbeddingItems2, getShadowBackfillRemaining2, flushShadowEmbeddingBacklog2, registerProjectInObservationMode2, unregisterProjectShadowEmbedding2, unregisterProjectEmbedding2, getProjectEmbeddingSnapshot2, installProjectEmbeddingSearchBridge2, getProjectChunkEmbeddingModelId2, getProjectEmbeddingMaxInputTokens2, embedTextForProject2, embedBatchForProject2, embedItemsForProject2, embedUnembeddedMemoriesForProject2, embedUnembeddedMemoriesForProjectOutcome2, drainCommitBacklogForProject2, embedUnembeddedCompartmentChunksForProject2, embedSessionCompartmentChunks2, getEmbeddingCoverageStatus2, getAutoEmbeddingSessionCoverage2, sweepAllRegisteredProjects2, _setTestProviderFactoryForProject2, _resetProjectEmbeddingRegistryForTests2 };
3103
+ export { OpenAICompatibleEmbeddingProvider, saveCommitEmbedding, loadProjectCommitEmbeddings, loadUnembeddedCommits, countEmbeddedCommits, upsertCommits, getLatestIndexedCommitSha, enforceProjectCap, describeShadowBackfillWriteRefusal2, listShadowBackfillStalls2, retainProjectEmbedding2, getShadowBackfillStopReason2, markProjectLoadUntrusted2, contentSha2562, drainProjectEmbeddingIdentityMaintenance2, drainStaleEmbeddingIdentitiesForProject2, registerProjectEmbedding2, registerProjectShadowEmbedding2, getShadowEmbeddingMeasurementCohort2, getPrimaryEmbeddingMeasurementCohort2, embedShadowTextForProject2, enqueueShadowEmbeddingItems2, getShadowBackfillRemaining2, flushShadowEmbeddingBacklog2, registerProjectInObservationMode2, unregisterProjectShadowEmbedding2, unregisterProjectEmbedding2, getProjectEmbeddingSnapshot2, installProjectEmbeddingSearchBridge2, getProjectChunkEmbeddingModelId2, getProjectEmbeddingMaxInputTokens2, embedTextForProject2, embedBatchForProject2, embedItemsForProject2, embedUnembeddedMemoriesForProject2, embedUnembeddedMemoriesForProjectOutcome2, drainCommitBacklogForProject2, embedUnembeddedCompartmentChunksForProject2, embedSessionCompartmentChunks2, getEmbeddingCoverageStatus2, getAutoEmbeddingSessionCoverage2, sweepAllRegisteredProjects2, _setTestProviderFactoryForProject2, _resetProjectEmbeddingRegistryForTests2 };
@@ -4,232 +4,15 @@ import {
4
4
  import {
5
5
  getMagicContextLogPath
6
6
  } from "./index-g2q4htwp.js";
7
+ import {
8
+ sanitizeDiagnosticText,
9
+ sanitizeConfigValue
10
+ } from "./index-z4p0ry94.js";
7
11
 
8
12
  // src/shared/logger.ts
9
13
  import * as fs from "node:fs";
10
14
  import * as path from "node:path";
11
15
 
12
- // src/shared/redaction.ts
13
- import { homedir, userInfo } from "node:os";
14
- function escapeRegex(value) {
15
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
16
- }
17
- var SECRET_WORDS = [
18
- "key",
19
- "token",
20
- "secret",
21
- "password",
22
- "auth",
23
- "authorization",
24
- "bearer",
25
- "credential"
26
- ];
27
- var SECRET_SEGMENT_PATTERN = new RegExp(`^(?:${SECRET_WORDS.map((w) => `${w}s?`).join("|")})$`, "i");
28
- var TRAILING_DESCRIPTORS = new Set(["id", "ids", "value", "values", "header", "headers"]);
29
- function redactionTypeForKey(key) {
30
- const normalized = key.trim().toLowerCase().replace(/[^a-z0-9_.-]+/g, "_");
31
- const suffix = normalized.split(".").filter(Boolean).at(-1) ?? normalized;
32
- return suffix || "secret";
33
- }
34
- function isNonSecretScalarValue(value) {
35
- const v = value.trim();
36
- if (v === "true" || v === "false" || v === "null" || v === "undefined")
37
- return true;
38
- return /^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/.test(v);
39
- }
40
- var SECRET_QUALIFIERS = new Set([
41
- "api",
42
- "access",
43
- "private",
44
- "client",
45
- "auth",
46
- "authorization",
47
- "secret",
48
- "bearer",
49
- "session",
50
- "refresh",
51
- "service",
52
- "x",
53
- "openai",
54
- "anthropic",
55
- "google",
56
- "github",
57
- "huggingface",
58
- "aws",
59
- "azure",
60
- "id"
61
- ]);
62
- var UNQUALIFIED_SECRET_SEGMENT_PATTERN = /^(?:password|secret|credential|bearer|authorization)s?$/;
63
- function isSecretKey(key) {
64
- const segments = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().split(/[._-]+/).filter(Boolean);
65
- if (segments.length === 0)
66
- return false;
67
- if (segments.length === 1) {
68
- const first = segments[0];
69
- return Boolean(first && SECRET_SEGMENT_PATTERN.test(first));
70
- }
71
- for (let i = 0;i < segments.length; i++) {
72
- const seg = segments[i];
73
- if (!seg || !SECRET_SEGMENT_PATTERN.test(seg))
74
- continue;
75
- let trailingOk = true;
76
- for (let j = i + 1;j < segments.length; j++) {
77
- const tail = segments[j];
78
- if (!tail)
79
- continue;
80
- if (TRAILING_DESCRIPTORS.has(tail))
81
- continue;
82
- if (SECRET_SEGMENT_PATTERN.test(tail))
83
- continue;
84
- trailingOk = false;
85
- break;
86
- }
87
- if (!trailingOk)
88
- continue;
89
- if (UNQUALIFIED_SECRET_SEGMENT_PATTERN.test(seg))
90
- return true;
91
- for (let k = i - 1;k >= 0; k--) {
92
- const lead = segments[k];
93
- if (lead && SECRET_QUALIFIERS.has(lead))
94
- return true;
95
- }
96
- }
97
- return false;
98
- }
99
- function sanitizePathString(value) {
100
- const home = process.env.HOME || process.env.USERPROFILE || homedir();
101
- const username = userInfo().username;
102
- let sanitized = value;
103
- if (home) {
104
- sanitized = sanitized.replace(new RegExp(escapeRegex(home), "g"), "~");
105
- }
106
- sanitized = sanitized.replace(/\/Users\/[^/]+\//g, "/Users/<USER>/");
107
- sanitized = sanitized.replace(/\/home\/[^/]+\//g, "/home/<USER>/");
108
- sanitized = sanitized.replace(/C:\\Users\\[^\\]+\\/g, "C:\\Users\\<USER>\\");
109
- if (username) {
110
- sanitized = sanitized.replace(new RegExp(escapeRegex(username), "g"), "<USER>");
111
- }
112
- return sanitized;
113
- }
114
- var SECRET_TEXT_PATTERNS = [
115
- {
116
- pattern: /\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{32,}/g,
117
- replacement: "<ANTHROPIC_API_KEY_REDACTED>"
118
- },
119
- {
120
- pattern: /\bsk-(?:proj-)?[A-Za-z0-9_-]{12,}/g,
121
- replacement: "<OPENAI_API_KEY_REDACTED>"
122
- },
123
- {
124
- pattern: /\bgithub_pat_[A-Za-z0-9_]{20,}/g,
125
- replacement: "<GITHUB_PAT_REDACTED>"
126
- },
127
- {
128
- pattern: /\b(?:gh[opsu]|ghr)_[A-Za-z0-9_-]{30,}/g,
129
- replacement: "<GITHUB_TOKEN_REDACTED>"
130
- },
131
- {
132
- pattern: /\bhf_[A-Za-z0-9]{30,}/g,
133
- replacement: "<HUGGINGFACE_TOKEN_REDACTED>"
134
- },
135
- {
136
- pattern: /\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
137
- replacement: "<AWS_ACCESS_KEY_ID_REDACTED>"
138
- },
139
- {
140
- pattern: /\bxox[abprsuvc]-[A-Za-z0-9-]{10,}/g,
141
- replacement: "<SLACK_TOKEN_REDACTED>"
142
- },
143
- {
144
- pattern: /\bAIza[A-Za-z0-9_-]{35}\b/g,
145
- replacement: "<GOOGLE_API_KEY_REDACTED>"
146
- },
147
- {
148
- pattern: /\b(Authorization\s*:\s*Bearer\s+)([A-Za-z0-9._~+/=-]{8,})/gi,
149
- replacement: (_full, prefix) => `${prefix}<REDACTED:bearer>`
150
- },
151
- {
152
- pattern: /\b((?:Proxy-)?Authorization\s*:\s*(?:Basic|Digest|Token|Negotiate|NTLM)\s+)([A-Za-z0-9._~+/=-]{4,})/gi,
153
- replacement: (_full, prefix) => `${prefix}<REDACTED:authorization>`
154
- },
155
- {
156
- pattern: /\b((?:x-)?(?:api-?key|api-?token|auth-?token|access-?token)\s*:\s*)([^\s'"`,;<>]{6,})/gi,
157
- replacement: (full, prefix, value) => isNonSecretScalarValue(value) ? full : `${prefix}<REDACTED:api_key>`
158
- },
159
- {
160
- pattern: /\b((?:api[_-]?key|client[_-]?secret|access[_-]?token|token|secret|password|passwd|pwd)\s*:\s*)([^\s'"`,;<>]{6,})/gi,
161
- replacement: (full, prefix, value) => isNonSecretScalarValue(value) ? full : `${prefix}<REDACTED:credential>`
162
- },
163
- {
164
- pattern: /\b([a-z][a-z0-9+.-]*:\/\/[^\s/:@]+:)([^\s/@]+)(@)/gi,
165
- replacement: (_full, prefix, _password, at) => `${prefix}<REDACTED:password>${at}`
166
- },
167
- {
168
- pattern: /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,
169
- replacement: "<JWT_REDACTED>"
170
- },
171
- {
172
- pattern: /(["'])([^"']*(?:key|token|secret|password|auth|bearer|credential)[^"']*)\1(\s*:\s*)(["'])([^"']*)\4/gi,
173
- replacement: (full, quote, key, separator, valueQuote, value) => isNonSecretScalarValue(value) ? full : `${quote}${key}${quote}${separator}${valueQuote}<REDACTED:${redactionTypeForKey(key)}>${valueQuote}`
174
- },
175
- {
176
- pattern: /\b([A-Za-z0-9_.-]*(?:key|token|secret|password|auth|bearer|credential)[A-Za-z0-9_.-]*)\s*=\s*([^\s'"`]+)/gi,
177
- replacement: (full, key, value) => isNonSecretScalarValue(value) ? full : `${key}=<REDACTED:${redactionTypeForKey(key)}>`
178
- }
179
- ];
180
- function redactSecretText(value) {
181
- let redacted = value;
182
- for (const { pattern, replacement } of SECRET_TEXT_PATTERNS) {
183
- if (typeof replacement === "string") {
184
- redacted = redacted.replace(pattern, replacement);
185
- } else {
186
- redacted = redacted.replace(pattern, replacement);
187
- }
188
- }
189
- return redacted;
190
- }
191
- function sanitizeDiagnosticText(value) {
192
- return redactSecretText(sanitizePathString(value));
193
- }
194
- var SHAREABILITY_SENSITIVE_PATTERNS = [
195
- /\bC:\/Users\/[^/\s]+/i,
196
- /(?:^|\s)~\/[^\s]+/,
197
- /\b(?:api[_-]?key|secret|token|password|passwd|pwd|client[_-]?secret|access[_-]?key)\b\s*[:=]\s*\S+/i,
198
- /\b(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])(?::\d+)?\b/i,
199
- /\b(?:10|127)\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/,
200
- /\b192\.168\.\d{1,3}\.\d{1,3}\b/,
201
- /\b172\.(?:1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}\b/
202
- ];
203
- function hasShareabilitySensitiveText(text) {
204
- try {
205
- if (sanitizeDiagnosticText(text) !== text)
206
- return true;
207
- return SHAREABILITY_SENSITIVE_PATTERNS.some((pattern) => pattern.test(text));
208
- } catch {
209
- return true;
210
- }
211
- }
212
- function sanitizeConfigValue(value, keyPath = []) {
213
- if (value === null || typeof value === "number" || typeof value === "boolean")
214
- return value;
215
- const key = keyPath.at(-1) ?? "";
216
- if (key && isSecretKey(key)) {
217
- return `<REDACTED:${redactionTypeForKey(key)}>`;
218
- }
219
- if (typeof value === "string")
220
- return sanitizeDiagnosticText(value);
221
- if (Array.isArray(value)) {
222
- return value.map((entry, index) => sanitizeConfigValue(entry, [...keyPath, String(index)]));
223
- }
224
- if (value && typeof value === "object") {
225
- return Object.fromEntries(Object.entries(value).map(([entryKey, entry]) => [
226
- entryKey,
227
- sanitizeConfigValue(entry, [...keyPath, entryKey])
228
- ]));
229
- }
230
- return value;
231
- }
232
-
233
16
  // src/shared/stale-plugin-build.ts
234
17
  import { posix } from "node:path";
235
18
  import { fileURLToPath } from "node:url";
@@ -558,4 +341,4 @@ if (!isTestEnv) {
558
341
  process.on("exit", flush);
559
342
  }
560
343
 
561
- export { sanitizeDiagnosticText, hasShareabilitySensitiveText, registerStalePluginBuildHost, classifyStalePluginBuild, importPluginModule, setLogLineForwarder2, writeForwardedLogLine2, log2, sessionLog2, getLoggerDiagnostics2, flushLogger2, getLogFilePath2 };
344
+ export { registerStalePluginBuildHost, classifyStalePluginBuild, importPluginModule, setLogLineForwarder2, writeForwardedLogLine2, log2, sessionLog2, getLoggerDiagnostics2, flushLogger2, getLogFilePath2 };
@@ -3,10 +3,10 @@ import {
3
3
  } from "./index-pavzsdc6.js";
4
4
  import {
5
5
  isUserHomeDirectory
6
- } from "./index-kq5w68dp.js";
6
+ } from "./index-txs8tce6.js";
7
7
  import {
8
8
  logSlowWriteTransaction
9
- } from "./index-t5pck3ss.js";
9
+ } from "./index-fxbk7gk3.js";
10
10
 
11
11
  // src/features/magic-context/session-project-storage.ts
12
12
  var SESSION_CHUNK_REPAIR_BATCH_SIZE = 100;
@@ -4,13 +4,13 @@ import {
4
4
  } from "./index-1zx87sdm.js";
5
5
  import {
6
6
  estimateTokens
7
- } from "./index-b88dwwrh.js";
7
+ } from "./index-4xyjr62e.js";
8
8
  import {
9
9
  getHarness2
10
10
  } from "./index-pavzsdc6.js";
11
11
  import {
12
12
  sessionLog2
13
- } from "./index-h7tgn49j.js";
13
+ } from "./index-jrfre9ah.js";
14
14
  import {
15
15
  getTagIdentityWriteGeneration2,
16
16
  getSqliteDatabasePath2
@@ -20,7 +20,7 @@ import {
20
20
  tagOrderConstraintIndex,
21
21
  stableStringify,
22
22
  stableStringifyHash
23
- } from "./index-xrnsygfq.js";
23
+ } from "./index-9wnbnx8f.js";
24
24
  import {
25
25
  DEFAULT_PROTECTED_TOOLS,
26
26
  normalizeProtectedToolName,
@@ -3,12 +3,12 @@ import {
3
3
  } from "./index-fr0wbhdn.js";
4
4
  import {
5
5
  log2
6
- } from "./index-h7tgn49j.js";
6
+ } from "./index-jrfre9ah.js";
7
7
  import {
8
8
  ensureColumn,
9
9
  healAllNullColumns,
10
10
  installV95PerfSchema
11
- } from "./index-xrnsygfq.js";
11
+ } from "./index-9wnbnx8f.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-kq5w68dp.js";
23
+ } from "./index-txs8tce6.js";
24
24
  import {
25
25
  logSlowWriteTransaction
26
- } from "./index-t5pck3ss.js";
26
+ } from "./index-fxbk7gk3.js";
27
27
 
28
28
  // src/features/magic-context/lkg-prefix-chunks.ts
29
29
  import { createHash } from "node:crypto";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  importPluginModule,
3
3
  log2
4
- } from "./index-h7tgn49j.js";
4
+ } from "./index-jrfre9ah.js";
5
5
  import {
6
6
  sendStatusNotification2
7
- } from "./index-waktfbjy.js";
7
+ } from "./index-2v6nvy3k.js";
8
8
  import {
9
9
  formatConflictShort
10
- } from "./index-4pnsgvfk.js";
10
+ } from "./index-hacf2tyx.js";
11
11
 
12
12
  // src/plugin/conflict-warning-hook.ts
13
13
  import { existsSync, readFileSync } from "node:fs";
@@ -6,19 +6,19 @@ import {
6
6
  removeNestedBlocks,
7
7
  hasMeaningfulUserText2,
8
8
  extractTexts2
9
- } from "./index-b88dwwrh.js";
9
+ } from "./index-4xyjr62e.js";
10
10
  import {
11
11
  cleanUserText2
12
- } from "./index-0fe4q77z.js";
12
+ } from "./index-brg2w6qc.js";
13
13
  import {
14
14
  recordMessageFtsRowid2,
15
15
  recordIndexedMessageTime2,
16
16
  messageFtsOrdinalRangeIsMapped2,
17
17
  deleteUnmappedMessageFtsRows2
18
- } from "./index-v15ne3a3.js";
18
+ } from "./index-faxb7mck.js";
19
19
  import {
20
20
  logSlowWriteTransaction
21
- } from "./index-t5pck3ss.js";
21
+ } from "./index-fxbk7gk3.js";
22
22
 
23
23
  // src/features/magic-context/compression-depth-storage.ts
24
24
  var incrementDepthStatements = new WeakMap;
@@ -3,19 +3,19 @@ import {
3
3
  } from "./index-nxrsns5x.js";
4
4
  import {
5
5
  log2
6
- } from "./index-h7tgn49j.js";
6
+ } from "./index-jrfre9ah.js";
7
7
  import {
8
8
  isSynapseEmbeddingTruncated,
9
9
  SynapseEmbeddingProvider
10
- } from "./index-wfybj1dw.js";
10
+ } from "./index-g4t7850m.js";
11
11
  import {
12
12
  LocalEmbeddingProvider
13
- } from "./index-51rdvtkz.js";
13
+ } from "./index-1rhgxqs8.js";
14
14
  import {
15
15
  OpenAICompatibleEmbeddingProvider,
16
16
  getProjectEmbeddingSnapshot2,
17
17
  embedBatchForProject2
18
- } from "./index-2743x98y.js";
18
+ } from "./index-jn0ddrhp.js";
19
19
  import {
20
20
  isEmbeddingHostBusy2
21
21
  } from "./index-qt1qqasc.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-pavzsdc6.js";
5
5
  import {
6
6
  log2
7
- } from "./index-h7tgn49j.js";
7
+ } from "./index-jrfre9ah.js";
8
8
  import {
9
9
  resolveOpenCodeDbPath,
10
10
  assertOpenCodeStoreGeneration,
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  forgetRawSessionOrdinalWatermark2,
21
21
  forgetRawSessionSummaryRows2
22
- } from "./index-rverk2vz.js";
22
+ } from "./index-qncw9hey.js";
23
23
  import {
24
24
  closeQuietly
25
25
  } from "./index-8ajstryz.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-v0p37hm2.js";
4
4
  import {
5
5
  log2
6
- } from "./index-h7tgn49j.js";
6
+ } from "./index-jrfre9ah.js";
7
7
  import {
8
8
  inRootAsyncContext2,
9
9
  getSqliteDatabasePath2,