@delali/narsil 0.3.1-next.99 → 0.4.0

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 (426) hide show
  1. package/NOTICE +45 -0
  2. package/README.md +27 -8
  3. package/dist/adapters/filesystem.d.ts +1 -1
  4. package/dist/adapters/filesystem.mjs +101 -13
  5. package/dist/adapters/gcs.d.ts +49 -0
  6. package/dist/adapters/gcs.mjs +213 -0
  7. package/dist/adapters/indexeddb.d.ts +1 -1
  8. package/dist/adapters/indexeddb.mjs +2 -7
  9. package/dist/adapters/memory.d.ts +1 -1
  10. package/dist/adapters/memory.mjs +5 -0
  11. package/dist/adapters/s3.d.ts +53 -0
  12. package/dist/adapters/s3.mjs +263 -0
  13. package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
  14. package/dist/browser/chunk-4E5APHTM.mjs +1459 -0
  15. package/dist/browser/chunk-NDYADQ4Y.mjs +23426 -0
  16. package/dist/browser/chunk-QAOVAYAG.mjs +564 -0
  17. package/dist/browser/chunk-WC2DEXWU.mjs +29 -0
  18. package/dist/browser/chunk-YINZFPLT.mjs +1239 -0
  19. package/dist/browser/chunk-YJHGOJAC.mjs +15 -0
  20. package/dist/browser/{chunk-Z7QH2XHB.mjs → core-leaf-HWAXCEWX.mjs} +3987 -2103
  21. package/dist/browser/custom-token-results-R5BIX7SL.mjs +59 -0
  22. package/dist/browser/digest-leaf-64IPRPZD.mjs +151 -0
  23. package/dist/browser/durability-config-75NSFCQN.mjs +97 -0
  24. package/dist/browser/embed-GG6PS3EA.mjs +264 -0
  25. package/dist/browser/geo-index-GNHY4PUB.mjs +1484 -0
  26. package/dist/browser/gzip-JF3S6PPT.mjs +31 -0
  27. package/dist/browser/module-ZZTNG5JZ.mjs +5762 -0
  28. package/dist/browser/msgpack-leaf-44XNWSSY.mjs +302 -0
  29. package/dist/browser/optional-reads-XMVPG6HG.mjs +3230 -0
  30. package/dist/browser/optional-writes-76DWMRQH.mjs +3603 -0
  31. package/dist/browser/phrase-module-6UGFVW5J.mjs +617 -0
  32. package/dist/browser/resolve-vector-text-XRR2OVHE.mjs +85 -0
  33. package/dist/browser/restore-queue-SG5O735W.mjs +196 -0
  34. package/dist/browser/{runtime-NYE5TB6O.mjs → runtime-OMKE7DF4.mjs} +83 -25
  35. package/dist/browser/segment-codec-leaf-A427QJUX.mjs +554 -0
  36. package/dist/browser/segment-merge-leaf-7BZ54JPI.mjs +1636 -0
  37. package/dist/browser/storage-leaf-5UTR5K7J.mjs +19829 -0
  38. package/dist/browser/store-leaf-3L33V35P.mjs +2070 -0
  39. package/dist/browser/suggestions-leaf-UBNDVKBD.mjs +1430 -0
  40. package/dist/browser/worker-copies-JXSGYR5X.mjs +2951 -0
  41. package/dist/{capabilities-BTTIs96E.d.ts → capabilities-DMte5K9_.d.ts} +162 -18
  42. package/dist/chunk-2AFZE7Y3.mjs +72 -0
  43. package/dist/chunk-2CKDCC65.mjs +47 -0
  44. package/dist/chunk-3ECIRFS5.mjs +61 -0
  45. package/dist/chunk-44W3CBNG.mjs +7 -0
  46. package/dist/chunk-4H4RG2FR.mjs +13 -0
  47. package/dist/chunk-4PY4JYMY.mjs +11 -0
  48. package/dist/chunk-4ZPVAHWF.mjs +1289 -0
  49. package/dist/chunk-5EI5CXO6.mjs +197 -0
  50. package/dist/chunk-5F5MXWS5.mjs +283 -0
  51. package/dist/{chunk-OHP7QR33.mjs → chunk-5FLRXF73.mjs} +25 -4
  52. package/dist/chunk-6FOENO4E.mjs +273 -0
  53. package/dist/chunk-6GHX35ZM.mjs +108 -0
  54. package/dist/chunk-6MSZ543Y.mjs +32 -0
  55. package/dist/chunk-6N6HHBCQ.mjs +4596 -0
  56. package/dist/{chunk-LXPIXDUJ.mjs → chunk-7P5YWDRQ.mjs} +403 -169
  57. package/dist/{chunk-TGP5M5R7.mjs → chunk-7T4LAYT4.mjs} +1 -1
  58. package/dist/{chunk-GGSH6KBQ.mjs → chunk-ASZLNVWW.mjs} +23 -3
  59. package/dist/chunk-AVBPB3MI.mjs +602 -0
  60. package/dist/{chunk-UCDF35PU.mjs → chunk-AVGUEEQ3.mjs} +494 -245
  61. package/dist/chunk-BUMREPLU.mjs +15 -0
  62. package/dist/chunk-BY6NALRK.mjs +31921 -0
  63. package/dist/chunk-C4ZMXXTL.mjs +92 -0
  64. package/dist/{chunk-2WYMG3OZ.mjs → chunk-C74KPRR7.mjs} +274 -19
  65. package/dist/{chunk-RSRVGAIQ.mjs → chunk-D456ZFPQ.mjs} +3 -2
  66. package/dist/chunk-DXZ6JDWG.mjs +797 -0
  67. package/dist/chunk-FJXJZUWF.mjs +209 -0
  68. package/dist/chunk-FS3HPPSC.mjs +212 -0
  69. package/dist/chunk-FT4KLZXW.mjs +1164 -0
  70. package/dist/chunk-GR5GMFJJ.mjs +104 -0
  71. package/dist/chunk-GXCDWLQI.mjs +193 -0
  72. package/dist/chunk-GXED6R3Q.mjs +271 -0
  73. package/dist/chunk-HLPRHOSO.mjs +17 -0
  74. package/dist/chunk-IL5DRCNU.mjs +3041 -0
  75. package/dist/{chunk-P36MUFEJ.mjs → chunk-JDDXV6UF.mjs} +2 -1
  76. package/dist/chunk-K5HSUPYS.mjs +11 -0
  77. package/dist/chunk-KYIRXTCA.mjs +100 -0
  78. package/dist/chunk-LFXS6OF7.mjs +289 -0
  79. package/dist/chunk-LNGE7SLY.mjs +151 -0
  80. package/dist/chunk-M2Z5WVWW.mjs +194 -0
  81. package/dist/{chunk-45AVKHMJ.mjs → chunk-M3B7SGJB.mjs} +63 -50
  82. package/dist/chunk-M3OW2XSP.mjs +40 -0
  83. package/dist/chunk-MFPSQZ6P.mjs +127 -0
  84. package/dist/chunk-MRCJBWJZ.mjs +1292 -0
  85. package/dist/chunk-MSIN4NM3.mjs +25 -0
  86. package/dist/chunk-MW3CJVGP.mjs +219 -0
  87. package/dist/chunk-MYM6CAVK.mjs +76 -0
  88. package/dist/chunk-NJJN4FMM.mjs +84 -0
  89. package/dist/chunk-NM7I3BM7.mjs +59 -0
  90. package/dist/chunk-OIJ64LGT.mjs +19 -0
  91. package/dist/{chunk-K7D4ZTSW.mjs → chunk-P4F4UWLC.mjs} +1 -1
  92. package/dist/chunk-Q2AP2FSN.mjs +15 -0
  93. package/dist/chunk-R2PJKSNL.mjs +54 -0
  94. package/dist/{chunk-HXJBSHXF.mjs → chunk-R724DJSG.mjs} +5056 -2619
  95. package/dist/chunk-S2POFTLN.mjs +10 -0
  96. package/dist/chunk-S5QMWECL.mjs +7 -0
  97. package/dist/chunk-SLAC5PAB.mjs +5008 -0
  98. package/dist/chunk-T4HMSZCX.mjs +5 -0
  99. package/dist/chunk-TACP6VK6.mjs +111 -0
  100. package/dist/chunk-TGPKS2UM.mjs +125 -0
  101. package/dist/chunk-TKKXPKEO.mjs +979 -0
  102. package/dist/chunk-V6EUBAIT.mjs +19 -0
  103. package/dist/chunk-XL56L4IR.mjs +228 -0
  104. package/dist/chunk-XQIAMDAG.mjs +3076 -0
  105. package/dist/chunk-YTUZ4R22.mjs +1063 -0
  106. package/dist/{chunk-KV3AZFT3.mjs → chunk-ZKOQR7EA.mjs} +45 -1
  107. package/dist/chunk-ZPJFGGGI.mjs +638 -0
  108. package/dist/chunk-ZXX5GZEX.mjs +17 -0
  109. package/dist/{client-i9eLJrw5.d.ts → client-BKqtl0_V.d.ts} +442 -22
  110. package/dist/client.d.ts +11 -10
  111. package/dist/client.mjs +8 -898
  112. package/dist/config-Bnl7L-0H.d.ts +608 -0
  113. package/dist/{config-P__Diiy4.d.ts → config-CJ-jfI0a.d.ts} +119 -9
  114. package/dist/core-leaf-6JVHEVFB.mjs +8 -0
  115. package/dist/custom-token-results-NXHBVY7U.mjs +59 -0
  116. package/dist/digest-leaf-KXBGKYHZ.mjs +1 -0
  117. package/dist/direct-executor-V3WOYU2Y.mjs +17 -0
  118. package/dist/distribution/coordinator/etcd.d.ts +63 -7
  119. package/dist/distribution/coordinator/etcd.mjs +725 -81
  120. package/dist/distribution/coordinator/in-memory.d.ts +3 -3
  121. package/dist/distribution/coordinator/in-memory.mjs +65 -10
  122. package/dist/distribution/transport/grpc.d.ts +2 -2
  123. package/dist/distribution/transport/grpc.mjs +39 -10
  124. package/dist/distribution/transport/in-memory.d.ts +2 -2
  125. package/dist/distribution/transport/in-memory.mjs +9 -6
  126. package/dist/distribution/transport/tcp.d.ts +2 -2
  127. package/dist/distribution/transport/tcp.mjs +20 -15
  128. package/dist/distribution.d.ts +267 -56
  129. package/dist/distribution.mjs +23156 -11362
  130. package/dist/durability-config-VWS2K24E.mjs +96 -0
  131. package/dist/embed-4PHHKGBK.mjs +263 -0
  132. package/dist/embeddings/openai.d.ts +1 -1
  133. package/dist/embeddings/openai.mjs +2 -2
  134. package/dist/{memory-CUEDwr-F.d.ts → engine-qjAxJSKk.d.ts} +2254 -1123
  135. package/dist/geo-index-2ZMMWWSK.mjs +1484 -0
  136. package/dist/gzip-2UCZW2MM.mjs +31 -0
  137. package/dist/{index-lcdGLyJH.d.ts → index-B_vmxpgW.d.ts} +260 -102
  138. package/dist/index.browser.mjs +4 -4
  139. package/dist/index.d.ts +2133 -57
  140. package/dist/index.mjs +16 -32
  141. package/dist/index.react-native.mjs +12 -0
  142. package/dist/invalidation/broadcast-channel.d.ts +1 -1
  143. package/dist/invalidation/filesystem.d.ts +1 -1
  144. package/dist/invalidation/filesystem.mjs +1 -2
  145. package/dist/invalidation/noop.d.ts +1 -1
  146. package/dist/languages/albanian.mjs +1 -1
  147. package/dist/languages/amharic.mjs +1 -1
  148. package/dist/languages/arabic.mjs +1 -1
  149. package/dist/languages/armenian.mjs +1 -1
  150. package/dist/languages/azerbaijani.mjs +1 -1
  151. package/dist/languages/bambara.mjs +1 -1
  152. package/dist/languages/basque.mjs +1 -1
  153. package/dist/languages/belarusian.mjs +1 -1
  154. package/dist/languages/bengali.mjs +1 -1
  155. package/dist/languages/bosnian.mjs +1 -1
  156. package/dist/languages/breton.mjs +1 -1
  157. package/dist/languages/bulgarian.mjs +1 -1
  158. package/dist/languages/burmese.mjs +1 -1
  159. package/dist/languages/catalan.mjs +1 -1
  160. package/dist/languages/chinese.mjs +1 -1
  161. package/dist/languages/croatian.mjs +1 -1
  162. package/dist/languages/czech.mjs +1 -1
  163. package/dist/languages/dagbani.mjs +1 -1
  164. package/dist/languages/danish.mjs +1 -1
  165. package/dist/languages/dutch.mjs +1 -1
  166. package/dist/languages/english.mjs +1 -1
  167. package/dist/languages/esperanto.mjs +1 -1
  168. package/dist/languages/estonian.mjs +1 -1
  169. package/dist/languages/ewe.mjs +1 -1
  170. package/dist/languages/faroese.mjs +1 -1
  171. package/dist/languages/fijian.mjs +1 -1
  172. package/dist/languages/finnish.mjs +1 -1
  173. package/dist/languages/french.mjs +1 -1
  174. package/dist/languages/ga.mjs +1 -1
  175. package/dist/languages/galician.mjs +1 -1
  176. package/dist/languages/georgian.mjs +1 -1
  177. package/dist/languages/german.mjs +1 -1
  178. package/dist/languages/greek.mjs +1 -1
  179. package/dist/languages/guarani.mjs +1 -1
  180. package/dist/languages/gujarati.mjs +1 -1
  181. package/dist/languages/haitian-creole.mjs +1 -1
  182. package/dist/languages/hausa.mjs +1 -1
  183. package/dist/languages/hawaiian.mjs +1 -1
  184. package/dist/languages/hebrew.mjs +1 -1
  185. package/dist/languages/hindi.mjs +1 -1
  186. package/dist/languages/hungarian.mjs +1 -1
  187. package/dist/languages/icelandic.mjs +1 -1
  188. package/dist/languages/igbo.mjs +1 -1
  189. package/dist/languages/indonesian.mjs +1 -1
  190. package/dist/languages/irish.mjs +1 -1
  191. package/dist/languages/italian.mjs +1 -1
  192. package/dist/languages/japanese.mjs +1 -1
  193. package/dist/languages/kannada.mjs +1 -1
  194. package/dist/languages/kazakh.mjs +1 -1
  195. package/dist/languages/khmer.mjs +1 -1
  196. package/dist/languages/kinyarwanda.mjs +1 -1
  197. package/dist/languages/kirundi.mjs +1 -1
  198. package/dist/languages/korean.mjs +1 -1
  199. package/dist/languages/kurmanji.mjs +1 -1
  200. package/dist/languages/kyrgyz.mjs +1 -1
  201. package/dist/languages/lao.mjs +1 -1
  202. package/dist/languages/latin.mjs +1 -1
  203. package/dist/languages/latvian.mjs +1 -1
  204. package/dist/languages/lingala.mjs +1 -1
  205. package/dist/languages/lithuanian.mjs +1 -1
  206. package/dist/languages/luxembourgish.mjs +1 -1
  207. package/dist/languages/macedonian.mjs +1 -1
  208. package/dist/languages/malagasy.mjs +1 -1
  209. package/dist/languages/malay.mjs +1 -1
  210. package/dist/languages/malayalam.mjs +1 -1
  211. package/dist/languages/maltese.mjs +1 -1
  212. package/dist/languages/maori.mjs +1 -1
  213. package/dist/languages/marathi.mjs +1 -1
  214. package/dist/languages/nepali.mjs +1 -1
  215. package/dist/languages/norwegian.mjs +1 -1
  216. package/dist/languages/oromo.mjs +1 -1
  217. package/dist/languages/persian.mjs +1 -1
  218. package/dist/languages/polish.mjs +1 -1
  219. package/dist/languages/portuguese.mjs +1 -1
  220. package/dist/languages/punjabi.mjs +1 -1
  221. package/dist/languages/romanian.mjs +1 -1
  222. package/dist/languages/russian.mjs +1 -1
  223. package/dist/languages/samoan.mjs +1 -1
  224. package/dist/languages/sanskrit.mjs +1 -1
  225. package/dist/languages/scottish-gaelic.mjs +1 -1
  226. package/dist/languages/serbian.mjs +1 -1
  227. package/dist/languages/shona.mjs +1 -1
  228. package/dist/languages/sinhala.mjs +1 -1
  229. package/dist/languages/slovak.mjs +1 -1
  230. package/dist/languages/slovenian.mjs +1 -1
  231. package/dist/languages/sorani.mjs +1 -1
  232. package/dist/languages/spanish.mjs +1 -1
  233. package/dist/languages/swahili.mjs +1 -1
  234. package/dist/languages/swedish.mjs +1 -1
  235. package/dist/languages/tagalog.mjs +1 -1
  236. package/dist/languages/tamil.mjs +1 -1
  237. package/dist/languages/tatar.mjs +1 -1
  238. package/dist/languages/telugu.mjs +1 -1
  239. package/dist/languages/thai.mjs +1 -1
  240. package/dist/languages/tibetan.mjs +1 -1
  241. package/dist/languages/tigrinya.mjs +1 -1
  242. package/dist/languages/tongan.mjs +1 -1
  243. package/dist/languages/turkish.mjs +1 -1
  244. package/dist/languages/twi.mjs +1 -1
  245. package/dist/languages/ukrainian.mjs +1 -1
  246. package/dist/languages/urdu.mjs +1 -1
  247. package/dist/languages/vietnamese.mjs +1 -1
  248. package/dist/languages/welsh.mjs +1 -1
  249. package/dist/languages/wolof.mjs +1 -1
  250. package/dist/languages/xhosa.mjs +1 -1
  251. package/dist/languages/yoruba.mjs +1 -1
  252. package/dist/languages/zulu.mjs +1 -1
  253. package/dist/long-query-thread-UCRK7MSI.mjs +154 -0
  254. package/dist/module-5ZSLUQII.mjs +3729 -0
  255. package/dist/msgpack-leaf-H5ZYW7S7.mjs +9 -0
  256. package/dist/optional-reads-5HFMF2QZ.mjs +3373 -0
  257. package/dist/optional-writes-4UOQKETU.mjs +247 -0
  258. package/dist/paged-partition-archive-BBRLZCIF.mjs +253 -0
  259. package/dist/partial-words.browser.mjs +1650 -0
  260. package/dist/partial-words.mjs +17 -11
  261. package/dist/{chunk-ASY5PHYI.mjs → pattern.browser.mjs} +253 -311
  262. package/dist/pattern.mjs +6 -7
  263. package/dist/persistence/durability/checkpoint-worker.d.ts +93 -25
  264. package/dist/persistence/durability/checkpoint-worker.mjs +51 -41
  265. package/dist/phrase-module-EFESWOCR.mjs +635 -0
  266. package/dist/query-actions-HMJUVWGT.mjs +119 -0
  267. package/dist/query-suggestions/merge-worker.d.ts +55 -0
  268. package/dist/query-suggestions/merge-worker.mjs +53 -0
  269. package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
  270. package/dist/query-suggestions.browser.mjs +47 -0
  271. package/dist/query-suggestions.d.ts +20 -0
  272. package/dist/query-suggestions.mjs +19 -0
  273. package/dist/react-native/chunks/chunk-3OEFSHVV.mjs +970 -0
  274. package/dist/{browser/chunk-RELZRJNR.mjs → react-native/chunks/chunk-43R4GCM7.mjs} +49 -50
  275. package/dist/react-native/chunks/chunk-AKRYHAVG.mjs +6729 -0
  276. package/dist/react-native/chunks/chunk-CW2ZFXSE.mjs +14 -0
  277. package/dist/react-native/chunks/chunk-G3WCDTOF.mjs +29640 -0
  278. package/dist/react-native/chunks/chunk-GXXHHA2T.mjs +212 -0
  279. package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
  280. package/dist/react-native/chunks/chunk-HQEVQEDJ.mjs +52 -0
  281. package/dist/react-native/chunks/chunk-HRDMIQ63.mjs +131 -0
  282. package/dist/react-native/chunks/chunk-HTBY4GON.mjs +565 -0
  283. package/dist/react-native/chunks/chunk-LX62Y4B5.mjs +61 -0
  284. package/dist/react-native/chunks/chunk-MRH36RN3.mjs +902 -0
  285. package/dist/react-native/chunks/chunk-Q32DDFKX.mjs +19 -0
  286. package/dist/react-native/chunks/chunk-UE4ANHSX.mjs +127 -0
  287. package/dist/react-native/chunks/chunk-UNZPWLVL.mjs +1063 -0
  288. package/dist/react-native/chunks/chunk-UO44MA5M.mjs +232 -0
  289. package/dist/react-native/chunks/chunk-UYKIV2KT.mjs +42 -0
  290. package/dist/react-native/chunks/chunk-VUJCSQG5.mjs +11 -0
  291. package/dist/react-native/chunks/chunk-WVHF4ZAK.mjs +802 -0
  292. package/dist/react-native/chunks/chunk-ZUJCUPVS.mjs +54 -0
  293. package/dist/react-native/chunks/core-leaf-S2KNBWDY.mjs +7 -0
  294. package/dist/react-native/chunks/custom-token-results-3OZEMRE7.mjs +59 -0
  295. package/dist/react-native/chunks/digest-leaf-X6OIFDIU.mjs +1 -0
  296. package/dist/react-native/chunks/durability-config-FCSD4MXY.mjs +96 -0
  297. package/dist/react-native/chunks/embed-HA2I7RCF.mjs +263 -0
  298. package/dist/react-native/chunks/geo-index-QEYKEVPH.mjs +1484 -0
  299. package/dist/react-native/chunks/gzip.react-native-CVM4NQG2.mjs +12 -0
  300. package/dist/react-native/chunks/module-FMBX75GP.mjs +5209 -0
  301. package/dist/react-native/chunks/msgpack-leaf-JMNGSTRW.mjs +7 -0
  302. package/dist/react-native/chunks/optional-reads-AFPO2FEB.mjs +3364 -0
  303. package/dist/react-native/chunks/optional-writes-XOH25XZI.mjs +296 -0
  304. package/dist/react-native/chunks/phrase-module-IGYBK7XH.mjs +636 -0
  305. package/dist/react-native/chunks/replace-IMZUVUOE.mjs +57 -0
  306. package/dist/react-native/chunks/resolve-vector-text-GE2CRJKI.mjs +84 -0
  307. package/dist/react-native/chunks/restore-queue-LLNMYB4Z.mjs +187 -0
  308. package/dist/react-native/chunks/runtime-UOHD2XUJ.mjs +615 -0
  309. package/dist/react-native/chunks/segment-codec-leaf-VR6O5GLC.mjs +13 -0
  310. package/dist/react-native/chunks/segment-merge-leaf-LLMWU4EW.mjs +14 -0
  311. package/dist/react-native/chunks/storage-leaf-JD7PIDO4.mjs +19633 -0
  312. package/dist/react-native/chunks/store-leaf-4UVCMYGN.mjs +15 -0
  313. package/dist/react-native/chunks/suggestions-leaf-J5VT5RHY.mjs +1321 -0
  314. package/dist/react-native/chunks/worker-copies-ZYHY7FKJ.mjs +2831 -0
  315. package/dist/react-native/partial-words.mjs +1658 -0
  316. package/dist/react-native/pattern.mjs +2570 -0
  317. package/dist/react-native/query-suggestions.mjs +55 -0
  318. package/dist/react-native/sync.mjs +2759 -0
  319. package/dist/react-native/synonyms.mjs +676 -0
  320. package/dist/react.d.ts +12 -8
  321. package/dist/react.mjs +45 -1
  322. package/dist/{rerank-NWTKK636.mjs → rerank-RI2PMNOD.mjs} +22 -12
  323. package/dist/rerankers/http.d.ts +1 -1
  324. package/dist/rerankers/http.mjs +2 -2
  325. package/dist/resolve-vector-text-OD4J3WHF.mjs +3 -0
  326. package/dist/restore-queue-PCKWDAKQ.mjs +192 -0
  327. package/dist/runtime-USQYKN3I.mjs +615 -0
  328. package/dist/{schema-4W_7tk1f.d.ts → schema-CzG9OUw5.d.ts} +70 -30
  329. package/dist/segment-codec-leaf-QJM7I6QG.mjs +18 -0
  330. package/dist/segment-merge-leaf-4BJGIJHY.mjs +18 -0
  331. package/dist/server.d.ts +348 -22
  332. package/dist/server.mjs +2211 -327
  333. package/dist/storage-leaf-GRRRI7UV.mjs +5962 -0
  334. package/dist/store-leaf-6VMMSVBE.mjs +20 -0
  335. package/dist/stored-values-BWIMpiT_.d.ts +25 -0
  336. package/dist/suggestions-leaf-4KPTMPTL.mjs +54 -0
  337. package/dist/sync/filesystem.d.ts +30 -0
  338. package/dist/sync/filesystem.mjs +288 -0
  339. package/dist/sync/indexeddb.browser.mjs +287 -0
  340. package/dist/sync/indexeddb.d.ts +30 -0
  341. package/dist/sync/indexeddb.mjs +242 -0
  342. package/dist/sync.browser.mjs +1271 -0
  343. package/dist/sync.d.ts +23 -0
  344. package/dist/sync.mjs +2712 -0
  345. package/dist/synonyms.browser.mjs +658 -0
  346. package/dist/synonyms.mjs +17 -7
  347. package/dist/tasks-65b6t6lk.d.ts +782 -0
  348. package/dist/thread-UJ3W5LVI.mjs +31 -0
  349. package/dist/{types-B3b68nfF.d.ts → types-Ck97nB3D.d.ts} +1 -1
  350. package/dist/types-CpCg-Gq-.d.ts +227 -0
  351. package/dist/{types-Cb9kiY5P.d.ts → types-DvncmvuQ.d.ts} +12 -1
  352. package/dist/vector/search-worker.d.ts +10 -2
  353. package/dist/vector/search-worker.mjs +11 -11
  354. package/dist/worker-copies-YSXZXIGC.mjs +2232 -0
  355. package/dist/workers/entry.mjs +75 -15
  356. package/openapi.json +6840 -0
  357. package/package.json +406 -19
  358. package/dist/browser/chunk-CN4I4FZU.mjs +0 -602
  359. package/dist/browser/chunk-HOZW3PKP.mjs +0 -9
  360. package/dist/browser/chunk-JPTQZWJQ.mjs +0 -10
  361. package/dist/browser/chunk-LD55ZGU3.mjs +0 -347
  362. package/dist/browser/chunk-NAFT3K6X.mjs +0 -24546
  363. package/dist/browser/chunk-NNG3EEB6.mjs +0 -2728
  364. package/dist/browser/chunk-QWES44AW.mjs +0 -473
  365. package/dist/browser/durability-wiring-PY3L7DES.mjs +0 -3679
  366. package/dist/browser/module-PDXYHT75.mjs +0 -2822
  367. package/dist/browser/release-76MXRPGV.mjs +0 -33
  368. package/dist/browser/restore-queue-DVIYJ7RU.mjs +0 -35
  369. package/dist/browser/snapshot-J57MZK6L.mjs +0 -1207
  370. package/dist/browser/write-L7FAQA47.mjs +0 -208
  371. package/dist/chunk-37CD3OKS.mjs +0 -87
  372. package/dist/chunk-5XNIRLFC.mjs +0 -96
  373. package/dist/chunk-7X5JST5L.mjs +0 -114
  374. package/dist/chunk-AV4IJKD2.mjs +0 -35
  375. package/dist/chunk-AY3AQ3UH.mjs +0 -73
  376. package/dist/chunk-BKB3XTMI.mjs +0 -707
  377. package/dist/chunk-C7SLA6CM.mjs +0 -19
  378. package/dist/chunk-COVCQ73F.mjs +0 -587
  379. package/dist/chunk-DJHHF2L5.mjs +0 -17
  380. package/dist/chunk-E74YLAIG.mjs +0 -24
  381. package/dist/chunk-FMWRCP2C.mjs +0 -57
  382. package/dist/chunk-GES7U2PM.mjs +0 -68
  383. package/dist/chunk-HJSN7UYG.mjs +0 -10
  384. package/dist/chunk-JFRNNBOM.mjs +0 -35
  385. package/dist/chunk-K25LZA54.mjs +0 -8484
  386. package/dist/chunk-KEHK2O6P.mjs +0 -13
  387. package/dist/chunk-KOKM4PQN.mjs +0 -52
  388. package/dist/chunk-KZ3NX2P7.mjs +0 -21
  389. package/dist/chunk-L3L5YFXC.mjs +0 -614
  390. package/dist/chunk-L5ORED7V.mjs +0 -25
  391. package/dist/chunk-LH4NZNJJ.mjs +0 -1731
  392. package/dist/chunk-LU2CE5AE.mjs +0 -507
  393. package/dist/chunk-LXWDQLTW.mjs +0 -30
  394. package/dist/chunk-MHOSCQCQ.mjs +0 -948
  395. package/dist/chunk-NKRBEGJZ.mjs +0 -1705
  396. package/dist/chunk-NTRMFARG.mjs +0 -462
  397. package/dist/chunk-NW4XDSP2.mjs +0 -212
  398. package/dist/chunk-OOEXLUGR.mjs +0 -117
  399. package/dist/chunk-ORBLD3EL.mjs +0 -6
  400. package/dist/chunk-OWNZYMRE.mjs +0 -3591
  401. package/dist/chunk-PPY2GSIB.mjs +0 -44
  402. package/dist/chunk-QY7GC2MW.mjs +0 -33
  403. package/dist/chunk-R6A773WK.mjs +0 -226
  404. package/dist/chunk-R6PR4WYZ.mjs +0 -68
  405. package/dist/chunk-R7EEKAJE.mjs +0 -593
  406. package/dist/chunk-RONEOEON.mjs +0 -426
  407. package/dist/chunk-VWULPWRJ.mjs +0 -7469
  408. package/dist/chunk-WCJKUGHB.mjs +0 -262
  409. package/dist/chunk-WQBCBKY3.mjs +0 -8
  410. package/dist/chunk-X5CV2E2B.mjs +0 -1
  411. package/dist/chunk-YA7XLE2R.mjs +0 -1256
  412. package/dist/chunk-YTJCGKM4.mjs +0 -56
  413. package/dist/chunk-ZG477IPV.mjs +0 -526
  414. package/dist/chunk-ZYNAMIYX.mjs +0 -113
  415. package/dist/config-BGB_fDtq.d.ts +0 -237
  416. package/dist/direct-executor-CXZ66ACP.mjs +0 -22
  417. package/dist/durability-wiring-QTHOGFMZ.mjs +0 -3229
  418. package/dist/engine-BGCEm9E_.d.ts +0 -577
  419. package/dist/module-3NONKBZX.mjs +0 -1860
  420. package/dist/release-BH3DKW3T.mjs +0 -33
  421. package/dist/restore-queue-JPRBUYII.mjs +0 -35
  422. package/dist/runtime-ZKYZFJJC.mjs +0 -177
  423. package/dist/snapshot-HOGXNO5W.mjs +0 -793
  424. package/dist/tasks-HG3rlxx6.d.ts +0 -302
  425. package/dist/thread-B657LQXK.mjs +0 -692
  426. package/dist/write-XLIGTXBU.mjs +0 -238
