@remnic/core 10.0.59 → 10.0.60

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 (300) hide show
  1. package/dist/access-admin-ops-surface.js +49 -47
  2. package/dist/access-authorization-probe.js +50 -48
  3. package/dist/access-boundary.js +49 -47
  4. package/dist/access-cli.js +136 -134
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-extraction-force-flush.js +49 -47
  7. package/dist/access-http-briefing.js +50 -48
  8. package/dist/access-http-query.js +51 -49
  9. package/dist/access-http.js +72 -70
  10. package/dist/access-identity-continuity-surface.js +49 -47
  11. package/dist/access-lcm-surface.js +49 -47
  12. package/dist/access-mcp.js +60 -58
  13. package/dist/access-namespace-preflight.js +49 -47
  14. package/dist/access-observe-write-category.js +8 -8
  15. package/dist/access-observe-write-surface.js +49 -47
  16. package/dist/access-offline-manifest.js +7 -7
  17. package/dist/access-operations-batch.js +52 -50
  18. package/dist/access-operations.js +59 -57
  19. package/dist/access-recall-concurrency.js +49 -47
  20. package/dist/access-recall-response.js +49 -47
  21. package/dist/access-recall-surface.js +49 -47
  22. package/dist/access-schema.js +7 -7
  23. package/dist/access-service.js +49 -47
  24. package/dist/access-surface-catalog.js +51 -49
  25. package/dist/access-surface-catalog.js.map +1 -1
  26. package/dist/active-recall.js +23 -21
  27. package/dist/active-recall.js.map +1 -1
  28. package/dist/adapters/index.js +7 -7
  29. package/dist/adapters/registry.js +3 -3
  30. package/dist/briefing.js +15 -13
  31. package/dist/buffer.js +5 -5
  32. package/dist/causal-behavior.js +2 -2
  33. package/dist/causal-chain.js +2 -2
  34. package/dist/causal-consolidation.js +18 -16
  35. package/dist/causal-consolidation.js.map +1 -1
  36. package/dist/causal-retrieval.js +2 -2
  37. package/dist/causal-trajectory-graph.js +2 -2
  38. package/dist/causal-trajectory.js +1 -1
  39. package/dist/{chunk-XDKEHZUC.js → chunk-264B57GV.js} +2 -2
  40. package/dist/{chunk-5U2BBF7E.js → chunk-2EJAPJ5G.js} +20 -10
  41. package/dist/chunk-2EJAPJ5G.js.map +1 -0
  42. package/dist/{chunk-6BO27AWQ.js → chunk-2HVCTFKG.js} +2 -2
  43. package/dist/{chunk-3E3Z6UA3.js → chunk-3DG2YAAX.js} +86 -86
  44. package/dist/chunk-4LZ7SVKM.js +211 -0
  45. package/dist/chunk-4LZ7SVKM.js.map +1 -0
  46. package/dist/{chunk-2IVK5IDY.js → chunk-4O4VAEWH.js} +2 -2
  47. package/dist/{chunk-NRGQ5HJO.js → chunk-4P4VLPGB.js} +1 -1
  48. package/dist/{chunk-GIRWNTMV.js → chunk-4PG5R6BJ.js} +2 -2
  49. package/dist/{chunk-PM4PKC3Y.js → chunk-5XY46Z2W.js} +3 -3
  50. package/dist/{chunk-52II7PB6.js → chunk-645WOU5I.js} +4 -4
  51. package/dist/{chunk-RG3I2663.js → chunk-64JLBFCQ.js} +2 -2
  52. package/dist/{chunk-G3T6YMBO.js → chunk-64S6X4IU.js} +7 -7
  53. package/dist/{chunk-FB4JQEFS.js → chunk-66CC6L6R.js} +2 -2
  54. package/dist/{chunk-TYSD7UQO.js → chunk-6BKSUA6P.js} +2 -2
  55. package/dist/{chunk-6AEKSOWV.js → chunk-6I6DFULH.js} +8 -8
  56. package/dist/{chunk-OL7A7NKH.js → chunk-74Z2BYEK.js} +2 -2
  57. package/dist/{chunk-JD5F5MYN.js → chunk-7DHNBABU.js} +3 -3
  58. package/dist/{chunk-JZRQY7ZQ.js → chunk-ADK5TMQL.js} +2 -2
  59. package/dist/{chunk-EJFOGYF3.js → chunk-AWKADEMO.js} +3 -3
  60. package/dist/{chunk-VV73XT3A.js → chunk-BJLCV2P3.js} +2 -2
  61. package/dist/{chunk-Y5KESB7T.js → chunk-C5GTIRIO.js} +38 -38
  62. package/dist/{chunk-LLG5VNK7.js → chunk-DF4SYU4Z.js} +2 -2
  63. package/dist/{chunk-WBN66HPI.js → chunk-ELHJK7LM.js} +6 -6
  64. package/dist/{chunk-YDDLSGYE.js → chunk-F3GX76LV.js} +2 -2
  65. package/dist/{chunk-AAANTXCQ.js → chunk-FZVZYU5C.js} +2 -2
  66. package/dist/{chunk-ON77FQXH.js → chunk-G6GMZJQ4.js} +2 -2
  67. package/dist/{chunk-37VTMUAL.js → chunk-GGHX4YHM.js} +2 -2
  68. package/dist/{chunk-JY2BGCYN.js → chunk-GJF337YM.js} +2 -2
  69. package/dist/{chunk-GDYLZ6FR.js → chunk-HJ3UTGIW.js} +3 -3
  70. package/dist/{chunk-FXWX7VD3.js → chunk-HL643H2F.js} +12 -12
  71. package/dist/{chunk-CCL2OXFO.js → chunk-HSHLDSPX.js} +3 -3
  72. package/dist/{chunk-WXBVGKS6.js → chunk-I6UTOUBK.js} +35 -79
  73. package/dist/chunk-I6UTOUBK.js.map +1 -0
  74. package/dist/{chunk-MLUPSZFK.js → chunk-IA3XZG4V.js} +2 -2
  75. package/dist/{chunk-ISNPYOXR.js → chunk-IJFX4JRI.js} +7 -7
  76. package/dist/{chunk-RTJJPW3C.js → chunk-ILMB3X4X.js} +5 -5
  77. package/dist/{chunk-USNU3BEQ.js → chunk-J53IBVMF.js} +2 -2
  78. package/dist/{chunk-JEX2JL3U.js → chunk-JEDS2QYV.js} +2 -2
  79. package/dist/{chunk-RFT4OPYI.js → chunk-JFRO5HJY.js} +2 -2
  80. package/dist/{chunk-WZYAXOGO.js → chunk-JM2WJBP7.js} +2 -2
  81. package/dist/{chunk-DJFULNXK.js → chunk-JRY55I6Z.js} +2 -2
  82. package/dist/{chunk-YZNTAOPZ.js → chunk-KXDUSGPM.js} +2 -2
  83. package/dist/{chunk-YJHOVA42.js → chunk-L5RMURVI.js} +2 -2
  84. package/dist/{chunk-R4BR62UO.js → chunk-LGLLCWA2.js} +2 -2
  85. package/dist/{chunk-AMKIIRLL.js → chunk-M3GOWG2P.js} +2 -2
  86. package/dist/{chunk-4G2A7MH3.js → chunk-M7KAJBO2.js} +3 -3
  87. package/dist/{chunk-UGTYADB4.js → chunk-MHSUEA32.js} +3 -3
  88. package/dist/{chunk-ERMT5WQM.js → chunk-MKE5DP3S.js} +2 -2
  89. package/dist/{chunk-EH46DHBU.js → chunk-MOB4JHG6.js} +2 -2
  90. package/dist/{chunk-IQSRVR6Z.js → chunk-N5H22V75.js} +2 -2
  91. package/dist/{chunk-WASVDS6G.js → chunk-NF5EHQTJ.js} +4 -4
  92. package/dist/{chunk-RYB553SS.js → chunk-NJZY5LOC.js} +2 -2
  93. package/dist/{chunk-BPIAXMGC.js → chunk-PIVSUPF2.js} +2 -2
  94. package/dist/{chunk-2S6JADBB.js → chunk-PJLJN23N.js} +2 -2
  95. package/dist/{chunk-ZAZZOQAQ.js → chunk-PRSF7DWT.js} +2 -2
  96. package/dist/{chunk-QY24FSXT.js → chunk-PTJWUN4H.js} +45 -45
  97. package/dist/{chunk-GFAEKSFR.js → chunk-QBK3IM6W.js} +5 -5
  98. package/dist/{chunk-KRAMCBIW.js → chunk-QKXPOLQD.js} +4 -4
  99. package/dist/{chunk-VCLNU6MY.js → chunk-QWURVT5Z.js} +2 -2
  100. package/dist/{chunk-YDT3OEYF.js → chunk-R4ZHF4K2.js} +2 -2
  101. package/dist/{chunk-KMJDH4KX.js → chunk-RSYFSCKL.js} +16 -16
  102. package/dist/{chunk-UHH67NLU.js → chunk-T4SMMTGY.js} +2 -2
  103. package/dist/{chunk-DJR37Q37.js → chunk-TIS6T6UP.js} +2 -2
  104. package/dist/{chunk-RKRX4C4H.js → chunk-TPKB7T6Z.js} +2 -2
  105. package/dist/{chunk-JZCBMKR5.js → chunk-TUCEP2LS.js} +5 -5
  106. package/dist/{chunk-OMWQO7H6.js → chunk-UEDC2VGP.js} +2 -2
  107. package/dist/{chunk-KBOQQEVC.js → chunk-UIX4JLVV.js} +2 -2
  108. package/dist/{chunk-NGH74LDV.js → chunk-UP2Q7U4G.js} +9 -9
  109. package/dist/{chunk-HQUYENKK.js → chunk-UY67YP6Q.js} +2 -2
  110. package/dist/{chunk-U2A56LLF.js → chunk-VQ6H4DL6.js} +11 -11
  111. package/dist/{chunk-RHJ5VGB3.js → chunk-W37MS6SX.js} +2 -2
  112. package/dist/{chunk-KAL5SXPP.js → chunk-WJC5KGYC.js} +6 -6
  113. package/dist/{chunk-G6A3SGCE.js → chunk-WVEEVYMH.js} +8 -25
  114. package/dist/chunk-WVEEVYMH.js.map +1 -0
  115. package/dist/{chunk-4B73TQQV.js → chunk-X2TZWVCC.js} +2 -2
  116. package/dist/{chunk-UQBOPCDK.js → chunk-X4PAATLA.js} +2 -2
  117. package/dist/{chunk-24SIB3EW.js → chunk-XWE3EOWX.js} +2 -2
  118. package/dist/{chunk-Y77FXULH.js → chunk-XWXBXBOX.js} +2 -2
  119. package/dist/{chunk-VKQI47DJ.js → chunk-Y7427SL7.js} +4 -4
  120. package/dist/{chunk-TEH5MDX5.js → chunk-YH7HJNWV.js} +22 -22
  121. package/dist/chunk-YHTG64XV.js +117 -0
  122. package/dist/chunk-YHTG64XV.js.map +1 -0
  123. package/dist/{chunk-EZ25VE3G.js → chunk-YNDLCWXS.js} +4 -4
  124. package/dist/{chunk-2M36PR7R.js → chunk-Z2T5BPOZ.js} +2 -2
  125. package/dist/{chunk-7NT3FKAF.js → chunk-Z4EH5TSO.js} +2 -2
  126. package/dist/{chunk-ZE5N4JSY.js → chunk-ZRDEOC4X.js} +2 -2
  127. package/dist/{chunk-IEW6NDHX.js → chunk-ZXEPLZUQ.js} +9 -9
  128. package/dist/cli.js +94 -92
  129. package/dist/coding/export-okf-codegraph.js +14 -12
  130. package/dist/coding/export-okf-codegraph.js.map +1 -1
  131. package/dist/coding/pre-action-gate.js +2 -2
  132. package/dist/compounding/engine.js +16 -14
  133. package/dist/config.js +23 -21
  134. package/dist/connectors/codex-materialize-runner.js +15 -13
  135. package/dist/connectors/index.js +15 -13
  136. package/dist/convergence-refresh.js +17 -15
  137. package/dist/corpus-scan-worker-host.d.ts +109 -0
  138. package/dist/corpus-scan-worker-host.d.ts.map +1 -0
  139. package/dist/corpus-scan-worker-host.js +15 -0
  140. package/dist/corpus-scan-worker.entry.d.ts +21 -0
  141. package/dist/corpus-scan-worker.entry.d.ts.map +1 -0
  142. package/dist/corpus-scan-worker.entry.js +60 -0
  143. package/dist/corpus-scan-worker.entry.js.map +1 -0
  144. package/dist/corpus-scan-worker.entry.mjs +176 -0
  145. package/dist/corpus-scan.d.ts +71 -0
  146. package/dist/corpus-scan.d.ts.map +1 -0
  147. package/dist/corpus-scan.js +16 -0
  148. package/dist/corpus-watermark.d.ts.map +1 -1
  149. package/dist/corpus-watermark.js +17 -15
  150. package/dist/dashboard-runtime.js +2 -2
  151. package/dist/deep-recall-http-glue.js +8 -8
  152. package/dist/embedding-fallback.js +2 -2
  153. package/dist/{entity-canonical-id-migration-F3JVG6K6.js → entity-canonical-id-migration-CUDCKWPF.js} +4 -2
  154. package/dist/entity-canonical-id-migration-CUDCKWPF.js.map +1 -0
  155. package/dist/entity-retrieval.js +17 -15
  156. package/dist/event-order-recall.js +3 -3
  157. package/dist/external-wiki-access.js +50 -48
  158. package/dist/extraction.js +20 -18
  159. package/dist/{graph-edge-decay-IU75NV42.js → graph-edge-decay-2BZTY2IM.js} +5 -5
  160. package/dist/graph-edge-decay-2BZTY2IM.js.map +1 -0
  161. package/dist/graph-jsonl.js +3 -3
  162. package/dist/graph-snapshot.js +3 -3
  163. package/dist/graph.js +2 -2
  164. package/dist/harmonic-retrieval.js +15 -13
  165. package/dist/index.js +164 -162
  166. package/dist/lcm/engine.js +2 -2
  167. package/dist/lcm/index.js +5 -5
  168. package/dist/location/index.js +17 -15
  169. package/dist/maintenance/memory-governance.js +15 -13
  170. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +15 -13
  171. package/dist/maintenance/rebuild-memory-projection-runner.js +17 -15
  172. package/dist/maintenance/rebuild-memory-projection.js +16 -14
  173. package/dist/memory-browse-operations.js +50 -48
  174. package/dist/memory-browse.js +5 -5
  175. package/dist/namespaces/migrate.js +16 -14
  176. package/dist/namespaces/search.js +8 -8
  177. package/dist/namespaces/storage.js +15 -13
  178. package/dist/offline-sync-changeset-generations.js +4 -4
  179. package/dist/offline-sync-embedding-generation.js +3 -3
  180. package/dist/offline-sync-snapshot-stream.js +7 -7
  181. package/dist/offline-sync.js +6 -6
  182. package/dist/operator-doctor-corpus.js +18 -16
  183. package/dist/operator-toolkit.js +34 -32
  184. package/dist/orchestration/maintenance.js +25 -23
  185. package/dist/orchestrator.js +136 -134
  186. package/dist/qmd.js +4 -4
  187. package/dist/recall-navigation-operations.js +50 -48
  188. package/dist/recall-navigation.js +49 -47
  189. package/dist/recall-state-view-admission.js +5 -5
  190. package/dist/recall-why-service.js +5 -5
  191. package/dist/resume-bundles.js +24 -22
  192. package/dist/search/factory.js +7 -7
  193. package/dist/search/index.js +15 -15
  194. package/dist/semantic-consolidation.js +16 -14
  195. package/dist/semantic-rule-promotion.js +15 -13
  196. package/dist/semantic-rule-verifier.js +15 -13
  197. package/dist/source-agent-qualifier.js +18 -16
  198. package/dist/standup/build.js +15 -13
  199. package/dist/storage/entity-canonical-id-migration.d.ts.map +1 -1
  200. package/dist/storage/memory-read-store.d.ts +5 -9
  201. package/dist/storage/memory-read-store.d.ts.map +1 -1
  202. package/dist/storage.js +16 -14
  203. package/dist/support-passport/index.js +52 -50
  204. package/dist/transfer/export-okf.js +15 -13
  205. package/dist/verified-recall.js +15 -13
  206. package/dist/who-knows-cli.js +16 -14
  207. package/dist/who-knows.js +15 -13
  208. package/package.json +2 -2
  209. package/scripts/build-with-heap.mjs +8 -0
  210. package/src/corpus-scan-worker-host.ts +314 -0
  211. package/src/corpus-scan-worker.entry.mjs +176 -0
  212. package/src/corpus-scan-worker.entry.ts +95 -0
  213. package/src/corpus-scan.ts +215 -0
  214. package/src/corpus-watermark.ts +28 -12
  215. package/src/storage/entity-canonical-id-migration.ts +4 -26
  216. package/src/storage/memory-read-store.ts +17 -99
  217. package/dist/chunk-5U2BBF7E.js.map +0 -1
  218. package/dist/chunk-G6A3SGCE.js.map +0 -1
  219. package/dist/chunk-WXBVGKS6.js.map +0 -1
  220. /package/dist/{chunk-XDKEHZUC.js.map → chunk-264B57GV.js.map} +0 -0
  221. /package/dist/{chunk-6BO27AWQ.js.map → chunk-2HVCTFKG.js.map} +0 -0
  222. /package/dist/{chunk-3E3Z6UA3.js.map → chunk-3DG2YAAX.js.map} +0 -0
  223. /package/dist/{chunk-2IVK5IDY.js.map → chunk-4O4VAEWH.js.map} +0 -0
  224. /package/dist/{chunk-NRGQ5HJO.js.map → chunk-4P4VLPGB.js.map} +0 -0
  225. /package/dist/{chunk-GIRWNTMV.js.map → chunk-4PG5R6BJ.js.map} +0 -0
  226. /package/dist/{chunk-PM4PKC3Y.js.map → chunk-5XY46Z2W.js.map} +0 -0
  227. /package/dist/{chunk-52II7PB6.js.map → chunk-645WOU5I.js.map} +0 -0
  228. /package/dist/{chunk-RG3I2663.js.map → chunk-64JLBFCQ.js.map} +0 -0
  229. /package/dist/{chunk-G3T6YMBO.js.map → chunk-64S6X4IU.js.map} +0 -0
  230. /package/dist/{chunk-FB4JQEFS.js.map → chunk-66CC6L6R.js.map} +0 -0
  231. /package/dist/{chunk-TYSD7UQO.js.map → chunk-6BKSUA6P.js.map} +0 -0
  232. /package/dist/{chunk-6AEKSOWV.js.map → chunk-6I6DFULH.js.map} +0 -0
  233. /package/dist/{chunk-OL7A7NKH.js.map → chunk-74Z2BYEK.js.map} +0 -0
  234. /package/dist/{chunk-JD5F5MYN.js.map → chunk-7DHNBABU.js.map} +0 -0
  235. /package/dist/{chunk-JZRQY7ZQ.js.map → chunk-ADK5TMQL.js.map} +0 -0
  236. /package/dist/{chunk-EJFOGYF3.js.map → chunk-AWKADEMO.js.map} +0 -0
  237. /package/dist/{chunk-VV73XT3A.js.map → chunk-BJLCV2P3.js.map} +0 -0
  238. /package/dist/{chunk-Y5KESB7T.js.map → chunk-C5GTIRIO.js.map} +0 -0
  239. /package/dist/{chunk-LLG5VNK7.js.map → chunk-DF4SYU4Z.js.map} +0 -0
  240. /package/dist/{chunk-WBN66HPI.js.map → chunk-ELHJK7LM.js.map} +0 -0
  241. /package/dist/{chunk-YDDLSGYE.js.map → chunk-F3GX76LV.js.map} +0 -0
  242. /package/dist/{chunk-AAANTXCQ.js.map → chunk-FZVZYU5C.js.map} +0 -0
  243. /package/dist/{chunk-ON77FQXH.js.map → chunk-G6GMZJQ4.js.map} +0 -0
  244. /package/dist/{chunk-37VTMUAL.js.map → chunk-GGHX4YHM.js.map} +0 -0
  245. /package/dist/{chunk-JY2BGCYN.js.map → chunk-GJF337YM.js.map} +0 -0
  246. /package/dist/{chunk-GDYLZ6FR.js.map → chunk-HJ3UTGIW.js.map} +0 -0
  247. /package/dist/{chunk-FXWX7VD3.js.map → chunk-HL643H2F.js.map} +0 -0
  248. /package/dist/{chunk-CCL2OXFO.js.map → chunk-HSHLDSPX.js.map} +0 -0
  249. /package/dist/{chunk-MLUPSZFK.js.map → chunk-IA3XZG4V.js.map} +0 -0
  250. /package/dist/{chunk-ISNPYOXR.js.map → chunk-IJFX4JRI.js.map} +0 -0
  251. /package/dist/{chunk-RTJJPW3C.js.map → chunk-ILMB3X4X.js.map} +0 -0
  252. /package/dist/{chunk-USNU3BEQ.js.map → chunk-J53IBVMF.js.map} +0 -0
  253. /package/dist/{chunk-JEX2JL3U.js.map → chunk-JEDS2QYV.js.map} +0 -0
  254. /package/dist/{chunk-RFT4OPYI.js.map → chunk-JFRO5HJY.js.map} +0 -0
  255. /package/dist/{chunk-WZYAXOGO.js.map → chunk-JM2WJBP7.js.map} +0 -0
  256. /package/dist/{chunk-DJFULNXK.js.map → chunk-JRY55I6Z.js.map} +0 -0
  257. /package/dist/{chunk-YZNTAOPZ.js.map → chunk-KXDUSGPM.js.map} +0 -0
  258. /package/dist/{chunk-YJHOVA42.js.map → chunk-L5RMURVI.js.map} +0 -0
  259. /package/dist/{chunk-R4BR62UO.js.map → chunk-LGLLCWA2.js.map} +0 -0
  260. /package/dist/{chunk-AMKIIRLL.js.map → chunk-M3GOWG2P.js.map} +0 -0
  261. /package/dist/{chunk-4G2A7MH3.js.map → chunk-M7KAJBO2.js.map} +0 -0
  262. /package/dist/{chunk-UGTYADB4.js.map → chunk-MHSUEA32.js.map} +0 -0
  263. /package/dist/{chunk-ERMT5WQM.js.map → chunk-MKE5DP3S.js.map} +0 -0
  264. /package/dist/{chunk-EH46DHBU.js.map → chunk-MOB4JHG6.js.map} +0 -0
  265. /package/dist/{chunk-IQSRVR6Z.js.map → chunk-N5H22V75.js.map} +0 -0
  266. /package/dist/{chunk-WASVDS6G.js.map → chunk-NF5EHQTJ.js.map} +0 -0
  267. /package/dist/{chunk-RYB553SS.js.map → chunk-NJZY5LOC.js.map} +0 -0
  268. /package/dist/{chunk-BPIAXMGC.js.map → chunk-PIVSUPF2.js.map} +0 -0
  269. /package/dist/{chunk-2S6JADBB.js.map → chunk-PJLJN23N.js.map} +0 -0
  270. /package/dist/{chunk-ZAZZOQAQ.js.map → chunk-PRSF7DWT.js.map} +0 -0
  271. /package/dist/{chunk-QY24FSXT.js.map → chunk-PTJWUN4H.js.map} +0 -0
  272. /package/dist/{chunk-GFAEKSFR.js.map → chunk-QBK3IM6W.js.map} +0 -0
  273. /package/dist/{chunk-KRAMCBIW.js.map → chunk-QKXPOLQD.js.map} +0 -0
  274. /package/dist/{chunk-VCLNU6MY.js.map → chunk-QWURVT5Z.js.map} +0 -0
  275. /package/dist/{chunk-YDT3OEYF.js.map → chunk-R4ZHF4K2.js.map} +0 -0
  276. /package/dist/{chunk-KMJDH4KX.js.map → chunk-RSYFSCKL.js.map} +0 -0
  277. /package/dist/{chunk-UHH67NLU.js.map → chunk-T4SMMTGY.js.map} +0 -0
  278. /package/dist/{chunk-DJR37Q37.js.map → chunk-TIS6T6UP.js.map} +0 -0
  279. /package/dist/{chunk-RKRX4C4H.js.map → chunk-TPKB7T6Z.js.map} +0 -0
  280. /package/dist/{chunk-JZCBMKR5.js.map → chunk-TUCEP2LS.js.map} +0 -0
  281. /package/dist/{chunk-OMWQO7H6.js.map → chunk-UEDC2VGP.js.map} +0 -0
  282. /package/dist/{chunk-KBOQQEVC.js.map → chunk-UIX4JLVV.js.map} +0 -0
  283. /package/dist/{chunk-NGH74LDV.js.map → chunk-UP2Q7U4G.js.map} +0 -0
  284. /package/dist/{chunk-HQUYENKK.js.map → chunk-UY67YP6Q.js.map} +0 -0
  285. /package/dist/{chunk-U2A56LLF.js.map → chunk-VQ6H4DL6.js.map} +0 -0
  286. /package/dist/{chunk-RHJ5VGB3.js.map → chunk-W37MS6SX.js.map} +0 -0
  287. /package/dist/{chunk-KAL5SXPP.js.map → chunk-WJC5KGYC.js.map} +0 -0
  288. /package/dist/{chunk-4B73TQQV.js.map → chunk-X2TZWVCC.js.map} +0 -0
  289. /package/dist/{chunk-UQBOPCDK.js.map → chunk-X4PAATLA.js.map} +0 -0
  290. /package/dist/{chunk-24SIB3EW.js.map → chunk-XWE3EOWX.js.map} +0 -0
  291. /package/dist/{chunk-Y77FXULH.js.map → chunk-XWXBXBOX.js.map} +0 -0
  292. /package/dist/{chunk-VKQI47DJ.js.map → chunk-Y7427SL7.js.map} +0 -0
  293. /package/dist/{chunk-TEH5MDX5.js.map → chunk-YH7HJNWV.js.map} +0 -0
  294. /package/dist/{chunk-EZ25VE3G.js.map → chunk-YNDLCWXS.js.map} +0 -0
  295. /package/dist/{chunk-2M36PR7R.js.map → chunk-Z2T5BPOZ.js.map} +0 -0
  296. /package/dist/{chunk-7NT3FKAF.js.map → chunk-Z4EH5TSO.js.map} +0 -0
  297. /package/dist/{chunk-ZE5N4JSY.js.map → chunk-ZRDEOC4X.js.map} +0 -0
  298. /package/dist/{chunk-IEW6NDHX.js.map → chunk-ZXEPLZUQ.js.map} +0 -0
  299. /package/dist/{entity-canonical-id-migration-F3JVG6K6.js.map → corpus-scan-worker-host.js.map} +0 -0
  300. /package/dist/{graph-edge-decay-IU75NV42.js.map → corpus-scan.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/corpus-watermark.ts"],"sourcesContent":["/**\n * Corpus watermark (issue #2149) — a cheap, comparable fingerprint of a\n * daemon's active-memory corpus.\n *\n * Deployment shape this addresses: two daemons behind an active/backup VIP,\n * each owning its own memory directory. Nothing compared the two corpora, so a\n * pair could diverge for months (e.g. one holding ~190k files, its backup\n * ~340k with different histories) with no signal until a manual audit. This\n * module ships the WATERMARK primitive and the read surfaces that expose it;\n * peer polling and divergence alerting are a follow-up.\n *\n * The digest is a CENSUS fingerprint (per day-partition file counts), NOT a\n * content hash — two daemons that agree on how many memory FILES live in\n * each `<tier>:<category>/<day>` partition produce the same digest, so a\n * differing digest is a cheap divergence signal without reading or hashing file\n * bodies. Buckets are tier-aware (`hot:` / `cold:`): demoted memories stay\n * reachable via cold recall, so the census counts BOTH tiers and a hot/cold\n * split shows in the digest rather than being silently folded together (issue\n * #2156 finding D). `newestWriteAt` stays scoped to the newest HOT partition\n * only, so the freshness probe stays O(one day's active files) even on a 100k+\n * corpus.\n *\n * Robustness (issue #2156 review rounds):\n * - `/health` and `remnic doctor` resolve their namespace set through the ONE\n * {@link resolveCorpusNamespaceRoots} helper — config-driven enumeration\n * unioned with the PERSISTED namespace catalog read from config — so both\n * surfaces enumerate the same tenants and cannot drift.\n * - The `/health` builder serves through a stale-while-revalidate\n * {@link CorpusWatermarkCache}, so a probe NEVER awaits the recursive corpus\n * scan (it returns the cached/stale value and refreshes in the background).\n * - Each namespace's census brackets its hot+cold walk with a corpus-mutation\n * sentinel and retries when a tier migration races it, so a transient\n * double-count/miss is never cached as a false divergence.\n * - An unreadable corpus root (EACCES) is OMITTED, not published as a false\n * empty; a missing root (ENOENT — a not-yet-created namespace) is a genuine\n * empty corpus.\n */\n\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { setImmediate as yieldToEventLoop } from \"node:timers/promises\";\nimport { capabilityAllowsNamespace, type TokenCapabilities } from \"./access-token-capabilities.js\";\nimport { listNamespaces } from \"./namespaces/migrate.js\";\nimport { corpusScanWorker } from \"./corpus-scan-worker-host.js\";\nimport type { PluginConfig } from \"./types.js\";\n\nexport interface CorpusWatermark {\n namespace: string;\n /**\n * Count of memory files under the census scan roots (hot + cold). This is a\n * FILE census, not a status-filtered active count: reading each file's\n * frontmatter status would defeat the cheap-probe design, so an in-place\n * status change (e.g. archived-in-place) is not reflected here.\n */\n memoryFileCount: number;\n /** Newest `YYYY-MM-DD` day-partition seen in the HOT tier, or null when none is dated. */\n newestPartition: string | null;\n /** ISO max mtime within the newest HOT partition, or null when it has no files. */\n newestWriteAt: string | null;\n /** sha256 hex over the deterministic per-partition census. */\n digest: string;\n computedAt: string;\n}\n\n/** Explicit bucket for paths that do not match the `<category>/<day>` shape. */\nexport const UNPARTITIONED_BUCKET = \"unpartitioned\";\n\n/** Storage tier a memory file lives in. */\nexport type CorpusTier = \"hot\" | \"cold\";\n\n/** Paths parsed between event-loop yields while building a census. */\nconst CENSUS_YIELD_EVERY = 4_096;\n\nconst DAY_PARTITION_RE = /^\\d{4}-\\d{2}-\\d{2}$/;\n/** Cold-tier root segment (relative to a namespace base dir): `<baseDir>/cold/...`. */\nconst COLD_TIER_DIR = \"cold\";\n\n/**\n * True when `token` is not just `YYYY-MM-DD`-shaped but a REAL calendar day.\n * The regex alone accepts impossible dates (e.g. `2026-99-99`) that would then\n * sort lexically above every valid partition and corrupt `newestPartition`\n * (issue #2156 round-6); round-tripping through a UTC Date rejects month/day\n * overflow. A malformed dir falls back to the unpartitioned bucket.\n */\nfunction isRealCalendarDay(token: string): boolean {\n if (!DAY_PARTITION_RE.test(token)) return false;\n const [year, month, day] = token.split(\"-\").map(Number);\n const date = new Date(Date.UTC(year, month - 1, day));\n return date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day;\n}\n\ninterface ParsedPath {\n readonly bucket: string;\n readonly date: string | null;\n readonly tier: CorpusTier;\n}\n\nfunction parsePartition(baseDir: string, filePath: string): ParsedPath {\n const rel = path.relative(baseDir, filePath).split(path.sep).join(\"/\");\n const parts = rel.split(\"/\");\n // Cold-tier files live under `<baseDir>/cold/<category>/<day>/...`; hot files\n // sit directly under `<baseDir>/<category>/<day>/...`. Strip the leading\n // `cold/` segment so the category/day parse is tier-agnostic, then prefix the\n // bucket with the tier so a hot and cold partition of the same day never\n // collide (they must diverge the digest, not fold together).\n const tier: CorpusTier = parts[0] === COLD_TIER_DIR ? \"cold\" : \"hot\";\n const categoryParts = tier === \"cold\" ? parts.slice(1) : parts;\n if (categoryParts.length >= 2 && isRealCalendarDay(categoryParts[1])) {\n return { bucket: `${tier}:${categoryParts[0]}/${categoryParts[1]}`, date: categoryParts[1], tier };\n }\n return { bucket: `${tier}:${UNPARTITIONED_BUCKET}`, date: null, tier };\n}\n\n/**\n * Build the per-partition census: bucket key -> file count. Bucket keys are\n * tier-aware (`hot:`/`cold:`). Paths not matching a day-partition land in the\n * explicit tier {@link UNPARTITIONED_BUCKET}; they are never silently dropped.\n * Pure — no filesystem access.\n */\nexport function buildPartitionCensus(paths: readonly string[], baseDir: string): Map<string, number> {\n const census = new Map<string, number>();\n for (const filePath of paths) {\n const { bucket } = parsePartition(baseDir, filePath);\n census.set(bucket, (census.get(bucket) ?? 0) + 1);\n }\n return census;\n}\n\n/**\n * Deterministic census -> digest. Bucket keys are SORTED before serialization\n * (AGENTS.md pattern 26: insertion order must not affect a hash), then emitted\n * as `\"<bucket>:<count>\"` lines joined by `\\n` and hashed with sha256. Pure —\n * separately exported so it can be unit-tested without a filesystem.\n */\nexport function digestPartitionCensus(census: ReadonlyMap<string, number> | Record<string, number>): string {\n const entries = census instanceof Map ? [...census.entries()] : Object.entries(census);\n const serialized = entries\n .sort((a, b) => (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0))\n .map(([bucket, count]) => `${bucket}:${count}`)\n .join(\"\\n\");\n return createHash(\"sha256\").update(serialized).digest(\"hex\");\n}\n\n/**\n * Compute a watermark for a single namespace from an already-collected path\n * list (both tiers, under `baseDir`) plus its memory base directory. Never\n * throws on an empty list — an empty corpus yields the digest of the empty\n * census and null timestamps. Only the newest HOT partition's files are\n * `stat`-ed, so freshness stays cheap even on a 100k+ corpus.\n */\nexport async function computeCorpusWatermark(input: {\n namespace: string;\n paths: readonly string[];\n baseDir: string;\n now?: Date;\n}): Promise<CorpusWatermark> {\n const { namespace, paths, baseDir } = input;\n\n const census = new Map<string, number>();\n let newestPartition: string | null = null;\n const parsedByPath: ParsedPath[] = [];\n let sinceYield = 0;\n for (const filePath of paths) {\n // Parsing one path is cheap, but a census covers the whole corpus (100k+\n // paths): one uninterrupted pass holds the main thread for hundreds of\n // milliseconds. Yield to the event loop every CENSUS_YIELD_EVERY paths so\n // observe/recall interleave; the result is order-independent and identical.\n if (sinceYield >= CENSUS_YIELD_EVERY) {\n sinceYield = 0;\n await yieldToEventLoop();\n }\n sinceYield += 1;\n const parsed = parsePartition(baseDir, filePath);\n parsedByPath.push(parsed);\n census.set(parsed.bucket, (census.get(parsed.bucket) ?? 0) + 1);\n // Freshness is the newest ACTIVE (hot) write. Cold memories are demoted and\n // keep their original (older) partition date, so they never advance the\n // freshness probe and their files are never stat-ed below.\n if (parsed.tier === \"hot\" && parsed.date !== null && (newestPartition === null || parsed.date > newestPartition)) {\n newestPartition = parsed.date;\n }\n }\n\n const digest = digestPartitionCensus(census);\n\n let newestWriteAt: string | null = null;\n if (newestPartition !== null) {\n const newestPaths: string[] = [];\n for (let i = 0; i < paths.length; i += 1) {\n if (parsedByPath[i].tier !== \"hot\" || parsedByPath[i].date !== newestPartition) continue;\n newestPaths.push(paths[i]);\n }\n // The freshness sweep is one stat per file in the newest hot partition; it\n // runs in the corpus-scan worker so the periodic census does not spend\n // main-thread time on a per-file syscall sweep. A file that vanished\n // (ENOENT) reports null; a backend read failure (EACCES/EIO/…) propagates\n // with its errno code so the namespace is omitted, not published with a\n // stale/null freshness (issue #2156 round-6).\n const mtimes = await corpusScanWorker.request({ kind: \"stat-mtimes\", paths: newestPaths });\n let maxMtimeMs = Number.NEGATIVE_INFINITY;\n for (const mtimeMs of mtimes) {\n if (mtimeMs !== null && mtimeMs > maxMtimeMs) maxMtimeMs = mtimeMs;\n }\n if (maxMtimeMs > Number.NEGATIVE_INFINITY) {\n newestWriteAt = new Date(maxMtimeMs).toISOString();\n }\n }\n\n // Stamp AFTER the (possibly slow) stat loop so an age-based HA consumer never\n // sees a timestamp earlier than when the scan actually finished (finding\n // round-4). An explicit `now` (tests / determinism) still wins.\n const computedAt = (input.now ?? new Date()).toISOString();\n\n return {\n namespace,\n memoryFileCount: paths.length,\n newestPartition,\n newestWriteAt,\n digest,\n computedAt,\n };\n}\n\n/** Minimal storage surface a watermark needs — satisfied by StorageManager. */\nexport interface CorpusStorage {\n readonly dir: string;\n /** Hot-tier active memory paths (the recall corpus). */\n collectActiveMemoryPaths(options?: { propagateReadErrors?: boolean }): Promise<string[]>;\n /** Cold-tier (demoted-but-reachable) memory paths (issue #2156 finding D). */\n collectColdMemoryPaths(options?: { propagateReadErrors?: boolean }): Promise<string[]>;\n /**\n * Optional combined hot+cold corpus-mutation sentinel. When present, the\n * census brackets its scan with it and retries on change so a tier migration\n * racing the walkers is not cached as a false divergence. Absent (test fakes)\n * ⇒ single-pass.\n */\n getCorpusScanVersion?(): string | Promise<string>;\n}\n\n/** Max census re-scans when a corpus mutation keeps racing the walkers. */\nconst CENSUS_RACE_MAX_ATTEMPTS = 3;\n\n/**\n * Compute one namespace's watermark from its storage, spanning BOTH tiers so a\n * cold-tier divergence is caught. Reads are STRICT: the collectors propagate a\n * backend read failure (EACCES on the root OR any nested category dir, ENOTDIR,\n * …) so an unreadable corpus is OMITTED by the caller rather than published as a\n * false empty census; a missing root (ENOENT — a not-yet-created namespace)\n * stays a genuine empty corpus. The hot+cold walk is bracketed by the\n * corpus-mutation sentinel (when the storage exposes one) and retried on change;\n * if it never stabilizes (sustained tier churn) this THROWS rather than caching\n * a transient double-count/miss as a false divergence.\n */\nasync function computeNamespaceWatermark(\n namespace: string,\n storage: CorpusStorage,\n now?: Date,\n): Promise<CorpusWatermark> {\n const readVersion = storage.getCorpusScanVersion?.bind(storage);\n const maxAttempts = readVersion ? CENSUS_RACE_MAX_ATTEMPTS : 1;\n for (let attempt = 0; attempt < maxAttempts; attempt += 1) {\n const before = readVersion ? await readVersion() : null;\n const [hotPaths, coldPaths] = await Promise.all([\n storage.collectActiveMemoryPaths({ propagateReadErrors: true }),\n storage.collectColdMemoryPaths({ propagateReadErrors: true }),\n ]);\n const result = await computeCorpusWatermark({ namespace, paths: [...hotPaths, ...coldPaths], baseDir: storage.dir, now });\n const after = readVersion ? await readVersion() : null;\n if (before === after) return result;\n // A tier write (e.g. hot→cold migration) raced the two walkers, so the\n // count/digest may double-count or miss the in-flight memory. Retry for a\n // consistent snapshot.\n }\n throw new Error(`corpus census for namespace \"${namespace}\" did not stabilize after ${maxAttempts} attempts`);\n}\n\n/**\n * Compute watermarks for a set of namespaces. A namespace whose storage is\n * unavailable (or unreadable) is skipped rather than failing the whole read, so\n * a single bad namespace never blanks the health/doctor payload.\n */\nexport async function computeCorpusWatermarks(\n namespaces: readonly string[],\n storageFor: (namespace: string) => CorpusStorage | Promise<CorpusStorage>,\n now?: Date,\n): Promise<CorpusWatermark[]> {\n const watermarks: CorpusWatermark[] = [];\n for (const namespace of namespaces) {\n try {\n watermarks.push(await computeNamespaceWatermark(namespace, await storageFor(namespace), now));\n } catch {\n // Storage unavailable/unreadable for this namespace — degrade gracefully.\n }\n }\n return watermarks;\n}\n\n/** A namespace and the memory root its corpus lives under. */\nexport interface CorpusNamespaceRoot {\n /** Representative namespace label for this root (default wins on collapse). */\n readonly namespace: string;\n readonly rootDir: string;\n /**\n * Every configured namespace name that resolves to `rootDir` (aliases that\n * collapsed onto one physical root, e.g. `global` + `shared` when namespaces\n * are disabled). `/health` filters visibility against ALL of these so a token\n * scoped to a non-representative alias still sees the shared corpus (issue\n * #2156 round-10). Always includes `namespace`.\n */\n readonly namespaces: readonly string[];\n}\n\n/**\n * Resolve the namespace set the corpus census covers, shared by the `/health`\n * builder AND the `remnic doctor` corpus check (issue #2156 finding C) so the\n * two surfaces enumerate the SAME tenants — and, critically, resolve each\n * namespace's ROOT the SAME way — and cannot drift. Enumeration is purely\n * config-driven (`listNamespaces({ config })`): it discovers the default,\n * shared, policy, and on-disk `namespaces/<ns>` tenants and resolves every root\n * through the namespace storage router, exactly as the live daemon's\n * `getStorage(namespace)` does. It still works when the namespace catalog is\n * opted out. The catalog is deliberately NOT unioned in: a catalog-registered\n * tenant with no directory has an empty corpus (nothing to fingerprint), and\n * trusting `catalog.storageDir` here could make the doctor scan a different root\n * than `/health` for the same namespace (issue #2156 round-8). Deduped by\n * resolved root so a namespaces-disabled / flat-root deployment reports its\n * single shared corpus once, under the default-namespace label.\n */\nexport async function resolveCorpusNamespaceRoots(options: {\n config: PluginConfig;\n propagateDiscoveryErrors?: boolean;\n}): Promise<CorpusNamespaceRoot[]> {\n const { config } = options;\n const configDriven = await listNamespaces({\n config,\n propagateDiscoveryErrors: options.propagateDiscoveryErrors,\n });\n // Default namespace first so it wins the representative label when several\n // configured names collapse onto one root (namespaces disabled → memoryDir).\n const ordered = [\n ...configDriven.filter((entry) => entry.namespace === config.defaultNamespace),\n ...configDriven.filter((entry) => entry.namespace !== config.defaultNamespace),\n ];\n const seenNamespaces = new Set<string>();\n const byRoot = new Map<string, { namespace: string; rootDir: string; namespaces: string[] }>();\n for (const entry of ordered) {\n if (seenNamespaces.has(entry.namespace)) continue;\n seenNamespaces.add(entry.namespace);\n const existing = byRoot.get(entry.rootDir);\n if (existing) {\n existing.namespaces.push(entry.namespace); // an alias collapsing onto a seen root\n } else {\n byRoot.set(entry.rootDir, { namespace: entry.namespace, rootDir: entry.rootDir, namespaces: [entry.namespace] });\n }\n }\n const roots: CorpusNamespaceRoot[] = [...byRoot.values()];\n if (roots.length === 0) {\n roots.push({ namespace: config.defaultNamespace, rootDir: config.memoryDir, namespaces: [config.defaultNamespace] });\n }\n return roots;\n}\n\n/**\n * Divergence detection tolerates a watermark that is stale by up to a minute\n * (peers are compared on a slow cadence); a health/readiness probe does NOT\n * tolerate a full corpus scan (a recursive realpath-per-Markdown-file walk) on\n * every request. This TTL is that trade-off: recompute a namespace's watermark\n * at most once per window; probes in between serve the cached census (whose\n * `computedAt` shows its staleness).\n */\nexport const WATERMARK_CACHE_TTL_MS = 60_000;\n\n/**\n * Cap on concurrent background corpus scans. A probe that finds many namespaces\n * cold/expired would otherwise fan out one recursive hot/cold walk PER namespace\n * at once, a periodic unbounded filesystem-work burst that can starve recall and\n * storage (issue #2156 round-9). Excess refreshes queue and start as slots free;\n * single-flight still dedupes duplicate requests for the same namespace.\n */\nconst MAX_CONCURRENT_WATERMARK_REFRESHES = 4;\n\n/**\n * Instance-scoped (AGENTS.md pattern 5 — never a bare module global)\n * stale-while-revalidate cache in front of the per-namespace corpus scan.\n * {@link get} NEVER awaits the scan: it returns the freshest already-computed\n * watermark (stale allowed, or undefined for a cold namespace) and triggers a\n * single-flight background refresh when the entry is missing or expired. So a\n * `/health` probe is always O(1) — it never blocks on a recursive corpus walk,\n * even on the first request after startup or after a TTL expiry. Owned by the\n * long-lived access service instance.\n */\nexport class CorpusWatermarkCache {\n private readonly entries = new Map<string, { value: CorpusWatermark; expiresAt: number }>();\n private readonly inFlight = new Map<string, Promise<void>>();\n private readonly ttlMs: number;\n private readonly clock: () => number;\n private rootsEntry: { value: CorpusNamespaceRoot[]; expiresAt: number } | undefined;\n private rootsInFlight: Promise<void> | undefined;\n private rootsRefreshError: unknown;\n private readonly queued = new Map<string, () => void>();\n private activeRefreshes = 0;\n private readonly maxConcurrentRefreshes: number;\n\n constructor(options: { ttlMs?: number; clock?: () => number; maxConcurrentRefreshes?: number } = {}) {\n this.ttlMs = options.ttlMs ?? WATERMARK_CACHE_TTL_MS;\n this.clock = options.clock ?? Date.now;\n this.maxConcurrentRefreshes = Math.max(1, options.maxConcurrentRefreshes ?? MAX_CONCURRENT_WATERMARK_REFRESHES);\n }\n\n get(namespace: string, compute: () => Promise<CorpusWatermark>): CorpusWatermark | undefined {\n const cached = this.entries.get(namespace);\n const fresh = cached !== undefined && this.clock() < cached.expiresAt;\n if (!fresh) this.refresh(namespace, compute);\n return cached?.value;\n }\n\n private refresh(namespace: string, compute: () => Promise<CorpusWatermark>): void {\n // Single-flight + not-already-queued: one background scan per namespace.\n if (this.inFlight.has(namespace) || this.queued.has(namespace)) return;\n const run = (): void => {\n this.activeRefreshes += 1;\n const pending = compute()\n .then((value) => {\n this.entries.set(namespace, { value, expiresAt: this.clock() + this.ttlMs });\n })\n .catch(() => {\n // Failed/unreadable scan: never cache it; keep serving any stale value.\n })\n .finally(() => {\n this.inFlight.delete(namespace);\n this.activeRefreshes -= 1;\n this.drainQueue();\n });\n this.inFlight.set(namespace, pending);\n };\n // Bound the concurrent fan-out: run now if a slot is free, else queue.\n if (this.activeRefreshes < this.maxConcurrentRefreshes) {\n run();\n } else {\n this.queued.set(namespace, run);\n }\n }\n\n private drainQueue(): void {\n while (this.activeRefreshes < this.maxConcurrentRefreshes && this.queued.size > 0) {\n const next = this.queued.entries().next().value;\n if (!next) break;\n const [namespace, run] = next;\n this.queued.delete(namespace);\n run();\n }\n }\n\n\n /**\n * Stale-while-revalidate the resolved namespace roots (issue #2156 round-7).\n * Namespace enumeration (config scan + persisted-catalog parse) is O(tenants)\n * filesystem work; without this it ran on every probe ahead of the watermark\n * cache. NEVER awaits: returns the cached/stale roots (or undefined when cold)\n * and single-flights a background refresh.\n */\n getResolvedRoots(compute: () => Promise<CorpusNamespaceRoot[]>): CorpusNamespaceRoot[] | undefined {\n const fresh = this.rootsEntry !== undefined && this.clock() < this.rootsEntry.expiresAt;\n if (!fresh && this.rootsInFlight === undefined) {\n this.rootsInFlight = compute()\n .then((value) => {\n this.rootsEntry = { value, expiresAt: this.clock() + this.ttlMs };\n this.rootsRefreshError = undefined;\n })\n .catch((error: unknown) => {\n this.rootsRefreshError = error;\n // Keep serving any stale roots; callers that require completeness\n // inspect the refresh status before trusting them.\n })\n .finally(() => {\n this.rootsInFlight = undefined;\n });\n }\n return this.rootsEntry?.value;\n }\n\n getResolvedRootsStatus(compute: () => Promise<CorpusNamespaceRoot[]>): {\n roots: CorpusNamespaceRoot[] | undefined;\n refreshError: unknown;\n } {\n const roots = this.getResolvedRoots(compute);\n return { roots, refreshError: this.rootsRefreshError };\n }\n /** Await every background refresh — in-flight AND queued (issue #2156 round-9) —\n * plus any roots refresh (shutdown / deterministic tests). */\n async whenIdle(): Promise<void> {\n while (this.inFlight.size > 0 || this.rootsInFlight !== undefined || this.queued.size > 0) {\n const pending: Promise<unknown>[] = [...this.inFlight.values()];\n if (this.rootsInFlight) pending.push(this.rootsInFlight);\n if (pending.length === 0) {\n this.drainQueue(); // queued work with no running peer — start it\n await Promise.resolve();\n continue;\n }\n await Promise.all(pending);\n }\n }\n}\n\n/** Orchestrator surface the service watermark builder reads — satisfied by Orchestrator. */\nexport interface CorpusWatermarkHost {\n config: PluginConfig;\n getStorage(namespace: string): CorpusStorage | Promise<CorpusStorage>;\n}\n\nexport interface ServiceCorpusWatermarkOptions {\n /** Stale-while-revalidate cache so probes never await the corpus scan. */\n cache?: CorpusWatermarkCache;\n /**\n * Presenting token capabilities. When the token is namespace-restricted the\n * fleet view is filtered to the namespaces it may access (issue #2156 finding\n * B); an unrestricted/legacy token keeps the full fleet view.\n */\n caps?: TokenCapabilities | null;\n now?: Date;\n}\n\n/**\n * Build the per-namespace watermark array served on `/health`. Namespaces are\n * resolved through {@link resolveCorpusNamespaceRoots} (shared with the doctor),\n * filtered to the caller's capabilities, then served through the (optional)\n * stale-while-revalidate cache so a probe never blocks on a scan. Degrades to an\n * empty array — never throws — if enumeration is unavailable; an individual\n * namespace whose scan fails is omitted, not allowed to blank the payload.\n */\nexport async function computeServiceCorpusWatermarks(\n host: CorpusWatermarkHost,\n options: ServiceCorpusWatermarkOptions = {},\n): Promise<CorpusWatermark[]> {\n return (await computeServiceCorpusCensus(host, options)).watermarks;\n}\n\n/**\n * Watermarks PLUS whether every configured namespace made it into the set.\n *\n * Completeness is returned ATOMICALLY with the data rather than stashed in a\n * side channel: every early exit here (enumeration threw, roots still warming,\n * a per-namespace scan failed, a cache entry not yet populated) yields an\n * incomplete set, and a caller that certifies convergence against a partial\n * census would hide the divergence of whatever was dropped (issue #2149).\n */\nexport async function computeServiceCorpusCensus(\n host: CorpusWatermarkHost,\n options: ServiceCorpusWatermarkOptions = {},\n): Promise<{ watermarks: CorpusWatermark[]; complete: boolean }> {\n let roots: CorpusNamespaceRoot[] | undefined;\n if (options.cache) {\n const { roots: cachedRoots, refreshError } = options.cache.getResolvedRootsStatus(() =>\n resolveCorpusNamespaceRoots({ config: host.config, propagateDiscoveryErrors: true }),\n );\n if (refreshError !== undefined) return { watermarks: [], complete: false };\n roots = cachedRoots;\n } else {\n try {\n roots = await resolveCorpusNamespaceRoots({\n config: host.config,\n propagateDiscoveryErrors: true,\n });\n } catch {\n return { watermarks: [], complete: false }; // never enumerated — not an empty corpus\n }\n }\n // Enumeration still warming (cold): served on a later probe, and NOT complete.\n if (!roots) return { watermarks: [], complete: false };\n const visible = roots.filter((root) => root.namespaces.some((ns) => capabilityAllowsNamespace(options.caps, ns)));\n const watermarks: CorpusWatermark[] = [];\n let complete = true;\n for (const { namespace } of visible) {\n const compute = async (): Promise<CorpusWatermark> =>\n computeNamespaceWatermark(namespace, await host.getStorage(namespace), options.now);\n if (options.cache) {\n const cached = options.cache.get(namespace, compute);\n if (cached) watermarks.push(cached);\n else complete = false; // still warming — the set is not the full census yet\n } else {\n try {\n watermarks.push(await compute());\n } catch {\n // One tenant's storage/scan failed — omit just that namespace.\n complete = false;\n }\n }\n }\n return { watermarks, complete };\n}\n\n\n"],"mappings":";;;;;;;;;;;AAsCA,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AACjB,SAAS,gBAAgB,wBAAwB;AAyB1C,IAAM,uBAAuB;AAMpC,IAAM,qBAAqB;AAE3B,IAAM,mBAAmB;AAEzB,IAAM,gBAAgB;AAStB,SAAS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AAI,QAAQ,MAAM;AAAA,MAAuB,MAChF,4BAA4B,EAAE,QAAQ,KAAK,QAAQ,0BAA0B,KAAK,CAAC;AAAA,IACrF;AACA,QAAI,iBAAiB,OAAW,QAAO,EAAE,YAAY,CAAC,GAAG,UAAU,MAAM;AACzE,YAAQ;AAAA,EACV,OAAO;AACL,QAAI;AACF,cAAQ,MAAM,4BAA4B;AAAA,QACxC,QAAQ,KAAK;AAAA,QACb,0BAA0B;AAAA,MAC5B,CAAC;AAAA,IACH,QAAQ;AACN,aAAO,EAAE,YAAY,CAAC,GAAG,UAAU,MAAM;AAAA,IAC3C;AAAA,EACF;AAEA,MAAI,CAAC,MAAO,QAAO,EAAE,YAAY,CAAC,GAAG,UAAU,MAAM;AACrD,QAAM,UAAU,MAAM,OAAO,CAAC,SAAS,KAAK,WAAW,KAAK,CAAC,OAAO,0BAA0B,QAAQ,MAAM,EAAE,CAAC,CAAC;AAChH,QAAM,aAAgC,CAAC;AACvC,MAAI,WAAW;AACf,aAAW,EAAE,UAAU,KAAK,SAAS;AACnC,UAAM,UAAU,YACd,0BAA0B,WAAW,MAAM,KAAK,WAAW,SAAS,GAAG,QAAQ,GAAG;AACpF,QAAI,QAAQ,OAAO;AACjB,YAAM,SAAS,QAAQ,MAAM,IAAI,WAAW,OAAO;AACnD,UAAI,OAAQ,YAAW,KAAK,MAAM;AAAA,UAC7B,YAAW;AAAA,IAClB,OAAO;AACL,UAAI;AACF,mBAAW,KAAK,MAAM,QAAQ,CAAC;AAAA,MACjC,QAAQ;AAEN,mBAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACA,SAAO,EAAE,YAAY,SAAS;AAChC;","names":[]}
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-5JMAGU26.js";
6
6
  import {
7
7
  runPostConsolidationMaterialize
8
- } from "./chunk-OL7A7NKH.js";
8
+ } from "./chunk-74Z2BYEK.js";
9
9
  import {
10
10
  isSemanticConsolidationLlmOperator
11
11
  } from "./chunk-G7D6GZ5J.js";
