@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,12 +1,14 @@
1
- import { partialWordSearchModule } from './chunk-SOUZMPME.mjs';
1
+ import { partialWordSearchModule } from './chunk-4KRC2APY.mjs';
2
2
  import './chunk-FQBFZAWG.mjs';
3
- import './chunk-65WCV5JO.mjs';
3
+ import './chunk-WQRN64Q6.mjs';
4
+ import './chunk-GES7U2PM.mjs';
5
+ import './chunk-I54T6CQP.mjs';
6
+ import './chunk-4BYWRYPM.mjs';
4
7
  import './chunk-4UMZ7KQL.mjs';
5
- import './chunk-ZXX5GZEX.mjs';
6
- import './chunk-KYVRZAYP.mjs';
7
8
  import './chunk-L5ORED7V.mjs';
9
+ import './chunk-ZXX5GZEX.mjs';
8
10
  import './chunk-U476IXKQ.mjs';
9
- import './chunk-MDF6PDIA.mjs';
11
+ import './chunk-MP7ABPTD.mjs';
10
12
  import './chunk-R6A773WK.mjs';
11
13
  import './chunk-YTJCGKM4.mjs';
12
14
 
package/dist/pattern.mjs CHANGED
@@ -1,8 +1,9 @@
1
- import { patternSearchModule } from './chunk-U46IZNCW.mjs';
1
+ import { patternSearchModule } from './chunk-LC3FDWTX.mjs';
2
2
  import './chunk-JUKYYXSP.mjs';
3
- import './chunk-KYVRZAYP.mjs';
3
+ import './chunk-GES7U2PM.mjs';
4
+ import './chunk-I54T6CQP.mjs';
4
5
  import './chunk-L5ORED7V.mjs';
5
- import './chunk-MDF6PDIA.mjs';
6
+ import './chunk-MP7ABPTD.mjs';
6
7
  import './chunk-YTJCGKM4.mjs';
7
8
 
8
9
  // src/pattern/index.ts
@@ -1,4 +1,5 @@
1
- import { c as BM25FieldParams, P as PartitionConfig, e as ScoringMode, V as VectorIndexConfig } from '../../schema-D33CyXCy.js';
1
+ import { c as BM25FieldParams, P as PartitionConfig, e as ScoringMode, V as VectorIndexConfig } from '../../schema-Jwt928nJ.js';
2
+ import { d as QuerySuggestionsSetting, i as QuerySuggestionsSource } from '../../query-suggestions-CBYkrQ5T.js';
2
3
  import '../../adapters-pljAqmrC.js';
3
4
  import '../../synonyms-CpOAHPa-.js';
4
5
 
@@ -219,6 +220,20 @@ interface IndexMetadata {
219
220
  vectorPromotion?: VectorIndexConfig;
220
221
  patternValueLimit?: number;
221
222
  synonyms?: unknown;
223
+ sync?: StoredSyncSetting;
224
+ syncActive?: boolean;
225
+ syncEpoch?: string;
226
+ querySuggestions?: StoredQuerySuggestions;
227
+ }
228
+ interface StoredQuerySuggestions {
229
+ querySuggestions?: QuerySuggestionsSetting;
230
+ bannedQueries?: string[];
231
+ querySuggestionsSource?: QuerySuggestionsSource;
232
+ }
233
+ interface StoredSyncSetting {
234
+ enabled: boolean;
235
+ historyMaxAgeMs?: number;
236
+ historyMaxBytes?: number;
222
237
  }
223
238
  /** Persisted so recovery can restore field mappings and rebind the adapter by
224
239
  * name; the name is absent when the index was configured with a bare instance. */
@@ -1,47 +1,58 @@
1
- import { createDurableDirectory } from '../../chunk-FDG4KXX5.mjs';
2
- import '../../chunk-BEZH7VEH.mjs';
3
- import '../../chunk-HLPRHOSO.mjs';
4
- import { writeCheckpointSegments } from '../../chunk-KQJVNPRM.mjs';
1
+ import { createDurableDirectory } from '../../chunk-ZHCUZZE5.mjs';
2
+ import { writeCheckpointSegments } from '../../chunk-S2EQU2GE.mjs';
3
+ import '../../chunk-BY6ZDGYS.mjs';
4
+ import '../../chunk-J4IWBIVY.mjs';
5
+ import '../../chunk-KXCVQWOR.mjs';
6
+ import { directoryCheckpointStore } from '../../chunk-UHICS3JI.mjs';
7
+ import '../../chunk-5FLRXF73.mjs';
5
8
  import '../../chunk-JDDXV6UF.mjs';
