@delali/narsil 0.3.1-next.154 → 0.3.1-next.156

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 (329) hide show
  1. package/NOTICE +45 -0
  2. package/README.md +1 -0
  3. package/dist/adapters/filesystem.mjs +2 -2
  4. package/dist/adapters/gcs.mjs +2 -2
  5. package/dist/adapters/indexeddb.mjs +1 -1
  6. package/dist/adapters/s3.mjs +2 -2
  7. package/dist/{analysis-change-4GCRVRBW.mjs → analysis-change-5BQOQ4BF.mjs} +35 -28
  8. package/dist/{react-native/chunks/analysis-change-entry-TNLUC6IZ.mjs → analysis-change-entry-TXX6JSMX.mjs} +1 -1
  9. package/dist/archive-history-E4R73RWD.mjs +29 -0
  10. package/dist/browser/{analysis-change-IXWPXXJJ.mjs → analysis-change-435CUEPZ.mjs} +32 -12
  11. package/dist/{analysis-change-entry-KYGSXW4K.mjs → browser/analysis-change-entry-HZXKPPGV.mjs} +1 -1
  12. package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
  13. package/dist/browser/{chunk-4PD752F6.mjs → chunk-23XRXIBW.mjs} +1 -1
  14. package/dist/browser/{chunk-J433A7P3.mjs → chunk-2CFI5VVV.mjs} +5 -5
  15. package/dist/{react-native/chunks/chunk-3XKMRNRE.mjs → browser/chunk-2TI4SSUP.mjs} +27 -10
  16. package/dist/browser/chunk-3SSRJMFN.mjs +100 -0
  17. package/dist/browser/{chunk-2SHAKW2Z.mjs → chunk-3V7DNNZL.mjs} +515 -733
  18. package/dist/browser/{chunk-C4KS2QNF.mjs → chunk-4NGKC4H4.mjs} +9 -9
  19. package/dist/browser/{chunk-XRV72TJD.mjs → chunk-6LWDPLTB.mjs} +2 -2
  20. package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
  21. package/dist/browser/{chunk-VCOYGVP7.mjs → chunk-7U3WVJUP.mjs} +3 -3
  22. package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
  23. package/dist/browser/chunk-BHFQATSC.mjs +432 -0
  24. package/dist/browser/chunk-CRE3G7F3.mjs +1007 -0
  25. package/dist/browser/{chunk-QXTPSX2H.mjs → chunk-EA63E3D2.mjs} +7 -7
  26. package/dist/{react-native/chunks/chunk-DCKMICOB.mjs → browser/chunk-EXQZGUQH.mjs} +1 -1
  27. package/dist/browser/{chunk-ML6HY7T7.mjs → chunk-G64Q6OJF.mjs} +1 -1
  28. package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
  29. package/dist/browser/{chunk-EUNBNLKM.mjs → chunk-IZXVW2ZJ.mjs} +5 -5
  30. package/dist/browser/{chunk-G7LUMBSG.mjs → chunk-K4Q6KX3R.mjs} +30 -20
  31. package/dist/browser/{chunk-H6QFBMVE.mjs → chunk-KZWSX6BH.mjs} +3 -3
  32. package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
  33. package/dist/browser/chunk-MGI4BCXC.mjs +63 -0
  34. package/dist/browser/chunk-MOG4OVDK.mjs +51 -0
  35. package/dist/browser/{chunk-W5X2UFWQ.mjs → chunk-NLWTBAGB.mjs} +12 -3
  36. package/dist/browser/{chunk-AYY6PIKL.mjs → chunk-NQAME3RK.mjs} +2 -2
  37. package/dist/browser/{chunk-7MEYN7V6.mjs → chunk-NXQG7DRA.mjs} +29 -14
  38. package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
  39. package/dist/{chunk-KUZKUONM.mjs → browser/chunk-SRMZXJSL.mjs} +1 -0
  40. package/dist/browser/chunk-SSTPBZZX.mjs +1106 -0
  41. package/dist/browser/{chunk-7TTWXUH6.mjs → chunk-STOWQFT3.mjs} +3 -2
  42. package/dist/browser/{chunk-26A5JFT2.mjs → chunk-TK63WFXK.mjs} +2 -1
  43. package/dist/browser/{chunk-SJB6VIZG.mjs → chunk-U3JOQGWX.mjs} +1 -1
  44. package/dist/browser/{chunk-AJ4HHOVT.mjs → chunk-U4YDIBUT.mjs} +4 -4
  45. package/dist/browser/{chunk-2FX6ROWR.mjs → chunk-VLJQW4J6.mjs} +2986 -2986
  46. package/dist/{react-native/chunks/chunk-3O57C2ZO.mjs → browser/chunk-WI4MR75E.mjs} +2 -2
  47. package/dist/browser/{chunk-3U3QR5YP.mjs → chunk-WN464PTL.mjs} +2 -2
  48. package/dist/browser/{chunk-U2E3HMYW.mjs → chunk-XAWNZ4G2.mjs} +11 -11
  49. package/dist/browser/{cold-module-VTUGDYNY.mjs → cold-module-2EHCIV4K.mjs} +20 -18
  50. package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
  51. package/dist/browser/{durability-wiring-GL4A7KDV.mjs → durability-wiring-A7BVG2DW.mjs} +50 -153
  52. package/dist/browser/engine-hooks-E4UD67JD.mjs +17 -0
  53. package/dist/browser/geo-index-HHWGMNIS.mjs +1386 -0
  54. package/dist/browser/import-DXYB6756.mjs +19 -0
  55. package/dist/browser/{methods-LMUTS7OI.mjs → methods-KTQCSIN4.mjs} +3 -3
  56. package/dist/browser/{module-M4JNBV6V.mjs → module-NIYMEA5R.mjs} +16 -14
  57. package/dist/browser/{module-EC3FYW7N.mjs → module-TCT66FWA.mjs} +10 -9
  58. package/dist/browser/operations-OJ3BXS55.mjs +5 -0
  59. package/dist/browser/{phrase-module-NPYUVX75.mjs → phrase-module-HAT3TLZN.mjs} +2 -2
  60. package/dist/browser/{pool-WCGDZHJP.mjs → pool-3JLET5RO.mjs} +1 -1
  61. package/dist/browser/restore-hooks-YPN4ZFCY.mjs +114 -0
  62. package/dist/browser/restore-queue-G3RQGL3Y.mjs +55 -0
  63. package/dist/browser/{retention-6QMRS5VK.mjs → retention-ZWVMNC3Q.mjs} +18 -15
  64. package/dist/browser/{runtime-3EW2AGB6.mjs → runtime-OTAGEFQW.mjs} +1 -1
  65. package/dist/browser/{snapshot-DN3CRVUQ.mjs → snapshot-VEQNIE6C.mjs} +71 -36
  66. package/dist/browser/start-BM442C6R.mjs +25 -0
  67. package/dist/browser/{write-WAWAFGKQ.mjs → write-2EVMZWDE.mjs} +16 -14
  68. package/dist/{capabilities-B3Brs1Rc.d.ts → capabilities-Da4ywVVl.d.ts} +35 -3
  69. package/dist/{chunk-K4B7OH65.mjs → chunk-25KDNIZZ.mjs} +2 -2
  70. package/dist/{chunk-O43Z4MS6.mjs → chunk-2NE7VCYE.mjs} +2 -2
  71. package/dist/chunk-2UV4QBHW.mjs +1092 -0
  72. package/dist/{chunk-3Y3J4V2R.mjs → chunk-3C7MTCCI.mjs} +1 -1
  73. package/dist/{chunk-TRISKD4Q.mjs → chunk-3HYC4JRF.mjs} +2 -2
  74. package/dist/{chunk-HVYICDY3.mjs → chunk-3OH67G7R.mjs} +1 -1
  75. package/dist/{chunk-PFKM7VNZ.mjs → chunk-46KY2PJD.mjs} +30 -11
  76. package/dist/{chunk-IJU7LL7D.mjs → chunk-4KKXNJM6.mjs} +5 -5
  77. package/dist/{chunk-IQ4R2I6N.mjs → chunk-5FLRXF73.mjs} +5 -1
  78. package/dist/{chunk-BPSKLCS7.mjs → chunk-5VV4R6P7.mjs} +3017 -3017
  79. package/dist/chunk-5YNRKI2C.mjs +81 -0
  80. package/dist/chunk-6HTGOXIK.mjs +875 -0
  81. package/dist/{chunk-7HCZWC7B.mjs → chunk-6I6AYAXS.mjs} +50 -8
  82. package/dist/{chunk-C6ASEFZI.mjs → chunk-6OEGXLBX.mjs} +1 -1
  83. package/dist/{chunk-DVWYODEB.mjs → chunk-6RC4K46J.mjs} +2 -2
  84. package/dist/chunk-7GFE3PEY.mjs +40 -0
  85. package/dist/{chunk-QKZHLADX.mjs → chunk-7LXHHCXZ.mjs} +28 -19
  86. package/dist/{chunk-JUKYYXSP.mjs → chunk-7V5IUP2T.mjs} +1 -31
  87. package/dist/{react-native/chunks/chunk-7GWPJDOA.mjs → chunk-A4L7YTKX.mjs} +53 -90
  88. package/dist/{chunk-Z3TNWCI5.mjs → chunk-BU4SAIC4.mjs} +3 -3
  89. package/dist/chunk-BWZ3P4MU.mjs +20 -0
  90. package/dist/{chunk-OKX2BBNW.mjs → chunk-CITFCZKF.mjs} +5 -4
  91. package/dist/{chunk-4HWZV5MK.mjs → chunk-CSLGFPFQ.mjs} +5 -5
  92. package/dist/chunk-DP5C7YFQ.mjs +543 -0
  93. package/dist/{chunk-RVKFI3A2.mjs → chunk-DWEPMFJE.mjs} +11 -8
  94. package/dist/{chunk-LSM2YTKM.mjs → chunk-EFBDHH5P.mjs} +87 -144
  95. package/dist/{chunk-NZMAXR2S.mjs → chunk-FAKFUDZZ.mjs} +121 -11
  96. package/dist/chunk-FB6463IN.mjs +1499 -0
  97. package/dist/{chunk-REL7LFLR.mjs → chunk-FCJ553HS.mjs} +3 -3
  98. package/dist/{chunk-MMEMEUOO.mjs → chunk-FJKKCV4D.mjs} +2 -2
  99. package/dist/{chunk-K7KLL263.mjs → chunk-FNGAM5B7.mjs} +14 -13
  100. package/dist/{chunk-DMQPFLGI.mjs → chunk-FRBFVQFN.mjs} +6 -5
  101. package/dist/{chunk-IBNLW3AV.mjs → chunk-FYOVBEMM.mjs} +20 -6
  102. package/dist/chunk-G6HRSGOU.mjs +74 -0
  103. package/dist/{chunk-USR7FQRZ.mjs → chunk-GH4WQ22V.mjs} +2 -2
  104. package/dist/chunk-GQPTDQCL.mjs +54 -0
  105. package/dist/{chunk-VREK3MYG.mjs → chunk-HFPMMRQT.mjs} +3 -3
  106. package/dist/{chunk-MLHNSAPK.mjs → chunk-HHBUCIUY.mjs} +3 -3
  107. package/dist/{chunk-YROWNOMH.mjs → chunk-HJJI72X7.mjs} +1 -1
  108. package/dist/{chunk-ECX4SGX6.mjs → chunk-I2KPOLOZ.mjs} +9 -9
  109. package/dist/{chunk-TV2L3BN7.mjs → chunk-I53G4JAU.mjs} +266 -265
  110. package/dist/{chunk-3A5KI24C.mjs → chunk-I54T6CQP.mjs} +1 -1
  111. package/dist/{chunk-NTZOXVUZ.mjs → chunk-I5B7RXU7.mjs} +93 -24
  112. package/dist/{chunk-YBJDOA2T.mjs → chunk-INJYO3BU.mjs} +1 -1
  113. package/dist/{react-native/chunks/chunk-KWRW5U65.mjs → chunk-J4IJTTEX.mjs} +1 -1
  114. package/dist/{chunk-X6NSJYQ3.mjs → chunk-JDJBQLRO.mjs} +13 -13
  115. package/dist/{chunk-MMBEANB2.mjs → chunk-JWRUUCWD.mjs} +3 -3
  116. package/dist/{chunk-AO2FAYIZ.mjs → chunk-K4ZIGL2O.mjs} +1 -1
  117. package/dist/{chunk-JFNKIBDT.mjs → chunk-K5QFDYST.mjs} +2 -2
  118. package/dist/{chunk-C73JLU4E.mjs → chunk-KF4EXSM4.mjs} +2 -2
  119. package/dist/{chunk-WCBA2LVZ.mjs → chunk-KHKIRS5D.mjs} +1 -1
  120. package/dist/{chunk-7QUGDVFC.mjs → chunk-KJ3RTZDJ.mjs} +1 -1
  121. package/dist/{chunk-HVKXNBFL.mjs → chunk-KKQC526K.mjs} +20 -12
  122. package/dist/chunk-KP7TYHWT.mjs +92 -0
  123. package/dist/{chunk-VMXSVVXG.mjs → chunk-L6V6BST3.mjs} +9 -22
  124. package/dist/{chunk-URPCYQVJ.mjs → chunk-LHKOSI2J.mjs} +1 -1
  125. package/dist/chunk-LNGE7SLY.mjs +151 -0
  126. package/dist/{react-native/chunks/chunk-CUNGPR5R.mjs → chunk-MP7ABPTD.mjs} +1 -0
  127. package/dist/{chunk-5KGYQT6W.mjs → chunk-MQOJIO5B.mjs} +26 -9
  128. package/dist/{chunk-Q3TCTQCC.mjs → chunk-NF4DT3IH.mjs} +1 -1
  129. package/dist/{chunk-3OFU3NJT.mjs → chunk-OIJ64LGT.mjs} +1 -1
  130. package/dist/chunk-ORN5BLL7.mjs +11 -0
  131. package/dist/{chunk-HWEDFLB7.mjs → chunk-P5ZI2P2W.mjs} +126 -1701
  132. package/dist/{chunk-466PYR4P.mjs → chunk-PWC4VB3Q.mjs} +2 -2
  133. package/dist/{chunk-B7S6YEBP.mjs → chunk-QJVOLKU6.mjs} +12 -3
  134. package/dist/{chunk-KCUIFVVW.mjs → chunk-QOW2JPUI.mjs} +9 -9
  135. package/dist/chunk-RDXO6JST.mjs +63 -0
  136. package/dist/chunk-RLOES5SX.mjs +31 -0
  137. package/dist/{chunk-YPUEV6ZC.mjs → chunk-RVGRFOGN.mjs} +1 -1
  138. package/dist/{chunk-JCLTESFN.mjs → chunk-RZWWB2XR.mjs} +1 -1
  139. package/dist/chunk-S5LN746F.mjs +10 -0
  140. package/dist/chunk-SA5LOGO3.mjs +470 -0
  141. package/dist/chunk-SQJWAIF4.mjs +12 -0
  142. package/dist/{chunk-YTJCGKM4.mjs → chunk-TBC3XUL2.mjs} +29 -6
  143. package/dist/chunk-TDIK6NTV.mjs +10 -0
  144. package/dist/chunk-TGS5UXBE.mjs +216 -0
  145. package/dist/{chunk-CP5RRPJR.mjs → chunk-TQXHPFWT.mjs} +1 -1
  146. package/dist/{chunk-7NTMUDC5.mjs → chunk-TZ3355VS.mjs} +5 -5
  147. package/dist/{chunk-Q7MS6P2J.mjs → chunk-TZTRKM33.mjs} +2 -2
  148. package/dist/{chunk-4UMZ7KQL.mjs → chunk-U55XJEIG.mjs} +2 -1
  149. package/dist/{chunk-S2N75OTN.mjs → chunk-UHICS3JI.mjs} +1 -1
  150. package/dist/{chunk-5FUOVJKG.mjs → chunk-VTTRFF2C.mjs} +32 -19
  151. package/dist/{chunk-62G63NMH.mjs → chunk-WX4LAO6M.mjs} +4 -4
  152. package/dist/{chunk-LTUGDMV4.mjs → chunk-WZ7YV54N.mjs} +1 -1
  153. package/dist/chunk-XAXKV65G.mjs +72 -0
  154. package/dist/chunk-XXHN7J46.mjs +101 -0
  155. package/dist/{chunk-PGVPE7GJ.mjs → chunk-YEKL4JBK.mjs} +1 -1
  156. package/dist/chunk-YTWZVGCB.mjs +382 -0
  157. package/dist/chunk-Z2KAFCRT.mjs +30 -0
  158. package/dist/{chunk-LKUE5GXS.mjs → chunk-ZKP7G7TV.mjs} +2 -2
  159. package/dist/{client-Df76GNKm.d.ts → client-DRv7UVeY.d.ts} +123 -11
  160. package/dist/client.d.ts +9 -8
  161. package/dist/client.mjs +65 -3
  162. package/dist/{cold-module-YLWMTTZG.mjs → cold-module-6MO2XJF2.mjs} +45 -39
  163. package/dist/{config-B8DP2VwR.d.ts → config-CoSig5Ox.d.ts} +22 -3
  164. package/dist/{config-05G_hy-1.d.ts → config-DMwffLKn.d.ts} +20 -5
  165. package/dist/direct-executor-FTMYY3TI.mjs +34 -0
  166. package/dist/distribution/coordinator/etcd.d.ts +2 -2
  167. package/dist/distribution/coordinator/etcd.mjs +3 -3
  168. package/dist/distribution/coordinator/in-memory.d.ts +2 -2
  169. package/dist/distribution/coordinator/in-memory.mjs +2 -2
  170. package/dist/distribution/transport/grpc.mjs +4 -4
  171. package/dist/distribution/transport/in-memory.mjs +2 -2
  172. package/dist/distribution/transport/tcp.mjs +3 -3
  173. package/dist/distribution.d.ts +8 -8
  174. package/dist/distribution.mjs +6799 -5939
  175. package/dist/durability-config-GE4U7MCZ.mjs +89 -0
  176. package/dist/{durability-wiring-RHLXDIVF.mjs → durability-wiring-VIF5MOSY.mjs} +82 -179
  177. package/dist/embeddings/openai.mjs +2 -2
  178. package/dist/{sync-uXR7MmM7.d.ts → engine-CFxPYqEk.d.ts} +702 -2
  179. package/dist/engine-hooks-EGUGNZYE.mjs +54 -0
  180. package/dist/geo-index-MRH5JMIR.mjs +1387 -0
  181. package/dist/import-XKDPJQDP.mjs +56 -0
  182. package/dist/{index-nRqDM6uS.d.ts → index-C4AmUnl1.d.ts} +1 -1
  183. package/dist/index.browser.mjs +9 -7
  184. package/dist/index.d.ts +134 -9
  185. package/dist/index.mjs +33 -26
  186. package/dist/index.react-native.mjs +20 -17
  187. package/dist/invalidation/filesystem.mjs +2 -2
  188. package/dist/{long-query-thread-EMYTGSJP.mjs → long-query-thread-YA4IAYSY.mjs} +34 -28
  189. package/dist/{methods-ABM5ELBR.mjs → methods-7IOINERF.mjs} +3 -3
  190. package/dist/{module-MG7JMV2U.mjs → module-FQ4JWNQJ.mjs} +41 -34
  191. package/dist/{module-3OMJZUFT.mjs → module-N55W4Q5C.mjs} +14 -14
  192. package/dist/operations-G5EP6JPX.mjs +5 -0
  193. package/dist/{paged-partition-archive-UOLHOEZJ.mjs → paged-partition-archive-PXW5XAYU.mjs} +48 -38
  194. package/dist/partial-words.mjs +11 -9
  195. package/dist/pattern.mjs +6 -5
  196. package/dist/persistence/durability/checkpoint-worker.d.ts +8 -1
  197. package/dist/persistence/durability/checkpoint-worker.mjs +44 -35
  198. package/dist/{phrase-module-O3MDRQXP.mjs → phrase-module-XW5MKWP5.mjs} +4 -3
  199. package/dist/{pool-CQXYPFLG.mjs → pool-Y4A46T36.mjs} +1 -1
  200. package/dist/query-suggestions/merge-worker.d.ts +55 -0
  201. package/dist/query-suggestions/merge-worker.mjs +88 -0
  202. package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
  203. package/dist/query-suggestions.browser.mjs +247 -0
  204. package/dist/query-suggestions.d.ts +20 -0
  205. package/dist/query-suggestions.mjs +69 -0
  206. package/dist/react-native/chunks/{analysis-change-EAYO3Y6Q.mjs → analysis-change-LT5QBQ3H.mjs} +43 -22
  207. package/dist/{browser/analysis-change-entry-FCSHFQSS.mjs → react-native/chunks/analysis-change-entry-SCVWK6OU.mjs} +1 -1
  208. package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
  209. package/dist/{chunk-ZIFJXCKA.mjs → react-native/chunks/chunk-2PRHILX3.mjs} +54 -20
  210. package/dist/react-native/chunks/{chunk-VQSKZ3EZ.mjs → chunk-3JWDECAZ.mjs} +8 -8
  211. package/dist/{chunk-R6A773WK.mjs → react-native/chunks/chunk-3WI35N75.mjs} +1 -1
  212. package/dist/react-native/chunks/{chunk-75VWIY35.mjs → chunk-4DII3ZSM.mjs} +1 -1
  213. package/dist/react-native/chunks/{chunk-NKIZX26F.mjs → chunk-4J74WHQM.mjs} +2 -2
  214. package/dist/react-native/chunks/{chunk-UWDNZDWK.mjs → chunk-4JYO3JD2.mjs} +6 -6
  215. package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
  216. package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
  217. package/dist/react-native/chunks/{chunk-SJWDBRNP.mjs → chunk-6WA3C3DV.mjs} +1 -1
  218. package/dist/react-native/chunks/{chunk-OQQVRWZ2.mjs → chunk-C5G6TJ7A.mjs} +1 -1
  219. package/dist/react-native/chunks/{chunk-RVAEBN74.mjs → chunk-CKNRFDTZ.mjs} +1 -1
  220. package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
  221. package/dist/react-native/chunks/{chunk-O32RB3BL.mjs → chunk-DNXOMPAQ.mjs} +4 -4
  222. package/dist/react-native/chunks/{chunk-YBEW6YTR.mjs → chunk-DVDX4SDR.mjs} +2 -2
  223. package/dist/react-native/chunks/chunk-DXRSEWA2.mjs +12 -0
  224. package/dist/{browser/chunk-MYITLCHT.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +1 -0
  225. package/dist/react-native/chunks/{chunk-PPEPTUVV.mjs → chunk-EJ33LCHV.mjs} +29 -6
  226. package/dist/react-native/chunks/{chunk-RYMDHGL4.mjs → chunk-ENLMYKSX.mjs} +3045 -3075
  227. package/dist/react-native/chunks/chunk-FHPW7P2O.mjs +40 -0
  228. package/dist/react-native/chunks/{chunk-JV6VQY2S.mjs → chunk-FTZHMRD2.mjs} +2 -1
  229. package/dist/react-native/chunks/{chunk-YHKZSLOC.mjs → chunk-G43IPIDG.mjs} +5 -5
  230. package/dist/react-native/chunks/{chunk-AUT7PMA4.mjs → chunk-GXX3DQXP.mjs} +8 -22
  231. package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
  232. package/dist/react-native/chunks/{chunk-DH3TVWWK.mjs → chunk-IYNT75CE.mjs} +12 -3
  233. package/dist/react-native/chunks/chunk-KV46CT4D.mjs +1007 -0
  234. package/dist/{browser/chunk-ZPTA75ZC.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +1 -1
  235. package/dist/react-native/chunks/{chunk-63YSZOXB.mjs → chunk-MIP4SOR6.mjs} +1480 -826
  236. package/dist/react-native/chunks/{chunk-ZBSWRSBG.mjs → chunk-MJDQU5MW.mjs} +1 -1
  237. package/dist/react-native/chunks/{chunk-GFYFQLJD.mjs → chunk-MUWD2H2S.mjs} +2 -2
  238. package/dist/react-native/chunks/{chunk-IOY2SM2P.mjs → chunk-MVXELMJX.mjs} +1 -1
  239. package/dist/{browser/chunk-TTD27VXX.mjs → react-native/chunks/chunk-NB3LP33V.mjs} +27 -10
  240. package/dist/react-native/chunks/{chunk-I5PGWQJF.mjs → chunk-PDRWWPKV.mjs} +33 -24
  241. package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
  242. package/dist/react-native/chunks/{chunk-2CGSQM4O.mjs → chunk-POPDAGH6.mjs} +13 -13
  243. package/dist/react-native/chunks/{chunk-NP7DD4G5.mjs → chunk-QUKQNI3H.mjs} +5 -5
  244. package/dist/react-native/chunks/{chunk-EH5CFV6Z.mjs → chunk-RDWG33MM.mjs} +2 -2
  245. package/dist/react-native/chunks/{chunk-JX2RIAXH.mjs → chunk-SK2PWYDH.mjs} +5 -5
  246. package/dist/react-native/chunks/{chunk-ZYDKJXQJ.mjs → chunk-SUPXRTMD.mjs} +1 -1
  247. package/dist/react-native/chunks/chunk-TP6KCKER.mjs +63 -0
  248. package/dist/react-native/chunks/{chunk-JPAJWO6D.mjs → chunk-U4KSKA4Z.mjs} +1 -1
  249. package/dist/react-native/chunks/chunk-UQ4OAXKU.mjs +1106 -0
  250. package/dist/react-native/chunks/{chunk-VVFYOADG.mjs → chunk-VWUDIOT6.mjs} +6 -6
  251. package/dist/{browser/chunk-SIR3LMTV.mjs → react-native/chunks/chunk-WBYQRHDY.mjs} +2 -2
  252. package/dist/react-native/chunks/{chunk-C2H2QQFW.mjs → chunk-YH7QY657.mjs} +3 -3
  253. package/dist/react-native/chunks/{chunk-NCJS3WIY.mjs → chunk-YZW4CHM6.mjs} +51 -12
  254. package/dist/react-native/chunks/chunk-ZLWVW734.mjs +100 -0
  255. package/dist/react-native/chunks/chunk-ZXZFN7FI.mjs +432 -0
  256. package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
  257. package/dist/react-native/chunks/{cold-module-TJL6AFAD.mjs → cold-module-KVZYUGRY.mjs} +31 -28
  258. package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
  259. package/dist/react-native/chunks/{durability-wiring-RRDYJLLM.mjs → durability-wiring-34OYO32E.mjs} +60 -162
  260. package/dist/react-native/chunks/engine-hooks-M7JV46NH.mjs +30 -0
  261. package/dist/react-native/chunks/geo-index-PX3BIHAH.mjs +1387 -0
  262. package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
  263. package/dist/react-native/chunks/import-H6AQREWI.mjs +32 -0
  264. package/dist/react-native/chunks/{methods-X6F36SJE.mjs → methods-6W5U4C3H.mjs} +3 -3
  265. package/dist/react-native/chunks/module-LBZPGOWH.mjs +36 -0
  266. package/dist/react-native/chunks/{module-S4DKSWMF.mjs → module-TTEVPRCW.mjs} +14 -13
  267. package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
  268. package/dist/react-native/chunks/{phrase-module-JZ37TB7N.mjs → phrase-module-QK22HSQ2.mjs} +2 -2
  269. package/dist/react-native/chunks/{pool-RTGXJXPU.mjs → pool-JR3NJCAF.mjs} +1 -1
  270. package/dist/react-native/chunks/restore-hooks-IBGIY3DR.mjs +127 -0
  271. package/dist/react-native/chunks/restore-queue-ZZX54AH7.mjs +55 -0
  272. package/dist/react-native/chunks/{retention-PPCTP2VY.mjs → retention-EW4TTDFB.mjs} +29 -25
  273. package/dist/react-native/chunks/{runtime-KUATOLYB.mjs → runtime-R5E3TB3J.mjs} +1 -1
  274. package/dist/react-native/chunks/{snapshot-ZBIEOZTZ.mjs → snapshot-REYVIN3X.mjs} +80 -44
  275. package/dist/react-native/chunks/start-BQK6KN3R.mjs +38 -0
  276. package/dist/react-native/chunks/{write-2W4FTX7J.mjs → write-FQAYCZF5.mjs} +27 -24
  277. package/dist/react-native/partial-words.mjs +11 -9
  278. package/dist/react-native/pattern.mjs +4 -4
  279. package/dist/react-native/query-suggestions.mjs +260 -0
  280. package/dist/react-native/sync.mjs +78 -15
  281. package/dist/react-native/synonyms.mjs +95 -27
  282. package/dist/react.d.ts +11 -11
  283. package/dist/react.mjs +1 -0
  284. package/dist/{rerank-IZOB6NII.mjs → rerank-MQ37IYRV.mjs} +4 -4
  285. package/dist/rerankers/http.mjs +2 -2
  286. package/dist/restore-hooks-CDERDEF4.mjs +153 -0
  287. package/dist/restore-queue-7NNSTROA.mjs +55 -0
  288. package/dist/retention-QSVBBNRM.mjs +66 -0
  289. package/dist/{runtime-UZOC3NPY.mjs → runtime-COIUORCN.mjs} +5 -5
  290. package/dist/{schema-DDauvDOv.d.ts → schema-Jwt928nJ.d.ts} +1 -1
  291. package/dist/server.d.ts +108 -12
  292. package/dist/server.mjs +303 -50
  293. package/dist/{snapshot-NFX2EYN2.mjs → snapshot-RH4NSKIZ.mjs} +98 -61
  294. package/dist/start-MCKCOGIW.mjs +66 -0
  295. package/dist/sync/filesystem.d.ts +4 -4
  296. package/dist/sync/filesystem.mjs +6 -6
  297. package/dist/sync/indexeddb.d.ts +4 -4
  298. package/dist/sync/indexeddb.mjs +2 -2
  299. package/dist/sync.browser.mjs +74 -11
  300. package/dist/sync.d.ts +5 -5
  301. package/dist/sync.mjs +78 -16
  302. package/dist/synonyms.mjs +9 -8
  303. package/dist/{tasks-BShx8pdK.d.ts → tasks-qrJojgST.d.ts} +13 -5
  304. package/dist/thread-O4SBJJJS.mjs +50 -0
  305. package/dist/{types-SnO7_tAI.d.ts → types-BZCGjfLn.d.ts} +2 -3
  306. package/dist/vector/search-worker.d.ts +1 -1
  307. package/dist/vector/search-worker.mjs +8 -8
  308. package/dist/workers/entry.mjs +19 -8
  309. package/dist/{write-FGB62BHQ.mjs → write-3FK7NG3Y.mjs} +40 -33
  310. package/openapi.json +798 -7
  311. package/package.json +32 -8
  312. package/dist/browser/import-YI5GNB4H.mjs +0 -17
  313. package/dist/browser/operations-WVYLF72Q.mjs +0 -5
  314. package/dist/browser/restore-queue-TYIGDL5L.mjs +0 -41
  315. package/dist/chunk-37IVJLP6.mjs +0 -44
  316. package/dist/chunk-DJHHF2L5.mjs +0 -17
  317. package/dist/direct-executor-FI5GJHWX.mjs +0 -29
  318. package/dist/engine-DYu-e0oR.d.ts +0 -674
  319. package/dist/import-SRBNC6TE.mjs +0 -49
  320. package/dist/operations-PGOAY2KS.mjs +0 -5
  321. package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
  322. package/dist/react-native/chunks/gzip.react-native-DNB5YNFA.mjs +0 -3
  323. package/dist/react-native/chunks/import-JYBMEJPQ.mjs +0 -29
  324. package/dist/react-native/chunks/module-QT5HZAY4.mjs +0 -33
  325. package/dist/react-native/chunks/operations-RYKTSZQA.mjs +0 -5
  326. package/dist/react-native/chunks/restore-queue-ZBVIKJWI.mjs +0 -41
  327. package/dist/restore-queue-COI2GSSK.mjs +0 -41
  328. package/dist/retention-55WA7GPU.mjs +0 -58
  329. package/dist/thread-P2G2FWM2.mjs +0 -44
@@ -1,12 +1,13 @@
1
- import { restoredEmbedding, restoredPartitionConfig, readSharedConfigFields } from './chunk-YBJDOA2T.mjs';
1
+ import { restoredEmbedding, restoredPartitionConfig, readSharedConfigFields } from './chunk-INJYO3BU.mjs';
2
2
  import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
3
3
  import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR } from './chunk-JDDXV6UF.mjs';
4
+ import { storedStateOf } from './chunk-XXHN7J46.mjs';
4
5
  import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-EEBCDP36.mjs';
5
- import { generateId } from './chunk-5FUOVJKG.mjs';
6
- import { decodeSynonymRules } from './chunk-NTZOXVUZ.mjs';
7
- import { getLanguage } from './chunk-JCLTESFN.mjs';
8
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
9
- import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
6
+ import { generateId } from './chunk-VTTRFF2C.mjs';
7
+ import { decodeSynonymRules } from './chunk-I5B7RXU7.mjs';
8
+ import { getLanguage } from './chunk-RZWWB2XR.mjs';
9
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
10
+ import { compareCodePoints } from './chunk-TBC3XUL2.mjs';
10
11
  import { decode, encode } from '@msgpack/msgpack';
11
12
 
12
13
  // src/distribution/payload-guards.ts
@@ -57,6 +58,43 @@ var DEFAULT_NODE_LIFECYCLE_CONFIG = {
57
58
  nodeHeartbeatIntervalMs: 1e4
58
59
  };
59
60
  var MAX_SYNONYM_GENERATION_LENGTH = 128;
61
+ function decodeClusterQuerySuggestionSettings(raw, reject) {
62
+ let state;
63
+ try {
64
+ state = storedStateOf({
65
+ querySuggestions: raw.querySuggestions,
66
+ bannedQueries: raw.bannedQueries,
67
+ querySuggestionsSource: raw.querySuggestionsSource
68
+ });
69
+ } catch (error) {
70
+ return reject(error instanceof NarsilError ? error.message : "the query suggestion settings are malformed");
71
+ }
72
+ return state ?? {};
73
+ }
74
+ function suggestionStateOfSettings(settings) {
75
+ if (settings === void 0) return null;
76
+ const state = {
77
+ ...settings.querySuggestions !== void 0 ? { querySuggestions: settings.querySuggestions } : {},
78
+ ...settings.bannedQueries !== void 0 ? { bannedQueries: settings.bannedQueries } : {},
79
+ ...settings.querySuggestionsSource !== void 0 ? { querySuggestionsSource: settings.querySuggestionsSource } : {}
80
+ };
81
+ return Object.keys(state).length === 0 ? null : state;
82
+ }
83
+ function metadataWithSuggestionState(snapshot, state) {
84
+ const decoded = decode(snapshot.bytes);
85
+ const fields = isRecord2(decoded) ? decoded : {};
86
+ const {
87
+ querySuggestions: _setting,
88
+ bannedQueries: _banned,
89
+ ...settings
90
+ } = isRecord2(fields.settings) ? fields.settings : { language: snapshot.settings?.language ?? getLanguage("english").name };
91
+ const next = {
92
+ ...settings,
93
+ ...state?.querySuggestions !== void 0 ? { querySuggestions: state.querySuggestions } : {},
94
+ ...state?.bannedQueries !== void 0 && state.bannedQueries.length > 0 ? { bannedQueries: state.bannedQueries } : {}
95
+ };
96
+ return new Uint8Array(encode({ ...fields, settings: next }, { ignoreUndefined: true }));
97
+ }
60
98
  function isPositiveSafeInteger(value) {
61
99
  return typeof value === "number" && Number.isSafeInteger(value) && value >= 1;
62
100
  }
@@ -346,7 +384,8 @@ function decodeIndexSettings(raw, indexName) {
346
384
  ...embedding !== void 0 ? { embedding } : {}
347
385
  }),