@@ -220,4 +220,4 @@ export {
220
220
  buildExtensionsBlockForConsolidation,
221
221
  materializeAfterSemanticConsolidation
222
222
  };
223
- //# sourceMappingURL=chunk-6BO27AWQ.js.map
223
+ //# sourceMappingURL=chunk-2HVCTFKG.js.map
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  ActivityStore,
15
15
  MaintenanceScheduler
16
- } from "./chunk-IEW6NDHX.js";
16
+ } from "./chunk-ZXEPLZUQ.js";
17
17
  import {
18
18
  runPeerProfileReasoner
19
19
  } from "./chunk-I74SUMNI.js";
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-VZAKYDMJ.js";
23
23
  import {
24
24
  LcmEngine
25
- } from "./chunk-VKQI47DJ.js";
25
+ } from "./chunk-Y7427SL7.js";
26
26
  import {
27
27
  chunkTranscriptEntries
28
28
  } from "./chunk-TECVW3JP.js";
@@ -32,18 +32,24 @@ import {
32
32
  import {
33
33
  CompoundingEngine,
34
34
  defaultTierMigrationCycleBudget
35
- } from "./chunk-4G2A7MH3.js";
35
+ } from "./chunk-M7KAJBO2.js";
36
36
  import {
37
37
  SharedContextManager
38
38
  } from "./chunk-5KBIOI4G.js";
