@delali/narsil 0.3.1-next.144 → 0.3.1-next.146

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 (241) hide show
  1. package/dist/adapters/filesystem.d.ts +1 -1
  2. package/dist/adapters/filesystem.mjs +101 -13
  3. package/dist/adapters/gcs.d.ts +49 -0
  4. package/dist/adapters/gcs.mjs +213 -0
  5. package/dist/adapters/indexeddb.d.ts +1 -1
  6. package/dist/adapters/indexeddb.mjs +2 -7
  7. package/dist/adapters/memory.d.ts +1 -1
  8. package/dist/adapters/memory.mjs +5 -0
  9. package/dist/adapters/s3.d.ts +53 -0
  10. package/dist/adapters/s3.mjs +263 -0
  11. package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
  12. package/dist/analysis-change-ZCJNYBJM.mjs +39 -0
  13. package/dist/{browser/analysis-change-entry-7HR4LWL3.mjs → analysis-change-entry-YN3ELL6C.mjs} +1 -1
  14. package/dist/browser/{analysis-change-JPV775LR.mjs → analysis-change-M65AZQQG.mjs} +8 -5
  15. package/dist/{analysis-change-entry-TZTG4AZB.mjs → browser/analysis-change-entry-H3YIOLXZ.mjs} +1 -1
  16. package/dist/browser/{chunk-VFYMPCOV.mjs → chunk-2JABMB4S.mjs} +10 -6
  17. package/dist/{chunk-46NZOPHS.mjs → browser/chunk-4DYLCICG.mjs} +2 -2
  18. package/dist/browser/{chunk-MZI3TEOW.mjs → chunk-4RD3AFSB.mjs} +1 -1
  19. package/dist/browser/{chunk-WCFCHIBB.mjs → chunk-5V74FFZE.mjs} +2 -2
  20. package/dist/{chunk-NN33CZRE.mjs → browser/chunk-6OWX3OP2.mjs} +2 -2
  21. package/dist/browser/chunk-BRWY3JCN.mjs +678 -0
  22. package/dist/browser/{chunk-5DB2VDGI.mjs → chunk-BVX2MEHA.mjs} +306 -607
  23. package/dist/browser/{chunk-KTOK275N.mjs → chunk-D6UFGBF5.mjs} +15 -45
  24. package/dist/browser/{chunk-D33A5VMU.mjs → chunk-IAXZAVYL.mjs} +25 -66
  25. package/dist/browser/chunk-JNOAKDUM.mjs +31 -0
  26. package/dist/browser/{chunk-LVY2LI35.mjs → chunk-KAEVGLYN.mjs} +2 -2
  27. package/dist/browser/{chunk-3ZBJYAS4.mjs → chunk-LURXVCHG.mjs} +1 -1
  28. package/dist/browser/chunk-MPK76GVS.mjs +63 -0
  29. package/dist/browser/{chunk-ZEV26AQ6.mjs → chunk-NVEJJP4R.mjs} +1 -1
  30. package/dist/browser/{chunk-HKX2G6WH.mjs → chunk-ODQP7P3H.mjs} +455 -66
  31. package/dist/browser/{chunk-35B42UFM.mjs → chunk-PIS7ZAP7.mjs} +12 -25
  32. package/dist/browser/{chunk-TCLEOZ4P.mjs → chunk-QMNZFFD3.mjs} +4 -3
  33. package/dist/browser/{chunk-R4WUDZQV.mjs → chunk-SRL47USS.mjs} +2 -2
  34. package/dist/browser/chunk-TY7L6OXO.mjs +69 -0
  35. package/dist/browser/{chunk-MVM33ZUL.mjs → chunk-W643QV3L.mjs} +6 -5
  36. package/dist/browser/chunk-WXLBZJMT.mjs +25 -0
  37. package/dist/browser/{chunk-MWUK3DA5.mjs → chunk-XILIT5MT.mjs} +8 -8
  38. package/dist/browser/{cold-module-MJMKNUYJ.mjs → cold-module-A5S6JFDN.mjs} +20 -20
  39. package/dist/browser/{durability-wiring-SNOWIT6Z.mjs → durability-wiring-W5AVV3RF.mjs} +120 -80
  40. package/dist/browser/gzip-5S7ROJFJ.mjs +1 -0
  41. package/dist/browser/import-PTT63AGK.mjs +12 -0
  42. package/dist/browser/{module-BUFNZMEU.mjs → module-CEKA7MQH.mjs} +13 -10
  43. package/dist/browser/module-X5PGOE47.mjs +4288 -0
  44. package/dist/browser/{phrase-module-HGVBO24W.mjs → phrase-module-CNKMUY4U.mjs} +2 -1
  45. package/dist/browser/pool-DTYSPBMQ.mjs +296 -0
  46. package/dist/{restore-queue-FEYAC4SB.mjs → browser/restore-queue-DD4LWZK7.mjs} +2 -2
  47. package/dist/browser/{runtime-VEUH674B.mjs → runtime-D2ULZGCN.mjs} +3 -2
  48. package/dist/browser/{snapshot-QXBKHJAG.mjs → snapshot-DQ6A4PQP.mjs} +20 -15
  49. package/dist/browser/{write-WHFBDWQS.mjs → write-MAGRAIEH.mjs} +14 -11
  50. package/dist/{capabilities-BCdUwK_L.d.ts → capabilities-BT-HLDC8.d.ts} +3 -3
  51. package/dist/{chunk-O4LJQI4G.mjs → chunk-2HJWQPR6.mjs} +126 -4
  52. package/dist/{chunk-Z4HFMYNX.mjs → chunk-3BVGJ4JR.mjs} +36 -13
  53. package/dist/{chunk-ZPWS2SKJ.mjs → chunk-3HV7M5OJ.mjs} +272 -112
  54. package/dist/{chunk-UIKN2OTQ.mjs → chunk-3MXV3VHR.mjs} +2 -23
  55. package/dist/{browser/chunk-CCOAOO73.mjs → chunk-3SBJVQLL.mjs} +2 -2
  56. package/dist/chunk-3TVDTACC.mjs +104 -0
  57. package/dist/{chunk-YH5OIL7B.mjs → chunk-5QMHMELB.mjs} +6 -1
  58. package/dist/{chunk-SBMAWTRG.mjs → chunk-5WB2A3XU.mjs} +84 -15
  59. package/dist/{chunk-NPNK57CA.mjs → chunk-65WCV5JO.mjs} +1 -1
  60. package/dist/chunk-6BWLDLS3.mjs +58 -0
  61. package/dist/{chunk-UUZCQQG2.mjs → chunk-6C5EX2QR.mjs} +3 -3
  62. package/dist/{chunk-VEFN6X6Q.mjs → chunk-6F6USYII.mjs} +120 -13
  63. package/dist/{chunk-AST3SHFA.mjs → chunk-7HKWO4BJ.mjs} +7 -7
  64. package/dist/{chunk-W2COJ5AH.mjs → chunk-7N223GWV.mjs} +2 -2
  65. package/dist/{chunk-GWOS5DYC.mjs → chunk-ADBS5XRI.mjs} +11 -13
  66. package/dist/{chunk-TNBIK2LQ.mjs → chunk-AWNHDBKV.mjs} +430 -75
  67. package/dist/{chunk-ZMBFWQXN.mjs → chunk-B2FTZNNF.mjs} +2 -2
  68. package/dist/chunk-B7XIOAMK.mjs +100 -0
  69. package/dist/{chunk-W55X2BYN.mjs → chunk-BEZH7VEH.mjs} +1 -1
  70. package/dist/{chunk-QSK35UC2.mjs → chunk-BTPGQC6Z.mjs} +3 -11
  71. package/dist/{chunk-LA4WNDHL.mjs → chunk-CYYSZPVV.mjs} +12 -14
  72. package/dist/{chunk-SRJBFG2T.mjs → chunk-DOY6EG76.mjs} +6 -7
  73. package/dist/{chunk-6SNBQESJ.mjs → chunk-F22IOCR2.mjs} +10 -6
  74. package/dist/{chunk-J6YVB2XM.mjs → chunk-IJPK5PGM.mjs} +1 -1
  75. package/dist/{chunk-L76W3IZJ.mjs → chunk-IRWP524D.mjs} +1 -1
  76. package/dist/{chunk-XS2VM7UE.mjs → chunk-IZT3G24Q.mjs} +2 -2
  77. package/dist/{chunk-NOT5QOHU.mjs → chunk-J7M73VY7.mjs} +1 -1
  78. package/dist/chunk-K5HSUPYS.mjs +11 -0
  79. package/dist/chunk-KAKQ74LS.mjs +53 -0
  80. package/dist/{chunk-ZSWHPKGM.mjs → chunk-KYVRZAYP.mjs} +69 -2
  81. package/dist/{chunk-NRUXBYPH.mjs → chunk-KZ5GQE4Z.mjs} +5 -5
  82. package/dist/{browser/chunk-XNWPP5NS.mjs → chunk-KZQIVGW7.mjs} +2 -2
  83. package/dist/{chunk-KZL72VTC.mjs → chunk-L7TIAYPX.mjs} +11 -10
  84. package/dist/{chunk-DD2673TX.mjs → chunk-LDGGR7YT.mjs} +4 -81
  85. package/dist/{chunk-XZ3SRNDJ.mjs → chunk-LJ4ENXOD.mjs} +77 -16
  86. package/dist/chunk-LQG5G2LY.mjs +39 -0
  87. package/dist/{chunk-HNHCNTVG.mjs → chunk-MDF6PDIA.mjs} +11 -0
  88. package/dist/{chunk-74XB2SXI.mjs → chunk-NVTFQFUL.mjs} +16 -2
  89. package/dist/{chunk-BOJZGUS6.mjs → chunk-NYSONUB7.mjs} +1 -1
  90. package/dist/{chunk-WJGO5PGV.mjs → chunk-O4KUNDVF.mjs} +31 -17
  91. package/dist/{chunk-PWIWSUCX.mjs → chunk-POUYICOU.mjs} +1 -1
  92. package/dist/{chunk-EBIHRL7B.mjs → chunk-Q2UL2TPC.mjs} +1 -1
  93. package/dist/{chunk-NJJCPFXN.mjs → chunk-QEYF2SQ6.mjs} +2 -2
  94. package/dist/{chunk-7AUASRE7.mjs → chunk-QN5WVV5K.mjs} +7 -7
  95. package/dist/{chunk-RIIUZJQ3.mjs → chunk-QYRNLLLI.mjs} +1 -1
  96. package/dist/chunk-SOUZMPME.mjs +1635 -0
  97. package/dist/{chunk-C3YDYX6C.mjs → chunk-T4CJDBBE.mjs} +1 -1
  98. package/dist/{chunk-YLNSJQLX.mjs → chunk-TTCKT2RT.mjs} +5 -5
  99. package/dist/{chunk-KEIYVZUX.mjs → chunk-U2726TL5.mjs} +5 -5
  100. package/dist/{chunk-RKAVHNRW.mjs → chunk-U46IZNCW.mjs} +10 -5
  101. package/dist/{chunk-BRUUBXCB.mjs → chunk-U6NE6RCV.mjs} +10 -38
  102. package/dist/{chunk-VJEGOELZ.mjs → chunk-VP6XRMWR.mjs} +4 -4
  103. package/dist/{chunk-IO5F7ZBE.mjs → chunk-VQDZVWN3.mjs} +874 -413
  104. package/dist/{chunk-IWVEG5CX.mjs → chunk-XIHUI4KB.mjs} +2 -2
  105. package/dist/{chunk-YHUTF6EA.mjs → chunk-XKPNKR3V.mjs} +17 -47
  106. package/dist/{chunk-HJJWY6PT.mjs → chunk-YGQOPB2Z.mjs} +1 -1
  107. package/dist/chunk-YKEHQUSZ.mjs +248 -0
  108. package/dist/{chunk-GLZHNSGB.mjs → chunk-ZAYWOHVG.mjs} +1 -1
  109. package/dist/{chunk-ICW45TTU.mjs → chunk-ZEKDO7YX.mjs} +2 -2
  110. package/dist/chunk-ZXNNR73R.mjs +31 -0
  111. package/dist/{chunk-VJS4JFBQ.mjs → chunk-ZXX5GZEX.mjs} +3 -1
  112. package/dist/{chunk-RHKRTYGO.mjs → chunk-ZYKUD5NX.mjs} +9 -7
  113. package/dist/{client-B12YFALP.d.ts → client-Cn3gNxUU.d.ts} +62 -5
  114. package/dist/client.d.ts +8 -8
  115. package/dist/client.mjs +46 -0
  116. package/dist/{cold-module-4X7WJCFM.mjs → cold-module-2WWGBFJC.mjs} +43 -49
  117. package/dist/{config-CIG5yDyg.d.ts → config-CfhH1IWQ.d.ts} +150 -3
  118. package/dist/{config-BhZxIeb1.d.ts → config-aIsy7mcL.d.ts} +63 -3
  119. package/dist/direct-executor-QLVHMELJ.mjs +24 -0
  120. package/dist/distribution/coordinator/etcd.d.ts +3 -3
  121. package/dist/distribution/coordinator/etcd.mjs +1 -1
  122. package/dist/distribution/coordinator/in-memory.d.ts +3 -3
  123. package/dist/distribution/transport/grpc.mjs +4 -4
  124. package/dist/distribution/transport/in-memory.mjs +2 -2
  125. package/dist/distribution/transport/tcp.mjs +3 -3
  126. package/dist/distribution.d.ts +8 -8
  127. package/dist/distribution.mjs +16116 -14537
  128. package/dist/{durability-wiring-324D2DDD.mjs → durability-wiring-GNWQSZI3.mjs} +142 -109
  129. package/dist/embeddings/openai.d.ts +1 -1
  130. package/dist/embeddings/openai.mjs +2 -2
  131. package/dist/{engine-CtzbHOmG.d.ts → engine-CJRUHXgf.d.ts} +3 -3
  132. package/dist/gzip-F4HMIEEQ.mjs +1 -0
  133. package/dist/import-DX55PN4G.mjs +41 -0
  134. package/dist/{index-DsEurhSl.d.ts → index-MsF7e5hL.d.ts} +2 -2
  135. package/dist/index.browser.mjs +7 -4
  136. package/dist/index.d.ts +542 -8
  137. package/dist/index.mjs +29 -32
  138. package/dist/index.react-native.mjs +19 -0
  139. package/dist/invalidation/broadcast-channel.d.ts +1 -1
  140. package/dist/invalidation/filesystem.d.ts +1 -1
  141. package/dist/invalidation/filesystem.mjs +1 -1
  142. package/dist/invalidation/noop.d.ts +1 -1
  143. package/dist/{long-query-thread-4SW7RWDE.mjs → long-query-thread-SCUE62TO.mjs} +23 -25
  144. package/dist/{module-DXSJ5LT2.mjs → module-HW6IXUM6.mjs} +603 -112
  145. package/dist/module-V5K4ZP23.mjs +45 -0
  146. package/dist/{paged-partition-archive-HFP45PLU.mjs → paged-partition-archive-FDIIWZNR.mjs} +42 -41
  147. package/dist/partial-words.mjs +7 -9
  148. package/dist/pattern.mjs +4 -6
  149. package/dist/persistence/durability/checkpoint-worker.d.ts +2 -2
  150. package/dist/persistence/durability/checkpoint-worker.mjs +36 -39
  151. package/dist/{phrase-module-5QHBD2VJ.mjs → phrase-module-OUQIRUQU.mjs} +1 -1
  152. package/dist/pool-UPV5PVPY.mjs +298 -0
  153. package/dist/react-native/chunks/analysis-change-HGW3L6NY.mjs +893 -0
  154. package/dist/react-native/chunks/analysis-change-entry-BNRU6STO.mjs +1 -0
  155. package/dist/react-native/chunks/chunk-2J2727V4.mjs +495 -0
  156. package/dist/react-native/chunks/chunk-3CTWSQRW.mjs +1251 -0
  157. package/dist/react-native/chunks/chunk-5FV4ZEVA.mjs +2619 -0
  158. package/dist/react-native/chunks/chunk-7VWQLEFV.mjs +642 -0
  159. package/dist/react-native/chunks/chunk-AAAETEJK.mjs +27 -0
  160. package/dist/react-native/chunks/chunk-AM7RSBPF.mjs +32 -0
  161. package/dist/react-native/chunks/chunk-B6OD63Z3.mjs +997 -0
  162. package/dist/react-native/chunks/chunk-BRNAVOKP.mjs +177 -0
  163. package/dist/react-native/chunks/chunk-DKJTZ625.mjs +207 -0
  164. package/dist/react-native/chunks/chunk-FKGG4UOF.mjs +177 -0
  165. package/dist/{browser/chunk-6RHTAVZX.mjs → react-native/chunks/chunk-GV5KFQ6M.mjs} +38 -15
  166. package/dist/react-native/chunks/chunk-HURV3ASY.mjs +4416 -0
  167. package/dist/react-native/chunks/chunk-IO2SMUQD.mjs +10 -0
  168. package/dist/react-native/chunks/chunk-JV6VQY2S.mjs +17 -0
  169. package/dist/react-native/chunks/chunk-KUJOBRKS.mjs +217 -0
  170. package/dist/react-native/chunks/chunk-KWRW5U65.mjs +226 -0
  171. package/dist/react-native/chunks/chunk-L4M7QJNP.mjs +110 -0
  172. package/dist/react-native/chunks/chunk-LQ6Q4L5B.mjs +360 -0
  173. package/dist/react-native/chunks/chunk-LQAKO5QV.mjs +523 -0
  174. package/dist/react-native/chunks/chunk-LRGWK367.mjs +11 -0
  175. package/dist/react-native/chunks/chunk-LVIKKAA6.mjs +93 -0
  176. package/dist/react-native/chunks/chunk-NFGBOI46.mjs +14 -0
  177. package/dist/react-native/chunks/chunk-NNE4VDMM.mjs +8 -0
  178. package/dist/react-native/chunks/chunk-PPEPTUVV.mjs +56 -0
  179. package/dist/react-native/chunks/chunk-PSWKQVVT.mjs +9 -0
  180. package/dist/{chunk-KGOXHLLZ.mjs → react-native/chunks/chunk-PU55IOG4.mjs} +228 -11
  181. package/dist/react-native/chunks/chunk-QC4ZRBSX.mjs +270 -0
  182. package/dist/react-native/chunks/chunk-R4EEMYM6.mjs +21 -0
  183. package/dist/react-native/chunks/chunk-R4OPUZQ5.mjs +86 -0
  184. package/dist/react-native/chunks/chunk-SLGIAD6B.mjs +2634 -0
  185. package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +25 -0
  186. package/dist/react-native/chunks/chunk-TLYD7IJ2.mjs +23 -0
  187. package/dist/react-native/chunks/chunk-UFNCLEQM.mjs +73 -0
  188. package/dist/react-native/chunks/chunk-YH7W556M.mjs +179 -0
  189. package/dist/react-native/chunks/chunk-YJSMEKRE.mjs +22385 -0
  190. package/dist/react-native/chunks/chunk-ZCKNBPQ4.mjs +79 -0
  191. package/dist/react-native/chunks/cold-module-TSFWLYWC.mjs +755 -0
  192. package/dist/react-native/chunks/durability-wiring-PZR6KOQK.mjs +4509 -0
  193. package/dist/react-native/chunks/gzip.react-native-7JWCLVOB.mjs +3 -0
  194. package/dist/react-native/chunks/import-VTODLPLO.mjs +22 -0
  195. package/dist/{browser/module-BVP4TKZU.mjs → react-native/chunks/module-JBBH6PZH.mjs} +671 -146
  196. package/dist/react-native/chunks/module-VEK2KCKU.mjs +25 -0
  197. package/dist/react-native/chunks/phrase-module-76UAPPSG.mjs +329 -0
  198. package/dist/react-native/chunks/pool-CD4ANYUI.mjs +296 -0
  199. package/dist/react-native/chunks/release-D7ZTIANM.mjs +33 -0
  200. package/dist/react-native/chunks/replace-IMZUVUOE.mjs +57 -0
  201. package/dist/{browser/restore-queue-ONYNYUDE.mjs → react-native/chunks/restore-queue-OI5EH7R3.mjs} +2 -2
  202. package/dist/react-native/chunks/runtime-3MCDLJAF.mjs +559 -0
  203. package/dist/react-native/chunks/snapshot-AUZMEV36.mjs +1205 -0
  204. package/dist/react-native/chunks/write-DDC2QBRJ.mjs +197 -0
  205. package/dist/{chunk-DQNKVOJ2.mjs → react-native/partial-words.mjs} +13 -228
  206. package/dist/react-native/pattern.mjs +2442 -0
  207. package/dist/react-native/synonyms.mjs +460 -0
  208. package/dist/react.d.ts +11 -11
  209. package/dist/react.mjs +11 -0
  210. package/dist/{rerank-KTLC3E6N.mjs → rerank-3W54N6P2.mjs} +4 -4
  211. package/dist/rerankers/http.d.ts +1 -1
  212. package/dist/rerankers/http.mjs +2 -2
  213. package/dist/restore-queue-BQWWNNQI.mjs +41 -0
  214. package/dist/{runtime-DYV75DCB.mjs → runtime-L2DZYY6N.mjs} +5 -5
  215. package/dist/{schema-B-Runv0n.d.ts → schema-D33CyXCy.d.ts} +1 -1
  216. package/dist/server.d.ts +24 -12
  217. package/dist/server.mjs +159 -38
  218. package/dist/{snapshot-CGM65VCD.mjs → snapshot-EHXTOTW5.mjs} +47 -50
  219. package/dist/synonyms.mjs +3 -4
  220. package/dist/{tasks-CjRJRGTb.d.ts → tasks-C4ElXr4P.d.ts} +59 -7
  221. package/dist/thread-I7DVHHW7.mjs +31 -0
  222. package/dist/vector/search-worker.d.ts +2 -2
  223. package/dist/vector/search-worker.mjs +8 -7
  224. package/dist/workers/entry.mjs +9 -9
  225. package/dist/{write-2DZPEQL2.mjs → write-SDJXXQ2G.mjs} +36 -39
  226. package/openapi.json +349 -2
  227. package/package.json +108 -8
  228. package/dist/analysis-change-HQUT2Z3I.mjs +0 -43
  229. package/dist/browser/import-TLB2A5LJ.mjs +0 -9
  230. package/dist/chunk-5WYVUPGD.mjs +0 -427
  231. package/dist/chunk-AV4IJKD2.mjs +0 -35
  232. package/dist/chunk-GES7U2PM.mjs +0 -68
  233. package/dist/chunk-N37VMC62.mjs +0 -18
  234. package/dist/chunk-WNBRW4Q2.mjs +0 -128
  235. package/dist/chunk-WQBCBKY3.mjs +0 -8
  236. package/dist/chunk-ZATRDAYU.mjs +0 -160
  237. package/dist/direct-executor-7XOQ7VQP.mjs +0 -28
  238. package/dist/import-OOBUW3RR.mjs +0 -44
  239. package/dist/module-IYPLWHGC.mjs +0 -48
  240. package/dist/thread-KGNAIKPD.mjs +0 -33
  241. /package/dist/{chunk-22YPZVMG.mjs → chunk-ZXNQEW43.mjs} +0 -0
