@delali/narsil 0.3.1-next.154 → 0.3.1-next.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/adapters/filesystem.mjs +2 -2
- package/dist/adapters/gcs.mjs +2 -2
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/adapters/s3.mjs +2 -2
- package/dist/{analysis-change-4GCRVRBW.mjs → analysis-change-3TFIHT5E.mjs} +25 -25
- package/dist/{react-native/chunks/analysis-change-entry-TNLUC6IZ.mjs → analysis-change-entry-KA6JAO4X.mjs} +1 -1
- package/dist/archive-history-E4R73RWD.mjs +29 -0
- package/dist/browser/{analysis-change-IXWPXXJJ.mjs → analysis-change-TC36BU47.mjs} +29 -10
- package/dist/{analysis-change-entry-KYGSXW4K.mjs → browser/analysis-change-entry-4MH3CZXH.mjs} +1 -1
- package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
- package/dist/browser/{chunk-4PD752F6.mjs → chunk-23XRXIBW.mjs} +1 -1
- package/dist/browser/chunk-3UIEB4QF.mjs +63 -0
- package/dist/browser/{chunk-AJ4HHOVT.mjs → chunk-4EWUGZYZ.mjs} +4 -4
- package/dist/browser/{chunk-U2E3HMYW.mjs → chunk-4WCVMOU3.mjs} +1 -1
- package/dist/browser/{chunk-QXTPSX2H.mjs → chunk-56W3HQVJ.mjs} +7 -7
- package/dist/browser/{chunk-3U3QR5YP.mjs → chunk-5TCXK5SB.mjs} +2 -2
- package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
- package/dist/browser/{chunk-J433A7P3.mjs → chunk-A5KUEGDY.mjs} +5 -5
- package/dist/browser/{chunk-XRV72TJD.mjs → chunk-ABCXENU5.mjs} +2 -2
- package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
- package/dist/{react-native/chunks/chunk-3XKMRNRE.mjs → browser/chunk-BXM5XOCA.mjs} +27 -10
- package/dist/browser/chunk-CJSYBQ4J.mjs +100 -0
- package/dist/{react-native/chunks/chunk-DCKMICOB.mjs → browser/chunk-EXQZGUQH.mjs} +1 -1
- package/dist/browser/{chunk-VCOYGVP7.mjs → chunk-FNIFPFB7.mjs} +3 -3
- package/dist/browser/{chunk-ML6HY7T7.mjs → chunk-G64Q6OJF.mjs} +1 -1
- package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
- package/dist/browser/chunk-IKDKX5VQ.mjs +1007 -0
- package/dist/browser/{chunk-7TTWXUH6.mjs → chunk-JIJXMI42.mjs} +3 -2
- package/dist/browser/chunk-JVBP5EYO.mjs +1106 -0
- package/dist/browser/{chunk-2FX6ROWR.mjs → chunk-K4GCSZLI.mjs} +4 -4
- package/dist/browser/{chunk-EUNBNLKM.mjs → chunk-K5AXJBLL.mjs} +5 -5
- package/dist/browser/chunk-KKAMCABR.mjs +432 -0
- package/dist/browser/{chunk-7MEYN7V6.mjs → chunk-LFIWRCEA.mjs} +1 -9
- package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
- package/dist/browser/{chunk-W5X2UFWQ.mjs → chunk-NLWTBAGB.mjs} +12 -3
- package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
- package/dist/browser/{chunk-G7LUMBSG.mjs → chunk-RND5CLX3.mjs} +28 -18
- package/dist/browser/{chunk-AYY6PIKL.mjs → chunk-RQBUNZQW.mjs} +2 -2
- package/dist/browser/{chunk-C4KS2QNF.mjs → chunk-RRO3EV4C.mjs} +9 -9
- package/dist/browser/{chunk-2SHAKW2Z.mjs → chunk-SMEQ36NT.mjs} +80 -134
- package/dist/{chunk-KUZKUONM.mjs → browser/chunk-SRMZXJSL.mjs} +1 -0
- package/dist/{react-native/chunks/chunk-3O57C2ZO.mjs → browser/chunk-SUDNZKPL.mjs} +2 -2
- package/dist/browser/{chunk-SJB6VIZG.mjs → chunk-U3JOQGWX.mjs} +1 -1
- package/dist/browser/{chunk-H6QFBMVE.mjs → chunk-XY4VVBBO.mjs} +3 -3
- package/dist/browser/{cold-module-VTUGDYNY.mjs → cold-module-NEUGHUPA.mjs} +18 -17
- package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
- package/dist/browser/{durability-wiring-GL4A7KDV.mjs → durability-wiring-CVGPRO6D.mjs} +46 -150
- package/dist/browser/engine-hooks-YXMPHZKZ.mjs +16 -0
- package/dist/browser/{import-YI5GNB4H.mjs → import-OM6QAW45.mjs} +10 -9
- package/dist/browser/{methods-LMUTS7OI.mjs → methods-KTQCSIN4.mjs} +3 -3
- package/dist/browser/{module-EC3FYW7N.mjs → module-3HNFCBJ5.mjs} +10 -9
- package/dist/browser/{module-M4JNBV6V.mjs → module-E33X4AOK.mjs} +14 -13
- package/dist/browser/operations-OJ3BXS55.mjs +5 -0
- package/dist/browser/{phrase-module-NPYUVX75.mjs → phrase-module-ZXXU7S3B.mjs} +1 -1
- package/dist/browser/{pool-WCGDZHJP.mjs → pool-3JLET5RO.mjs} +1 -1
- package/dist/browser/restore-hooks-IF2ZROUP.mjs +113 -0
- package/dist/browser/restore-queue-ZBS7CJA6.mjs +55 -0
- package/dist/browser/{retention-6QMRS5VK.mjs → retention-ASWUHAYI.mjs} +16 -14
- package/dist/browser/{runtime-3EW2AGB6.mjs → runtime-OTAGEFQW.mjs} +1 -1
- package/dist/browser/{snapshot-DN3CRVUQ.mjs → snapshot-PN7ZW6Q4.mjs} +65 -31
- package/dist/browser/start-ZIRB7MQ2.mjs +24 -0
- package/dist/browser/{write-WAWAFGKQ.mjs → write-HMDYCTV2.mjs} +14 -13
- package/dist/{capabilities-B3Brs1Rc.d.ts → capabilities-Da4ywVVl.d.ts} +35 -3
- package/dist/{chunk-K4B7OH65.mjs → chunk-2MANFZJ3.mjs} +2 -2
- package/dist/{chunk-O43Z4MS6.mjs → chunk-2NE7VCYE.mjs} +2 -2
- package/dist/{chunk-3Y3J4V2R.mjs → chunk-3C7MTCCI.mjs} +1 -1
- package/dist/{chunk-RVKFI3A2.mjs → chunk-3HB3PEC6.mjs} +11 -8
- package/dist/chunk-3HHQLEEQ.mjs +1092 -0
- package/dist/{chunk-HVYICDY3.mjs → chunk-3OH67G7R.mjs} +1 -1
- package/dist/{chunk-QKZHLADX.mjs → chunk-3R4UZWQG.mjs} +26 -17
- package/dist/{chunk-ZIFJXCKA.mjs → chunk-4BYWRYPM.mjs} +1 -1
- package/dist/{chunk-VMXSVVXG.mjs → chunk-4KRC2APY.mjs} +5 -5
- package/dist/{chunk-IQ4R2I6N.mjs → chunk-5FLRXF73.mjs} +5 -1
- package/dist/chunk-5FVU47TB.mjs +20 -0
- package/dist/chunk-5YNRKI2C.mjs +81 -0
- package/dist/chunk-6L3XJXGU.mjs +470 -0
- package/dist/{chunk-C6ASEFZI.mjs → chunk-6OEGXLBX.mjs} +1 -1
- package/dist/{browser/chunk-SIR3LMTV.mjs → chunk-6RC4K46J.mjs} +2 -2
- package/dist/{chunk-466PYR4P.mjs → chunk-AILVAOLX.mjs} +2 -2
- package/dist/chunk-BDRIVYOK.mjs +72 -0
- package/dist/{chunk-TRISKD4Q.mjs → chunk-BY6ZDGYS.mjs} +2 -2
- package/dist/{chunk-NZMAXR2S.mjs → chunk-DCNKVEDB.mjs} +121 -10
- package/dist/{chunk-C73JLU4E.mjs → chunk-DIBHI6W5.mjs} +2 -2
- package/dist/{chunk-VREK3MYG.mjs → chunk-DUOLGBTE.mjs} +3 -3
- package/dist/{chunk-USR7FQRZ.mjs → chunk-GH4WQ22V.mjs} +2 -2
- package/dist/chunk-GQPTDQCL.mjs +54 -0
- package/dist/chunk-H4KHPLHJ.mjs +382 -0
- package/dist/{chunk-K7KLL263.mjs → chunk-H6VIGE62.mjs} +12 -12
- package/dist/{chunk-YROWNOMH.mjs → chunk-HJJI72X7.mjs} +1 -1
- package/dist/{chunk-37IVJLP6.mjs → chunk-HNVVEQP7.mjs} +1 -1
- package/dist/{chunk-PFKM7VNZ.mjs → chunk-HW5TNXBO.mjs} +28 -10
- package/dist/{chunk-3A5KI24C.mjs → chunk-I54T6CQP.mjs} +1 -1
- package/dist/{chunk-YBJDOA2T.mjs → chunk-INJYO3BU.mjs} +1 -1
- package/dist/{chunk-KCUIFVVW.mjs → chunk-J4IWBIVY.mjs} +9 -9
- package/dist/{chunk-AO2FAYIZ.mjs → chunk-K4ZIGL2O.mjs} +1 -1
- package/dist/{chunk-7NTMUDC5.mjs → chunk-KBDBPVLN.mjs} +5 -5
- package/dist/{chunk-JFNKIBDT.mjs → chunk-KBKEXQZA.mjs} +2 -2
- package/dist/{chunk-REL7LFLR.mjs → chunk-KFLK5NA2.mjs} +3 -3
- package/dist/{chunk-WCBA2LVZ.mjs → chunk-KHKIRS5D.mjs} +1 -1
- package/dist/{chunk-7QUGDVFC.mjs → chunk-KJ3RTZDJ.mjs} +1 -1
- package/dist/{chunk-LSM2YTKM.mjs → chunk-KMUNHGBQ.mjs} +81 -139
- package/dist/chunk-KP7TYHWT.mjs +92 -0
- package/dist/{chunk-MMBEANB2.mjs → chunk-KPIV4RUC.mjs} +3 -3
- package/dist/{chunk-62G63NMH.mjs → chunk-KXCVQWOR.mjs} +4 -4
- package/dist/{chunk-TV2L3BN7.mjs → chunk-L7ZD4L3K.mjs} +263 -263
- package/dist/{chunk-OKX2BBNW.mjs → chunk-LC3FDWTX.mjs} +2 -2
- package/dist/{chunk-URPCYQVJ.mjs → chunk-LHKOSI2J.mjs} +1 -1
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/{react-native/chunks/chunk-CUNGPR5R.mjs → chunk-MP7ABPTD.mjs} +1 -0
- package/dist/chunk-MT2NRTA6.mjs +216 -0
- package/dist/{chunk-Q3TCTQCC.mjs → chunk-NF4DT3IH.mjs} +1 -1
- package/dist/{chunk-3OFU3NJT.mjs → chunk-OIJ64LGT.mjs} +1 -1
- package/dist/{chunk-4HWZV5MK.mjs → chunk-PCRA7HTI.mjs} +5 -5
- package/dist/chunk-PHQNACDT.mjs +63 -0
- package/dist/{chunk-Q7MS6P2J.mjs → chunk-Q622CTMC.mjs} +2 -2
- package/dist/{chunk-HVKXNBFL.mjs → chunk-Q7G3BV3Y.mjs} +1 -1
- package/dist/{chunk-IBNLW3AV.mjs → chunk-QH3YIQP4.mjs} +20 -6
- package/dist/{chunk-B7S6YEBP.mjs → chunk-QJVOLKU6.mjs} +12 -3
- package/dist/chunk-QUJHMPTP.mjs +30 -0
- package/dist/{chunk-7HCZWC7B.mjs → chunk-RSVULW4Q.mjs} +49 -7
- package/dist/{chunk-YPUEV6ZC.mjs → chunk-RVGRFOGN.mjs} +1 -1
- package/dist/{chunk-JCLTESFN.mjs → chunk-RZWWB2XR.mjs} +1 -1
- package/dist/{chunk-X6NSJYQ3.mjs → chunk-S2EQU2GE.mjs} +13 -13
- package/dist/chunk-S5LN746F.mjs +10 -0
- package/dist/{chunk-MMEMEUOO.mjs → chunk-SG3JBNHY.mjs} +2 -2
- package/dist/{chunk-LKUE5GXS.mjs → chunk-SMVH6JBE.mjs} +2 -2
- package/dist/{chunk-IJU7LL7D.mjs → chunk-SY3EWKQY.mjs} +5 -5
- package/dist/{chunk-CP5RRPJR.mjs → chunk-TQXHPFWT.mjs} +1 -1
- package/dist/{chunk-5KGYQT6W.mjs → chunk-U4BS74YN.mjs} +26 -9
- package/dist/{chunk-S2N75OTN.mjs → chunk-UHICS3JI.mjs} +1 -1
- package/dist/chunk-UZRZKNNZ.mjs +101 -0
- package/dist/{chunk-DMQPFLGI.mjs → chunk-VGF7CFRP.mjs} +5 -5
- package/dist/chunk-VHBNF4MA.mjs +543 -0
- package/dist/{chunk-BPSKLCS7.mjs → chunk-VQEUR6T6.mjs} +3 -3
- package/dist/{chunk-Z3TNWCI5.mjs → chunk-WQRN64Q6.mjs} +2 -2
- package/dist/{chunk-LTUGDMV4.mjs → chunk-WZ7YV54N.mjs} +1 -1
- package/dist/{chunk-NTZOXVUZ.mjs → chunk-YEDIDCR7.mjs} +3 -3
- package/dist/{chunk-PGVPE7GJ.mjs → chunk-YEKL4JBK.mjs} +1 -1
- package/dist/{chunk-5FUOVJKG.mjs → chunk-Z2BE2MAM.mjs} +13 -13
- package/dist/{chunk-HWEDFLB7.mjs → chunk-ZAUJFLEN.mjs} +10 -10
- package/dist/{chunk-MLHNSAPK.mjs → chunk-ZHCUZZE5.mjs} +2 -2
- package/dist/{chunk-ECX4SGX6.mjs → chunk-ZTW5WTGG.mjs} +9 -9
- package/dist/{client-Df76GNKm.d.ts → client-DRv7UVeY.d.ts} +123 -11
- package/dist/client.d.ts +9 -8
- package/dist/client.mjs +65 -3
- package/dist/{cold-module-YLWMTTZG.mjs → cold-module-7XXCEGTZ.mjs} +35 -35
- package/dist/{config-B8DP2VwR.d.ts → config-CoSig5Ox.d.ts} +22 -3
- package/dist/{config-05G_hy-1.d.ts → config-DMwffLKn.d.ts} +20 -5
- package/dist/{direct-executor-FI5GJHWX.mjs → direct-executor-G5TK7NLA.mjs} +16 -16
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +6788 -5934
- package/dist/durability-config-GE4U7MCZ.mjs +89 -0
- package/dist/{durability-wiring-RHLXDIVF.mjs → durability-wiring-NCKUC5EO.mjs} +71 -175
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{sync-uXR7MmM7.d.ts → engine-CFxPYqEk.d.ts} +702 -2
- package/dist/engine-hooks-DHCMOADY.mjs +47 -0
- package/dist/{import-SRBNC6TE.mjs → import-NBFXFCSG.mjs} +26 -26
- package/dist/{index-nRqDM6uS.d.ts → index-C4AmUnl1.d.ts} +1 -1
- package/dist/index.browser.mjs +7 -6
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +23 -23
- package/dist/index.react-native.mjs +13 -12
- package/dist/{long-query-thread-EMYTGSJP.mjs → long-query-thread-J4DVRM4A.mjs} +25 -24
- package/dist/{methods-ABM5ELBR.mjs → methods-7IOINERF.mjs} +3 -3
- package/dist/{module-MG7JMV2U.mjs → module-DWKPBSMN.mjs} +31 -31
- package/dist/{module-3OMJZUFT.mjs → module-UN76TF7I.mjs} +11 -11
- package/dist/operations-G5EP6JPX.mjs +5 -0
- package/dist/{paged-partition-archive-UOLHOEZJ.mjs → paged-partition-archive-DPNWVSK2.mjs} +38 -34
- package/dist/partial-words.mjs +7 -7
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +8 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +32 -32
- package/dist/{phrase-module-O3MDRQXP.mjs → phrase-module-ZI4WSQVH.mjs} +1 -1
- package/dist/{pool-CQXYPFLG.mjs → pool-Y4A46T36.mjs} +1 -1
- package/dist/query-suggestions/merge-worker.d.ts +55 -0
- package/dist/query-suggestions/merge-worker.mjs +81 -0
- package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
- package/dist/query-suggestions.browser.mjs +246 -0
- package/dist/query-suggestions.d.ts +20 -0
- package/dist/query-suggestions.mjs +62 -0
- package/dist/react-native/chunks/{analysis-change-EAYO3Y6Q.mjs → analysis-change-6BPDPH6K.mjs} +36 -17
- package/dist/{browser/analysis-change-entry-FCSHFQSS.mjs → react-native/chunks/analysis-change-entry-JLL42PH6.mjs} +1 -1
- package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
- package/dist/react-native/chunks/{chunk-O32RB3BL.mjs → chunk-3JIBF3XT.mjs} +3 -3
- package/dist/react-native/chunks/{chunk-75VWIY35.mjs → chunk-4DII3ZSM.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-NKIZX26F.mjs → chunk-4J74WHQM.mjs} +2 -2
- package/dist/{browser/chunk-TTD27VXX.mjs → react-native/chunks/chunk-4LCEN2IU.mjs} +27 -10
- package/dist/react-native/chunks/{chunk-AUT7PMA4.mjs → chunk-4Y53T4YE.mjs} +5 -5
- package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
- package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
- package/dist/react-native/chunks/{chunk-SJWDBRNP.mjs → chunk-6WA3C3DV.mjs} +1 -1
- package/dist/react-native/chunks/chunk-7GRCBBME.mjs +63 -0
- package/dist/react-native/chunks/{chunk-7GWPJDOA.mjs → chunk-7PXRWYUU.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-GFYFQLJD.mjs → chunk-ALOIBXWN.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-VQSKZ3EZ.mjs → chunk-C3PTWYKT.mjs} +8 -8
- package/dist/react-native/chunks/{chunk-OQQVRWZ2.mjs → chunk-C5G6TJ7A.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-RVAEBN74.mjs → chunk-CKNRFDTZ.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-UWDNZDWK.mjs → chunk-CUH5F57W.mjs} +6 -6
- package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
- package/dist/react-native/chunks/{chunk-YBEW6YTR.mjs → chunk-DVDX4SDR.mjs} +2 -2
- package/dist/{browser/chunk-MYITLCHT.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +1 -0
- package/dist/react-native/chunks/{chunk-RYMDHGL4.mjs → chunk-EIOYM5TO.mjs} +5 -5
- package/dist/react-native/chunks/chunk-GIZTJXYW.mjs +1007 -0
- package/dist/react-native/chunks/{chunk-NP7DD4G5.mjs → chunk-GJFXPHXI.mjs} +5 -5
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/{chunk-63YSZOXB.mjs → chunk-HUOYZJ3Q.mjs} +88 -142
- package/dist/react-native/chunks/{chunk-DH3TVWWK.mjs → chunk-IYNT75CE.mjs} +12 -3
- package/dist/react-native/chunks/{chunk-NCJS3WIY.mjs → chunk-JLIIWJUV.mjs} +1 -1
- package/dist/react-native/chunks/chunk-KJIG57UD.mjs +1106 -0
- package/dist/react-native/chunks/{chunk-JX2RIAXH.mjs → chunk-KTTAU63H.mjs} +5 -5
- package/dist/{browser/chunk-ZPTA75ZC.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-ZBSWRSBG.mjs → chunk-MJDQU5MW.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-IOY2SM2P.mjs → chunk-MVXELMJX.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-2CGSQM4O.mjs → chunk-N2WUOWLL.mjs} +12 -12
- package/dist/react-native/chunks/{chunk-YHKZSLOC.mjs → chunk-OL3WDV53.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-VVFYOADG.mjs → chunk-PEHS2UO3.mjs} +6 -6
- package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
- package/dist/react-native/chunks/chunk-QJXTNPLQ.mjs +100 -0
- package/dist/react-native/chunks/{chunk-EH5CFV6Z.mjs → chunk-RDWG33MM.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-ZYDKJXQJ.mjs → chunk-SUPXRTMD.mjs} +1 -1
- package/dist/react-native/chunks/chunk-TYIRMPD3.mjs +432 -0
- package/dist/react-native/chunks/{chunk-JPAJWO6D.mjs → chunk-U4KSKA4Z.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-I5PGWQJF.mjs → chunk-VXGE4ZXL.mjs} +31 -22
- package/dist/{chunk-DVWYODEB.mjs → react-native/chunks/chunk-WBYQRHDY.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-C2H2QQFW.mjs → chunk-YH7QY657.mjs} +3 -3
- package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
- package/dist/react-native/chunks/{cold-module-TJL6AFAD.mjs → cold-module-5PHF6DZR.mjs} +24 -23
- package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
- package/dist/react-native/chunks/{durability-wiring-RRDYJLLM.mjs → durability-wiring-KO565FZC.mjs} +52 -156
- package/dist/react-native/chunks/engine-hooks-MVRRHH6B.mjs +28 -0
- package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
- package/dist/react-native/chunks/import-YVZA4V4V.mjs +30 -0
- package/dist/react-native/chunks/{methods-X6F36SJE.mjs → methods-6W5U4C3H.mjs} +3 -3
- package/dist/react-native/chunks/{module-S4DKSWMF.mjs → module-H5MVPSP2.mjs} +11 -10
- package/dist/react-native/chunks/{module-QT5HZAY4.mjs → module-ZL5ZG6YB.mjs} +20 -19
- package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
- package/dist/react-native/chunks/{phrase-module-JZ37TB7N.mjs → phrase-module-RTVKEWJT.mjs} +1 -1
- package/dist/react-native/chunks/{pool-RTGXJXPU.mjs → pool-JR3NJCAF.mjs} +1 -1
- package/dist/react-native/chunks/restore-hooks-SILFPU6B.mjs +125 -0
- package/dist/react-native/chunks/restore-queue-HSYP2AEC.mjs +55 -0
- package/dist/react-native/chunks/{retention-PPCTP2VY.mjs → retention-7I7UAWYK.mjs} +21 -19
- package/dist/react-native/chunks/{runtime-KUATOLYB.mjs → runtime-R5E3TB3J.mjs} +1 -1
- package/dist/react-native/chunks/{snapshot-ZBIEOZTZ.mjs → snapshot-EZYB6SLF.mjs} +70 -36
- package/dist/react-native/chunks/start-SHVZ72I5.mjs +36 -0
- package/dist/react-native/chunks/{write-2W4FTX7J.mjs → write-JUESXHDL.mjs} +20 -19
- package/dist/react-native/partial-words.mjs +7 -6
- package/dist/react-native/pattern.mjs +3 -3
- package/dist/react-native/query-suggestions.mjs +258 -0
- package/dist/react-native/sync.mjs +76 -13
- package/dist/react-native/synonyms.mjs +4 -4
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +1 -0
- package/dist/{rerank-IZOB6NII.mjs → rerank-MQ37IYRV.mjs} +4 -4
- package/dist/rerankers/http.mjs +2 -2
- package/dist/restore-hooks-HZ3ILAMO.mjs +146 -0
- package/dist/restore-queue-JVGENGGE.mjs +55 -0
- package/dist/{retention-55WA7GPU.mjs → retention-HROPV2QU.mjs} +33 -32
- package/dist/{runtime-UZOC3NPY.mjs → runtime-COIUORCN.mjs} +5 -5
- package/dist/{schema-DDauvDOv.d.ts → schema-Jwt928nJ.d.ts} +1 -1
- package/dist/server.d.ts +108 -12
- package/dist/server.mjs +293 -46
- package/dist/{snapshot-NFX2EYN2.mjs → snapshot-4HS2G2UM.mjs} +85 -54
- package/dist/start-UTWHGH42.mjs +59 -0
- package/dist/sync/filesystem.d.ts +4 -4
- package/dist/sync/filesystem.mjs +4 -4
- package/dist/sync/indexeddb.d.ts +4 -4
- package/dist/sync/indexeddb.mjs +2 -2
- package/dist/sync.browser.mjs +74 -11
- package/dist/sync.d.ts +5 -5
- package/dist/sync.mjs +76 -14
- package/dist/synonyms.mjs +5 -5
- package/dist/{tasks-BShx8pdK.d.ts → tasks-qrJojgST.d.ts} +13 -5
- package/dist/{thread-P2G2FWM2.mjs → thread-6MOXY2KD.mjs} +24 -23
- package/dist/{types-SnO7_tAI.d.ts → types-BZCGjfLn.d.ts} +2 -3
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +5 -5
- package/dist/workers/entry.mjs +8 -8
- package/dist/{write-FGB62BHQ.mjs → write-GTTWWRRG.mjs} +30 -30
- package/openapi.json +798 -7
- package/package.json +24 -7
- package/dist/browser/operations-WVYLF72Q.mjs +0 -5
- package/dist/browser/restore-queue-TYIGDL5L.mjs +0 -41
- package/dist/engine-DYu-e0oR.d.ts +0 -674
- package/dist/operations-PGOAY2KS.mjs +0 -5
- package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
- package/dist/react-native/chunks/gzip.react-native-DNB5YNFA.mjs +0 -3
- package/dist/react-native/chunks/import-JYBMEJPQ.mjs +0 -29
- package/dist/react-native/chunks/operations-RYKTSZQA.mjs +0 -5
- package/dist/react-native/chunks/restore-queue-ZBVIKJWI.mjs +0 -41
- package/dist/restore-queue-COI2GSSK.mjs +0 -41
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, noBuildHistory, recordCheckpoint, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, graphNeedsRebuild, yieldBuildTurn, threadsHoldCurrentLayout, emptyFieldBeforeRestore, recalibrateFromStore, signatureOf, allLiveDocIds, fieldHandlesOf, releaseReplacedVectors, adoptGraph, liveOrdinals, adoptLoadedCalibration, planCheckpoint, deserialize } from './chunk-JX2RIAXH.mjs';
|
|
1
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, noBuildHistory, recordCheckpoint, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, graphNeedsRebuild, yieldBuildTurn, threadsHoldCurrentLayout, emptyFieldBeforeRestore, recalibrateFromStore, signatureOf, allLiveDocIds, fieldHandlesOf, releaseReplacedVectors, adoptGraph, liveOrdinals, adoptLoadedCalibration, planCheckpoint, deserialize } from './chunk-KTTAU63H.mjs';
|
|
3
2
|
import { DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, defaultQuantizationFor, DEFAULT_VECTOR_METRIC, ESTIMATED_MS_PER_TOMBSTONE, ESTIMATED_MS_PER_VECTOR_REBUILD, WORKER_COPY_MIN_VECTORS, SHUFFLED_REBUILD_MEMORY_RETRY_MS, SEARCH_ATTEMPTS_BEFORE_HOLDING_WRITES, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, BUILD_STEPS_BETWEEN_CLOCK_CHECKS, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, SEARCH_REFILL_RESERVE, SEARCH_SCAN_CHUNK_VECTORS, DRIFT_CHECK_GROWTH_FACTOR, RECALIBRATION_DRIFT_RATIO, DISK_ADOPTION_YIELD_INTERVAL } from './chunk-HJBJBH26.mjs';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
3
|
+
import './chunk-PSWKQVVT.mjs';
|
|
4
|
+
import { openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, osqBitsOf, createOsqQuantizer, ordinalFilterValues, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, VECTOR_MEMORY_LIMITS, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, threadedNativeCore, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, nativeStoreScratchBytes, noteFallback, toDistance, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, grownByteLength, createVectorBlock, ensureBlockSlots, sharedMemoryAvailable, createHNSWIndex, topLayerInParts, shuffleInPlace, requireWholeNeighbourLists, createCentroidSums, shuffleStep, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, nativeStoreFor, withNativeThreadSlot, nativeMetricCode, NATIVE_OK, releaseLocksHeldBy } from './chunk-EIOYM5TO.mjs';
|
|
5
|
+
export { releaseLocksHeldBy } from './chunk-EIOYM5TO.mjs';
|
|
6
|
+
import { createVectorFileReader } from './chunk-4DII3ZSM.mjs';
|
|
7
|
+
import { NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, isDead } from './chunk-DVDX4SDR.mjs';
|
|
8
|
+
import { createDocIdMap, turnsAreBudgeted, yieldBackgroundTurn, chargeHeapBytes, holdWritesAndBackgroundWork, backgroundTurnIsSpent, turnIsSpent, yieldTurn, noteThreadSlotLive, noteThreadSlotGone } from './chunk-JLIIWJUV.mjs';
|
|
8
9
|
import './chunk-AM7RSBPF.mjs';
|
|
10
|
+
import './chunk-MVXELMJX.mjs';
|
|
9
11
|
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, NATIVE_THREAD_SCAN_CHUNK_ORDINALS, resolveWorkerCount, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-LU3Y3P63.mjs';
|
|
10
|
-
import { NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, isDead } from './chunk-YBEW6YTR.mjs';
|
|
11
12
|
import './chunk-CHPTFFJM.mjs';
|
|
12
|
-
import './chunk-
|
|
13
|
+
import './chunk-5CQX3XXV.mjs';
|
|
14
|
+
import './chunk-6VBXNFLE.mjs';
|
|
13
15
|
import './chunk-KWRW5U65.mjs';
|
|
14
16
|
import { compareCodePoints } from './chunk-PPEPTUVV.mjs';
|
|
15
17
|
import './chunk-AAAETEJK.mjs';
|
|
16
|
-
import './chunk-
|
|
17
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-CUNGPR5R.mjs';
|
|
18
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-DZ7H7D2C.mjs';
|
|
18
19
|
|
|
19
20
|
// src/engine/vector-maintenance.ts
|
|
20
21
|
function resolveVectorIndexes(manager, indexName, fieldName) {
|
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-N2WUOWLL.mjs';
|
|
2
|
+
import './chunk-WBYQRHDY.mjs';
|
|
3
|
+
import './chunk-4J74WHQM.mjs';
|
|
4
|
+
import './chunk-C3PTWYKT.mjs';
|
|
5
|
+
import './chunk-GJFXPHXI.mjs';
|
|
3
6
|
import './chunk-F753DA54.mjs';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-75VWIY35.mjs';
|
|
8
|
-
import './chunk-63YSZOXB.mjs';
|
|
7
|
+
import './chunk-4DII3ZSM.mjs';
|
|
8
|
+
import './chunk-6WA3C3DV.mjs';
|
|
9
|
+
import './chunk-HUOYZJ3Q.mjs';
|
|
9
10
|
import './chunk-IO2SMUQD.mjs';
|
|
10
|
-
import './chunk-
|
|
11
|
+
import './chunk-JLIIWJUV.mjs';
|
|
11
12
|
import './chunk-AM7RSBPF.mjs';
|
|
13
|
+
import './chunk-MVXELMJX.mjs';
|
|
12
14
|
import './chunk-NNE4VDMM.mjs';
|
|
13
15
|
import './chunk-LU3Y3P63.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
+
import './chunk-RDWG33MM.mjs';
|
|
17
|
+
import './chunk-4Y53T4YE.mjs';
|
|
16
18
|
import './chunk-UNUFZ2QY.mjs';
|
|
17
19
|
import './chunk-3NQOVO3K.mjs';
|
|
18
20
|
import './chunk-JDOEEMEF.mjs';
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-C2H2QQFW.mjs';
|
|
21
|
+
import './chunk-7PXRWYUU.mjs';
|
|
22
|
+
import './chunk-YH7QY657.mjs';
|
|
22
23
|
import './chunk-CHPTFFJM.mjs';
|
|
23
|
-
import './chunk-
|
|
24
|
-
import './chunk-
|
|
25
|
-
import './chunk-
|
|
26
|
-
import './chunk-
|
|
24
|
+
import './chunk-3JIBF3XT.mjs';
|
|
25
|
+
import './chunk-5CQX3XXV.mjs';
|
|
26
|
+
import './chunk-6VBXNFLE.mjs';
|
|
27
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
28
|
+
import './chunk-MJDQU5MW.mjs';
|
|
27
29
|
import './chunk-KWRW5U65.mjs';
|
|
28
30
|
import './chunk-PPEPTUVV.mjs';
|
|
29
31
|
import './chunk-LVIKKAA6.mjs';
|
|
30
32
|
import './chunk-AAAETEJK.mjs';
|
|
31
33
|
import './chunk-JV6VQY2S.mjs';
|
|
32
|
-
import './chunk-
|
|
33
|
-
import './chunk-CUNGPR5R.mjs';
|
|
34
|
+
import './chunk-DZ7H7D2C.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBitSet, bitsetIsEmpty, GrowableUint32, bitsetHas, bitsetSet } from './chunk-LVIKKAA6.mjs';
|
|
2
2
|
import { MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-AAAETEJK.mjs';
|
|
3
3
|
import { PHRASE_ROWS_START, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-JV6VQY2S.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
5
5
|
|
|
6
6
|
// src/core/partition/phrase-matching.ts
|
|
7
7
|
var UINT32_BITS = 32;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequestId } from './chunk-NNE4VDMM.mjs';
|
|
2
2
|
import { resolveWorkerCount, SHUTDOWN_TIMEOUT_MS } from './chunk-LU3Y3P63.mjs';
|
|
3
3
|
import { fnv1a } from './chunk-CHPTFFJM.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
5
5
|
|
|
6
6
|
// src/workers/pool-memory.ts
|
|
7
7
|
function toFinite(value) {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { withState, unionOfBans } from './chunk-QJXTNPLQ.mjs';
|
|
2
|
+
import { RestoredHistory } from './chunk-GIZTJXYW.mjs';
|
|
3
|
+
import './chunk-ZZT7CEN7.mjs';
|
|
4
|
+
import './chunk-TYIRMPD3.mjs';
|
|
5
|
+
import { installSuggestionHooks, clearLeftoversOfName } from './chunk-7GRCBBME.mjs';
|
|
6
|
+
import { attachedRuntimeOf } from './chunk-DIYDOIM4.mjs';
|
|
7
|
+
import { BUILD_WRITE_BATCH } from './chunk-PJHAB5ZY.mjs';
|
|
8
|
+
import { emitEngineEvent, removeDocumentBatch } from './chunk-HUOYZJ3Q.mjs';
|
|
9
|
+
import './chunk-IO2SMUQD.mjs';
|
|
10
|
+
import './chunk-JLIIWJUV.mjs';
|
|
11
|
+
import './chunk-AM7RSBPF.mjs';
|
|
12
|
+
import './chunk-MVXELMJX.mjs';
|
|
13
|
+
import './chunk-NNE4VDMM.mjs';
|
|
14
|
+
import './chunk-LU3Y3P63.mjs';
|
|
15
|
+
import './chunk-RDWG33MM.mjs';
|
|
16
|
+
import './chunk-4Y53T4YE.mjs';
|
|
17
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
18
|
+
import './chunk-3NQOVO3K.mjs';
|
|
19
|
+
import './chunk-JDOEEMEF.mjs';
|
|
20
|
+
import './chunk-7PXRWYUU.mjs';
|
|
21
|
+
import './chunk-YH7QY657.mjs';
|
|
22
|
+
import './chunk-CHPTFFJM.mjs';
|
|
23
|
+
import './chunk-3JIBF3XT.mjs';
|
|
24
|
+
import './chunk-5CQX3XXV.mjs';
|
|
25
|
+
import './chunk-6VBXNFLE.mjs';
|
|
26
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
27
|
+
import './chunk-MJDQU5MW.mjs';
|
|
28
|
+
import './chunk-KWRW5U65.mjs';
|
|
29
|
+
import './chunk-PPEPTUVV.mjs';
|
|
30
|
+
import './chunk-LVIKKAA6.mjs';
|
|
31
|
+
import './chunk-AAAETEJK.mjs';
|
|
32
|
+
import './chunk-JV6VQY2S.mjs';
|
|
33
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
34
|
+
|
|
35
|
+
// src/query-suggestions/restore-hooks.ts
|
|
36
|
+
function warn(core, event) {
|
|
37
|
+
if (emitEngineEvent(core.eventHandlers, "querySuggestionsWarning", event) > 0) return;
|
|
38
|
+
console.warn("Popular query suggestions warning:", event);
|
|
39
|
+
}
|
|
40
|
+
function requireNoSyncConflict(indexName, entry) {
|
|
41
|
+
if (entry.sync === null || entry.querySuggestions?.querySuggestions?.enabled !== true) return;
|
|
42
|
+
throw new NarsilError(
|
|
43
|
+
ErrorCodes.CONFIG_INVALID,
|
|
44
|
+
`Index "${indexName}" has device sync on, and the archive turns popular query suggestions on, which a synced index cannot hold`,
|
|
45
|
+
{ indexName }
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
async function removeFromOthers(core, engine, indexName, bans) {
|
|
49
|
+
for (const [name, other] of core.indexRegistry) {
|
|
50
|
+
if (name === indexName || other.querySuggestions?.querySuggestionsSource?.index !== indexName) continue;
|
|
51
|
+
for (let start = 0; start < bans.length; start += BUILD_WRITE_BATCH) {
|
|
52
|
+
const result = await engine.removeBatch(name, bans.slice(start, start + BUILD_WRITE_BATCH));
|
|
53
|
+
const failure = result.failed.find((failed) => failed.error.code !== ErrorCodes.DOC_NOT_FOUND);
|
|
54
|
+
if (failure !== void 0) throw failure.error;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function removeFromRestored(core, indexName, bans) {
|
|
59
|
+
for (let start = 0; start < bans.length; start += BUILD_WRITE_BATCH) {
|
|
60
|
+
const result = await removeDocumentBatch(core.mutationCtx, indexName, bans.slice(start, start + BUILD_WRITE_BATCH));
|
|
61
|
+
const failure = result.failed.find((failed) => failed.error.code !== ErrorCodes.DOC_NOT_FOUND);
|
|
62
|
+
if (failure !== void 0) throw failure.error;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async function applyBans(core, engine, indexName, entry) {
|
|
66
|
+
const bans = entry.querySuggestions?.bannedQueries ?? [];
|
|
67
|
+
if (bans.length > 0) await removeFromOthers(core, engine, indexName, bans);
|
|
68
|
+
const marker = entry.querySuggestions?.querySuggestionsSource;
|
|
69
|
+
if (marker === void 0 || marker.index === indexName) return;
|
|
70
|
+
const sourceBans = core.indexRegistry.get(marker.index)?.querySuggestions?.bannedQueries ?? [];
|
|
71
|
+
if (sourceBans.length > 0) await removeFromRestored(core, indexName, sourceBans);
|
|
72
|
+
}
|
|
73
|
+
function restoreSuggestionHooksOf(core, engine, indexName) {
|
|
74
|
+
installSuggestionHooks(core);
|
|
75
|
+
return {
|
|
76
|
+
async historySink(restored) {
|
|
77
|
+
return attachedRuntimeOf(core)?.restoredHistory(indexName, restored?.querySuggestions) ?? null;
|
|
78
|
+
},
|
|
79
|
+
async beforeInstall(entry, previous) {
|
|
80
|
+
requireNoSyncConflict(indexName, entry);
|
|
81
|
+
const previousBans = previous?.querySuggestions?.bannedQueries ?? [];
|
|
82
|
+
if (previousBans.length > 0) {
|
|
83
|
+
const restoredBans = entry.querySuggestions?.bannedQueries ?? [];
|
|
84
|
+
entry.querySuggestions = withState(entry.querySuggestions, {
|
|
85
|
+
bannedQueries: unionOfBans(previousBans, restoredBans)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if (previous === void 0) await clearLeftoversOfName(core, indexName);
|
|
89
|
+
},
|
|
90
|
+
async afterActivate(entry) {
|
|
91
|
+
try {
|
|
92
|
+
await applyBans(core, engine, indexName, entry);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
warn(core, {
|
|
95
|
+
indexName,
|
|
96
|
+
reason: "ban-removal-failed",
|
|
97
|
+
message: error instanceof Error ? error.message : String(error)
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
async afterInstall(entry, history) {
|
|
102
|
+
const runtime = attachedRuntimeOf(core);
|
|
103
|
+
const enabled = entry.querySuggestions?.querySuggestions?.enabled === true;
|
|
104
|
+
try {
|
|
105
|
+
if (!enabled) {
|
|
106
|
+
if (runtime !== void 0) await runtime.discardHistory(indexName);
|
|
107
|
+
else await core.durability?.manager.removeQueryHistory?.(indexName);
|
|
108
|
+
} else if (runtime === void 0 || runtime.scrambler === null) {
|
|
109
|
+
warn(core, { indexName, reason: "no-key" });
|
|
110
|
+
} else if (history instanceof RestoredHistory) {
|
|
111
|
+
await history.commit();
|
|
112
|
+
}
|
|
113
|
+
} catch (error) {
|
|
114
|
+
warn(core, {
|
|
115
|
+
indexName,
|
|
116
|
+
reason: "save-failed",
|
|
117
|
+
message: error instanceof Error ? error.message : String(error)
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
runtime?.settingChanged(indexName);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { restoreSuggestionHooksOf };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { abandonChangeOf } from './chunk-ALOIBXWN.mjs';
|
|
2
|
+
import { attachedRuntimeOf } from './chunk-DIYDOIM4.mjs';
|
|
3
|
+
|
|
4
|
+
// src/narsil/restore-queue.ts
|
|
5
|
+
function suggestionsInPlay(core, ...entries) {
|
|
6
|
+
return core.querySuggestionHooks !== void 0 || entries.some((entry) => (entry?.querySuggestions ?? null) !== null);
|
|
7
|
+
}
|
|
8
|
+
function suggestionHooksLoadedOnUse(core, engine, indexName) {
|
|
9
|
+
let loaded = null;
|
|
10
|
+
const load = () => {
|
|
11
|
+
loaded ??= import('./restore-hooks-SILFPU6B.mjs').then(
|
|
12
|
+
({ restoreSuggestionHooksOf }) => restoreSuggestionHooksOf(core, engine, indexName)
|
|
13
|
+
);
|
|
14
|
+
return loaded;
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
historySink: async (restored) => attachedRuntimeOf(core)?.restoredHistory(indexName, restored?.querySuggestions) ?? null,
|
|
18
|
+
async beforeInstall(entry, previous) {
|
|
19
|
+
if (suggestionsInPlay(core, entry, previous)) await (await load()).beforeInstall(entry, previous);
|
|
20
|
+
},
|
|
21
|
+
async afterActivate(entry) {
|
|
22
|
+
if (suggestionsInPlay(core, entry)) await (await load()).afterActivate(entry);
|
|
23
|
+
},
|
|
24
|
+
async afterInstall(entry, history) {
|
|
25
|
+
if (suggestionsInPlay(core, entry) || history !== null) await (await load()).afterInstall(entry, history);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function restoreDepsOf(core, host, engine, indexName) {
|
|
30
|
+
return {
|
|
31
|
+
...host,
|
|
32
|
+
querySuggestions: suggestionHooksLoadedOnUse(core, engine, indexName),
|
|
33
|
+
executor: core.executor,
|
|
34
|
+
indexRegistry: core.indexRegistry,
|
|
35
|
+
durability: core.durability,
|
|
36
|
+
filesystemDurability: core.filesystemDurability,
|
|
37
|
+
embeddingAdapters: core.embeddingAdapters,
|
|
38
|
+
markAnalysisStale: core.analysisRebuild.markStale,
|
|
39
|
+
clearAnalysisStale: core.analysisRebuild.clearStale,
|
|
40
|
+
abandonAnalysisRebuild: async (indexName2) => {
|
|
41
|
+
await core.analysisRebuild.abandon(indexName2);
|
|
42
|
+
await abandonChangeOf(core, indexName2);
|
|
43
|
+
},
|
|
44
|
+
abandonAnalysisChange: (indexName2) => abandonChangeOf(core, indexName2),
|
|
45
|
+
indexState: core.indexState,
|
|
46
|
+
copies: core.orchestrator,
|
|
47
|
+
forgetWatermark: core.watermarkNotifier.forget
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
async function runRestore(core, host, indexName, data, engine) {
|
|
51
|
+
const { restoreFromSnapshot } = await import('./snapshot-EZYB6SLF.mjs');
|
|
52
|
+
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host, engine, indexName));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { runRestore };
|
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-
|
|
2
|
-
import { syncStorageOf } from './chunk-
|
|
3
|
-
import { oneSyncChangeAtATime } from './chunk-Q32DDFKX.mjs';
|
|
1
|
+
import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-SUPXRTMD.mjs';
|
|
2
|
+
import { syncStorageOf } from './chunk-IYNT75CE.mjs';
|
|
4
3
|
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-PB2YXVQW.mjs';
|
|
5
|
-
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEntryHeaders, tarPadding, tarEnd } from './chunk-
|
|
6
|
-
import './chunk-
|
|
4
|
+
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEntryHeaders, tarPadding, tarEnd } from './chunk-4LCEN2IU.mjs';
|
|
5
|
+
import './chunk-CUH5F57W.mjs';
|
|
7
6
|
import { isSyncEpoch } from './chunk-JWUCMVRK.mjs';
|
|
7
|
+
import { oneSyncChangeAtATime } from './chunk-Q32DDFKX.mjs';
|
|
8
|
+
import './chunk-PJHAB5ZY.mjs';
|
|
8
9
|
import './chunk-F753DA54.mjs';
|
|
9
|
-
import {
|
|
10
|
+
import { manifestFileRefs } from './chunk-6WA3C3DV.mjs';
|
|
11
|
+
import './chunk-DVDX4SDR.mjs';
|
|
12
|
+
import { emitEngineEvent, encodeIndexConfiguration } from './chunk-HUOYZJ3Q.mjs';
|
|
10
13
|
import './chunk-IO2SMUQD.mjs';
|
|
11
|
-
import './chunk-
|
|
14
|
+
import './chunk-JLIIWJUV.mjs';
|
|
12
15
|
import './chunk-AM7RSBPF.mjs';
|
|
16
|
+
import './chunk-MVXELMJX.mjs';
|
|
13
17
|
import './chunk-NNE4VDMM.mjs';
|
|
14
18
|
import './chunk-LU3Y3P63.mjs';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
19
|
+
import './chunk-RDWG33MM.mjs';
|
|
20
|
+
import './chunk-4Y53T4YE.mjs';
|
|
17
21
|
import './chunk-UNUFZ2QY.mjs';
|
|
18
22
|
import './chunk-3NQOVO3K.mjs';
|
|
19
23
|
import { withOpenIndex } from './chunk-JDOEEMEF.mjs';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import {
|
|
22
|
-
import './chunk-YBEW6YTR.mjs';
|
|
23
|
-
import { openChecksummedEnvelope, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-C2H2QQFW.mjs';
|
|
24
|
+
import './chunk-7PXRWYUU.mjs';
|
|
25
|
+
import { openChecksummedEnvelope, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-YH7QY657.mjs';
|
|
24
26
|
import './chunk-CHPTFFJM.mjs';
|
|
25
|
-
import './chunk-
|
|
26
|
-
import './chunk-
|
|
27
|
-
import './chunk-
|
|
28
|
-
import './chunk-
|
|
27
|
+
import './chunk-3JIBF3XT.mjs';
|
|
28
|
+
import './chunk-5CQX3XXV.mjs';
|
|
29
|
+
import './chunk-6VBXNFLE.mjs';
|
|
30
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
31
|
+
import './chunk-MJDQU5MW.mjs';
|
|
29
32
|
import './chunk-KWRW5U65.mjs';
|
|
30
33
|
import './chunk-PPEPTUVV.mjs';
|
|
31
34
|
import './chunk-LVIKKAA6.mjs';
|
|
32
35
|
import './chunk-AAAETEJK.mjs';
|
|
33
36
|
import './chunk-JV6VQY2S.mjs';
|
|
34
|
-
import './chunk-
|
|
35
|
-
import { NarsilError, ErrorCodes } from './chunk-CUNGPR5R.mjs';
|
|
37
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
36
38
|
import { decode } from '@msgpack/msgpack';
|
|
37
39
|
|
|
38
40
|
// src/persistence/archive/range-layout.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_RERANK_WINDOW } from './chunk-IO2SMUQD.mjs';
|
|
2
2
|
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-AM7RSBPF.mjs';
|
|
3
3
|
import { MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-AAAETEJK.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
5
5
|
|
|
6
6
|
// src/search/hybrid-depth.ts
|
|
7
7
|
function fixedHybridDepthOf(hybrid) {
|
|
@@ -1,46 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-LZSLNSUN.mjs';
|
|
2
|
+
import { indexMetadataOf, writeCheckpointSegments, writeLiveVectors, commitCheckpointManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-VXGE4ZXL.mjs';
|
|
3
|
+
import './chunk-CKNRFDTZ.mjs';
|
|
4
|
+
import { vectorsPerFile } from './chunk-KTTAU63H.mjs';
|
|
4
5
|
import './chunk-HJBJBH26.mjs';
|
|
5
|
-
import {
|
|
6
|
-
import { requireRestoreMemory, earlierSnapshotFootprint, storedBytesOfSegments, archiveFootprint } from './chunk-YHKZSLOC.mjs';
|
|
6
|
+
import { requireRestoreMemory, earlierSnapshotFootprint, storedBytesOfSegments, archiveFootprint } from './chunk-OL3WDV53.mjs';
|
|
7
7
|
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-PB2YXVQW.mjs';
|
|
8
|
-
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEnd, readSnapshotArchive, tarEntryHeaders, tarPadding, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-3XKMRNRE.mjs';
|
|
9
|
-
import { decodeSegmentManifest } from './chunk-UWDNZDWK.mjs';
|
|
10
8
|
import { createByteReader } from './chunk-NVVRSRX5.mjs';
|
|
9
|
+
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEnd, readSnapshotArchive, tarEntryHeaders, tarPadding, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-4LCEN2IU.mjs';
|
|
10
|
+
import { decodeSegmentManifest } from './chunk-CUH5F57W.mjs';
|
|
11
11
|
import { newSyncEpoch } from './chunk-JWUCMVRK.mjs';
|
|
12
|
-
import {
|
|
12
|
+
import { storedStateOf } from './chunk-QJXTNPLQ.mjs';
|
|
13
|
+
import './chunk-TYIRMPD3.mjs';
|
|
14
|
+
import { oneSyncChangeAtATime } from './chunk-Q32DDFKX.mjs';
|
|
15
|
+
import './chunk-PJHAB5ZY.mjs';
|
|
16
|
+
import { readSegmentFile } from './chunk-C3PTWYKT.mjs';
|
|
17
|
+
import './chunk-GJFXPHXI.mjs';
|
|
13
18
|
import { DEFAULT_COMPACTION_THRESHOLD } from './chunk-F753DA54.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import {
|
|
19
|
+
import './chunk-EIOYM5TO.mjs';
|
|
20
|
+
import { manifestKey, manifestFileRefs } from './chunk-6WA3C3DV.mjs';
|
|
21
|
+
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-DVDX4SDR.mjs';
|
|
22
|
+
import { encodeIndexConfiguration, ARRAY_POSITION_GAP, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, prepareStoredSynonyms, loadVectorCodeFor, decodeEveryStoredDocument, isCompositePartition, arrayPositionsAreStale, insertDocumentVectors } from './chunk-HUOYZJ3Q.mjs';
|
|
17
23
|
import './chunk-IO2SMUQD.mjs';
|
|
18
|
-
import './chunk-
|
|
24
|
+
import './chunk-JLIIWJUV.mjs';
|
|
19
25
|
import './chunk-AM7RSBPF.mjs';
|
|
26
|
+
import './chunk-MVXELMJX.mjs';
|
|
20
27
|
import './chunk-NNE4VDMM.mjs';
|
|
21
28
|
import './chunk-LU3Y3P63.mjs';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import { raiseEarlierReleaseGraphSetting, validateVectorPromotion, validateVectorStorage, validateTextStorage, parseVectorDimension } from './chunk-
|
|
29
|
+
import './chunk-RDWG33MM.mjs';
|
|
30
|
+
import { raiseEarlierReleaseGraphSetting, validateVectorPromotion, validateVectorStorage, validateTextStorage, parseVectorDimension } from './chunk-4Y53T4YE.mjs';
|
|
24
31
|
import './chunk-UNUFZ2QY.mjs';
|
|
25
32
|
import './chunk-3NQOVO3K.mjs';
|
|
26
33
|
import { emitSyncChange } from './chunk-JDOEEMEF.mjs';
|
|
27
|
-
import './chunk-
|
|
28
|
-
import {
|
|
29
|
-
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-YBEW6YTR.mjs';
|
|
30
|
-
import { hasNrslMagic, HEADER_SIZE, readHeader, decodeIndexConfiguration } from './chunk-C2H2QQFW.mjs';
|
|
34
|
+
import './chunk-7PXRWYUU.mjs';
|
|
35
|
+
import { hasNrslMagic, HEADER_SIZE, readHeader, decodeIndexConfiguration } from './chunk-YH7QY657.mjs';
|
|
31
36
|
import './chunk-CHPTFFJM.mjs';
|
|
32
|
-
import { validateSchema, flattenSchema } from './chunk-
|
|
33
|
-
import
|
|
34
|
-
import './chunk-
|
|
35
|
-
import
|
|
37
|
+
import { validateSchema, flattenSchema } from './chunk-3JIBF3XT.mjs';
|
|
38
|
+
import './chunk-5CQX3XXV.mjs';
|
|
39
|
+
import { MAX_FILE_BYTES } from './chunk-6VBXNFLE.mjs';
|
|
40
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
41
|
+
import { getLanguage, resolveIndexAnalysis } from './chunk-MJDQU5MW.mjs';
|
|
36
42
|
import './chunk-KWRW5U65.mjs';
|
|
37
43
|
import './chunk-PPEPTUVV.mjs';
|
|
38
44
|
import './chunk-LVIKKAA6.mjs';
|
|
39
45
|
import './chunk-AAAETEJK.mjs';
|
|
40
46
|
import './chunk-JV6VQY2S.mjs';
|
|
41
|
-
import './chunk-
|
|
42
|
-
import './chunk-IOY2SM2P.mjs';
|
|
43
|
-
import { NarsilError, ErrorCodes } from './chunk-CUNGPR5R.mjs';
|
|
47
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
44
48
|
import { decode } from '@msgpack/msgpack';
|
|
45
49
|
|
|
46
50
|
// src/persistence/archive/memory-store.ts
|
|
@@ -216,6 +220,9 @@ async function* archiveChunks(source) {
|
|
|
216
220
|
for (const ref of manifestFileRefs(source.manifest)) {
|
|
217
221
|
yield* fileEntryChunks(source, ref.key.slice(prefix.length), ref);
|
|
218
222
|
}
|
|
223
|
+
if (source.trailingEntries !== void 0) {
|
|
224
|
+
for await (const entry of source.trailingEntries()) yield* entryChunks(entry.name, entry.bytes);
|
|
225
|
+
}
|
|
219
226
|
yield tarEnd();
|
|
220
227
|
}
|
|
221
228
|
function archiveStream(source) {
|
|
@@ -294,7 +301,7 @@ async function validateStagedCheckpoint(store, manifest) {
|
|
|
294
301
|
for (const ref of partition.segments) {
|
|
295
302
|
const { directory } = store;
|
|
296
303
|
if (directory !== void 0) {
|
|
297
|
-
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-
|
|
304
|
+
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-ZL5ZG6YB.mjs');
|
|
298
305
|
if (await isPagedSegmentFile(directory, ref.key)) {
|
|
299
306
|
requireSchemaOfManifest(ref.key, await checkPagedSegmentFully(directory, ref), manifest);
|
|
300
307
|
continue;
|
|
@@ -391,7 +398,8 @@ function prepareRestoredIndex(configuration, deps, reject) {
|
|
|
391
398
|
storedRevision,
|
|
392
399
|
analysisGeneration,
|
|
393
400
|
storedArrayPositionGap: storedArrayPositionGap(configuration.arrayPositionGap),
|
|
394
|
-
synonyms
|
|
401
|
+
synonyms,
|
|
402
|
+
querySuggestions: storedStateOf(configuration)
|
|
395
403
|
};
|
|
396
404
|
}
|
|
397
405
|
function restoredSynonyms(raw, config, language, reject) {
|
|
@@ -428,7 +436,8 @@ function restoredRegistryEntry(prepared, manager, deps) {
|
|
|
428
436
|
analysisGeneration: prepared.analysisGeneration,
|
|
429
437
|
pendingAnalysis: null,
|
|
430
438
|
durableAnalysis: null,
|
|
431
|
-
sync: null
|
|
439
|
+
sync: null,
|
|
440
|
+
querySuggestions: prepared.querySuggestions
|
|
432
441
|
};
|
|
433
442
|
}
|
|
434
443
|
|
|
@@ -541,6 +550,7 @@ async function replaceExisting(indexName, restored, entry, deps) {
|
|
|
541
550
|
for (const vectorIndex of vectorIndexes) await vectorIndex.releaseVectorFiles();
|
|
542
551
|
await commitToStorage(indexName, restored, previous?.partitionCount ?? 0, deps);
|
|
543
552
|
activate(indexName, restored, entry, deps);
|
|
553
|
+
await deps.querySuggestions?.afterActivate(entry);
|
|
544
554
|
});
|
|
545
555
|
} finally {
|
|
546
556
|
const ending = endRelease(indexName, release, deps).catch(() => void 0);
|
|
@@ -555,6 +565,7 @@ async function createFresh(indexName, restored, entry, deps) {
|
|
|
555
565
|
await deps.indexState.registerReplacing(indexName, async () => {
|
|
556
566
|
await commitToStorage(indexName, restored, 0, deps);
|
|
557
567
|
activate(indexName, restored, entry, deps);
|
|
568
|
+
await deps.querySuggestions?.afterActivate(entry);
|
|
558
569
|
});
|
|
559
570
|
} catch (error) {
|
|
560
571
|
if (deps.indexRegistry.get(indexName) === entry) deps.indexRegistry.delete(indexName);
|
|
@@ -567,12 +578,14 @@ async function stageMetadata(indexName, staging, entry) {
|
|
|
567
578
|
const metadata = indexMetadataOf(indexName, entry, entry.partitionCount);
|
|
568
579
|
await staging.store.write(`${indexName}/meta`, [await writeMetadataEnvelope(metadata, { checksum: true })]);
|
|
569
580
|
}
|
|
570
|
-
async function installRestoredIndex(indexName, restored, deps) {
|
|
581
|
+
async function installRestoredIndex(indexName, restored, deps, history = null) {
|
|
571
582
|
const entry = restoredRegistryEntry(restored.prepared, restored.detached.manager, deps);
|
|
572
583
|
const previousSync = deps.indexRegistry.get(indexName)?.sync ?? null;
|
|
573
584
|
if (previousSync !== null) entry.sync = { ...previousSync, active: false, epoch: newSyncEpoch() };
|
|
574
585
|
let replaced;
|
|
575
586
|
try {
|
|
587
|
+
if (deps.indexRegistry.has(indexName)) await deps.abandonAnalysisChange(indexName);
|
|
588
|
+
await deps.querySuggestions?.beforeInstall(entry, deps.indexRegistry.get(indexName));
|
|
576
589
|
if (restored.staging !== null) await stageMetadata(indexName, restored.staging, entry);
|
|
577
590
|
replaced = deps.indexRegistry.get(indexName);
|
|
578
591
|
if (replaced !== void 0) await replaceExisting(indexName, restored, entry, deps);
|
|
@@ -594,6 +607,7 @@ async function installRestoredIndex(indexName, restored, deps) {
|
|
|
594
607
|
await oneSyncChangeAtATime(deps.indexRegistry, indexName, () => storage.release(indexName));
|
|
595
608
|
emitSyncChange(deps.indexRegistry, { kind: "epoch", indexName });
|
|
596
609
|
}
|
|
610
|
+
await deps.querySuggestions?.afterInstall(entry, history);
|
|
597
611
|
if (replaced !== void 0) await deps.announceIndexDropped(indexName, replaced.config);
|
|
598
612
|
await deps.announceIndexCreated(indexName, restored.prepared.config);
|
|
599
613
|
for (const vectorIndex of restored.detached.manager.getVectorIndexes().values()) {
|
|
@@ -644,9 +658,14 @@ function missingPart(what) {
|
|
|
644
658
|
function keepsTextOnDisk(prepared, staging) {
|
|
645
659
|
return prepared.config.textStorage === "disk" && staging.directory !== void 0;
|
|
646
660
|
}
|
|
647
|
-
async function stageArchive(indexName, reader, staging, deps) {
|
|
648
|
-
const staged = { prepared: null, manifest: null };
|
|
661
|
+
async function stageArchive(indexName, reader, staging, deps, staged) {
|
|
649
662
|
await readSnapshotArchive(reader, {
|
|
663
|
+
history: async (chunks) => {
|
|
664
|
+
if (staged.history === void 0) {
|
|
665
|
+
staged.history = await deps.querySuggestions?.historySink(staged.prepared?.querySuggestions ?? null) ?? null;
|
|
666
|
+
}
|
|
667
|
+
await staged.history?.add(chunks);
|
|
668
|
+
},
|
|
650
669
|
config: async (bytes) => {
|
|
651
670
|
staged.prepared = prepareRestoredIndex(await decodeIndexConfiguration(bytes), deps, rejectConfiguration);
|
|
652
671
|
},
|
|
@@ -672,7 +691,7 @@ async function stageArchive(indexName, reader, staging, deps) {
|
|
|
672
691
|
if (manifest === null) missingPart("manifest");
|
|
673
692
|
const { directory } = staging;
|
|
674
693
|
if (keepsTextOnDisk(prepared, staging) && directory !== void 0) {
|
|
675
|
-
const { bytesThatSegmentsHoldInMemory } = await import('./module-
|
|
694
|
+
const { bytesThatSegmentsHoldInMemory } = await import('./module-ZL5ZG6YB.mjs');
|
|
676
695
|
const replacesIndex = deps.indexRegistry.has(indexName);
|
|
677
696
|
const segmentBytes = await bytesThatSegmentsHoldInMemory(directory, manifest);
|
|
678
697
|
requireRestoreMemory(indexName, archiveFootprint(prepared, manifest, replacesIndex, segmentBytes), replacesIndex);
|
|
@@ -701,9 +720,14 @@ async function loadStagedIndex(indexName, staged, staging, store, deps) {
|
|
|
701
720
|
async function restoreArchive(indexName, reader, deps) {
|
|
702
721
|
const staging = deps.durability?.manager.stageRestore?.(indexName) ?? null;
|
|
703
722
|
const store = staging?.store ?? memoryCheckpointStore();
|
|
723
|
+
const archive = { prepared: null, manifest: null, history: void 0 };
|
|
704
724
|
try {
|
|
705
|
-
const staged = await stageArchive(indexName, reader, store, deps);
|
|
706
|
-
|
|
725
|
+
const staged = await stageArchive(indexName, reader, store, deps, archive);
|
|
726
|
+
const restored = await loadStagedIndex(indexName, staged, staging, store, deps);
|
|
727
|
+
await installRestoredIndex(indexName, restored, deps, archive.history ?? null);
|
|
728
|
+
} catch (error) {
|
|
729
|
+
await archive.history?.abandon().catch(() => void 0);
|
|
730
|
+
throw error;
|
|
707
731
|
} finally {
|
|
708
732
|
await staging?.discard().catch(() => void 0);
|
|
709
733
|
await reader.close();
|
|
@@ -858,13 +882,23 @@ async function checkpointForArchive(deps) {
|
|
|
858
882
|
partitionId: null
|
|
859
883
|
});
|
|
860
884
|
}
|
|
861
|
-
async function
|
|
885
|
+
async function* queryHistoryEntries(core, indexName) {
|
|
886
|
+
const { historyArchiveEntries } = await import('./archive-history-MJKUQLSU.mjs');
|
|
887
|
+
yield* historyArchiveEntries(core, indexName);
|
|
888
|
+
}
|
|
889
|
+
async function createSnapshot(deps, coreWithAddedHistory) {
|
|
890
|
+
const trailingEntries = coreWithAddedHistory === null ? void 0 : () => queryHistoryEntries(coreWithAddedHistory, deps.indexName);
|
|
862
891
|
for (let attempt = 0; attempt < MAX_SNAPSHOT_ANALYSIS_ATTEMPTS; attempt += 1) {
|
|
863
892
|
const checkpoint = await checkpointForArchive(deps);
|
|
864
893
|
try {
|
|
865
894
|
if ((checkpoint.manifest.analysisGeneration ?? 0) === deps.entry.analysisGeneration) {
|
|
866
895
|
const config = await encodeIndexConfiguration(deps.entry);
|
|
867
|
-
return archiveStream({
|
|
896
|
+
return archiveStream({
|
|
897
|
+
...checkpoint,
|
|
898
|
+
config,
|
|
899
|
+
sourceIndexName: deps.indexName,
|
|
900
|
+
...trailingEntries !== void 0 ? { trailingEntries } : {}
|
|
901
|
+
});
|
|
868
902
|
}
|
|
869
903
|
} catch (error) {
|
|
870
904
|
checkpoint.release();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export { localRuntimeOf } from './chunk-KJIG57UD.mjs';
|
|
2
|
+
import './chunk-GIZTJXYW.mjs';
|
|
3
|
+
import './chunk-ZZT7CEN7.mjs';
|
|
4
|
+
import './chunk-H3MDVPBO.mjs';
|
|
5
|
+
import './chunk-TYIRMPD3.mjs';
|
|
6
|
+
import './chunk-7GRCBBME.mjs';
|
|
7
|
+
import './chunk-DIYDOIM4.mjs';
|
|
8
|
+
import './chunk-PSWKQVVT.mjs';
|
|
9
|
+
import './chunk-Q32DDFKX.mjs';
|
|
10
|
+
import './chunk-PJHAB5ZY.mjs';
|
|
11
|
+
import './chunk-HUOYZJ3Q.mjs';
|
|
12
|
+
import './chunk-IO2SMUQD.mjs';
|
|
13
|
+
import './chunk-JLIIWJUV.mjs';
|
|
14
|
+
import './chunk-AM7RSBPF.mjs';
|
|
15
|
+
import './chunk-MVXELMJX.mjs';
|
|
16
|
+
import './chunk-NNE4VDMM.mjs';
|
|
17
|
+
import './chunk-LU3Y3P63.mjs';
|
|
18
|
+
import './chunk-RDWG33MM.mjs';
|
|
19
|
+
import './chunk-4Y53T4YE.mjs';
|
|
20
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
21
|
+
import './chunk-3NQOVO3K.mjs';
|
|
22
|
+
import './chunk-JDOEEMEF.mjs';
|
|
23
|
+
import './chunk-7PXRWYUU.mjs';
|
|
24
|
+
import './chunk-YH7QY657.mjs';
|
|
25
|
+
import './chunk-CHPTFFJM.mjs';
|
|
26
|
+
import './chunk-3JIBF3XT.mjs';
|
|
27
|
+
import './chunk-5CQX3XXV.mjs';
|
|
28
|
+
import './chunk-6VBXNFLE.mjs';
|
|
29
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
30
|
+
import './chunk-MJDQU5MW.mjs';
|
|
31
|
+
import './chunk-KWRW5U65.mjs';
|
|
32
|
+
import './chunk-PPEPTUVV.mjs';
|
|
33
|
+
import './chunk-LVIKKAA6.mjs';
|
|
34
|
+
import './chunk-AAAETEJK.mjs';
|
|
35
|
+
import './chunk-JV6VQY2S.mjs';
|
|
36
|
+
import './chunk-DZ7H7D2C.mjs';
|