39
+ import {
40
+ cleanArchivedUserMessage
41
+ } from "./chunk-47DU4SGJ.js";
39
42
  import {
40
43
  applyUtilityPromotionRuntimePolicy,
41
44
  applyUtilityRankingRuntimeDelta,
42
45
  loadUtilityRuntimeValues
43
46
  } from "./chunk-3Q3XD3NO.js";
44
47
  import {
45
- cleanArchivedUserMessage
46
- } from "./chunk-47DU4SGJ.js";
48
+ extractTopics
49
+ } from "./chunk-KVDUKH5E.js";
50
+ import {
51
+ CODEX_THREAD_KEY_PREFIX
52
+ } from "./chunk-4EX5WZ4M.js";
47
53
  import {
48
54
  TierMigrationExecutor
49
55
  } from "./chunk-YRFAYOFQ.js";
@@ -53,19 +59,13 @@ import {
53
59
  import {
54
60
  TmtBuilder
55
61
  } from "./chunk-ECZU5BJH.js";
56
- import {
57
- extractTopics
58
- } from "./chunk-KVDUKH5E.js";
59
- import {
60
- buildTemporalTimelineRecallSection
61
- } from "./chunk-VHF73MGU.js";
62
- import {
63
- CODEX_THREAD_KEY_PREFIX
64
- } from "./chunk-4EX5WZ4M.js";
65
62
  import {
66
63
  buildTargetedFactRecallSection,
67
64
  shouldRecallTargetedFactEvidence
68
65
  } from "./chunk-T67LUYCR.js";
66
+ import {
67
+ buildTemporalTimelineRecallSection
68
+ } from "./chunk-VHF73MGU.js";
69
69
  import {
70
70
  memoriesToStandingEntries,
71
71
  prefixStandingMemoryBlock,
@@ -74,6 +74,14 @@ import {
74
74
  import {
75
75
  SessionObserverState
76
76
  } from "./chunk-ODZKV2F7.js";
77
+ import {
78
+ applyRuntimeRetrievalPolicy
79
+ } from "./chunk-5IZL4DCV.js";
80
+ import {
81
+ RerankCache,
82
+ reorderByRankedKeys,
83
+ rerankLocalOrNoop
84
+ } from "./chunk-LUDXM7MD.js";
77
85
  import {
78
86
  buildResponseGuidanceRecallSection,
79
87
  shouldRecallResponseGuidance
@@ -99,32 +107,24 @@ import {
99
107
  recencyWindowFromPrompt,
100
108
  resolvePromptTagPrefilterAsync
101
109
  } from "./chunk-ZOKZIR5K.js";
102
- import {
103
- applyRuntimeRetrievalPolicy
104
- } from "./chunk-5IZL4DCV.js";
105
110
  import {
106
111
  findUnresolvedEntityRefs
107
112
  } from "./chunk-X7XN6YU4.js";
108
113
  import {
109
114
  RelevanceStore
110
115
  } from "./chunk-X7J56GPG.js";
111
- import {
112
- RerankCache,
113
- reorderByRankedKeys,
114
- rerankLocalOrNoop
115
- } from "./chunk-LUDXM7MD.js";
116
- import {
117
- StateViewAnchorTracker,
118
- filterRecentScanMemories,
119
- stateViewPacketActive
120
- } from "./chunk-G2DF5MI7.js";
121
116
  import {
122
117
  indexStateViewAnnotatedResults,
123
118
  resolveRecallStateViewActive
124
- } from "./chunk-RG3I2663.js";
119
+ } from "./chunk-64JLBFCQ.js";
125
120
  import {
126
121
  applyRecallStateViews
127
122
  } from "./chunk-DBB5JPSL.js";
123
+ import {
124
+ StateViewAnchorTracker,
125
+ filterRecentScanMemories,
126
+ stateViewPacketActive
127
+ } from "./chunk-G2DF5MI7.js";
128
128
  import {
129
129
  reorderRecallResultsWithMmr
130
130
  } from "./chunk-IIK2PD3F.js";
@@ -154,6 +154,12 @@ import {
154
154
  import {
155
155
  runLiveConnectorsOnce
156
156
  } from "./chunk-APYY5CX3.js";
157
+ import {
158
+ classifyMemoryKind
159
+ } from "./chunk-YAZNBMNF.js";
160
+ import {
161
+ scoreEvidencePathDetail
162
+ } from "./chunk-XXSOVESA.js";
157
163
  import {
158
164
  deriveHarmonicRecords,
159
165
  harmonicEntityReferenceMatches,
@@ -162,27 +168,21 @@ import {
162
168
  persistHarmonicRecords
163
169
  } from "./chunk-LQ5SS4OP.js";
164
170
  import {
165
- classifyMemoryKind
166
- } from "./chunk-YAZNBMNF.js";
167
- import {
168
- scoreEvidencePathDetail
169
- } from "./chunk-XXSOVESA.js";
171
+ chunkExtractionWindow,
172
+ classifyDrainResult,
173
+ extractionWindowBudgetChars,
174
+ mergeDrainResults
175
+ } from "./chunk-VA3GNAWQ.js";
170
176
  import {
171
177
  ExtractionEngine
172
- } from "./chunk-RTJJPW3C.js";
173
- import {
174
- buildFocusedListRecallSection,
175
- shouldRecallFocusedListEvidence
176
- } from "./chunk-OH7QLI6W.js";
178
+ } from "./chunk-ILMB3X4X.js";
177
179
  import {
178
180
  parseMemoryActionEligibilityContext
179
181
  } from "./chunk-JHU4EYDV.js";
180
182
  import {
181
- chunkExtractionWindow,
182
- classifyDrainResult,
183
- extractionWindowBudgetChars,
184
- mergeDrainResults
185
- } from "./chunk-VA3GNAWQ.js";
183
+ buildFocusedListRecallSection,
184
+ shouldRecallFocusedListEvidence
185
+ } from "./chunk-OH7QLI6W.js";
186
186
  import {
187
187
  recordJudgeTrainingPair
188
188
  } from "./chunk-PWFCHOB3.js";
@@ -193,6 +193,12 @@ import {
193
193
  judgeFactDurability,
194
194
  validateProcedureExtraction
195
195
  } from "./chunk-TJ5YGCPV.js";
196
+ import {
197
+ buildEventOrderRecallSection
198
+ } from "./chunk-645WOU5I.js";
199
+ import {
200
+ shouldRecallEventOrderEvidence
201
+ } from "./chunk-BUYVPUEM.js";
196
202
  import {
197
203
  pickFactEventTimeAnchor,
198
204
  resolveFactEventTime
@@ -200,32 +206,26 @@ import {
200
206
  import {
201
207
  buildExplicitCueRecallSection
202
208
  } from "./chunk-TVIVY7KU.js";
203
- import {
204
- planEpisodeWindowsWithFallback
205
- } from "./chunk-T3GIETKV.js";
206
- import {
207
- buildEventOrderRecallSection
208
- } from "./chunk-52II7PB6.js";
209
- import {
210
- shouldRecallEventOrderEvidence
211
- } from "./chunk-BUYVPUEM.js";
212
209
  import {
213
210
  buildEntityRecallSection,
214
211
  entityRecentTranscriptLookbackHours,
215
212
  readRecentEntityTranscriptEntries
216
- } from "./chunk-NGH74LDV.js";
213
+ } from "./chunk-UP2Q7U4G.js";
217
214
  import {
218
- EmbeddingFallback
219
- } from "./chunk-GFAEKSFR.js";
215
+ planEpisodeWindowsWithFallback
216
+ } from "./chunk-T3GIETKV.js";
220
217
  import {
221
218
  tryDirectAnswer
222
219
  } from "./chunk-5IIQU4JZ.js";
220
+ import {
221
+ EmbeddingFallback
222
+ } from "./chunk-QBK3IM6W.js";
223
223
  import {
224
224
  formatDaySummaryMemories
225
225
  } from "./chunk-7G5NTS7F.js";
226
226
  import {
227
227
  refreshConvergedNamespaces
228
- } from "./chunk-RYB553SS.js";
228
+ } from "./chunk-NJZY5LOC.js";
229
229
  import {
230
230
  builtInConnectorPackageSpecifier,
231
231
  ensureBuiltInWearableConnectors,
@@ -234,24 +234,24 @@ import {
234
234
  runTimelinePublishCli,
235
235
  screenCandidateFact,
236
236
  summarizeVaultPublish
237
- } from "./chunk-QY24FSXT.js";
238
- import {
239
- RoutingRulesStore
240
- } from "./chunk-TBUEE7XF.js";
237
+ } from "./chunk-PTJWUN4H.js";
241
238
  import {
242
239
  normalizeReplaySessionKey
243
240
  } from "./chunk-AJVLDJU6.js";
241
+ import {
242
+ RoutingRulesStore
243
+ } from "./chunk-TBUEE7XF.js";
244
244
  import {
245
245
  compareVerifiedEpisodeResults,
246
246
  searchVerifiedEpisodes
247
- } from "./chunk-FB4JQEFS.js";
247
+ } from "./chunk-66CC6L6R.js";
248
248
  import {
249
249
  ThreadingManager
250
250
  } from "./chunk-R7WYAXPO.js";
