@delali/narsil 0.3.1-next.154 → 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 (297) hide show
  1. package/README.md +1 -0
  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-4GCRVRBW.mjs → analysis-change-3TFIHT5E.mjs} +25 -25
  7. package/dist/{react-native/chunks/analysis-change-entry-TNLUC6IZ.mjs → analysis-change-entry-KA6JAO4X.mjs} +1 -1
  8. package/dist/archive-history-E4R73RWD.mjs +29 -0
  9. package/dist/browser/{analysis-change-IXWPXXJJ.mjs → analysis-change-TC36BU47.mjs} +29 -10
  10. package/dist/{analysis-change-entry-KYGSXW4K.mjs → browser/analysis-change-entry-4MH3CZXH.mjs} +1 -1
  11. package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
  12. package/dist/browser/{chunk-4PD752F6.mjs → chunk-23XRXIBW.mjs} +1 -1
  13. package/dist/browser/chunk-3UIEB4QF.mjs +63 -0
  14. package/dist/browser/{chunk-AJ4HHOVT.mjs → chunk-4EWUGZYZ.mjs} +4 -4
  15. package/dist/browser/{chunk-U2E3HMYW.mjs → chunk-4WCVMOU3.mjs} +1 -1
  16. package/dist/browser/{chunk-QXTPSX2H.mjs → chunk-56W3HQVJ.mjs} +7 -7
  17. package/dist/browser/{chunk-3U3QR5YP.mjs → chunk-5TCXK5SB.mjs} +2 -2
  18. package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
  19. package/dist/browser/{chunk-J433A7P3.mjs → chunk-A5KUEGDY.mjs} +5 -5
  20. package/dist/browser/{chunk-XRV72TJD.mjs → chunk-ABCXENU5.mjs} +2 -2
  21. package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
  22. package/dist/{react-native/chunks/chunk-3XKMRNRE.mjs → browser/chunk-BXM5XOCA.mjs} +27 -10
  23. package/dist/browser/chunk-CJSYBQ4J.mjs +100 -0
  24. package/dist/{react-native/chunks/chunk-DCKMICOB.mjs → browser/chunk-EXQZGUQH.mjs} +1 -1
  25. package/dist/browser/{chunk-VCOYGVP7.mjs → chunk-FNIFPFB7.mjs} +3 -3
  26. package/dist/browser/{chunk-ML6HY7T7.mjs → chunk-G64Q6OJF.mjs} +1 -1
  27. package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
  28. package/dist/browser/chunk-IKDKX5VQ.mjs +1007 -0
  29. package/dist/browser/{chunk-7TTWXUH6.mjs → chunk-JIJXMI42.mjs} +3 -2
  30. package/dist/browser/chunk-JVBP5EYO.mjs +1106 -0
  31. package/dist/browser/{chunk-2FX6ROWR.mjs → chunk-K4GCSZLI.mjs} +4 -4
  32. package/dist/browser/{chunk-EUNBNLKM.mjs → chunk-K5AXJBLL.mjs} +5 -5
  33. package/dist/browser/chunk-KKAMCABR.mjs +432 -0
  34. package/dist/browser/{chunk-7MEYN7V6.mjs → chunk-LFIWRCEA.mjs} +1 -9
  35. package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
  36. package/dist/browser/{chunk-W5X2UFWQ.mjs → chunk-NLWTBAGB.mjs} +12 -3
  37. package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
  38. package/dist/browser/{chunk-G7LUMBSG.mjs → chunk-RND5CLX3.mjs} +28 -18
  39. package/dist/browser/{chunk-AYY6PIKL.mjs → chunk-RQBUNZQW.mjs} +2 -2
  40. package/dist/browser/{chunk-C4KS2QNF.mjs → chunk-RRO3EV4C.mjs} +9 -9
  41. package/dist/browser/{chunk-2SHAKW2Z.mjs → chunk-SMEQ36NT.mjs} +80 -134
  42. package/dist/{chunk-KUZKUONM.mjs → browser/chunk-SRMZXJSL.mjs} +1 -0
  43. package/dist/{react-native/chunks/chunk-3O57C2ZO.mjs → browser/chunk-SUDNZKPL.mjs} +2 -2
  44. package/dist/browser/{chunk-SJB6VIZG.mjs → chunk-U3JOQGWX.mjs} +1 -1
  45. package/dist/browser/{chunk-H6QFBMVE.mjs → chunk-XY4VVBBO.mjs} +3 -3
  46. package/dist/browser/{cold-module-VTUGDYNY.mjs → cold-module-NEUGHUPA.mjs} +18 -17
  47. package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
  48. package/dist/browser/{durability-wiring-GL4A7KDV.mjs → durability-wiring-CVGPRO6D.mjs} +46 -150
  49. package/dist/browser/engine-hooks-YXMPHZKZ.mjs +16 -0
  50. package/dist/browser/{import-YI5GNB4H.mjs → import-OM6QAW45.mjs} +10 -9
  51. package/dist/browser/{methods-LMUTS7OI.mjs → methods-KTQCSIN4.mjs} +3 -3
  52. package/dist/browser/{module-EC3FYW7N.mjs → module-3HNFCBJ5.mjs} +10 -9
  53. package/dist/browser/{module-M4JNBV6V.mjs → module-E33X4AOK.mjs} +14 -13
  54. package/dist/browser/operations-OJ3BXS55.mjs +5 -0
  55. package/dist/browser/{phrase-module-NPYUVX75.mjs → phrase-module-ZXXU7S3B.mjs} +1 -1
  56. package/dist/browser/{pool-WCGDZHJP.mjs → pool-3JLET5RO.mjs} +1 -1
  57. package/dist/browser/restore-hooks-IF2ZROUP.mjs +113 -0
  58. package/dist/browser/restore-queue-ZBS7CJA6.mjs +55 -0
  59. package/dist/browser/{retention-6QMRS5VK.mjs → retention-ASWUHAYI.mjs} +16 -14
  60. package/dist/browser/{runtime-3EW2AGB6.mjs → runtime-OTAGEFQW.mjs} +1 -1
  61. package/dist/browser/{snapshot-DN3CRVUQ.mjs → snapshot-PN7ZW6Q4.mjs} +65 -31
  62. package/dist/browser/start-ZIRB7MQ2.mjs +24 -0
  63. package/dist/browser/{write-WAWAFGKQ.mjs → write-HMDYCTV2.mjs} +14 -13
  64. package/dist/{capabilities-B3Brs1Rc.d.ts → capabilities-Da4ywVVl.d.ts} +35 -3
  65. package/dist/{chunk-K4B7OH65.mjs → chunk-2MANFZJ3.mjs} +2 -2
  66. package/dist/{chunk-O43Z4MS6.mjs → chunk-2NE7VCYE.mjs} +2 -2
  67. package/dist/{chunk-3Y3J4V2R.mjs → chunk-3C7MTCCI.mjs} +1 -1
  68. package/dist/{chunk-RVKFI3A2.mjs → chunk-3HB3PEC6.mjs} +11 -8
  69. package/dist/chunk-3HHQLEEQ.mjs +1092 -0
  70. package/dist/{chunk-HVYICDY3.mjs → chunk-3OH67G7R.mjs} +1 -1
  71. package/dist/{chunk-QKZHLADX.mjs → chunk-3R4UZWQG.mjs} +26 -17
  72. package/dist/{chunk-ZIFJXCKA.mjs → chunk-4BYWRYPM.mjs} +1 -1
  73. package/dist/{chunk-VMXSVVXG.mjs → chunk-4KRC2APY.mjs} +5 -5
  74. package/dist/{chunk-IQ4R2I6N.mjs → chunk-5FLRXF73.mjs} +5 -1
  75. package/dist/chunk-5FVU47TB.mjs +20 -0
  76. package/dist/chunk-5YNRKI2C.mjs +81 -0
  77. package/dist/chunk-6L3XJXGU.mjs +470 -0
  78. package/dist/{chunk-C6ASEFZI.mjs → chunk-6OEGXLBX.mjs} +1 -1
  79. package/dist/{browser/chunk-SIR3LMTV.mjs → chunk-6RC4K46J.mjs} +2 -2
  80. package/dist/{chunk-466PYR4P.mjs → chunk-AILVAOLX.mjs} +2 -2
  81. package/dist/chunk-BDRIVYOK.mjs +72 -0
  82. package/dist/{chunk-TRISKD4Q.mjs → chunk-BY6ZDGYS.mjs} +2 -2
  83. package/dist/{chunk-NZMAXR2S.mjs → chunk-DCNKVEDB.mjs} +121 -10
  84. package/dist/{chunk-C73JLU4E.mjs → chunk-DIBHI6W5.mjs} +2 -2
  85. package/dist/{chunk-VREK3MYG.mjs → chunk-DUOLGBTE.mjs} +3 -3
  86. package/dist/{chunk-USR7FQRZ.mjs → chunk-GH4WQ22V.mjs} +2 -2
  87. package/dist/chunk-GQPTDQCL.mjs +54 -0
  88. package/dist/chunk-H4KHPLHJ.mjs +382 -0
  89. package/dist/{chunk-K7KLL263.mjs → chunk-H6VIGE62.mjs} +12 -12
  90. package/dist/{chunk-YROWNOMH.mjs → chunk-HJJI72X7.mjs} +1 -1
  91. package/dist/{chunk-37IVJLP6.mjs → chunk-HNVVEQP7.mjs} +1 -1
  92. package/dist/{chunk-PFKM7VNZ.mjs → chunk-HW5TNXBO.mjs} +28 -10
  93. package/dist/{chunk-3A5KI24C.mjs → chunk-I54T6CQP.mjs} +1 -1
  94. package/dist/{chunk-YBJDOA2T.mjs → chunk-INJYO3BU.mjs} +1 -1
  95. package/dist/{chunk-KCUIFVVW.mjs → chunk-J4IWBIVY.mjs} +9 -9
  96. package/dist/{chunk-AO2FAYIZ.mjs → chunk-K4ZIGL2O.mjs} +1 -1
  97. package/dist/{chunk-7NTMUDC5.mjs → chunk-KBDBPVLN.mjs} +5 -5
  98. package/dist/{chunk-JFNKIBDT.mjs → chunk-KBKEXQZA.mjs} +2 -2
  99. package/dist/{chunk-REL7LFLR.mjs → chunk-KFLK5NA2.mjs} +3 -3
  100. package/dist/{chunk-WCBA2LVZ.mjs → chunk-KHKIRS5D.mjs} +1 -1
  101. package/dist/{chunk-7QUGDVFC.mjs → chunk-KJ3RTZDJ.mjs} +1 -1
  102. package/dist/{chunk-LSM2YTKM.mjs → chunk-KMUNHGBQ.mjs} +81 -139
  103. package/dist/chunk-KP7TYHWT.mjs +92 -0
  104. package/dist/{chunk-MMBEANB2.mjs → chunk-KPIV4RUC.mjs} +3 -3
  105. package/dist/{chunk-62G63NMH.mjs → chunk-KXCVQWOR.mjs} +4 -4
  106. package/dist/{chunk-TV2L3BN7.mjs → chunk-L7ZD4L3K.mjs} +263 -263
  107. package/dist/{chunk-OKX2BBNW.mjs → chunk-LC3FDWTX.mjs} +2 -2
  108. package/dist/{chunk-URPCYQVJ.mjs → chunk-LHKOSI2J.mjs} +1 -1
  109. package/dist/chunk-LNGE7SLY.mjs +151 -0
  110. package/dist/{react-native/chunks/chunk-CUNGPR5R.mjs → chunk-MP7ABPTD.mjs} +1 -0
  111. package/dist/chunk-MT2NRTA6.mjs +216 -0
  112. package/dist/{chunk-Q3TCTQCC.mjs → chunk-NF4DT3IH.mjs} +1 -1
  113. package/dist/{chunk-3OFU3NJT.mjs → chunk-OIJ64LGT.mjs} +1 -1
  114. package/dist/{chunk-4HWZV5MK.mjs → chunk-PCRA7HTI.mjs} +5 -5
  115. package/dist/chunk-PHQNACDT.mjs +63 -0
  116. package/dist/{chunk-Q7MS6P2J.mjs → chunk-Q622CTMC.mjs} +2 -2
  117. package/dist/{chunk-HVKXNBFL.mjs → chunk-Q7G3BV3Y.mjs} +1 -1
  118. package/dist/{chunk-IBNLW3AV.mjs → chunk-QH3YIQP4.mjs} +20 -6
  119. package/dist/{chunk-B7S6YEBP.mjs → chunk-QJVOLKU6.mjs} +12 -3
  120. package/dist/chunk-QUJHMPTP.mjs +30 -0
  121. package/dist/{chunk-7HCZWC7B.mjs → chunk-RSVULW4Q.mjs} +49 -7
  122. package/dist/{chunk-YPUEV6ZC.mjs → chunk-RVGRFOGN.mjs} +1 -1
  123. package/dist/{chunk-JCLTESFN.mjs → chunk-RZWWB2XR.mjs} +1 -1
  124. package/dist/{chunk-X6NSJYQ3.mjs → chunk-S2EQU2GE.mjs} +13 -13
  125. package/dist/chunk-S5LN746F.mjs +10 -0
  126. package/dist/{chunk-MMEMEUOO.mjs → chunk-SG3JBNHY.mjs} +2 -2
  127. package/dist/{chunk-LKUE5GXS.mjs → chunk-SMVH6JBE.mjs} +2 -2
  128. package/dist/{chunk-IJU7LL7D.mjs → chunk-SY3EWKQY.mjs} +5 -5
  129. package/dist/{chunk-CP5RRPJR.mjs → chunk-TQXHPFWT.mjs} +1 -1
  130. package/dist/{chunk-5KGYQT6W.mjs → chunk-U4BS74YN.mjs} +26 -9
  131. package/dist/{chunk-S2N75OTN.mjs → chunk-UHICS3JI.mjs} +1 -1
  132. package/dist/chunk-UZRZKNNZ.mjs +101 -0
  133. package/dist/{chunk-DMQPFLGI.mjs → chunk-VGF7CFRP.mjs} +5 -5
  134. package/dist/chunk-VHBNF4MA.mjs +543 -0
  135. package/dist/{chunk-BPSKLCS7.mjs → chunk-VQEUR6T6.mjs} +3 -3
  136. package/dist/{chunk-Z3TNWCI5.mjs → chunk-WQRN64Q6.mjs} +2 -2
  137. package/dist/{chunk-LTUGDMV4.mjs → chunk-WZ7YV54N.mjs} +1 -1
  138. package/dist/{chunk-NTZOXVUZ.mjs → chunk-YEDIDCR7.mjs} +3 -3
  139. package/dist/{chunk-PGVPE7GJ.mjs → chunk-YEKL4JBK.mjs} +1 -1
  140. package/dist/{chunk-5FUOVJKG.mjs → chunk-Z2BE2MAM.mjs} +13 -13
  141. package/dist/{chunk-HWEDFLB7.mjs → chunk-ZAUJFLEN.mjs} +10 -10
  142. package/dist/{chunk-MLHNSAPK.mjs → chunk-ZHCUZZE5.mjs} +2 -2
  143. package/dist/{chunk-ECX4SGX6.mjs → chunk-ZTW5WTGG.mjs} +9 -9
  144. package/dist/{client-Df76GNKm.d.ts → client-DRv7UVeY.d.ts} +123 -11
  145. package/dist/client.d.ts +9 -8
  146. package/dist/client.mjs +65 -3
  147. package/dist/{cold-module-YLWMTTZG.mjs → cold-module-7XXCEGTZ.mjs} +35 -35
  148. package/dist/{config-B8DP2VwR.d.ts → config-CoSig5Ox.d.ts} +22 -3
  149. package/dist/{config-05G_hy-1.d.ts → config-DMwffLKn.d.ts} +20 -5
  150. package/dist/{direct-executor-FI5GJHWX.mjs → direct-executor-G5TK7NLA.mjs} +16 -16
  151. package/dist/distribution/coordinator/etcd.d.ts +2 -2
  152. package/dist/distribution/coordinator/etcd.mjs +1 -1
  153. package/dist/distribution/coordinator/in-memory.d.ts +2 -2
  154. package/dist/distribution/transport/grpc.mjs +4 -4
  155. package/dist/distribution/transport/in-memory.mjs +2 -2
  156. package/dist/distribution/transport/tcp.mjs +3 -3
  157. package/dist/distribution.d.ts +8 -8
  158. package/dist/distribution.mjs +6788 -5934
  159. package/dist/durability-config-GE4U7MCZ.mjs +89 -0
  160. package/dist/{durability-wiring-RHLXDIVF.mjs → durability-wiring-NCKUC5EO.mjs} +71 -175
  161. package/dist/embeddings/openai.mjs +2 -2
  162. package/dist/{sync-uXR7MmM7.d.ts → engine-CFxPYqEk.d.ts} +702 -2
  163. package/dist/engine-hooks-DHCMOADY.mjs +47 -0
  164. package/dist/{import-SRBNC6TE.mjs → import-NBFXFCSG.mjs} +26 -26
  165. package/dist/{index-nRqDM6uS.d.ts → index-C4AmUnl1.d.ts} +1 -1
  166. package/dist/index.browser.mjs +7 -6
  167. package/dist/index.d.ts +7 -7
  168. package/dist/index.mjs +23 -23
  169. package/dist/index.react-native.mjs +13 -12
  170. package/dist/{long-query-thread-EMYTGSJP.mjs → long-query-thread-J4DVRM4A.mjs} +25 -24
  171. package/dist/{methods-ABM5ELBR.mjs → methods-7IOINERF.mjs} +3 -3
  172. package/dist/{module-MG7JMV2U.mjs → module-DWKPBSMN.mjs} +31 -31
  173. package/dist/{module-3OMJZUFT.mjs → module-UN76TF7I.mjs} +11 -11
  174. package/dist/operations-G5EP6JPX.mjs +5 -0
  175. package/dist/{paged-partition-archive-UOLHOEZJ.mjs → paged-partition-archive-DPNWVSK2.mjs} +38 -34
  176. package/dist/partial-words.mjs +7 -7
  177. package/dist/pattern.mjs +3 -3
  178. package/dist/persistence/durability/checkpoint-worker.d.ts +8 -1
  179. package/dist/persistence/durability/checkpoint-worker.mjs +32 -32
  180. package/dist/{phrase-module-O3MDRQXP.mjs → phrase-module-ZI4WSQVH.mjs} +1 -1
  181. package/dist/{pool-CQXYPFLG.mjs → pool-Y4A46T36.mjs} +1 -1
  182. package/dist/query-suggestions/merge-worker.d.ts +55 -0
  183. package/dist/query-suggestions/merge-worker.mjs +81 -0
  184. package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
  185. package/dist/query-suggestions.browser.mjs +246 -0
  186. package/dist/query-suggestions.d.ts +20 -0
  187. package/dist/query-suggestions.mjs +62 -0
  188. package/dist/react-native/chunks/{analysis-change-EAYO3Y6Q.mjs → analysis-change-6BPDPH6K.mjs} +36 -17
  189. package/dist/{browser/analysis-change-entry-FCSHFQSS.mjs → react-native/chunks/analysis-change-entry-JLL42PH6.mjs} +1 -1
  190. package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
  191. package/dist/react-native/chunks/{chunk-O32RB3BL.mjs → chunk-3JIBF3XT.mjs} +3 -3
  192. package/dist/react-native/chunks/{chunk-75VWIY35.mjs → chunk-4DII3ZSM.mjs} +1 -1
  193. package/dist/react-native/chunks/{chunk-NKIZX26F.mjs → chunk-4J74WHQM.mjs} +2 -2
  194. package/dist/{browser/chunk-TTD27VXX.mjs → react-native/chunks/chunk-4LCEN2IU.mjs} +27 -10
  195. package/dist/react-native/chunks/{chunk-AUT7PMA4.mjs → chunk-4Y53T4YE.mjs} +5 -5
  196. package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
  197. package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
  198. package/dist/react-native/chunks/{chunk-SJWDBRNP.mjs → chunk-6WA3C3DV.mjs} +1 -1
  199. package/dist/react-native/chunks/chunk-7GRCBBME.mjs +63 -0
  200. package/dist/react-native/chunks/{chunk-7GWPJDOA.mjs → chunk-7PXRWYUU.mjs} +1 -1
  201. package/dist/react-native/chunks/{chunk-GFYFQLJD.mjs → chunk-ALOIBXWN.mjs} +2 -2
  202. package/dist/react-native/chunks/{chunk-VQSKZ3EZ.mjs → chunk-C3PTWYKT.mjs} +8 -8
  203. package/dist/react-native/chunks/{chunk-OQQVRWZ2.mjs → chunk-C5G6TJ7A.mjs} +1 -1
  204. package/dist/react-native/chunks/{chunk-RVAEBN74.mjs → chunk-CKNRFDTZ.mjs} +1 -1
  205. package/dist/react-native/chunks/{chunk-UWDNZDWK.mjs → chunk-CUH5F57W.mjs} +6 -6
  206. package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
  207. package/dist/react-native/chunks/{chunk-YBEW6YTR.mjs → chunk-DVDX4SDR.mjs} +2 -2
  208. package/dist/{browser/chunk-MYITLCHT.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +1 -0
  209. package/dist/react-native/chunks/{chunk-RYMDHGL4.mjs → chunk-EIOYM5TO.mjs} +5 -5
  210. package/dist/react-native/chunks/chunk-GIZTJXYW.mjs +1007 -0
  211. package/dist/react-native/chunks/{chunk-NP7DD4G5.mjs → chunk-GJFXPHXI.mjs} +5 -5
  212. package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
  213. package/dist/react-native/chunks/{chunk-63YSZOXB.mjs → chunk-HUOYZJ3Q.mjs} +88 -142
  214. package/dist/react-native/chunks/{chunk-DH3TVWWK.mjs → chunk-IYNT75CE.mjs} +12 -3
  215. package/dist/react-native/chunks/{chunk-NCJS3WIY.mjs → chunk-JLIIWJUV.mjs} +1 -1
  216. package/dist/react-native/chunks/chunk-KJIG57UD.mjs +1106 -0
  217. package/dist/react-native/chunks/{chunk-JX2RIAXH.mjs → chunk-KTTAU63H.mjs} +5 -5
  218. package/dist/{browser/chunk-ZPTA75ZC.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +1 -1
  219. package/dist/react-native/chunks/{chunk-ZBSWRSBG.mjs → chunk-MJDQU5MW.mjs} +1 -1
  220. package/dist/react-native/chunks/{chunk-IOY2SM2P.mjs → chunk-MVXELMJX.mjs} +1 -1
  221. package/dist/react-native/chunks/{chunk-2CGSQM4O.mjs → chunk-N2WUOWLL.mjs} +12 -12
  222. package/dist/react-native/chunks/{chunk-YHKZSLOC.mjs → chunk-OL3WDV53.mjs} +5 -5
  223. package/dist/react-native/chunks/{chunk-VVFYOADG.mjs → chunk-PEHS2UO3.mjs} +6 -6
  224. package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
  225. package/dist/react-native/chunks/chunk-QJXTNPLQ.mjs +100 -0
  226. package/dist/react-native/chunks/{chunk-EH5CFV6Z.mjs → chunk-RDWG33MM.mjs} +2 -2
  227. package/dist/react-native/chunks/{chunk-ZYDKJXQJ.mjs → chunk-SUPXRTMD.mjs} +1 -1
  228. package/dist/react-native/chunks/chunk-TYIRMPD3.mjs +432 -0
  229. package/dist/react-native/chunks/{chunk-JPAJWO6D.mjs → chunk-U4KSKA4Z.mjs} +1 -1
  230. package/dist/react-native/chunks/{chunk-I5PGWQJF.mjs → chunk-VXGE4ZXL.mjs} +31 -22
  231. package/dist/{chunk-DVWYODEB.mjs → react-native/chunks/chunk-WBYQRHDY.mjs} +2 -2
  232. package/dist/react-native/chunks/{chunk-C2H2QQFW.mjs → chunk-YH7QY657.mjs} +3 -3
  233. package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
  234. package/dist/react-native/chunks/{cold-module-TJL6AFAD.mjs → cold-module-5PHF6DZR.mjs} +24 -23
  235. package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
  236. package/dist/react-native/chunks/{durability-wiring-RRDYJLLM.mjs → durability-wiring-KO565FZC.mjs} +52 -156
  237. package/dist/react-native/chunks/engine-hooks-MVRRHH6B.mjs +28 -0
  238. package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
  239. package/dist/react-native/chunks/import-YVZA4V4V.mjs +30 -0
  240. package/dist/react-native/chunks/{methods-X6F36SJE.mjs → methods-6W5U4C3H.mjs} +3 -3
  241. package/dist/react-native/chunks/{module-S4DKSWMF.mjs → module-H5MVPSP2.mjs} +11 -10
  242. package/dist/react-native/chunks/{module-QT5HZAY4.mjs → module-ZL5ZG6YB.mjs} +20 -19
  243. package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
  244. package/dist/react-native/chunks/{phrase-module-JZ37TB7N.mjs → phrase-module-RTVKEWJT.mjs} +1 -1
  245. package/dist/react-native/chunks/{pool-RTGXJXPU.mjs → pool-JR3NJCAF.mjs} +1 -1
  246. package/dist/react-native/chunks/restore-hooks-SILFPU6B.mjs +125 -0
  247. package/dist/react-native/chunks/restore-queue-HSYP2AEC.mjs +55 -0
  248. package/dist/react-native/chunks/{retention-PPCTP2VY.mjs → retention-7I7UAWYK.mjs} +21 -19
  249. package/dist/react-native/chunks/{runtime-KUATOLYB.mjs → runtime-R5E3TB3J.mjs} +1 -1
  250. package/dist/react-native/chunks/{snapshot-ZBIEOZTZ.mjs → snapshot-EZYB6SLF.mjs} +70 -36
  251. package/dist/react-native/chunks/start-SHVZ72I5.mjs +36 -0
  252. package/dist/react-native/chunks/{write-2W4FTX7J.mjs → write-JUESXHDL.mjs} +20 -19
  253. package/dist/react-native/partial-words.mjs +7 -6
  254. package/dist/react-native/pattern.mjs +3 -3
  255. package/dist/react-native/query-suggestions.mjs +258 -0
  256. package/dist/react-native/sync.mjs +76 -13
  257. package/dist/react-native/synonyms.mjs +4 -4
  258. package/dist/react.d.ts +11 -11
  259. package/dist/react.mjs +1 -0
  260. package/dist/{rerank-IZOB6NII.mjs → rerank-MQ37IYRV.mjs} +4 -4
  261. package/dist/rerankers/http.mjs +2 -2
  262. package/dist/restore-hooks-HZ3ILAMO.mjs +146 -0
  263. package/dist/restore-queue-JVGENGGE.mjs +55 -0
  264. package/dist/{retention-55WA7GPU.mjs → retention-HROPV2QU.mjs} +33 -32
  265. package/dist/{runtime-UZOC3NPY.mjs → runtime-COIUORCN.mjs} +5 -5
  266. package/dist/{schema-DDauvDOv.d.ts → schema-Jwt928nJ.d.ts} +1 -1
  267. package/dist/server.d.ts +108 -12
  268. package/dist/server.mjs +293 -46
  269. package/dist/{snapshot-NFX2EYN2.mjs → snapshot-4HS2G2UM.mjs} +85 -54
  270. package/dist/start-UTWHGH42.mjs +59 -0
  271. package/dist/sync/filesystem.d.ts +4 -4
  272. package/dist/sync/filesystem.mjs +4 -4
  273. package/dist/sync/indexeddb.d.ts +4 -4
  274. package/dist/sync/indexeddb.mjs +2 -2
  275. package/dist/sync.browser.mjs +74 -11
  276. package/dist/sync.d.ts +5 -5
  277. package/dist/sync.mjs +76 -14
  278. package/dist/synonyms.mjs +5 -5
  279. package/dist/{tasks-BShx8pdK.d.ts → tasks-qrJojgST.d.ts} +13 -5
  280. package/dist/{thread-P2G2FWM2.mjs → thread-6MOXY2KD.mjs} +24 -23
  281. package/dist/{types-SnO7_tAI.d.ts → types-BZCGjfLn.d.ts} +2 -3
  282. package/dist/vector/search-worker.d.ts +1 -1
  283. package/dist/vector/search-worker.mjs +5 -5
  284. package/dist/workers/entry.mjs +8 -8
  285. package/dist/{write-FGB62BHQ.mjs → write-GTTWWRRG.mjs} +30 -30
  286. package/openapi.json +798 -7
  287. package/package.json +24 -7
  288. package/dist/browser/operations-WVYLF72Q.mjs +0 -5
  289. package/dist/browser/restore-queue-TYIGDL5L.mjs +0 -41
  290. package/dist/engine-DYu-e0oR.d.ts +0 -674
  291. package/dist/operations-PGOAY2KS.mjs +0 -5
  292. package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
  293. package/dist/react-native/chunks/gzip.react-native-DNB5YNFA.mjs +0 -3
  294. package/dist/react-native/chunks/import-JYBMEJPQ.mjs +0 -29
  295. package/dist/react-native/chunks/operations-RYKTSZQA.mjs +0 -5
  296. package/dist/react-native/chunks/restore-queue-ZBVIKJWI.mjs +0 -41
  297. package/dist/restore-queue-COI2GSSK.mjs +0 -41
@@ -1,16 +1,16 @@
1
- import { PROCESS_LIMIT_REFRESH_INTERVAL_MS } from './chunk-ZXNQEW43.mjs';
2
- import { turnIsSpent, yieldTurn, createDocIdMap } from './chunk-LQG5G2LY.mjs';
3
- import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, GEO_UNIT_METRES, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, TYPO_CLAIM_SLOTS_PER_WORD, FILTER_OPERAND_COPY_DEPTH, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-OKX2BBNW.mjs';
1
+ import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, GEO_UNIT_METRES, patternSearchModule, DEFAULT_PATTERN_WORK_CAP, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, TYPO_CLAIM_SLOTS_PER_WORD, FILTER_OPERAND_COPY_DEPTH, PATTERN_WORK_FLUSH_UNITS, MATCHER_STATE_BUDGET_BYTES } from './chunk-LC3FDWTX.mjs';
4
2
  import { bitsetHas, createBitSet, bitsetSet, bitsetIsEmpty, bitsetOrInto, bitsetAndNotInto, bitsetAndInto, bitsetFromSet } from './chunk-JUKYYXSP.mjs';
5
- import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, expandTermPrefix, suggestDisplayTerms, getNestedValue, validateDocument, validateDocumentStrict, textFieldsChanged, getFlatSchema, tokenizeOptions, partialWordSearchModule, ANTIMERIDIAN_SPAN_DEGREES, FULL_TURN_DEGREES, getOrCreateFieldNameIndex, partitionDocumentFrequency, LOCATION_CODE_BITS_PER_AXIS, MAX_COVERING_CELLS, VINCENTY_CONVERGENCE_THRESHOLD, EARTH_RADIUS_METERS, RADIUS_BOX_MARGIN_RATIO, RADIUS_BOX_MARGIN_RADIANS, DEG_TO_RAD, VINCENTY_MAX_ITERATIONS } from './chunk-VMXSVVXG.mjs';
6
- import { partialFieldsOf, schemaFieldsOf, flattenSchema } from './chunk-Z3TNWCI5.mjs';
3
+ import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, expandTermPrefix, suggestDisplayTerms, getNestedValue, validateDocument, validateDocumentStrict, textFieldsChanged, getFlatSchema, tokenizeOptions, partialWordSearchModule, ANTIMERIDIAN_SPAN_DEGREES, FULL_TURN_DEGREES, getOrCreateFieldNameIndex, partitionDocumentFrequency, LOCATION_CODE_BITS_PER_AXIS, MAX_COVERING_CELLS, VINCENTY_CONVERGENCE_THRESHOLD, EARTH_RADIUS_METERS, RADIUS_BOX_MARGIN_RATIO, RADIUS_BOX_MARGIN_RADIANS, DEG_TO_RAD, VINCENTY_MAX_ITERATIONS } from './chunk-4KRC2APY.mjs';
7
4
  import { MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, MAX_CURSOR_LENGTH, MAX_CURSOR_ANCHOR_CODE_POINTS, RESULT_WINDOW, DEFAULT_FUZZY_PREFIX_LENGTH, DEFAULT_PAGE_SIZE, PREFIX_MAX_EXPANSIONS } from './chunk-FQBFZAWG.mjs';