6
- import { CHECKPOINT_WORKER_HEARTBEAT_MS } from '../../chunk-CSHHU7PA.mjs';
7
- import '../../chunk-NPXVQS33.mjs';
8
- import { directoryCheckpointStore } from '../../chunk-7LDMWKP6.mjs';
9
- import '../../chunk-5QMHMELB.mjs';
10
- import '../../chunk-2PNYKG2D.mjs';
11
- import '../../chunk-6F6USYII.mjs';
12
- import '../../chunk-UGVUW27S.mjs';
13
- import '../../chunk-3HV7M5OJ.mjs';
14
- import '../../chunk-KAKQ74LS.mjs';
9
+ import '../../chunk-NF4DT3IH.mjs';
10
+ import '../../chunk-HLPRHOSO.mjs';
11
+ import { CHECKPOINT_WORKER_HEARTBEAT_MS } from '../../chunk-QDZJM7NI.mjs';
12
+ import '../../chunk-BEZH7VEH.mjs';
13
+ import '../../chunk-KMUNHGBQ.mjs';
14
+ import '../../chunk-L7ZD4L3K.mjs';
15
15
  import '../../chunk-HJSN7UYG.mjs';
16
- import '../../chunk-6BWLDLS3.mjs';
16
+ import '../../chunk-LHKOSI2J.mjs';
17
17
  import '../../chunk-XIHUI4KB.mjs';
18
- import '../../chunk-Q2UL2TPC.mjs';
19
18
  import '../../chunk-3MXV3VHR.mjs';
20
19
  import '../../chunk-EEBCDP36.mjs';
21
- import '../../chunk-2HJWQPR6.mjs';
20
+ import '../../chunk-Z2BE2MAM.mjs';
21
+ import '../../chunk-ZAUJFLEN.mjs';
22
+ import '../../chunk-GH4WQ22V.mjs';
23
+ import '../../chunk-3OH67G7R.mjs';
24
+ import '../../chunk-IPN7S4KX.mjs';
25
+ import '../../chunk-KAKQ74LS.mjs';
26
+ import '../../chunk-7GXJUJ24.mjs';
27
+ import '../../chunk-Q2UL2TPC.mjs';
28
+ import '../../chunk-LC3FDWTX.mjs';
29
+ import '../../chunk-JUKYYXSP.mjs';
30
+ import '../../chunk-4KRC2APY.mjs';
31
+ import '../../chunk-FQBFZAWG.mjs';
32
+ import '../../chunk-WQRN64Q6.mjs';
33
+ import '../../chunk-GES7U2PM.mjs';
34
+ import '../../chunk-I54T6CQP.mjs';
35
+ import '../../chunk-YEDIDCR7.mjs';
22
36
  import '../../chunk-X5CV2E2B.mjs';
37
+ import '../../chunk-Y4WPNHMC.mjs';
38
+ import '../../chunk-RZWWB2XR.mjs';
23
39
  import '../../chunk-TGP5M5R7.mjs';
40
+ import '../../chunk-4BYWRYPM.mjs';
41
+ import '../../chunk-4UMZ7KQL.mjs';
24
42
  import '../../chunk-U2BKYEC7.mjs';
25
- import '../../chunk-DGRM4EZZ.mjs';
26
43
  import '../../chunk-QHPYS427.mjs';
27
44
  import '../../chunk-QYRNLLLI.mjs';
45
+ import '../../chunk-HNVVEQP7.mjs';
28
46
  import '../../chunk-ZXNQEW43.mjs';
47
+ import '../../chunk-L5ORED7V.mjs';
29
48
  import '../../chunk-KOKM4PQN.mjs';
30
- import '../../chunk-NVTFQFUL.mjs';
31
- import '../../chunk-LQG5G2LY.mjs';
49
+ import '../../chunk-Q7G3BV3Y.mjs';
32
50
  import '../../chunk-BTPGQC6Z.mjs';
33
- import '../../chunk-RFBLQLLZ.mjs';
34
- import '../../chunk-U46IZNCW.mjs';
35
- import '../../chunk-JUKYYXSP.mjs';
36
- import '../../chunk-SOUZMPME.mjs';
37
- import '../../chunk-FQBFZAWG.mjs';
38
- import '../../chunk-65WCV5JO.mjs';
39
- import '../../chunk-4UMZ7KQL.mjs';
51
+ import '../../chunk-LQG5G2LY.mjs';
40
52
  import '../../chunk-ZXX5GZEX.mjs';