251
251
  import {
252
252
  compareVerifiedSemanticRuleResults,
253
253
  searchVerifiedSemanticRules
254
- } from "./chunk-VCLNU6MY.js";
254
+ } from "./chunk-QWURVT5Z.js";
255
255
  import {
256
256
  searchWorkProductLedgerEntries
257
257
  } from "./chunk-B2NXOVZN.js";
@@ -264,10 +264,10 @@ import {
264
264
  import {
265
265
  runNamespaceMaintenanceFanout,
266
266
  summarizeNamespaceMaintenanceHealth
267
- } from "./chunk-FXWX7VD3.js";
267
+ } from "./chunk-HL643H2F.js";
268
268
  import {
269
269
  planNamespaceMaintenance
270
- } from "./chunk-EJFOGYF3.js";
270
+ } from "./chunk-AWKADEMO.js";
271
271
  import {
272
272
  isAboveImportanceThreshold,
273
273
  scoreImportance
@@ -296,10 +296,10 @@ import {
296
296
  materializeAfterSemanticConsolidation,
297
297
  parseConsolidationResponse,
298
298
  parseOperatorAwareConsolidationResponse
299
- } from "./chunk-6BO27AWQ.js";
299
+ } from "./chunk-2HVCTFKG.js";
300
300
  import {
301
301
  SmartBuffer
302
- } from "./chunk-YJHOVA42.js";
302
+ } from "./chunk-L5RMURVI.js";
303
303
  import {
304
304
  semanticChunkContent
305
305
  } from "./chunk-2GBFKHBZ.js";
