@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,35 +1,36 @@
|
|
|
1
|
-
import { DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-PEHS2UO3.mjs';
|
|
2
|
+
import './chunk-LZSLNSUN.mjs';
|
|
3
3
|
import './chunk-NVVRSRX5.mjs';
|
|
4
|
-
import { encodeExactJson, encodeDocumentJson } from './chunk-
|
|
5
|
-
import
|
|
6
|
-
import './chunk-
|
|
7
|
-
import {
|
|
4
|
+
import { encodeExactJson, encodeDocumentJson } from './chunk-WBYQRHDY.mjs';
|
|
5
|
+
import './chunk-4J74WHQM.mjs';
|
|
6
|
+
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-GJFXPHXI.mjs';
|
|
7
|
+
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-DVDX4SDR.mjs';
|
|
8
|
+
import { decodeStoredDocument } from './chunk-HUOYZJ3Q.mjs';
|
|
8
9
|
import './chunk-IO2SMUQD.mjs';
|
|
9
|
-
import './chunk-
|
|
10
|
+
import './chunk-JLIIWJUV.mjs';
|
|
10
11
|
import { EXPORT_CHUNK_BYTES } from './chunk-AM7RSBPF.mjs';
|
|
12
|
+
import './chunk-MVXELMJX.mjs';
|
|
11
13
|
import './chunk-NNE4VDMM.mjs';
|
|
12
14
|
import './chunk-LU3Y3P63.mjs';
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
+
import './chunk-RDWG33MM.mjs';
|
|
16
|
+
import './chunk-4Y53T4YE.mjs';
|
|
15
17
|
import './chunk-UNUFZ2QY.mjs';
|
|
16
18
|
import './chunk-3NQOVO3K.mjs';
|
|
17
19
|
import './chunk-JDOEEMEF.mjs';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import {
|
|
20
|
-
import { openChecksummedEnvelope } from './chunk-C2H2QQFW.mjs';
|
|
20
|
+
import './chunk-7PXRWYUU.mjs';
|
|
21
|
+
import { openChecksummedEnvelope } from './chunk-YH7QY657.mjs';
|
|
21
22
|
import './chunk-CHPTFFJM.mjs';
|
|
22
|
-
import './chunk-
|
|
23
|
-
import './chunk-
|
|
24
|
-
import './chunk-
|
|
25
|
-
import './chunk-
|
|
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';
|
|
26
28
|
import './chunk-KWRW5U65.mjs';
|
|
27
29
|
import './chunk-PPEPTUVV.mjs';
|
|
28
30
|
import './chunk-LVIKKAA6.mjs';
|
|
29
31
|
import './chunk-AAAETEJK.mjs';
|
|
30
32
|
import './chunk-JV6VQY2S.mjs';
|
|
31
|
-
import './chunk-
|
|
32
|
-
import './chunk-CUNGPR5R.mjs';
|
|
33
|
+
import './chunk-DZ7H7D2C.mjs';
|
|
33
34
|
import { decode } from '@msgpack/msgpack';
|
|
34
35
|
|
|
35
36
|
var VECTOR_FILE_ENVELOPE_VERSION = 2;
|
|
@@ -111,7 +112,7 @@ async function wholeFileVectorReads(checkpoint) {
|
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
114
|
async function* pagedDocumentLines(checkpoint) {
|
|
114
|
-
const { openFileVectorReads, pagedPartitionLines } = await import('./module-
|
|
115
|
+
const { openFileVectorReads, pagedPartitionLines } = await import('./module-ZL5ZG6YB.mjs');
|
|
115
116
|
const vectors = await openFileVectorReads(checkpoint, () => wholeFileVectorReads(checkpoint));
|
|
116
117
|
try {
|
|
117
118
|
for (const partition of checkpoint.manifest.partitions) {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { spellingCountsOf, encodePartialSpellings, countSpelling, PARTIAL_WORD_RUN_CODE_POINTS, FROZEN_PARTIAL_REMOVED_ENTRY_BYTES, sameFields, countDocumentSpellings, GROWING_PARTIAL_ENTRY_BYTES, GROWING_PARTIAL_RUN_BYTES, GROWING_PARTIAL_RUN_MEMBER_BYTES, GROWING_PARTIAL_PENDING_ENTRY_BYTES, partitionDocumentFrequency, visitDocumentSpellings, visitDocumentSurfaceSpellings, codePointCountOf, GROWING_PARTIAL_PENDING_ENTRIES_PER_ENTRY } from './chunks/chunk-
|
|
1
|
+
import { spellingCountsOf, encodePartialSpellings, countSpelling, PARTIAL_WORD_RUN_CODE_POINTS, FROZEN_PARTIAL_REMOVED_ENTRY_BYTES, sameFields, countDocumentSpellings, GROWING_PARTIAL_ENTRY_BYTES, GROWING_PARTIAL_RUN_BYTES, GROWING_PARTIAL_RUN_MEMBER_BYTES, GROWING_PARTIAL_PENDING_ENTRY_BYTES, partitionDocumentFrequency, visitDocumentSpellings, visitDocumentSurfaceSpellings, codePointCountOf, GROWING_PARTIAL_PENDING_ENTRIES_PER_ENTRY } from './chunks/chunk-4Y53T4YE.mjs';
|
|
2
2
|
import { fuzzyTermMatches } from './chunks/chunk-UNUFZ2QY.mjs';
|
|
3
|
-
import { encodeStringBlob, tokenize, resolveStopWords, transformToken } from './chunks/chunk-
|
|
4
|
-
import './chunks/chunk-
|
|
5
|
-
import './chunks/chunk-
|
|
6
|
-
import './chunks/chunk-
|
|
3
|
+
import { encodeStringBlob, tokenize, resolveStopWords, transformToken } from './chunks/chunk-7PXRWYUU.mjs';
|
|
4
|
+
import './chunks/chunk-3JIBF3XT.mjs';
|
|
5
|
+
import './chunks/chunk-5CQX3XXV.mjs';
|
|
6
|
+
import './chunks/chunk-6VBXNFLE.mjs';
|
|
7
|
+
import './chunks/chunk-C5G6TJ7A.mjs';
|
|
7
8
|
import './chunks/chunk-KWRW5U65.mjs';
|
|
8
9
|
import { compareCodePoints, codePointCount } from './chunks/chunk-PPEPTUVV.mjs';
|
|
9
10
|
import { PARTIAL_WORD_MIN_CODE_POINTS, PARTIAL_WORDS_ADDED_PER_QUERY, DEFAULT_FUZZY_PREFIX_LENGTH } from './chunks/chunk-AAAETEJK.mjs';
|
|
10
11
|
import './chunks/chunk-JV6VQY2S.mjs';
|
|
11
|
-
import './chunks/chunk-
|
|
12
|
+
import './chunks/chunk-DZ7H7D2C.mjs';
|
|
12
13
|
|
|
13
14
|
// src/core/partition/partial-words/text.ts
|
|
14
15
|
var encoder = new TextEncoder();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PATTERN_RUN_CODE_POINTS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, MAX_PATTERN_POSITIONS, MATCHER_STATE_OVERHEAD_BYTES, MAX_PATTERN_TOLERANCE, PATTERN_EXPRESSION_OPERATORS, invalid, MAX_PATTERN_TEXT_CODE_POINTS, TYPO_CLAIM_SLOTS_PER_WORD, MATCHER_CODE_POINT_BYTES, MATCHER_SIMULATION_BYTES_PER_POSITION } from './chunks/chunk-
|
|
1
|
+
import { PATTERN_RUN_CODE_POINTS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, MAX_PATTERN_POSITIONS, MATCHER_STATE_OVERHEAD_BYTES, MAX_PATTERN_TOLERANCE, PATTERN_EXPRESSION_OPERATORS, invalid, MAX_PATTERN_TEXT_CODE_POINTS, TYPO_CLAIM_SLOTS_PER_WORD, MATCHER_CODE_POINT_BYTES, MATCHER_SIMULATION_BYTES_PER_POSITION } from './chunks/chunk-RDWG33MM.mjs';
|
|
2
2
|
import { tabulatedLevenshtein } from './chunks/chunk-UNUFZ2QY.mjs';
|
|
3
|
-
import './chunks/chunk-
|
|
3
|
+
import './chunks/chunk-C5G6TJ7A.mjs';
|
|
4
4
|
import { codePointCount, exceedsCodePoints } from './chunks/chunk-PPEPTUVV.mjs';
|
|
5
5
|
import { bitsetHas, bitsetSet, GrowableUint32, createBitSet, bitsetAnd, bitsetNot } from './chunks/chunk-LVIKKAA6.mjs';
|
|
6
|
-
import { NarsilError, ErrorCodes } from './chunks/chunk-
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunks/chunk-DZ7H7D2C.mjs';
|
|
7
7
|
|
|
8
8
|
// src/pattern/constants.ts
|
|
9
9
|
var MATCHER_TRANSITION_BYTES = 48;
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { normaliseBan, banListFromInput, withState } from './chunks/chunk-QJXTNPLQ.mjs';
|
|
2
|
+
import { suggestionsIndexName, markedSuggestionIndexes, ensureSuggestionsIndex, suggestionDocument, ORIGIN_MANUAL, removeSuggestions, enabledSetting, mergeHistory, groupsToWrite, meetsMinResults, localRuntimeOf } from './chunks/chunk-KJIG57UD.mjs';
|
|
3
|
+
import './chunks/chunk-GIZTJXYW.mjs';
|
|
4
|
+
import './chunks/chunk-ZZT7CEN7.mjs';
|
|
5
|
+
import './chunks/chunk-H3MDVPBO.mjs';
|
|
6
|
+
import { isGroup, invalidSetting, GROUP_FORMAT, resolveSetting, acceptedPhrase, validateSetting, requireFieldsInSchema } from './chunks/chunk-TYIRMPD3.mjs';
|
|
7
|
+
import './chunks/chunk-7GRCBBME.mjs';
|
|
8
|
+
import './chunks/chunk-DIYDOIM4.mjs';
|
|
9
|
+
import './chunks/chunk-PSWKQVVT.mjs';
|
|
10
|
+
import './chunks/chunk-Q32DDFKX.mjs';
|
|
11
|
+
import { MAX_MANUAL_SUGGESTION_COUNT, MAX_SOURCE_INDEX_NAME_LENGTH, DEFAULT_PREVIEW_LIMIT, MAX_PREVIEW_LIMIT } from './chunks/chunk-PJHAB5ZY.mjs';
|
|
12
|
+
import { engineCoreOf } from './chunks/chunk-HUOYZJ3Q.mjs';
|
|
13
|
+
import './chunks/chunk-IO2SMUQD.mjs';
|
|
14
|
+
import './chunks/chunk-JLIIWJUV.mjs';
|
|
15
|
+
import './chunks/chunk-AM7RSBPF.mjs';
|
|
16
|
+
import './chunks/chunk-MVXELMJX.mjs';
|
|
17
|
+
import './chunks/chunk-NNE4VDMM.mjs';
|
|
18
|
+
import './chunks/chunk-LU3Y3P63.mjs';
|
|
19
|
+
import './chunks/chunk-RDWG33MM.mjs';
|
|
20
|
+
import './chunks/chunk-4Y53T4YE.mjs';
|
|
21
|
+
import './chunks/chunk-UNUFZ2QY.mjs';
|
|
22
|
+
import './chunks/chunk-3NQOVO3K.mjs';
|
|
23
|
+
import './chunks/chunk-JDOEEMEF.mjs';
|
|
24
|
+
import './chunks/chunk-7PXRWYUU.mjs';
|
|
25
|
+
import './chunks/chunk-YH7QY657.mjs';
|
|
26
|
+
import './chunks/chunk-CHPTFFJM.mjs';
|
|
27
|
+
import './chunks/chunk-3JIBF3XT.mjs';
|
|
28
|
+
import './chunks/chunk-5CQX3XXV.mjs';
|
|
29
|
+
import './chunks/chunk-6VBXNFLE.mjs';
|
|
30
|
+
import './chunks/chunk-C5G6TJ7A.mjs';
|
|
31
|
+
import './chunks/chunk-MJDQU5MW.mjs';
|
|
32
|
+
import './chunks/chunk-KWRW5U65.mjs';
|
|
33
|
+
import './chunks/chunk-PPEPTUVV.mjs';
|
|
34
|
+
import './chunks/chunk-LVIKKAA6.mjs';
|
|
35
|
+
import './chunks/chunk-AAAETEJK.mjs';
|
|
36
|
+
import './chunks/chunk-JV6VQY2S.mjs';
|
|
37
|
+
import { NarsilError, ErrorCodes } from './chunks/chunk-DZ7H7D2C.mjs';
|
|
38
|
+
|
|
39
|
+
// src/query-suggestions/preview.ts
|
|
40
|
+
function previewOrder(left, right) {
|
|
41
|
+
if (left.count !== right.count) return right.count - left.count;
|
|
42
|
+
if (left.group !== right.group) return left.group < right.group ? -1 : 1;
|
|
43
|
+
return left.query < right.query ? -1 : left.query > right.query ? 1 : 0;
|
|
44
|
+
}
|
|
45
|
+
async function previewBuild(ctx, indexName, max) {
|
|
46
|
+
const setting = enabledSetting(ctx.host, indexName);
|
|
47
|
+
const merged = await mergeHistory(ctx, indexName, setting, Date.now());
|
|
48
|
+
const { groups } = groupsToWrite(ctx, indexName, setting, merged.result);
|
|
49
|
+
const banned = new Set(ctx.host.view(indexName)?.state?.bannedQueries ?? []);
|
|
50
|
+
const candidates = [];
|
|
51
|
+
for (const group of groups) {
|
|
52
|
+
for (const { phrase, count } of merged.result.groups[group] ?? []) {
|
|
53
|
+
if (!banned.has(phrase)) candidates.push({ group, query: phrase, count });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
candidates.sort(previewOrder);
|
|
57
|
+
const checked = /* @__PURE__ */ new Map();
|
|
58
|
+
const entries = [];
|
|
59
|
+
let next = 0;
|
|
60
|
+
while (next < candidates.length && entries.length < max) {
|
|
61
|
+
const candidate = candidates[next];
|
|
62
|
+
next += 1;
|
|
63
|
+
if (candidate === void 0) break;
|
|
64
|
+
let passes = checked.get(candidate.query);
|
|
65
|
+
if (passes === void 0) {
|
|
66
|
+
passes = await meetsMinResults(ctx, indexName, setting, candidate.query);
|
|
67
|
+
checked.set(candidate.query, passes);
|
|
68
|
+
}
|
|
69
|
+
if (passes) entries.push(candidate);
|
|
70
|
+
}
|
|
71
|
+
return { entries, truncated: next < candidates.length };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// src/query-suggestions/operations.ts
|
|
75
|
+
function requireView(runtime, indexName) {
|
|
76
|
+
const view = runtime.host.view(indexName);
|
|
77
|
+
if (view === null) {
|
|
78
|
+
throw new NarsilError(ErrorCodes.INDEX_NOT_FOUND, `Index "${indexName}" does not exist`, { indexName });
|
|
79
|
+
}
|
|
80
|
+
return view;
|
|
81
|
+
}
|
|
82
|
+
function requireSourceView(runtime, indexName) {
|
|
83
|
+
const view = requireView(runtime, indexName);
|
|
84
|
+
if (view.state?.querySuggestionsSource !== void 0) {
|
|
85
|
+
invalidSetting(`Index "${indexName}" is a suggestions index, so it takes no query suggestions of its own`, {
|
|
86
|
+
indexName
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
if (indexName.length > MAX_SOURCE_INDEX_NAME_LENGTH) {
|
|
90
|
+
invalidSetting(
|
|
91
|
+
`Index "${indexName}" has a name longer than ${MAX_SOURCE_INDEX_NAME_LENGTH} characters, which leaves no room for the names of its suggestions indexes`,
|
|
92
|
+
{ indexName }
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
return view;
|
|
96
|
+
}
|
|
97
|
+
function requireAcceptable(runtime, indexName, setting) {
|
|
98
|
+
const view = requireSourceView(runtime, indexName);
|
|
99
|
+
requireFieldsInSchema(setting, view.schema);
|
|
100
|
+
if (!setting.enabled) return;
|
|
101
|
+
if (runtime.scrambler === null) {
|
|
102
|
+
invalidSetting("This engine has no query suggestions key, so it cannot turn the feature on", { indexName });
|
|
103
|
+
}
|
|
104
|
+
if (view.hasSync) {
|
|
105
|
+
invalidSetting(
|
|
106
|
+
`Index "${indexName}" has device sync on, and a device receives the whole index of one user while a suggestion comes from the searches of several people`,
|
|
107
|
+
{ indexName }
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async function updateSetting(runtime, indexName, raw) {
|
|
112
|
+
const setting = validateSetting(raw);
|
|
113
|
+
requireAcceptable(runtime, indexName, setting);
|
|
114
|
+
await runtime.host.updateState(indexName, (current) => {
|
|
115
|
+
requireAcceptable(runtime, indexName, setting);
|
|
116
|
+
return withState(current, { querySuggestions: setting });
|
|
117
|
+
});
|
|
118
|
+
if (!setting.enabled) await runtime.discardHistory(indexName);
|
|
119
|
+
runtime.settingChanged(indexName);
|
|
120
|
+
}
|
|
121
|
+
async function status(runtime, indexName) {
|
|
122
|
+
const view = requireView(runtime, indexName);
|
|
123
|
+
return {
|
|
124
|
+
indexName,
|
|
125
|
+
setting: view.state?.querySuggestions ?? null,
|
|
126
|
+
lastBuild: await runtime.builds.lastBuild(indexName),
|
|
127
|
+
nextBuildAt: runtime.timers.nextBuildAt(indexName),
|
|
128
|
+
suggestionIndexes: [...markedSuggestionIndexes(runtime.host, indexName).values()].sort()
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
function previewLimitOf(limit) {
|
|
132
|
+
if (limit === void 0) return DEFAULT_PREVIEW_LIMIT;
|
|
133
|
+
if (typeof limit !== "number" || !Number.isSafeInteger(limit) || limit < 1 || limit > MAX_PREVIEW_LIMIT) {
|
|
134
|
+
invalidSetting(`The preview limit must be a whole number from 1 to ${MAX_PREVIEW_LIMIT}`);
|
|
135
|
+
}
|
|
136
|
+
return limit;
|
|
137
|
+
}
|
|
138
|
+
async function preview(runtime, indexName, limit) {
|
|
139
|
+
const max = previewLimitOf(limit);
|
|
140
|
+
runtime.enabledSetting(indexName);
|
|
141
|
+
const scrambler = runtime.scrambler;
|
|
142
|
+
if (scrambler === null) invalidSetting("This engine has no query suggestions key, so it holds no counts");
|
|
143
|
+
const context = {
|
|
144
|
+
host: runtime.host,
|
|
145
|
+
scrambler,
|
|
146
|
+
saveDay: (name) => runtime.saveDay(name),
|
|
147
|
+
withWriteLock: (name, work) => runtime.withWriteLock(name, work),
|
|
148
|
+
isStopping: () => runtime.isStopping
|
|
149
|
+
};
|
|
150
|
+
return previewBuild(context, indexName, max);
|
|
151
|
+
}
|
|
152
|
+
async function banPhrases(runtime, indexName, next) {
|
|
153
|
+
requireSourceView(runtime, indexName);
|
|
154
|
+
let added = [];
|
|
155
|
+
let stored = [];
|
|
156
|
+
await runtime.host.updateState(indexName, (current) => {
|
|
157
|
+
requireSourceView(runtime, indexName);
|
|
158
|
+
const previous = current?.bannedQueries ?? [];
|
|
159
|
+
stored = next(previous);
|
|
160
|
+
const before = new Set(previous);
|
|
161
|
+
added = stored.filter((phrase) => !before.has(phrase));
|
|
162
|
+
return withState(current, { bannedQueries: stored });
|
|
163
|
+
});
|
|
164
|
+
return { stored, added };
|
|
165
|
+
}
|
|
166
|
+
async function removeFromSuggestions(runtime, indexName, phrases) {
|
|
167
|
+
let holders = 0;
|
|
168
|
+
if (phrases.length === 0) return holders;
|
|
169
|
+
for (const name of markedSuggestionIndexes(runtime.host, indexName).values()) {
|
|
170
|
+
if (await removeSuggestions(runtime.host, name, phrases) > 0) holders += 1;
|
|
171
|
+
}
|
|
172
|
+
return holders;
|
|
173
|
+
}
|
|
174
|
+
function updateBans(runtime, indexName, raw) {
|
|
175
|
+
const phrases = banListFromInput(raw);
|
|
176
|
+
return runtime.withWriteLock(indexName, async () => {
|
|
177
|
+
const { stored, added } = await banPhrases(runtime, indexName, () => phrases);
|
|
178
|
+
await removeFromSuggestions(runtime, indexName, added);
|
|
179
|
+
return stored;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function removeQuery(runtime, indexName, raw) {
|
|
183
|
+
const phrase = normaliseBan(raw);
|
|
184
|
+
return runtime.withWriteLock(indexName, async () => {
|
|
185
|
+
await banPhrases(runtime, indexName, (current) => current.includes(phrase) ? [...current] : [...current, phrase]);
|
|
186
|
+
return removeFromSuggestions(runtime, indexName, [phrase]);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
function manualCountOf(count) {
|
|
190
|
+
if (count === void 0) return 0;
|
|
191
|
+
if (typeof count !== "number" || !Number.isSafeInteger(count) || count < 0 || count > MAX_MANUAL_SUGGESTION_COUNT) {
|
|
192
|
+
invalidSetting(`A suggestion's count must be a whole number from 0 to ${MAX_MANUAL_SUGGESTION_COUNT}`);
|
|
193
|
+
}
|
|
194
|
+
return count;
|
|
195
|
+
}
|
|
196
|
+
function addSuggestion(runtime, indexName, raw) {
|
|
197
|
+
const { group, query, count } = raw ?? {};
|
|
198
|
+
if (!isGroup(group)) invalidSetting(`A suggestion needs a group of ${GROUP_FORMAT}`);
|
|
199
|
+
if (typeof query !== "string") invalidSetting("A suggestion needs its query as a string");
|
|
200
|
+
const documentCount = manualCountOf(count);
|
|
201
|
+
return runtime.withWriteLock(indexName, async () => {
|
|
202
|
+
const view = requireSourceView(runtime, indexName);
|
|
203
|
+
const setting = resolveSetting(view.state?.querySuggestions ?? { enabled: false, fields: [] });
|
|
204
|
+
const phrase = acceptedPhrase(query, setting);
|
|
205
|
+
if (phrase === null) invalidSetting("The suggestion is not a phrase that the setting of the index accepts");
|
|
206
|
+
if ((view.state?.bannedQueries ?? []).includes(phrase)) {
|
|
207
|
+
invalidSetting("The ban list of the index holds this phrase", { indexName });
|
|
208
|
+
}
|
|
209
|
+
const marked = markedSuggestionIndexes(runtime.host, indexName);
|
|
210
|
+
if (!marked.has(group) && marked.size >= setting.maxGroups) {
|
|
211
|
+
invalidSetting(`Index "${indexName}" already has ${setting.maxGroups} groups`, { indexName });
|
|
212
|
+
}
|
|
213
|
+
const name = await ensureSuggestionsIndex(runtime.host, indexName, group);
|
|
214
|
+
const document = suggestionDocument(phrase, documentCount, ORIGIN_MANUAL);
|
|
215
|
+
if (await runtime.host.engine.has(name, phrase)) await runtime.host.engine.update(name, phrase, document);
|
|
216
|
+
else await runtime.host.engine.insert(name, document);
|
|
217
|
+
return name;
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function querySuggestionsOf(runtime) {
|
|
221
|
+
return {
|
|
222
|
+
recordQuery: async (indexName, query) => (await runtime()).record(indexName, query),
|
|
223
|
+
updateSetting: async (indexName, setting) => updateSetting(await runtime(), indexName, setting),
|
|
224
|
+
status: async (indexName) => status(await runtime(), indexName),
|
|
225
|
+
build: async (indexName) => (await runtime()).builds.start(indexName, "caller"),
|
|
226
|
+
preview: async (indexName, limit) => preview(await runtime(), indexName, limit),
|
|
227
|
+
bans: async (indexName) => [...requireView(await runtime(), indexName).state?.bannedQueries ?? []],
|
|
228
|
+
updateBans: async (indexName, phrases) => updateBans(await runtime(), indexName, phrases),
|
|
229
|
+
removeQuery: async (indexName, query) => removeQuery(await runtime(), indexName, query),
|
|
230
|
+
addSuggestion: async (indexName, suggestion) => addSuggestion(await runtime(), indexName, suggestion),
|
|
231
|
+
suggestionsIndexName: (indexName, group) => {
|
|
232
|
+
if (!isGroup(group)) invalidSetting(`A group holds ${GROUP_FORMAT}`);
|
|
233
|
+
return suggestionsIndexName(indexName, group);
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/query-suggestions/providers.ts
|
|
239
|
+
var providers = /* @__PURE__ */ new WeakMap();
|
|
240
|
+
function boundQuerySuggestionsOf(owner) {
|
|
241
|
+
return providers.get(owner);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// src/query-suggestions/index.ts
|
|
245
|
+
function querySuggestions(engine) {
|
|
246
|
+
const bound = boundQuerySuggestionsOf(engine);
|
|
247
|
+
if (bound !== void 0) return bound();
|
|
248
|
+
const core = engineCoreOf(engine);
|
|
249
|
+
if (core === void 0) {
|
|
250
|
+
throw new NarsilError(
|
|
251
|
+
ErrorCodes.CONFIG_INVALID,
|
|
252
|
+
"Popular query suggestions need an engine that createNarsil made in this process"
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
return querySuggestionsOf(() => localRuntimeOf(core, engine, void 0));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export { querySuggestions };
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { readSnapshotArchive } from './chunks/chunk-3XKMRNRE.mjs';
|
|
2
|
-
import './chunks/chunk-UWDNZDWK.mjs';
|
|
3
1
|
import { createByteReader } from './chunks/chunk-NVVRSRX5.mjs';
|
|
2
|
+
import { readSnapshotArchive } from './chunks/chunk-4LCEN2IU.mjs';
|
|
3
|
+
import './chunks/chunk-CUH5F57W.mjs';
|
|
4
4
|
import { isSyncEpoch } from './chunks/chunk-JWUCMVRK.mjs';
|
|
5
|
-
import './chunks/chunk-
|
|
6
|
-
import './chunks/chunk-
|
|
7
|
-
import
|
|
5
|
+
import './chunks/chunk-PJHAB5ZY.mjs';
|
|
6
|
+
import './chunks/chunk-6WA3C3DV.mjs';
|
|
7
|
+
import './chunks/chunk-DVDX4SDR.mjs';
|
|
8
|
+
import { readHeapStatistics, decodeIndexConfiguration } from './chunks/chunk-YH7QY657.mjs';
|
|
8
9
|
import './chunks/chunk-CHPTFFJM.mjs';
|
|
9
|
-
import { encodeDocument } from './chunks/chunk-
|
|
10
|
-
import './chunks/chunk-
|
|
11
|
-
import './chunks/chunk-
|
|
12
|
-
import
|
|
10
|
+
import { encodeDocument } from './chunks/chunk-3JIBF3XT.mjs';
|
|
11
|
+
import './chunks/chunk-5CQX3XXV.mjs';
|
|
12
|
+
import './chunks/chunk-6VBXNFLE.mjs';
|
|
13
|
+
import './chunks/chunk-C5G6TJ7A.mjs';
|
|
14
|
+
import { hasLanguage, hasTokenizer, hasStopWords, getLanguage } from './chunks/chunk-MJDQU5MW.mjs';
|
|
13
15
|
import './chunks/chunk-KWRW5U65.mjs';
|
|
14
16
|
import './chunks/chunk-PPEPTUVV.mjs';
|
|
15
|
-
import { NarsilError, ErrorCodes, ClientErrorCodes, ServerErrorCodes, describeError } from './chunks/chunk-
|
|
17
|
+
import { NarsilError, ErrorCodes, ClientErrorCodes, ServerErrorCodes, describeError } from './chunks/chunk-DZ7H7D2C.mjs';
|
|
16
18
|
import { decode, encode } from '@msgpack/msgpack';
|
|
17
19
|
|
|
18
20
|
// src/json-encoding.ts
|
|
@@ -98,11 +100,13 @@ function createAdminOperations(transport) {
|
|
|
98
100
|
await transport.json({ method: "POST", path: `${indexPath(indexName)}/_checkpoint`, options });
|
|
99
101
|
},
|
|
100
102
|
snapshot(indexName, options) {
|
|
103
|
+
const { queryHistory, ...request } = options ?? {};
|
|
101
104
|
return transport.stream({
|
|
102
105
|
method: "GET",
|
|
103
106
|
path: `${indexPath(indexName)}/snapshot`,
|
|
107
|
+
...queryHistory === true ? { query: { queryHistory: "true" } } : {},
|
|
104
108
|
defaultTimeoutMs: NO_TIMEOUT,
|
|
105
|
-
options
|
|
109
|
+
options: request
|
|
106
110
|
});
|
|
107
111
|
},
|
|
108
112
|
async restore(indexName, data, options) {
|
|
@@ -205,7 +209,9 @@ function createBackupOperations(transport) {
|
|
|
205
209
|
}
|
|
206
210
|
return {
|
|
207
211
|
createBackup(indexName, backupName, options) {
|
|
208
|
-
|
|
212
|
+
const { queryHistory, ...request } = options ?? {};
|
|
213
|
+
const body = { backup: backupName, ...queryHistory === true ? { queryHistory } : {} };
|
|
214
|
+
return postTask(`${indexPath(indexName)}/backups`, body, request);
|
|
209
215
|
},
|
|
210
216
|
async listBackups(options) {
|
|
211
217
|
const path = "/backups";
|
|
@@ -775,6 +781,62 @@ function createIndexOperations(transport) {
|
|
|
775
781
|
};
|
|
776
782
|
}
|
|
777
783
|
|
|
784
|
+
// src/client/query-suggestions.ts
|
|
785
|
+
function createQuerySuggestionOperations(transport) {
|
|
786
|
+
const pathOf = (indexName, route = "") => `${indexPath(indexName)}/query-suggestions${route}`;
|
|
787
|
+
function send(method, path, body, options) {
|
|
788
|
+
return transport.json({
|
|
789
|
+
method,
|
|
790
|
+
path,
|
|
791
|
+
...body === void 0 ? {} : { body: encodeJson(body), contentType: "application/json" },
|
|
792
|
+
options
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
return {
|
|
796
|
+
async updateQuerySuggestions(indexName, setting, options) {
|
|
797
|
+
await send("PUT", pathOf(indexName), setting, options);
|
|
798
|
+
},
|
|
799
|
+
async querySuggestionsStatus(indexName, options) {
|
|
800
|
+
const path = pathOf(indexName);
|
|
801
|
+
return readBody(await send("GET", path, void 0, options), path);
|
|
802
|
+
},
|
|
803
|
+
async recordQuery(indexName, query, options) {
|
|
804
|
+
const path = pathOf(indexName, "/record");
|
|
805
|
+
return readBody(await send("POST", path, { query }, options), path);
|
|
806
|
+
},
|
|
807
|
+
async buildQuerySuggestions(indexName, options) {
|
|
808
|
+
const path = pathOf(indexName, "/build");
|
|
809
|
+
return readBody(await send("POST", path, void 0, options), path);
|
|
810
|
+
},
|
|
811
|
+
async previewQuerySuggestions(indexName, limit, options) {
|
|
812
|
+
const path = pathOf(indexName, "/preview");
|
|
813
|
+
const payload = await transport.json({
|
|
814
|
+
method: "GET",
|
|
815
|
+
path,
|
|
816
|
+
...limit === void 0 ? {} : { query: { limit: String(limit) } },
|
|
817
|
+
options
|
|
818
|
+
});
|
|
819
|
+
return readBody(payload, path);
|
|
820
|
+
},
|
|
821
|
+
async readQueryBans(indexName, options) {
|
|
822
|
+
const path = pathOf(indexName, "/bans");
|
|
823
|
+
return readArray(await send("GET", path, void 0, options), "bans", path);
|
|
824
|
+
},
|
|
825
|
+
async replaceQueryBans(indexName, bans, options) {
|
|
826
|
+
const path = pathOf(indexName, "/bans");
|
|
827
|
+
return readArray(await send("PUT", path, { bans }, options), "bans", path);
|
|
828
|
+
},
|
|
829
|
+
async removeQuery(indexName, query, options) {
|
|
830
|
+
const path = pathOf(indexName, "/remove");
|
|
831
|
+
return readNumber(await send("POST", path, { query }, options), "suggestionIndexes", path);
|
|
832
|
+
},
|
|
833
|
+
async addManualSuggestion(indexName, suggestion, options) {
|
|
834
|
+
const path = pathOf(indexName, "/manual");
|
|
835
|
+
return readString(await send("POST", path, suggestion, options), "indexName", path);
|
|
836
|
+
}
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
|
|
778
840
|
// src/client/search.ts
|
|
779
841
|
function createSearchOperations(transport) {
|
|
780
842
|
async function post(path, params, options) {
|
|
@@ -978,7 +1040,8 @@ function createNarsilClient(options) {
|
|
|
978
1040
|
...createAdminOperations(transport),
|
|
979
1041
|
...createBackupOperations(transport),
|
|
980
1042
|
...createServerOperations(transport),
|
|
981
|
-
...createSyncSettingOperations(transport)
|
|
1043
|
+
...createSyncSettingOperations(transport),
|
|
1044
|
+
...createQuerySuggestionOperations(transport)
|
|
982
1045
|
};
|
|
983
1046
|
}
|
|
984
1047
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { targetOfPending } from './chunks/chunk-
|
|
1
|
+
import { targetOfPending } from './chunks/chunk-U4KSKA4Z.mjs';
|
|
2
2
|
import './chunks/chunk-3NQOVO3K.mjs';
|
|
3
3
|
import { withOpenIndex, oneAtATime, emitSyncChange } from './chunks/chunk-JDOEEMEF.mjs';
|
|
4
|
-
import { encodeStringBlob, tokenize, encodeLookupKey } from './chunks/chunk-
|
|
5
|
-
import { resolveIndexAnalysis } from './chunks/chunk-
|
|
4
|
+
import { encodeStringBlob, tokenize, encodeLookupKey } from './chunks/chunk-7PXRWYUU.mjs';
|
|
5
|
+
import { resolveIndexAnalysis } from './chunks/chunk-MJDQU5MW.mjs';
|
|
6
6
|
import './chunks/chunk-KWRW5U65.mjs';
|
|
7
7
|
import { compareCodePoints } from './chunks/chunk-PPEPTUVV.mjs';
|
|
8
8
|
import './chunks/chunk-JV6VQY2S.mjs';
|
|
9
|
-
import { NarsilError, ErrorCodes } from './chunks/chunk-
|
|
9
|
+
import { NarsilError, ErrorCodes } from './chunks/chunk-DZ7H7D2C.mjs';
|
|
10
10
|
import { encode, decode } from '@msgpack/msgpack';
|
|
11
11
|
|
|
12
12
|
// src/core/synonyms/constants.ts
|
package/dist/react.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { N as NarsilError, L as ListParams, l as ListResult, I as IndexInfo,
|
|
2
|
-
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './
|
|
3
|
-
import { f as TaskRecord, e as TaskProgress, c as ImportResult, d as TaskListQuery, T as TaskListPage } from './tasks-
|
|
4
|
-
export { E as ErrorDetail, I as ImportError, g as TaskStatus, i as TaskType } from './tasks-
|
|
1
|
+
import { g as Narsil, N as NarsilError, L as ListParams, l as ListResult, I as IndexInfo, p as IndexStats, Q as QueryParams, o as PreflightResult, h as QueryResult, m as SuggestParams, n as SuggestResult } from './engine-CFxPYqEk.js';
|
|
2
|
+
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './engine-CFxPYqEk.js';
|
|
3
|
+
import { f as TaskRecord, e as TaskProgress, c as ImportResult, d as TaskListQuery, T as TaskListPage } from './tasks-qrJojgST.js';
|
|
4
|
+
export { E as ErrorDetail, I as ImportError, g as TaskStatus, i as TaskType } from './tasks-qrJojgST.js';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
|
-
import { N as
|
|
7
|
-
import {
|
|
8
|
-
import { A as AnyDocument } from './schema-DDauvDOv.js';
|
|
9
|
-
import './config-05G_hy-1.js';
|
|
10
|
-
import './config-B8DP2VwR.js';
|
|
6
|
+
import { N as NarsilClient, I as ImportSource } from './client-DRv7UVeY.js';
|
|
7
|
+
import { A as AnyDocument } from './schema-Jwt928nJ.js';
|
|
11
8
|
import './adapters-pljAqmrC.js';
|
|
12
|
-
import './
|
|
13
|
-
import './types-DvncmvuQ.js';
|
|
9
|
+
import './query-suggestions-CBYkrQ5T.js';
|
|
14
10
|
import './synonyms-CpOAHPa-.js';
|
|
11
|
+
import './config-DMwffLKn.js';
|
|
12
|
+
import './config-CoSig5Ox.js';
|
|
13
|
+
import './index-C4AmUnl1.js';
|
|
14
|
+
import './types-DvncmvuQ.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* These settings apply to {@link NarsilProvider} whether it holds a client or
|
package/dist/react.mjs
CHANGED
|
@@ -41,6 +41,7 @@ var ErrorCodes = {
|
|
|
41
41
|
SYNC_NOT_READY: "SYNC_NOT_READY",
|
|
42
42
|
SYNC_NOT_ENABLED: "SYNC_NOT_ENABLED",
|
|
43
43
|
SYNC_SNAPSHOT_PREPARING: "SYNC_SNAPSHOT_PREPARING",
|
|
44
|
+
QUERY_SUGGESTIONS_NOT_ENABLED: "QUERY_SUGGESTIONS_NOT_ENABLED",
|
|
44
45
|
SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD",
|
|
45
46
|
VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH",
|
|
46
47
|
SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { runRerankedQuery, rerankTextOf } from './chunk-
|
|
1
|
+
import { runRerankedQuery, rerankTextOf } from './chunk-2NE7VCYE.mjs';
|
|
2
2
|
import './chunk-KZ3NX2P7.mjs';
|
|
3
|
-
import { rerankOnHost } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { rerankOnHost } from './chunk-KHKIRS5D.mjs';
|
|
4
|
+
import './chunk-6OEGXLBX.mjs';
|
|
5
5
|
import './chunk-HJSN7UYG.mjs';
|
|
6
6
|
import './chunk-EEBCDP36.mjs';
|
|
7
7
|
import './chunk-FQBFZAWG.mjs';
|
|
8
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
8
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
9
9
|
|
|
10
10
|
// src/distribution/cluster-node/reads/rerank.ts
|
|
11
11
|
async function rerankClusterQuery(deps, indexName, params, firstStage, readDocuments, host) {
|
package/dist/rerankers/http.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-
|
|
2
|
-
import { ErrorCodes, NarsilError } from '../chunk-
|
|
1
|
+
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-HJJI72X7.mjs';
|
|
2
|
+
import { ErrorCodes, NarsilError } from '../chunk-MP7ABPTD.mjs';
|
|
3
3
|
|
|
4
4
|
// src/rerankers/constants.ts
|
|
5
5
|
var DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
|