@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,28 @@
|
|
|
1
|
+
export { clearLeftoversOfName, dropSuggestionIndexesOf, installSuggestionHooks, startQuerySuggestions } from './chunk-7GRCBBME.mjs';
|
|
2
|
+
import './chunk-DIYDOIM4.mjs';
|
|
3
|
+
import './chunk-HUOYZJ3Q.mjs';
|
|
4
|
+
import './chunk-IO2SMUQD.mjs';
|
|
5
|
+
import './chunk-JLIIWJUV.mjs';
|
|
6
|
+
import './chunk-AM7RSBPF.mjs';
|
|
7
|
+
import './chunk-MVXELMJX.mjs';
|
|
8
|
+
import './chunk-NNE4VDMM.mjs';
|
|
9
|
+
import './chunk-LU3Y3P63.mjs';
|
|
10
|
+
import './chunk-RDWG33MM.mjs';
|
|
11
|
+
import './chunk-4Y53T4YE.mjs';
|
|
12
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
13
|
+
import './chunk-3NQOVO3K.mjs';
|
|
14
|
+
import './chunk-JDOEEMEF.mjs';
|
|
15
|
+
import './chunk-7PXRWYUU.mjs';
|
|
16
|
+
import './chunk-YH7QY657.mjs';
|
|
17
|
+
import './chunk-CHPTFFJM.mjs';
|
|
18
|
+
import './chunk-3JIBF3XT.mjs';
|
|
19
|
+
import './chunk-5CQX3XXV.mjs';
|
|
20
|
+
import './chunk-6VBXNFLE.mjs';
|
|
21
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
22
|
+
import './chunk-MJDQU5MW.mjs';
|
|
23
|
+
import './chunk-KWRW5U65.mjs';
|
|
24
|
+
import './chunk-PPEPTUVV.mjs';
|
|
25
|
+
import './chunk-LVIKKAA6.mjs';
|
|
26
|
+
import './chunk-AAAETEJK.mjs';
|
|
27
|
+
import './chunk-JV6VQY2S.mjs';
|
|
28
|
+
import './chunk-DZ7H7D2C.mjs';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-PEHS2UO3.mjs';
|
|
2
|
+
import './chunk-LZSLNSUN.mjs';
|
|
3
|
+
import './chunk-NVVRSRX5.mjs';
|
|
4
|
+
import './chunk-4J74WHQM.mjs';
|
|
5
|
+
import './chunk-HUOYZJ3Q.mjs';
|
|
6
|
+
import './chunk-IO2SMUQD.mjs';
|
|
7
|
+
import './chunk-JLIIWJUV.mjs';
|
|
8
|
+
import './chunk-AM7RSBPF.mjs';
|
|
9
|
+
import './chunk-MVXELMJX.mjs';
|
|
10
|
+
import './chunk-NNE4VDMM.mjs';
|
|
11
|
+
import './chunk-LU3Y3P63.mjs';
|
|
12
|
+
import './chunk-RDWG33MM.mjs';
|
|
13
|
+
import './chunk-4Y53T4YE.mjs';
|
|
14
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
15
|
+
import './chunk-3NQOVO3K.mjs';
|
|
16
|
+
import './chunk-JDOEEMEF.mjs';
|
|
17
|
+
import './chunk-7PXRWYUU.mjs';
|
|
18
|
+
import './chunk-YH7QY657.mjs';
|
|
19
|
+
import './chunk-CHPTFFJM.mjs';
|
|
20
|
+
import './chunk-3JIBF3XT.mjs';
|
|
21
|
+
import './chunk-5CQX3XXV.mjs';
|
|
22
|
+
import './chunk-6VBXNFLE.mjs';
|
|
23
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
24
|
+
import './chunk-MJDQU5MW.mjs';
|
|
25
|
+
import './chunk-KWRW5U65.mjs';
|
|
26
|
+
import './chunk-PPEPTUVV.mjs';
|
|
27
|
+
import './chunk-LVIKKAA6.mjs';
|
|
28
|
+
import './chunk-AAAETEJK.mjs';
|
|
29
|
+
import './chunk-JV6VQY2S.mjs';
|
|
30
|
+
import './chunk-DZ7H7D2C.mjs';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { updateIndexSync } from './chunk-IYNT75CE.mjs';
|
|
2
|
+
import './chunk-JWUCMVRK.mjs';
|
|
3
|
+
import './chunk-Q32DDFKX.mjs';
|
|
4
|
+
import './chunk-JDOEEMEF.mjs';
|
|
5
|
+
import './chunk-DZ7H7D2C.mjs';
|
|
6
|
+
|
|
7
|
+
// src/engine/sync/status.ts
|
|
8
|
+
function syncStatusOf(sync) {
|
|
9
|
+
if (sync === null) return { enabled: false, active: false, epoch: null };
|
|
10
|
+
return {
|
|
11
|
+
enabled: true,
|
|
12
|
+
...sync.historyMaxAgeMs !== void 0 ? { historyMaxAgeMs: sync.historyMaxAgeMs } : {},
|
|
13
|
+
...sync.historyMaxBytes !== void 0 ? { historyMaxBytes: sync.historyMaxBytes } : {},
|
|
14
|
+
active: sync.active,
|
|
15
|
+
epoch: sync.epoch
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// src/engine/sync/methods.ts
|
|
20
|
+
async function updateSyncOf(core, indexName, setting) {
|
|
21
|
+
core.guardShutdown();
|
|
22
|
+
core.requireIndex(indexName);
|
|
23
|
+
await updateIndexSync(core, indexName, setting);
|
|
24
|
+
}
|
|
25
|
+
function syncOf(core, indexName) {
|
|
26
|
+
core.guardShutdown();
|
|
27
|
+
return syncStatusOf(core.requireIndex(indexName).sync);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { syncOf, updateSyncOf };
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, noBuildHistory, recordCheckpoint, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, graphNeedsRebuild, yieldBuildTurn, threadsHoldCurrentLayout, emptyFieldBeforeRestore, recalibrateFromStore, signatureOf, allLiveDocIds, fieldHandlesOf, releaseReplacedVectors, adoptGraph, liveOrdinals, adoptLoadedCalibration, planCheckpoint, deserialize } from './chunk-
|
|
2
|
-
import './chunk-PSWKQVVT.mjs';
|
|
1
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, noBuildHistory, recordCheckpoint, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, graphNeedsRebuild, yieldBuildTurn, threadsHoldCurrentLayout, emptyFieldBeforeRestore, recalibrateFromStore, signatureOf, allLiveDocIds, fieldHandlesOf, releaseReplacedVectors, adoptGraph, liveOrdinals, adoptLoadedCalibration, planCheckpoint, deserialize } from './chunk-KTTAU63H.mjs';
|
|
3
2
|
import { DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, defaultQuantizationFor, DEFAULT_VECTOR_METRIC, ESTIMATED_MS_PER_TOMBSTONE, ESTIMATED_MS_PER_VECTOR_REBUILD, WORKER_COPY_MIN_VECTORS, SHUFFLED_REBUILD_MEMORY_RETRY_MS, SEARCH_ATTEMPTS_BEFORE_HOLDING_WRITES, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, BUILD_STEPS_BETWEEN_CLOCK_CHECKS, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, SEARCH_REFILL_RESERVE, SEARCH_SCAN_CHUNK_VECTORS, DRIFT_CHECK_GROWTH_FACTOR, RECALIBRATION_DRIFT_RATIO, DISK_ADOPTION_YIELD_INTERVAL } from './chunk-HJBJBH26.mjs';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { createVectorFileReader } from './chunk-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import './chunk-PSWKQVVT.mjs';
|
|
4
|
+
import { openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, osqBitsOf, createOsqQuantizer, ordinalFilterValues, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, VECTOR_MEMORY_LIMITS, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, threadedNativeCore, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, nativeStoreScratchBytes, noteFallback, toDistance, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, grownByteLength, createVectorBlock, ensureBlockSlots, sharedMemoryAvailable, createHNSWIndex, topLayerInParts, shuffleInPlace, requireWholeNeighbourLists, createCentroidSums, shuffleStep, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, nativeStoreFor, withNativeThreadSlot, nativeMetricCode, NATIVE_OK, releaseLocksHeldBy } from './chunk-EIOYM5TO.mjs';
|
|
5
|
+
export { releaseLocksHeldBy } from './chunk-EIOYM5TO.mjs';
|
|
6
|
+
import { createVectorFileReader } from './chunk-4DII3ZSM.mjs';
|
|
7
|
+
import { NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, isDead } from './chunk-DVDX4SDR.mjs';
|
|
8
|
+
import { createDocIdMap, turnsAreBudgeted, yieldBackgroundTurn, chargeHeapBytes, holdWritesAndBackgroundWork, backgroundTurnIsSpent, turnIsSpent, yieldTurn, noteThreadSlotLive, noteThreadSlotGone } from './chunk-JLIIWJUV.mjs';
|
|
10
9
|
import './chunk-AM7RSBPF.mjs';
|
|
11
|
-
import './chunk-
|
|
10
|
+
import './chunk-MVXELMJX.mjs';
|
|
11
|
+
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, NATIVE_THREAD_SCAN_CHUNK_ORDINALS, resolveWorkerCount, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-LU3Y3P63.mjs';
|
|
12
|
+
import './chunk-CHPTFFJM.mjs';
|
|
13
|
+
import './chunk-5CQX3XXV.mjs';
|
|
14
|
+
import './chunk-6VBXNFLE.mjs';
|
|
12
15
|
import './chunk-KWRW5U65.mjs';
|
|
13
16
|
import { compareCodePoints } from './chunk-PPEPTUVV.mjs';
|
|
14
17
|
import './chunk-AAAETEJK.mjs';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-YH7W556M.mjs';
|
|
18
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-DZ7H7D2C.mjs';
|
|
17
19
|
|
|
18
20
|
// src/engine/vector-maintenance.ts
|
|
19
21
|
function resolveVectorIndexes(manager, indexName, fieldName) {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-N2WUOWLL.mjs';
|
|
2
|
+
import './chunk-WBYQRHDY.mjs';
|
|
3
|
+
import './chunk-4J74WHQM.mjs';
|
|
4
|
+
import './chunk-C3PTWYKT.mjs';
|
|
5
|
+
import './chunk-GJFXPHXI.mjs';
|
|
6
|
+
import './chunk-F753DA54.mjs';
|
|
7
|
+
import './chunk-4DII3ZSM.mjs';
|
|
8
|
+
import './chunk-6WA3C3DV.mjs';
|
|
9
|
+
import './chunk-HUOYZJ3Q.mjs';
|
|
10
|
+
import './chunk-IO2SMUQD.mjs';
|
|
11
|
+
import './chunk-JLIIWJUV.mjs';
|
|
12
|
+
import './chunk-AM7RSBPF.mjs';
|
|
13
|
+
import './chunk-MVXELMJX.mjs';
|
|
14
|
+
import './chunk-NNE4VDMM.mjs';
|
|
15
|
+
import './chunk-LU3Y3P63.mjs';
|
|
16
|
+
import './chunk-RDWG33MM.mjs';
|
|
17
|
+
import './chunk-4Y53T4YE.mjs';
|
|
18
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
19
|
+
import './chunk-3NQOVO3K.mjs';
|
|
20
|
+
import './chunk-JDOEEMEF.mjs';
|
|
21
|
+
import './chunk-7PXRWYUU.mjs';
|
|
22
|
+
import './chunk-YH7QY657.mjs';
|
|
23
|
+
import './chunk-CHPTFFJM.mjs';
|
|
24
|
+
import './chunk-3JIBF3XT.mjs';
|
|
25
|
+
import './chunk-5CQX3XXV.mjs';
|
|
26
|
+
import './chunk-6VBXNFLE.mjs';
|
|
27
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
28
|
+
import './chunk-MJDQU5MW.mjs';
|
|
29
|
+
import './chunk-KWRW5U65.mjs';
|
|
30
|
+
import './chunk-PPEPTUVV.mjs';
|
|
31
|
+
import './chunk-LVIKKAA6.mjs';
|
|
32
|
+
import './chunk-AAAETEJK.mjs';
|
|
33
|
+
import './chunk-JV6VQY2S.mjs';
|
|
34
|
+
import './chunk-DZ7H7D2C.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBitSet, bitsetIsEmpty, GrowableUint32, bitsetHas, bitsetSet } from './chunk-LVIKKAA6.mjs';
|
|
2
2
|
import { MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-AAAETEJK.mjs';
|
|
3
3
|
import { PHRASE_ROWS_START, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-JV6VQY2S.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
5
5
|
|
|
6
6
|
// src/core/partition/phrase-matching.ts
|
|
7
7
|
var UINT32_BITS = 32;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRequestId } from './chunk-NNE4VDMM.mjs';
|
|
2
|
-
import { resolveWorkerCount, SHUTDOWN_TIMEOUT_MS
|
|
3
|
-
import {
|
|
2
|
+
import { resolveWorkerCount, SHUTDOWN_TIMEOUT_MS } from './chunk-LU3Y3P63.mjs';
|
|
3
|
+
import { fnv1a } from './chunk-CHPTFFJM.mjs';
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
4
5
|
|
|
5
6
|
// src/workers/pool-memory.ts
|
|
6
7
|
function toFinite(value) {
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { withState, unionOfBans } from './chunk-QJXTNPLQ.mjs';
|
|
2
|
+
import { RestoredHistory } from './chunk-GIZTJXYW.mjs';
|
|
3
|
+
import './chunk-ZZT7CEN7.mjs';
|
|
4
|
+
import './chunk-TYIRMPD3.mjs';
|
|
5
|
+
import { installSuggestionHooks, clearLeftoversOfName } from './chunk-7GRCBBME.mjs';
|
|
6
|
+
import { attachedRuntimeOf } from './chunk-DIYDOIM4.mjs';
|
|
7
|
+
import { BUILD_WRITE_BATCH } from './chunk-PJHAB5ZY.mjs';
|
|
8
|
+
import { emitEngineEvent, removeDocumentBatch } from './chunk-HUOYZJ3Q.mjs';
|
|
9
|
+
import './chunk-IO2SMUQD.mjs';
|
|
10
|
+
import './chunk-JLIIWJUV.mjs';
|
|
11
|
+
import './chunk-AM7RSBPF.mjs';
|
|
12
|
+
import './chunk-MVXELMJX.mjs';
|
|
13
|
+
import './chunk-NNE4VDMM.mjs';
|
|
14
|
+
import './chunk-LU3Y3P63.mjs';
|
|
15
|
+
import './chunk-RDWG33MM.mjs';
|
|
16
|
+
import './chunk-4Y53T4YE.mjs';
|
|
17
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
18
|
+
import './chunk-3NQOVO3K.mjs';
|
|
19
|
+
import './chunk-JDOEEMEF.mjs';
|
|
20
|
+
import './chunk-7PXRWYUU.mjs';
|
|
21
|
+
import './chunk-YH7QY657.mjs';
|
|
22
|
+
import './chunk-CHPTFFJM.mjs';
|
|
23
|
+
import './chunk-3JIBF3XT.mjs';
|
|
24
|
+
import './chunk-5CQX3XXV.mjs';
|
|
25
|
+
import './chunk-6VBXNFLE.mjs';
|
|
26
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
27
|
+
import './chunk-MJDQU5MW.mjs';
|
|
28
|
+
import './chunk-KWRW5U65.mjs';
|
|
29
|
+
import './chunk-PPEPTUVV.mjs';
|
|
30
|
+
import './chunk-LVIKKAA6.mjs';
|
|
31
|
+
import './chunk-AAAETEJK.mjs';
|
|
32
|
+
import './chunk-JV6VQY2S.mjs';
|
|
33
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
34
|
+
|
|
35
|
+
// src/query-suggestions/restore-hooks.ts
|
|
36
|
+
function warn(core, event) {
|
|
37
|
+
if (emitEngineEvent(core.eventHandlers, "querySuggestionsWarning", event) > 0) return;
|
|
38
|
+
console.warn("Popular query suggestions warning:", event);
|
|
39
|
+
}
|
|
40
|
+
function requireNoSyncConflict(indexName, entry) {
|
|
41
|
+
if (entry.sync === null || entry.querySuggestions?.querySuggestions?.enabled !== true) return;
|
|
42
|
+
throw new NarsilError(
|
|
43
|
+
ErrorCodes.CONFIG_INVALID,
|
|
44
|
+
`Index "${indexName}" has device sync on, and the archive turns popular query suggestions on, which a synced index cannot hold`,
|
|
45
|
+
{ indexName }
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
async function removeFromOthers(core, engine, indexName, bans) {
|
|
49
|
+
for (const [name, other] of core.indexRegistry) {
|
|
50
|
+
if (name === indexName || other.querySuggestions?.querySuggestionsSource?.index !== indexName) continue;
|
|
51
|
+
for (let start = 0; start < bans.length; start += BUILD_WRITE_BATCH) {
|
|
52
|
+
const result = await engine.removeBatch(name, bans.slice(start, start + BUILD_WRITE_BATCH));
|
|
53
|
+
const failure = result.failed.find((failed) => failed.error.code !== ErrorCodes.DOC_NOT_FOUND);
|
|
54
|
+
if (failure !== void 0) throw failure.error;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function removeFromRestored(core, indexName, bans) {
|
|
59
|
+
for (let start = 0; start < bans.length; start += BUILD_WRITE_BATCH) {
|
|
60
|
+
const result = await removeDocumentBatch(core.mutationCtx, indexName, bans.slice(start, start + BUILD_WRITE_BATCH));
|
|
61
|
+
const failure = result.failed.find((failed) => failed.error.code !== ErrorCodes.DOC_NOT_FOUND);
|
|
62
|
+
if (failure !== void 0) throw failure.error;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async function applyBans(core, engine, indexName, entry) {
|
|
66
|
+
const bans = entry.querySuggestions?.bannedQueries ?? [];
|
|
67
|
+
if (bans.length > 0) await removeFromOthers(core, engine, indexName, bans);
|
|
68
|
+
const marker = entry.querySuggestions?.querySuggestionsSource;
|
|
69
|
+
if (marker === void 0 || marker.index === indexName) return;
|
|
70
|
+
const sourceBans = core.indexRegistry.get(marker.index)?.querySuggestions?.bannedQueries ?? [];
|
|
71
|
+
if (sourceBans.length > 0) await removeFromRestored(core, indexName, sourceBans);
|
|
72
|
+
}
|
|
73
|
+
function restoreSuggestionHooksOf(core, engine, indexName) {
|
|
74
|
+
installSuggestionHooks(core);
|
|
75
|
+
return {
|
|
76
|
+
async historySink(restored) {
|
|
77
|
+
return attachedRuntimeOf(core)?.restoredHistory(indexName, restored?.querySuggestions) ?? null;
|
|
78
|
+
},
|
|
79
|
+
async beforeInstall(entry, previous) {
|
|
80
|
+
requireNoSyncConflict(indexName, entry);
|
|
81
|
+
const previousBans = previous?.querySuggestions?.bannedQueries ?? [];
|
|
82
|
+
if (previousBans.length > 0) {
|
|
83
|
+
const restoredBans = entry.querySuggestions?.bannedQueries ?? [];
|
|
84
|
+
entry.querySuggestions = withState(entry.querySuggestions, {
|
|
85
|
+
bannedQueries: unionOfBans(previousBans, restoredBans)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
if (previous === void 0) await clearLeftoversOfName(core, indexName);
|
|
89
|
+
},
|
|
90
|
+
async afterActivate(entry) {
|
|
91
|
+
try {
|
|
92
|
+
await applyBans(core, engine, indexName, entry);
|
|
93
|
+
} catch (error) {
|
|
94
|
+
warn(core, {
|
|
95
|
+
indexName,
|
|
96
|
+
reason: "ban-removal-failed",
|
|
97
|
+
message: error instanceof Error ? error.message : String(error)
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
async afterInstall(entry, history) {
|
|
102
|
+
const runtime = attachedRuntimeOf(core);
|
|
103
|
+
const enabled = entry.querySuggestions?.querySuggestions?.enabled === true;
|
|
104
|
+
try {
|
|
105
|
+
if (!enabled) {
|
|
106
|
+
if (runtime !== void 0) await runtime.discardHistory(indexName);
|
|
107
|
+
else await core.durability?.manager.removeQueryHistory?.(indexName);
|
|
108
|
+
} else if (runtime === void 0 || runtime.scrambler === null) {
|
|
109
|
+
warn(core, { indexName, reason: "no-key" });
|
|
110
|
+
} else if (history instanceof RestoredHistory) {
|
|
111
|
+
await history.commit();
|
|
112
|
+
}
|
|
113
|
+
} catch (error) {
|
|
114
|
+
warn(core, {
|
|
115
|
+
indexName,
|
|
116
|
+
reason: "save-failed",
|
|
117
|
+
message: error instanceof Error ? error.message : String(error)
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
runtime?.settingChanged(indexName);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { restoreSuggestionHooksOf };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { abandonChangeOf } from './chunk-ALOIBXWN.mjs';
|
|
2
|
+
import { attachedRuntimeOf } from './chunk-DIYDOIM4.mjs';
|
|
3
|
+
|
|
4
|
+
// src/narsil/restore-queue.ts
|
|
5
|
+
function suggestionsInPlay(core, ...entries) {
|
|
6
|
+
return core.querySuggestionHooks !== void 0 || entries.some((entry) => (entry?.querySuggestions ?? null) !== null);
|
|
7
|
+
}
|
|
8
|
+
function suggestionHooksLoadedOnUse(core, engine, indexName) {
|
|
9
|
+
let loaded = null;
|
|
10
|
+
const load = () => {
|
|
11
|
+
loaded ??= import('./restore-hooks-SILFPU6B.mjs').then(
|
|
12
|
+
({ restoreSuggestionHooksOf }) => restoreSuggestionHooksOf(core, engine, indexName)
|
|
13
|
+
);
|
|
14
|
+
return loaded;
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
historySink: async (restored) => attachedRuntimeOf(core)?.restoredHistory(indexName, restored?.querySuggestions) ?? null,
|
|
18
|
+
async beforeInstall(entry, previous) {
|
|
19
|
+
if (suggestionsInPlay(core, entry, previous)) await (await load()).beforeInstall(entry, previous);
|
|
20
|
+
},
|
|
21
|
+
async afterActivate(entry) {
|
|
22
|
+
if (suggestionsInPlay(core, entry)) await (await load()).afterActivate(entry);
|
|
23
|
+
},
|
|
24
|
+
async afterInstall(entry, history) {
|
|
25
|
+
if (suggestionsInPlay(core, entry) || history !== null) await (await load()).afterInstall(entry, history);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function restoreDepsOf(core, host, engine, indexName) {
|
|
30
|
+
return {
|
|
31
|
+
...host,
|
|
32
|
+
querySuggestions: suggestionHooksLoadedOnUse(core, engine, indexName),
|
|
33
|
+
executor: core.executor,
|
|
34
|
+
indexRegistry: core.indexRegistry,
|
|
35
|
+
durability: core.durability,
|
|
36
|
+
filesystemDurability: core.filesystemDurability,
|
|
37
|
+
embeddingAdapters: core.embeddingAdapters,
|
|
38
|
+
markAnalysisStale: core.analysisRebuild.markStale,
|
|
39
|
+
clearAnalysisStale: core.analysisRebuild.clearStale,
|
|
40
|
+
abandonAnalysisRebuild: async (indexName2) => {
|
|
41
|
+
await core.analysisRebuild.abandon(indexName2);
|
|
42
|
+
await abandonChangeOf(core, indexName2);
|
|
43
|
+
},
|
|
44
|
+
abandonAnalysisChange: (indexName2) => abandonChangeOf(core, indexName2),
|
|
45
|
+
indexState: core.indexState,
|
|
46
|
+
copies: core.orchestrator,
|
|
47
|
+
forgetWatermark: core.watermarkNotifier.forget
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
async function runRestore(core, host, indexName, data, engine) {
|
|
51
|
+
const { restoreFromSnapshot } = await import('./snapshot-EZYB6SLF.mjs');
|
|
52
|
+
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host, engine, indexName));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { runRestore };
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-SUPXRTMD.mjs';
|
|
2
|
+
import { syncStorageOf } from './chunk-IYNT75CE.mjs';
|
|
3
|
+
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-PB2YXVQW.mjs';
|
|
4
|
+
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEntryHeaders, tarPadding, tarEnd } from './chunk-4LCEN2IU.mjs';
|
|
5
|
+
import './chunk-CUH5F57W.mjs';
|
|
6
|
+
import { isSyncEpoch } from './chunk-JWUCMVRK.mjs';
|
|
7
|
+
import { oneSyncChangeAtATime } from './chunk-Q32DDFKX.mjs';
|
|
8
|
+
import './chunk-PJHAB5ZY.mjs';
|
|
9
|
+
import './chunk-F753DA54.mjs';
|
|
10
|
+
import { manifestFileRefs } from './chunk-6WA3C3DV.mjs';
|
|
11
|
+
import './chunk-DVDX4SDR.mjs';
|
|
12
|
+
import { emitEngineEvent, encodeIndexConfiguration } from './chunk-HUOYZJ3Q.mjs';
|
|
13
|
+
import './chunk-IO2SMUQD.mjs';
|
|
14
|
+
import './chunk-JLIIWJUV.mjs';
|
|
15
|
+
import './chunk-AM7RSBPF.mjs';
|
|
16
|
+
import './chunk-MVXELMJX.mjs';
|
|
17
|
+
import './chunk-NNE4VDMM.mjs';
|
|
18
|
+
import './chunk-LU3Y3P63.mjs';
|
|
19
|
+
import './chunk-RDWG33MM.mjs';
|
|
20
|
+
import './chunk-4Y53T4YE.mjs';
|
|
21
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
22
|
+
import './chunk-3NQOVO3K.mjs';
|
|
23
|
+
import { withOpenIndex } from './chunk-JDOEEMEF.mjs';
|
|
24
|
+
import './chunk-7PXRWYUU.mjs';
|
|
25
|
+
import { openChecksummedEnvelope, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-YH7QY657.mjs';
|
|
26
|
+
import './chunk-CHPTFFJM.mjs';
|
|
27
|
+
import './chunk-3JIBF3XT.mjs';
|
|
28
|
+
import './chunk-5CQX3XXV.mjs';
|
|
29
|
+
import './chunk-6VBXNFLE.mjs';
|
|
30
|
+
import './chunk-C5G6TJ7A.mjs';
|
|
31
|
+
import './chunk-MJDQU5MW.mjs';
|
|
32
|
+
import './chunk-KWRW5U65.mjs';
|
|
33
|
+
import './chunk-PPEPTUVV.mjs';
|
|
34
|
+
import './chunk-LVIKKAA6.mjs';
|
|
35
|
+
import './chunk-AAAETEJK.mjs';
|
|
36
|
+
import './chunk-JV6VQY2S.mjs';
|
|
37
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
38
|
+
import { decode } from '@msgpack/msgpack';
|
|
39
|
+
|
|
40
|
+
// src/persistence/archive/range-layout.ts
|
|
41
|
+
function archiveLayout(config, manifestBytes, files) {
|
|
42
|
+
const parts = [];
|
|
43
|
+
let at = 0;
|
|
44
|
+
const inline = (bytes) => {
|
|
45
|
+
if (bytes.byteLength === 0) return;
|
|
46
|
+
parts.push({ start: at, length: bytes.byteLength, inline: bytes });
|
|
47
|
+
at += bytes.byteLength;
|
|
48
|
+
};
|
|
49
|
+
for (const [name, bytes] of [
|
|
50
|
+
[ARCHIVE_CONFIG_ENTRY, config],
|
|
51
|
+
[ARCHIVE_MANIFEST_ENTRY, manifestBytes]
|
|
52
|
+
]) {
|
|
53
|
+
for (const header of tarEntryHeaders(name, bytes.byteLength)) inline(header);
|
|
54
|
+
inline(bytes);
|
|
55
|
+
inline(tarPadding(bytes.byteLength));
|
|
56
|
+
}
|
|
57
|
+
for (const file of files) {
|
|
58
|
+
for (const header of tarEntryHeaders(file.name, file.bytes)) inline(header);
|
|
59
|
+
if (file.bytes > 0) {
|
|
60
|
+
parts.push({ start: at, length: file.bytes, file });
|
|
61
|
+
at += file.bytes;
|
|
62
|
+
}
|
|
63
|
+
inline(tarPadding(file.bytes));
|
|
64
|
+
}
|
|
65
|
+
inline(tarEnd());
|
|
66
|
+
return { parts, byteLength: at };
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// src/engine/sync/archive.ts
|
|
70
|
+
function publishedArchiveLayout(indexName, snapshot, storage) {
|
|
71
|
+
const prefix = `${indexName}/`;
|
|
72
|
+
return archiveLayout(
|
|
73
|
+
snapshot.config,
|
|
74
|
+
snapshot.manifestBytes,
|
|
75
|
+
manifestFileRefs(snapshot.manifest).map((ref) => ({
|
|
76
|
+
name: ref.key.slice(prefix.length),
|
|
77
|
+
bytes: ref.bytes,
|
|
78
|
+
read: (offset, length) => storage.readFileRange(ref.key, offset, length)
|
|
79
|
+
}))
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/engine/sync/constants.ts
|
|
84
|
+
var HISTORY_SWEEP_INTERVAL_MS = 36e5;
|
|
85
|
+
var epochsOfSnapshots = /* @__PURE__ */ new WeakMap();
|
|
86
|
+
async function epochOfSnapshot(snapshot) {
|
|
87
|
+
const known = epochsOfSnapshots.get(snapshot);
|
|
88
|
+
if (known !== void 0) return known;
|
|
89
|
+
const { payload } = await openChecksummedEnvelope(snapshot.config, {
|
|
90
|
+
envelopeFormatVersion: INDEX_CONFIGURATION_ENVELOPE_VERSION,
|
|
91
|
+
what: "index configuration",
|
|
92
|
+
allowsCompression: true
|
|
93
|
+
});
|
|
94
|
+
const raw = decode(payload);
|
|
95
|
+
const epoch = raw !== null && typeof raw === "object" && isSyncEpoch(raw.syncEpoch) ? raw.syncEpoch : null;
|
|
96
|
+
epochsOfSnapshots.set(snapshot, epoch);
|
|
97
|
+
return epoch;
|
|
98
|
+
}
|
|
99
|
+
function notEnabled(indexName) {
|
|
100
|
+
return new NarsilError(ErrorCodes.SYNC_NOT_ENABLED, `Index "${indexName}" has device sync off`, { indexName });
|
|
101
|
+
}
|
|
102
|
+
function configurationFor(core, indexName) {
|
|
103
|
+
return async (manifest) => {
|
|
104
|
+
const entry = core.requireIndex(indexName);
|
|
105
|
+
if ((manifest.analysisGeneration ?? 0) !== entry.analysisGeneration) {
|
|
106
|
+
throw new NarsilError(
|
|
107
|
+
ErrorCodes.ANALYSIS_CHANGE_NOT_READY,
|
|
108
|
+
`The analysis of index "${indexName}" changed while the engine published its snapshot`,
|
|
109
|
+
{ indexName }
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
return encodeIndexConfiguration(entry);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
async function publishWithinAnalysis(core, storage, indexName) {
|
|
116
|
+
let lastError = null;
|
|
117
|
+
for (let attempt = 0; attempt < MAX_SNAPSHOT_ANALYSIS_ATTEMPTS; attempt++) {
|
|
118
|
+
try {
|
|
119
|
+
return await storage.publish(indexName, configurationFor(core, indexName));
|
|
120
|
+
} catch (error) {
|
|
121
|
+
if (!(error instanceof NarsilError) || error.code !== ErrorCodes.ANALYSIS_CHANGE_NOT_READY) throw error;
|
|
122
|
+
lastError = error;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
throw lastError;
|
|
126
|
+
}
|
|
127
|
+
function publishedSyncSnapshot(core, indexName, republish = false) {
|
|
128
|
+
const entry = core.requireIndex(indexName);
|
|
129
|
+
if (entry.sync === null) throw notEnabled(indexName);
|
|
130
|
+
const storage = syncStorageOf(core, indexName);
|
|
131
|
+
return withOpenIndex(
|
|
132
|
+
core,
|
|
133
|
+
indexName,
|
|
134
|
+
() => oneSyncChangeAtATime(core.indexRegistry, indexName, async () => {
|
|
135
|
+
const sync = core.requireIndex(indexName).sync;
|
|
136
|
+
if (sync === null) throw notEnabled(indexName);
|
|
137
|
+
if (!sync.active) {
|
|
138
|
+
const activated = { ...sync, active: true };
|
|
139
|
+
core.requireIndex(indexName).sync = activated;
|
|
140
|
+
try {
|
|
141
|
+
await core.durability?.manager.persistMetadata(indexName);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
core.requireIndex(indexName).sync = sync;
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
const current = republish ? null : await storage.published(indexName);
|
|
148
|
+
if (current !== null) {
|
|
149
|
+
const unpin = storage.pin(current);
|
|
150
|
+
if (await epochOfSnapshot(current).catch(() => null) === sync.epoch) {
|
|
151
|
+
return { snapshot: current, epoch: sync.epoch, storage, unpin };
|
|
152
|
+
}
|
|
153
|
+
unpin();
|
|
154
|
+
}
|
|
155
|
+
const snapshot = await publishWithinAnalysis(core, storage, indexName);
|
|
156
|
+
return { snapshot, epoch: sync.epoch, storage, unpin: storage.pin(snapshot) };
|
|
157
|
+
})
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// src/engine/sync/retention.ts
|
|
162
|
+
var statesByCore = /* @__PURE__ */ new WeakMap();
|
|
163
|
+
function stateOf(core) {
|
|
164
|
+
let state = statesByCore.get(core);
|
|
165
|
+
if (state === void 0) {
|
|
166
|
+
state = { running: /* @__PURE__ */ new Map(), again: /* @__PURE__ */ new Set(), sweep: null };
|
|
167
|
+
statesByCore.set(core, state);
|
|
168
|
+
}
|
|
169
|
+
return state;
|
|
170
|
+
}
|
|
171
|
+
async function enforce(core, indexName) {
|
|
172
|
+
const sync = core.indexRegistry.get(indexName)?.sync ?? null;
|
|
173
|
+
const storage = core.durability?.manager.syncStorage?.();
|
|
174
|
+
if (sync === null || !sync.active || storage === void 0 || core.shutdownState.isShutdown) return;
|
|
175
|
+
const published = await storage.published(indexName);
|
|
176
|
+
const maxBytes = sync.historyMaxBytes ?? (published === null ? Number.POSITIVE_INFINITY : publishedArchiveLayout(indexName, published, storage).byteLength);
|
|
177
|
+
const publishesSnapshots = core.mutationCtx.capacityScope !== "partition";
|
|
178
|
+
await storage.enforceHistoryLimits(
|
|
179
|
+
indexName,
|
|
180
|
+
{ maxAgeMs: sync.historyMaxAgeMs ?? DEFAULT_HISTORY_MAX_AGE_MS, maxBytes },
|
|
181
|
+
publishesSnapshots ? async () => {
|
|
182
|
+
const { unpin } = await publishedSyncSnapshot(core, indexName, true);
|
|
183
|
+
unpin();
|
|
184
|
+
} : null,
|
|
185
|
+
Date.now()
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
function scheduleSyncRetention(core, indexName) {
|
|
189
|
+
const state = stateOf(core);
|
|
190
|
+
startSyncRetentionSweep(core);
|
|
191
|
+
if (state.running.has(indexName)) {
|
|
192
|
+
state.again.add(indexName);
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const run = (async () => {
|
|
196
|
+
do {
|
|
197
|
+
state.again.delete(indexName);
|
|
198
|
+
await enforce(core, indexName);
|
|
199
|
+
} while (state.again.has(indexName));
|
|
200
|
+
})().catch((error) => {
|
|
201
|
+
emitEngineEvent(core.eventHandlers, "durabilityError", {
|
|
202
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
203
|
+
});
|
|
204
|
+
}).finally(() => state.running.delete(indexName));
|
|
205
|
+
state.running.set(indexName, run);
|
|
206
|
+
}
|
|
207
|
+
function startSyncRetentionSweep(core) {
|
|
208
|
+
const state = stateOf(core);
|
|
209
|
+
if (state.sweep !== null) return;
|
|
210
|
+
state.sweep = unrefInterval(() => {
|
|
211
|
+
if (core.shutdownState.isShutdown) {
|
|
212
|
+
if (state.sweep !== null) clearInterval(state.sweep);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
for (const [indexName, entry] of core.indexRegistry) {
|
|
216
|
+
if (entry.sync?.active === true) scheduleSyncRetention(core, indexName);
|
|
217
|
+
}
|
|
218
|
+
}, HISTORY_SWEEP_INTERVAL_MS);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export { scheduleSyncRetention, startSyncRetentionSweep };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_RERANK_WINDOW } from './chunk-IO2SMUQD.mjs';
|
|
2
2
|
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-AM7RSBPF.mjs';
|
|
3
3
|
import { MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-AAAETEJK.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-DZ7H7D2C.mjs';
|
|
5
5
|
|
|
6
6
|
// src/search/hybrid-depth.ts
|
|
7
7
|
function fixedHybridDepthOf(hybrid) {
|