@@ -335,7 +335,7 @@ import {
335
335
  embeddingsFromCosineHits,
336
336
  normalizeConnectorScope,
337
337
  runSeedGraduationPass
338
- } from "./chunk-Y77FXULH.js";
338
+ } from "./chunk-XWXBXBOX.js";
339
339
  import {
340
340
  compileCorrectionRule,
341
341
  correctionsFilePath,
@@ -373,7 +373,7 @@ import {
373
373
  } from "./chunk-QW27DOHG.js";
374
374
  import {
375
375
  MeetingsInputError
376
- } from "./chunk-KMJDH4KX.js";
376
+ } from "./chunk-RSYFSCKL.js";
377
377
  import {
378
378
  WearablesInputError,
379
379
  describeErrorForOperator
@@ -388,10 +388,10 @@ import {
388
388
  import {
389
389
  removeNodeEdgesForRewrite,
390
390
  rollbackNodeEdgeRewrite
391
- } from "./chunk-AAANTXCQ.js";
391
+ } from "./chunk-FZVZYU5C.js";
392
392
  import {
393
393
  NamespaceCatalog
394
- } from "./chunk-ZE5N4JSY.js";
394
+ } from "./chunk-ZRDEOC4X.js";
395
395
  import {
396
396
  RecallResultFormatter,
397
397
  SessionContextCoordinator,
@@ -400,7 +400,7 @@ import {
400
400
  detectPassiveCorrections,
401
401
  renderSessionExperiencePreview,
402
402
  scoreSessionExperienceForPrompt
403
- } from "./chunk-Y5KESB7T.js";
403
+ } from "./chunk-C5GTIRIO.js";
404
404
  import {
405
405
  importCapsule
406
406
  } from "./chunk-A3UFV4K3.js";