package/dist/client.mjs CHANGED
@@ -25,6 +25,15 @@ var ErrorCodes = {
25
25
  PERSISTENCE_CRC_MISMATCH: "PERSISTENCE_CRC_MISMATCH",
26
26
  PERSISTENCE_WAL_CORRUPT: "PERSISTENCE_WAL_CORRUPT",
27
27
  PERSISTENCE_FSYNC_FAILED: "PERSISTENCE_FSYNC_FAILED",
28
+ PERSISTENCE_DEPENDENCY_MISSING: "PERSISTENCE_DEPENDENCY_MISSING",
29
+ BACKUP_NOT_FOUND: "BACKUP_NOT_FOUND",
30
+ BACKUP_ALREADY_EXISTS: "BACKUP_ALREADY_EXISTS",
31
+ BACKUP_DAMAGED: "BACKUP_DAMAGED",
32
+ BACKUP_DURABILITY_REQUIRED: "BACKUP_DURABILITY_REQUIRED",
33
+ BACKUP_IN_PROGRESS: "BACKUP_IN_PROGRESS",
34
+ BACKUP_STORE_CLAIMED: "BACKUP_STORE_CLAIMED",
35
+ BACKUP_STORE_NOT_CONFIGURED: "BACKUP_STORE_NOT_CONFIGURED",
36
+ BACKUP_NOT_READY: "BACKUP_NOT_READY",
28
37
  SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD",
29
38
  VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH",
30
39
  SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER",
@@ -40,6 +49,7 @@ var ErrorCodes = {
40
49
  ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC",
41
50
  PARTITION_CAPACITY_EXCEEDED: "PARTITION_CAPACITY_EXCEEDED",
42
51
  RESTORE_MEMORY_EXCEEDED: "RESTORE_MEMORY_EXCEEDED",
52
+ MEMORY_WRITE_BLOCKED: "MEMORY_WRITE_BLOCKED",
43
53
  ANALYSIS_CHANGE_REPLACED: "ANALYSIS_CHANGE_REPLACED",
44
54
  ANALYSIS_CHANGE_NOT_READY: "ANALYSIS_CHANGE_NOT_READY",
45
55
  ANALYSIS_GENERATION_MISSING: "ANALYSIS_GENERATION_MISSING",
@@ -73,6 +83,7 @@ var ErrorCodes = {
73
83
  COORDINATOR_AUTH_FAILED: "COORDINATOR_AUTH_FAILED",
74
84
  COORDINATOR_UNAVAILABLE: "COORDINATOR_UNAVAILABLE",
75
85
  TRANSPORT_DEPENDENCY_MISSING: "TRANSPORT_DEPENDENCY_MISSING",
86
+ NATIVE_DEPENDENCY_MISSING: "NATIVE_DEPENDENCY_MISSING",
76
87
  REPLICATION_ENTRY_INVALID: "REPLICATION_ENTRY_INVALID",
77
88
  REPLICATION_INSYNC_REMOVAL_FAILED: "REPLICATION_INSYNC_REMOVAL_FAILED",
78
89
  REPLICATION_ROLLBACK_FAILED: "REPLICATION_ROLLBACK_FAILED",
@@ -212,6 +223,9 @@ function indexPath(indexName) {
212
223
  function documentPath(indexName, docId) {
213
224
  return `${indexPath(indexName)}/documents/${encodeURIComponent(docId)}`;
214
225
  }
226
+ function backupPath(backupName) {
227
+ return `/backups/${encodeURIComponent(backupName)}`;
228
+ }
215
229
  function taskPath(taskId) {
216
230
  return `/tasks/${encodeURIComponent(taskId)}`;
217
231
  }
@@ -360,6 +374,37 @@ function createAdminOperations(transport) {
360
374
  };
361
375
  }
362
376
 
377
+ // src/client/backups.ts
378
+ function createBackupOperations(transport) {
379
+ async function postTask(path, body, options) {
380
+ const payload = await transport.json({
381
+ method: "POST",
382
+ path,
383
+ body: encodeJson(body),
384
+ contentType: "application/json",
385
+ options
386
+ });
387
+ return readBody(payload, path);
388
+ }
389
+ return {
390
+ createBackup(indexName, backupName, options) {
391
+ return postTask(`${indexPath(indexName)}/backups`, { backup: backupName }, options);
392
+ },
393
+ async listBackups(options) {
394
+ const path = "/backups";
395
+ const payload = await transport.json({ method: "GET", path, defaultTimeoutMs: NO_TIMEOUT, options });
396
+ return readArray(payload, "backups", path);
397
+ },
398
+ restoreBackup(backupName, restore, options) {
399
+ return postTask(`${backupPath(backupName)}/_restore`, restore, options);
400
+ },
401
+ async deleteBackup(backupName, options) {
402
+ const path = backupPath(backupName);
403
+ return readBody(await transport.json({ method: "DELETE", path, options }), path);
404
+ }
405
+ };
406
+ }
407
+
363
408
  // src/client/bulk.ts
364
409
  function toNdjson(source) {
365
410
  if (typeof source === "string") return source;
@@ -1070,6 +1115,7 @@ function createNarsilClient(options) {
1070
1115
  ...createSearchOperations(transport),
1071
1116
  ...createTaskOperations(transport),
1072
1117
  ...createAdminOperations(transport),
1118
+ ...createBackupOperations(transport),
1073
1119
  ...createServerOperations(transport)
1074
1120
  };
1075
1121
  }
@@ -1,57 +1,54 @@
1
- import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-GWOS5DYC.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-GWOS5DYC.mjs';
3
- import './chunk-NN33CZRE.mjs';
4
- import './chunk-BOJZGUS6.mjs';
5
- import { loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-W2COJ5AH.mjs';
6
- import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-ICW45TTU.mjs';
1
+ import { readWholeSectionChecked, checkEverySectionPage, readFileRange, openPagedFile, readCacheOfThisThread, createSectionReader, closePagedFile } from './chunk-ADBS5XRI.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-ADBS5XRI.mjs';
3
+ import './chunk-3SBJVQLL.mjs';
4
+ import './chunk-NYSONUB7.mjs';
5
+ import { loadFailed, decodeSections, SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES } from './chunk-7N223GWV.mjs';
6
+ import { isDead, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-ZEKDO7YX.mjs';
7
7
  import './chunk-FOCV4CBZ.mjs';
8
- import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-TNBIK2LQ.mjs';
9
- export { createHNSWIndex, osqBitsOf } from './chunk-TNBIK2LQ.mjs';
8
+ import { magnitude, defaultRescoreDepth, defaultEfSearch, computeCodeBlockLayout, toScore, osqQuantize, createOsqScratch, scalarQueryProducts, osqEstimate, osqDistance, toDistance } from './chunk-AWNHDBKV.mjs';
9
+ export { createHNSWIndex, osqBitsOf } from './chunk-AWNHDBKV.mjs';
10
10
  import { stageQueryLevels, readTrailer } from './chunk-37CD3OKS.mjs';
11
11
  import './chunk-DJHHF2L5.mjs';
12
- import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, COLD_WALK_NODES_READ_AHEAD } from './chunk-7AUASRE7.mjs';
13
- import './chunk-UUZCQQG2.mjs';
14
- import './chunk-KEIYVZUX.mjs';
15
- import { HEADER_SIZE, crc32 } from './chunk-IO5F7ZBE.mjs';
16
- import './chunk-VEFN6X6Q.mjs';
17
- import './chunk-5WYVUPGD.mjs';
12
+ import { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, COLD_WALK_NODES_READ_AHEAD } from './chunk-QN5WVV5K.mjs';
13
+ import './chunk-U2726TL5.mjs';
14
+ import './chunk-6C5EX2QR.mjs';
15
+ import { yieldToEventLoop, HEADER_SIZE, crc32 } from './chunk-VQDZVWN3.mjs';
16
+ import './chunk-6F6USYII.mjs';
17
+ import './chunk-O4KUNDVF.mjs';
18
+ import './chunk-3HV7M5OJ.mjs';
19
+ import './chunk-KAKQ74LS.mjs';
18
20
  import './chunk-HJSN7UYG.mjs';
19
- import './chunk-UIKN2OTQ.mjs';
20
- import './chunk-AV4IJKD2.mjs';
21
+ import './chunk-6BWLDLS3.mjs';
22
+ import './chunk-XIHUI4KB.mjs';
23
+ import './chunk-Q2UL2TPC.mjs';
24
+ import './chunk-3MXV3VHR.mjs';
21
25
  import './chunk-EEBCDP36.mjs';
22
- import './chunk-WJGO5PGV.mjs';
23
- import './chunk-ZPWS2SKJ.mjs';
24
- import './chunk-N37VMC62.mjs';
25
- import './chunk-ZATRDAYU.mjs';
26
- import './chunk-EBIHRL7B.mjs';
27
- import './chunk-KOKM4PQN.mjs';
28
- import './chunk-QSK35UC2.mjs';
29
- import './chunk-74XB2SXI.mjs';
30
- import './chunk-RKAVHNRW.mjs';
31
- import './chunk-WQBCBKY3.mjs';
32
- import './chunk-JUKYYXSP.mjs';
33
- import './chunk-DQNKVOJ2.mjs';
34
- import './chunk-KGOXHLLZ.mjs';
35
- import './chunk-U476IXKQ.mjs';
36
- import './chunk-FQBFZAWG.mjs';
37
- import './chunk-VJS4JFBQ.mjs';
38
- import './chunk-GES7U2PM.mjs';
39
- import './chunk-ZSWHPKGM.mjs';
40
- import './chunk-O4LJQI4G.mjs';
26
+ import './chunk-2HJWQPR6.mjs';
41
27
  import './chunk-X5CV2E2B.mjs';
42
- import './chunk-WNBRW4Q2.mjs';
43
28
  import './chunk-TGP5M5R7.mjs';
44
29
  import './chunk-U2BKYEC7.mjs';
45
- import './chunk-NPNK57CA.mjs';
46
- import './chunk-4UMZ7KQL.mjs';
47
- import './chunk-R6A773WK.mjs';
48
- import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
30
+ import './chunk-ZAYWOHVG.mjs';
49
31
  import './chunk-QHPYS427.mjs';
50
- import './chunk-GLZHNSGB.mjs';
51
- import './chunk-22YPZVMG.mjs';
32
+ import './chunk-QYRNLLLI.mjs';
33
+ import './chunk-ZXNQEW43.mjs';
34
+ import './chunk-KOKM4PQN.mjs';
35
+ import './chunk-NVTFQFUL.mjs';
36
+ import './chunk-LQG5G2LY.mjs';
37
+ import './chunk-BTPGQC6Z.mjs';
52
38
  import './chunk-RFBLQLLZ.mjs';
39
+ import './chunk-U46IZNCW.mjs';
40
+ import './chunk-JUKYYXSP.mjs';
41
+ import './chunk-SOUZMPME.mjs';
42
+ import './chunk-FQBFZAWG.mjs';
43
+ import './chunk-65WCV5JO.mjs';
44
+ import './chunk-4UMZ7KQL.mjs';
45
+ import './chunk-ZXX5GZEX.mjs';
46
+ import './chunk-KYVRZAYP.mjs';
53
47
  import './chunk-L5ORED7V.mjs';
54
- import { NarsilError, ErrorCodes } from './chunk-HNHCNTVG.mjs';
48
+ import './chunk-U476IXKQ.mjs';
49
+ import { NarsilError, ErrorCodes } from './chunk-MDF6PDIA.mjs';
50
+ import './chunk-R6A773WK.mjs';
51
+ import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
55
52
  import { decode, decodeMulti } from '@msgpack/msgpack';
56
53
 
57
54
  // src/persistence/paged/cold-search.ts
@@ -698,13 +695,10 @@ function openColdVectorField(input) {
698
695
  var FILE_PAGE_SIZES = /* @__PURE__ */ new Set([SEGMENT_PAGE_BYTES, RECORD_PAGE_BYTES]);
699
696
  var FLOAT32_BYTES = 4;
700
697
  var FLOAT64_BYTES2 = 8;
701
- function yieldToSearches() {
702
- return new Promise((resolve) => setImmediate(resolve));
703
- }
704
698
  function waitBeforeColdLoad(firstSearchAnswered) {
705
699
  return new Promise((resolve) => {
706
700
  const timer = setTimeout(resolve, COLD_LOAD_WAIT_WITHOUT_SEARCH_MS);
707
- timer.unref();
701
+ if (typeof timer.unref === "function") timer.unref();
708
702
  void firstSearchAnswered.then(() => {
709
703
  clearTimeout(timer);
710
704
  resolve();
@@ -734,7 +728,7 @@ function magnitudesOf(bytes) {
734
728
  }
735
729
  async function loadFilesByParts(files, restore, fieldPath, dimension, stillWanted) {
736
730
  for (const input of files) {
737
- await yieldToSearches();
731
+ await yieldToEventLoop();
738
732
  if (!stillWanted()) return;
739
733
  const { ref, path } = input;
740
734
  const sections = sectionsOfFile(input);
@@ -776,7 +770,7 @@ async function loadFilesByParts(files, restore, fieldPath, dimension, stillWante
776
770
  }
777
771
  });
778
772
  }
779
- await yieldToSearches();
773
+ await yieldToEventLoop();
780
774
  if (stillWanted()) restore.finish();
781
775
  }
782
776
 
@@ -1,7 +1,103 @@
1
- import { e as NarsilConfig } from './config-BhZxIeb1.js';
2
- import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './index-DsEurhSl.js';
1
+ import { e as NarsilConfig } from './config-aIsy7mcL.js';
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-MsF7e5hL.js';
3
4
  import { N as NodeTransport } from './types-DvncmvuQ.js';
4
5
 
6
+ /**
7
+ * Where a cluster keeps its backups, which is a store outside the cluster.
8
+ *
9
+ * Give every node of the cluster the same settings, because the primary of each partition uploads that
10
+ * partition's files and the controller writes each backup's manifest.
11
+ *
12
+ * @public
13
+ */
14
+ interface ClusterBackupConfig {
15
+ /** The store that holds the backups, such as the adapter from `@delali/narsil/adapters/s3`. */
16
+ store: PersistenceAdapter;
17
+ /**
18
+ * This cluster writes every backup under this key prefix, and it refuses to write under a prefix that another
19
+ * cluster has written to. Use segments of letters, digits, `.`, `_`, and `-`, joined by `/`.
20
+ */
21
+ keyPrefix: string;
22
+ }
23
+ /**
24
+ * What a cluster records about one backup.
25
+ *
26
+ * @public
27
+ */
28
+ interface BackupSummary {
29
+ /** The name the backup was taken under. */
30
+ name: string;
31
+ /** The index the backup holds. */
32
+ indexName: string;
33
+ /** The backup started at this many milliseconds since the epoch, and it holds every write acknowledged before then. */
34
+ startedAt: number;
35
+ /** The controller wrote the backup's manifest at this many milliseconds since the epoch. */
36
+ completedAt: number;
37
+ /** The index had this many partitions, and a restore creates the same number. */
38
+ partitionCount: number;
39
+ /** The index kept this many replicas of each partition, and a restore asks for the same number. */
40
+ replicationFactor: number;
41
+ /** The backup lists this many stored files, counting each partition's manifest and the index configuration. */
42
+ files: number;
43
+ /** The files the backup lists hold this many bytes in total, including files that other backups share. */
44
+ bytes: number;
45
+ }
46
+ /**
47
+ * How far a backup, a restore, or a deletion has gone.
48
+ *
49
+ * @public
50
+ */
51
+ interface BackupProgress {
52
+ /** The operation has finished this many partitions, or this many files for a deletion. */
53
+ done: number;
54
+ /** The operation covers this many partitions, or this many files for a deletion, and 0 until it knows. */
55
+ total: number;
56
+ }
57
+ /**
58
+ * Options that every backup operation takes.
59
+ *
60
+ * @public
61
+ */
62
+ interface BackupOperationOptions {
63
+ /** Called whenever the operation reports more progress. */
64
+ onProgress?: (progress: BackupProgress) => void;
65
+ }
66
+ /**
67
+ * Where {@link ClusterNamespace.restoreBackup} puts a backup, and how the cluster places the restored copies.
68
+ *
69
+ * @public
70
+ */
71
+ interface RestoreBackupOptions extends BackupOperationOptions {
72
+ /** The restore creates the index under this name, and it fails where the name is taken. */
73
+ indexName: string;
74
+ /** The restored index keeps this many replicas of each partition, or the backup's number when you leave it out. */
75
+ replicationFactor?: number;
76
+ /** The rules that place the restored partitions, or the backup's rules when you leave them out. */
77
+ constraints?: AllocationConstraints;
78
+ }
79
+ /**
80
+ * A backup whose manifest the cluster can't read, which a listing shows in place of its summary.
81
+ *
82
+ * @public
83
+ */
84
+ interface DamagedBackup {
85
+ /** The name that the manifest is stored under. */
86
+ name: string;
87
+ /** Why the manifest can't be read, with the code `BACKUP_DAMAGED`. */
88
+ error: {
89
+ code: string;
90
+ message: string;
91
+ };
92
+ }
93
+ /**
94
+ * One entry of {@link ClusterNamespace.listBackups}: a summary, or a {@link DamagedBackup} where the manifest can't be
95
+ * read.
96
+ *
97
+ * @public
98
+ */
99
+ type BackupListing = BackupSummary | DamagedBackup;
100
+
5
101
  /**
6
102
  * How much replication history a primary keeps, and how many replicas have to
7
103
  * confirm a write before it is acknowledged.
@@ -200,6 +296,11 @@ interface ClusterNodeConfig {
200
296
  controller?: ClusterControllerConfig;
201
297
  /** These settings govern when this node's memory blocks writes across the cluster, and anything you leave out keeps its default. */
202
298
  memory?: ClusterMemoryConfig;
299
+ /**
300
+ * The store outside the cluster where this node writes and reads backups. A node without it refuses every backup
301
+ * call with `BACKUP_STORE_NOT_CONFIGURED`.
302
+ */
303
+ backups?: ClusterBackupConfig;
203
304
  /** This receives the failures the node reports while running on its own, away from any call you made. */
204
305
  onError?: (error: Error) => void;
205
306
  }
@@ -422,6 +523,52 @@ interface ClusterNamespace {
422
523
  * @returns The figures as they stand when the call reads them.
423
524
  */
424
525
  getMetrics(): Promise<ClusterMetrics>;
526
+ /**
527
+ * Backs up an index to the store in {@link ClusterNodeConfig.backups}, with every write acknowledged before the
528
+ * call starts.
529
+ *
530
+ * The primary of each partition writes a checkpoint and uploads each of its files that the store lacks, and the
531
+ * controller then writes the manifest that lists every file, so each backup restores without any other one.
532
+ *
533
+ * @param indexName - The index to back up.
534
+ * @param backupName - The backup's name, from 1 to 128 letters, digits, `.`, `_`, and `-`, starting with a letter or
535
+ * a digit.
536
+ * @param options - A callback that receives the progress.
537
+ * @returns What the manifest records about the backup.
538
+ * @throws A `NarsilError` with `BACKUP_ALREADY_EXISTS` for a name that the store or a running backup holds,
539
+ * `BACKUP_DURABILITY_REQUIRED` where a primary runs without write-ahead log durability, `BACKUP_STORE_CLAIMED`
540
+ * where another cluster writes under the key prefix, `BACKUP_STORE_NOT_CONFIGURED` on a node without a store, and
541
+ * `BACKUP_NOT_READY` while a node of the cluster runs an earlier release.
542
+ */
543
+ createBackup(indexName: string, backupName: string, options?: BackupOperationOptions): Promise<BackupSummary>;
544
+ /**
545
+ * Restores a backup as a new index, on a cluster of any size.
546
+ *
547
+ * Each primary checks the length and the SHA-256 digest of every file before it loads any of them, and the cluster
548
+ * creates no index when a check fails.
549
+ *
550
+ * @param backupName - The backup to restore.
551
+ * @param options - The name of the new index, its replication factor and placement rules, and a progress callback.
552
+ * @returns What the manifest records about the backup.
553
+ * @throws A `NarsilError` with `BACKUP_NOT_FOUND` where the store holds no such backup, `BACKUP_DAMAGED` where a
554
+ * file is missing or differs from the manifest, and `INDEX_ALREADY_EXISTS` where the name is taken.
555
+ */
556
+ restoreBackup(backupName: string, options: RestoreBackupOptions): Promise<BackupSummary>;
557
+ /**
558
+ * Lists the backups under the cluster's key prefix, in name order.
559
+ *
560
+ * @returns One summary per backup, and a {@link DamagedBackup} for each manifest that the node can't read.
561
+ */
562
+ listBackups(): Promise<BackupListing[]>;
563
+ /**
564
+ * Deletes a backup, along with each of its files that no other backup lists.
565
+ *
566
+ * @param backupName - The backup to delete.
567
+ * @param options - A callback that receives the progress.
568
+ * @returns A promise that settles once the controller has removed the manifest and those files.
569
+ * @throws A `NarsilError` with `BACKUP_NOT_FOUND` where the store holds no such backup.
570
+ */
571
+ deleteBackup(backupName: string, options?: BackupOperationOptions): Promise<void>;
425
572
  }
426
573
  /**
427
574
  * What one node reports about itself.
@@ -437,4 +584,4 @@ interface ClusterNodeInfo {
437
584
  status: string;
438
585
  }
439
586
 
440
- export type { ClusterNamespace as C, IndexHealth as I, NodeReadiness as N, PartitionReplicationFigure as P, ReplicaLagFigure as R, VectorRebuildWaitFigure as V, ClusterNodeInfo as a, CreateIndexOptions as b, ClusterNodeConfig as c, ClusterControllerConfig as d, ClusterHealth as e, ClusterHealthStatus as f, ClusterMemoryConfig as g, ClusterMetrics as h, ClusterQueryConfig as i, CommitPointFigure as j, CoordinatorRequestFigure as k, ReplicationConfig as l };
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, 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, ReplicationConfig as p, RestoreBackupOptions as q };
@@ -1,5 +1,5 @@
1
- import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-BQFQ4PRz.js';
2
- import { A as AnyDocument, S as SchemaDefinition, B as BM25Params, e as ScoringMode, a as IndexConfig } from './schema-B-Runv0n.js';
1
+ import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
2
+ import { A as AnyDocument, S as SchemaDefinition, B as BM25Params, e as ScoringMode, a as IndexConfig } from './schema-D33CyXCy.js';
3
3
 
4
4
  /**
5
5
  * Every code a {@link NarsilError} carries, grouped by the part of the engine
@@ -36,6 +36,15 @@ declare const ErrorCodes: {
36
36
  readonly PERSISTENCE_CRC_MISMATCH: "PERSISTENCE_CRC_MISMATCH";
37
37
  readonly PERSISTENCE_WAL_CORRUPT: "PERSISTENCE_WAL_CORRUPT";
38
38
  readonly PERSISTENCE_FSYNC_FAILED: "PERSISTENCE_FSYNC_FAILED";
39
+ readonly PERSISTENCE_DEPENDENCY_MISSING: "PERSISTENCE_DEPENDENCY_MISSING";
40
+ readonly BACKUP_NOT_FOUND: "BACKUP_NOT_FOUND";
41
+ readonly BACKUP_ALREADY_EXISTS: "BACKUP_ALREADY_EXISTS";
42
+ readonly BACKUP_DAMAGED: "BACKUP_DAMAGED";
43
+ readonly BACKUP_DURABILITY_REQUIRED: "BACKUP_DURABILITY_REQUIRED";
44
+ readonly BACKUP_IN_PROGRESS: "BACKUP_IN_PROGRESS";
45
+ readonly BACKUP_STORE_CLAIMED: "BACKUP_STORE_CLAIMED";
46
+ readonly BACKUP_STORE_NOT_CONFIGURED: "BACKUP_STORE_NOT_CONFIGURED";
47
+ readonly BACKUP_NOT_READY: "BACKUP_NOT_READY";
39
48
  readonly SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD";
40
49
  readonly VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH";
41
50
  readonly SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER";
@@ -51,6 +60,7 @@ declare const ErrorCodes: {
51
60
  readonly ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC";
52
61
  readonly PARTITION_CAPACITY_EXCEEDED: "PARTITION_CAPACITY_EXCEEDED";
53
62
  readonly RESTORE_MEMORY_EXCEEDED: "RESTORE_MEMORY_EXCEEDED";
63
+ readonly MEMORY_WRITE_BLOCKED: "MEMORY_WRITE_BLOCKED";
54
64
  readonly ANALYSIS_CHANGE_REPLACED: "ANALYSIS_CHANGE_REPLACED";
55
65
  readonly ANALYSIS_CHANGE_NOT_READY: "ANALYSIS_CHANGE_NOT_READY";
56
66
  readonly ANALYSIS_GENERATION_MISSING: "ANALYSIS_GENERATION_MISSING";
@@ -84,6 +94,7 @@ declare const ErrorCodes: {
84
94
  readonly COORDINATOR_AUTH_FAILED: "COORDINATOR_AUTH_FAILED";
85
95
  readonly COORDINATOR_UNAVAILABLE: "COORDINATOR_UNAVAILABLE";
86
96
  readonly TRANSPORT_DEPENDENCY_MISSING: "TRANSPORT_DEPENDENCY_MISSING";
97
+ readonly NATIVE_DEPENDENCY_MISSING: "NATIVE_DEPENDENCY_MISSING";
87
98
  readonly REPLICATION_ENTRY_INVALID: "REPLICATION_ENTRY_INVALID";
88
99
  readonly REPLICATION_INSYNC_REMOVAL_FAILED: "REPLICATION_INSYNC_REMOVAL_FAILED";
89
100
  readonly REPLICATION_ROLLBACK_FAILED: "REPLICATION_ROLLBACK_FAILED";
@@ -2023,6 +2034,55 @@ interface NarsilConfig {
2023
2034
  * `CONFIG_INVALID`.
2024
2035
  */
2025
2036
  patternWorkCap?: number;
2037
+ /**
2038
+ * These fractions set the memory levels at which the engine stops and resumes
2039
+ * accepting inserts and updates, so that a write cannot take the process past
2040
+ * its memory limit. Inside a cluster node, the node's own memory settings
2041
+ * apply in place of these. For a fraction outside the range that
2042
+ * {@link MemoryConfig} describes, {@link createNarsil} throws `CONFIG_INVALID`
2043
+ * on Node.js and on a phone. A browser reports no memory limit, so the
2044
+ * engine there ignores this setting and leaves it unchecked.
2045
+ */
2046
+ memory?: MemoryConfig;
2047
+ }
2048
+ /**
2049
+ * The memory levels at which an engine stops and resumes accepting inserts and
2050
+ * updates.
2051
+ *
2052
+ * The engine measures its process memory and its heap before a write whenever
2053
+ * its latest measurement is more than one second old. It counts as full once
2054
+ * either figure passes `blockWritesAbove` of its limit, and as clear again once
2055
+ * both fall below `resumeWritesBelow`, so that an engine near the threshold
2056
+ * does not switch writes on and off. While the engine is full, it refuses every
2057
+ * insert and update with `MEMORY_WRITE_BLOCKED` and the reason `memory_full`,
2058
+ * and it accepts removes, searches, and document reads, so that you can free
2059
+ * memory by removing documents. It also refuses a document whose indexing could
2060
+ * take the memory in use past the block level, with the reason
2061
+ * `write_would_fill_memory`. In a batch, it refuses that document and every
2062
+ * later one, and it keeps the documents that it has already indexed. A runtime
2063
+ * that reports no memory limit, such as a browser, leaves every write
2064
+ * unchecked.
2065
+ *
2066
+ * @public
2067
+ */
2068
+ interface MemoryConfig {
2069
+ /**
2070
+ * The engine counts as full once either memory figure passes this fraction
2071
+ * of its limit. It must lie above `resumeWritesBelow` and at most 1, and it
2072
+ * is 0.9 where you set none. On Node.js, the engine compares its heap with
2073
+ * the smaller of this setting and 0.75, because V8 stops a process after four
2074
+ * full collections in a row that each leave the old generation holding at
2075
+ * least 0.8 of its limit.
2076
+ */
2077
+ blockWritesAbove?: number;
2078
+ /**
2079
+ * A full engine accepts writes again once both memory figures fall below
2080
+ * this fraction of their limits. It must lie above 0 and below
2081
+ * `blockWritesAbove`, and it is 0.8 where you set none. On Node.js, the
2082
+ * engine compares its heap with the smaller of this setting and 0.65, for the
2083
+ * same reason that it caps the heap side of `blockWritesAbove` at 0.75.
2084
+ */
2085
+ resumeWritesBelow?: number;
2026
2086
  }
2027
2087
  /**
2028
2088
  * Limits on the indexes one engine keeps open in memory.
@@ -2186,4 +2246,4 @@ interface WorkerConfig {
2186
2246
  bootstrapModule?: string;
2187
2247
  }
2188
2248
 
2189
- export { type PresenceFilter as $, type AnalysisConfig as A, type BatchResult as B, type ClientErrorCode as C, type DocumentImportResult as D, type ErrorCode as E, type FacetConfig as F, type GroupResult as G, type HeldCheckpointReport as H, type IndexInfo as I, type HighlightMatch as J, type Hit as K, type ListParams as L, type MemoryStats as M, NarsilError as N, type HybridConfig as O, type PartitionStatsResult as P, type QueryParams as Q, type IndexContext as R, type ServerErrorCode as S, type IndexLifecycleConfig as T, type InsertContext as U, type VectorMaintenanceResult as V, type ListedDocument as W, type MainCopyQueries as X, type NarsilEventHandlers as Y, type NarsilPlugin as Z, type PartitionContext as _, ClientErrorCodes as a, type ProcessMemoryReport as a0, type QueryCoverage as a1, type RemoveContext as a2, type RerankConfig as a3, type ScoreComponents as a4, type SearchContext as a5, type SearchMode as a6, type SortField as a7, type SortSpec as a8, type StaleAnalysis as a9, type StringFilter as aa, type TermMatchPolicy as ab, type UpdateContext as ac, type VectorQueryConfig as ad, type WorkerConfig as ae, type WorkerContext as af, type WorkerCopyReport as ag, ErrorCodes as b, type NarsilErrorCode as c, ServerErrorCodes as d, type NarsilConfig as e, type ListResult as f, type SuggestParams as g, type SuggestResult as h, isNarsilError as i, type PreflightResult as j, type IndexStats as k, type NarsilEventMap as l, type QueryResult as m, type GroupConfig as n, type ArrayFilter as o, type ComparisonFilter as p, type DocumentProjection as q, type DurabilityConfig as r, type FacetResult as s, type FieldFilter as t, type FilterExpression as u, type GeoFilter as v, type GeoPolygonFilter as w, type GeoRadiusFilter as x, type GroupReducer as y, type HighlightConfig as z };
2249
+ export { type PartitionContext as $, type AnalysisConfig as A, type BatchResult as B, type ClientErrorCode as C, type DocumentImportResult as D, type ErrorCode as E, type FacetConfig as F, type GroupResult as G, type HeldCheckpointReport as H, type IndexInfo as I, type HighlightMatch as J, type Hit as K, type ListParams as L, type MemoryStats as M, NarsilError as N, type HybridConfig as O, type PartitionStatsResult as P, type QueryParams as Q, type IndexContext as R, type ServerErrorCode as S, type IndexLifecycleConfig as T, type InsertContext as U, type VectorMaintenanceResult as V, type ListedDocument as W, type MainCopyQueries as X, type MemoryConfig as Y, type NarsilEventHandlers as Z, type NarsilPlugin as _, ClientErrorCodes as a, type PresenceFilter as a0, type ProcessMemoryReport as a1, type QueryCoverage as a2, type RemoveContext as a3, type RerankConfig as a4, type ScoreComponents as a5, type SearchContext as a6, type SearchMode as a7, type SortField as a8, type SortSpec as a9, type StaleAnalysis as aa, type StringFilter as ab, type TermMatchPolicy as ac, type UpdateContext as ad, type VectorQueryConfig as ae, type WorkerConfig as af, type WorkerContext as ag, type WorkerCopyReport as ah, ErrorCodes as b, type NarsilErrorCode as c, ServerErrorCodes as d, type NarsilConfig as e, type ListResult as f, type SuggestParams as g, type SuggestResult as h, isNarsilError as i, type PreflightResult as j, type IndexStats as k, type NarsilEventMap as l, type QueryResult as m, type GroupConfig as n, type ArrayFilter as o, type ComparisonFilter as p, type DocumentProjection as q, type DurabilityConfig as r, type FacetResult as s, type FieldFilter as t, type FilterExpression as u, type GeoFilter as v, type GeoPolygonFilter as w, type GeoRadiusFilter as x, type GroupReducer as y, type HighlightConfig as z };
@@ -0,0 +1,24 @@
1
+ export { createDirectExecutor } from './chunk-O4KUNDVF.mjs';
2
+ import './chunk-3HV7M5OJ.mjs';
3
+ import './chunk-KAKQ74LS.mjs';
4
+ import './chunk-Q2UL2TPC.mjs';
5
+ import './chunk-2HJWQPR6.mjs';
6
+ import './chunk-X5CV2E2B.mjs';
7
+ import './chunk-TGP5M5R7.mjs';
8
+ import './chunk-U2BKYEC7.mjs';
9
+ import './chunk-ZAYWOHVG.mjs';
10
+ import './chunk-ZXNQEW43.mjs';
11
+ import './chunk-LQG5G2LY.mjs';
12
+ import './chunk-U46IZNCW.mjs';
13
+ import './chunk-JUKYYXSP.mjs';
14
+ import './chunk-SOUZMPME.mjs';
15
+ import './chunk-FQBFZAWG.mjs';
16
+ import './chunk-65WCV5JO.mjs';
17
+ import './chunk-4UMZ7KQL.mjs';
18
+ import './chunk-ZXX5GZEX.mjs';
19
+ import './chunk-KYVRZAYP.mjs';
20
+ import './chunk-L5ORED7V.mjs';
21
+ import './chunk-U476IXKQ.mjs';
22
+ import './chunk-MDF6PDIA.mjs';
23
+ import './chunk-R6A773WK.mjs';
24
+ import './chunk-YTJCGKM4.mjs';
@@ -1,6 +1,6 @@
1
- import { C as ClusterCoordinator } from '../../index-DsEurhSl.js';
2
- import '../../schema-B-Runv0n.js';
3
- import '../../adapters-BQFQ4PRz.js';
1
+ import { C as ClusterCoordinator } from '../../index-MsF7e5hL.js';
2
+ import '../../schema-D33CyXCy.js';
3
+ import '../../adapters-pljAqmrC.js';
4
4
  import '../../synonyms-CpOAHPa-.js';
5
5
 
6
6
  /**
@@ -1,8 +1,8 @@
1
1
  import { INDEX_METADATA_KEY_PREFIX, indexNameOfMetadataSuffix } from '../../chunk-Q2AP2FSN.mjs';
2
2
  import { MAX_NODE_ID_LENGTH, CONTROLLER_LEASE_KEY, MAX_WATCHERS } from '../../chunk-44W3CBNG.mjs';
3
+ import { NarsilError, ErrorCodes, describeError } from '../../chunk-MDF6PDIA.mjs';
3
4
  import '../../chunk-R6A773WK.mjs';
4
5
  import { compareCodePoints } from '../../chunk-YTJCGKM4.mjs';
5
- import { NarsilError, ErrorCodes, describeError } from '../../chunk-HNHCNTVG.mjs';
6
6
  import { encode, decode } from '@msgpack/msgpack';
7
7
 
8
8
  // src/distribution/coordinator/etcd/constants.ts
@@ -1,6 +1,6 @@
1
- import { C as ClusterCoordinator } from '../../index-DsEurhSl.js';
2
- import '../../schema-B-Runv0n.js';
3
- import '../../adapters-BQFQ4PRz.js';
1
+ import { C as ClusterCoordinator } from '../../index-MsF7e5hL.js';
2
+ import '../../schema-D33CyXCy.js';
3
+ import '../../adapters-pljAqmrC.js';
4
4
  import '../../synonyms-CpOAHPa-.js';
5
5
 
6
6
  /**
@@ -1,8 +1,8 @@
1
- import { decodeTransportMessage, encodeTransportMessage } from '../../chunk-J6YVB2XM.mjs';
2
- import { timeoutsOf, replyDeadlineMs } from '../../chunk-PWIWSUCX.mjs';
1
+ import { decodeTransportMessage, encodeTransportMessage } from '../../chunk-IJPK5PGM.mjs';
2
+ import { timeoutsOf, replyDeadlineMs } from '../../chunk-POUYICOU.mjs';
3
3
  import { MAX_MESSAGE_SIZE_BYTES, GRPC_KEEPALIVE_TIMEOUT_MS, GRPC_KEEPALIVE_TIME_MS, GRPC_ENVELOPE_OVERHEAD_BYTES } from '../../chunk-UNEEFTEU.mjs';
4
- import { TransportError, TransportErrorCodes } from '../../chunk-YH5OIL7B.mjs';
5
- import { NarsilError, ErrorCodes } from '../../chunk-HNHCNTVG.mjs';
4
+ import { TransportError, TransportErrorCodes } from '../../chunk-5QMHMELB.mjs';
5
+ import { NarsilError, ErrorCodes } from '../../chunk-MDF6PDIA.mjs';
6
6
 
7
7
  // src/distribution/transport/grpc/codec.ts
8
8
  var FIELD_ONE_LENGTH_DELIMITED_KEY = 10;
@@ -1,6 +1,6 @@
1
- import { timeoutsOf, replyDeadlineMs } from '../../chunk-PWIWSUCX.mjs';
1
+ import { timeoutsOf, replyDeadlineMs } from '../../chunk-POUYICOU.mjs';
2
2
  import { MAX_MESSAGE_SIZE_BYTES } from '../../chunk-UNEEFTEU.mjs';
3
- import { DEFAULT_TRANSPORT_CONFIG, TransportError, TransportErrorCodes } from '../../chunk-YH5OIL7B.mjs';
3
+ import { DEFAULT_TRANSPORT_CONFIG, TransportError, TransportErrorCodes } from '../../chunk-5QMHMELB.mjs';
4
4
 
5
5
  // src/distribution/transport/in-memory.ts
6
6
  function createInMemoryNetwork() {
@@ -1,7 +1,7 @@
1
- import { DEFAULT_TCP_CONFIG, encodeTransportMessage, encodeFrame, FRAME_TYPE_REQUEST, FrameParser, FRAME_TYPE_RESPONSE, decodeTransportMessage, FRAME_TYPE_STREAM_CHUNK, FRAME_TYPE_STREAM_END } from '../../chunk-J6YVB2XM.mjs';
2
- import { timeoutsOf, replyDeadlineMs } from '../../chunk-PWIWSUCX.mjs';
1
+ import { DEFAULT_TCP_CONFIG, encodeTransportMessage, encodeFrame, FRAME_TYPE_REQUEST, FrameParser, FRAME_TYPE_RESPONSE, decodeTransportMessage, FRAME_TYPE_STREAM_CHUNK, FRAME_TYPE_STREAM_END } from '../../chunk-IJPK5PGM.mjs';
2
+ import { timeoutsOf, replyDeadlineMs } from '../../chunk-POUYICOU.mjs';
3
3
  import { MAX_MESSAGE_SIZE_BYTES } from '../../chunk-UNEEFTEU.mjs';
4
- import { TransportError, TransportErrorCodes } from '../../chunk-YH5OIL7B.mjs';
4
+ import { TransportError, TransportErrorCodes } from '../../chunk-5QMHMELB.mjs';
5
5
  import { connect as connect$1, createServer as createServer$1 } from 'net';
6
6
  import { connect, createServer } from 'tls';
7
7
 
@@ -1,11 +1,11 @@
1
- import { b as CreateIndexOptions, C as ClusterNamespace, c as ClusterNodeConfig } from './config-CIG5yDyg.js';
2
- export { d as ClusterControllerConfig, e as ClusterHealth, f as ClusterHealthStatus, g as ClusterMemoryConfig, h as ClusterMetrics, a as ClusterNodeInfo, i as ClusterQueryConfig, j as CommitPointFigure, k as CoordinatorRequestFigure, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, l as ReplicationConfig, V as VectorRebuildWaitFigure } from './config-CIG5yDyg.js';
3
- import { R as RerankAdapter } from './adapters-BQFQ4PRz.js';
4
- import { A as AnalysisChange, N as Narsil } from './engine-CtzbHOmG.js';
5
- import { B as BatchResult, L as ListParams, f as ListResult, g as SuggestParams, h as SuggestResult, Q as QueryParams, j as PreflightResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, M as MemoryStats, l as NarsilEventMap, m as QueryResult } from './config-BhZxIeb1.js';
6
- import { B as BM25Params, a as IndexConfig, A as AnyDocument, I as InsertOptions } from './schema-B-Runv0n.js';
7
- import { b as NodeCapacity, N as NodeRole } from './index-DsEurhSl.js';
8
- export { d as AllocationConstraints, e as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexMetadataEvent, f as IndexMetadataWatch, g as IndexPartitionBytes, h as NodeEvent, c as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, i as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-DsEurhSl.js';
1
+ import { c as CreateIndexOptions, C as ClusterNamespace, d as ClusterNodeConfig } from './config-CfhH1IWQ.js';
2
+ export { B as BackupListing, e as BackupOperationOptions, f as BackupProgress, a as BackupSummary, g as ClusterBackupConfig, h as ClusterControllerConfig, i as ClusterHealth, j as ClusterHealthStatus, k as ClusterMemoryConfig, l as ClusterMetrics, b as ClusterNodeInfo, m as ClusterQueryConfig, n as CommitPointFigure, o as CoordinatorRequestFigure, D as DamagedBackup, I as IndexHealth, N as NodeReadiness, P as PartitionReplicationFigure, R as ReplicaLagFigure, p as ReplicationConfig, q as RestoreBackupOptions, V as VectorRebuildWaitFigure } from './config-CfhH1IWQ.js';
3
+ import { R as RerankAdapter } from './adapters-pljAqmrC.js';
4
+ import { A as AnalysisChange, N as Narsil } from './engine-CJRUHXgf.js';
5
+ import { B as BatchResult, L as ListParams, f as ListResult, g as SuggestParams, h as SuggestResult, Q as QueryParams, j as PreflightResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, M as MemoryStats, l as NarsilEventMap, m as QueryResult } from './config-aIsy7mcL.js';
6
+ import { B as BM25Params, a as IndexConfig, A as AnyDocument, I as InsertOptions } from './schema-D33CyXCy.js';
7
+ import { c as NodeCapacity, N as NodeRole } from './index-MsF7e5hL.js';
8
+ export { A as AllocationConstraints, e as AllocationEvent, a as AllocationTable, C as ClusterCoordinator, I as IndexMetadataEvent, f as IndexMetadataWatch, g as IndexPartitionBytes, h as NodeEvent, d as NodeMemoryReport, b as NodeRegistration, P as PartitionAssignment, i as PartitionState, R as RegistrationLease, S as SchemaEvent, U as UnassignedReason } from './index-MsF7e5hL.js';
9
9
  import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
10
10
  export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-DvncmvuQ.js';
11
11