41
- import '../../chunk-KYVRZAYP.mjs';
42
- import '../../chunk-L5ORED7V.mjs';
53
+ import '../../chunk-RFBLQLLZ.mjs';
43
54
  import '../../chunk-U476IXKQ.mjs';
44
- import '../../chunk-MDF6PDIA.mjs';
55
+ import '../../chunk-MP7ABPTD.mjs';
45
56
  import '../../chunk-R6A773WK.mjs';
46
57
  import '../../chunk-YTJCGKM4.mjs';
47
58
 
@@ -1,7 +1,7 @@
1
1
  import { createBitSet, bitsetIsEmpty, GrowableUint32, bitsetHas, bitsetSet } from './chunk-JUKYYXSP.mjs';
2
2
  import { MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-FQBFZAWG.mjs';
3
3
  import { PHRASE_ROWS_START, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-4UMZ7KQL.mjs';
4
- import { NarsilError, ErrorCodes } from './chunk-MDF6PDIA.mjs';
4
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
5
5
 
6
6
  // src/core/partition/phrase-matching.ts
7
7
  var UINT32_BITS = 32;
@@ -1,8 +1,8 @@
1
- import { fnv1a } from './chunk-KAKQ74LS.mjs';
2
1
  import { resolveWorkerCount, SHUTDOWN_TIMEOUT_MS } from './chunk-3MXV3VHR.mjs';
2
+ import { fnv1a } from './chunk-KAKQ74LS.mjs';
3
3
  import { createRequestId } from './chunk-QHPYS427.mjs';
4
4
  import './chunk-BTPGQC6Z.mjs';
5
- import { NarsilError, ErrorCodes } from './chunk-MDF6PDIA.mjs';
5
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
6
6
 
7
7
  // src/workers/pool-memory.ts
8
8
  function toFinite(value) {
@@ -0,0 +1,55 @@
1
+ interface MergeSettings {
2
+ minPeople: number;
3
+ maxMergePhrases: number;
4
+ maxGroups: number;
5
+ markedGroups: readonly string[];
6
+ fingerprint: Uint8Array;
7
+ indexUuid: string | null;
8
+ clustered: boolean;
9
+ banned: readonly string[];
10
+ }
11
+ type FileOutcome = {
12
+ kind: 'merged';
13
+ day: string;
14
+ savedAt: number;
15
+ } | {
16
+ kind: 'damaged';
17
+ reason: string;
18
+ } | {
19
+ kind: 'other-key';
20
+ } | {
21
+ kind: 'other-index';
22
+ };
23
+ interface DuePhrase {
24
+ phrase: string;
25
+ count: number;
26
+ }
27
+ interface MergeResult {
28
+ groups: Record<string, DuePhrase[]>;
29
+ discarded: number;
30
+ }
31
+
32
+ type MergeRequest = {
33
+ type: 'start';
34
+ settings: MergeSettings;
35
+ } | {
36
+ type: 'file';
37
+ id: number;
38
+ day: string;
39
+ bytes: Uint8Array;
40
+ } | {
41
+ type: 'finish';
42
+ };
43
+ type MergeReply = {
44
+ type: 'file';
45
+ id: number;
46
+ outcome: FileOutcome;
47
+ } | {
48
+ type: 'result';
49
+ result: MergeResult;
50
+ } | {
51
+ type: 'error';
52
+ message: string;
53
+ };
54
+
55
+ export type { MergeReply, MergeRequest };
@@ -0,0 +1,81 @@
1
+ import { Merger } from '../chunk-BDRIVYOK.mjs';
2
+ import '../chunk-6L3XJXGU.mjs';
3
+ import '../chunk-GQPTDQCL.mjs';
4
+ import '../chunk-5YNRKI2C.mjs';
5
+ import '../chunk-KMUNHGBQ.mjs';
6
+ import '../chunk-L7ZD4L3K.mjs';
7
+ import '../chunk-HJSN7UYG.mjs';
8
+ import '../chunk-LHKOSI2J.mjs';
9
+ import '../chunk-XIHUI4KB.mjs';
10
+ import '../chunk-3MXV3VHR.mjs';
11
+ import '../chunk-EEBCDP36.mjs';
12
+ import '../chunk-Z2BE2MAM.mjs';
13
+ import '../chunk-ZAUJFLEN.mjs';
14
+ import '../chunk-GH4WQ22V.mjs';
15
+ import '../chunk-3OH67G7R.mjs';
16
+ import '../chunk-IPN7S4KX.mjs';
17
+ import '../chunk-KAKQ74LS.mjs';
18
+ import '../chunk-7GXJUJ24.mjs';
19
+ import '../chunk-Q2UL2TPC.mjs';
20
+ import '../chunk-LC3FDWTX.mjs';
21
+ import '../chunk-JUKYYXSP.mjs';
22
+ import '../chunk-4KRC2APY.mjs';
23
+ import '../chunk-FQBFZAWG.mjs';
24
+ import '../chunk-WQRN64Q6.mjs';
25
+ import '../chunk-GES7U2PM.mjs';
26
+ import '../chunk-I54T6CQP.mjs';
27
+ import '../chunk-YEDIDCR7.mjs';
28
+ import '../chunk-X5CV2E2B.mjs';
29
+ import '../chunk-Y4WPNHMC.mjs';
30
+ import '../chunk-RZWWB2XR.mjs';
31
+ import '../chunk-TGP5M5R7.mjs';
32
+ import '../chunk-4BYWRYPM.mjs';
33
+ import '../chunk-4UMZ7KQL.mjs';
34
+ import '../chunk-U2BKYEC7.mjs';
35
+ import '../chunk-QHPYS427.mjs';
36
+ import '../chunk-QYRNLLLI.mjs';
37
+ import '../chunk-HNVVEQP7.mjs';
38
+ import '../chunk-ZXNQEW43.mjs';
39
+ import '../chunk-L5ORED7V.mjs';
40
+ import '../chunk-KOKM4PQN.mjs';
41
+ import '../chunk-Q7G3BV3Y.mjs';
42
+ import '../chunk-BTPGQC6Z.mjs';
43
+ import '../chunk-LQG5G2LY.mjs';
44
+ import '../chunk-ZXX5GZEX.mjs';
45
+ import '../chunk-RFBLQLLZ.mjs';
46
+ import '../chunk-U476IXKQ.mjs';
47
+ import '../chunk-MP7ABPTD.mjs';
48
+ import '../chunk-R6A773WK.mjs';
49
+ import '../chunk-YTJCGKM4.mjs';
50
+
51
+ // src/query-suggestions/merge-worker.ts
52
+ async function listen() {
53
+ let port = null;
54
+ try {
55
+ port = (await import('worker_threads')).parentPort ?? null;
56
+ } catch {
57
+ port = null;
58
+ }
59
+ if (port === null) return;
60
+ const replies = port;
61
+ let merger = null;
62
+ let queue = Promise.resolve();
63
+ replies.on("message", (request) => {
64
+ queue = queue.then(async () => {
65
+ try {
66
+ if (request.type === "start") merger = new Merger(request.settings);
67
+ else if (merger === null) throw new Error("The merge received work before it started");
68
+ else if (request.type === "file") {
69
+ const outcome = await merger.addFile(request.bytes, request.day);
70
+ replies.postMessage({ type: "file", id: request.id, outcome });
71
+ } else replies.postMessage({ type: "result", result: merger.result() });
72
+ } catch (error) {
73
+ replies.postMessage({
74
+ type: "error",
75
+ message: error instanceof Error ? error.message : String(error)
76
+ });
77
+ }
78
+ });
79
+ });
80
+ }
81
+ void listen();
@@ -0,0 +1,311 @@
1
+ /**
2
+ * The popular query suggestions setting of one index. Only `enabled` and
3
+ * `fields` are required, and each limit that you leave out takes its default.
4
+ *
5
+ * @public
6
+ */
7
+ interface QuerySuggestionsSetting {
8
+ /** Set this to true to count searches for the index and build its suggestions. */
9
+ enabled: boolean;
10
+ /** The `string` and `string[]` fields whose text a phrase must match before the engine publishes it. */
11
+ fields: string[];
12
+ /** The number of people, from 2 to 4,096, who must search a phrase before the engine publishes it. Defaults to 4. */
13
+ minPeople?: number;
14
+ /** The number of documents, from 1 to 10,000, that a phrase must match with every word. Defaults to 5. */
15
+ minResults?: number;
16
+ /** The number of days, from 1 to 365, that the engine keeps the counts of a day. Defaults to 30. */
17
+ retentionDays?: number;
18
+ /** The number of phrases, up to 16,384, that a node counts for the index each day. Defaults to 10,000. */
19
+ maxPhrasesPerDay?: number;
20
+ /** The number of phrases, up to 1,000, that a node counts for one person each day. Defaults to 100. */
21
+ maxPhrasesPerPerson?: number;
22
+ /** The number of people, up to 100,000, that a node counts for the index each day. Defaults to 100,000. */
23
+ maxPeoplePerDay?: number;
24
+ /** The number of groups, up to 1,000, that the index counts. Defaults to 100. */
25
+ maxGroups?: number;
26
+ /** The number of letters that a phrase must hold. Defaults to 4. */
27
+ minLetters?: number;
28
+ /** The number of characters, up to 150, that a phrase may hold. Defaults to 100. */
29
+ maxLength?: number;
30
+ /** The number of words, up to 50, that a phrase may hold. Defaults to 8. */
31
+ maxWords?: number;
32
+ /** The number of digits that a phrase may hold in total. Defaults to 5. */
33
+ maxDigits?: number;
34
+ /** The number of phrases, up to 500,000, that one build merges. Defaults to 100,000. */
35
+ maxMergePhrases?: number;
36
+ /** The memory, from 16 MiB to 1 GiB, of the worker that merges the counts. Defaults to 128 MiB. */
37
+ mergeMemoryBytes?: number;
38
+ /** How often, from 1 second to 1 hour, a node saves the counts of the day. Defaults to 5 minutes. */
39
+ saveIntervalMs?: number;
40
+ /** The number of result checks, up to 1,000, that a build runs each second. Defaults to 20. */
41
+ resultChecksPerSecond?: number;
42
+ /** A cron expression of five fields, or `off`. Defaults to `0 3 * * *`. */
43
+ schedule?: string;
44
+ /** The IANA time zone of `schedule`. Defaults to `UTC`. */
45
+ timeZone?: string;
46
+ }
47
+ /**
48
+ * The marker that the engine gives each suggestions index: the index whose
49
+ * searches it holds, and the group that it serves.
50
+ *
51
+ * @public
52
+ */
53
+ interface QuerySuggestionsSource {
54
+ /** The index whose searches the suggestions come from. */
55
+ index: string;
56
+ /** The group whose searches the suggestions come from. */
57
+ group: string;
58
+ }
59
+ /**
60
+ * Why a node counted no search, or `recorded` where it counted one.
61
+ *
62
+ * @public
63
+ */
64
+ type RecordQueryOutcome = 'recorded' | 'repeat' | 'invalid' | 'banned' | 'person-limit' | 'phrase-limit' | 'people-limit' | 'group-limit' | 'no-key' | 'unidentified';
65
+ /**
66
+ * What {@link QuerySuggestions.recordQuery} did with one search.
67
+ *
68
+ * @public
69
+ */
70
+ interface RecordQueryResult {
71
+ /** True where the node counted the search. */
72
+ recorded: boolean;
73
+ /** Why the node counted it or left it out. */
74
+ outcome: RecordQueryOutcome;
75
+ }
76
+ /**
77
+ * What started a build.
78
+ *
79
+ * @public
80
+ */
81
+ type QuerySuggestionsBuildTrigger = 'schedule' | 'missed' | 'caller';
82
+ /**
83
+ * One build of the suggestions of an index.
84
+ *
85
+ * @public
86
+ */
87
+ interface QuerySuggestionsBuild {
88
+ /** The ID of the build. */
89
+ buildId: string;
90
+ /** What started the build. */
91
+ trigger: QuerySuggestionsBuildTrigger;
92
+ /** Where the build stands. */
93
+ status: 'running' | 'completed' | 'failed' | 'skipped';
94
+ /** When the build started, in milliseconds since the Unix epoch. */
95
+ startedAt: number;
96
+ /** When the build ended, or null while it runs. */
97
+ endedAt: number | null;
98
+ /** The phrases that the build added or updated. */
99
+ published: number;
100
+ /** The phrases that the build removed. */
101
+ removed: number;
102
+ /** The phrases that the build left out because the merge held its limit. */
103
+ discarded: number;
104
+ /** The error code of a failed build, or null. */
105
+ errorCode: string | null;
106
+ }
107
+ /**
108
+ * The setting, the last build, and the next scheduled build of one index.
109
+ *
110
+ * @public
111
+ */
112
+ interface QuerySuggestionsStatus {
113
+ /** The index. */
114
+ indexName: string;
115
+ /** The setting, or null where nobody set one. */
116
+ setting: QuerySuggestionsSetting | null;
117
+ /** The last build, or null where none ran. */
118
+ lastBuild: QuerySuggestionsBuild | null;
119
+ /** When the schedule next matches, in milliseconds since the Unix epoch, or null where it is off. */
120
+ nextBuildAt: number | null;
121
+ /** The suggestions index of each group that holds one. */
122
+ suggestionIndexes: string[];
123
+ }
124
+ /**
125
+ * One phrase that a build would publish.
126
+ *
127
+ * @public
128
+ */
129
+ interface QuerySuggestionPreviewEntry {
130
+ /** The group whose suggestions index would hold the phrase. */
131
+ group: string;
132
+ /** The normalised phrase. */
133
+ query: string;
134
+ /** The number of people whose searches the counts hold. */
135
+ count: number;
136
+ }
137
+ /**
138
+ * What the next build would publish: the phrases that enough people searched
139
+ * for, that match enough documents, and that fall in a group the build keeps.
140
+ *
141
+ * @public
142
+ */
143
+ interface QuerySuggestionsPreview {
144
+ /** The phrases, most counted first. */
145
+ entries: QuerySuggestionPreviewEntry[];
146
+ /** True where the list stops at the limit that the caller passed while more phrases wait to be checked. */
147
+ truncated: boolean;
148
+ }
149
+ /**
150
+ * A suggestion that a caller adds by hand.
151
+ *
152
+ * @public
153
+ */
154
+ interface ManualQuerySuggestion {
155
+ /** The group whose suggestions index takes the phrase. */
156
+ group: string;
157
+ /** The phrase, which the engine normalises. */
158
+ query: string;
159
+ /** The count that ranks the phrase. Defaults to 0. */
160
+ count?: number;
161
+ }
162
+ /**
163
+ * The events of popular query suggestions. No event carries search text.
164
+ *
165
+ * @public
166
+ */
167
+ interface QuerySuggestionsBuildEvent {
168
+ /** The source index. */
169
+ indexName: string;
170
+ /** The ID of the build. */
171
+ buildId: string;
172
+ /** `started`, `completed`, `failed`, or `skipped`. */
173
+ phase: 'started' | 'completed' | 'failed' | 'skipped';
174
+ /** What started the build. */
175
+ trigger: QuerySuggestionsBuildTrigger;
176
+ /** The phrases that the build added or updated. */
177
+ published: number;
178
+ /** The phrases that the build removed. */
179
+ removed: number;
180
+ /** The phrases that the build left out. */
181
+ discarded: number;
182
+ /** The error code of a failed build. */
183
+ errorCode?: string;
184
+ }
185
+ /**
186
+ * Why the engine warns about popular query suggestions.
187
+ *
188
+ * @public
189
+ */
190
+ type QuerySuggestionsWarningReason = 'save-failed' | 'damaged-file' | 'other-key' | 'no-key' | 'phrase-limit' | 'people-limit' | 'ban-removal-failed';
191
+ /**
192
+ * A warning about popular query suggestions, which carries no search text.
193
+ *
194
+ * @public
195
+ */
196
+ interface QuerySuggestionsWarningEvent {
197
+ /** The source index. */
198
+ indexName: string;
199
+ /** What happened. */
200
+ reason: QuerySuggestionsWarningReason;
201
+ /** The history file that the warning concerns, where there is one. */
202
+ file?: string;
203
+ /** The error message of a failed save. */
204
+ message?: string;
205
+ }
206
+ /**
207
+ * One search that a person followed with a click.
208
+ *
209
+ * @public
210
+ */
211
+ interface RecordedQuery {
212
+ /** The search text, which the engine normalises before it counts it. */
213
+ query: string;
214
+ /** The ID of the person who searched, from 1 to 256 UTF-16 code units. The engine scrambles it with the key. */
215
+ person: string;
216
+ /** The audience whose suggestions the search counts towards, from 1 to 32 letters, digits, `_`, and `-`. */
217
+ group: string;
218
+ }
219
+ /**
220
+ * Popular query suggestions for one engine, which
221
+ * `querySuggestions(engine)` from `@delali/narsil/query-suggestions` returns.
222
+ *
223
+ * @public
224
+ */
225
+ interface QuerySuggestions {
226
+ /**
227
+ * Counts one search that a person followed with a click.
228
+ *
229
+ * @param indexName - The index that the person searched.
230
+ * @param query - The search, the person, and the group.
231
+ * @returns Whether the engine counted the search, and why not where it didn't.
232
+ */
233
+ recordQuery(indexName: string, query: RecordedQuery): Promise<RecordQueryResult>;
234
+ /**
235
+ * Replaces the setting of an index. Turning the feature off deletes the
236
+ * index's search history and keeps its suggestions indexes.
237
+ *
238
+ * @param indexName - The index whose searches the engine counts.
239
+ * @param setting - The setting, whose omitted limits take their defaults.
240
+ */
241
+ updateSetting(indexName: string, setting: QuerySuggestionsSetting): Promise<void>;
242
+ /**
243
+ * Reports the setting, the last build, and the next scheduled build.
244
+ *
245
+ * @param indexName - The source index.
246
+ * @returns The status of the index.
247
+ */
248
+ status(indexName: string): Promise<QuerySuggestionsStatus>;
249
+ /**
250
+ * Builds the suggestions of an index now. A build that finds another build
251
+ * of the index under way reports `skipped`.
252
+ *
253
+ * @param indexName - The source index.
254
+ * @returns The build once it ends.
255
+ */
256
+ build(indexName: string): Promise<QuerySuggestionsBuild>;
257
+ /**
258
+ * Lists what the next build would publish. The preview runs the same
259
+ * result checks as a build, at the same `resultChecksPerSecond`, until it
260
+ * holds `limit` phrases.
261
+ *
262
+ * @param indexName - The source index.
263
+ * @param limit - The most phrases to list, from 1 to 1,000. Defaults to 100.
264
+ * @returns The phrases, most counted first.
265
+ */
266
+ preview(indexName: string, limit?: number): Promise<QuerySuggestionsPreview>;
267
+ /**
268
+ * Returns the ban list of an index.
269
+ *
270
+ * @param indexName - The source index.
271
+ * @returns The banned phrases in their normal form.
272
+ */
273
+ bans(indexName: string): Promise<string[]>;
274
+ /**
275
+ * Replaces the ban list, and removes each newly banned phrase from every
276
+ * suggestions index of the index before it returns.
277
+ *
278
+ * @param indexName - The source index.
279
+ * @param phrases - At most 1,000 phrases, which the engine normalises.
280
+ * @returns The stored ban list.
281
+ */
282
+ updateBans(indexName: string, phrases: string[]): Promise<string[]>;
283
+ /**
284
+ * Bans a phrase and removes it from every suggestions index of the index.
285
+ *
286
+ * @param indexName - The source index.
287
+ * @param query - The phrase, which the engine normalises.
288
+ * @returns The number of suggestions indexes that held the phrase.
289
+ */
290
+ removeQuery(indexName: string, query: string): Promise<number>;
291
+ /**
292
+ * Adds a suggestion by hand, with `origin` set to `manual`, which a build
293
+ * leaves in place.
294
+ *
295
+ * @param indexName - The source index.
296
+ * @param suggestion - The group, the phrase, and its count.
297
+ * @returns The name of the suggestions index that holds it.
298
+ */
299
+ addSuggestion(indexName: string, suggestion: ManualQuerySuggestion): Promise<string>;
300
+ /**
301
+ * Returns the name of the suggestions index of a group, which an app
302
+ * queries with `{ term, prefix: true, termMatch: 'all', sort: { count: 'desc' } }`.
303
+ *
304
+ * @param indexName - The source index.
305
+ * @param group - The group.
306
+ * @returns The name of the suggestions index.
307
+ */
308
+ suggestionsIndexName(indexName: string, group: string): string;
309
+ }
310
+
311
+ export type { ManualQuerySuggestion as M, QuerySuggestionPreviewEntry as Q, RecordQueryOutcome as R, QuerySuggestionsBuild as a, QuerySuggestionsBuildTrigger as b, QuerySuggestionsPreview as c, QuerySuggestionsSetting as d, QuerySuggestionsStatus as e, RecordQueryResult as f, QuerySuggestions as g, QuerySuggestionsBuildEvent as h, QuerySuggestionsSource as i, QuerySuggestionsWarningEvent as j, QuerySuggestionsWarningReason as k, RecordedQuery as l };