@@ -440,10 +440,10 @@ import {
440
440
  isTopLevelArchivePath,
441
441
  journalPath,
442
442
  writeJournalFile
443
- } from "./chunk-VV73XT3A.js";
443
+ } from "./chunk-BJLCV2P3.js";
444
444
  import {
445
445
  searchHarmonicRetrieval
446
- } from "./chunk-LLG5VNK7.js";
446
+ } from "./chunk-DF4SYU4Z.js";
447
447
  import {
448
448
  ProfilingCollector
449
449
  } from "./chunk-DOWACHYO.js";
@@ -464,15 +464,15 @@ import {
464
464
  renderAuthorityBoundContent,
465
465
  selectCuriosityQuestion
466
466
  } from "./chunk-NVKO5YKP.js";
467
+ import {
468
+ NamespaceStorageRouter
469
+ } from "./chunk-M3GOWG2P.js";
467
470
  import {
468
471
  pruneOrphanCueAnchors
469
472
  } from "./chunk-LXATZLSC.js";
470
- import {
471
- NamespaceStorageRouter
472
- } from "./chunk-AMKIIRLL.js";
473
473
  import {
474
474
  GraphIndex
475
- } from "./chunk-KRAMCBIW.js";
475
+ } from "./chunk-QKXPOLQD.js";
476
476
  import {
477
477
  GraphEdgeAppendError
478
478
  } from "./chunk-GKCXTSFF.js";