348
386
  ...synonyms !== void 0 ? { synonyms } : {},
349
- ...decodeClusterSyncSettings(raw, reject)
387
+ ...decodeClusterSyncSettings(raw, reject),
388
+ ...decodeClusterQuerySuggestionSettings(raw, reject)
350
389
  };
351
390
  }
352
391
  function withPartitionCount(config, partitionCount) {
@@ -368,6 +407,9 @@ function indexConfigFromSettings(schema, settings, indexName) {
368
407
  sync: _sync,
369
408
  syncActive: _syncActive,
370
409
  syncEpoch: _syncEpoch,
410
+ querySuggestions: _querySuggestions,
411
+ bannedQueries: _bannedQueries,
412
+ querySuggestionsSource: _querySuggestionsSource,
371
413
  ...fields
372
414
  } = settings;
373
415
  return {
@@ -626,4 +668,4 @@ function storedSynonymSetOf(bytes) {
626
668
  return ref === null ? null : { indexUuid: decoded.indexUuid, ref };
627
669
  }
628
670
 
629
- export { ALLOCATION_CAS_ATTEMPTS, ALLOCATION_RETRY_DELAY_MS, ANALYSIS_CHANGE_POLL_INTERVAL_MS, ANALYSIS_CHANGE_RETRY_MS, ANALYSIS_REBUILD_RESEND_MS, BOOTSTRAP_CAS_ATTEMPTS, DEFAULT_CONTROLLER_CONFIG, DEFAULT_NODE_LIFECYCLE_CONFIG, ESTIMATED_PARTITION_BYTES, HIDDEN_GENERATION_PREFIX, LEADERSHIP_IMBALANCE_THRESHOLD, MAX_RESHARD_CUTOVER_ATTEMPTS, PARTITION_STORES_TIMEOUT_MS, REBALANCE_THRESHOLD, RECOVERY_CAS_ATTEMPTS, RESHARD_CONTROLLER_POLL_INTERVAL_MS, RESHARD_CUTOVER_LAG_ENTRIES, RESHARD_CUTOVER_TIMEOUT_MS, RESHARD_FORWARD_BATCH_DOCUMENTS, RESHARD_POLL_INTERVAL_MS, RESHARD_RECORD_CAS_ATTEMPTS, RESHARD_RECORD_CHECK_INTERVAL_MS, RESHARD_RETRY_DELAY_MS, SYNC_EPOCH_CAS_ATTEMPTS, TEARDOWN_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, TEARDOWN_RETRY_ROUNDS, decodeIndexSettings, deleteSynonymSet, getClusterIndexConfig, getIndexMetadata, indexConfigFromSettings, indexConfigKey, indexMetadataSnapshotOf, indexSettingsOf, indexUuidOfStoredMetadata, isRecord, isRecord2, isValidInteger, metadataWithBm25, metadataWithSync, metadataWithSynonymSet, putGenerationMetadata, putIndexMetadata, putIndexReplicationFactor, readIndexMetadataSnapshot, readIndexState, storeSynonymSet, storedSynonymSetOf, validateIndexName, withPartitionCount };
671
+ export { ALLOCATION_CAS_ATTEMPTS, ALLOCATION_RETRY_DELAY_MS, ANALYSIS_CHANGE_POLL_INTERVAL_MS, ANALYSIS_CHANGE_RETRY_MS, ANALYSIS_REBUILD_RESEND_MS, BOOTSTRAP_CAS_ATTEMPTS, DEFAULT_CONTROLLER_CONFIG, DEFAULT_NODE_LIFECYCLE_CONFIG, ESTIMATED_PARTITION_BYTES, HIDDEN_GENERATION_PREFIX, LEADERSHIP_IMBALANCE_THRESHOLD, MAX_RESHARD_CUTOVER_ATTEMPTS, PARTITION_STORES_TIMEOUT_MS, REBALANCE_THRESHOLD, RECOVERY_CAS_ATTEMPTS, RESHARD_CONTROLLER_POLL_INTERVAL_MS, RESHARD_CUTOVER_LAG_ENTRIES, RESHARD_CUTOVER_TIMEOUT_MS, RESHARD_FORWARD_BATCH_DOCUMENTS, RESHARD_POLL_INTERVAL_MS, RESHARD_RECORD_CAS_ATTEMPTS, RESHARD_RECORD_CHECK_INTERVAL_MS, RESHARD_RETRY_DELAY_MS, SYNC_EPOCH_CAS_ATTEMPTS, TEARDOWN_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, TEARDOWN_RETRY_ROUNDS, decodeIndexSettings, deleteSynonymSet, getClusterIndexConfig, getIndexMetadata, indexConfigFromSettings, indexConfigKey, indexMetadataSnapshotOf, indexSettingsOf, indexUuidOfStoredMetadata, isRecord, isRecord2, isValidInteger, metadataWithBm25, metadataWithSuggestionState, metadataWithSync, metadataWithSynonymSet, putGenerationMetadata, putIndexMetadata, putIndexReplicationFactor, readIndexMetadataSnapshot, readIndexState, storeSynonymSet, storedSynonymSetOf, suggestionStateOfSettings, validateIndexName, withPartitionCount };
@@ -1,5 +1,5 @@
1
1
  import { MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH } from './chunk-FQBFZAWG.mjs';
2
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
2
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
3
3
 
4
4
  // src/search/hybrid-depth.ts
5
5
  function fixedHybridDepthOf(hybrid) {
@@ -1,5 +1,5 @@
1
- import { NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND } from './chunk-CP5RRPJR.mjs';
2
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
1
+ import { NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND } from './chunk-TQXHPFWT.mjs';
2
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
3
3
 
4
4
  // src/engine/export/json-line.ts
5
5
  function refuse(path, kind, docId) {
@@ -0,0 +1,40 @@
1
+ // src/math/words.ts
2
+ var FLOAT = new Float64Array(1);
3
+ var SIGNED = new Int32Array(FLOAT.buffer);
4
+ var UNSIGNED = new Uint32Array(FLOAT.buffer);
5
+ var LITTLE_ENDIAN = new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
6
+ var HIGH = LITTLE_ENDIAN ? 1 : 0;
7
+ var LOW = LITTLE_ENDIAN ? 0 : 1;
8
+ var EXPONENT_BIAS = 1023;
9
+ var EXPONENT_SHIFT = 20;
10
+ var MAGNITUDE_MASK = 2147483647;
11
+ var INFINITE_HIGH_WORD = 2146435072;
12
+ var SMALLEST_NORMAL_HIGH_WORD = 1048576;
13
+ function highWord(value) {
14
+ FLOAT[0] = value;
15
+ return SIGNED[HIGH];
16
+ }
17
+ function lowWord(value) {
18
+ FLOAT[0] = value;
19
+ return UNSIGNED[LOW];
20
+ }
21
+ function fromWords(high, low) {
22
+ SIGNED[HIGH] = high;
23
+ UNSIGNED[LOW] = low;
24
+ return FLOAT[0];
25
+ }
26
+ function withHighWord(value, high) {
27
+ FLOAT[0] = value;
28
+ SIGNED[HIGH] = high;
29
+ return FLOAT[0];
30
+ }
31
+ function withLowWord(value, low) {
32
+ FLOAT[0] = value;
33
+ UNSIGNED[LOW] = low;
34
+ return FLOAT[0];
35
+ }
36
+ function scaleByPowerOfTwo(value, exponent) {
37
+ return value * fromWords(exponent + EXPONENT_BIAS << EXPONENT_SHIFT, 0);
38
+ }
39
+
40
+ export { INFINITE_HIGH_WORD, MAGNITUDE_MASK, SMALLEST_NORMAL_HIGH_WORD, fromWords, highWord, lowWord, scaleByPowerOfTwo, withHighWord, withLowWord };
@@ -1,23 +1,24 @@
1
- import { loadVectorField, VECTOR_FILE_ENVELOPE_VERSION, GRAPH_PART_ENVELOPE_VERSION } from './chunk-7NTMUDC5.mjs';
2
- import { gunzip, gzip } from './chunk-ZXNNR73R.mjs';
1
+ import { loadVectorField, VECTOR_FILE_ENVELOPE_VERSION, GRAPH_PART_ENVELOPE_VERSION } from './chunk-TZ3355VS.mjs';
3
2
  import { defaultQuantizationFor } from './chunk-MATMVH65.mjs';
4
3
  import { DEFAULT_VECTOR_METRIC } from './chunk-VD7J552I.mjs';
5
- import { decodeSegmentManifest } from './chunk-IJU7LL7D.mjs';
4
+ import { gunzip, gzip } from './chunk-ZXNNR73R.mjs';
5
+ import { SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-WZ7YV54N.mjs';
6
+ import { decodeSegmentManifest } from './chunk-4KKXNJM6.mjs';
6
7
  import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
7
- import { SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-LTUGDMV4.mjs';
8
- import { readSegmentFile, STABLE_HEAD_ATTEMPTS } from './chunk-KCUIFVVW.mjs';
9
- import { manifestKey, segmentsPrefix, vectorFileKey, graphPartKey } from './chunk-Q3TCTQCC.mjs';
10
- import { VERSION, rulesOfStoredSynonyms, engineVersionParts, packChecksummedEnvelope, packEnvelopeWithChecksum } from './chunk-LSM2YTKM.mjs';
11
- import { decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays } from './chunk-5FUOVJKG.mjs';
12
- import { DEFAULT_BM25_B, DEFAULT_BM25_K1 } from './chunk-HWEDFLB7.mjs';
13
- import { readHeader, HEADER_SIZE, writeHeader, checksumOfChunks } from './chunk-HVYICDY3.mjs';
8
+ import { readSegmentFile, STABLE_HEAD_ATTEMPTS } from './chunk-QOW2JPUI.mjs';
9
+ import { manifestKey, segmentsPrefix, vectorFileKey, graphPartKey } from './chunk-NF4DT3IH.mjs';
10
+ import { storedStateToWire, storedStateFromWire } from './chunk-XXHN7J46.mjs';
11
+ import { VERSION, rulesOfStoredSynonyms, engineVersionParts, packChecksummedEnvelope, packEnvelopeWithChecksum } from './chunk-EFBDHH5P.mjs';
12
+ import { decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays } from './chunk-VTTRFF2C.mjs';
13
+ import { readHeader, HEADER_SIZE, writeHeader, checksumOfChunks } from './chunk-3OH67G7R.mjs';
14
14
  import { crc32 } from './chunk-7GXJUJ24.mjs';
15
- import { isQuantizationMode, isStorageMode } from './chunk-VMXSVVXG.mjs';
16
- import { flattenSchema, requireValidFieldTypes } from './chunk-Z3TNWCI5.mjs';
15
+ import { isQuantizationMode, isStorageMode } from './chunk-L6V6BST3.mjs';
16
+ import { flattenSchema, requireValidFieldTypes } from './chunk-BU4SAIC4.mjs';
17
+ import { DEFAULT_BM25_B, DEFAULT_BM25_K1 } from './chunk-FB6463IN.mjs';
17
18
  import { VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
18
19
  import { VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
19
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
20
- import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
20
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
21
+ import { compareCodePoints } from './chunk-TBC3XUL2.mjs';
21
22
  import { decode, encode } from '@msgpack/msgpack';
22
23
 
23
24
  // src/engine/durability-metadata.ts
@@ -118,6 +119,7 @@ function metadataFromConfig(indexName, config, partitionCount, documentCount) {
118
119
  if (config.sync !== void 0) metadata.sync = config.sync;
119
120
  if (config.syncActive !== void 0) metadata.syncActive = config.syncActive;
120
121
  if (config.syncEpoch !== void 0) metadata.syncEpoch = config.syncEpoch;
122
+ if (config.querySuggestions !== void 0) metadata.querySuggestions = config.querySuggestions;
121
123
  return metadata;
122
124
  }
123
125
  function metadataConfigOf(entry) {
@@ -153,7 +155,8 @@ function metadataConfigOf(entry) {
153
155
  ...entry.config.vectorPromotion !== void 0 ? { vectorPromotion: entry.config.vectorPromotion } : {},
154
156
  ...entry.config.patternValueLimit !== void 0 ? { patternValueLimit: entry.config.patternValueLimit } : {},
155
157
  ...entry.synonyms !== null ? { synonyms: rulesOfStoredSynonyms(entry.synonyms) } : {},
156
- ...syncMetadataOf(entry)
158
+ ...syncMetadataOf(entry),
159
+ ...entry.querySuggestions !== null ? { querySuggestions: entry.querySuggestions } : {}
157
160
  };
158
161
  }
159
162
  function syncMetadataOf(entry) {
@@ -525,7 +528,11 @@ function metadataToWire(meta) {
525
528
  if (Array.isArray(meta.synonyms) && meta.synonyms.length > 0) {
526
529
  wire.synonyms = meta.synonyms;
527
530
  }
528
- return { ...wire, ...syncMetadataToWire(meta) };
531
+ return {
532
+ ...wire,
533
+ ...syncMetadataToWire(meta),
534
+ ...meta.querySuggestions !== void 0 ? storedStateToWire(meta.querySuggestions) : {}
535
+ };
529
536
  }
530
537
  function wireToMetadata(raw) {
531
538
  const meta = {
@@ -682,6 +689,8 @@ function wireToMetadata(raw) {
682
689
  }
683
690
  if (raw.synonyms !== void 0 && raw.synonyms !== null) meta.synonyms = raw.synonyms;
684
691
  syncMetadataFromWire(raw, meta);
692
+ const querySuggestions = storedStateFromWire(raw);
693
+ if (querySuggestions !== null) meta.querySuggestions = querySuggestions;
685
694
  return meta;
686
695
  }
687
696
  function isNonNegativeInteger(value) {
@@ -1280,7 +1289,7 @@ function removeFromPartition(manager, partitionId, docIds) {
1280
1289
  }
1281
1290
  }
1282
1291
  async function attachPagedSegment(directory, ref, partitionId, manager, options) {
1283
- const { checkPagedSegmentFully, createPagedFrozenSegment, openPagedSnapshot, pagedListingOf } = await import('./module-MG7JMV2U.mjs');
1292
+ const { checkPagedSegmentFully, createPagedFrozenSegment, openPagedSnapshot, pagedListingOf } = await import('./module-FQ4JWNQJ.mjs');
1284
1293
  if (options.decodesEveryDocument) await checkPagedSegmentFully(directory, ref);
1285
1294
  const snapshot = openPagedSnapshot(await pagedListingOf(directory, ref));
1286
1295
  requireAgreedSchema(options.schema, snapshot.schema, ref.key);
@@ -1294,7 +1303,7 @@ async function loadPartitionSegments(store, partition, manager, options) {
1294
1303
  const { directory } = store;
1295
1304
  for (const ref of partition.segments) {
1296
1305
  if (manager.config.textStorage === "disk" && directory !== void 0) {
1297
- const { isPagedSegmentFile } = await import('./module-MG7JMV2U.mjs');
1306
+ const { isPagedSegmentFile } = await import('./module-FQ4JWNQJ.mjs');
1298
1307
  if (await isPagedSegmentFile(directory, ref.key)) {
1299
1308
  await attachPagedSegment(directory, ref, partition.partitionId, manager, options);
1300
1309
  await yieldToEventLoop();
@@ -1350,7 +1359,7 @@ async function loadSegmentedCheckpoint(store, indexName, manifest, deps, decodes
1350
1359
  (field) => deps.vectorIndexes.get(field.fieldPath)?.storage === "disk" && field.files.some((file) => file.headOffset !== void 0)
1351
1360
  );
1352
1361
  if (!decodesEveryDocument && directory !== void 0 && opensVectorsOnDemand) {
1353
- const { startReadingOpeningSectionsAhead } = await import('./module-MG7JMV2U.mjs');
1362
+ const { startReadingOpeningSectionsAhead } = await import('./module-FQ4JWNQJ.mjs');
1354
1363
  await startReadingOpeningSectionsAhead(directory, manifest);
1355
1364
  }
1356
1365
  for (const partition of manifest.partitions) {
@@ -60,34 +60,4 @@ function bitsetFromSet(set, capacity) {
60
60
  return bs;
61
61
  }
62
62
 
63
- // src/core/partition/growable-uint32.ts
64
- var GrowableUint32 = class {
65
- values;
66
- length = 0;
67
- constructor(capacity) {
68
- this.values = new Uint32Array(capacity);
69
- }
70
- growTo(needed, kept) {
71
- let capacity = this.values.length * 2;
72
- while (capacity < needed) capacity *= 2;
73
- const next = new Uint32Array(capacity);
74
- next.set(this.values.subarray(0, kept));
75
- this.values = next;
76
- }
77
- reserve(extra) {
78
- const needed = this.length + extra;
79
- if (needed > this.values.length) this.growTo(needed, this.length);
80
- }
81
- push(value) {
82
- if (this.length === this.values.length) this.growTo(this.length + 1, this.length);
83
- this.values[this.length++] = value;
84
- }
85
- ensureIndex(index) {
86
- if (index >= this.values.length) this.growTo(index + 1, this.values.length);
87
- }
88
- clear() {
89
- this.length = 0;
90
- }
91
- };
92
-
93
- export { GrowableUint32, bitsetAnd, bitsetAndInto, bitsetAndNotInto, bitsetFromSet, bitsetHas, bitsetIsEmpty, bitsetNot, bitsetOrInto, bitsetSet, createBitSet };
63
+ export { bitsetAnd, bitsetAndInto, bitsetAndNotInto, bitsetFromSet, bitsetHas, bitsetIsEmpty, bitsetNot, bitsetOrInto, bitsetSet, createBitSet };
@@ -1,6 +1,5 @@
1
- import { compareCodePoints } from './chunk-PPEPTUVV.mjs';
2
- import { LOOKUP_KEY_SCRATCH_BYTES } from './chunk-JV6VQY2S.mjs';
3
- import { createNarsilError, ErrorCodes } from './chunk-CUNGPR5R.mjs';
1
+ import { createNarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
2
+ import { withUnpairedSurrogatesReplaced } from './chunk-TBC3XUL2.mjs';
4
3
 
5
4
  // src/core/tokenizer/constants.ts
6
5
  var TOKEN_CACHE_SIZE_FLOOR = 5e4;
@@ -14,7 +13,19 @@ var MEDIUM_DEVICE_MEMORY_GB = 4;
14
13
  var SMALL_DEVICE_TOKEN_CACHE_ENTRIES = 1e5;
15
14
  var MEDIUM_DEVICE_TOKEN_CACHE_ENTRIES = 25e4;
16
15
  var LARGE_DEVICE_TOKEN_CACHE_ENTRIES = 5e5;
16
+ var NATIVE_ANALYSIS_FIRST_TOKEN_RECORDS = 256;
17
+ var NATIVE_ANALYSIS_HELD_TERMS = 16384;
17
18
  var DEFAULT_MIN_TOKEN_LENGTH = 1;
19
+ var DEFAULT_SPLIT_PATTERN = /[^\p{L}\p{M}\p{N}_'-]+/u;
20
+
21
+ // src/core/tokenizer/native-hook.ts
22
+ var installed = null;
23
+ function installNativeAnalysis(analysis) {
24
+ installed = analysis;
25
+ }
26
+ function nativeAnalysis() {
27
+ return installed;
28
+ }
18
29
 
19
30
  // src/core/tokenizer/normalize.ts
20
31
  var DOTTED_CAPITAL_I = "\u0130";
@@ -156,21 +167,21 @@ function evictOldestEntries(count) {
156
167
  }
157
168
  }
158
169
  }
170
+ function transformInTypeScript(raw, language, stem, removeDiacritics) {
171
+ let normalized = raw;
172
+ if (language.normalizer) normalized = language.normalizer(normalized);
173
+ if (removeDiacritics) normalized = stripDiacritics(normalized);
174
+ if (stem && language.stemmer) normalized = language.stemmer(normalized);
175
+ return normalized;
176
+ }
159
177
  function transformToken(raw, language, stem, removeDiacritics) {
160
178
  const flags = (stem ? "s" : "") + (removeDiacritics ? "d" : "");
161
179
  let bucket = getCacheBucket(language, flags);
162
180
  const cached = bucket.get(raw);
163
181
  if (cached !== void 0) return cached;
164
- let normalized = raw;
165
- if (language.normalizer) {
166
- normalized = language.normalizer(normalized);
167
- }
168
- if (removeDiacritics) {
169
- normalized = stripDiacritics(normalized);
170
- }
171
- if (stem && language.stemmer) {
172
- normalized = language.stemmer(normalized);
173
- }
182
+ const normalized = withUnpairedSurrogatesReplaced(
183
+ nativeAnalysis()?.transform(raw, language, stem, removeDiacritics) ?? transformInTypeScript(raw, language, stem, removeDiacritics)
184
+ );
174
185
  if (normalizationCacheSize >= maxCacheSize) {
175
186
  evictOldestEntries(Math.max(1, maxCacheSize >>> 2));
176
187
  bucket = getCacheBucket(language, flags);
@@ -332,7 +343,6 @@ function producesSurfaceForms(language, options) {
332
343
  if (!options?.collectSurfaces || options.customTokenizer) return false;
333
344
  return (options.stem ?? true) && language.stemmer !== null;
334
345
  }
335
- var DEFAULT_SPLIT_PATTERN = /[^\p{L}\p{M}\p{N}_'-]+/u;
336
346
  function resolveStopWords(language, override) {
337
347
  if (!override) return language.stopWords;
338
348
  if (override instanceof Set) return override;
@@ -362,6 +372,18 @@ function stripPossessive(token) {
362
372
  }
363
373
  return token;
364
374
  }
375
+ function customTokensOf(tokenizer, text) {
376
+ const entries = tokenizer.tokenize(text);
377
+ let repaired = null;
378
+ for (let at = 0; at < entries.length; at++) {
379
+ const entry = entries[at];
380
+ const token = withUnpairedSurrogatesReplaced(entry.token);
381
+ if (token === entry.token) continue;
382
+ repaired ??= entries.slice();
383
+ repaired[at] = { token, position: entry.position };
384
+ }
385
+ return repaired ?? entries;
386
+ }
365
387
  function visitTokens(text, language, options, visit) {
366
388
  const {
367
389
  stem = true,
@@ -372,9 +394,12 @@ function visitTokens(text, language, options, visit) {
372
394
  stopWordOverride
373
395
  } = options ?? {};
374
396
  if (customTokenizer) {
375
- for (const entry of customTokenizer.tokenize(text)) visit(entry.token, entry.position, void 0, entry.token);
397
+ for (const entry of customTokensOf(customTokenizer, text)) {
398
+ visit(entry.token, entry.position, void 0, entry.token);
399
+ }
376
400
  return;
377
401
  }
402
+ if (nativeAnalysis()?.visitTokens(text, language, options, visit) === true) return;
378
403
  const rawParts = splitText(normalizeForSplitting(text), language);
379
404
  const minLength = language.tokenizer?.minTokenLength ?? DEFAULT_MIN_TOKEN_LENGTH;
380
405
  const effectiveDiacritics = removeDiacritics || (language.tokenizer?.normalizeDiacritics ?? false);
@@ -391,11 +416,17 @@ function visitTokens(text, language, options, visit) {
391
416
  visit(processed, position, void 0, part);
392
417
  continue;
393
418
  }
394
- const surface = effectiveDiacritics ? transformToken(candidate, language, false, true) : candidate;
395
- visit(processed, position, surface === processed ? void 0 : surface, part);
419
+ const shown = effectiveDiacritics ? transformToken(candidate, language, false, true) : candidate;
420
+ visit(processed, position, surfaceOf(shown, processed), part);
396
421
  }
397
422
  }
423
+ function surfaceOf(shown, term) {
424
+ if (shown === term) return void 0;
425
+ const surface = withUnpairedSurrogatesReplaced(shown);
426
+ return surface === term ? void 0 : surface;
427
+ }
398
428
  function visitSurfaceSpellings(text, language, visit) {
429
+ if (nativeAnalysis()?.visitSpellings(text, language, visit) === true) return;
399
430
  const rawParts = splitText(normalizeForSplitting(text), language);
400
431
  const minLength = language.tokenizer?.minTokenLength ?? DEFAULT_MIN_TOKEN_LENGTH;
401
432
  const removeDiacritics = language.tokenizer?.normalizeDiacritics ?? false;
@@ -403,12 +434,14 @@ function visitSurfaceSpellings(text, language, visit) {
403
434
  for (const part of rawParts) {
404
435
  const candidate = stripPossessives ? stripPossessive(part) : part;
405
436
  if (candidate.length < minLength) continue;
406
- visit(removeDiacritics ? transformToken(candidate, language, false, true) : candidate);
437
+ visit(
438
+ removeDiacritics ? transformToken(candidate, language, false, true) : withUnpairedSurrogatesReplaced(candidate)
439
+ );
407
440
  }
408
441
  }
409
442
  function tokenize(text, language, options) {
410
443
  if (options?.customTokenizer) {
411
- const customResult = options.customTokenizer.tokenize(text);
444
+ const customResult = customTokensOf(options.customTokenizer, text);
412
445
  return { tokens: customResult, originalTokens: customResult.map((entry) => entry.token) };
413
446
  }
414
447
  const tokens = [];
@@ -422,74 +455,4 @@ function tokenize(text, language, options) {
422
455
  return { tokens, originalTokens, surfaces };
423
456
  }
424
457
 
425
- // src/core/partition/frozen/string-blob.ts
426
- var SURROGATE = /[\ud800-\udfff]/;
427
- var UTF8_BYTES_PER_UTF16_UNIT = 3;
428
- var encoder = new TextEncoder();
429
- var lookupKeyBytes = new Uint8Array(LOOKUP_KEY_SCRATCH_BYTES);
430
- function encodeLookupKey(text) {
431
- if (text.length * UTF8_BYTES_PER_UTF16_UNIT > LOOKUP_KEY_SCRATCH_BYTES) return encoder.encode(text);
432
- const { written } = encoder.encodeInto(text, lookupKeyBytes);
433
- return lookupKeyBytes.subarray(0, written);
434
- }
435
- function encodeOneByOne(strings) {
436
- const encoded = new Array(strings.length);
437
- let blobLength = 0;
438
- for (let i = 0; i < strings.length; i++) {
439
- encoded[i] = encoder.encode(strings[i]);
440
- blobLength += encoded[i].length;
441
- }
442
- const blob = new Uint8Array(blobLength);
443
- const offsets = new Uint32Array(strings.length + 1);
444
- let cursor = 0;
445
- for (let i = 0; i < strings.length; i++) {
446
- blob.set(encoded[i], cursor);
447
- cursor += encoded[i].length;
448
- offsets[i + 1] = cursor;
449
- }
450
- return { blob, offsets };
451
- }
452
- function basicPlaneUtf8Bytes(text) {
453
- let bytes = text.length;
454
- for (let i = 0; i < text.length; i++) {
455
- const unit = text.charCodeAt(i);
456
- if (unit >= 128) bytes += unit < 2048 ? 1 : 2;
457
- }
458
- return bytes;
459
- }
460
- function encodeStringBlob(strings) {
461
- const joined = strings.join("");
462
- if (SURROGATE.test(joined)) return encodeOneByOne(strings);
463
- const blob = encoder.encode(joined);
464
- const offsets = new Uint32Array(strings.length + 1);
465
- let cursor = 0;
466
- for (let i = 0; i < strings.length; i++) {
467
- cursor += basicPlaneUtf8Bytes(strings[i]);
468
- offsets[i + 1] = cursor;
469
- }
470
- return cursor === blob.length ? { blob, offsets } : encodeOneByOne(strings);
471
- }
472
- function orderByComparator(strings) {
473
- const order = new Array(strings.length);
474
- for (let i = 0; i < strings.length; i++) order[i] = i;
475
- return order.sort((a, b) => compareCodePoints(strings[a], strings[b]));
476
- }
477
- function alreadyInCodePointOrder(strings) {
478
- for (let i = 1; i < strings.length; i++) {
479
- if (compareCodePoints(strings[i - 1], strings[i]) > 0) return false;
480
- }
481
- return true;
482
- }
483
- function codePointOrder(strings) {
484
- if (alreadyInCodePointOrder(strings)) return strings.map((_, i) => i);
485
- if (SURROGATE.test(strings.join(""))) return orderByComparator(strings);
486
- const positions = /* @__PURE__ */ new Map();
487
- for (let i = 0; i < strings.length; i++) positions.set(strings[i], i);
488
- if (positions.size !== strings.length) return orderByComparator(strings);
489
- const order = new Array(strings.length);
490
- const sorted = [...strings].sort();
491
- for (let i = 0; i < sorted.length; i++) order[i] = positions.get(sorted[i]) ?? 0;
492
- return order;
493
- }
494
-
495
- export { clearNormalizationCache, codePointOrder, configureNormalizationCache, encodeLookupKey, encodeStringBlob, getNormalizationCacheSize, resetNormalizationCache, resolveStopWords, tokenize, transformToken, visitSurfaceSpellings, visitTokens };
458
+ export { NATIVE_ANALYSIS_FIRST_TOKEN_RECORDS, NATIVE_ANALYSIS_HELD_TERMS, clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, installNativeAnalysis, resetNormalizationCache, resolveStopWords, tokenize, transformToken, visitSurfaceSpellings, visitTokens };
@@ -1,8 +1,8 @@
1
- import { isWordIndexedBase, parseFieldType } from './chunk-3A5KI24C.mjs';
1
+ import { isWordIndexedBase, parseFieldType } from './chunk-I54T6CQP.mjs';
2
2
  import { isPlainObject, MAX_TEXT_FIELDS, MAX_VECTOR_DIMENSION, MAX_NESTING_DEPTH, PROTOTYPE_POLLUTION_KEYS, FIELD_NAME_PATTERN, RESERVED_ROOT_FIELDS } from './chunk-L5ORED7V.mjs';
3
3
  import { MAX_DOCUMENT_ENCODING_DEPTH, DOCUMENT_ENCODER_RETAINED_BUFFER_BYTES, DOCUMENT_REPLY_ENVELOPE_DEPTH } from './chunk-U476IXKQ.mjs';
4
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
5
- import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
4
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
5
+ import { compareCodePoints } from './chunk-TBC3XUL2.mjs';
6
6
  import { Encoder, encode } from '@msgpack/msgpack';
7
7
 
8
8
  var INTEGER_ENCODING = { maxDepth: MAX_DOCUMENT_ENCODING_DEPTH };
@@ -0,0 +1,20 @@
1
+ import { localRuntimeOf } from './chunk-Z2KAFCRT.mjs';
2
+ import { boundQuerySuggestionsOf, querySuggestionsOf } from './chunk-TGS5UXBE.mjs';
3
+ import { engineCoreOf } from './chunk-EFBDHH5P.mjs';
4
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
5
+
6
+ // src/query-suggestions/index.ts
7
+ function querySuggestions(engine) {
8
+ const bound = boundQuerySuggestionsOf(engine);
9
+ if (bound !== void 0) return bound();
10
+ const core = engineCoreOf(engine);
11
+ if (core === void 0) {
12
+ throw new NarsilError(
13
+ ErrorCodes.CONFIG_INVALID,
14
+ "Popular query suggestions need an engine that createNarsil made in this process"
15
+ );
16
+ }
17
+ return querySuggestionsOf(() => localRuntimeOf(core, engine, void 0));
18
+ }
19
+
20
+ export { querySuggestions };
@@ -1,8 +1,9 @@
1
- import { bitsetHas, bitsetSet, GrowableUint32, createBitSet, bitsetAnd, bitsetNot } from './chunk-JUKYYXSP.mjs';
1
+ import { GrowableUint32 } from './chunk-RLOES5SX.mjs';
2
2
  import { tabulatedLevenshtein } from './chunk-GES7U2PM.mjs';
3
- import { parsedTypeOf } from './chunk-3A5KI24C.mjs';
4
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
5
- import { codePointCount, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
3
+ import { parsedTypeOf } from './chunk-I54T6CQP.mjs';
4
+ import { bitsetHas, bitsetSet, createBitSet, bitsetAnd, bitsetNot } from './chunk-7V5IUP2T.mjs';
5
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
6
+ import { codePointCount, exceedsCodePoints } from './chunk-TBC3XUL2.mjs';
6
7
 
7
8
  // src/core/pattern-index/constants.ts
8
9
  var DEFAULT_PATTERN_WORK_CAP = 25e6;
@@ -1,11 +1,11 @@
1
- import { untagDocumentLine } from './chunk-CP5RRPJR.mjs';
2
- import { restoredConfigFields, restoredEmbedding } from './chunk-YBJDOA2T.mjs';
1
+ import { untagDocumentLine } from './chunk-TQXHPFWT.mjs';
2
+ import { restoredConfigFields, restoredEmbedding } from './chunk-INJYO3BU.mjs';
3
3
  import { chunksOf } from './chunk-CZQ33DLW.mjs';
4
4
  import { MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, MAX_IMPORT_REFUSALS_REPORTED } from './chunk-EEBCDP36.mjs';
5
- import { requireConfigurationShape } from './chunk-USR7FQRZ.mjs';
5
+ import { requireConfigurationShape } from './chunk-GH4WQ22V.mjs';
6
+ import { flattenSchema } from './chunk-BU4SAIC4.mjs';
6
7
  import { turnsAreBudgeted, turnIsSpent, yieldTurn } from './chunk-LQG5G2LY.mjs';
7
- import { flattenSchema } from './chunk-Z3TNWCI5.mjs';
8
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
8
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
9
9
 
10
10
  // src/engine/export/lines.ts
11
11
  var NEWLINE = 10;