8
- import { tokenize, visitTokens } from './chunk-ZIFJXCKA.mjs';
9
- import { TARGET_BLOCK_ENTRIES, SCORE_BUFFER_INITIAL_TOUCHED_CAPACITY, PRUNING_REJECTION_SLACK, SORT_COLUMN_MINIMUM_REBUILD_THRESHOLD, SORT_COLUMN_REBUILD_FRACTION_SHIFT } from './chunk-4UMZ7KQL.mjs';
5
+ import { partialFieldsOf, schemaFieldsOf, flattenSchema } from './chunk-WQRN64Q6.mjs';
10
6
  import { fuzzyPrefixOf, boundedLevenshtein, fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
11
- import { parsedTypeOf, isStringValuedBase, withSortableOption, isWordIndexedBase, isWordIndexedFieldType, isListBase } from './chunk-3A5KI24C.mjs';
7
+ import { parsedTypeOf, isStringValuedBase, withSortableOption, isWordIndexedBase, isWordIndexedFieldType, isListBase } from './chunk-I54T6CQP.mjs';
8
+ import { tokenize, visitTokens } from './chunk-4BYWRYPM.mjs';
9
+ import { TARGET_BLOCK_ENTRIES, SCORE_BUFFER_INITIAL_TOUCHED_CAPACITY, PRUNING_REJECTION_SLACK, SORT_COLUMN_MINIMUM_REBUILD_THRESHOLD, SORT_COLUMN_REBUILD_FRACTION_SHIFT } from './chunk-4UMZ7KQL.mjs';
10
+ import { PROCESS_LIMIT_REFRESH_INTERVAL_MS } from './chunk-ZXNQEW43.mjs';
12
11
  import { isGeopointOrVectorType, PROTOTYPE_POLLUTION_KEYS } from './chunk-L5ORED7V.mjs';
13
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
12
+ import { turnIsSpent, yieldTurn, createDocIdMap } from './chunk-LQG5G2LY.mjs';
13
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
14
14
  import { singleFoldTable, appendFoldedCodePoint, sortModeOf, defaultSortMode, SORT_VALUE_MAX_CODE_POINTS, toReducedSortValue, readSortField, compareComparableKeys, toComparableSortValue, isSortMode, SORT_MODES, compareSortValues, compareComparableValues, truncateSortString } from './chunk-R6A773WK.mjs';
15
15
  import { compareCodePoints, exceedsCodePoints, codePointCount, holdsUnpairedSurrogate } from './chunk-YTJCGKM4.mjs';
16
16
  import { totalmem, freemem } from 'os';
@@ -4849,7 +4849,7 @@ function requireLoadedPhraseCode() {
4849
4849
  }
4850
4850
  function loadPhraseCode() {
4851
4851
  if (loading === null) {
4852
- loading = import('./phrase-module-O3MDRQXP.mjs').then(
4852
+ loading = import('./phrase-module-ZI4WSQVH.mjs').then(
4853
4853
  (code) => {
4854
4854
  loaded = code;
4855
4855
  return code;
@@ -1,7 +1,7 @@
1
- import { nodeThreadId } from './chunk-BEZH7VEH.mjs';
2
1
  import { getFs, getPath } from './chunk-HLPRHOSO.mjs';
3
2
  import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-QDZJM7NI.mjs';
4
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
3
+ import { nodeThreadId } from './chunk-BEZH7VEH.mjs';
4
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
5
5
  import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
6
6
  import { openSync, close, readFileSync } from 'fs';
7
7
  import { rename, readFile, writeFile, unlink, realpath, readdir, readlink } from 'fs/promises';
@@ -1,15 +1,15 @@
1
- import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-PGVPE7GJ.mjs';
2
- import { archiveLayout } from './chunk-Q7MS6P2J.mjs';
3
- import { syncStorageOf } from './chunk-B7S6YEBP.mjs';
4
- import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
1
+ import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-YEKL4JBK.mjs';
2
+ import { archiveLayout } from './chunk-Q622CTMC.mjs';
3
+ import { syncStorageOf } from './chunk-QJVOLKU6.mjs';
5
4
  import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-ZYAY26KG.mjs';
6
5
  import { isSyncEpoch } from './chunk-BUMREPLU.mjs';
7
- import { manifestFileRefs } from './chunk-Q3TCTQCC.mjs';
8
- import { emitEngineEvent, encodeIndexConfiguration } from './chunk-LSM2YTKM.mjs';
9
- import { INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-USR7FQRZ.mjs';
10
- import { openChecksummedEnvelope } from './chunk-HVYICDY3.mjs';
6
+ import { manifestFileRefs } from './chunk-NF4DT3IH.mjs';
7
+ import { oneSyncChangeAtATime } from './chunk-V6EUBAIT.mjs';
8
+ import { emitEngineEvent, encodeIndexConfiguration } from './chunk-KMUNHGBQ.mjs';
9
+ import { INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-GH4WQ22V.mjs';
10
+ import { openChecksummedEnvelope } from './chunk-3OH67G7R.mjs';
11
11
  import { withOpenIndex } from './chunk-Y4WPNHMC.mjs';
12
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
12
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
13
13
  import { decode } from '@msgpack/msgpack';
14
14
 
15
15
  // src/engine/sync/archive.ts
@@ -1,8 +1,9 @@
1
- import { P as PartitionConfig, B as BM25Params, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-DDauvDOv.js';
2
- import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, l as ListResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, Q as QueryParams, f as QueryResult, m as PreflightResult, j as SuggestParams, n as SuggestResult, e as SyncSetting } from './sync-uXR7MmM7.js';
1
+ import { P as PartitionConfig, B as BM25Params, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-Jwt928nJ.js';
2
+ import { e as SnapshotOptions, V as VectorMaintenanceResult, B as BatchResult, L as ListParams, l as ListResult, I as IndexInfo, p as IndexStats, P as PartitionStatsResult, Q as QueryParams, h as QueryResult, o as PreflightResult, m as SuggestParams, n as SuggestResult, f as SyncSetting } from './engine-CFxPYqEk.js';
3
3
  import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
4
- import { f as TaskRecord, a as ChangeAnalysisBody, M as MemoryStatsResponse, R as RestoreBackupBody, c as ImportResult, H as HttpIndexConfig, d as TaskListQuery, T as TaskListPage } from './tasks-BShx8pdK.js';
5
- import { B as BackupListing } from './config-05G_hy-1.js';
4
+ import { f as TaskRecord, a as ChangeAnalysisBody, M as MemoryStatsResponse, m as CreateBackupBody, R as RestoreBackupBody, c as ImportResult, H as HttpIndexConfig, d as TaskListQuery, T as TaskListPage } from './tasks-qrJojgST.js';
5
+ import { B as BackupListing } from './config-DMwffLKn.js';
6
+ import { d as QuerySuggestionsSetting, e as QuerySuggestionsStatus, f as RecordQueryResult, c as QuerySuggestionsPreview, M as ManualQuerySuggestion } from './query-suggestions-CBYkrQ5T.js';
6
7
 
7
8
  /**
8
9
  * This is the `fetch` implementation the client sends every request through.
@@ -162,11 +163,12 @@ interface AdminOperations {
162
163
  *
163
164
  * @param indexName - This names the index to stream.
164
165
  * @param options - This sets the signal, the deadline, and the headers for
165
- * this request.
166
+ * this request. Set `queryHistory` to add the index's popular query
167
+ * history, which holds raw searches, to the archive.
166
168
  * @returns The stream holds the archive's bytes in the order that the server
167
169
  * sends them.
168
170
  */
169
- snapshot(indexName: string, options?: RequestOptions): Promise<ReadableStream<Uint8Array>>;
171
+ snapshot(indexName: string, options?: RequestOptions & SnapshotOptions): Promise<ReadableStream<Uint8Array>>;
170
172
  /**
171
173
  * Uploads a snapshot archive and replaces the named index with the
172
174
  * archive's contents. The method also accepts the single `.nrsl` file that
@@ -352,7 +354,7 @@ interface AdminOperations {
352
354
  * this request.
353
355
  * @returns The record is the task to follow, and it ends with any failure of
354
356
  * the change, such as `ANALYSIS_CHANGE_REPLACED` when a later change replaces
355
- * this one.
357
+ * this one or when a restore of the index is in flight.
356
358
  */
357
359
  changeAnalysis(indexName: string, change: ChangeAnalysisBody, options?: RequestOptions): Promise<TaskRecord>;
358
360
  /**
@@ -383,12 +385,13 @@ interface BackupOperations {
383
385
  * @param indexName - This names the index to back up.
384
386
  * @param backupName - This names the backup, with 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a
385
387
  * letter or a digit.
386
- * @param options - This sets the signal, the deadline, and the headers for this request.
388
+ * @param options - This sets the signal, the deadline, and the headers for this request. Set `queryHistory` to add
389
+ * every node's popular query suggestion history of the index, which holds raw searches, to the backup.
387
390
  * @returns The record is the task to follow.
388
391
  * @throws A `NarsilError` with `CLUSTER_OPERATION_UNSUPPORTED` from a server that fronts a single engine. The task
389
392
  * reports `BACKUP_ALREADY_EXISTS` or `BACKUP_DURABILITY_REQUIRED` in its `error`.
390
393
  */
391
- createBackup(indexName: string, backupName: string, options?: RequestOptions): Promise<TaskRecord>;
394
+ createBackup(indexName: string, backupName: string, options?: RequestOptions & Pick<CreateBackupBody, 'queryHistory'>): Promise<TaskRecord>;
392
395
  /**
393
396
  * Lists the backups under the cluster's key prefix, in name order.
394
397
  *
@@ -786,6 +789,115 @@ interface IndexOperations {
786
789
  close(indexName: string, options?: RequestOptions): Promise<void>;
787
790
  }
788
791
 
792
+ /**
793
+ * These methods count searches and manage the popular query suggestions of an
794
+ * index on a server, as `querySuggestions(engine)` does on an engine.
795
+ *
796
+ * @public
797
+ */
798
+ interface QuerySuggestionOperations {
799
+ /**
800
+ * Replaces the popular query suggestions setting of an index. Turning the
801
+ * feature off deletes the search history of the index on the server and
802
+ * keeps its suggestions indexes.
803
+ *
804
+ * @param indexName - The server replaces the setting of this index.
805
+ * @param setting - This is the new setting, whose omitted limits take their defaults.
806
+ * @param options - This sets the signal, the deadline, and the headers for
807
+ * this request.
808
+ * @throws A `NarsilError` with `CONFIG_INVALID` when the setting breaks a
809
+ * limit, names a field the schema lacks, or turns the feature on for an index
810
+ * with device sync on or for a server without a key.
811
+ */
812
+ updateQuerySuggestions(indexName: string, setting: QuerySuggestionsSetting, options?: RequestOptions): Promise<void>;
813
+ /**
814
+ * Reads the setting, the last build, the next scheduled build, and the
815
+ * suggestions indexes of an index.
816
+ *
817
+ * @param indexName - The server reports on this index.
818
+ * @param options - This sets the signal, the deadline, and the headers for
819
+ * this request.
820
+ * @returns The status of the index.
821
+ */
822
+ querySuggestionsStatus(indexName: string, options?: RequestOptions): Promise<QuerySuggestionsStatus>;
823
+ /**
824
+ * Counts one search that a person followed with a click. The server takes
825
+ * the person and the group from its `identify` function, so this request
826
+ * carries the search alone.
827
+ *
828
+ * @param indexName - The index that the person searched.
829
+ * @param query - The search, which the server normalises before it counts it.
830
+ * @param options - This sets the signal, the deadline, and the headers for
831
+ * this request, such as the credentials that `identify` reads.
832
+ * @returns Whether the server counted the search, and why not where it didn't.
833
+ * @throws A `NarsilError` with `QUERY_SUGGESTIONS_NOT_ENABLED` when the index
834
+ * has the feature off or the server has no `identify` function.
835
+ */
836
+ recordQuery(indexName: string, query: string, options?: RequestOptions): Promise<RecordQueryResult>;
837
+ /**
838
+ * Starts a build of the suggestions of an index. Follow the returned record
839
+ * with {@link TaskOperations.waitForTask}, whose `build` field reports the
840
+ * build once it ends.
841
+ *
842
+ * @param indexName - The server builds the suggestions of this index.
843
+ * @param options - This sets the signal, the deadline, and the headers for
844
+ * this request.
845
+ * @returns The record of the task that runs the build.
846
+ */
847
+ buildQuerySuggestions(indexName: string, options?: RequestOptions): Promise<TaskRecord>;
848
+ /**
849
+ * Lists the phrases that enough people searched for, before the result
850
+ * checks of a build run.
851
+ *
852
+ * @param indexName - The source index.
853
+ * @param limit - The most phrases to list, from 1 to 1,000. Defaults to 100.
854
+ * @param options - This sets the signal, the deadline, and the headers for
855
+ * this request.
856
+ * @returns The phrases, most counted first.
857
+ */
858
+ previewQuerySuggestions(indexName: string, limit?: number, options?: RequestOptions): Promise<QuerySuggestionsPreview>;
859
+ /**
860
+ * Reads the ban list of an index.
861
+ *
862
+ * @param indexName - The source index.
863
+ * @param options - This sets the signal, the deadline, and the headers for
864
+ * this request.
865
+ * @returns The banned phrases in their normal form.
866
+ */
867
+ readQueryBans(indexName: string, options?: RequestOptions): Promise<string[]>;
868
+ /**
869
+ * Replaces the ban list of an index, and removes each newly banned phrase
870
+ * from every suggestions index of the index before it answers.
871
+ *
872
+ * @param indexName - The source index.
873
+ * @param bans - At most 1,000 phrases, which the server normalises.
874
+ * @param options - This sets the signal, the deadline, and the headers for
875
+ * this request.
876
+ * @returns The stored ban list.
877
+ */
878
+ replaceQueryBans(indexName: string, bans: string[], options?: RequestOptions): Promise<string[]>;
879
+ /**
880
+ * Bans a phrase and removes it from every suggestions index of an index.
881
+ *
882
+ * @param indexName - The source index.
883
+ * @param query - The phrase, which the server normalises.
884
+ * @param options - This sets the signal, the deadline, and the headers for
885
+ * this request.
886
+ * @returns The number of suggestions indexes that held the phrase.
887
+ */
888
+ removeQuery(indexName: string, query: string, options?: RequestOptions): Promise<number>;
889
+ /**
890
+ * Adds a suggestion by hand, which a build leaves in place.
891
+ *
892
+ * @param indexName - The source index.
893
+ * @param suggestion - The group, the phrase, and its count.
894
+ * @param options - This sets the signal, the deadline, and the headers for
895
+ * this request.
896
+ * @returns The name of the suggestions index that holds the phrase.
897
+ */
898
+ addManualSuggestion(indexName: string, suggestion: ManualQuerySuggestion, options?: RequestOptions): Promise<string>;
899
+ }
900
+
789
901
  /**
790
902
  * These methods search an index over HTTP.
791
903
  *
@@ -1113,7 +1225,7 @@ interface TaskOperations {
1113
1225
  *
1114
1226
  * @public
1115
1227
  */
1116
- interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, BackupOperations, ServerOperations, SyncSettingOperations {
1228
+ interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperations, SearchOperations, TaskOperations, AdminOperations, BackupOperations, ServerOperations, SyncSettingOperations, QuerySuggestionOperations {
1117
1229
  }
1118
1230
  /**
1119
1231
  * Builds a client for one Narsil server, or for a list of them that it moves
@@ -1134,4 +1246,4 @@ interface NarsilClient extends IndexOperations, DocumentOperations, BulkOperatio
1134
1246
  */
1135
1247
  declare function createNarsilClient(options: NarsilClientOptions): NarsilClient;
1136
1248
 
1137
- export { type AdminOperations as A, type BackupOperations as B, type DocumentOperations as D, type FetchFunction as F, type ImportSource as I, type NarsilClient as N, type PutResult as P, type RequestOptions as R, type SearchOperations as S, type TaskOperations as T, type WaitForTaskOptions as W, type BulkOperations as a, type IndexOperations as b, type NarsilClientOptions as c, type ServerOperations as d, type ServerVersion as e, type SyncSettingOperations as f, type SyncSnapshotDownload as g, type SyncSnapshotResume as h, createNarsilClient as i };
1249
+ export { type AdminOperations as A, type BackupOperations as B, type DocumentOperations as D, type FetchFunction as F, type ImportSource as I, type NarsilClient as N, type PutResult as P, type QuerySuggestionOperations as Q, type RequestOptions as R, type SearchOperations as S, type TaskOperations as T, type WaitForTaskOptions as W, type BulkOperations as a, type IndexOperations as b, type NarsilClientOptions as c, type ServerOperations as d, type ServerVersion as e, type SyncSettingOperations as f, type SyncSnapshotDownload as g, type SyncSnapshotResume as h, createNarsilClient as i };
package/dist/client.d.ts CHANGED
@@ -1,11 +1,12 @@
1
- export { B as BackupListing, a as BackupSummary, D as DamagedBackup } from './config-05G_hy-1.js';
2
- export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, e as SyncSetting, i as isNarsilError } from './sync-uXR7MmM7.js';
3
- export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_CAPABILITY, C as CHANGE_ANALYSIS_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-B3Brs1Rc.js';
4
- export { B as BackupListResponse, C as CapabilitiesResponse, a as ChangeAnalysisBody, b as CreateIndexEmbedding, E as ErrorDetail, H as HttpIndexConfig, I as ImportError, c as ImportResult, M as MemoryStatsResponse, R as RestoreBackupBody, T as TaskListPage, d as TaskListQuery, e as TaskProgress, f as TaskRecord, g as TaskStatus, h as TaskStepProgress, i as TaskType } from './tasks-BShx8pdK.js';
5
- export { A as AdminOperations, B as BackupOperations, a as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, b as IndexOperations, N as NarsilClient, c as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, d as ServerOperations, e as ServerVersion, f as SyncSettingOperations, g as SyncSnapshotDownload, h as SyncSnapshotResume, T as TaskOperations, W as WaitForTaskOptions, i as createNarsilClient } from './client-Df76GNKm.js';
6
- import './config-B8DP2VwR.js';
1
+ export { B as BackupListing, a as BackupSummary, D as DamagedBackup } from './config-DMwffLKn.js';
2
+ export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, e as SnapshotOptions, f as SyncSetting, i as isNarsilError } from './engine-CFxPYqEk.js';
3
+ export { A as ASYNC_IMPORT_CAPABILITY, B as BM25_TUNING_CAPABILITY, C as CHANGE_ANALYSIS_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-Da4ywVVl.js';
4
+ export { B as BackupListResponse, C as CapabilitiesResponse, a as ChangeAnalysisBody, b as CreateIndexEmbedding, E as ErrorDetail, H as HttpIndexConfig, I as ImportError, c as ImportResult, M as MemoryStatsResponse, R as RestoreBackupBody, T as TaskListPage, d as TaskListQuery, e as TaskProgress, f as TaskRecord, g as TaskStatus, h as TaskStepProgress, i as TaskType } from './tasks-qrJojgST.js';
5
+ export { M as ManualQuerySuggestion, Q as QuerySuggestionPreviewEntry, a as QuerySuggestionsBuild, b as QuerySuggestionsBuildTrigger, c as QuerySuggestionsPreview, d as QuerySuggestionsSetting, e as QuerySuggestionsStatus, R as RecordQueryOutcome, f as RecordQueryResult } from './query-suggestions-CBYkrQ5T.js';
6
+ export { A as AdminOperations, B as BackupOperations, a as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, b as IndexOperations, N as NarsilClient, c as NarsilClientOptions, P as PutResult, Q as QuerySuggestionOperations, R as RequestOptions, S as SearchOperations, d as ServerOperations, e as ServerVersion, f as SyncSettingOperations, g as SyncSnapshotDownload, h as SyncSnapshotResume, T as TaskOperations, W as WaitForTaskOptions, i as createNarsilClient } from './client-DRv7UVeY.js';
7
+ import './config-CoSig5Ox.js';
7
8
  import './adapters-pljAqmrC.js';
8
- import './schema-DDauvDOv.js';
9
+ import './schema-Jwt928nJ.js';
9
10
  import './synonyms-CpOAHPa-.js';
10
- import './index-nRqDM6uS.js';
11
+ import './index-C4AmUnl1.js';
11
12
  import './types-DvncmvuQ.js';
package/dist/client.mjs CHANGED
@@ -39,6 +39,7 @@ var ErrorCodes = {
39
39
  SYNC_NOT_READY: "SYNC_NOT_READY",
40
40
  SYNC_NOT_ENABLED: "SYNC_NOT_ENABLED",
41
41
  SYNC_SNAPSHOT_PREPARING: "SYNC_SNAPSHOT_PREPARING",
42
+ QUERY_SUGGESTIONS_NOT_ENABLED: "QUERY_SUGGESTIONS_NOT_ENABLED",
42
43
  SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD",
43
44
  VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH",
44
45
  SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER",
@@ -287,11 +288,13 @@ function createAdminOperations(transport) {
287
288
  await transport.json({ method: "POST", path: `${indexPath(indexName)}/_checkpoint`, options });
288
289
  },
289
290
  snapshot(indexName, options) {
291
+ const { queryHistory, ...request } = options ?? {};
290
292
  return transport.stream({
291
293
  method: "GET",
292
294
  path: `${indexPath(indexName)}/snapshot`,
295
+ ...queryHistory === true ? { query: { queryHistory: "true" } } : {},
293
296
  defaultTimeoutMs: NO_TIMEOUT,
294
- options
297
+ options: request
295
298
  });
296
299
  },
297
300
  async restore(indexName, data, options) {
@@ -394,7 +397,9 @@ function createBackupOperations(transport) {
394
397
  }
395
398
  return {
396
399
  createBackup(indexName, backupName, options) {
397
- return postTask(`${indexPath(indexName)}/backups`, { backup: backupName }, options);
400
+ const { queryHistory, ...request } = options ?? {};
401
+ const body = { backup: backupName, ...queryHistory === true ? { queryHistory } : {} };
402
+ return postTask(`${indexPath(indexName)}/backups`, body, request);
398
403
  },
399
404
  async listBackups(options) {
400
405
  const path = "/backups";
@@ -964,6 +969,62 @@ function createIndexOperations(transport) {
964
969
  };
965
970
  }
966
971
 
972
+ // src/client/query-suggestions.ts
973
+ function createQuerySuggestionOperations(transport) {
974
+ const pathOf = (indexName, route = "") => `${indexPath(indexName)}/query-suggestions${route}`;
975
+ function send(method, path, body, options) {
976
+ return transport.json({
977
+ method,
978
+ path,
979
+ ...body === void 0 ? {} : { body: encodeJson(body), contentType: "application/json" },
980
+ options
981
+ });
982
+ }
983
+ return {
984
+ async updateQuerySuggestions(indexName, setting, options) {
985
+ await send("PUT", pathOf(indexName), setting, options);
986
+ },
987
+ async querySuggestionsStatus(indexName, options) {
988
+ const path = pathOf(indexName);
989
+ return readBody(await send("GET", path, void 0, options), path);
990
+ },
991
+ async recordQuery(indexName, query, options) {
992
+ const path = pathOf(indexName, "/record");
993
+ return readBody(await send("POST", path, { query }, options), path);
994
+ },
995
+ async buildQuerySuggestions(indexName, options) {
996
+ const path = pathOf(indexName, "/build");
997
+ return readBody(await send("POST", path, void 0, options), path);
998
+ },
999
+ async previewQuerySuggestions(indexName, limit, options) {
1000
+ const path = pathOf(indexName, "/preview");
1001
+ const payload = await transport.json({
1002
+ method: "GET",
1003
+ path,
1004
+ ...limit === void 0 ? {} : { query: { limit: String(limit) } },
1005
+ options
1006
+ });
1007
+ return readBody(payload, path);
1008
+ },
1009
+ async readQueryBans(indexName, options) {
1010
+ const path = pathOf(indexName, "/bans");
1011
+ return readArray(await send("GET", path, void 0, options), "bans", path);
1012
+ },
1013
+ async replaceQueryBans(indexName, bans, options) {
1014
+ const path = pathOf(indexName, "/bans");
1015
+ return readArray(await send("PUT", path, { bans }, options), "bans", path);
1016
+ },
1017
+ async removeQuery(indexName, query, options) {
1018
+ const path = pathOf(indexName, "/remove");
1019
+ return readNumber(await send("POST", path, { query }, options), "suggestionIndexes", path);
1020
+ },
1021
+ async addManualSuggestion(indexName, suggestion, options) {
1022
+ const path = pathOf(indexName, "/manual");
1023
+ return readString(await send("POST", path, suggestion, options), "indexName", path);
1024
+ }
1025
+ };
1026
+ }
1027
+
967
1028
  // src/client/search.ts
968
1029
  function createSearchOperations(transport) {
969
1030
  async function post(path, params, options) {
@@ -1167,7 +1228,8 @@ function createNarsilClient(options) {
1167
1228
  ...createAdminOperations(transport),
1168
1229
  ...createBackupOperations(transport),
1169
1230
  ...createServerOperations(transport),
1170
- ...createSyncSettingOperations(transport)
1231
+ ...createSyncSettingOperations(transport),
1232
+ ...createQuerySuggestionOperations(transport)
1171
1233
  };
1172
1234
  }
1173
1235
 
@@ -1,62 +1,62 @@
1
- import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-K7KLL263.mjs';
2
- export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-K7KLL263.mjs';
3
- import './chunk-DVWYODEB.mjs';
4
- import './chunk-CP5RRPJR.mjs';
5
- import { loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-LTUGDMV4.mjs';
6
- import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-AO2FAYIZ.mjs';
1
+ import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-H6VIGE62.mjs';
2
+ export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-H6VIGE62.mjs';
3
+ import './chunk-6RC4K46J.mjs';
4
+ import './chunk-TQXHPFWT.mjs';
5
+ import { loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-WZ7YV54N.mjs';
6
+ import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-K4ZIGL2O.mjs';
7
7
  import './chunk-FOCV4CBZ.mjs';
8
- import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-BPSKLCS7.mjs';
9
- export { createHNSWIndex, osqBitsOf } from './chunk-BPSKLCS7.mjs';
8
+ import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-VQEUR6T6.mjs';
9
+ export { createHNSWIndex, osqBitsOf } from './chunk-VQEUR6T6.mjs';
10
10
  import './chunk-DJHHF2L5.mjs';
11
11
  import { stageQueryLevels, readTrailer } from './chunk-37CD3OKS.mjs';
12
- import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, COLD_WALK_NODES_READ_AHEAD } from './chunk-KCUIFVVW.mjs';
13
- import './chunk-62G63NMH.mjs';
14
- import './chunk-S2N75OTN.mjs';
15
- import './chunk-Q3TCTQCC.mjs';
12
+ import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, COLD_WALK_NODES_READ_AHEAD } from './chunk-J4IWBIVY.mjs';
13
+ import './chunk-KXCVQWOR.mjs';
14
+ import './chunk-UHICS3JI.mjs';
15
+ import './chunk-NF4DT3IH.mjs';
16
16
  import './chunk-QDZJM7NI.mjs';
17
- import { yieldToEventLoop } from './chunk-LSM2YTKM.mjs';
18
- import './chunk-TV2L3BN7.mjs';
17
+ import { yieldToEventLoop } from './chunk-KMUNHGBQ.mjs';
18
+ import './chunk-L7ZD4L3K.mjs';
19
19
  import './chunk-HJSN7UYG.mjs';
20
- import './chunk-URPCYQVJ.mjs';
20
+ import './chunk-LHKOSI2J.mjs';
21
21
  import './chunk-XIHUI4KB.mjs';
22
22
  import './chunk-3MXV3VHR.mjs';
23
23
  import './chunk-EEBCDP36.mjs';
24
- import './chunk-5FUOVJKG.mjs';
25
- import './chunk-HWEDFLB7.mjs';
26
- import './chunk-USR7FQRZ.mjs';
27
- import { HEADER_SIZE, readHeader } from './chunk-HVYICDY3.mjs';
24
+ import './chunk-Z2BE2MAM.mjs';
25
+ import './chunk-ZAUJFLEN.mjs';
26
+ import './chunk-GH4WQ22V.mjs';
27
+ import { HEADER_SIZE, readHeader } from './chunk-3OH67G7R.mjs';
28
28
  import './chunk-IPN7S4KX.mjs';
29
29
  import './chunk-KAKQ74LS.mjs';
30
30
  import { crc32 } from './chunk-7GXJUJ24.mjs';
31
31
  import './chunk-Q2UL2TPC.mjs';
32
- import './chunk-NTZOXVUZ.mjs';
32
+ import './chunk-LC3FDWTX.mjs';
33
+ import './chunk-JUKYYXSP.mjs';
34
+ import './chunk-4KRC2APY.mjs';
35
+ import './chunk-FQBFZAWG.mjs';
36
+ import './chunk-WQRN64Q6.mjs';
37
+ import './chunk-GES7U2PM.mjs';
38
+ import './chunk-I54T6CQP.mjs';
39
+ import './chunk-YEDIDCR7.mjs';
33
40
  import './chunk-X5CV2E2B.mjs';
34
41
  import './chunk-Y4WPNHMC.mjs';
35
- import './chunk-JCLTESFN.mjs';
42
+ import './chunk-RZWWB2XR.mjs';
36
43
  import './chunk-TGP5M5R7.mjs';
44
+ import './chunk-4BYWRYPM.mjs';
45
+ import './chunk-4UMZ7KQL.mjs';
37
46
  import './chunk-U2BKYEC7.mjs';
38
47
  import './chunk-QHPYS427.mjs';
39
48
  import './chunk-QYRNLLLI.mjs';
40
- import './chunk-37IVJLP6.mjs';
49
+ import './chunk-HNVVEQP7.mjs';
41
50
  import './chunk-ZXNQEW43.mjs';
51
+ import './chunk-L5ORED7V.mjs';
42
52
  import './chunk-KOKM4PQN.mjs';
43
- import './chunk-HVKXNBFL.mjs';
53
+ import './chunk-Q7G3BV3Y.mjs';
44
54
  import './chunk-BTPGQC6Z.mjs';
45
55
  import './chunk-LQG5G2LY.mjs';
46
- import './chunk-RFBLQLLZ.mjs';
47
- import './chunk-OKX2BBNW.mjs';
48
- import './chunk-JUKYYXSP.mjs';
49
- import './chunk-VMXSVVXG.mjs';
50
- import './chunk-Z3TNWCI5.mjs';
51
- import './chunk-FQBFZAWG.mjs';
52
- import './chunk-ZIFJXCKA.mjs';
53
- import './chunk-4UMZ7KQL.mjs';
54
56
  import './chunk-ZXX5GZEX.mjs';
55
- import './chunk-GES7U2PM.mjs';
56
- import './chunk-3A5KI24C.mjs';
57
- import './chunk-L5ORED7V.mjs';
57
+ import './chunk-RFBLQLLZ.mjs';
58
58
  import './chunk-U476IXKQ.mjs';
59
- import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
59
+ import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
60
60
  import './chunk-R6A773WK.mjs';
61
61
  import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
62
62
  import { decode, decodeMulti } from '@msgpack/msgpack';
@@ -1,6 +1,6 @@
1
1
  import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
2
- import { Q as QueryParams, f as QueryResult, g as NarsilEventHandlers } from './sync-uXR7MmM7.js';
3
- import { I as IndexConfig, A as AnyDocument } from './schema-DDauvDOv.js';
2
+ import { Q as QueryParams, h as QueryResult, j as NarsilEventHandlers } from './engine-CFxPYqEk.js';
3
+ import { I as IndexConfig, A as AnyDocument } from './schema-Jwt928nJ.js';
4
4
 
5
5
  /**
6
6
  * Hooks that the engine calls alongside its own work, so that an application
@@ -258,6 +258,25 @@ interface NarsilConfig {
258
258
  * engine there ignores this setting and leaves it unchecked.
259
259
  */
260
260
  memory?: MemoryConfig;
261
+ /**
262
+ * The secret key that popular query suggestions scramble each person's ID
263
+ * with. Give every node of a cluster the same key. Without it, the engine
264
+ * counts no search and builds no suggestion. Import
265
+ * `@delali/narsil/query-suggestions` to reach the feature.
266
+ */
267
+ querySuggestions?: QuerySuggestionsConfig;
268
+ }
269
+ /**
270
+ * The engine settings of popular query suggestions.
271
+ *
272
+ * @public
273
+ */
274
+ interface QuerySuggestionsConfig {
275
+ /**
276
+ * A secret of at least 32 bytes, as bytes or as text whose UTF-8 bytes the
277
+ * engine takes. No snapshot, backup, or payload holds it.
278
+ */
279
+ key: string | Uint8Array;
261
280
  }
262
281
  /**
263
282
  * The memory levels at which an engine stops and resumes accepting inserts and
@@ -460,4 +479,4 @@ interface WorkerConfig {
460
479
  bootstrapModule?: string;
461
480
  }
462
481
 
463
- export type { AnalysisConfig as A, DurabilityConfig as D, IndexContext as I, MainCopyQueries as M, NarsilConfig as N, PartitionContext as P, RemoveContext as R, SearchContext as S, UpdateContext as U, WorkerConfig as W, IndexLifecycleConfig as a, InsertContext as b, MemoryConfig as c, NarsilPlugin as d, StaleAnalysis as e, WorkerContext as f };
482
+ export type { AnalysisConfig as A, DurabilityConfig as D, IndexContext as I, MainCopyQueries as M, NarsilConfig as N, PartitionContext as P, QuerySuggestionsConfig as Q, RemoveContext as R, SearchContext as S, UpdateContext as U, WorkerConfig as W, IndexLifecycleConfig as a, InsertContext as b, MemoryConfig as c, NarsilPlugin as d, StaleAnalysis as e, WorkerContext as f };
@@ -1,6 +1,6 @@
1
- import { N as NarsilConfig } from './config-B8DP2VwR.js';
1
+ import { N as NarsilConfig } from './config-CoSig5Ox.js';
2
2
  import { P as PersistenceAdapter } from './adapters-pljAqmrC.js';
3
- import { A as AllocationConstraints, a as AllocationTable, N as NodeRole, b as NodeRegistration, C as ClusterCoordinator, c as NodeCapacity } from './index-nRqDM6uS.js';
3
+ import { A as AllocationConstraints, a as AllocationTable, N as NodeRole, b as NodeRegistration, C as ClusterCoordinator, c as NodeCapacity } from './index-C4AmUnl1.js';
4
4
  import { N as NodeTransport } from './types-DvncmvuQ.js';
5
5
 
6
6
  /**
@@ -63,6 +63,20 @@ interface BackupOperationOptions {
63
63
  /** Called whenever the operation reports more progress. */
64
64
  onProgress?: (progress: BackupProgress) => void;
65
65
  }
66
+ /**
67
+ * How {@link ClusterNamespace.createBackup} backs up an index.
68
+ *
69
+ * @public
70
+ */
71
+ interface CreateBackupOptions extends BackupOperationOptions {
72
+ /**
73
+ * Set this to true to add every node's popular query suggestion history of the index to the backup, so that a
74
+ * restore keeps the counts that a build reads. The history holds the scrambled text of what people searched for, and
75
+ * the backup keeps it after `retentionDays` ends, so leave it out unless the restored index needs those counts. A
76
+ * node that gives no answer adds nothing.
77
+ */
78
+ queryHistory?: boolean;
79
+ }
66
80
  /**
67
81
  * Where {@link ClusterNamespace.restoreBackup} puts a backup, and how the cluster places the restored copies.
68
82
  *
@@ -533,14 +547,15 @@ interface ClusterNamespace {
533
547
  * @param indexName - The index to back up.
534
548
  * @param backupName - The backup's name, from 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a letter or
535
549
  * a digit.
536
- * @param options - A callback that receives the progress.
550
+ * @param options - A callback that receives the progress, and whether the backup adds the index's popular query
551
+ * suggestion history.
537
552
  * @returns What the manifest records about the backup.
538
553
  * @throws A `NarsilError` with `BACKUP_ALREADY_EXISTS` for a name that the store or a running backup holds,
539
554
  * `BACKUP_DURABILITY_REQUIRED` where a primary runs without write-ahead log durability, `BACKUP_STORE_CLAIMED`
540
555
  * where another cluster writes under the key prefix, `BACKUP_STORE_NOT_CONFIGURED` on a node without a store, and
541
556
  * `BACKUP_NOT_READY` while a node of the cluster runs an earlier release.
542
557
  */
543
- createBackup(indexName: string, backupName: string, options?: BackupOperationOptions): Promise<BackupSummary>;
558
+ createBackup(indexName: string, backupName: string, options?: CreateBackupOptions): Promise<BackupSummary>;
544
559
  /**
545
560
  * Restores a backup as a new index, on a cluster of any size.
546
561
  *
@@ -584,4 +599,4 @@ interface ClusterNodeInfo {
584
599
  status: string;
585
600
  }
586
601
 
587
- export type { BackupListing as B, ClusterNamespace as C, DamagedBackup as D, IndexHealth as I, NodeReadiness as N, PartitionReplicationFigure as P, ReplicaLagFigure as R, VectorRebuildWaitFigure as V, BackupSummary as a, ClusterNodeInfo as b, ClusterHealth as c, CreateIndexOptions as d, ClusterNodeConfig as e, BackupOperationOptions as f, BackupProgress as g, ClusterBackupConfig as h, ClusterControllerConfig as i, ClusterHealthStatus as j, ClusterMemoryConfig as k, ClusterMetrics as l, ClusterQueryConfig as m, CommitPointFigure as n, CoordinatorRequestFigure as o, ReplicationConfig as p, RestoreBackupOptions as q };
602
+ export type { BackupListing as B, ClusterNamespace as C, DamagedBackup as D, IndexHealth as I, NodeReadiness as N, PartitionReplicationFigure as P, ReplicaLagFigure as R, VectorRebuildWaitFigure as V, BackupSummary as a, ClusterNodeInfo as b, CreateIndexOptions as c, ClusterNodeConfig as d, BackupOperationOptions as e, BackupProgress as f, ClusterBackupConfig as g, ClusterControllerConfig as h, ClusterHealth as i, ClusterHealthStatus as j, ClusterMemoryConfig as k, ClusterMetrics as l, ClusterQueryConfig as m, CommitPointFigure as n, CoordinatorRequestFigure as o, CreateBackupOptions as p, ReplicationConfig as q, RestoreBackupOptions as r };
@@ -1,29 +1,29 @@
1
- export { createDirectExecutor } from './chunk-5FUOVJKG.mjs';
2
- import './chunk-HWEDFLB7.mjs';
1
+ export { createDirectExecutor } from './chunk-Z2BE2MAM.mjs';
2
+ import './chunk-ZAUJFLEN.mjs';
3
3
  import './chunk-IPN7S4KX.mjs';
4
4
  import './chunk-KAKQ74LS.mjs';
5
5
  import './chunk-Q2UL2TPC.mjs';
6
- import './chunk-NTZOXVUZ.mjs';
6
+ import './chunk-LC3FDWTX.mjs';
7
+ import './chunk-JUKYYXSP.mjs';
8
+ import './chunk-4KRC2APY.mjs';
9
+ import './chunk-FQBFZAWG.mjs';
10
+ import './chunk-WQRN64Q6.mjs';
11
+ import './chunk-GES7U2PM.mjs';
12
+ import './chunk-I54T6CQP.mjs';
13
+ import './chunk-YEDIDCR7.mjs';
7
14
  import './chunk-X5CV2E2B.mjs';
8
15
  import './chunk-Y4WPNHMC.mjs';
9
- import './chunk-JCLTESFN.mjs';
16
+ import './chunk-RZWWB2XR.mjs';
10
17
  import './chunk-TGP5M5R7.mjs';
18
+ import './chunk-4BYWRYPM.mjs';
19
+ import './chunk-4UMZ7KQL.mjs';
11
20
  import './chunk-U2BKYEC7.mjs';
12
- import './chunk-37IVJLP6.mjs';
21
+ import './chunk-HNVVEQP7.mjs';
13
22
  import './chunk-ZXNQEW43.mjs';
23
+ import './chunk-L5ORED7V.mjs';
14
24
  import './chunk-LQG5G2LY.mjs';
15
- import './chunk-OKX2BBNW.mjs';
16
- import './chunk-JUKYYXSP.mjs';
17
- import './chunk-VMXSVVXG.mjs';
18
- import './chunk-Z3TNWCI5.mjs';
19
- import './chunk-FQBFZAWG.mjs';
20
- import './chunk-ZIFJXCKA.mjs';
21
- import './chunk-4UMZ7KQL.mjs';
22
25
  import './chunk-ZXX5GZEX.mjs';
23
- import './chunk-GES7U2PM.mjs';
24
- import './chunk-3A5KI24C.mjs';
25
- import './chunk-L5ORED7V.mjs';
26
26
  import './chunk-U476IXKQ.mjs';
27
- import './chunk-KUZKUONM.mjs';
27
+ import './chunk-MP7ABPTD.mjs';
28
28
  import './chunk-R6A773WK.mjs';
29
29
  import './chunk-YTJCGKM4.mjs';