@@ -480,7 +480,7 @@ import {
480
480
  ExtractionDeadlineError,
481
481
  ExtractionRunCoordinator,
482
482
  classifyExtractionOrigin
483
- } from "./chunk-XDKEHZUC.js";
483
+ } from "./chunk-264B57GV.js";
484
484
  import {
485
485
  ARTIFACT_STATUS_CACHE_TTL_MS,
486
486
  BulkImportBatchPartialFailureError,
@@ -520,7 +520,7 @@ import {
520
520
  throwIfRecallAborted,
521
521
  tokenizeRecallQuery,
522
522
  utcDateKeysForLocalDay
523
- } from "./chunk-YDT3OEYF.js";
523
+ } from "./chunk-R4ZHF4K2.js";
524
524
  import {
525
525
  inferIntentFromText,
526
526
  intentCompatibilityScore,
@@ -537,7 +537,7 @@ import {
537
537
  } from "./chunk-74AY3S7U.js";
538
538
  import {
539
539
  buildChainFollowupGenerator
540
- } from "./chunk-RHJ5VGB3.js";
540
+ } from "./chunk-W37MS6SX.js";
541
541
  import {
542
542
  decideLifecycleTransition,
543
543
  resolveLifecycleState
@@ -562,7 +562,7 @@ import {
562
562
  } from "./chunk-QDW3E4RD.js";
563
563
  import {
564
564
  searchCausalTrajectories
565
- } from "./chunk-NRGQ5HJO.js";
565
+ } from "./chunk-4P4VLPGB.js";
566
566
  import {
567
567
  QmdResultResolver,
568
568
  StorageManager,
@@ -582,7 +582,7 @@ import {
582
582
  reconstructFusionInputs,
583
583
  selfDeps,
584
584
  serializeFusionDay
585
- } from "./chunk-WXBVGKS6.js";
585
+ } from "./chunk-I6UTOUBK.js";
586
586
  import {
587
587
  bodyIsEscaped,
588
588
  decodeTranscriptBody,
@@ -599,12 +599,12 @@ import {
599
599
  import {
600
600
  NamespaceSearchRouter,
601
601
  namespaceCollectionName
602
- } from "./chunk-JEX2JL3U.js";
602
+ } from "./chunk-JEDS2QYV.js";
603
603
  import {
604
604
  createConversationIndexRuntime,
605
605
  createSearchBackend,
606
606
  isSearchBackendEnabled
607
- } from "./chunk-U2A56LLF.js";
607
+ } from "./chunk-VQ6H4DL6.js";
608
608
  import {
609
609
  NoopSearchBackend
610
610
  } from "./chunk-CYEPCZN5.js";
@@ -790,7 +790,7 @@ import {
790
790
  } from "./chunk-JAKIDQB2.js";
791
791
  import {
792
792
  storageBackedIndexStoreIo
793
- } from "./chunk-6AEKSOWV.js";
793
+ } from "./chunk-6I6DFULH.js";
794
794
  import {
795
795
  assertIsDirectoryNotSymlink,
796
796
  assertRealpathInsideRoot
@@ -31617,4 +31617,4 @@ export {
31617
31617
  qmdStartupCollectionChecksWithTimeout,
31618
31618
  Orchestrator
31619
31619
  };
31620
- //# sourceMappingURL=chunk-3E3Z6UA3.js.map
31620
+ //# sourceMappingURL=chunk-3DG2YAAX.js.map