@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
package/README.md
CHANGED
|
@@ -132,6 +132,7 @@ Every hit holds the document, its id, and its BM25 score. Beside the hits, `resu
|
|
|
132
132
|
| [Cluster mode](https://github.com/assetcorp/narsil/blob/main/docs/cluster.md) | Multi-node indexes: nodes and roles, replication, routed writes, distributed searches and reads, and the calls that fail in a cluster |
|
|
133
133
|
| [Client](https://github.com/assetcorp/narsil/blob/main/docs/client.md) | Reaching a server from a browser or Node, following a task, and the codes it raises |
|
|
134
134
|
| [Device sync](https://github.com/assetcorp/narsil/blob/main/docs/device-sync.md) | A copy of one index on a device that searches and writes offline, the sync routes, conflicts, and the snapshot |
|
|
135
|
+
| [Popular query suggestions](https://github.com/assetcorp/narsil/blob/main/docs/query-suggestions.md) | Whole searches that people ran and clicked, counted per person, built into a suggestions index, and the privacy trade-offs |
|
|
135
136
|
| [React](https://github.com/assetcorp/narsil/blob/main/docs/react.md) | The hooks over a client or an engine in the page, one shared request per key, and loading a corpus from a component |
|
|
136
137
|
| [Observability](https://github.com/assetcorp/narsil/blob/main/docs/observability.md) | Plugin hooks, engine events, and memory reporting |
|
|
137
138
|
| [Errors](https://github.com/assetcorp/narsil/blob/main/docs/errors.md) | The codes you handle most often, and the three sets that `NarsilError.code` covers |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { requireStreamLength, countedChunks } from '../chunk-
|
|
1
|
+
import { requireStreamLength, countedChunks } from '../chunk-3C7MTCCI.mjs';
|
|
2
2
|
import '../chunk-U476IXKQ.mjs';
|
|
3
3
|
import { OBJECT_STORE_PART_BYTES } from '../chunk-K5HSUPYS.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from '../chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from '../chunk-MP7ABPTD.mjs';
|
|
5
5
|
|
|
6
6
|
// src/persistence/filesystem.ts
|
|
7
7
|
function unfinishedSaveName(basename) {
|
package/dist/adapters/gcs.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { requireBucket, objectKeyPrefix, objectStoreFailure, requireObjectKey, requireStreamLength, countedChunks, readWhole, refuseOversizedObject, joinChunks } from '../chunk-
|
|
1
|
+
import { requireBucket, objectKeyPrefix, objectStoreFailure, requireObjectKey, requireStreamLength, countedChunks, readWhole, refuseOversizedObject, joinChunks } from '../chunk-3C7MTCCI.mjs';
|
|
2
2
|
import { MAX_FILE_BYTES } from '../chunk-U476IXKQ.mjs';
|
|
3
3
|
import { OBJECT_STORE_LIST_PAGE_KEYS, OBJECT_STORE_PART_BYTES } from '../chunk-K5HSUPYS.mjs';
|
|
4
|
-
import { ErrorCodes, NarsilError } from '../chunk-
|
|
4
|
+
import { ErrorCodes, NarsilError } from '../chunk-MP7ABPTD.mjs';
|
|
5
5
|
import { Readable } from 'stream';
|
|
6
6
|
import { pipeline } from 'stream/promises';
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_INDEXEDDB_NAME, DEFAULT_INDEXEDDB_STORE_NAME, INDEXEDDB_BLOCKED_TIMEOUT_MS, MAX_PERSISTENCE_KEY_LENGTH } from '../chunk-K5HSUPYS.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from '../chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from '../chunk-MP7ABPTD.mjs';
|
|
3
3
|
|
|
4
4
|
// src/persistence/indexeddb.ts
|
|
5
5
|
function validateKey(key) {
|
package/dist/adapters/s3.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { requireBucket, objectKeyPrefix, objectStoreFailure, requireObjectKey, refuseOversizedObject, requireStreamLength, countedChunks, readWhole, partsOf } from '../chunk-
|
|
1
|
+
import { requireBucket, objectKeyPrefix, objectStoreFailure, requireObjectKey, refuseOversizedObject, requireStreamLength, countedChunks, readWhole, partsOf } from '../chunk-3C7MTCCI.mjs';
|
|
2
2
|
import '../chunk-U476IXKQ.mjs';
|
|
3
3
|
import { OBJECT_STORE_LIST_PAGE_KEYS, OBJECT_STORE_CONFLICT_ATTEMPTS, OBJECT_STORE_CONFLICT_RETRY_MS, OBJECT_STORE_PART_BYTES } from '../chunk-K5HSUPYS.mjs';
|
|
4
|
-
import { ErrorCodes, NarsilError } from '../chunk-
|
|
4
|
+
import { ErrorCodes, NarsilError } from '../chunk-MP7ABPTD.mjs';
|
|
5
5
|
|
|
6
6
|
// src/persistence/s3.ts
|
|
7
7
|
var S3_NOT_FOUND_STATUS = 404;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
export { abandonAnalysisChange, adoptSavedAnalysis, buildHeldAnalysisChange, changeIndexAnalysis, dropHeldAnalysisChange, executeRebalance, heldAnalysisIsBuilt, holdsNamedSettings, releaseHeldAnalysisChange, resumeAnalysisChange, stampAnalysisGeneration } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { abandonAnalysisChange, adoptSavedAnalysis, buildHeldAnalysisChange, changeIndexAnalysis, dropHeldAnalysisChange, executeRebalance, heldAnalysisIsBuilt, holdsNamedSettings, releaseHeldAnalysisChange, resumeAnalysisChange, stampAnalysisGeneration } from './chunk-HW5TNXBO.mjs';
|
|
2
|
+
import './chunk-KPIV4RUC.mjs';
|
|
3
3
|
import './chunk-ZYAY26KG.mjs';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import './chunk-KMUNHGBQ.mjs';
|
|
5
|
+
import './chunk-L7ZD4L3K.mjs';
|
|
6
6
|
import './chunk-HJSN7UYG.mjs';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-LHKOSI2J.mjs';
|
|
8
8
|
import './chunk-XIHUI4KB.mjs';
|
|
9
9
|
import './chunk-3MXV3VHR.mjs';
|
|
10
10
|
import './chunk-EEBCDP36.mjs';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
11
|
+
import './chunk-Z2BE2MAM.mjs';
|
|
12
|
+
import './chunk-ZAUJFLEN.mjs';
|
|
13
|
+
import './chunk-GH4WQ22V.mjs';
|
|
14
|
+
import './chunk-3OH67G7R.mjs';
|
|
15
15
|
import './chunk-IPN7S4KX.mjs';
|
|
16
16
|
import './chunk-KAKQ74LS.mjs';
|
|
17
17
|
import './chunk-7GXJUJ24.mjs';
|
|
18
18
|
import './chunk-Q2UL2TPC.mjs';
|
|
19
|
-
import './chunk-
|
|
19
|
+
import './chunk-LC3FDWTX.mjs';
|
|
20
|
+
import './chunk-JUKYYXSP.mjs';
|
|
21
|
+
import './chunk-4KRC2APY.mjs';
|
|
22
|
+
import './chunk-FQBFZAWG.mjs';
|
|
23
|
+
import './chunk-WQRN64Q6.mjs';
|
|
24
|
+
import './chunk-GES7U2PM.mjs';
|
|
25
|
+
import './chunk-I54T6CQP.mjs';
|
|
26
|
+
import './chunk-YEDIDCR7.mjs';
|
|
20
27
|
import './chunk-X5CV2E2B.mjs';
|
|
21
28
|
import './chunk-Y4WPNHMC.mjs';
|
|
22
|
-
import './chunk-
|
|
29
|
+
import './chunk-RZWWB2XR.mjs';
|
|
23
30
|
import './chunk-TGP5M5R7.mjs';
|
|
31
|
+
import './chunk-4BYWRYPM.mjs';
|
|
32
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
24
33
|
import './chunk-U2BKYEC7.mjs';
|
|
25
34
|
import './chunk-QHPYS427.mjs';
|
|
26
35
|
import './chunk-QYRNLLLI.mjs';
|
|
27
|
-
import './chunk-
|
|
36
|
+
import './chunk-HNVVEQP7.mjs';
|
|
28
37
|
import './chunk-ZXNQEW43.mjs';
|
|
38
|
+
import './chunk-L5ORED7V.mjs';
|
|
29
39
|
import './chunk-KOKM4PQN.mjs';
|
|
30
|
-
import './chunk-
|
|
40
|
+
import './chunk-Q7G3BV3Y.mjs';
|
|
31
41
|
import './chunk-BTPGQC6Z.mjs';
|
|
32
42
|
import './chunk-LQG5G2LY.mjs';
|
|
33
|
-
import './chunk-RFBLQLLZ.mjs';
|
|
34
|
-
import './chunk-OKX2BBNW.mjs';
|
|
35
|
-
import './chunk-JUKYYXSP.mjs';
|
|
36
|
-
import './chunk-VMXSVVXG.mjs';
|
|
37
|
-
import './chunk-Z3TNWCI5.mjs';
|
|
38
|
-
import './chunk-FQBFZAWG.mjs';
|
|
39
|
-
import './chunk-ZIFJXCKA.mjs';
|
|
40
|
-
import './chunk-4UMZ7KQL.mjs';
|
|
41
43
|
import './chunk-ZXX5GZEX.mjs';
|
|
42
|
-
import './chunk-
|
|
43
|
-
import './chunk-3A5KI24C.mjs';
|
|
44
|
-
import './chunk-L5ORED7V.mjs';
|
|
44
|
+
import './chunk-RFBLQLLZ.mjs';
|
|
45
45
|
import './chunk-U476IXKQ.mjs';
|
|
46
|
-
import './chunk-
|
|
46
|
+
import './chunk-MP7ABPTD.mjs';
|
|
47
47
|
import './chunk-R6A773WK.mjs';
|
|
48
48
|
import './chunk-YTJCGKM4.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-
|
|
1
|
+
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-DIBHI6W5.mjs';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { attachedRuntimeOf } from './chunk-S5LN746F.mjs';
|
|
2
|
+
import { historyFilesOf, listHistoryFolder, historyFileOf } from './chunk-KP7TYHWT.mjs';
|
|
3
|
+
import { QUERY_HISTORY_ARCHIVE_PREFIX } from './chunk-5YNRKI2C.mjs';
|
|
4
|
+
|
|
5
|
+
// src/query-suggestions/archive-history.ts
|
|
6
|
+
function inDayOrder(left, right) {
|
|
7
|
+
if (left.day !== right.day) return left.day < right.day ? -1 : 1;
|
|
8
|
+
return left.key < right.key ? -1 : left.key > right.key ? 1 : 0;
|
|
9
|
+
}
|
|
10
|
+
async function* historyArchiveEntries(core, indexName) {
|
|
11
|
+
const runtime = attachedRuntimeOf(core);
|
|
12
|
+
const files = runtime?.host.files ?? historyFilesOf(core.durability?.manager.historyStorage?.() ?? null);
|
|
13
|
+
await runtime?.saveDay(indexName);
|
|
14
|
+
const names = [];
|
|
15
|
+
for (const key of await listHistoryFolder(files, indexName)) {
|
|
16
|
+
const name = historyFileOf(indexName, key);
|
|
17
|
+
if (name !== null) names.push(name);
|
|
18
|
+
}
|
|
19
|
+
names.sort(inDayOrder);
|
|
20
|
+
let position = 0;
|
|
21
|
+
for (const name of names) {
|
|
22
|
+
const bytes = await files.read(name.key);
|
|
23
|
+
if (bytes === null || bytes === "too-long") continue;
|
|
24
|
+
yield { name: `${QUERY_HISTORY_ARCHIVE_PREFIX}${position}`, bytes };
|
|
25
|
+
position += 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { historyArchiveEntries };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { requireAnalysisRebuildMemory } from './chunk-
|
|
1
|
+
import { requireAnalysisRebuildMemory } from './chunk-FNIFPFB7.mjs';
|
|
2
2
|
import './chunk-ELV4OZOI.mjs';
|
|
3
|
-
import { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, rewriteSpillOf, emitEngineEvent, reconstructSchemaFromMetadata, prepareStoredSynonyms, rulesOfStoredSynonyms, resolvePartialWordAnalysis, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createPartitionIndex, REBALANCE_CHUNK_SIZE, yieldToEventLoop, prepareDocumentVectors, removeDocumentVectors, insertDocumentVectors, vectorsEqual, rebuildTextIndexes, holdSyncEpochChange, textRebuildTargetOf, extractVectorFromDoc, deleteNestedValue, ARRAY_POSITION_GAP } from './chunk-
|
|
3
|
+
import { DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, rewriteSpillOf, emitEngineEvent, reconstructSchemaFromMetadata, prepareStoredSynonyms, rulesOfStoredSynonyms, resolvePartialWordAnalysis, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createPartitionIndex, REBALANCE_CHUNK_SIZE, yieldToEventLoop, prepareDocumentVectors, removeDocumentVectors, insertDocumentVectors, vectorsEqual, rebuildTextIndexes, holdSyncEpochChange, textRebuildTargetOf, extractVectorFromDoc, deleteNestedValue, ARRAY_POSITION_GAP } from './chunk-SMEQ36NT.mjs';
|
|
4
|
+
import './chunk-ML7THVLJ.mjs';
|
|
4
5
|
import './chunk-VI7BQR4U.mjs';
|
|
5
6
|
import './chunk-JPTQZWJQ.mjs';
|
|
6
|
-
import { getLanguage, resolveIndexAnalysis } from './chunk-
|
|
7
|
+
import { getLanguage, resolveIndexAnalysis } from './chunk-JIJXMI42.mjs';
|
|
7
8
|
import './chunk-RA6LSBCM.mjs';
|
|
8
9
|
import './chunk-26A5JFT2.mjs';
|
|
9
10
|
import './chunk-OIZS5KIX.mjs';
|
|
10
|
-
import './chunk-
|
|
11
|
+
import './chunk-4WCVMOU3.mjs';
|
|
11
12
|
import './chunk-TY7L6OXO.mjs';
|
|
12
13
|
import { ANALYSIS_CHANGE_MEMBERS, ANALYSIS_HOLD_APPLY_INTERVAL_MS } from './chunk-4RD3AFSB.mjs';
|
|
13
|
-
import { compareCodePoints } from './chunk-
|
|
14
|
+
import { compareCodePoints } from './chunk-LFIWRCEA.mjs';
|
|
15
|
+
import './chunk-GPPOG6PT.mjs';
|
|
14
16
|
import './chunk-WXLBZJMT.mjs';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import { NarsilError, ErrorCodes } from './chunk-MYITLCHT.mjs';
|
|
17
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
17
18
|
|
|
18
19
|
// src/engine/analysis-change/pending-target.ts
|
|
19
20
|
function configUnderAnalysis(base, language, tokenizer, stopWords) {
|
|
@@ -676,7 +677,8 @@ async function buildAndSwitch(scope) {
|
|
|
676
677
|
};
|
|
677
678
|
let partitionsRebuilt = 0;
|
|
678
679
|
let adopt = () => void 0;
|
|
679
|
-
const
|
|
680
|
+
const refusal = { byRestore: null };
|
|
681
|
+
const isCurrent = () => run.stopReason === null && refusal.byRestore === null && !core.shutdownState.isShutdown && core.indexRegistry.get(indexName) === entry && core.executor.getManager(indexName) === manager;
|
|
680
682
|
emit("started", 0);
|
|
681
683
|
const wasPromoted = core.orchestrator.desyncIndex(indexName);
|
|
682
684
|
try {
|
|
@@ -698,6 +700,10 @@ async function buildAndSwitch(scope) {
|
|
|
698
700
|
async runSwitch(swap) {
|
|
699
701
|
const swapWithSynonyms = () => {
|
|
700
702
|
if (!isCurrent()) return false;
|
|
703
|
+
if (core.restoresInFlight.has(indexName)) {
|
|
704
|
+
refusal.byRestore = restoreInFlightError(indexName);
|
|
705
|
+
return false;
|
|
706
|
+
}
|
|
701
707
|
adopt = switchIndex(scope);
|
|
702
708
|
return swap();
|
|
703
709
|
};
|
|
@@ -711,7 +717,7 @@ async function buildAndSwitch(scope) {
|
|
|
711
717
|
},
|
|
712
718
|
textRebuildTargetOf(run.target.config, run.target.language, run.target.analysis)
|
|
713
719
|
);
|
|
714
|
-
if (!rebuilt) throw run.stopReason ?? stoppedError(core, indexName);
|
|
720
|
+
if (!rebuilt) throw run.stopReason ?? refusal.byRestore ?? stoppedError(core, indexName);
|
|
715
721
|
await spill?.removeUnread(manager);
|
|
716
722
|
if (entry.durableAnalysis !== null) {
|
|
717
723
|
throw new NarsilError(
|
|
@@ -742,6 +748,16 @@ async function clearPending(core, indexName, entry) {
|
|
|
742
748
|
entry.pendingAnalysis = null;
|
|
743
749
|
await core.durability?.manager.persistMetadata(indexName);
|
|
744
750
|
}
|
|
751
|
+
function restoreInFlightError(indexName) {
|
|
752
|
+
return new NarsilError(
|
|
753
|
+
ErrorCodes.ANALYSIS_CHANGE_REPLACED,
|
|
754
|
+
`A restore of index "${indexName}" is in flight and replaces this analysis change, so try the change again once the restore ends`,
|
|
755
|
+
{ indexName }
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
function requireNoRestoreInFlight(core, indexName) {
|
|
759
|
+
if (core.restoresInFlight.has(indexName)) throw restoreInFlightError(indexName);
|
|
760
|
+
}
|
|
745
761
|
function requireNotRebalancing(core, indexName) {
|
|
746
762
|
if (!core.rebalancingIndexes.has(indexName)) return;
|
|
747
763
|
throw new NarsilError(
|
|
@@ -759,6 +775,7 @@ async function driveRun(core, indexName, entry, run, previous, resumedGeneration
|
|
|
759
775
|
if (run.stopReason !== null) return;
|
|
760
776
|
if (core.indexRegistry.get(indexName) !== entry) throw stoppedError(core, indexName);
|
|
761
777
|
requireNotRebalancing(core, indexName);
|
|
778
|
+
requireNoRestoreInFlight(core, indexName);
|
|
762
779
|
if (resumedGeneration === null && holdsSettings(entry.config, run.target)) {
|
|
763
780
|
if (entry.pendingAnalysis !== null) await clearPending(core, indexName, entry);
|
|
764
781
|
run.finish();
|
|
@@ -779,7 +796,8 @@ async function driveRun(core, indexName, entry, run, previous, resumedGeneration
|
|
|
779
796
|
run.finish();
|
|
780
797
|
} catch (error) {
|
|
781
798
|
run.fail(error);
|
|
782
|
-
const
|
|
799
|
+
const refusedByRestore = run.stopReason === null && error instanceof NarsilError && error.code === ErrorCodes.ANALYSIS_CHANGE_REPLACED;
|
|
800
|
+
const keepsPending = !refusedByRestore && (resumedGeneration !== null || core.shutdownState.isShutdown);
|
|
783
801
|
const stillOwnsPending = runs.get(indexName) === run && run.stopReason === null;
|
|
784
802
|
if (!keepsPending && stillOwnsPending && core.indexRegistry.get(indexName) === entry) {
|
|
785
803
|
if (entry.pendingAnalysis !== null) await clearPending(core, indexName, entry).catch(() => void 0);
|
|
@@ -792,6 +810,7 @@ async function driveRun(core, indexName, entry, run, previous, resumedGeneration
|
|
|
792
810
|
async function changeIndexAnalysis(core, indexName, change) {
|
|
793
811
|
const entry = core.requireIndex(indexName);
|
|
794
812
|
requireNotRebalancing(core, indexName);
|
|
813
|
+
requireNoRestoreInFlight(core, indexName);
|
|
795
814
|
const target = resolveAnalysisTarget(indexName, entry.config, change);
|
|
796
815
|
const runs = runsOf(core);
|
|
797
816
|
const previous = runs.get(indexName);
|
package/dist/{analysis-change-entry-KYGSXW4K.mjs → browser/analysis-change-entry-4MH3CZXH.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-
|
|
1
|
+
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-RQBUNZQW.mjs';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { historyFilesOf, listHistoryFolder, historyFileOf } from './chunk-OEDCEZXJ.mjs';
|
|
2
|
+
import { attachedRuntimeOf } from './chunk-ATEBYXP6.mjs';
|
|
3
|
+
import { QUERY_HISTORY_ARCHIVE_PREFIX } from './chunk-7IGKGWSQ.mjs';
|
|
4
|
+
|
|
5
|
+
// src/query-suggestions/archive-history.ts
|
|
6
|
+
function inDayOrder(left, right) {
|
|
7
|
+
if (left.day !== right.day) return left.day < right.day ? -1 : 1;
|
|
8
|
+
return left.key < right.key ? -1 : left.key > right.key ? 1 : 0;
|
|
9
|
+
}
|
|
10
|
+
async function* historyArchiveEntries(core, indexName) {
|
|
11
|
+
const runtime = attachedRuntimeOf(core);
|
|
12
|
+
const files = runtime?.host.files ?? historyFilesOf(core.durability?.manager.historyStorage?.() ?? null);
|
|
13
|
+
await runtime?.saveDay(indexName);
|
|
14
|
+
const names = [];
|
|
15
|
+
for (const key of await listHistoryFolder(files, indexName)) {
|
|
16
|
+
const name = historyFileOf(indexName, key);
|
|
17
|
+
if (name !== null) names.push(name);
|
|
18
|
+
}
|
|
19
|
+
names.sort(inDayOrder);
|
|
20
|
+
let position = 0;
|
|
21
|
+
for (const name of names) {
|
|
22
|
+
const bytes = await files.read(name.key);
|
|
23
|
+
if (bytes === null || bytes === "too-long") continue;
|
|
24
|
+
yield { name: `${QUERY_HISTORY_ARCHIVE_PREFIX}${position}`, bytes };
|
|
25
|
+
position += 1;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { historyArchiveEntries };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { attachedRuntimeOf } from './chunk-ATEBYXP6.mjs';
|
|
2
|
+
import { emitWriteEventAfter, dropEngineIndex } from './chunk-SMEQ36NT.mjs';
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
4
|
+
|
|
5
|
+
// src/query-suggestions/engine-hooks.ts
|
|
6
|
+
function suggestionIndexesOf(core, sourceName) {
|
|
7
|
+
const names = [];
|
|
8
|
+
for (const [name, entry] of core.indexRegistry) {
|
|
9
|
+
if (name !== sourceName && entry.querySuggestions?.querySuggestionsSource?.index === sourceName) names.push(name);
|
|
10
|
+
}
|
|
11
|
+
return names;
|
|
12
|
+
}
|
|
13
|
+
async function dropSuggestionIndexesOf(core, sourceName) {
|
|
14
|
+
if (core.mutationCtx.capacityScope === "partition") return;
|
|
15
|
+
for (const name of suggestionIndexesOf(core, sourceName)) {
|
|
16
|
+
if (!core.indexRegistry.has(name)) continue;
|
|
17
|
+
await emitWriteEventAfter(core, name, dropEngineIndex(core, name));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
async function clearLeftoversOfName(core, name) {
|
|
21
|
+
if (core.mutationCtx.capacityScope === "partition") return;
|
|
22
|
+
await dropSuggestionIndexesOf(core, name);
|
|
23
|
+
await core.durability?.manager.removeQueryHistory?.(name);
|
|
24
|
+
}
|
|
25
|
+
function hooksOf(core) {
|
|
26
|
+
return {
|
|
27
|
+
async beforeCreate(indexName) {
|
|
28
|
+
await clearLeftoversOfName(core, indexName);
|
|
29
|
+
if (core.indexRegistry.has(indexName)) {
|
|
30
|
+
throw new NarsilError(ErrorCodes.INDEX_ALREADY_EXISTS, `Index "${indexName}" already exists`, { indexName });
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
beforeDrop: (indexName) => dropSuggestionIndexesOf(core, indexName),
|
|
34
|
+
async afterDrop(indexName) {
|
|
35
|
+
await attachedRuntimeOf(core)?.onDrop(indexName);
|
|
36
|
+
},
|
|
37
|
+
async shutdown() {
|
|
38
|
+
await attachedRuntimeOf(core)?.stop().catch(() => void 0);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function installSuggestionHooks(core) {
|
|
43
|
+
core.querySuggestionHooks ??= hooksOf(core);
|
|
44
|
+
}
|
|
45
|
+
function holdsEnabledSetting(core) {
|
|
46
|
+
for (const entry of core.indexRegistry.values()) {
|
|
47
|
+
if (entry.querySuggestions?.querySuggestions?.enabled === true) return true;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
async function startQuerySuggestions(core, engine, config) {
|
|
52
|
+
installSuggestionHooks(core);
|
|
53
|
+
if (config?.querySuggestions === void 0 && !holdsEnabledSetting(core)) return;
|
|
54
|
+
try {
|
|
55
|
+
const { localRuntimeOf } = await import('./start-ZIRB7MQ2.mjs');
|
|
56
|
+
await localRuntimeOf(core, engine, config);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
await engine.shutdown().catch(() => void 0);
|
|
59
|
+
throw error;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { clearLeftoversOfName, dropSuggestionIndexesOf, installSuggestionHooks, startQuerySuggestions };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { REBUILD_REMOVED_RATIO, BUILD_TURN_HANDOVER_AFTER_MS, DRIFT_CHECK_GROWTH_FACTOR, VECTOR_FILE_REPLACED_ABOVE_DEAD_SHARE, VECTOR_FILE_FIXED_OVERHEAD_BYTES, VECTOR_FILE_CENTROID_BYTES_PER_COMPONENT, VECTOR_FILE_STRING_HEADER_BYTES } from './chunk-3I27KXQD.mjs';
|
|
2
|
-
import { createOrdinalFilter, addToOrdinalFilter, turnsAreBudgeted, backgroundTurnIsSpent, yieldBackgroundTurn, osqBitsOf, STORE_ORDINAL_LAYOUT_GENERATION, removeFromOrdinalFilter, createHNSWIndex, STORE_CALIBRATION_GENERATION, graphWithoutNodes, createOsqScratch, osqQuantize } from './chunk-
|
|
3
|
-
import { osqRecordBytes, VECTOR_FILE_MAX_VECTORS, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, VECTOR_GRAPH_PART_VECTORS, VECTOR_GRAPH_PART_PAYLOAD_VERSION, VECTOR_FILE_PAYLOAD_VERSION, deadBitsWhere, vectorsToBytes, writeRecord } from './chunk-
|
|
2
|
+
import { createOrdinalFilter, addToOrdinalFilter, turnsAreBudgeted, backgroundTurnIsSpent, yieldBackgroundTurn, osqBitsOf, STORE_ORDINAL_LAYOUT_GENERATION, removeFromOrdinalFilter, createHNSWIndex, STORE_CALIBRATION_GENERATION, graphWithoutNodes, createOsqScratch, osqQuantize } from './chunk-K4GCSZLI.mjs';
|
|
3
|
+
import { osqRecordBytes, VECTOR_FILE_MAX_VECTORS, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, VECTOR_GRAPH_PART_VECTORS, VECTOR_GRAPH_PART_PAYLOAD_VERSION, VECTOR_FILE_PAYLOAD_VERSION, deadBitsWhere, vectorsToBytes, writeRecord } from './chunk-5TCXK5SB.mjs';
|
|
4
4
|
import { MAX_DOC_ID_LENGTH } from './chunk-4RD3AFSB.mjs';
|
|
5
|
-
import { MAX_FILE_BYTES } from './chunk-
|
|
6
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
5
|
+
import { MAX_FILE_BYTES } from './chunk-GPPOG6PT.mjs';
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
7
7
|
|
|
8
8
|
// src/vector/filter-ordinals.ts
|
|
9
9
|
var UNRESOLVED_ORDINAL = -1;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { littleEndianBytes, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, KEYWORD_SEGMENT_PAYLOAD_VERSION, uint64Bytes } from './chunk-
|
|
1
|
+
import { littleEndianBytes, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, KEYWORD_SEGMENT_PAYLOAD_VERSION, uint64Bytes } from './chunk-XY4VVBBO.mjs';
|
|
2
2
|
import { SEGMENT_FILE_FRAMING_SLACK_BYTES, SEGMENT_TOKEN_TABLE_SHARE_OF_FILE } from './chunk-ZI2V4VD7.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { crc32, openChecksummedEnvelope, HEADER_SIZE } from './chunk-
|
|
6
|
-
import { MAX_FILE_BYTES } from './chunk-
|
|
7
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
3
|
+
import { segmentKey, MAX_SEGMENTS_PER_PARTITION } from './chunk-23XRXIBW.mjs';
|
|
4
|
+
import { selectionKeeps, packChecksummedEnvelope, messagePackUpperBoundBytes, segmentArraysOf, mergeSegmentContents } from './chunk-SMEQ36NT.mjs';
|
|
5
|
+
import { crc32, openChecksummedEnvelope, HEADER_SIZE } from './chunk-JIJXMI42.mjs';
|
|
6
|
+
import { MAX_FILE_BYTES } from './chunk-GPPOG6PT.mjs';
|
|
7
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
8
8
|
import { decode, encode } from '@msgpack/msgpack';
|
|
9
9
|
|
|
10
10
|
// src/persistence/paged/constants.ts
|
|
@@ -770,7 +770,7 @@ async function writePagedGroup(state, group) {
|
|
|
770
770
|
const tombstones = state.tombstonesWritten ? [] : [...request.tombstones];
|
|
771
771
|
const id = state.nextSegmentId;
|
|
772
772
|
const key = segmentKey(request.indexName, request.partitionId, id);
|
|
773
|
-
const { writePagedSegment } = await import('./module-
|
|
773
|
+
const { writePagedSegment } = await import('./module-E33X4AOK.mjs');
|
|
774
774
|
const written = await writePagedSegment({
|
|
775
775
|
directory,
|
|
776
776
|
key,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MAX_M, EARLIER_RELEASE_MIN_M, MIN_M } from './chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { MAX_M, EARLIER_RELEASE_MIN_M, MIN_M } from './chunk-LFIWRCEA.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
3
3
|
|
|
4
4
|
// src/vector/vector-index/dead-bits.ts
|
|
5
5
|
var NO_LIVE_VECTOR_AT_POSITION = -1;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// src/query-suggestions/constants.ts
|
|
2
|
+
var QUERY_HISTORY_FOLDER = "_query-counts";
|
|
3
|
+
var RESTORED_HISTORY_FOLDER = "restored";
|
|
4
|
+
var RESTORE_STAGING_INFIX = ".restoring-";
|
|
5
|
+
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
6
|
+
var DEFAULT_PREVIEW_LIMIT = 100;
|
|
7
|
+
var MAX_PREVIEW_LIMIT = 1e3;
|
|
8
|
+
var QUERY_HISTORY_ARCHIVE_PREFIX = "query-history/";
|
|
9
|
+
var MAX_HISTORY_FILE_BYTES = 16777216;
|
|
10
|
+
var MAX_INDEX_UUID_LENGTH = 255;
|
|
11
|
+
var KEY_FINGERPRINT_LABEL = "narsil.query-suggestions.key";
|
|
12
|
+
var SUGGESTIONS_INDEX_INFIX = ".suggestions.";
|
|
13
|
+
var MIN_KEY_BYTES = 32;
|
|
14
|
+
var SCRAMBLED_ID_BYTES = 16;
|
|
15
|
+
var KEY_FINGERPRINT_BYTES = 16;
|
|
16
|
+
var DEFAULT_MIN_PEOPLE = 4;
|
|
17
|
+
var MIN_MIN_PEOPLE = 2;
|
|
18
|
+
var MAX_MIN_PEOPLE = 4096;
|
|
19
|
+
var DEFAULT_MIN_RESULTS = 5;
|
|
20
|
+
var MIN_MIN_RESULTS = 1;
|
|
21
|
+
var MAX_MIN_RESULTS = 1e4;
|
|
22
|
+
var DEFAULT_RETENTION_DAYS = 30;
|
|
23
|
+
var MIN_RETENTION_DAYS = 1;
|
|
24
|
+
var MAX_RETENTION_DAYS = 365;
|
|
25
|
+
var DEFAULT_MAX_PHRASES_PER_DAY = 1e4;
|
|
26
|
+
var MAX_MAX_PHRASES_PER_DAY = 16384;
|
|
27
|
+
var DEFAULT_MAX_PHRASES_PER_PERSON = 100;
|
|
28
|
+
var MAX_MAX_PHRASES_PER_PERSON = 1e3;
|
|
29
|
+
var DEFAULT_MAX_PEOPLE_PER_DAY = 1e5;
|
|
30
|
+
var MAX_MAX_PEOPLE_PER_DAY = 1e5;
|
|
31
|
+
var DEFAULT_MAX_GROUPS = 100;
|
|
32
|
+
var MAX_MAX_GROUPS = 1e3;
|
|
33
|
+
var DEFAULT_MIN_LETTERS = 4;
|
|
34
|
+
var DEFAULT_MAX_LENGTH = 100;
|
|
35
|
+
var MAX_MAX_LENGTH = 150;
|
|
36
|
+
var DEFAULT_MAX_WORDS = 8;
|
|
37
|
+
var MAX_MAX_WORDS = 50;
|
|
38
|
+
var DEFAULT_MAX_DIGITS = 5;
|
|
39
|
+
var DEFAULT_MAX_MERGE_PHRASES = 1e5;
|
|
40
|
+
var MAX_MAX_MERGE_PHRASES = 5e5;
|
|
41
|
+
var DEFAULT_MERGE_MEMORY_BYTES = 134217728;
|
|
42
|
+
var MIN_MERGE_MEMORY_BYTES = 16777216;
|
|
43
|
+
var MAX_MERGE_MEMORY_BYTES = 1073741824;
|
|
44
|
+
var DEFAULT_SAVE_INTERVAL_MS = 3e5;
|
|
45
|
+
var MIN_SAVE_INTERVAL_MS = 1e3;
|
|
46
|
+
var MAX_SAVE_INTERVAL_MS = 36e5;
|
|
47
|
+
var DEFAULT_RESULT_CHECKS_PER_SECOND = 20;
|
|
48
|
+
var MAX_RESULT_CHECKS_PER_SECOND = 1e3;
|
|
49
|
+
var DEFAULT_SCHEDULE = "0 3 * * *";
|
|
50
|
+
var SCHEDULE_OFF = "off";
|
|
51
|
+
var DEFAULT_TIME_ZONE = "UTC";
|
|
52
|
+
var MAX_PERSON_PAIRS_PER_DAY = 1e7;
|
|
53
|
+
var MAX_FILE_PEOPLE_PER_DAY = 65536;
|
|
54
|
+
var MAX_MERGE_PEOPLE = 2097152;
|
|
55
|
+
var MAX_PEOPLE_PER_PHRASE_IN_FILE = 4096;
|
|
56
|
+
var MAX_FIELDS = 32;
|
|
57
|
+
var MAX_SETTING_BYTES = 16384;
|
|
58
|
+
var MAX_BANNED_PHRASES = 1e3;
|
|
59
|
+
var MAX_BAN_LIST_BYTES = 262144;
|
|
60
|
+
var MAX_BANNED_PHRASE_CODE_POINTS = 150;
|
|
61
|
+
var MAX_SOURCE_INDEX_NAME_LENGTH = 210;
|
|
62
|
+
var MAX_PERSON_UTF16_UNITS = 256;
|
|
63
|
+
var MAX_GROUP_LENGTH = 32;
|
|
64
|
+
var RAW_PHRASE_UTF16_UNITS_PER_CODE_POINT = 8;
|
|
65
|
+
var PAIR_BLOCK_SLOTS = 16;
|
|
66
|
+
var PAIR_PAGE_BLOCKS = 16384;
|
|
67
|
+
var PERSON_TABLE_MIN_SLOTS = 1024;
|
|
68
|
+
var MIN_PHRASE_TABLE_CAPACITY = 64;
|
|
69
|
+
var MAX_MANUAL_SUGGESTION_COUNT = 4294967295;
|
|
70
|
+
var BYTES_PER_MIB = 1048576;
|
|
71
|
+
var MS_PER_SECOND = 1e3;
|
|
72
|
+
var DAY_MS = 864e5;
|
|
73
|
+
var HISTORY_SWEEP_INTERVAL_MS = 36e5;
|
|
74
|
+
var SCHEDULE_LOOKAHEAD_DAYS = 2922;
|
|
75
|
+
var MAX_SCHEDULE_LENGTH = 256;
|
|
76
|
+
var BUILD_WRITE_BATCH = 500;
|
|
77
|
+
var BUILD_LIST_PAGE = 1e3;
|
|
78
|
+
|
|
79
|
+
export { BUILD_LIST_PAGE, BUILD_WRITE_BATCH, BYTES_PER_MIB, DAY_MS, DEFAULT_MAX_DIGITS, DEFAULT_MAX_GROUPS, DEFAULT_MAX_LENGTH, DEFAULT_MAX_MERGE_PHRASES, DEFAULT_MAX_PEOPLE_PER_DAY, DEFAULT_MAX_PHRASES_PER_DAY, DEFAULT_MAX_PHRASES_PER_PERSON, DEFAULT_MAX_WORDS, DEFAULT_MERGE_MEMORY_BYTES, DEFAULT_MIN_LETTERS, DEFAULT_MIN_PEOPLE, DEFAULT_MIN_RESULTS, DEFAULT_PREVIEW_LIMIT, DEFAULT_RESULT_CHECKS_PER_SECOND, DEFAULT_RETENTION_DAYS, DEFAULT_SAVE_INTERVAL_MS, DEFAULT_SCHEDULE, DEFAULT_TIME_ZONE, HISTORY_SWEEP_INTERVAL_MS, KEY_FINGERPRINT_BYTES, KEY_FINGERPRINT_LABEL, MAX_BANNED_PHRASES, MAX_BANNED_PHRASE_CODE_POINTS, MAX_BAN_LIST_BYTES, MAX_FIELDS, MAX_FILE_PEOPLE_PER_DAY, MAX_GROUP_LENGTH, MAX_HISTORY_FILE_BYTES, MAX_INDEX_UUID_LENGTH, MAX_MANUAL_SUGGESTION_COUNT, MAX_MAX_GROUPS, MAX_MAX_LENGTH, MAX_MAX_MERGE_PHRASES, MAX_MAX_PEOPLE_PER_DAY, MAX_MAX_PHRASES_PER_DAY, MAX_MAX_PHRASES_PER_PERSON, MAX_MAX_WORDS, MAX_MERGE_MEMORY_BYTES, MAX_MERGE_PEOPLE, MAX_MIN_PEOPLE, MAX_MIN_RESULTS, MAX_PEOPLE_PER_PHRASE_IN_FILE, MAX_PERSON_PAIRS_PER_DAY, MAX_PERSON_UTF16_UNITS, MAX_PREVIEW_LIMIT, MAX_RESULT_CHECKS_PER_SECOND, MAX_RETENTION_DAYS, MAX_SAVE_INTERVAL_MS, MAX_SCHEDULE_LENGTH, MAX_SETTING_BYTES, MAX_SOURCE_INDEX_NAME_LENGTH, MAX_TIMER_DELAY_MS, MIN_KEY_BYTES, MIN_MERGE_MEMORY_BYTES, MIN_MIN_PEOPLE, MIN_MIN_RESULTS, MIN_PHRASE_TABLE_CAPACITY, MIN_RETENTION_DAYS, MIN_SAVE_INTERVAL_MS, MS_PER_SECOND, PAIR_BLOCK_SLOTS, PAIR_PAGE_BLOCKS, PERSON_TABLE_MIN_SLOTS, QUERY_HISTORY_ARCHIVE_PREFIX, QUERY_HISTORY_FOLDER, RAW_PHRASE_UTF16_UNITS_PER_CODE_POINT, RESTORED_HISTORY_FOLDER, RESTORE_STAGING_INFIX, SCHEDULE_LOOKAHEAD_DAYS, SCHEDULE_OFF, SCRAMBLED_ID_BYTES, SUGGESTIONS_INDEX_INFIX };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, graphPartKey, vectorFileKey } from './chunk-
|
|
2
|
-
import { openChecksummedEnvelope, requireValidFieldTypes, HEADER_SIZE } from './chunk-
|
|
3
|
-
import { VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-
|
|
4
|
-
import { MAX_FILE_BYTES } from './chunk-
|
|
5
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, graphPartKey, vectorFileKey } from './chunk-23XRXIBW.mjs';
|
|
2
|
+
import { openChecksummedEnvelope, requireValidFieldTypes, HEADER_SIZE } from './chunk-JIJXMI42.mjs';
|
|
3
|
+
import { VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-5TCXK5SB.mjs';
|
|
4
|
+
import { MAX_FILE_BYTES } from './chunk-GPPOG6PT.mjs';
|
|
5
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
6
6
|
import { decode } from '@msgpack/msgpack';
|
|
7
7
|
|
|
8
8
|
// src/persistence/durability/segment/manifest-fields.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MAX_DOCUMENT_NESTING_DEPTH } from './chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { MAX_DOCUMENT_NESTING_DEPTH } from './chunk-JIJXMI42.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
3
3
|
|
|
4
4
|
// src/serialization/base64.ts
|
|
5
5
|
var ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/query-suggestions/attached.ts
|
|
2
|
+
var runtimes = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
function attachRuntime(core, runtime) {
|
|
4
|
+
runtimes.set(core, runtime);
|
|
5
|
+
}
|
|
6
|
+
function attachedRuntimeOf(core) {
|
|
7
|
+
return runtimes.get(core);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { attachRuntime, attachedRuntimeOf };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { openManifestPayload, listedKeysOf, decodeManifestPayload } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { openManifestPayload, listedKeysOf, decodeManifestPayload } from './chunk-A5KUEGDY.mjs';
|
|
2
|
+
import { QUERY_HISTORY_ARCHIVE_PREFIX, MAX_HISTORY_FILE_BYTES } from './chunk-7IGKGWSQ.mjs';
|
|
3
|
+
import { manifestFileRefs } from './chunk-23XRXIBW.mjs';
|
|
4
|
+
import { HEADER_SIZE } from './chunk-JIJXMI42.mjs';
|
|
5
|
+
import { MAX_FILE_BYTES } from './chunk-GPPOG6PT.mjs';
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
6
7
|
|
|
7
8
|
// src/persistence/archive/constants.ts
|
|
8
9
|
var MAX_PAX_HEADER_BYTES = 65536;
|
|
@@ -287,11 +288,27 @@ async function readSnapshotArchive(reader, handlers) {
|
|
|
287
288
|
while (unread.done !== true) unread = await entry.next();
|
|
288
289
|
await skipPadding(reader, header.size);
|
|
289
290
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
await readHistoryEntries(reader, handlers);
|
|
292
|
+
}
|
|
293
|
+
async function readHistoryEntries(reader, handlers) {
|
|
294
|
+
for (let position = 0; ; position++) {
|
|
295
|
+
const header = await nextEntryHeader(reader);
|
|
296
|
+
if (header === null) return;
|
|
297
|
+
if (header.name !== `${QUERY_HISTORY_ARCHIVE_PREFIX}${position}`) {
|
|
298
|
+
invalidArchive(`the archive holds the entry "${header.name}" that the manifest does not list`, {
|
|
299
|
+
entry: header.name
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
if (header.size > MAX_HISTORY_FILE_BYTES) {
|
|
303
|
+
invalidArchive(`the entry "${header.name}" passes the history file limit of ${MAX_HISTORY_FILE_BYTES} bytes`, {
|
|
304
|
+
entry: header.name
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
const entry = entryBody(reader, header.size);
|
|
308
|
+
await handlers.history?.(entry);
|
|
309
|
+
let unread = await entry.next();
|
|
310
|
+
while (unread.done !== true) unread = await entry.next();
|
|
311
|
+
await skipPadding(reader, header.size);
|
|
295
312
|
}
|
|
296
313
|
}
|
|
297
314
|
|