@delali/narsil 0.3.1-next.153 → 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 +3 -1
- 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-2OYM7ARW.mjs → analysis-change-3TFIHT5E.mjs} +32 -23
- package/dist/{react-native/chunks/analysis-change-entry-CXNRW324.mjs → analysis-change-entry-KA6JAO4X.mjs} +1 -1
- package/dist/archive-history-E4R73RWD.mjs +29 -0
- package/dist/browser/{analysis-change-2V2HZ2NY.mjs → analysis-change-TC36BU47.mjs} +39 -10
- package/dist/{analysis-change-entry-QD7YNDEE.mjs → browser/analysis-change-entry-4MH3CZXH.mjs} +1 -1
- package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
- package/dist/browser/chunk-23XRXIBW.mjs +85 -0
- package/dist/browser/chunk-3UIEB4QF.mjs +63 -0
- package/dist/browser/{chunk-CSCKZBVJ.mjs → chunk-4EWUGZYZ.mjs} +4 -4
- package/dist/browser/chunk-4WCVMOU3.mjs +151 -0
- package/dist/browser/{chunk-QJCO3TJU.mjs → chunk-56W3HQVJ.mjs} +9 -150
- package/dist/{react-native/chunks/chunk-VGUWIZFQ.mjs → browser/chunk-5TCXK5SB.mjs} +2 -2
- package/dist/browser/chunk-5W3MMTLG.mjs +19 -0
- package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
- package/dist/browser/chunk-A5KUEGDY.mjs +241 -0
- package/dist/browser/{chunk-HT7J73QL.mjs → chunk-ABCXENU5.mjs} +2 -2
- package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
- package/dist/browser/chunk-BXM5XOCA.mjs +315 -0
- package/dist/browser/chunk-CJSYBQ4J.mjs +100 -0
- package/dist/browser/chunk-DSXIBE6N.mjs +78 -0
- package/dist/browser/chunk-ELV4OZOI.mjs +29 -0
- package/dist/{react-native/chunks/chunk-QC4ZRBSX.mjs → browser/chunk-EXQZGUQH.mjs} +2 -79
- package/dist/browser/{chunk-2A2IPRC3.mjs → chunk-FNIFPFB7.mjs} +5 -31
- package/dist/browser/chunk-G64Q6OJF.mjs +96 -0
- package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
- package/dist/browser/chunk-IKDKX5VQ.mjs +1007 -0
- package/dist/browser/chunk-JIJXMI42.mjs +1829 -0
- package/dist/browser/chunk-JVBP5EYO.mjs +1106 -0
- package/dist/browser/{chunk-TQ5UMFG5.mjs → chunk-K4GCSZLI.mjs} +15 -6
- package/dist/browser/{chunk-PM4MUM5N.mjs → chunk-K5AXJBLL.mjs} +6 -5
- package/dist/browser/chunk-KKAMCABR.mjs +432 -0
- package/dist/browser/{chunk-IAXZAVYL.mjs → chunk-LFIWRCEA.mjs} +1 -159
- package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
- package/dist/browser/chunk-ML7THVLJ.mjs +38 -0
- package/dist/browser/chunk-NLWTBAGB.mjs +111 -0
- package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
- package/dist/browser/{chunk-MPK76GVS.mjs → chunk-RA6LSBCM.mjs} +1 -21
- package/dist/browser/{chunk-GJKXW3SF.mjs → chunk-RND5CLX3.mjs} +147 -253
- package/dist/{react-native/chunks/chunk-DFQJ4IJB.mjs → browser/chunk-RQBUNZQW.mjs} +2 -2
- package/dist/browser/{chunk-VD7JEUIR.mjs → chunk-RRO3EV4C.mjs} +9 -8
- package/dist/browser/{chunk-KWYQ6KX4.mjs → chunk-SMEQ36NT.mjs} +162 -2019
- package/dist/{chunk-MDF6PDIA.mjs → browser/chunk-SRMZXJSL.mjs} +8 -1
- package/dist/browser/{chunk-7ZJTRUVW.mjs → chunk-SUDNZKPL.mjs} +2 -2
- package/dist/browser/{chunk-LURXVCHG.mjs → chunk-U3JOQGWX.mjs} +1 -1
- package/dist/browser/chunk-VI7BQR4U.mjs +21 -0
- package/dist/browser/{chunk-B3JM6Z74.mjs → chunk-XY4VVBBO.mjs} +3 -2
- package/dist/browser/chunk-YJHGOJAC.mjs +15 -0
- package/dist/browser/chunk-ZI2V4VD7.mjs +21 -0
- package/dist/browser/{cold-module-YECAK4MN.mjs → cold-module-NEUGHUPA.mjs} +21 -14
- package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
- package/dist/browser/{durability-wiring-LM7WFL6X.mjs → durability-wiring-CVGPRO6D.mjs} +1299 -881
- package/dist/browser/engine-hooks-YXMPHZKZ.mjs +16 -0
- package/dist/browser/import-OM6QAW45.mjs +18 -0
- package/dist/browser/methods-KTQCSIN4.mjs +30 -0
- package/dist/browser/{module-XQLEOYNM.mjs → module-3HNFCBJ5.mjs} +10 -8
- package/dist/browser/{module-KAMRAJLE.mjs → module-E33X4AOK.mjs} +17 -10
- package/dist/browser/operations-OJ3BXS55.mjs +5 -0
- package/dist/browser/{phrase-module-CNKMUY4U.mjs → phrase-module-ZXXU7S3B.mjs} +1 -1
- package/dist/browser/{pool-DTYSPBMQ.mjs → pool-3JLET5RO.mjs} +3 -2
- package/dist/browser/restore-hooks-IF2ZROUP.mjs +113 -0
- package/dist/browser/restore-queue-ZBS7CJA6.mjs +55 -0
- package/dist/browser/retention-ASWUHAYI.mjs +209 -0
- package/dist/browser/{runtime-D2ULZGCN.mjs → runtime-OTAGEFQW.mjs} +1 -1
- package/dist/browser/{snapshot-UGZVMP4H.mjs → snapshot-PN7ZW6Q4.mjs} +80 -315
- package/dist/browser/start-ZIRB7MQ2.mjs +24 -0
- package/dist/browser/sync-state-P5XG6LTQ.mjs +15 -0
- package/dist/browser/{write-I5P5MW4O.mjs → write-HMDYCTV2.mjs} +17 -11
- package/dist/{capabilities-BT-HLDC8.d.ts → capabilities-Da4ywVVl.d.ts} +94 -7
- package/dist/{chunk-LDGGR7YT.mjs → chunk-2MANFZJ3.mjs} +2 -2
- package/dist/{chunk-IZT3G24Q.mjs → chunk-2NE7VCYE.mjs} +2 -2
- package/dist/{chunk-3TVDTACC.mjs → chunk-3C7MTCCI.mjs} +1 -1
- package/dist/chunk-3HB3PEC6.mjs +240 -0
- package/dist/chunk-3HHQLEEQ.mjs +1092 -0
- package/dist/chunk-3OH67G7R.mjs +214 -0
- package/dist/{chunk-ZS6CMXAE.mjs → chunk-3R4UZWQG.mjs} +98 -250
- package/dist/{chunk-65WCV5JO.mjs → chunk-4BYWRYPM.mjs} +1 -1
- package/dist/{chunk-SOUZMPME.mjs → chunk-4KRC2APY.mjs} +7 -194
- package/dist/{chunk-5QMHMELB.mjs → chunk-5FLRXF73.mjs} +8 -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-6MSZ543Y.mjs +32 -0
- package/dist/{chunk-T4CJDBBE.mjs → chunk-6OEGXLBX.mjs} +1 -1
- package/dist/{chunk-3SBJVQLL.mjs → chunk-6RC4K46J.mjs} +2 -2
- package/dist/chunk-7GXJUJ24.mjs +49 -0
- package/dist/{chunk-FNBNZCGP.mjs → chunk-AILVAOLX.mjs} +2 -2
- package/dist/chunk-BDRIVYOK.mjs +72 -0
- package/dist/chunk-BUMREPLU.mjs +15 -0
- package/dist/chunk-BY6ZDGYS.mjs +50 -0
- package/dist/{chunk-5WB2A3XU.mjs → chunk-DCNKVEDB.mjs} +511 -27
- package/dist/{chunk-NITCPDFL.mjs → chunk-DIBHI6W5.mjs} +2 -2
- package/dist/{chunk-4QCSHLNM.mjs → chunk-DUOLGBTE.mjs} +3 -3
- package/dist/chunk-GES7U2PM.mjs +68 -0
- package/dist/chunk-GH4WQ22V.mjs +34 -0
- package/dist/chunk-GQPTDQCL.mjs +54 -0
- package/dist/chunk-H4KHPLHJ.mjs +382 -0
- package/dist/{chunk-7TE2AJIH.mjs → chunk-H6VIGE62.mjs} +13 -10
- package/dist/{chunk-J7M73VY7.mjs → chunk-HJJI72X7.mjs} +1 -1
- package/dist/{chunk-DGRM4EZZ.mjs → chunk-HNVVEQP7.mjs} +1 -1
- package/dist/{chunk-RBEHLIKX.mjs → chunk-HW5TNXBO.mjs} +35 -11
- package/dist/{chunk-KYVRZAYP.mjs → chunk-I54T6CQP.mjs} +2 -69
- package/dist/{chunk-IRWP524D.mjs → chunk-INJYO3BU.mjs} +1 -1
- package/dist/chunk-IPN7S4KX.mjs +130 -0
- package/dist/{chunk-CSHHU7PA.mjs → chunk-J4IWBIVY.mjs} +11 -30
- package/dist/{chunk-G5KHSM6E.mjs → chunk-K4ZIGL2O.mjs} +1 -1
- package/dist/{chunk-6RKSY3BX.mjs → chunk-KBDBPVLN.mjs} +5 -5
- package/dist/{chunk-J4BDAH2W.mjs → chunk-KBKEXQZA.mjs} +2 -2
- package/dist/{chunk-IJSFWGVW.mjs → chunk-KFLK5NA2.mjs} +3 -3
- package/dist/{chunk-YGQOPB2Z.mjs → chunk-KHKIRS5D.mjs} +1 -1
- package/dist/chunk-KJ3RTZDJ.mjs +101 -0
- package/dist/{chunk-2PNYKG2D.mjs → chunk-KMUNHGBQ.mjs} +139 -432
- package/dist/chunk-KP7TYHWT.mjs +92 -0
- package/dist/{chunk-VP6XRMWR.mjs → chunk-KPIV4RUC.mjs} +6 -32
- package/dist/{chunk-NPXVQS33.mjs → chunk-KXCVQWOR.mjs} +4 -3
- package/dist/chunk-KYYABCSW.mjs +72 -0
- package/dist/{chunk-6F6USYII.mjs → chunk-L7ZD4L3K.mjs} +267 -265
- package/dist/{chunk-U46IZNCW.mjs → chunk-LC3FDWTX.mjs} +3 -2
- package/dist/{chunk-6BWLDLS3.mjs → chunk-LHKOSI2J.mjs} +1 -1
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/{react-native/chunks/chunk-YH7W556M.mjs → chunk-MP7ABPTD.mjs} +12 -2
- package/dist/chunk-MT2NRTA6.mjs +216 -0
- package/dist/chunk-NF4DT3IH.mjs +85 -0
- package/dist/{chunk-POUYICOU.mjs → chunk-OIJ64LGT.mjs} +1 -1
- package/dist/{chunk-SEAJS664.mjs → chunk-PCRA7HTI.mjs} +5 -5
- package/dist/chunk-PHQNACDT.mjs +63 -0
- package/dist/chunk-Q622CTMC.mjs +74 -0
- package/dist/{chunk-NVTFQFUL.mjs → chunk-Q7G3BV3Y.mjs} +1 -1
- package/dist/chunk-QDZJM7NI.mjs +23 -0
- package/dist/{chunk-52QQWEBS.mjs → chunk-QH3YIQP4.mjs} +36 -7
- package/dist/chunk-QJVOLKU6.mjs +111 -0
- package/dist/chunk-QUJHMPTP.mjs +30 -0
- package/dist/{chunk-3E4RRF5J.mjs → chunk-RSVULW4Q.mjs} +100 -8
- package/dist/{chunk-IJPK5PGM.mjs → chunk-RVGRFOGN.mjs} +1 -1
- package/dist/chunk-RZWWB2XR.mjs +96 -0
- package/dist/{chunk-KQJVNPRM.mjs → chunk-S2EQU2GE.mjs} +19 -16
- package/dist/chunk-S5LN746F.mjs +10 -0
- package/dist/{chunk-LJ4ENXOD.mjs → chunk-SG3JBNHY.mjs} +2 -2
- package/dist/{chunk-B2FTZNNF.mjs → chunk-SMVH6JBE.mjs} +34 -14
- package/dist/chunk-SY3EWKQY.mjs +242 -0
- package/dist/{chunk-NYSONUB7.mjs → chunk-TQXHPFWT.mjs} +1 -1
- package/dist/{chunk-ZHAXP7SD.mjs → chunk-U4BS74YN.mjs} +26 -238
- package/dist/chunk-UHICS3JI.mjs +83 -0
- package/dist/chunk-UZRZKNNZ.mjs +101 -0
- package/dist/chunk-V6EUBAIT.mjs +19 -0
- package/dist/{chunk-TTCKT2RT.mjs → chunk-VGF7CFRP.mjs} +134 -11
- package/dist/chunk-VHBNF4MA.mjs +543 -0
- package/dist/{chunk-AWNHDBKV.mjs → chunk-VQEUR6T6.mjs} +16 -8
- package/dist/chunk-WQRN64Q6.mjs +196 -0
- package/dist/{chunk-DMNPYF54.mjs → chunk-WZ7YV54N.mjs} +2 -2
- package/dist/chunk-Y4WPNHMC.mjs +50 -0
- package/dist/{chunk-2HJWQPR6.mjs → chunk-YEDIDCR7.mjs} +6 -122
- package/dist/chunk-YEKL4JBK.mjs +96 -0
- package/dist/{chunk-UGVUW27S.mjs → chunk-Z2BE2MAM.mjs} +14 -10
- package/dist/{chunk-3HV7M5OJ.mjs → chunk-ZAUJFLEN.mjs} +11 -135
- package/dist/{chunk-FDG4KXX5.mjs → chunk-ZHCUZZE5.mjs} +6 -4
- package/dist/chunk-ZTW5WTGG.mjs +167 -0
- package/dist/chunk-ZYAY26KG.mjs +29 -0
- package/dist/{client-Cn3gNxUU.d.ts → client-DRv7UVeY.d.ts} +193 -11
- package/dist/client.d.ts +9 -7
- package/dist/client.mjs +120 -7
- package/dist/{cold-module-PYSSBIL7.mjs → cold-module-7XXCEGTZ.mjs} +43 -33
- package/dist/config-CoSig5Ox.d.ts +482 -0
- package/dist/{config-CfhH1IWQ.d.ts → config-DMwffLKn.d.ts} +20 -5
- package/dist/{direct-executor-WYALQSMD.mjs → direct-executor-G5TK7NLA.mjs} +18 -13
- 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 +41 -9
- package/dist/distribution.mjs +9304 -7271
- package/dist/durability-config-GE4U7MCZ.mjs +89 -0
- package/dist/{durability-wiring-7VBZEJLG.mjs → durability-wiring-NCKUC5EO.mjs} +1293 -872
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{config-aIsy7mcL.d.ts → engine-CFxPYqEk.d.ts} +716 -407
- package/dist/engine-hooks-DHCMOADY.mjs +47 -0
- package/dist/{import-GJOMB2HC.mjs → import-NBFXFCSG.mjs} +32 -24
- package/dist/{index-MsF7e5hL.d.ts → index-C4AmUnl1.d.ts} +1 -1
- package/dist/index.browser.mjs +9 -4
- package/dist/index.d.ts +7 -6
- package/dist/index.mjs +29 -21
- package/dist/index.react-native.mjs +19 -12
- package/dist/{long-query-thread-SCUE62TO.mjs → long-query-thread-J4DVRM4A.mjs} +33 -19
- package/dist/methods-7IOINERF.mjs +30 -0
- package/dist/{module-6RLIKSZQ.mjs → module-DWKPBSMN.mjs} +38 -28
- package/dist/{module-AVQEIB7O.mjs → module-UN76TF7I.mjs} +14 -14
- package/dist/operations-G5EP6JPX.mjs +5 -0
- package/dist/{paged-partition-archive-KGRW366Y.mjs → paged-partition-archive-DPNWVSK2.mjs} +46 -31
- package/dist/partial-words.mjs +7 -5
- package/dist/pattern.mjs +4 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +16 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +40 -29
- package/dist/{phrase-module-OUQIRUQU.mjs → phrase-module-ZI4WSQVH.mjs} +1 -1
- package/dist/{pool-UPV5PVPY.mjs → pool-Y4A46T36.mjs} +2 -2
- 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-DXPZRGWF.mjs → analysis-change-6BPDPH6K.mjs} +50 -19
- package/dist/{browser/analysis-change-entry-JL5U2N3Q.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-3JIBF3XT.mjs +191 -0
- package/dist/react-native/chunks/chunk-3NQOVO3K.mjs +1 -0
- package/dist/react-native/chunks/{chunk-UFNCLEQM.mjs → chunk-4DII3ZSM.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-BRNAVOKP.mjs → chunk-4J74WHQM.mjs} +2 -2
- package/dist/react-native/chunks/chunk-4LCEN2IU.mjs +315 -0
- package/dist/react-native/chunks/{chunk-PU55IOG4.mjs → chunk-4Y53T4YE.mjs} +6 -190
- 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-6WA3C3DV.mjs +85 -0
- package/dist/react-native/chunks/chunk-7GRCBBME.mjs +63 -0
- package/dist/react-native/chunks/{chunk-2J2727V4.mjs → chunk-7PXRWYUU.mjs} +1 -1
- package/dist/{browser/chunk-VBX2TI5V.mjs → react-native/chunks/chunk-ALOIBXWN.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-FS7BYE23.mjs → chunk-C3PTWYKT.mjs} +10 -153
- package/dist/react-native/chunks/{chunk-DKJTZ625.mjs → chunk-C5G6TJ7A.mjs} +2 -69
- package/dist/react-native/chunks/chunk-CHPTFFJM.mjs +43 -0
- package/dist/react-native/chunks/{chunk-LRGWK367.mjs → chunk-CKNRFDTZ.mjs} +1 -1
- package/dist/react-native/chunks/chunk-CUH5F57W.mjs +242 -0
- package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
- package/dist/{browser/chunk-55WYRLDZ.mjs → react-native/chunks/chunk-DVDX4SDR.mjs} +2 -2
- package/dist/{browser/chunk-PIS7ZAP7.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +12 -2
- package/dist/react-native/chunks/{chunk-KOCTCUXW.mjs → chunk-EIOYM5TO.mjs} +17 -9
- package/dist/react-native/chunks/chunk-F753DA54.mjs +23 -0
- package/dist/react-native/chunks/chunk-GIZTJXYW.mjs +1007 -0
- package/dist/react-native/chunks/{chunk-CLE3LZ77.mjs → chunk-GJFXPHXI.mjs} +5 -4
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/{chunk-IDFMNRIC.mjs → chunk-HUOYZJ3Q.mjs} +140 -430
- package/dist/react-native/chunks/chunk-IYNT75CE.mjs +111 -0
- package/dist/react-native/chunks/chunk-JDOEEMEF.mjs +38 -0
- package/dist/react-native/chunks/{chunk-LQAKO5QV.mjs → chunk-JLIIWJUV.mjs} +2 -2
- package/dist/react-native/chunks/chunk-JWUCMVRK.mjs +15 -0
- package/dist/react-native/chunks/chunk-KJIG57UD.mjs +1106 -0
- package/dist/react-native/chunks/{chunk-KLZGAOLT.mjs → chunk-KTTAU63H.mjs} +5 -5
- package/dist/react-native/chunks/chunk-LU3Y3P63.mjs +68 -0
- package/dist/{browser/chunk-NVEJJP4R.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +2 -79
- package/dist/react-native/chunks/{chunk-3CTWSQRW.mjs → chunk-MJDQU5MW.mjs} +4 -30
- package/dist/react-native/chunks/{chunk-NFGBOI46.mjs → chunk-MVXELMJX.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-D7LFYPYI.mjs → chunk-N2WUOWLL.mjs} +12 -10
- package/dist/react-native/chunks/chunk-NVVRSRX5.mjs +78 -0
- package/dist/react-native/chunks/{chunk-JYL35A4A.mjs → chunk-OL3WDV53.mjs} +7 -33
- package/dist/react-native/chunks/chunk-PB2YXVQW.mjs +29 -0
- package/dist/react-native/chunks/{chunk-UCJU6WNH.mjs → chunk-PEHS2UO3.mjs} +7 -6
- package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
- package/dist/react-native/chunks/chunk-Q32DDFKX.mjs +19 -0
- package/dist/react-native/chunks/chunk-QJXTNPLQ.mjs +100 -0
- package/dist/react-native/chunks/{chunk-ZCKNBPQ4.mjs → chunk-RDWG33MM.mjs} +2 -2
- package/dist/react-native/chunks/chunk-SUPXRTMD.mjs +96 -0
- package/dist/react-native/chunks/chunk-TYIRMPD3.mjs +432 -0
- package/dist/react-native/chunks/{chunk-TLYD7IJ2.mjs → chunk-U4KSKA4Z.mjs} +1 -1
- package/dist/react-native/chunks/chunk-UNUFZ2QY.mjs +68 -0
- package/dist/react-native/chunks/{chunk-7IQR3SZO.mjs → chunk-VXGE4ZXL.mjs} +151 -257
- package/dist/react-native/chunks/{chunk-R4OPUZQ5.mjs → chunk-WBYQRHDY.mjs} +2 -2
- package/dist/react-native/chunks/chunk-YH7QY657.mjs +288 -0
- package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
- package/dist/react-native/chunks/{cold-module-KFGEWYEL.mjs → cold-module-5PHF6DZR.mjs} +31 -22
- package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
- package/dist/react-native/chunks/{durability-wiring-QKJB2QBT.mjs → durability-wiring-KO565FZC.mjs} +1309 -889
- 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-6W5U4C3H.mjs +30 -0
- package/dist/react-native/chunks/{module-UJ5VUARS.mjs → module-H5MVPSP2.mjs} +13 -11
- package/dist/react-native/chunks/module-ZL5ZG6YB.mjs +34 -0
- package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
- package/dist/react-native/chunks/{phrase-module-76UAPPSG.mjs → phrase-module-RTVKEWJT.mjs} +1 -1
- package/dist/react-native/chunks/{pool-CD4ANYUI.mjs → pool-JR3NJCAF.mjs} +3 -2
- 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-7I7UAWYK.mjs +221 -0
- package/dist/react-native/chunks/{runtime-3MCDLJAF.mjs → runtime-R5E3TB3J.mjs} +1 -1
- package/dist/react-native/chunks/{snapshot-KVBD4LRC.mjs → snapshot-EZYB6SLF.mjs} +90 -323
- package/dist/react-native/chunks/start-SHVZ72I5.mjs +36 -0
- package/dist/react-native/chunks/sync-state-PASCIHHT.mjs +15 -0
- package/dist/react-native/chunks/{write-ES5A3WUA.mjs → write-JUESXHDL.mjs} +27 -19
- package/dist/react-native/partial-words.mjs +8 -5
- package/dist/react-native/pattern.mjs +4 -3
- package/dist/react-native/query-suggestions.mjs +258 -0
- package/dist/react-native/sync.mjs +2299 -0
- package/dist/react-native/synonyms.mjs +7 -4
- package/dist/react.d.ts +11 -10
- package/dist/react.mjs +8 -1
- package/dist/{rerank-3W54N6P2.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-HROPV2QU.mjs +59 -0
- package/dist/{runtime-L2DZYY6N.mjs → runtime-COIUORCN.mjs} +5 -5
- package/dist/{schema-D33CyXCy.d.ts → schema-Jwt928nJ.d.ts} +1 -1
- package/dist/server.d.ts +119 -20
- package/dist/server.mjs +1123 -58
- package/dist/{snapshot-WMX6JCLP.mjs → snapshot-4HS2G2UM.mjs} +106 -49
- package/dist/start-UTWHGH42.mjs +59 -0
- package/dist/sync/filesystem.d.ts +30 -0
- package/dist/sync/filesystem.mjs +271 -0
- package/dist/sync/indexeddb.d.ts +30 -0
- package/dist/sync/indexeddb.mjs +237 -0
- package/dist/sync-state-ZWHLAFLE.mjs +15 -0
- package/dist/sync.browser.mjs +2294 -0
- package/dist/sync.d.ts +23 -0
- package/dist/sync.mjs +2268 -0
- package/dist/synonyms.mjs +6 -4
- package/dist/{tasks-C4ElXr4P.d.ts → tasks-qrJojgST.d.ts} +13 -5
- package/dist/thread-6MOXY2KD.mjs +45 -0
- package/dist/types-BZCGjfLn.d.ts +227 -0
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +7 -7
- package/dist/workers/entry.mjs +8 -8
- package/dist/{write-SKJ6HW7O.mjs → write-GTTWWRRG.mjs} +36 -28
- package/openapi.json +912 -5
- package/package.json +45 -8
- package/dist/browser/import-QOY6ZH6X.mjs +0 -12
- package/dist/browser/restore-queue-UQ6AAUVX.mjs +0 -41
- package/dist/chunk-7LDMWKP6.mjs +0 -209
- package/dist/engine-CJRUHXgf.d.ts +0 -664
- package/dist/react-native/chunks/chunk-L4M7QJNP.mjs +0 -110
- package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
- package/dist/react-native/chunks/gzip.react-native-7JWCLVOB.mjs +0 -3
- package/dist/react-native/chunks/import-XFBCCENV.mjs +0 -22
- package/dist/react-native/chunks/module-FHJ2GOBI.mjs +0 -25
- package/dist/react-native/chunks/restore-queue-H5VCN453.mjs +0 -41
- package/dist/restore-queue-AOF5OTQV.mjs +0 -41
- package/dist/thread-I7DVHHW7.mjs +0 -31
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { suggestionsIndexName, markedSuggestionIndexes, ensureSuggestionsIndex, suggestionDocument, ORIGIN_MANUAL, removeSuggestions, enabledSetting, mergeHistory, groupsToWrite, meetsMinResults, localRuntimeOf } from './browser/chunk-JVBP5EYO.mjs';
|
|
2
|
+
import './browser/chunk-M3MQE2X7.mjs';
|
|
3
|
+
import './browser/chunk-IKDKX5VQ.mjs';
|
|
4
|
+
import './browser/chunk-3UIEB4QF.mjs';
|
|
5
|
+
import './browser/chunk-OEDCEZXJ.mjs';
|
|
6
|
+
import './browser/chunk-ATEBYXP6.mjs';
|
|
7
|
+
import { normaliseBan, banListFromInput, withState } from './browser/chunk-CJSYBQ4J.mjs';
|
|
8
|
+
import { isGroup, invalidSetting, GROUP_FORMAT, resolveSetting, acceptedPhrase, validateSetting, requireFieldsInSchema } from './browser/chunk-KKAMCABR.mjs';
|
|
9
|
+
import './browser/chunk-5W3MMTLG.mjs';
|
|
10
|
+
import { MAX_MANUAL_SUGGESTION_COUNT, MAX_SOURCE_INDEX_NAME_LENGTH, DEFAULT_PREVIEW_LIMIT, MAX_PREVIEW_LIMIT } from './browser/chunk-7IGKGWSQ.mjs';
|
|
11
|
+
import { engineCoreOf } from './browser/chunk-SMEQ36NT.mjs';
|
|
12
|
+
import './browser/chunk-ML7THVLJ.mjs';
|
|
13
|
+
import './browser/chunk-VI7BQR4U.mjs';
|
|
14
|
+
import './browser/chunk-JPTQZWJQ.mjs';
|
|
15
|
+
import './browser/chunk-JIJXMI42.mjs';
|
|
16
|
+
import './browser/chunk-RA6LSBCM.mjs';
|
|
17
|
+
import './browser/chunk-26A5JFT2.mjs';
|
|
18
|
+
import './browser/chunk-HOZW3PKP.mjs';
|
|
19
|
+
import './browser/chunk-4WCVMOU3.mjs';
|
|
20
|
+
import './browser/chunk-TY7L6OXO.mjs';
|
|
21
|
+
import './browser/chunk-4RD3AFSB.mjs';
|
|
22
|
+
import './browser/chunk-LFIWRCEA.mjs';
|
|
23
|
+
import './browser/chunk-GPPOG6PT.mjs';
|
|
24
|
+
import './browser/chunk-WXLBZJMT.mjs';
|
|
25
|
+
import { NarsilError, ErrorCodes } from './browser/chunk-SRMZXJSL.mjs';
|
|
26
|
+
|
|
27
|
+
// src/query-suggestions/preview.ts
|
|
28
|
+
function previewOrder(left, right) {
|
|
29
|
+
if (left.count !== right.count) return right.count - left.count;
|
|
30
|
+
if (left.group !== right.group) return left.group < right.group ? -1 : 1;
|
|
31
|
+
return left.query < right.query ? -1 : left.query > right.query ? 1 : 0;
|
|
32
|
+
}
|
|
33
|
+
async function previewBuild(ctx, indexName, max) {
|
|
34
|
+
const setting = enabledSetting(ctx.host, indexName);
|
|
35
|
+
const merged = await mergeHistory(ctx, indexName, setting, Date.now());
|
|
36
|
+
const { groups } = groupsToWrite(ctx, indexName, setting, merged.result);
|
|
37
|
+
const banned = new Set(ctx.host.view(indexName)?.state?.bannedQueries ?? []);
|
|
38
|
+
const candidates = [];
|
|
39
|
+
for (const group of groups) {
|
|
40
|
+
for (const { phrase, count } of merged.result.groups[group] ?? []) {
|
|
41
|
+
if (!banned.has(phrase)) candidates.push({ group, query: phrase, count });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
candidates.sort(previewOrder);
|
|
45
|
+
const checked = /* @__PURE__ */ new Map();
|
|
46
|
+
const entries = [];
|
|
47
|
+
let next = 0;
|
|
48
|
+
while (next < candidates.length && entries.length < max) {
|
|
49
|
+
const candidate = candidates[next];
|
|
50
|
+
next += 1;
|
|
51
|
+
if (candidate === void 0) break;
|
|
52
|
+
let passes = checked.get(candidate.query);
|
|
53
|
+
if (passes === void 0) {
|
|
54
|
+
passes = await meetsMinResults(ctx, indexName, setting, candidate.query);
|
|
55
|
+
checked.set(candidate.query, passes);
|
|
56
|
+
}
|
|
57
|
+
if (passes) entries.push(candidate);
|
|
58
|
+
}
|
|
59
|
+
return { entries, truncated: next < candidates.length };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// src/query-suggestions/operations.ts
|
|
63
|
+
function requireView(runtime, indexName) {
|
|
64
|
+
const view = runtime.host.view(indexName);
|
|
65
|
+
if (view === null) {
|
|
66
|
+
throw new NarsilError(ErrorCodes.INDEX_NOT_FOUND, `Index "${indexName}" does not exist`, { indexName });
|
|
67
|
+
}
|
|
68
|
+
return view;
|
|
69
|
+
}
|
|
70
|
+
function requireSourceView(runtime, indexName) {
|
|
71
|
+
const view = requireView(runtime, indexName);
|
|
72
|
+
if (view.state?.querySuggestionsSource !== void 0) {
|
|
73
|
+
invalidSetting(`Index "${indexName}" is a suggestions index, so it takes no query suggestions of its own`, {
|
|
74
|
+
indexName
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (indexName.length > MAX_SOURCE_INDEX_NAME_LENGTH) {
|
|
78
|
+
invalidSetting(
|
|
79
|
+
`Index "${indexName}" has a name longer than ${MAX_SOURCE_INDEX_NAME_LENGTH} characters, which leaves no room for the names of its suggestions indexes`,
|
|
80
|
+
{ indexName }
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
return view;
|
|
84
|
+
}
|
|
85
|
+
function requireAcceptable(runtime, indexName, setting) {
|
|
86
|
+
const view = requireSourceView(runtime, indexName);
|
|
87
|
+
requireFieldsInSchema(setting, view.schema);
|
|
88
|
+
if (!setting.enabled) return;
|
|
89
|
+
if (runtime.scrambler === null) {
|
|
90
|
+
invalidSetting("This engine has no query suggestions key, so it cannot turn the feature on", { indexName });
|
|
91
|
+
}
|
|
92
|
+
if (view.hasSync) {
|
|
93
|
+
invalidSetting(
|
|
94
|
+
`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`,
|
|
95
|
+
{ indexName }
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async function updateSetting(runtime, indexName, raw) {
|
|
100
|
+
const setting = validateSetting(raw);
|
|
101
|
+
requireAcceptable(runtime, indexName, setting);
|
|
102
|
+
await runtime.host.updateState(indexName, (current) => {
|
|
103
|
+
requireAcceptable(runtime, indexName, setting);
|
|
104
|
+
return withState(current, { querySuggestions: setting });
|
|
105
|
+
});
|
|
106
|
+
if (!setting.enabled) await runtime.discardHistory(indexName);
|
|
107
|
+
runtime.settingChanged(indexName);
|
|
108
|
+
}
|
|
109
|
+
async function status(runtime, indexName) {
|
|
110
|
+
const view = requireView(runtime, indexName);
|
|
111
|
+
return {
|
|
112
|
+
indexName,
|
|
113
|
+
setting: view.state?.querySuggestions ?? null,
|
|
114
|
+
lastBuild: await runtime.builds.lastBuild(indexName),
|
|
115
|
+
nextBuildAt: runtime.timers.nextBuildAt(indexName),
|
|
116
|
+
suggestionIndexes: [...markedSuggestionIndexes(runtime.host, indexName).values()].sort()
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function previewLimitOf(limit) {
|
|
120
|
+
if (limit === void 0) return DEFAULT_PREVIEW_LIMIT;
|
|
121
|
+
if (typeof limit !== "number" || !Number.isSafeInteger(limit) || limit < 1 || limit > MAX_PREVIEW_LIMIT) {
|
|
122
|
+
invalidSetting(`The preview limit must be a whole number from 1 to ${MAX_PREVIEW_LIMIT}`);
|
|
123
|
+
}
|
|
124
|
+
return limit;
|
|
125
|
+
}
|
|
126
|
+
async function preview(runtime, indexName, limit) {
|
|
127
|
+
const max = previewLimitOf(limit);
|
|
128
|
+
runtime.enabledSetting(indexName);
|
|
129
|
+
const scrambler = runtime.scrambler;
|
|
130
|
+
if (scrambler === null) invalidSetting("This engine has no query suggestions key, so it holds no counts");
|
|
131
|
+
const context = {
|
|
132
|
+
host: runtime.host,
|
|
133
|
+
scrambler,
|
|
134
|
+
saveDay: (name) => runtime.saveDay(name),
|
|
135
|
+
withWriteLock: (name, work) => runtime.withWriteLock(name, work),
|
|
136
|
+
isStopping: () => runtime.isStopping
|
|
137
|
+
};
|
|
138
|
+
return previewBuild(context, indexName, max);
|
|
139
|
+
}
|
|
140
|
+
async function banPhrases(runtime, indexName, next) {
|
|
141
|
+
requireSourceView(runtime, indexName);
|
|
142
|
+
let added = [];
|
|
143
|
+
let stored = [];
|
|
144
|
+
await runtime.host.updateState(indexName, (current) => {
|
|
145
|
+
requireSourceView(runtime, indexName);
|
|
146
|
+
const previous = current?.bannedQueries ?? [];
|
|
147
|
+
stored = next(previous);
|
|
148
|
+
const before = new Set(previous);
|
|
149
|
+
added = stored.filter((phrase) => !before.has(phrase));
|
|
150
|
+
return withState(current, { bannedQueries: stored });
|
|
151
|
+
});
|
|
152
|
+
return { stored, added };
|
|
153
|
+
}
|
|
154
|
+
async function removeFromSuggestions(runtime, indexName, phrases) {
|
|
155
|
+
let holders = 0;
|
|
156
|
+
if (phrases.length === 0) return holders;
|
|
157
|
+
for (const name of markedSuggestionIndexes(runtime.host, indexName).values()) {
|
|
158
|
+
if (await removeSuggestions(runtime.host, name, phrases) > 0) holders += 1;
|
|
159
|
+
}
|
|
160
|
+
return holders;
|
|
161
|
+
}
|
|
162
|
+
function updateBans(runtime, indexName, raw) {
|
|
163
|
+
const phrases = banListFromInput(raw);
|
|
164
|
+
return runtime.withWriteLock(indexName, async () => {
|
|
165
|
+
const { stored, added } = await banPhrases(runtime, indexName, () => phrases);
|
|
166
|
+
await removeFromSuggestions(runtime, indexName, added);
|
|
167
|
+
return stored;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function removeQuery(runtime, indexName, raw) {
|
|
171
|
+
const phrase = normaliseBan(raw);
|
|
172
|
+
return runtime.withWriteLock(indexName, async () => {
|
|
173
|
+
await banPhrases(runtime, indexName, (current) => current.includes(phrase) ? [...current] : [...current, phrase]);
|
|
174
|
+
return removeFromSuggestions(runtime, indexName, [phrase]);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
function manualCountOf(count) {
|
|
178
|
+
if (count === void 0) return 0;
|
|
179
|
+
if (typeof count !== "number" || !Number.isSafeInteger(count) || count < 0 || count > MAX_MANUAL_SUGGESTION_COUNT) {
|
|
180
|
+
invalidSetting(`A suggestion's count must be a whole number from 0 to ${MAX_MANUAL_SUGGESTION_COUNT}`);
|
|
181
|
+
}
|
|
182
|
+
return count;
|
|
183
|
+
}
|
|
184
|
+
function addSuggestion(runtime, indexName, raw) {
|
|
185
|
+
const { group, query, count } = raw ?? {};
|
|
186
|
+
if (!isGroup(group)) invalidSetting(`A suggestion needs a group of ${GROUP_FORMAT}`);
|
|
187
|
+
if (typeof query !== "string") invalidSetting("A suggestion needs its query as a string");
|
|
188
|
+
const documentCount = manualCountOf(count);
|
|
189
|
+
return runtime.withWriteLock(indexName, async () => {
|
|
190
|
+
const view = requireSourceView(runtime, indexName);
|
|
191
|
+
const setting = resolveSetting(view.state?.querySuggestions ?? { enabled: false, fields: [] });
|
|
192
|
+
const phrase = acceptedPhrase(query, setting);
|
|
193
|
+
if (phrase === null) invalidSetting("The suggestion is not a phrase that the setting of the index accepts");
|
|
194
|
+
if ((view.state?.bannedQueries ?? []).includes(phrase)) {
|
|
195
|
+
invalidSetting("The ban list of the index holds this phrase", { indexName });
|
|
196
|
+
}
|
|
197
|
+
const marked = markedSuggestionIndexes(runtime.host, indexName);
|
|
198
|
+
if (!marked.has(group) && marked.size >= setting.maxGroups) {
|
|
199
|
+
invalidSetting(`Index "${indexName}" already has ${setting.maxGroups} groups`, { indexName });
|
|
200
|
+
}
|
|
201
|
+
const name = await ensureSuggestionsIndex(runtime.host, indexName, group);
|
|
202
|
+
const document = suggestionDocument(phrase, documentCount, ORIGIN_MANUAL);
|
|
203
|
+
if (await runtime.host.engine.has(name, phrase)) await runtime.host.engine.update(name, phrase, document);
|
|
204
|
+
else await runtime.host.engine.insert(name, document);
|
|
205
|
+
return name;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
function querySuggestionsOf(runtime) {
|
|
209
|
+
return {
|
|
210
|
+
recordQuery: async (indexName, query) => (await runtime()).record(indexName, query),
|
|
211
|
+
updateSetting: async (indexName, setting) => updateSetting(await runtime(), indexName, setting),
|
|
212
|
+
status: async (indexName) => status(await runtime(), indexName),
|
|
213
|
+
build: async (indexName) => (await runtime()).builds.start(indexName, "caller"),
|
|
214
|
+
preview: async (indexName, limit) => preview(await runtime(), indexName, limit),
|
|
215
|
+
bans: async (indexName) => [...requireView(await runtime(), indexName).state?.bannedQueries ?? []],
|
|
216
|
+
updateBans: async (indexName, phrases) => updateBans(await runtime(), indexName, phrases),
|
|
217
|
+
removeQuery: async (indexName, query) => removeQuery(await runtime(), indexName, query),
|
|
218
|
+
addSuggestion: async (indexName, suggestion) => addSuggestion(await runtime(), indexName, suggestion),
|
|
219
|
+
suggestionsIndexName: (indexName, group) => {
|
|
220
|
+
if (!isGroup(group)) invalidSetting(`A group holds ${GROUP_FORMAT}`);
|
|
221
|
+
return suggestionsIndexName(indexName, group);
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// src/query-suggestions/providers.ts
|
|
227
|
+
var providers = /* @__PURE__ */ new WeakMap();
|
|
228
|
+
function boundQuerySuggestionsOf(owner) {
|
|
229
|
+
return providers.get(owner);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// src/query-suggestions/index.ts
|
|
233
|
+
function querySuggestions(engine) {
|
|
234
|
+
const bound = boundQuerySuggestionsOf(engine);
|
|
235
|
+
if (bound !== void 0) return bound();
|
|
236
|
+
const core = engineCoreOf(engine);
|
|
237
|
+
if (core === void 0) {
|
|
238
|
+
throw new NarsilError(
|
|
239
|
+
ErrorCodes.CONFIG_INVALID,
|
|
240
|
+
"Popular query suggestions need an engine that createNarsil made in this process"
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
return querySuggestionsOf(() => localRuntimeOf(core, engine, void 0));
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { querySuggestions };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { g as Narsil } from './engine-CFxPYqEk.js';
|
|
2
|
+
import { g as QuerySuggestions } from './query-suggestions-CBYkrQ5T.js';
|
|
3
|
+
export { M as ManualQuerySuggestion, Q as QuerySuggestionPreviewEntry, a as QuerySuggestionsBuild, h as QuerySuggestionsBuildEvent, b as QuerySuggestionsBuildTrigger, c as QuerySuggestionsPreview, d as QuerySuggestionsSetting, i as QuerySuggestionsSource, e as QuerySuggestionsStatus, j as QuerySuggestionsWarningEvent, k as QuerySuggestionsWarningReason, R as RecordQueryOutcome, f as RecordQueryResult, l as RecordedQuery } from './query-suggestions-CBYkrQ5T.js';
|
|
4
|
+
import './adapters-pljAqmrC.js';
|
|
5
|
+
import './schema-Jwt928nJ.js';
|
|
6
|
+
import './synonyms-CpOAHPa-.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns popular query suggestions for an engine that {@link createNarsil}
|
|
10
|
+
* made. Give the engine a key through its `querySuggestions` setting before
|
|
11
|
+
* you turn the feature on for an index.
|
|
12
|
+
*
|
|
13
|
+
* @param engine - The engine whose indexes the suggestions come from.
|
|
14
|
+
* @returns The operations that count searches and build suggestions.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
declare function querySuggestions(engine: Narsil): QuerySuggestions;
|
|
19
|
+
|
|
20
|
+
export { QuerySuggestions, querySuggestions };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export { querySuggestions } from './chunk-5FVU47TB.mjs';
|
|
2
|
+
import './chunk-QUJHMPTP.mjs';
|
|
3
|
+
import './chunk-PHQNACDT.mjs';
|
|
4
|
+
import './chunk-S5LN746F.mjs';
|
|
5
|
+
import './chunk-MT2NRTA6.mjs';
|
|
6
|
+
import './chunk-3HHQLEEQ.mjs';
|
|
7
|
+
import './chunk-VHBNF4MA.mjs';
|
|
8
|
+
import './chunk-KP7TYHWT.mjs';
|
|
9
|
+
import './chunk-LNGE7SLY.mjs';
|
|
10
|
+
import './chunk-UZRZKNNZ.mjs';
|
|
11
|
+
import './chunk-H4KHPLHJ.mjs';
|
|
12
|
+
import './chunk-V6EUBAIT.mjs';
|
|
13
|
+
import './chunk-BEZH7VEH.mjs';
|
|
14
|
+
import './chunk-BDRIVYOK.mjs';
|
|
15
|
+
import './chunk-6L3XJXGU.mjs';
|
|
16
|
+
import './chunk-GQPTDQCL.mjs';
|
|
17
|
+
import './chunk-5YNRKI2C.mjs';
|
|
18
|
+
import './chunk-KMUNHGBQ.mjs';
|
|
19
|
+
import './chunk-L7ZD4L3K.mjs';
|
|
20
|
+
import './chunk-HJSN7UYG.mjs';
|
|
21
|
+
import './chunk-LHKOSI2J.mjs';
|
|
22
|
+
import './chunk-XIHUI4KB.mjs';
|
|
23
|
+
import './chunk-3MXV3VHR.mjs';
|
|
24
|
+
import './chunk-EEBCDP36.mjs';
|
|
25
|
+
import './chunk-Z2BE2MAM.mjs';
|
|
26
|
+
import './chunk-ZAUJFLEN.mjs';
|
|
27
|
+
import './chunk-GH4WQ22V.mjs';
|
|
28
|
+
import './chunk-3OH67G7R.mjs';
|
|
29
|
+
import './chunk-IPN7S4KX.mjs';
|
|
30
|
+
import './chunk-KAKQ74LS.mjs';
|
|
31
|
+
import './chunk-7GXJUJ24.mjs';
|
|
32
|
+
import './chunk-Q2UL2TPC.mjs';
|
|
33
|
+
import './chunk-LC3FDWTX.mjs';
|
|
34
|
+
import './chunk-JUKYYXSP.mjs';
|
|
35
|
+
import './chunk-4KRC2APY.mjs';
|
|
36
|
+
import './chunk-FQBFZAWG.mjs';
|
|
37
|
+
import './chunk-WQRN64Q6.mjs';
|
|
38
|
+
import './chunk-GES7U2PM.mjs';
|
|
39
|
+
import './chunk-I54T6CQP.mjs';
|
|
40
|
+
import './chunk-YEDIDCR7.mjs';
|
|
41
|
+
import './chunk-X5CV2E2B.mjs';
|
|
42
|
+
import './chunk-Y4WPNHMC.mjs';
|
|
43
|
+
import './chunk-RZWWB2XR.mjs';
|
|
44
|
+
import './chunk-TGP5M5R7.mjs';
|
|
45
|
+
import './chunk-4BYWRYPM.mjs';
|
|
46
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
47
|
+
import './chunk-U2BKYEC7.mjs';
|
|
48
|
+
import './chunk-QHPYS427.mjs';
|
|
49
|
+
import './chunk-QYRNLLLI.mjs';
|
|
50
|
+
import './chunk-HNVVEQP7.mjs';
|
|
51
|
+
import './chunk-ZXNQEW43.mjs';
|
|
52
|
+
import './chunk-L5ORED7V.mjs';
|
|
53
|
+
import './chunk-KOKM4PQN.mjs';
|
|
54
|
+
import './chunk-Q7G3BV3Y.mjs';
|
|
55
|
+
import './chunk-BTPGQC6Z.mjs';
|
|
56
|
+
import './chunk-LQG5G2LY.mjs';
|
|
57
|
+
import './chunk-ZXX5GZEX.mjs';
|
|
58
|
+
import './chunk-RFBLQLLZ.mjs';
|
|
59
|
+
import './chunk-U476IXKQ.mjs';
|
|
60
|
+
import './chunk-MP7ABPTD.mjs';
|
|
61
|
+
import './chunk-R6A773WK.mjs';
|
|
62
|
+
import './chunk-YTJCGKM4.mjs';
|
package/dist/react-native/chunks/{analysis-change-DXPZRGWF.mjs → analysis-change-6BPDPH6K.mjs}
RENAMED
|
@@ -1,24 +1,32 @@
|
|
|
1
|
-
import { requireAnalysisRebuildMemory } from './chunk-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-NNE4VDMM.mjs';
|
|
6
|
-
import './chunk-L4M7QJNP.mjs';
|
|
1
|
+
import { requireAnalysisRebuildMemory } from './chunk-OL3WDV53.mjs';
|
|
2
|
+
import './chunk-PB2YXVQW.mjs';
|
|
3
|
+
import { targetOfPending, configUnderAnalysis } from './chunk-U4KSKA4Z.mjs';
|
|
4
|
+
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-HUOYZJ3Q.mjs';
|
|
7
5
|
import './chunk-IO2SMUQD.mjs';
|
|
6
|
+
import './chunk-JLIIWJUV.mjs';
|
|
8
7
|
import { ANALYSIS_CHANGE_MEMBERS, ANALYSIS_HOLD_APPLY_INTERVAL_MS } from './chunk-AM7RSBPF.mjs';
|
|
9
|
-
import './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import
|
|
14
|
-
import './chunk-
|
|
8
|
+
import './chunk-MVXELMJX.mjs';
|
|
9
|
+
import './chunk-NNE4VDMM.mjs';
|
|
10
|
+
import './chunk-LU3Y3P63.mjs';
|
|
11
|
+
import './chunk-RDWG33MM.mjs';
|
|
12
|
+
import './chunk-4Y53T4YE.mjs';
|
|
13
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
14
|
+
import './chunk-3NQOVO3K.mjs';
|
|
15
|
+
import './chunk-JDOEEMEF.mjs';
|
|
16
|
+
import './chunk-7PXRWYUU.mjs';
|
|
17
|
+
import './chunk-YH7QY657.mjs';
|
|
18
|
+
import './chunk-CHPTFFJM.mjs';
|
|
19
|
+
import './chunk-3JIBF3XT.mjs';
|
|
20
|
+
import './chunk-5CQX3XXV.mjs';
|
|
21
|
+
import './chunk-6VBXNFLE.mjs';
|
|
22
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
23
|
+
import { getLanguage, resolveIndexAnalysis } from './chunk-MJDQU5MW.mjs';
|
|
15
24
|
import './chunk-KWRW5U65.mjs';
|
|
16
25
|
import { compareCodePoints } from './chunk-PPEPTUVV.mjs';
|
|
17
26
|
import './chunk-LVIKKAA6.mjs';
|
|
18
27
|
import './chunk-AAAETEJK.mjs';
|
|
19
28
|
import './chunk-JV6VQY2S.mjs';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import { NarsilError, ErrorCodes } from './chunk-YH7W556M.mjs';
|
|
29
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
22
30
|
|
|
23
31
|
// src/engine/analysis-change/run.ts
|
|
24
32
|
function createHold(generation) {
|
|
@@ -661,7 +669,8 @@ async function buildAndSwitch(scope) {
|
|
|
661
669
|
};
|
|
662
670
|
let partitionsRebuilt = 0;
|
|
663
671
|
let adopt = () => void 0;
|
|
664
|
-
const
|
|
672
|
+
const refusal = { byRestore: null };
|
|
673
|
+
const isCurrent = () => run.stopReason === null && refusal.byRestore === null && !core.shutdownState.isShutdown && core.indexRegistry.get(indexName) === entry && core.executor.getManager(indexName) === manager;
|
|
665
674
|
emit("started", 0);
|
|
666
675
|
const wasPromoted = core.orchestrator.desyncIndex(indexName);
|
|
667
676
|
try {
|
|
@@ -680,18 +689,27 @@ async function buildAndSwitch(scope) {
|
|
|
680
689
|
},
|
|
681
690
|
onSwitch: () => adopt(),
|
|
682
691
|
...hold === null ? {} : { holdBeforeSwitch: (keepCurrent) => waitForRelease(run, hold, keepCurrent) },
|
|
683
|
-
runSwitch(swap) {
|
|
692
|
+
async runSwitch(swap) {
|
|
684
693
|
const swapWithSynonyms = () => {
|
|
685
694
|
if (!isCurrent()) return false;
|
|
695
|
+
if (core.restoresInFlight.has(indexName)) {
|
|
696
|
+
refusal.byRestore = restoreInFlightError(indexName);
|
|
697
|
+
return false;
|
|
698
|
+
}
|
|
686
699
|
adopt = switchIndex(scope);
|
|
687
700
|
return swap();
|
|
688
701
|
};
|
|
689
|
-
|
|
702
|
+
const releaseSyncEpoch = await holdSyncEpochChange(core, indexName);
|
|
703
|
+
try {
|
|
704
|
+
return await (durable?.checkpointAfterSwitch?.(indexName, swapWithSynonyms) ?? swapWithSynonyms());
|
|
705
|
+
} finally {
|
|
706
|
+
releaseSyncEpoch();
|
|
707
|
+
}
|
|
690
708
|
}
|
|
691
709
|
},
|
|
692
710
|
textRebuildTargetOf(run.target.config, run.target.language, run.target.analysis)
|
|
693
711
|
);
|
|
694
|
-
if (!rebuilt) throw run.stopReason ?? stoppedError(core, indexName);
|
|
712
|
+
if (!rebuilt) throw run.stopReason ?? refusal.byRestore ?? stoppedError(core, indexName);
|
|
695
713
|
await spill?.removeUnread(manager);
|
|
696
714
|
if (entry.durableAnalysis !== null) {
|
|
697
715
|
throw new NarsilError(
|
|
@@ -722,6 +740,16 @@ async function clearPending(core, indexName, entry) {
|
|
|
722
740
|
entry.pendingAnalysis = null;
|
|
723
741
|
await core.durability?.manager.persistMetadata(indexName);
|
|
724
742
|
}
|
|
743
|
+
function restoreInFlightError(indexName) {
|
|
744
|
+
return new NarsilError(
|
|
745
|
+
ErrorCodes.ANALYSIS_CHANGE_REPLACED,
|
|
746
|
+
`A restore of index "${indexName}" is in flight and replaces this analysis change, so try the change again once the restore ends`,
|
|
747
|
+
{ indexName }
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
function requireNoRestoreInFlight(core, indexName) {
|
|
751
|
+
if (core.restoresInFlight.has(indexName)) throw restoreInFlightError(indexName);
|
|
752
|
+
}
|
|
725
753
|
function requireNotRebalancing(core, indexName) {
|
|
726
754
|
if (!core.rebalancingIndexes.has(indexName)) return;
|
|
727
755
|
throw new NarsilError(
|
|
@@ -739,6 +767,7 @@ async function driveRun(core, indexName, entry, run, previous, resumedGeneration
|
|
|
739
767
|
if (run.stopReason !== null) return;
|
|
740
768
|
if (core.indexRegistry.get(indexName) !== entry) throw stoppedError(core, indexName);
|
|
741
769
|
requireNotRebalancing(core, indexName);
|
|
770
|
+
requireNoRestoreInFlight(core, indexName);
|
|
742
771
|
if (resumedGeneration === null && holdsSettings(entry.config, run.target)) {
|
|
743
772
|
if (entry.pendingAnalysis !== null) await clearPending(core, indexName, entry);
|
|
744
773
|
run.finish();
|
|
@@ -759,7 +788,8 @@ async function driveRun(core, indexName, entry, run, previous, resumedGeneration
|
|
|
759
788
|
run.finish();
|
|
760
789
|
} catch (error) {
|
|
761
790
|
run.fail(error);
|
|
762
|
-
const
|
|
791
|
+
const refusedByRestore = run.stopReason === null && error instanceof NarsilError && error.code === ErrorCodes.ANALYSIS_CHANGE_REPLACED;
|
|
792
|
+
const keepsPending = !refusedByRestore && (resumedGeneration !== null || core.shutdownState.isShutdown);
|
|
763
793
|
const stillOwnsPending = runs.get(indexName) === run && run.stopReason === null;
|
|
764
794
|
if (!keepsPending && stillOwnsPending && core.indexRegistry.get(indexName) === entry) {
|
|
765
795
|
if (entry.pendingAnalysis !== null) await clearPending(core, indexName, entry).catch(() => void 0);
|
|
@@ -772,6 +802,7 @@ async function driveRun(core, indexName, entry, run, previous, resumedGeneration
|
|
|
772
802
|
async function changeIndexAnalysis(core, indexName, change) {
|
|
773
803
|
const entry = core.requireIndex(indexName);
|
|
774
804
|
requireNotRebalancing(core, indexName);
|
|
805
|
+
requireNoRestoreInFlight(core, indexName);
|
|
775
806
|
const target = resolveAnalysisTarget(indexName, entry.config, change);
|
|
776
807
|
const runs = runsOf(core);
|
|
777
808
|
const previous = runs.get(indexName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-
|
|
1
|
+
export { abandonChangeOf, resumeChangeOf, resumeEveryChange } from './chunk-ALOIBXWN.mjs';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { historyFilesOf, listHistoryFolder, historyFileOf } from './chunk-ZZT7CEN7.mjs';
|
|
2
|
+
import { attachedRuntimeOf } from './chunk-DIYDOIM4.mjs';
|
|
3
|
+
import { QUERY_HISTORY_ARCHIVE_PREFIX } from './chunk-PJHAB5ZY.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 };
|