@delali/narsil 0.3.1-next.153 → 0.3.1-next.155

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 (330) hide show
  1. package/README.md +3 -1
  2. package/dist/adapters/filesystem.mjs +2 -2
  3. package/dist/adapters/gcs.mjs +2 -2
  4. package/dist/adapters/indexeddb.mjs +1 -1
  5. package/dist/adapters/s3.mjs +2 -2
  6. package/dist/{analysis-change-2OYM7ARW.mjs → analysis-change-3TFIHT5E.mjs} +32 -23
  7. package/dist/{react-native/chunks/analysis-change-entry-CXNRW324.mjs → analysis-change-entry-KA6JAO4X.mjs} +1 -1
  8. package/dist/archive-history-E4R73RWD.mjs +29 -0
  9. package/dist/browser/{analysis-change-2V2HZ2NY.mjs → analysis-change-TC36BU47.mjs} +39 -10
  10. package/dist/{analysis-change-entry-QD7YNDEE.mjs → browser/analysis-change-entry-4MH3CZXH.mjs} +1 -1
  11. package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
  12. package/dist/browser/chunk-23XRXIBW.mjs +85 -0
  13. package/dist/browser/chunk-3UIEB4QF.mjs +63 -0
  14. package/dist/browser/{chunk-CSCKZBVJ.mjs → chunk-4EWUGZYZ.mjs} +4 -4
  15. package/dist/browser/chunk-4WCVMOU3.mjs +151 -0
  16. package/dist/browser/{chunk-QJCO3TJU.mjs → chunk-56W3HQVJ.mjs} +9 -150
  17. package/dist/{react-native/chunks/chunk-VGUWIZFQ.mjs → browser/chunk-5TCXK5SB.mjs} +2 -2
  18. package/dist/browser/chunk-5W3MMTLG.mjs +19 -0
  19. package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
  20. package/dist/browser/chunk-A5KUEGDY.mjs +241 -0
  21. package/dist/browser/{chunk-HT7J73QL.mjs → chunk-ABCXENU5.mjs} +2 -2
  22. package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
  23. package/dist/browser/chunk-BXM5XOCA.mjs +315 -0
  24. package/dist/browser/chunk-CJSYBQ4J.mjs +100 -0
  25. package/dist/browser/chunk-DSXIBE6N.mjs +78 -0
  26. package/dist/browser/chunk-ELV4OZOI.mjs +29 -0
  27. package/dist/{react-native/chunks/chunk-QC4ZRBSX.mjs → browser/chunk-EXQZGUQH.mjs} +2 -79
  28. package/dist/browser/{chunk-2A2IPRC3.mjs → chunk-FNIFPFB7.mjs} +5 -31
  29. package/dist/browser/chunk-G64Q6OJF.mjs +96 -0
  30. package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
  31. package/dist/browser/chunk-IKDKX5VQ.mjs +1007 -0
  32. package/dist/browser/chunk-JIJXMI42.mjs +1829 -0
  33. package/dist/browser/chunk-JVBP5EYO.mjs +1106 -0
  34. package/dist/browser/{chunk-TQ5UMFG5.mjs → chunk-K4GCSZLI.mjs} +15 -6
  35. package/dist/browser/{chunk-PM4MUM5N.mjs → chunk-K5AXJBLL.mjs} +6 -5
  36. package/dist/browser/chunk-KKAMCABR.mjs +432 -0
  37. package/dist/browser/{chunk-IAXZAVYL.mjs → chunk-LFIWRCEA.mjs} +1 -159
  38. package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
  39. package/dist/browser/chunk-ML7THVLJ.mjs +38 -0
  40. package/dist/browser/chunk-NLWTBAGB.mjs +111 -0
  41. package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
  42. package/dist/browser/{chunk-MPK76GVS.mjs → chunk-RA6LSBCM.mjs} +1 -21
  43. package/dist/browser/{chunk-GJKXW3SF.mjs → chunk-RND5CLX3.mjs} +147 -253
  44. package/dist/{react-native/chunks/chunk-DFQJ4IJB.mjs → browser/chunk-RQBUNZQW.mjs} +2 -2
  45. package/dist/browser/{chunk-VD7JEUIR.mjs → chunk-RRO3EV4C.mjs} +9 -8
  46. package/dist/browser/{chunk-KWYQ6KX4.mjs → chunk-SMEQ36NT.mjs} +162 -2019
  47. package/dist/{chunk-MDF6PDIA.mjs → browser/chunk-SRMZXJSL.mjs} +8 -1
  48. package/dist/browser/{chunk-7ZJTRUVW.mjs → chunk-SUDNZKPL.mjs} +2 -2
  49. package/dist/browser/{chunk-LURXVCHG.mjs → chunk-U3JOQGWX.mjs} +1 -1
  50. package/dist/browser/chunk-VI7BQR4U.mjs +21 -0
  51. package/dist/browser/{chunk-B3JM6Z74.mjs → chunk-XY4VVBBO.mjs} +3 -2
  52. package/dist/browser/chunk-YJHGOJAC.mjs +15 -0
  53. package/dist/browser/chunk-ZI2V4VD7.mjs +21 -0
  54. package/dist/browser/{cold-module-YECAK4MN.mjs → cold-module-NEUGHUPA.mjs} +21 -14
  55. package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
  56. package/dist/browser/{durability-wiring-LM7WFL6X.mjs → durability-wiring-CVGPRO6D.mjs} +1299 -881
  57. package/dist/browser/engine-hooks-YXMPHZKZ.mjs +16 -0
  58. package/dist/browser/import-OM6QAW45.mjs +18 -0
  59. package/dist/browser/methods-KTQCSIN4.mjs +30 -0
  60. package/dist/browser/{module-XQLEOYNM.mjs → module-3HNFCBJ5.mjs} +10 -8
  61. package/dist/browser/{module-KAMRAJLE.mjs → module-E33X4AOK.mjs} +17 -10
  62. package/dist/browser/operations-OJ3BXS55.mjs +5 -0
  63. package/dist/browser/{phrase-module-CNKMUY4U.mjs → phrase-module-ZXXU7S3B.mjs} +1 -1
  64. package/dist/browser/{pool-DTYSPBMQ.mjs → pool-3JLET5RO.mjs} +3 -2
  65. package/dist/browser/restore-hooks-IF2ZROUP.mjs +113 -0
  66. package/dist/browser/restore-queue-ZBS7CJA6.mjs +55 -0
  67. package/dist/browser/retention-ASWUHAYI.mjs +209 -0
  68. package/dist/browser/{runtime-D2ULZGCN.mjs → runtime-OTAGEFQW.mjs} +1 -1
  69. package/dist/browser/{snapshot-UGZVMP4H.mjs → snapshot-PN7ZW6Q4.mjs} +80 -315
  70. package/dist/browser/start-ZIRB7MQ2.mjs +24 -0
  71. package/dist/browser/sync-state-P5XG6LTQ.mjs +15 -0
  72. package/dist/browser/{write-I5P5MW4O.mjs → write-HMDYCTV2.mjs} +17 -11
  73. package/dist/{capabilities-BT-HLDC8.d.ts → capabilities-Da4ywVVl.d.ts} +94 -7
  74. package/dist/{chunk-LDGGR7YT.mjs → chunk-2MANFZJ3.mjs} +2 -2
  75. package/dist/{chunk-IZT3G24Q.mjs → chunk-2NE7VCYE.mjs} +2 -2
  76. package/dist/{chunk-3TVDTACC.mjs → chunk-3C7MTCCI.mjs} +1 -1
  77. package/dist/chunk-3HB3PEC6.mjs +240 -0
  78. package/dist/chunk-3HHQLEEQ.mjs +1092 -0
  79. package/dist/chunk-3OH67G7R.mjs +214 -0
  80. package/dist/{chunk-ZS6CMXAE.mjs → chunk-3R4UZWQG.mjs} +98 -250
  81. package/dist/{chunk-65WCV5JO.mjs → chunk-4BYWRYPM.mjs} +1 -1
  82. package/dist/{chunk-SOUZMPME.mjs → chunk-4KRC2APY.mjs} +7 -194
  83. package/dist/{chunk-5QMHMELB.mjs → chunk-5FLRXF73.mjs} +8 -1
  84. package/dist/chunk-5FVU47TB.mjs +20 -0
  85. package/dist/chunk-5YNRKI2C.mjs +81 -0
  86. package/dist/chunk-6L3XJXGU.mjs +470 -0
  87. package/dist/chunk-6MSZ543Y.mjs +32 -0
  88. package/dist/{chunk-T4CJDBBE.mjs → chunk-6OEGXLBX.mjs} +1 -1
  89. package/dist/{chunk-3SBJVQLL.mjs → chunk-6RC4K46J.mjs} +2 -2
  90. package/dist/chunk-7GXJUJ24.mjs +49 -0
  91. package/dist/{chunk-FNBNZCGP.mjs → chunk-AILVAOLX.mjs} +2 -2
  92. package/dist/chunk-BDRIVYOK.mjs +72 -0
  93. package/dist/chunk-BUMREPLU.mjs +15 -0
  94. package/dist/chunk-BY6ZDGYS.mjs +50 -0
  95. package/dist/{chunk-5WB2A3XU.mjs → chunk-DCNKVEDB.mjs} +511 -27
  96. package/dist/{chunk-NITCPDFL.mjs → chunk-DIBHI6W5.mjs} +2 -2
  97. package/dist/{chunk-4QCSHLNM.mjs → chunk-DUOLGBTE.mjs} +3 -3
  98. package/dist/chunk-GES7U2PM.mjs +68 -0
  99. package/dist/chunk-GH4WQ22V.mjs +34 -0
  100. package/dist/chunk-GQPTDQCL.mjs +54 -0
  101. package/dist/chunk-H4KHPLHJ.mjs +382 -0
  102. package/dist/{chunk-7TE2AJIH.mjs → chunk-H6VIGE62.mjs} +13 -10
  103. package/dist/{chunk-J7M73VY7.mjs → chunk-HJJI72X7.mjs} +1 -1
  104. package/dist/{chunk-DGRM4EZZ.mjs → chunk-HNVVEQP7.mjs} +1 -1
  105. package/dist/{chunk-RBEHLIKX.mjs → chunk-HW5TNXBO.mjs} +35 -11
  106. package/dist/{chunk-KYVRZAYP.mjs → chunk-I54T6CQP.mjs} +2 -69
  107. package/dist/{chunk-IRWP524D.mjs → chunk-INJYO3BU.mjs} +1 -1
  108. package/dist/chunk-IPN7S4KX.mjs +130 -0
  109. package/dist/{chunk-CSHHU7PA.mjs → chunk-J4IWBIVY.mjs} +11 -30
  110. package/dist/{chunk-G5KHSM6E.mjs → chunk-K4ZIGL2O.mjs} +1 -1
  111. package/dist/{chunk-6RKSY3BX.mjs → chunk-KBDBPVLN.mjs} +5 -5
  112. package/dist/{chunk-J4BDAH2W.mjs → chunk-KBKEXQZA.mjs} +2 -2
  113. package/dist/{chunk-IJSFWGVW.mjs → chunk-KFLK5NA2.mjs} +3 -3
  114. package/dist/{chunk-YGQOPB2Z.mjs → chunk-KHKIRS5D.mjs} +1 -1
  115. package/dist/chunk-KJ3RTZDJ.mjs +101 -0
  116. package/dist/{chunk-2PNYKG2D.mjs → chunk-KMUNHGBQ.mjs} +139 -432
  117. package/dist/chunk-KP7TYHWT.mjs +92 -0
  118. package/dist/{chunk-VP6XRMWR.mjs → chunk-KPIV4RUC.mjs} +6 -32
  119. package/dist/{chunk-NPXVQS33.mjs → chunk-KXCVQWOR.mjs} +4 -3
  120. package/dist/chunk-KYYABCSW.mjs +72 -0
  121. package/dist/{chunk-6F6USYII.mjs → chunk-L7ZD4L3K.mjs} +267 -265
  122. package/dist/{chunk-U46IZNCW.mjs → chunk-LC3FDWTX.mjs} +3 -2
  123. package/dist/{chunk-6BWLDLS3.mjs → chunk-LHKOSI2J.mjs} +1 -1
  124. package/dist/chunk-LNGE7SLY.mjs +151 -0
  125. package/dist/{react-native/chunks/chunk-YH7W556M.mjs → chunk-MP7ABPTD.mjs} +12 -2
  126. package/dist/chunk-MT2NRTA6.mjs +216 -0
  127. package/dist/chunk-NF4DT3IH.mjs +85 -0
  128. package/dist/{chunk-POUYICOU.mjs → chunk-OIJ64LGT.mjs} +1 -1
  129. package/dist/{chunk-SEAJS664.mjs → chunk-PCRA7HTI.mjs} +5 -5
  130. package/dist/chunk-PHQNACDT.mjs +63 -0
  131. package/dist/chunk-Q622CTMC.mjs +74 -0
  132. package/dist/{chunk-NVTFQFUL.mjs → chunk-Q7G3BV3Y.mjs} +1 -1
  133. package/dist/chunk-QDZJM7NI.mjs +23 -0
  134. package/dist/{chunk-52QQWEBS.mjs → chunk-QH3YIQP4.mjs} +36 -7
  135. package/dist/chunk-QJVOLKU6.mjs +111 -0
  136. package/dist/chunk-QUJHMPTP.mjs +30 -0
  137. package/dist/{chunk-3E4RRF5J.mjs → chunk-RSVULW4Q.mjs} +100 -8
  138. package/dist/{chunk-IJPK5PGM.mjs → chunk-RVGRFOGN.mjs} +1 -1
  139. package/dist/chunk-RZWWB2XR.mjs +96 -0
  140. package/dist/{chunk-KQJVNPRM.mjs → chunk-S2EQU2GE.mjs} +19 -16
  141. package/dist/chunk-S5LN746F.mjs +10 -0
  142. package/dist/{chunk-LJ4ENXOD.mjs → chunk-SG3JBNHY.mjs} +2 -2
  143. package/dist/{chunk-B2FTZNNF.mjs → chunk-SMVH6JBE.mjs} +34 -14
  144. package/dist/chunk-SY3EWKQY.mjs +242 -0
  145. package/dist/{chunk-NYSONUB7.mjs → chunk-TQXHPFWT.mjs} +1 -1
  146. package/dist/{chunk-ZHAXP7SD.mjs → chunk-U4BS74YN.mjs} +26 -238
  147. package/dist/chunk-UHICS3JI.mjs +83 -0
  148. package/dist/chunk-UZRZKNNZ.mjs +101 -0
  149. package/dist/chunk-V6EUBAIT.mjs +19 -0
  150. package/dist/{chunk-TTCKT2RT.mjs → chunk-VGF7CFRP.mjs} +134 -11
  151. package/dist/chunk-VHBNF4MA.mjs +543 -0
  152. package/dist/{chunk-AWNHDBKV.mjs → chunk-VQEUR6T6.mjs} +16 -8
  153. package/dist/chunk-WQRN64Q6.mjs +196 -0
  154. package/dist/{chunk-DMNPYF54.mjs → chunk-WZ7YV54N.mjs} +2 -2
  155. package/dist/chunk-Y4WPNHMC.mjs +50 -0
  156. package/dist/{chunk-2HJWQPR6.mjs → chunk-YEDIDCR7.mjs} +6 -122
  157. package/dist/chunk-YEKL4JBK.mjs +96 -0
  158. package/dist/{chunk-UGVUW27S.mjs → chunk-Z2BE2MAM.mjs} +14 -10
  159. package/dist/{chunk-3HV7M5OJ.mjs → chunk-ZAUJFLEN.mjs} +11 -135
  160. package/dist/{chunk-FDG4KXX5.mjs → chunk-ZHCUZZE5.mjs} +6 -4
  161. package/dist/chunk-ZTW5WTGG.mjs +167 -0
  162. package/dist/chunk-ZYAY26KG.mjs +29 -0
  163. package/dist/{client-Cn3gNxUU.d.ts → client-DRv7UVeY.d.ts} +193 -11
  164. package/dist/client.d.ts +9 -7
  165. package/dist/client.mjs +120 -7
  166. package/dist/{cold-module-PYSSBIL7.mjs → cold-module-7XXCEGTZ.mjs} +43 -33
  167. package/dist/config-CoSig5Ox.d.ts +482 -0
  168. package/dist/{config-CfhH1IWQ.d.ts → config-DMwffLKn.d.ts} +20 -5
  169. package/dist/{direct-executor-WYALQSMD.mjs → direct-executor-G5TK7NLA.mjs} +18 -13
  170. package/dist/distribution/coordinator/etcd.d.ts +2 -2
  171. package/dist/distribution/coordinator/etcd.mjs +1 -1
  172. package/dist/distribution/coordinator/in-memory.d.ts +2 -2
  173. package/dist/distribution/transport/grpc.mjs +4 -4
  174. package/dist/distribution/transport/in-memory.mjs +2 -2
  175. package/dist/distribution/transport/tcp.mjs +3 -3
  176. package/dist/distribution.d.ts +41 -9
  177. package/dist/distribution.mjs +9304 -7271
  178. package/dist/durability-config-GE4U7MCZ.mjs +89 -0
  179. package/dist/{durability-wiring-7VBZEJLG.mjs → durability-wiring-NCKUC5EO.mjs} +1293 -872
  180. package/dist/embeddings/openai.mjs +2 -2
  181. package/dist/{config-aIsy7mcL.d.ts → engine-CFxPYqEk.d.ts} +716 -407
  182. package/dist/engine-hooks-DHCMOADY.mjs +47 -0
  183. package/dist/{import-GJOMB2HC.mjs → import-NBFXFCSG.mjs} +32 -24
  184. package/dist/{index-MsF7e5hL.d.ts → index-C4AmUnl1.d.ts} +1 -1
  185. package/dist/index.browser.mjs +9 -4
  186. package/dist/index.d.ts +7 -6
  187. package/dist/index.mjs +29 -21
  188. package/dist/index.react-native.mjs +19 -12
  189. package/dist/{long-query-thread-SCUE62TO.mjs → long-query-thread-J4DVRM4A.mjs} +33 -19
  190. package/dist/methods-7IOINERF.mjs +30 -0
  191. package/dist/{module-6RLIKSZQ.mjs → module-DWKPBSMN.mjs} +38 -28
  192. package/dist/{module-AVQEIB7O.mjs → module-UN76TF7I.mjs} +14 -14
  193. package/dist/operations-G5EP6JPX.mjs +5 -0
  194. package/dist/{paged-partition-archive-KGRW366Y.mjs → paged-partition-archive-DPNWVSK2.mjs} +46 -31
  195. package/dist/partial-words.mjs +7 -5
  196. package/dist/pattern.mjs +4 -3
  197. package/dist/persistence/durability/checkpoint-worker.d.ts +16 -1
  198. package/dist/persistence/durability/checkpoint-worker.mjs +40 -29
  199. package/dist/{phrase-module-OUQIRUQU.mjs → phrase-module-ZI4WSQVH.mjs} +1 -1
  200. package/dist/{pool-UPV5PVPY.mjs → pool-Y4A46T36.mjs} +2 -2
  201. package/dist/query-suggestions/merge-worker.d.ts +55 -0
  202. package/dist/query-suggestions/merge-worker.mjs +81 -0
  203. package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
  204. package/dist/query-suggestions.browser.mjs +246 -0
  205. package/dist/query-suggestions.d.ts +20 -0
  206. package/dist/query-suggestions.mjs +62 -0
  207. package/dist/react-native/chunks/{analysis-change-DXPZRGWF.mjs → analysis-change-6BPDPH6K.mjs} +50 -19
  208. package/dist/{browser/analysis-change-entry-JL5U2N3Q.mjs → react-native/chunks/analysis-change-entry-JLL42PH6.mjs} +1 -1
  209. package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
  210. package/dist/react-native/chunks/chunk-3JIBF3XT.mjs +191 -0
  211. package/dist/react-native/chunks/chunk-3NQOVO3K.mjs +1 -0
  212. package/dist/react-native/chunks/{chunk-UFNCLEQM.mjs → chunk-4DII3ZSM.mjs} +1 -1
  213. package/dist/react-native/chunks/{chunk-BRNAVOKP.mjs → chunk-4J74WHQM.mjs} +2 -2
  214. package/dist/react-native/chunks/chunk-4LCEN2IU.mjs +315 -0
  215. package/dist/react-native/chunks/{chunk-PU55IOG4.mjs → chunk-4Y53T4YE.mjs} +6 -190
  216. package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
  217. package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
  218. package/dist/react-native/chunks/chunk-6WA3C3DV.mjs +85 -0
  219. package/dist/react-native/chunks/chunk-7GRCBBME.mjs +63 -0
  220. package/dist/react-native/chunks/{chunk-2J2727V4.mjs → chunk-7PXRWYUU.mjs} +1 -1
  221. package/dist/{browser/chunk-VBX2TI5V.mjs → react-native/chunks/chunk-ALOIBXWN.mjs} +2 -2
  222. package/dist/react-native/chunks/{chunk-FS7BYE23.mjs → chunk-C3PTWYKT.mjs} +10 -153
  223. package/dist/react-native/chunks/{chunk-DKJTZ625.mjs → chunk-C5G6TJ7A.mjs} +2 -69
  224. package/dist/react-native/chunks/chunk-CHPTFFJM.mjs +43 -0
  225. package/dist/react-native/chunks/{chunk-LRGWK367.mjs → chunk-CKNRFDTZ.mjs} +1 -1
  226. package/dist/react-native/chunks/chunk-CUH5F57W.mjs +242 -0
  227. package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
  228. package/dist/{browser/chunk-55WYRLDZ.mjs → react-native/chunks/chunk-DVDX4SDR.mjs} +2 -2
  229. package/dist/{browser/chunk-PIS7ZAP7.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +12 -2
  230. package/dist/react-native/chunks/{chunk-KOCTCUXW.mjs → chunk-EIOYM5TO.mjs} +17 -9
  231. package/dist/react-native/chunks/chunk-F753DA54.mjs +23 -0
  232. package/dist/react-native/chunks/chunk-GIZTJXYW.mjs +1007 -0
  233. package/dist/react-native/chunks/{chunk-CLE3LZ77.mjs → chunk-GJFXPHXI.mjs} +5 -4
  234. package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
  235. package/dist/react-native/chunks/{chunk-IDFMNRIC.mjs → chunk-HUOYZJ3Q.mjs} +140 -430
  236. package/dist/react-native/chunks/chunk-IYNT75CE.mjs +111 -0
  237. package/dist/react-native/chunks/chunk-JDOEEMEF.mjs +38 -0
  238. package/dist/react-native/chunks/{chunk-LQAKO5QV.mjs → chunk-JLIIWJUV.mjs} +2 -2
  239. package/dist/react-native/chunks/chunk-JWUCMVRK.mjs +15 -0
  240. package/dist/react-native/chunks/chunk-KJIG57UD.mjs +1106 -0
  241. package/dist/react-native/chunks/{chunk-KLZGAOLT.mjs → chunk-KTTAU63H.mjs} +5 -5
  242. package/dist/react-native/chunks/chunk-LU3Y3P63.mjs +68 -0
  243. package/dist/{browser/chunk-NVEJJP4R.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +2 -79
  244. package/dist/react-native/chunks/{chunk-3CTWSQRW.mjs → chunk-MJDQU5MW.mjs} +4 -30
  245. package/dist/react-native/chunks/{chunk-NFGBOI46.mjs → chunk-MVXELMJX.mjs} +1 -1
  246. package/dist/react-native/chunks/{chunk-D7LFYPYI.mjs → chunk-N2WUOWLL.mjs} +12 -10
  247. package/dist/react-native/chunks/chunk-NVVRSRX5.mjs +78 -0
  248. package/dist/react-native/chunks/{chunk-JYL35A4A.mjs → chunk-OL3WDV53.mjs} +7 -33
  249. package/dist/react-native/chunks/chunk-PB2YXVQW.mjs +29 -0
  250. package/dist/react-native/chunks/{chunk-UCJU6WNH.mjs → chunk-PEHS2UO3.mjs} +7 -6
  251. package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
  252. package/dist/react-native/chunks/chunk-Q32DDFKX.mjs +19 -0
  253. package/dist/react-native/chunks/chunk-QJXTNPLQ.mjs +100 -0
  254. package/dist/react-native/chunks/{chunk-ZCKNBPQ4.mjs → chunk-RDWG33MM.mjs} +2 -2
  255. package/dist/react-native/chunks/chunk-SUPXRTMD.mjs +96 -0
  256. package/dist/react-native/chunks/chunk-TYIRMPD3.mjs +432 -0
  257. package/dist/react-native/chunks/{chunk-TLYD7IJ2.mjs → chunk-U4KSKA4Z.mjs} +1 -1
  258. package/dist/react-native/chunks/chunk-UNUFZ2QY.mjs +68 -0
  259. package/dist/react-native/chunks/{chunk-7IQR3SZO.mjs → chunk-VXGE4ZXL.mjs} +151 -257
  260. package/dist/react-native/chunks/{chunk-R4OPUZQ5.mjs → chunk-WBYQRHDY.mjs} +2 -2
  261. package/dist/react-native/chunks/chunk-YH7QY657.mjs +288 -0
  262. package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
  263. package/dist/react-native/chunks/{cold-module-KFGEWYEL.mjs → cold-module-5PHF6DZR.mjs} +31 -22
  264. package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
  265. package/dist/react-native/chunks/{durability-wiring-QKJB2QBT.mjs → durability-wiring-KO565FZC.mjs} +1309 -889
  266. package/dist/react-native/chunks/engine-hooks-MVRRHH6B.mjs +28 -0
  267. package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
  268. package/dist/react-native/chunks/import-YVZA4V4V.mjs +30 -0
  269. package/dist/react-native/chunks/methods-6W5U4C3H.mjs +30 -0
  270. package/dist/react-native/chunks/{module-UJ5VUARS.mjs → module-H5MVPSP2.mjs} +13 -11
  271. package/dist/react-native/chunks/module-ZL5ZG6YB.mjs +34 -0
  272. package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
  273. package/dist/react-native/chunks/{phrase-module-76UAPPSG.mjs → phrase-module-RTVKEWJT.mjs} +1 -1
  274. package/dist/react-native/chunks/{pool-CD4ANYUI.mjs → pool-JR3NJCAF.mjs} +3 -2
  275. package/dist/react-native/chunks/restore-hooks-SILFPU6B.mjs +125 -0
  276. package/dist/react-native/chunks/restore-queue-HSYP2AEC.mjs +55 -0
  277. package/dist/react-native/chunks/retention-7I7UAWYK.mjs +221 -0
  278. package/dist/react-native/chunks/{runtime-3MCDLJAF.mjs → runtime-R5E3TB3J.mjs} +1 -1
  279. package/dist/react-native/chunks/{snapshot-KVBD4LRC.mjs → snapshot-EZYB6SLF.mjs} +90 -323
  280. package/dist/react-native/chunks/start-SHVZ72I5.mjs +36 -0
  281. package/dist/react-native/chunks/sync-state-PASCIHHT.mjs +15 -0
  282. package/dist/react-native/chunks/{write-ES5A3WUA.mjs → write-JUESXHDL.mjs} +27 -19
  283. package/dist/react-native/partial-words.mjs +8 -5
  284. package/dist/react-native/pattern.mjs +4 -3
  285. package/dist/react-native/query-suggestions.mjs +258 -0
  286. package/dist/react-native/sync.mjs +2299 -0
  287. package/dist/react-native/synonyms.mjs +7 -4
  288. package/dist/react.d.ts +11 -10
  289. package/dist/react.mjs +8 -1
  290. package/dist/{rerank-3W54N6P2.mjs → rerank-MQ37IYRV.mjs} +4 -4
  291. package/dist/rerankers/http.mjs +2 -2
  292. package/dist/restore-hooks-HZ3ILAMO.mjs +146 -0
  293. package/dist/restore-queue-JVGENGGE.mjs +55 -0
  294. package/dist/retention-HROPV2QU.mjs +59 -0
  295. package/dist/{runtime-L2DZYY6N.mjs → runtime-COIUORCN.mjs} +5 -5
  296. package/dist/{schema-D33CyXCy.d.ts → schema-Jwt928nJ.d.ts} +1 -1
  297. package/dist/server.d.ts +119 -20
  298. package/dist/server.mjs +1123 -58
  299. package/dist/{snapshot-WMX6JCLP.mjs → snapshot-4HS2G2UM.mjs} +106 -49
  300. package/dist/start-UTWHGH42.mjs +59 -0
  301. package/dist/sync/filesystem.d.ts +30 -0
  302. package/dist/sync/filesystem.mjs +271 -0
  303. package/dist/sync/indexeddb.d.ts +30 -0
  304. package/dist/sync/indexeddb.mjs +237 -0
  305. package/dist/sync-state-ZWHLAFLE.mjs +15 -0
  306. package/dist/sync.browser.mjs +2294 -0
  307. package/dist/sync.d.ts +23 -0
  308. package/dist/sync.mjs +2268 -0
  309. package/dist/synonyms.mjs +6 -4
  310. package/dist/{tasks-C4ElXr4P.d.ts → tasks-qrJojgST.d.ts} +13 -5
  311. package/dist/thread-6MOXY2KD.mjs +45 -0
  312. package/dist/types-BZCGjfLn.d.ts +227 -0
  313. package/dist/vector/search-worker.d.ts +1 -1
  314. package/dist/vector/search-worker.mjs +7 -7
  315. package/dist/workers/entry.mjs +8 -8
  316. package/dist/{write-SKJ6HW7O.mjs → write-GTTWWRRG.mjs} +36 -28
  317. package/openapi.json +912 -5
  318. package/package.json +45 -8
  319. package/dist/browser/import-QOY6ZH6X.mjs +0 -12
  320. package/dist/browser/restore-queue-UQ6AAUVX.mjs +0 -41
  321. package/dist/chunk-7LDMWKP6.mjs +0 -209
  322. package/dist/engine-CJRUHXgf.d.ts +0 -664
  323. package/dist/react-native/chunks/chunk-L4M7QJNP.mjs +0 -110
  324. package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
  325. package/dist/react-native/chunks/gzip.react-native-7JWCLVOB.mjs +0 -3
  326. package/dist/react-native/chunks/import-XFBCCENV.mjs +0 -22
  327. package/dist/react-native/chunks/module-FHJ2GOBI.mjs +0 -25
  328. package/dist/react-native/chunks/restore-queue-H5VCN453.mjs +0 -41
  329. package/dist/restore-queue-AOF5OTQV.mjs +0 -41
  330. package/dist/thread-I7DVHHW7.mjs +0 -31
@@ -1,664 +0,0 @@
1
- import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
2
- import { B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions, a as IndexConfig, P as PartitionConfig } from './schema-D33CyXCy.js';
3
- import { B as BatchResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, L as ListParams, f as ListResult, Q as QueryParams, m as QueryResult, j as PreflightResult, g as SuggestParams, h as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, l as NarsilEventMap } from './config-aIsy7mcL.js';
4
- import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
5
-
6
- /**
7
- * Registers the adapters that indexes and queries reach by name, which is
8
- * what lets a binding outlive a restart and reach a worker thread or another
9
- * node.
10
- *
11
- * @public
12
- */
13
- interface AdapterRegistrationOperations {
14
- /**
15
- * Registers an embedding adapter under a name that an index config can
16
- * give and that durability metadata keeps. Registering a name again binds
17
- * every index that gives that name to the new adapter.
18
- *
19
- * @param name - The name that an index config gives in `embedding.adapter`.
20
- * @param adapter - The adapter that embeds documents and queries.
21
- */
22
- registerEmbeddingAdapter(name: string, adapter: EmbeddingAdapter): void;
23
- /**
24
- * Registers a rerank adapter under a name that a query gives in
25
- * `rerank.adapter`. Registering a name again sends every later query that
26
- * gives that name to the new adapter. The engine throws
27
- * `RERANK_CONFIG_INVALID` for an empty name and for an adapter without a
28
- * `rerank` function.
29
- *
30
- * @param name - The name that a query gives in `rerank.adapter`.
31
- * @param adapter - The adapter that scores the top hits of a query.
32
- */
33
- registerRerankAdapter(name: string, adapter: RerankAdapter): void;
34
- }
35
-
36
- /**
37
- * The analysis settings that {@link AnalysisOperations.changeAnalysis} changes
38
- * on a live index. A key that you leave out keeps its current value.
39
- *
40
- * @public
41
- */
42
- interface AnalysisChange {
43
- /** This is the name of a registered language. */
44
- language?: string;
45
- /**
46
- * This is a name that {@link registerTokenizer} bound. Pass `null` to return
47
- * to the tokeniser of the language.
48
- */
49
- tokenizer?: string | null;
50
- /**
51
- * This is a name that {@link registerStopWords} bound, or a list of words.
52
- * Pass `null` to return to the stop words of the language.
53
- */
54
- stopWords?: string | readonly string[] | ReadonlySet<string> | null;
55
- }
56
- /**
57
- * Changes how an index turns text into terms while the index keeps answering
58
- * searches.
59
- *
60
- * @public
61
- */
62
- interface AnalysisOperations {
63
- /**
64
- * Gives you an index that matches text under new settings, while the index
65
- * keeps answering searches and accepting writes.
66
- *
67
- * The engine builds the new terms beside the old ones. Searches keep matching
68
- * under the old settings during that time, while every write that the engine
69
- * accepts reaches the new terms. Each search matches under one set of
70
- * settings, either the old or the new, and the rebuild leaves vectors alone.
71
- * The promise resolves once a durable checkpoint holds the new terms, or once
72
- * the switch happens on an engine without durability. After a restart at any
73
- * point, the engine goes on to finish the change.
74
- *
75
- * @param indexName - The index to change.
76
- * @param change - The settings to change. A change to the values that the
77
- * index already holds completes with no rebuild.
78
- * @throws A `NarsilError` with `LANGUAGE_NOT_SUPPORTED` for an unregistered
79
- * language, with `CONFIG_INVALID` for an unregistered name, a tokeniser
80
- * instance, a stop word function, or a synonym word that breaks the synonym
81
- * rules under the new settings, with `ANALYSIS_REBUILD_MEMORY_EXCEEDED` when a
82
- * second copy of the terms does not fit in memory, with
83
- * `ANALYSIS_CHANGE_REPLACED` when a later change or a restore replaces this
84
- * one, with `ANALYSIS_CHANGE_NOT_READY` when the previous change has no
85
- * durable checkpoint yet, with `PERSISTENCE_SAVE_FAILED` when the new terms
86
- * answer searches before a durable checkpoint holds them, and with
87
- * `PARTITION_REBALANCING_BACKPRESSURE` during a rebalance.
88
- */
89
- changeAnalysis(indexName: string, change: AnalysisChange): Promise<void>;
90
- }
91
-
92
- /**
93
- * Changes the BM25 setting of a live index, which
94
- * {@link IndexConfig.bm25} sets when the index is created.
95
- *
96
- * @public
97
- */
98
- interface BM25Operations {
99
- /**
100
- * Replaces the BM25 setting of an index, so that every search that starts
101
- * after the promise resolves scores under the new setting.
102
- *
103
- * The call replaces the whole setting, so a value that it leaves out returns
104
- * to its default, and `{}` clears the setting. The engine rebuilds nothing,
105
- * because the setting changes no stored token. It saves the setting with the
106
- * index, so the setting stays in place after a restart, and every snapshot
107
- * of the index includes it. Where the index has copies on worker threads,
108
- * the promise resolves only once every copy holds the new setting. A cursor
109
- * from before the change keeps working, and its next pages can repeat or
110
- * skip documents, because the scores that order them can change.
111
- *
112
- * @param indexName - The index whose setting the engine replaces.
113
- * @param bm25 - The new setting, in the shape that {@link BM25Params} describes.
114
- * @throws A `NarsilError` with `CONFIG_INVALID` when `k1` is not a number from
115
- * 0 to 1,000, when `b` is not a number from 0 to 1, or when `fields` holds a
116
- * name that is not a text field. The index then keeps the setting that it
117
- * held before the call.
118
- */
119
- updateBM25(indexName: string, bm25: BM25Params): Promise<void>;
120
- }
121
-
122
- /**
123
- * The bytes that {@link Narsil.restore} and {@link Narsil.importDocumentExport}
124
- * accept, as one array, a stream of chunks, or an async iterable of chunks,
125
- * such as a Node.js file stream.
126
- *
127
- * @public
128
- */
129
- type ByteSource = Uint8Array | ReadableStream<Uint8Array> | AsyncIterable<Uint8Array>;
130
-
131
- /**
132
- * Opens and closes durable indexes without deleting them.
133
- *
134
- * @public
135
- */
136
- interface IndexLifecycleOperations {
137
- /**
138
- * Loads a closed index from its durable checkpoint and resets a parked recovery failure.
139
- *
140
- * @param indexName - The index to load.
141
- * @returns A promise that settles when the index is ready for operations.
142
- */
143
- open(indexName: string): Promise<void>;
144
- /**
145
- * Drains active work, checkpoints the index, releases its memory, and keeps its durable files.
146
- *
147
- * @param indexName - The index to close.
148
- * @returns A promise that settles after the index releases its memory.
149
- */
150
- close(indexName: string): Promise<void>;
151
- }
152
-
153
- /**
154
- * Reads and replaces the synonym set of an index, which
155
- * {@link IndexConfig.synonyms} sets when the index is created.
156
- *
157
- * @public
158
- */
159
- interface SynonymOperations {
160
- /**
161
- * Replaces the synonym set of an index, so that every search that starts
162
- * after the promise resolves expands its words with the new set.
163
- *
164
- * The engine applies the set without rebuilding the index, because a
165
- * synonym set changes no stored token. It saves the set with the index, so
166
- * the set stays in place after a restart, and every snapshot of the index
167
- * includes it. Where the index has copies on worker threads, the promise
168
- * resolves only once every copy uses the new set. Pass an empty list to
169
- * remove the set.
170
- *
171
- * @param indexName - The index whose set the engine replaces.
172
- * @param synonyms - The new set, in the shape that {@link SynonymRule}
173
- * describes.
174
- * @throws A `NarsilError` with `CONFIG_INVALID` when a rule breaks that
175
- * shape, when a word analyses to no token or to more than one, or when the
176
- * set passes 100,000 rules, 500,000 words, or 4,194,304 bytes of words in
177
- * UTF-8. The index then keeps the set that it held before the call.
178
- */
179
- updateSynonyms(indexName: string, synonyms: SynonymRule[]): Promise<void>;
180
- /**
181
- * Returns the synonym set of an index with every word as the caller wrote
182
- * it, or an empty list when the index holds no set.
183
- *
184
- * @param indexName - The index whose set the engine returns.
185
- */
186
- getSynonyms(indexName: string): Promise<SynonymRule[]>;
187
- }
188
-
189
- /**
190
- * Adds, replaces, and removes documents, and waits for the worker copies to
191
- * catch up with those writes.
192
- *
193
- * A write returns once the main copy holds it, and the worker copies apply
194
- * it afterwards, so a query that a copy answers can come back without a write
195
- * that returned before it. Every write takes a `wait` option for the cases
196
- * where the next query has to see it.
197
- *
198
- * @public
199
- */
200
- interface DocumentWriteOperations {
201
- /**
202
- * Adds one document to an index and returns the id it is stored under.
203
- *
204
- * The id comes from the `docId` argument when you pass one, otherwise from
205
- * the document's own `id` field, and otherwise the engine generates it. Use
206
- * {@link DocumentWriteOperations.insertBatch} for a large load, so that one
207
- * bad document cannot abandon the rest.
208
- *
209
- * @param indexName - The index that receives the document.
210
- * @param document - Its fields must match the types the schema declares.
211
- * @param docId - Pass an id to control it yourself, or omit it and read the
212
- * returned value. An id that differs from the document's own `id` field
213
- * raises `DOC_VALIDATION_FAILED`, because the stored document would
214
- * otherwise contradict the key that it is stored under.
215
- * @param options - Per-write settings, such as skipping the defensive copy
216
- * or waiting for every worker copy to apply the write.
217
- * @returns The id the document is stored under.
218
- */
219
- insert(indexName: string, document: AnyDocument, docId?: string, options?: InsertOptions): Promise<string>;
220
- /**
221
- * Adds many documents in one pass and reports each one's outcome.
222
- *
223
- * A document the engine rejects appears in `failed` with the error that
224
- * rejected it, and every other document is still written, which is what
225
- * makes this the call to load a corpus with.
226
- *
227
- * @param indexName - The index that receives the documents.
228
- * @param documents - The documents to write, each carrying its own id or
229
- * leaving the engine to generate one.
230
- * @param options - Per-write settings applied to every document.
231
- * @returns The ids written, and each rejection with its error.
232
- */
233
- insertBatch(indexName: string, documents: AnyDocument[], options?: InsertOptions): Promise<BatchResult>;
234
- /**
235
- * Removes one document.
236
- *
237
- * @param indexName - The index holding the document.
238
- * @param docId - The document to remove.
239
- * @param options - Per-write settings, such as waiting for every worker
240
- * copy to apply the removal.
241
- * @throws A `NarsilError` with `DOC_NOT_FOUND` when the index holds no such
242
- * document.
243
- */
244
- remove(indexName: string, docId: string, options?: WriteOptions): Promise<void>;
245
- /**
246
- * Removes many documents in one pass and reports each one's outcome.
247
- *
248
- * @param indexName - The index holding the documents.
249
- * @param docIds - The documents to remove.
250
- * @param options - Per-write settings applied to the whole batch.
251
- * @returns The ids removed, and each failure with its error.
252
- */
253
- removeBatch(indexName: string, docIds: string[], options?: WriteOptions): Promise<BatchResult>;
254
- /**
255
- * Replaces a stored document with the one you pass.
256
- *
257
- * The engine removes the old document and indexes the new one, so the
258
- * document you supply has to be complete, with every field it should hold
259
- * afterwards.
260
- *
261
- * @param indexName - The index holding the document.
262
- * @param docId - The document to replace.
263
- * @param document - The complete replacement.
264
- * @param options - Per-write settings, such as waiting for every worker
265
- * copy to apply the replacement.
266
- */
267
- update(indexName: string, docId: string, document: AnyDocument, options?: WriteOptions): Promise<void>;
268
- /**
269
- * Replaces many documents in one pass and reports each one's outcome.
270
- *
271
- * @param indexName - The index holding the documents.
272
- * @param updates - Each id with the complete document that replaces it.
273
- * @param options - Per-write settings applied to the whole batch.
274
- * @returns The ids replaced, and each failure with its error.
275
- */
276
- updateBatch(indexName: string, updates: Array<{
277
- docId: string;
278
- document: AnyDocument;
279
- }>, options?: WriteOptions): Promise<BatchResult>;
280
- /**
281
- * Resolves once every worker copy of an index has applied every write that
282
- * returned before the call.
283
- *
284
- * Call this after a run of writes, or pass `wait: true` on one write,
285
- * before a query that has to see them. An index that holds no copies
286
- * resolves at once.
287
- *
288
- * @param indexName - The index whose copies have to catch up.
289
- */
290
- waitForWrites(indexName: string): Promise<void>;
291
- }
292
-
293
- /**
294
- * The search engine, and everything you do with it.
295
- *
296
- * One instance holds every index you create, so an application usually keeps a
297
- * single engine for its lifetime and reaches each index by name. Build one
298
- * with {@link createNarsil}. Its write, open and close, synonym, analysis, BM25,
299
- * and adapter registration methods come from {@link DocumentWriteOperations},
300
- * {@link IndexLifecycleOperations}, {@link SynonymOperations},
301
- * {@link AnalysisOperations}, {@link BM25Operations}, and
302
- * {@link AdapterRegistrationOperations}.
303
- *
304
- * @public
305
- */
306
- interface Narsil extends IndexLifecycleOperations, DocumentWriteOperations, SynonymOperations, AnalysisOperations, BM25Operations, AdapterRegistrationOperations {
307
- /**
308
- * Creates an index you can insert documents into and query.
309
- *
310
- * The schema sets the type of each field, marks which fields you can
311
- * filter and sort on, and controls how the engine tokenises text. The
312
- * `language` option picks the analyser that stems those text fields.
313
- *
314
- * @param name - Every later call uses this name to reach the index.
315
- * @param config - This carries the schema, and the language, partitioning,
316
- * and scoring settings.
317
- */
318
- createIndex(name: string, config: IndexConfig): Promise<void>;
319
- /**
320
- * Removes an index and everything it holds, including whatever persistence
321
- * wrote for it. The documents do not come back.
322
- *
323
- * @param name - The index to drop.
324
- */
325
- dropIndex(name: string): Promise<void>;
326
- /**
327
- * Lists every index this engine holds, with its size and its language.
328
- *
329
- * @returns One entry per index, in creation order.
330
- */
331
- listIndexes(): IndexInfo[];
332
- /**
333
- * Returns one index's document count, partition count, memory estimate,
334
- * language, and schema.
335
- *
336
- * @param indexName - The index to describe.
337
- * @returns The index's current figures.
338
- * @throws A `NarsilError` with `INDEX_NOT_FOUND` for an unknown name.
339
- */
340
- getStats(indexName: string): IndexStats;
341
- /**
342
- * Returns per-partition figures for one index, which is where you look when
343
- * an index grows unevenly or a rebalance is worth running.
344
- *
345
- * @param indexName - The index to describe.
346
- * @returns One entry per open partition, in partition order, or an empty list while the index is closed.
347
- */
348
- getPartitionStats(indexName: string): PartitionStatsResult[];
349
- /**
350
- * Fetches one stored document by id, without searching.
351
- *
352
- * A vector field comes back as a `Float32Array`, whatever form you give it.
353
- * `JSON.stringify` writes one as an object keyed by index, so convert it
354
- * with `Array.from`, or project the field away, before you serialise the
355
- * document yourself. The HTTP routes convert it for you.
356
- *
357
- * @param indexName - The index holding the document.
358
- * @param docId - The document to fetch.
359
- * @returns The document, or `undefined` when the index holds no such id.
360
- */
361
- get(indexName: string, docId: string): Promise<AnyDocument | undefined>;
362
- /**
363
- * Fetches many stored documents by id in one pass.
364
- *
365
- * @param indexName - The index holding the documents.
366
- * @param docIds - The documents to fetch.
367
- * @returns A map from id to document, holding an entry for each id that
368
- * exists and nothing for the rest.
369
- */
370
- getMultiple(indexName: string, docIds: string[]): Promise<Map<string, AnyDocument>>;
371
- /**
372
- * Reports whether an index holds a document, without reading it.
373
- *
374
- * @param indexName - The index to check.
375
- * @param docId - The document to look for.
376
- * @returns True when the index holds that id.
377
- */
378
- has(indexName: string, docId: string): Promise<boolean>;
379
- /**
380
- * Counts the documents an index holds.
381
- *
382
- * @param indexName - The index to count.
383
- * @returns The document count across every partition.
384
- */
385
- countDocuments(indexName: string): Promise<number>;
386
- /**
387
- * Reads one page of stored documents in document-id order, without
388
- * searching, which is how you page through a whole index.
389
- *
390
- * Leave `cursor` out for the first page, pass the returned cursor back for
391
- * each page after it, and stop when the cursor comes back null. A document
392
- * that stays in the index for the whole listing comes back exactly once. The
393
- * engine skips a document you remove part-way through. It returns one you
394
- * insert part-way through once that document's id sorts above the cursor.
395
- * The cursor holds no engine state, so it stays valid after a restart, a
396
- * snapshot restore, and a rebalance.
397
- *
398
- * The engine compares document ids by their UTF-16 code units, so `"10"`
399
- * sorts ahead of `"9"`.
400
- *
401
- * Set `document` to drop a vector field, because the engine otherwise reads
402
- * every listed document's vector back out of the index.
403
- *
404
- * @typeParam T - Shape of the stored documents, which flows through to each
405
- * entry's `document`.
406
- * @param indexName - The index to walk.
407
- * @param params - These set the cursor, the page size, the filter, and how
408
- * much of each document comes back.
409
- * @returns The page, the cursor for the next page, how many documents the
410
- * listing walks in total, and the time the page took.
411
- */
412
- listDocuments<T = AnyDocument>(indexName: string, params?: ListParams): Promise<ListResult<T>>;
413
- /**
414
- * Runs a search against an index and returns the ranked hits.
415
- *
416
- * One call covers keyword search, vector search, and a hybrid of the two,
417
- * chosen by the `mode` parameter. BM25 ranks keyword results by default.
418
- * Every hit carries its score and its document, along with highlights when
419
- * you ask for them.
420
- *
421
- * @typeParam T - Shape of the stored documents, which flows through to each
422
- * hit's `document`.
423
- * @param indexName - The index the search runs against.
424
- * @param params - These set the search term, filters, field boosts, sorting,
425
- * facets, highlighting, and the result limit.
426
- * @returns The hits, the total count, the elapsed time, and any facets or
427
- * groups the query asked for.
428
- */
429
- query<T = AnyDocument>(indexName: string, params: QueryParams): Promise<QueryResult<T>>;
430
- /**
431
- * Counts what a query would match without building a single hit, which is
432
- * how a result-count badge stays cheap. A full-text count also skips scoring
433
- * unless the query carries `minScore`, which prunes matches by score, or a
434
- * `termMatch` policy other than `any`, which prunes them by term coverage. A
435
- * vector or hybrid count still runs its search.
436
- *
437
- * @param indexName - The index the query would run against.
438
- * @param params - The same parameters {@link Narsil.query} takes. Anything
439
- * that shapes the output alone, such as `limit` or `highlight`, is ignored.
440
- * @returns The match count and the time the count took.
441
- */
442
- preflight(indexName: string, params: QueryParams): Promise<PreflightResult>;
443
- /**
444
- * Returns the indexed terms that complete a prefix, ready to offer as
445
- * you-type suggestions.
446
- *
447
- * The terms come back as the index holds them, which means stems unless the
448
- * index was created with `surfaceForms`.
449
- *
450
- * @param indexName - The index to draw completions from.
451
- * @param params - The prefix typed so far, and how many completions to
452
- * return.
453
- * @returns The completions, most widely used first.
454
- */
455
- suggest(indexName: string, params: SuggestParams): Promise<SuggestResult>;
456
- /**
457
- * Rebuilds an index's terms from the documents it already stores, and
458
- * resolves once every partition carries terms the current language module
459
- * produced.
460
- *
461
- * An index whose stored analysis revision differs from the one its language
462
- * module carries answers text queries from terms an earlier analysis wrote,
463
- * and every such result reports `analysisStale`. Call this after the engine
464
- * reports a stale index to configuration that declined an automatic rebuild.
465
- * Calling it for an index whose terms are current does nothing.
466
- *
467
- * @param indexName - The index whose terms are rebuilt.
468
- */
469
- rebuildAnalysis(indexName: string): Promise<void>;
470
- /**
471
- * Returns a stream of the index's snapshot archive. The archive is a pax
472
- * file containing the index's configuration and the files of one
473
- * checkpoint, and any implementation of the Narsil format can restore it.
474
- *
475
- * With write-ahead log durability, the engine takes a checkpoint before it
476
- * starts the stream, so the archive contains every write that the engine
477
- * acknowledged before the call. The engine keeps that checkpoint's files on
478
- * disk until the stream ends or you cancel it. Without write-ahead log
479
- * durability, the engine builds the archive's files from the index in
480
- * memory.
481
- *
482
- * @param indexName - The index to stream.
483
- * @returns A stream of the archive's bytes, which you can write to a file or
484
- * send over a network.
485
- */
486
- snapshot(indexName: string): Promise<ReadableStream<Uint8Array>>;
487
- /**
488
- * Creates an index from a snapshot under the name that you pass, replacing
489
- * any index of that name.
490
- *
491
- * The engine accepts the archive that {@link Narsil.snapshot} streams and
492
- * the `.nrsl` file of release 0.3. It checks each archive file against its
493
- * manifest and loads the restored index beside the existing one, which
494
- * answers requests until the swap. A failed restore leaves the existing index
495
- * serving, and after a crash the engine reopens either the old or the new one.
496
- *
497
- * @param indexName - The name that the restored index takes.
498
- * @param data - The snapshot's bytes, as an array, a stream, or async chunks.
499
- * @throws A `NarsilError` with `PERSISTENCE_LOAD_FAILED` when the archive is
500
- * malformed or a file's length differs from the manifest. The engine raises
501
- * `PERSISTENCE_CRC_MISMATCH` when a file's checksum differs from its
502
- * contents, and `ENVELOPE_VERSION_MISMATCH` when a file has a format version
503
- * other than the ones that this release implements. It raises
504
- * `CONFIG_INVALID` when the archive's configuration is invalid,
505
- * `DOC_VALIDATION_FAILED` when the data is empty or the release 0.3 file is
506
- * invalid, `RESTORE_MEMORY_EXCEEDED` when the restored index needs more
507
- * memory than the process has free, and `WORKER_TIMEOUT` when a
508
- * worker still holds the old index 30 seconds after the engine asks for it.
509
- */
510
- restore(indexName: string, data: ByteSource): Promise<void>;
511
- /**
512
- * Returns a stream of the index's document export. The export is JSON Lines
513
- * text whose format stays the same in every release, so you can use it to
514
- * move an index across releases or between implementations.
515
- *
516
- * The first line is a header containing the format name, the format
517
- * version, and the index configuration. Each later line contains one
518
- * document, with its ID under `id` and the value of each vector field as an
519
- * array of numbers. With write-ahead log durability, the engine exports every
520
- * document from one checkpoint; otherwise, it exports them from the index in
521
- * memory at one moment.
522
- *
523
- * JSON has no type for a date, for raw bytes, or for an infinite number or
524
- * `NaN`, so the engine writes each such value as a tag. Each tag is an
525
- * object with one key that begins with `$`, such as
526
- * `{"$date":[1700000000,123000000]}`. The engine also wraps a stored object
527
- * whose only key begins with `$` in an `$object` tag, because the import
528
- * decodes every other object of that shape as a tag.
529
- *
530
- * @param indexName - The index to export.
531
- * @returns A stream of the export's UTF-8 bytes.
532
- */
533
- exportDocuments(indexName: string): Promise<ReadableStream<Uint8Array>>;
534
- /**
535
- * Imports a document export into the named index. Where the name is free,
536
- * the engine creates the index from the export's configuration.
537
- *
538
- * The engine writes the documents in batches and replaces any document
539
- * whose ID the index already contains. Because it replaces existing
540
- * documents, you can run an interrupted import again to make the index equal
541
- * to the export. When a line is invalid or the engine rejects its document,
542
- * the engine records the refusal and continues with the next line.
543
- *
544
- * The engine converts each tag that {@link Narsil.exportDocuments} writes
545
- * into the value that the tag stands for. When an object has one key that
546
- * begins with `$` and that key names no tag, or when a tag holds an invalid
547
- * value, the engine refuses the line.
548
- *
549
- * @param indexName - The index that receives the documents.
550
- * @param data - The export's bytes, as one array, a stream, or an async
551
- * iterable of chunks.
552
- * @returns The number of imported documents, the number of refused lines,
553
- * and the 1,000 refusals with the lowest line numbers.
554
- * @throws A `NarsilError` with `CONFIG_INVALID` when the first line is
555
- * anything other than a version 1 header, or when the named index exists
556
- * with a different schema.
557
- */
558
- importDocumentExport(indexName: string, data: ByteSource): Promise<DocumentImportResult>;
559
- /**
560
- * Writes an index's current state to the durability directory, so a restart
561
- * replays less of the log.
562
- *
563
- * @param indexName - The index to checkpoint.
564
- */
565
- checkpoint(indexName: string): Promise<void>;
566
- /**
567
- * Removes every document from an index and keeps the index itself, along
568
- * with its schema and settings.
569
- *
570
- * @param indexName - The index to empty.
571
- */
572
- clear(indexName: string): Promise<void>;
573
- /**
574
- * Spreads an index's documents across a different number of partitions.
575
- *
576
- * The engine keeps answering queries throughout, and it queues the writes
577
- * that arrive while the work runs, replaying them in order once it finishes.
578
- *
579
- * @param indexName - The index to rebalance.
580
- * @param targetPartitionCount - Partitions the index ends up with.
581
- */
582
- rebalance(indexName: string, targetPartitionCount: number): Promise<void>;
583
- /**
584
- * Changes how an index grows into new partitions, without moving the
585
- * documents it already holds.
586
- *
587
- * @param indexName - The index to reconfigure.
588
- * @param config - The partitioning fields to change. Anything you leave out
589
- * keeps its current value.
590
- */
591
- updatePartitionConfig(indexName: string, config: Partial<PartitionConfig>): Promise<void>;
592
- /**
593
- * Reports what this engine and its host process are using, which is what you
594
- * size a host from.
595
- *
596
- * @returns Process heap figures, the engine's own estimate, and one entry
597
- * per worker once the engine has promoted.
598
- */
599
- getMemoryStats(): Promise<MemoryStats>;
600
- /**
601
- * Rebuilds a vector field's graph without the tombstones removed documents
602
- * left behind, which returns the memory they held and speeds searches up.
603
- *
604
- * Read {@link Narsil.vectorMaintenanceStatus} first to see whether the work
605
- * is worth its cost.
606
- *
607
- * @param indexName - The index holding the field.
608
- * @param fieldName - The vector field to compact. Omit it to compact every
609
- * vector field in the index.
610
- */
611
- compactVectors(indexName: string, fieldName?: string): Promise<void>;
612
- /**
613
- * Rebuilds a vector field's graph from scratch, which recovers the recall a
614
- * long run of inserts and removals costs.
615
- *
616
- * This is heavier than {@link Narsil.compactVectors} and gives a better
617
- * graph, so run it once a search starts missing documents it should find,
618
- * rather than on a schedule.
619
- *
620
- * @param indexName - The index holding the field.
621
- * @param fieldName - The vector field to rebuild. Omit it to rebuild every
622
- * vector field in the index.
623
- */
624
- optimizeVectors(indexName: string, fieldName?: string): Promise<void>;
625
- /**
626
- * Reports the state of each vector field in an index, and what compaction or
627
- * optimisation would cost.
628
- *
629
- * @param indexName - The index to describe.
630
- * @returns One entry per vector field, or an empty list while the index is closed.
631
- */
632
- vectorMaintenanceStatus(indexName: string): VectorMaintenanceResult[];
633
- /**
634
- * Starts delivering one kind of engine event to your listener.
635
- *
636
- * These events report work the engine does on its own, away from the call
637
- * that triggered it, so this is where a failed background save or a worker
638
- * crash reaches you.
639
- *
640
- * @typeParam K - The event name, which fixes the payload the listener gets.
641
- * @param event - Which event to listen for.
642
- * @param handler - Called once per event.
643
- */
644
- on<K extends keyof NarsilEventMap>(event: K, handler: (payload: NarsilEventMap[K]) => void): void;
645
- /**
646
- * Removes a listener {@link Narsil.on} registered, so it receives no
647
- * further events.
648
- *
649
- * @typeParam K - The event name.
650
- * @param event - The event the listener was registered for.
651
- * @param handler - The same function reference that was registered.
652
- */
653
- off<K extends keyof NarsilEventMap>(event: K, handler: (payload: NarsilEventMap[K]) => void): void;
654
- /**
655
- * Closes the engine: it flushes pending writes, ends its workers, and
656
- * releases every adapter it opened.
657
- *
658
- * Call it before the process exits, because writes still in flight are lost
659
- * otherwise. The engine rejects new work once this starts.
660
- */
661
- shutdown(): Promise<void>;
662
- }
663
-
664
- export type { AnalysisChange as A, BM25Operations as B, DocumentWriteOperations as D, IndexLifecycleOperations as I, Narsil as N, SynonymOperations as S, AdapterRegistrationOperations as a, AnalysisOperations as b, ByteSource as c };