@@ -0,0 +1,782 @@
1
+ import { B as BackupListing, b as ClusterNodeInfo, N as NodeReadiness } from './config-Bnl7L-0H.js';
2
+ import { A as AllocationConstraints, N as NodeRole, d as NodeMemoryReport } from './index-B_vmxpgW.js';
3
+ import { a as QuerySuggestionsBuild } from './query-suggestions-CBYkrQ5T.js';
4
+ import { I as IndexInfo, P as PartitionStatsResult, V as VectorMaintenanceResult, M as MemoryStats } from './engine-qjAxJSKk.js';
5
+ import { A as AnyDocument, a as InsertOptions, B as BM25Params, W as WriteOptions } from './schema-CzG9OUw5.js';
6
+ import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
7
+
8
+ /**
9
+ * The body of `POST /indexes/{name}/backups`.
10
+ *
11
+ * @public
12
+ */
13
+ interface CreateBackupBody {
14
+ /** The backup's name, from 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a letter or a digit. */
15
+ backup: string;
16
+ /**
17
+ * Set this to true to add every node's popular query suggestion history of the index to the backup. The history
18
+ * holds the scrambled text of what people searched for, and the backup keeps it after `retentionDays` ends.
19
+ */
20
+ queryHistory?: boolean;
21
+ }
22
+ /**
23
+ * The body of `POST /backups/{backup}/_restore`.
24
+ *
25
+ * @public
26
+ */
27
+ interface RestoreBackupBody {
28
+ /** The restore creates the index under this name, and it fails where the name is taken. */
29
+ indexName: string;
30
+ /** The restored index keeps this many replicas of each partition, or the backup's number when you leave it out. */
31
+ replicationFactor?: number;
32
+ /** The rules that place the restored partitions, or the backup's rules when you leave them out. */
33
+ constraints?: AllocationConstraints;
34
+ }
35
+ /**
36
+ * The body of `GET /backups`.
37
+ *
38
+ * @public
39
+ */
40
+ interface BackupListResponse {
41
+ /** One entry per backup in name order: its summary, or its name and a `BACKUP_DAMAGED` error where its manifest can't be read. */
42
+ backups: BackupListing[];
43
+ }
44
+
45
+ /**
46
+ * The body of `POST /indexes`, which the server sends once the index exists.
47
+ *
48
+ * @public
49
+ */
50
+ interface IndexCreatedResponse {
51
+ /** The server created the index under this name. */
52
+ name: string;
53
+ }
54
+ /**
55
+ * The body of `GET /indexes`.
56
+ *
57
+ * @public
58
+ */
59
+ interface IndexListResponse {
60
+ /** Each index appears here once, in creation order. */
61
+ indexes: IndexInfo[];
62
+ }
63
+ /**
64
+ * The body of `DELETE /indexes/{name}`.
65
+ *
66
+ * @public
67
+ */
68
+ interface IndexDroppedResponse {
69
+ /** The server dropped the index with this name. */
70
+ name: string;
71
+ /** This is always true. */
72
+ dropped: true;
73
+ }
74
+ /**
75
+ * The body of `GET /indexes/{name}/partitions`.
76
+ *
77
+ * @public
78
+ */
79
+ interface IndexPartitionsResponse {
80
+ /** One entry describes each partition of the index. */
81
+ partitions: PartitionStatsResult[];
82
+ }
83
+ /**
84
+ * The body of `POST /indexes/{name}/_clear`.
85
+ *
86
+ * @public
87
+ */
88
+ interface IndexClearedResponse {
89
+ /** The server removed every document from the index with this name. */
90
+ name: string;
91
+ /** This is always true. */
92
+ cleared: true;
93
+ }
94
+ /**
95
+ * The body of `POST /indexes/{name}/_open` and `POST /indexes/{name}/_close`.
96
+ *
97
+ * @public
98
+ */
99
+ interface IndexStateResponse {
100
+ /** The request changed the index with this name. */
101
+ name: string;
102
+ /** The index holds this state now. */
103
+ state: 'open' | 'closed';
104
+ }
105
+ /**
106
+ * The body of a request that the server finishes with nothing further to report.
107
+ *
108
+ * @public
109
+ */
110
+ interface OkResponse {
111
+ /** This is always true. */
112
+ ok: true;
113
+ }
114
+ /**
115
+ * The body of `POST /indexes/{name}/documents` and of
116
+ * `PATCH /indexes/{name}/documents/{id}`.
117
+ *
118
+ * @public
119
+ */
120
+ interface DocumentIdResponse {
121
+ /** The server wrote the document under this id. */
122
+ id: string;
123
+ }
124
+ /**
125
+ * The body of `PUT /indexes/{name}/documents/{id}`.
126
+ *
127
+ * @public
128
+ */
129
+ interface DocumentPutResponse {
130
+ /** The server wrote the document under this id. */
131
+ id: string;
132
+ /** This is true where the id was new, and false where the document replaced an existing one. */
133
+ created: boolean;
134
+ }
135
+ /**
136
+ * The body of `DELETE /indexes/{name}/documents/{id}`.
137
+ *
138
+ * @public
139
+ */
140
+ interface DocumentRemovedResponse {
141
+ /** The server removed the document with this id. */
142
+ id: string;
143
+ /** This is always true. */
144
+ removed: true;
145
+ }
146
+ /**
147
+ * The body of `GET /indexes/{name}/documents/{id}`.
148
+ *
149
+ * @public
150
+ */
151
+ interface DocumentResponse {
152
+ /** This is the stored document. */
153
+ document: AnyDocument;
154
+ }
155
+ /**
156
+ * The body of `GET /indexes/{name}/documents/{id}/_exists`.
157
+ *
158
+ * @public
159
+ */
160
+ interface DocumentExistsResponse {
161
+ /** This is true where the index holds a document with the id. */
162
+ exists: boolean;
163
+ }
164
+ /**
165
+ * The body of `GET /indexes/{name}/count`.
166
+ *
167
+ * @public
168
+ */
169
+ interface DocumentCountResponse {
170
+ /** The index holds this many documents. */
171
+ count: number;
172
+ }
173
+ /**
174
+ * The body of `POST /indexes/{name}/documents/_multi-get`.
175
+ *
176
+ * @public
177
+ */
178
+ interface MultiGetResponse {
179
+ /** Each document found appears under its id, and an id with no document has no entry. */
180
+ documents: Record<string, AnyDocument>;
181
+ }
182
+ /**
183
+ * The body of `GET /indexes/{name}/vector-maintenance`.
184
+ *
185
+ * @public
186
+ */
187
+ interface VectorMaintenanceResponse {
188
+ /** One entry describes each vector field of the index. */
189
+ fields: VectorMaintenanceResult[];
190
+ }
191
+ /**
192
+ * The body of `GET /indexes/{name}/synonyms`, and the body that
193
+ * `POST /indexes/{name}/synonyms` takes.
194
+ *
195
+ * @public
196
+ */
197
+ interface SynonymSetBody {
198
+ /** These rules make up the set, with every word as it was written, and an empty list removes the set. */
199
+ synonyms: SynonymRule[];
200
+ }
201
+ /**
202
+ * The body that `POST /indexes/{name}/vectors/_compact` and
203
+ * `POST /indexes/{name}/vectors/_optimize` take.
204
+ *
205
+ * @public
206
+ */
207
+ interface VectorFieldBody {
208
+ /** The request covers this vector field, and every vector field of the index where you leave it out. */
209
+ field?: string;
210
+ }
211
+ /**
212
+ * The body of `GET /livez`.
213
+ *
214
+ * @public
215
+ */
216
+ interface LivenessResponse {
217
+ /** This is always `ok`, because the process answered. */
218
+ status: 'ok';
219
+ }
220
+ /**
221
+ * The cluster node that a server fronts, as `/readyz` and `/cluster` report it.
222
+ *
223
+ * @public
224
+ */
225
+ interface ClusterNodeReport extends ClusterNodeInfo {
226
+ /** This says whether the node can serve requests now. */
227
+ readiness: NodeReadiness;
228
+ /** This is true while the node holds the controller lease. */
229
+ isController: boolean;
230
+ }
231
+ /**
232
+ * The body of `GET /readyz` and `GET /health`, which the server sends with
233
+ * status 200 while it is ready and with status 503 while it is not.
234
+ *
235
+ * @public
236
+ */
237
+ interface ReadinessResponse {
238
+ /** This says whether the server can take requests now. */
239
+ status: 'ready' | 'unavailable';
240
+ /** A server that fronts a cluster node describes that node here. */
241
+ cluster?: ClusterNodeReport;
242
+ }
243
+ /**
244
+ * The body of `GET /version`.
245
+ *
246
+ * @public
247
+ */
248
+ interface VersionResponse {
249
+ /** This is always `narsil`. */
250
+ name: 'narsil';
251
+ /** The build came from this package version, or this is null where the build stamped none. */
252
+ version: string | null;
253
+ /** The build came from this git commit, or this is null where the build stamped none. */
254
+ gitSha: string | null;
255
+ /** This is true when the working tree held uncommitted changes at build time. */
256
+ dirty: boolean;
257
+ /** The thread that answered searches vector graphs through the native search core under `native`, and through WebAssembly under `wasm`. */
258
+ vectorSearch: 'native' | 'wasm';
259
+ }
260
+ /**
261
+ * One member of a cluster, as `GET /cluster` reports it.
262
+ *
263
+ * @public
264
+ */
265
+ interface ClusterMemberReport {
266
+ /** This identifies the node across the cluster. */
267
+ nodeId: string;
268
+ /** Peers reach the node at this address. */
269
+ address: string;
270
+ /** The node holds these roles in the cluster. */
271
+ roles: NodeRole[];
272
+ /** The node uses this much memory, or null where its runtime cannot measure it. */
273
+ memory: NodeMemoryReport | null;
274
+ }
275
+ /**
276
+ * The body of `GET /cluster`.
277
+ *
278
+ * @public
279
+ */
280
+ interface ClusterTopologyResponse {
281
+ /** This describes the node that answered. */
282
+ node: ClusterNodeReport;
283
+ /** This node holds the controller lease, and the value is null while no node holds it. */
284
+ controllerNodeId: string | null;
285
+ /** One entry describes each registered node. */
286
+ nodes: ClusterMemberReport[];
287
+ }
288
+ /**
289
+ * One partition of an index, as `GET /indexes/{name}/cluster` reports it.
290
+ *
291
+ * @public
292
+ */
293
+ interface PartitionAllocationReport {
294
+ /** This identifies the partition within its index. */
295
+ partitionId: number;
296
+ /** The partition holds this allocation state. */
297
+ state: string;
298
+ /** This node holds the primary copy, and the value is null while no node holds it. */
299
+ primary: string | null;
300
+ /** The primary holds this term. */
301
+ primaryTerm: number;
302
+ /** The primary has acknowledged writes up to this sequence number. */
303
+ commitPoint: number;
304
+ /** These nodes hold replica copies. */
305
+ replicas: string[];
306
+ /** These nodes hold replica copies that are up to date. */
307
+ inSyncSet: string[];
308
+ /** These nodes held a copy before the partition lost its primary. */
309
+ lastHolders: string[];
310
+ /** This says why the partition has no node, and the value is null while it has one. */
311
+ unassignedReason: string | null;
312
+ }
313
+ /**
314
+ * The body of `GET /indexes/{name}/cluster`.
315
+ *
316
+ * @public
317
+ */
318
+ interface ClusterAllocationResponse {
319
+ /** The report covers the index with this name. */
320
+ indexName: string;
321
+ /** This is true where the cluster has placed at least one partition of the index. */
322
+ allocated: boolean;
323
+ /** The allocation table holds this version, and the value is null where the index has no table. */
324
+ version: number | null;
325
+ /** One entry describes each partition, in partition order. */
326
+ partitions: PartitionAllocationReport[];
327
+ }
328
+ /**
329
+ * The body that `PUT /indexes/{name}/replication-factor` takes.
330
+ *
331
+ * @public
332
+ */
333
+ interface ReplicationFactorBody {
334
+ /** Each partition keeps this many replicas besides its primary. */
335
+ replicationFactor: number;
336
+ }
337
+ /**
338
+ * The body of `PUT /indexes/{name}/replication-factor`.
339
+ *
340
+ * @public
341
+ */
342
+ interface ReplicationFactorResponse {
343
+ /** The request changed the index with this name. */
344
+ indexName: string;
345
+ /** Each partition now keeps this many replicas besides its primary. */
346
+ replicationFactor: number;
347
+ }
348
+ /**
349
+ * The code, the message, and the details of one failure, as the server writes it to JSON.
350
+ *
351
+ * @public
352
+ */
353
+ interface ErrorDetail {
354
+ /** This code comes from either {@link ServerErrorCodes} or {@link ErrorCodes}. */
355
+ code: string;
356
+ /** This describes the failure, for a log or a person. */
357
+ message: string;
358
+ /** These values are behind the failure, such as the field or limit involved. */
359
+ details?: Record<string, unknown>;
360
+ }
361
+ /**
362
+ * One document that a batch refused.
363
+ *
364
+ * @public
365
+ */
366
+ interface BatchFailure {
367
+ /** The batch refused the document with this id. */
368
+ docId: string;
369
+ /** This says why the batch refused the document. */
370
+ error: ErrorDetail;
371
+ }
372
+ /**
373
+ * The body of `POST /indexes/{name}/documents/_batch`. One bad document never
374
+ * abandons the rest, so read both lists.
375
+ *
376
+ * @public
377
+ */
378
+ interface BatchResponse {
379
+ /** The server wrote the documents under these ids. */
380
+ succeeded: string[];
381
+ /** The server refused each of these documents. */
382
+ failed: BatchFailure[];
383
+ }
384
+
385
+ /** Declarative index configuration accepted over HTTP. Function-valued engine
386
+ * options (custom tokenizer, stopWords-as-function, group reducer, embedding
387
+ * adapter object) are not representable here; the embedding adapter is named
388
+ * instead via {@link CreateIndexEmbedding}.
389
+ *
390
+ * @public */
391
+ interface CreateIndexRequest {
392
+ /** The server creates the index under this name. */
393
+ name: string;
394
+ /** This carries the schema and settings, in the subset JSON can express. */
395
+ config: HttpIndexConfig;
396
+ }
397
+ /**
398
+ * How a JSON `createIndex` request connects an index to an embedding adapter.
399
+ *
400
+ * An adapter is a function and cannot cross JSON, so the request names one the
401
+ * server registered instead of carrying it.
402
+ *
403
+ * @public
404
+ */
405
+ interface CreateIndexEmbedding {
406
+ /** This names an adapter the server registered under `embeddingAdapters`. */
407
+ adapter?: string;
408
+ /** This maps each vector field to the text field, or fields, the server embeds into it. */
409
+ fields: Record<string, string | string[]>;
410
+ }
411
+ /**
412
+ * The body of `POST /indexes/{name}/documents`.
413
+ *
414
+ * @public
415
+ */
416
+ interface InsertBody {
417
+ /** The server stores this document. */
418
+ document: AnyDocument;
419
+ /** The server stores the document under this id, and takes the document's `id` field or a new id where you leave this out. */
420
+ id?: string;
421
+ /** These settings control how the write reaches the worker copies. */
422
+ options?: InsertOptions;
423
+ }
424
+ /**
425
+ * The body of `PUT` and of `PATCH /indexes/{name}/documents/{id}`.
426
+ *
427
+ * @public
428
+ */
429
+ interface DocumentBody {
430
+ /** The server writes this document under the id in the path. */
431
+ document: AnyDocument;
432
+ /** These settings control how the write reaches the worker copies. */
433
+ options?: WriteOptions;
434
+ }
435
+ /**
436
+ * The body of `POST /indexes/{name}/documents/_multi-get`.
437
+ *
438
+ * @public
439
+ */
440
+ interface MultiGetBody {
441
+ /** The server fetches the documents with these ids. */
442
+ docIds: string[];
443
+ }
444
+ /**
445
+ * The body of `POST /indexes/{name}/documents/_batch`.
446
+ *
447
+ * @public
448
+ */
449
+ interface BatchBody {
450
+ /** The server performs this action, and `insert` where you leave it out. */
451
+ action?: 'insert' | 'update' | 'delete';
452
+ /** The `insert` action writes these documents. */
453
+ documents?: AnyDocument[];
454
+ /** The `update` action replaces the document under each of these ids. */
455
+ updates?: Array<{
456
+ /** The update replaces the document with this id. */
457
+ docId: string;
458
+ /** The update writes this document. */
459
+ document: AnyDocument;
460
+ }>;
461
+ /** The `delete` action removes the documents with these ids. */
462
+ docIds?: string[];
463
+ /** These settings apply to the whole batch. */
464
+ options?: InsertOptions;
465
+ }
466
+ /**
467
+ * The body of `POST /indexes/{name}/_change-analysis`, where a key that you
468
+ * leave out keeps its current value.
469
+ *
470
+ * @public
471
+ */
472
+ interface ChangeAnalysisBody {
473
+ /** This is the name of a language registered on the server. */
474
+ language?: string;
475
+ /** This is a name registered on the server, or `null` for the language default. */
476
+ tokenizer?: string | null;
477
+ /** This is a name registered on the server, a list of words, or `null` for the language default. */
478
+ stopWords?: string | string[] | null;
479
+ }
480
+ /**
481
+ * The body of `POST /indexes/{name}/_rebalance`.
482
+ *
483
+ * @public
484
+ */
485
+ interface RebalanceBody {
486
+ /** The index moves to this many partitions, which must be a positive whole number. */
487
+ targetPartitionCount?: number;
488
+ }
489
+ /**
490
+ * The index settings a JSON request can carry, which is {@link IndexConfig}
491
+ * minus everything that is a function.
492
+ *
493
+ * A custom tokeniser, a stop-word function, and an embedding adapter object
494
+ * have no JSON form, so an HTTP client names a registered one or supplies a
495
+ * plain list instead.
496
+ *
497
+ * @public
498
+ */
499
+ interface HttpIndexConfig {
500
+ /** This layout gives each value as either a field type or a nested schema. */
501
+ schema: Record<string, unknown>;
502
+ /** The server tokenises and stems text fields with the language module registered under this name. */
503
+ language?: string;
504
+ /** These settings control how the index splits documents across partitions as it grows. */
505
+ partitions?: {
506
+ maxDocsPerPartition?: number;
507
+ maxPartitions?: number;
508
+ watermark?: number;
509
+ };
510
+ /** A query scores this way unless it asks for another mode. */
511
+ defaultScoring?: 'local' | 'dfs' | 'broadcast';
512
+ /** These parameters tune BM25 for this index and for each of its text fields. */
513
+ bm25?: BM25Params;
514
+ /** This is the name of a tokeniser registered on the server, which then splits text in place of the language's own rules. */
515
+ tokenizer?: string;
516
+ /** This name of a stop word set registered on the server, or this list, replaces the language's stop words. */
517
+ stopWords?: string | string[];
518
+ /** Setting this records term positions in each posting, which the `.nrsl` format carries for readers that match phrases. Highlighting works without it. */
519
+ trackPositions?: boolean;
520
+ /** Setting this to `disk` lets the index answer from segment files that the server reads by position, which needs filesystem durability. The default is `memory`. */
521
+ textStorage?: 'memory' | 'disk';
522
+ /** Setting this to false returns index stems from suggestions and prefix expansion, instead of the words users typed. */
523
+ surfaceForms?: boolean;
524
+ /** These settings control when vector fields move to an HNSW graph, and how that graph is built. */
525
+ vectorPromotion?: Record<string, unknown>;
526
+ /** Setting this rejects a document carrying a field the schema does not declare. */
527
+ strict?: boolean;
528
+ /** This names a server-registered embedding adapter and the fields it embeds. */
529
+ embedding?: CreateIndexEmbedding;
530
+ /** The server rejects a document that omits any of these fields. */
531
+ required?: string[];
532
+ /** The server returns a `DOC_VALIDATION_FAILED` error for a document whose value in a `verbatim` field, or in a field whose type includes `pattern`, is longer than this many code points. Set a whole number from 1 to 65,536, or leave this unset for a limit of 8,192. */
533
+ patternValueLimit?: number;
534
+ /** A search for a word in one of these rules also matches its synonyms, and the server refuses a set beyond 100,000 rules, 500,000 words, or 4,194,304 bytes of words in UTF-8 with `CONFIG_INVALID`. */
535
+ synonyms?: SynonymRule[];
536
+ }
537
+ /**
538
+ * One record an import refused, naming the line it came from and why the
539
+ * server rejected it.
540
+ *
541
+ * @public
542
+ */
543
+ interface ImportError {
544
+ /** The failing record sat on this line of the body, counting from one. */
545
+ line?: number;
546
+ /** The engine rejected the document stored under this id. */
547
+ docId?: string;
548
+ /** This says which failure it is. */
549
+ code: string;
550
+ /** This describes the failure, for a log or a person. */
551
+ message: string;
552
+ /** The server puts the facts that explain the failure here where it has any, such as the `reason` for a line that it refused to parse because parsing the line could fill the heap. */
553
+ details?: Record<string, unknown>;
554
+ }
555
+ /**
556
+ * What one import produced.
557
+ *
558
+ * `errors` is capped by the server's `maxImportErrors` limit while `failed`
559
+ * counts every refusal, so a run that trips the cap reports the true total and
560
+ * sets `errorsTruncated`.
561
+ *
562
+ * @public
563
+ */
564
+ interface ImportResult {
565
+ /** The engine accepted this many documents. */
566
+ indexed: number;
567
+ /** The server refused this many records in total. */
568
+ failed: number;
569
+ /** The first refusals, up to the server's reporting cap. */
570
+ errors: ImportError[];
571
+ /** Setting this says more records failed than `errors` lists. */
572
+ errorsTruncated: boolean;
573
+ }
574
+ /**
575
+ * What a server announces at `/capabilities`, which is how a client finds out
576
+ * whether an optional route or mode is available before it sends a request.
577
+ *
578
+ * A server that answers 404 here predates the endpoint, so treat every optional
579
+ * capability as absent.
580
+ *
581
+ * @public
582
+ */
583
+ interface CapabilitiesResponse {
584
+ /** Each name marks one capability this server serves. */
585
+ capabilities: string[];
586
+ }
587
+ /**
588
+ * The body `GET /stats/memory` answers with, which is the engine's {@link MemoryStats}
589
+ * plus the number of worker threads the server receives requests on. Only the
590
+ * server can report that count, because it starts those threads.
591
+ *
592
+ * @public
593
+ */
594
+ interface MemoryStatsResponse extends MemoryStats {
595
+ /**
596
+ * This many worker threads receive requests and answer searches from the
597
+ * copies they hold. The count is zero where the main thread answers everything
598
+ * itself, which happens under `workers.enabled: false`, on a runtime without
599
+ * worker threads, and on a cluster node's engine. See
600
+ * {@link NarsilServer.requestThreadCount}.
601
+ */
602
+ requestThreads: number;
603
+ }
604
+
605
+ /**
606
+ * Which long-running operation a task record tracks.
607
+ *
608
+ * @public
609
+ */
610
+ type TaskType = 'optimizeVectors' | 'rebalance' | 'restore' | 'import' | 'importExport' | 'rebuildAnalysis' | 'changeAnalysis' | 'backup' | 'backupRestore' | 'backupDelete' | 'querySuggestionsBuild';
611
+ /**
612
+ * Where a long-running operation stands.
613
+ *
614
+ * A task starts `running`, because the server begins the work as it accepts
615
+ * the request. Where the server already drives
616
+ * {@link ServerLimits.maxConcurrentTasks} tasks, it answers 429
617
+ * `TOO_MANY_REQUESTS` and starts none. A task reaches `cancelled` only where
618
+ * the work itself stops early, so a cancel that arrives too late leaves the
619
+ * task `succeeded`.
620
+ *
621
+ * @public
622
+ */
623
+ type TaskStatus = 'running' | 'succeeded' | 'failed' | 'cancelled';
624
+ /**
625
+ * How far a running import has gone, which is what a progress bar reads.
626
+ *
627
+ * The byte counts describe the request body, so they give an honest fraction
628
+ * from the first batch onwards, while the document counts only cover what the
629
+ * server has already handed to the engine. Task types other than `import`
630
+ * report no progress.
631
+ *
632
+ * @public
633
+ */
634
+ interface TaskProgress {
635
+ /** The server has indexed this many documents so far. */
636
+ indexed: number;
637
+ /** The server has rejected this many documents so far. */
638
+ failed: number;
639
+ /** The server has read this many bytes of the body so far. */
640
+ bytesProcessed: number;
641
+ /** The body holds this many bytes in total. */
642
+ bytesTotal: number;
643
+ }
644
+ /**
645
+ * How far a task that works through a known number of steps has gone.
646
+ *
647
+ * A `backup` and a `backupRestore` task count partitions, and a `backupDelete` task counts the files it removes.
648
+ *
649
+ * @public
650
+ */
651
+ interface TaskStepProgress {
652
+ /** The task has finished this many steps. */
653
+ done: number;
654
+ /** The task covers this many steps, and 0 until it knows. */
655
+ total: number;
656
+ }
657
+ /**
658
+ * One long-running operation, which the server answers with straight away and
659
+ * you then poll.
660
+ *
661
+ * Every route that starts a task answers with this same record, and
662
+ * `GET /tasks/{id}` returns it again as the work moves on.
663
+ *
664
+ * @public
665
+ */
666
+ interface TaskRecord {
667
+ /** This identifies the task, and is what you poll by. */
668
+ id: string;
669
+ /** This says which operation the task runs. */
670
+ type: TaskType;
671
+ /**
672
+ * The operation runs against this index. A `backupRestore` task names the index it creates, and a `backupDelete`
673
+ * task names none and carries an empty string.
674
+ */
675
+ indexName: string;
676
+ /** A `backup`, `backupRestore`, or `backupDelete` task works on the backup of this name. */
677
+ backupName?: string;
678
+ /** This says where the operation stands. */
679
+ status: TaskStatus;
680
+ /** Identifier of the server instance running this task; see ServerOptions.instanceId. */
681
+ owner: string;
682
+ /** The server accepted the task at this many milliseconds since the epoch. */
683
+ createdAt: number;
684
+ /** Work started at this many milliseconds since the epoch. */
685
+ startedAt?: number;
686
+ /** Work ended at this many milliseconds since the epoch, and a task omits it until it reaches a final status. */
687
+ completedAt?: number;
688
+ /** A cancel arrived at this many milliseconds since the epoch, which is how a
689
+ * task still running shows that it is stopping. */
690
+ cancelRequestedAt?: number;
691
+ /** How far the work has gone, which an import reports and other task types omit. */
692
+ progress?: TaskProgress;
693
+ /** How many of its steps the work has finished, which a backup, a backup restore, and a backup deletion report. */
694
+ steps?: TaskStepProgress;
695
+ /** What the work produced, which an `import` or `importExport` task reports once it finishes. */
696
+ result?: ImportResult;
697
+ /** The build that a `querySuggestionsBuild` task ran, once it ends. */
698
+ build?: QuerySuggestionsBuild;
699
+ /** This says why the task failed, and a failed task alone carries it. */
700
+ error?: ErrorDetail;
701
+ }
702
+ /**
703
+ * Which task records `GET /tasks` returns, and where the page starts.
704
+ *
705
+ * Every filter is optional, and omitting all of them lists every record the
706
+ * store still holds, newest first.
707
+ *
708
+ * @public
709
+ */
710
+ interface TaskListQuery {
711
+ /** Keeps the tasks running against this index. */
712
+ indexName?: string;
713
+ /** Keeps the tasks of these types. */
714
+ type?: TaskType[];
715
+ /** Keeps the tasks at these statuses. */
716
+ status?: TaskStatus[];
717
+ /** Skips this many records, and starts at the newest by default. */
718
+ from?: number;
719
+ /** The page carries this many records, and 20 by default. */
720
+ limit?: number;
721
+ }
722
+ /**
723
+ * One page of task records, ordered newest first.
724
+ *
725
+ * @public
726
+ */
727
+ interface TaskListPage {
728
+ /** The records this page carries. */
729
+ tasks: TaskRecord[];
730
+ /** How many records the filters matched in total, across every page. */
731
+ total: number;
732
+ /** This page skipped this many records. */
733
+ from: number;
734
+ /** This page asked for this many records. */
735
+ limit: number;
736
+ /** Pass this back as `from` for the next page, and it is null on the last page. */
737
+ next: number | null;
738
+ }
739
+ /**
740
+ * Pluggable backing store for task records. Every method is async so any
741
+ * backend works: an in-memory map, Redis, an HTTP key-value service, or a
742
+ * database. `set` upserts by `record.id`; `get` returns null for an unknown id.
743
+ * `ttlMs`, when honored by the backend, expires the record so terminal tasks do
744
+ * not accumulate. The server never calls a method that mutates a record it did
745
+ * not construct, so a backend may treat records as immutable snapshots.
746
+ *
747
+ * @public
748
+ */
749
+ interface TaskStore {
750
+ /**
751
+ * Stores a record, replacing whatever its id already held.
752
+ *
753
+ * @param record - The record to store.
754
+ * @param ttlMs - Milliseconds after which the backend may drop it, which
755
+ * keeps finished tasks from accumulating. Ignore it in a backend without
756
+ * expiry.
757
+ */
758
+ set(record: TaskRecord, ttlMs?: number): Promise<void>;
759
+ /**
760
+ * Reads one record back.
761
+ *
762
+ * @param id - The task to read.
763
+ * @returns The record, or `null` when the store holds no such id.
764
+ */
765
+ get(id: string): Promise<TaskRecord | null>;
766
+ /**
767
+ * Lists every record the store holds.
768
+ *
769
+ * @returns Each record the backend still has.
770
+ */
771
+ list(): Promise<TaskRecord[]>;
772
+ /**
773
+ * Removes one record. An id the store never held is not an error.
774
+ *
775
+ * @param id - The task to remove.
776
+ */
777
+ delete(id: string): Promise<void>;
778
+ /** Releases whatever the backend holds open, such as a connection pool. */
779
+ shutdown?(): Promise<void>;
780
+ }
781
+
782
+ export type { PartitionAllocationReport as $, IndexClearedResponse as A, BackupListResponse as B, CapabilitiesResponse as C, DocumentBody as D, ErrorDetail as E, IndexCreatedResponse as F, IndexDroppedResponse as G, HttpIndexConfig as H, ImportError as I, IndexListResponse as J, IndexPartitionsResponse as K, IndexStateResponse as L, MemoryStatsResponse as M, LivenessResponse as N, MultiGetResponse as O, OkResponse as P, ReadinessResponse as Q, RestoreBackupBody as R, SynonymSetBody as S, TaskListPage as T, ReplicationFactorResponse as U, VectorFieldBody as V, VectorMaintenanceResponse as W, VersionResponse as X, BatchFailure as Y, ClusterMemberReport as Z, ClusterNodeReport as _, ChangeAnalysisBody as a, CreateIndexEmbedding as b, ImportResult as c, TaskListQuery as d, TaskProgress as e, TaskRecord as f, TaskStatus as g, TaskStepProgress as h, TaskType as i, TaskStore as j, CreateIndexRequest as k, BatchBody as l, CreateBackupBody as m, InsertBody as n, MultiGetBody as o, RebalanceBody as p, ReplicationFactorBody as q, BatchResponse as r, ClusterAllocationResponse as s, ClusterTopologyResponse as t, DocumentCountResponse as u, DocumentExistsResponse as v, DocumentIdResponse as w, DocumentPutResponse as x, DocumentRemovedResponse as y, DocumentResponse as z };