@delali/narsil 0.3.1-next.154 → 0.3.1-next.156
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/NOTICE +45 -0
- package/README.md +1 -0
- package/dist/adapters/filesystem.mjs +2 -2
- package/dist/adapters/gcs.mjs +2 -2
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/adapters/s3.mjs +2 -2
- package/dist/{analysis-change-4GCRVRBW.mjs → analysis-change-5BQOQ4BF.mjs} +35 -28
- package/dist/{react-native/chunks/analysis-change-entry-TNLUC6IZ.mjs → analysis-change-entry-TXX6JSMX.mjs} +1 -1
- package/dist/archive-history-E4R73RWD.mjs +29 -0
- package/dist/browser/{analysis-change-IXWPXXJJ.mjs → analysis-change-435CUEPZ.mjs} +32 -12
- package/dist/{analysis-change-entry-KYGSXW4K.mjs → browser/analysis-change-entry-HZXKPPGV.mjs} +1 -1
- package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
- package/dist/browser/{chunk-4PD752F6.mjs → chunk-23XRXIBW.mjs} +1 -1
- package/dist/browser/{chunk-J433A7P3.mjs → chunk-2CFI5VVV.mjs} +5 -5
- package/dist/{react-native/chunks/chunk-3XKMRNRE.mjs → browser/chunk-2TI4SSUP.mjs} +27 -10
- package/dist/browser/chunk-3SSRJMFN.mjs +100 -0
- package/dist/browser/{chunk-2SHAKW2Z.mjs → chunk-3V7DNNZL.mjs} +515 -733
- package/dist/browser/{chunk-C4KS2QNF.mjs → chunk-4NGKC4H4.mjs} +9 -9
- package/dist/browser/{chunk-XRV72TJD.mjs → chunk-6LWDPLTB.mjs} +2 -2
- package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
- package/dist/browser/{chunk-VCOYGVP7.mjs → chunk-7U3WVJUP.mjs} +3 -3
- package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
- package/dist/browser/chunk-BHFQATSC.mjs +432 -0
- package/dist/browser/chunk-CRE3G7F3.mjs +1007 -0
- package/dist/browser/{chunk-QXTPSX2H.mjs → chunk-EA63E3D2.mjs} +7 -7
- package/dist/{react-native/chunks/chunk-DCKMICOB.mjs → browser/chunk-EXQZGUQH.mjs} +1 -1
- package/dist/browser/{chunk-ML6HY7T7.mjs → chunk-G64Q6OJF.mjs} +1 -1
- package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
- package/dist/browser/{chunk-EUNBNLKM.mjs → chunk-IZXVW2ZJ.mjs} +5 -5
- package/dist/browser/{chunk-G7LUMBSG.mjs → chunk-K4Q6KX3R.mjs} +30 -20
- package/dist/browser/{chunk-H6QFBMVE.mjs → chunk-KZWSX6BH.mjs} +3 -3
- package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
- package/dist/browser/chunk-MGI4BCXC.mjs +63 -0
- package/dist/browser/chunk-MOG4OVDK.mjs +51 -0
- package/dist/browser/{chunk-W5X2UFWQ.mjs → chunk-NLWTBAGB.mjs} +12 -3
- package/dist/browser/{chunk-AYY6PIKL.mjs → chunk-NQAME3RK.mjs} +2 -2
- package/dist/browser/{chunk-7MEYN7V6.mjs → chunk-NXQG7DRA.mjs} +29 -14
- package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
- package/dist/{chunk-KUZKUONM.mjs → browser/chunk-SRMZXJSL.mjs} +1 -0
- package/dist/browser/chunk-SSTPBZZX.mjs +1106 -0
- package/dist/browser/{chunk-7TTWXUH6.mjs → chunk-STOWQFT3.mjs} +3 -2
- package/dist/browser/{chunk-26A5JFT2.mjs → chunk-TK63WFXK.mjs} +2 -1
- package/dist/browser/{chunk-SJB6VIZG.mjs → chunk-U3JOQGWX.mjs} +1 -1
- package/dist/browser/{chunk-AJ4HHOVT.mjs → chunk-U4YDIBUT.mjs} +4 -4
- package/dist/browser/{chunk-2FX6ROWR.mjs → chunk-VLJQW4J6.mjs} +2986 -2986
- package/dist/{react-native/chunks/chunk-3O57C2ZO.mjs → browser/chunk-WI4MR75E.mjs} +2 -2
- package/dist/browser/{chunk-3U3QR5YP.mjs → chunk-WN464PTL.mjs} +2 -2
- package/dist/browser/{chunk-U2E3HMYW.mjs → chunk-XAWNZ4G2.mjs} +11 -11
- package/dist/browser/{cold-module-VTUGDYNY.mjs → cold-module-2EHCIV4K.mjs} +20 -18
- package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
- package/dist/browser/{durability-wiring-GL4A7KDV.mjs → durability-wiring-A7BVG2DW.mjs} +50 -153
- package/dist/browser/engine-hooks-E4UD67JD.mjs +17 -0
- package/dist/browser/geo-index-HHWGMNIS.mjs +1386 -0
- package/dist/browser/import-DXYB6756.mjs +19 -0
- package/dist/browser/{methods-LMUTS7OI.mjs → methods-KTQCSIN4.mjs} +3 -3
- package/dist/browser/{module-M4JNBV6V.mjs → module-NIYMEA5R.mjs} +16 -14
- package/dist/browser/{module-EC3FYW7N.mjs → module-TCT66FWA.mjs} +10 -9
- package/dist/browser/operations-OJ3BXS55.mjs +5 -0
- package/dist/browser/{phrase-module-NPYUVX75.mjs → phrase-module-HAT3TLZN.mjs} +2 -2
- package/dist/browser/{pool-WCGDZHJP.mjs → pool-3JLET5RO.mjs} +1 -1
- package/dist/browser/restore-hooks-YPN4ZFCY.mjs +114 -0
- package/dist/browser/restore-queue-G3RQGL3Y.mjs +55 -0
- package/dist/browser/{retention-6QMRS5VK.mjs → retention-ZWVMNC3Q.mjs} +18 -15
- package/dist/browser/{runtime-3EW2AGB6.mjs → runtime-OTAGEFQW.mjs} +1 -1
- package/dist/browser/{snapshot-DN3CRVUQ.mjs → snapshot-VEQNIE6C.mjs} +71 -36
- package/dist/browser/start-BM442C6R.mjs +25 -0
- package/dist/browser/{write-WAWAFGKQ.mjs → write-2EVMZWDE.mjs} +16 -14
- package/dist/{capabilities-B3Brs1Rc.d.ts → capabilities-Da4ywVVl.d.ts} +35 -3
- package/dist/{chunk-K4B7OH65.mjs → chunk-25KDNIZZ.mjs} +2 -2
- package/dist/{chunk-O43Z4MS6.mjs → chunk-2NE7VCYE.mjs} +2 -2
- package/dist/chunk-2UV4QBHW.mjs +1092 -0
- package/dist/{chunk-3Y3J4V2R.mjs → chunk-3C7MTCCI.mjs} +1 -1
- package/dist/{chunk-TRISKD4Q.mjs → chunk-3HYC4JRF.mjs} +2 -2
- package/dist/{chunk-HVYICDY3.mjs → chunk-3OH67G7R.mjs} +1 -1
- package/dist/{chunk-PFKM7VNZ.mjs → chunk-46KY2PJD.mjs} +30 -11
- package/dist/{chunk-IJU7LL7D.mjs → chunk-4KKXNJM6.mjs} +5 -5
- package/dist/{chunk-IQ4R2I6N.mjs → chunk-5FLRXF73.mjs} +5 -1
- package/dist/{chunk-BPSKLCS7.mjs → chunk-5VV4R6P7.mjs} +3017 -3017
- package/dist/chunk-5YNRKI2C.mjs +81 -0
- package/dist/chunk-6HTGOXIK.mjs +875 -0
- package/dist/{chunk-7HCZWC7B.mjs → chunk-6I6AYAXS.mjs} +50 -8
- package/dist/{chunk-C6ASEFZI.mjs → chunk-6OEGXLBX.mjs} +1 -1
- package/dist/{chunk-DVWYODEB.mjs → chunk-6RC4K46J.mjs} +2 -2
- package/dist/chunk-7GFE3PEY.mjs +40 -0
- package/dist/{chunk-QKZHLADX.mjs → chunk-7LXHHCXZ.mjs} +28 -19
- package/dist/{chunk-JUKYYXSP.mjs → chunk-7V5IUP2T.mjs} +1 -31
- package/dist/{react-native/chunks/chunk-7GWPJDOA.mjs → chunk-A4L7YTKX.mjs} +53 -90
- package/dist/{chunk-Z3TNWCI5.mjs → chunk-BU4SAIC4.mjs} +3 -3
- package/dist/chunk-BWZ3P4MU.mjs +20 -0
- package/dist/{chunk-OKX2BBNW.mjs → chunk-CITFCZKF.mjs} +5 -4
- package/dist/{chunk-4HWZV5MK.mjs → chunk-CSLGFPFQ.mjs} +5 -5
- package/dist/chunk-DP5C7YFQ.mjs +543 -0
- package/dist/{chunk-RVKFI3A2.mjs → chunk-DWEPMFJE.mjs} +11 -8
- package/dist/{chunk-LSM2YTKM.mjs → chunk-EFBDHH5P.mjs} +87 -144
- package/dist/{chunk-NZMAXR2S.mjs → chunk-FAKFUDZZ.mjs} +121 -11
- package/dist/chunk-FB6463IN.mjs +1499 -0
- package/dist/{chunk-REL7LFLR.mjs → chunk-FCJ553HS.mjs} +3 -3
- package/dist/{chunk-MMEMEUOO.mjs → chunk-FJKKCV4D.mjs} +2 -2
- package/dist/{chunk-K7KLL263.mjs → chunk-FNGAM5B7.mjs} +14 -13
- package/dist/{chunk-DMQPFLGI.mjs → chunk-FRBFVQFN.mjs} +6 -5
- package/dist/{chunk-IBNLW3AV.mjs → chunk-FYOVBEMM.mjs} +20 -6
- package/dist/chunk-G6HRSGOU.mjs +74 -0
- package/dist/{chunk-USR7FQRZ.mjs → chunk-GH4WQ22V.mjs} +2 -2
- package/dist/chunk-GQPTDQCL.mjs +54 -0
- package/dist/{chunk-VREK3MYG.mjs → chunk-HFPMMRQT.mjs} +3 -3
- package/dist/{chunk-MLHNSAPK.mjs → chunk-HHBUCIUY.mjs} +3 -3
- package/dist/{chunk-YROWNOMH.mjs → chunk-HJJI72X7.mjs} +1 -1
- package/dist/{chunk-ECX4SGX6.mjs → chunk-I2KPOLOZ.mjs} +9 -9
- package/dist/{chunk-TV2L3BN7.mjs → chunk-I53G4JAU.mjs} +266 -265
- package/dist/{chunk-3A5KI24C.mjs → chunk-I54T6CQP.mjs} +1 -1
- package/dist/{chunk-NTZOXVUZ.mjs → chunk-I5B7RXU7.mjs} +93 -24
- package/dist/{chunk-YBJDOA2T.mjs → chunk-INJYO3BU.mjs} +1 -1
- package/dist/{react-native/chunks/chunk-KWRW5U65.mjs → chunk-J4IJTTEX.mjs} +1 -1
- package/dist/{chunk-X6NSJYQ3.mjs → chunk-JDJBQLRO.mjs} +13 -13
- package/dist/{chunk-MMBEANB2.mjs → chunk-JWRUUCWD.mjs} +3 -3
- package/dist/{chunk-AO2FAYIZ.mjs → chunk-K4ZIGL2O.mjs} +1 -1
- package/dist/{chunk-JFNKIBDT.mjs → chunk-K5QFDYST.mjs} +2 -2
- package/dist/{chunk-C73JLU4E.mjs → chunk-KF4EXSM4.mjs} +2 -2
- package/dist/{chunk-WCBA2LVZ.mjs → chunk-KHKIRS5D.mjs} +1 -1
- package/dist/{chunk-7QUGDVFC.mjs → chunk-KJ3RTZDJ.mjs} +1 -1
- package/dist/{chunk-HVKXNBFL.mjs → chunk-KKQC526K.mjs} +20 -12
- package/dist/chunk-KP7TYHWT.mjs +92 -0
- package/dist/{chunk-VMXSVVXG.mjs → chunk-L6V6BST3.mjs} +9 -22
- package/dist/{chunk-URPCYQVJ.mjs → chunk-LHKOSI2J.mjs} +1 -1
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/{react-native/chunks/chunk-CUNGPR5R.mjs → chunk-MP7ABPTD.mjs} +1 -0
- package/dist/{chunk-5KGYQT6W.mjs → chunk-MQOJIO5B.mjs} +26 -9
- package/dist/{chunk-Q3TCTQCC.mjs → chunk-NF4DT3IH.mjs} +1 -1
- package/dist/{chunk-3OFU3NJT.mjs → chunk-OIJ64LGT.mjs} +1 -1
- package/dist/chunk-ORN5BLL7.mjs +11 -0
- package/dist/{chunk-HWEDFLB7.mjs → chunk-P5ZI2P2W.mjs} +126 -1701
- package/dist/{chunk-466PYR4P.mjs → chunk-PWC4VB3Q.mjs} +2 -2
- package/dist/{chunk-B7S6YEBP.mjs → chunk-QJVOLKU6.mjs} +12 -3
- package/dist/{chunk-KCUIFVVW.mjs → chunk-QOW2JPUI.mjs} +9 -9
- package/dist/chunk-RDXO6JST.mjs +63 -0
- package/dist/chunk-RLOES5SX.mjs +31 -0
- package/dist/{chunk-YPUEV6ZC.mjs → chunk-RVGRFOGN.mjs} +1 -1
- package/dist/{chunk-JCLTESFN.mjs → chunk-RZWWB2XR.mjs} +1 -1
- package/dist/chunk-S5LN746F.mjs +10 -0
- package/dist/chunk-SA5LOGO3.mjs +470 -0
- package/dist/chunk-SQJWAIF4.mjs +12 -0
- package/dist/{chunk-YTJCGKM4.mjs → chunk-TBC3XUL2.mjs} +29 -6
- package/dist/chunk-TDIK6NTV.mjs +10 -0
- package/dist/chunk-TGS5UXBE.mjs +216 -0
- package/dist/{chunk-CP5RRPJR.mjs → chunk-TQXHPFWT.mjs} +1 -1
- package/dist/{chunk-7NTMUDC5.mjs → chunk-TZ3355VS.mjs} +5 -5
- package/dist/{chunk-Q7MS6P2J.mjs → chunk-TZTRKM33.mjs} +2 -2
- package/dist/{chunk-4UMZ7KQL.mjs → chunk-U55XJEIG.mjs} +2 -1
- package/dist/{chunk-S2N75OTN.mjs → chunk-UHICS3JI.mjs} +1 -1
- package/dist/{chunk-5FUOVJKG.mjs → chunk-VTTRFF2C.mjs} +32 -19
- package/dist/{chunk-62G63NMH.mjs → chunk-WX4LAO6M.mjs} +4 -4
- package/dist/{chunk-LTUGDMV4.mjs → chunk-WZ7YV54N.mjs} +1 -1
- package/dist/chunk-XAXKV65G.mjs +72 -0
- package/dist/chunk-XXHN7J46.mjs +101 -0
- package/dist/{chunk-PGVPE7GJ.mjs → chunk-YEKL4JBK.mjs} +1 -1
- package/dist/chunk-YTWZVGCB.mjs +382 -0
- package/dist/chunk-Z2KAFCRT.mjs +30 -0
- package/dist/{chunk-LKUE5GXS.mjs → chunk-ZKP7G7TV.mjs} +2 -2
- package/dist/{client-Df76GNKm.d.ts → client-DRv7UVeY.d.ts} +123 -11
- package/dist/client.d.ts +9 -8
- package/dist/client.mjs +65 -3
- package/dist/{cold-module-YLWMTTZG.mjs → cold-module-6MO2XJF2.mjs} +45 -39
- package/dist/{config-B8DP2VwR.d.ts → config-CoSig5Ox.d.ts} +22 -3
- package/dist/{config-05G_hy-1.d.ts → config-DMwffLKn.d.ts} +20 -5
- package/dist/direct-executor-FTMYY3TI.mjs +34 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +3 -3
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.mjs +2 -2
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +6799 -5939
- package/dist/durability-config-GE4U7MCZ.mjs +89 -0
- package/dist/{durability-wiring-RHLXDIVF.mjs → durability-wiring-VIF5MOSY.mjs} +82 -179
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{sync-uXR7MmM7.d.ts → engine-CFxPYqEk.d.ts} +702 -2
- package/dist/engine-hooks-EGUGNZYE.mjs +54 -0
- package/dist/geo-index-MRH5JMIR.mjs +1387 -0
- package/dist/import-XKDPJQDP.mjs +56 -0
- package/dist/{index-nRqDM6uS.d.ts → index-C4AmUnl1.d.ts} +1 -1
- package/dist/index.browser.mjs +9 -7
- package/dist/index.d.ts +134 -9
- package/dist/index.mjs +33 -26
- package/dist/index.react-native.mjs +20 -17
- package/dist/invalidation/filesystem.mjs +2 -2
- package/dist/{long-query-thread-EMYTGSJP.mjs → long-query-thread-YA4IAYSY.mjs} +34 -28
- package/dist/{methods-ABM5ELBR.mjs → methods-7IOINERF.mjs} +3 -3
- package/dist/{module-MG7JMV2U.mjs → module-FQ4JWNQJ.mjs} +41 -34
- package/dist/{module-3OMJZUFT.mjs → module-N55W4Q5C.mjs} +14 -14
- package/dist/operations-G5EP6JPX.mjs +5 -0
- package/dist/{paged-partition-archive-UOLHOEZJ.mjs → paged-partition-archive-PXW5XAYU.mjs} +48 -38
- package/dist/partial-words.mjs +11 -9
- package/dist/pattern.mjs +6 -5
- package/dist/persistence/durability/checkpoint-worker.d.ts +8 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +44 -35
- package/dist/{phrase-module-O3MDRQXP.mjs → phrase-module-XW5MKWP5.mjs} +4 -3
- package/dist/{pool-CQXYPFLG.mjs → pool-Y4A46T36.mjs} +1 -1
- package/dist/query-suggestions/merge-worker.d.ts +55 -0
- package/dist/query-suggestions/merge-worker.mjs +88 -0
- package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
- package/dist/query-suggestions.browser.mjs +247 -0
- package/dist/query-suggestions.d.ts +20 -0
- package/dist/query-suggestions.mjs +69 -0
- package/dist/react-native/chunks/{analysis-change-EAYO3Y6Q.mjs → analysis-change-LT5QBQ3H.mjs} +43 -22
- package/dist/{browser/analysis-change-entry-FCSHFQSS.mjs → react-native/chunks/analysis-change-entry-SCVWK6OU.mjs} +1 -1
- package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
- package/dist/{chunk-ZIFJXCKA.mjs → react-native/chunks/chunk-2PRHILX3.mjs} +54 -20
- package/dist/react-native/chunks/{chunk-VQSKZ3EZ.mjs → chunk-3JWDECAZ.mjs} +8 -8
- package/dist/{chunk-R6A773WK.mjs → react-native/chunks/chunk-3WI35N75.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-75VWIY35.mjs → chunk-4DII3ZSM.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-NKIZX26F.mjs → chunk-4J74WHQM.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-UWDNZDWK.mjs → chunk-4JYO3JD2.mjs} +6 -6
- package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
- package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
- package/dist/react-native/chunks/{chunk-SJWDBRNP.mjs → chunk-6WA3C3DV.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-OQQVRWZ2.mjs → chunk-C5G6TJ7A.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-RVAEBN74.mjs → chunk-CKNRFDTZ.mjs} +1 -1
- package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
- package/dist/react-native/chunks/{chunk-O32RB3BL.mjs → chunk-DNXOMPAQ.mjs} +4 -4
- package/dist/react-native/chunks/{chunk-YBEW6YTR.mjs → chunk-DVDX4SDR.mjs} +2 -2
- package/dist/react-native/chunks/chunk-DXRSEWA2.mjs +12 -0
- package/dist/{browser/chunk-MYITLCHT.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +1 -0
- package/dist/react-native/chunks/{chunk-PPEPTUVV.mjs → chunk-EJ33LCHV.mjs} +29 -6
- package/dist/react-native/chunks/{chunk-RYMDHGL4.mjs → chunk-ENLMYKSX.mjs} +3045 -3075
- package/dist/react-native/chunks/chunk-FHPW7P2O.mjs +40 -0
- package/dist/react-native/chunks/{chunk-JV6VQY2S.mjs → chunk-FTZHMRD2.mjs} +2 -1
- package/dist/react-native/chunks/{chunk-YHKZSLOC.mjs → chunk-G43IPIDG.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-AUT7PMA4.mjs → chunk-GXX3DQXP.mjs} +8 -22
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/{chunk-DH3TVWWK.mjs → chunk-IYNT75CE.mjs} +12 -3
- package/dist/react-native/chunks/chunk-KV46CT4D.mjs +1007 -0
- package/dist/{browser/chunk-ZPTA75ZC.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-63YSZOXB.mjs → chunk-MIP4SOR6.mjs} +1480 -826
- package/dist/react-native/chunks/{chunk-ZBSWRSBG.mjs → chunk-MJDQU5MW.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-GFYFQLJD.mjs → chunk-MUWD2H2S.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-IOY2SM2P.mjs → chunk-MVXELMJX.mjs} +1 -1
- package/dist/{browser/chunk-TTD27VXX.mjs → react-native/chunks/chunk-NB3LP33V.mjs} +27 -10
- package/dist/react-native/chunks/{chunk-I5PGWQJF.mjs → chunk-PDRWWPKV.mjs} +33 -24
- package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
- package/dist/react-native/chunks/{chunk-2CGSQM4O.mjs → chunk-POPDAGH6.mjs} +13 -13
- package/dist/react-native/chunks/{chunk-NP7DD4G5.mjs → chunk-QUKQNI3H.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-EH5CFV6Z.mjs → chunk-RDWG33MM.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-JX2RIAXH.mjs → chunk-SK2PWYDH.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-ZYDKJXQJ.mjs → chunk-SUPXRTMD.mjs} +1 -1
- package/dist/react-native/chunks/chunk-TP6KCKER.mjs +63 -0
- package/dist/react-native/chunks/{chunk-JPAJWO6D.mjs → chunk-U4KSKA4Z.mjs} +1 -1
- package/dist/react-native/chunks/chunk-UQ4OAXKU.mjs +1106 -0
- package/dist/react-native/chunks/{chunk-VVFYOADG.mjs → chunk-VWUDIOT6.mjs} +6 -6
- package/dist/{browser/chunk-SIR3LMTV.mjs → react-native/chunks/chunk-WBYQRHDY.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-C2H2QQFW.mjs → chunk-YH7QY657.mjs} +3 -3
- package/dist/react-native/chunks/{chunk-NCJS3WIY.mjs → chunk-YZW4CHM6.mjs} +51 -12
- package/dist/react-native/chunks/chunk-ZLWVW734.mjs +100 -0
- package/dist/react-native/chunks/chunk-ZXZFN7FI.mjs +432 -0
- package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
- package/dist/react-native/chunks/{cold-module-TJL6AFAD.mjs → cold-module-KVZYUGRY.mjs} +31 -28
- package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
- package/dist/react-native/chunks/{durability-wiring-RRDYJLLM.mjs → durability-wiring-34OYO32E.mjs} +60 -162
- package/dist/react-native/chunks/engine-hooks-M7JV46NH.mjs +30 -0
- package/dist/react-native/chunks/geo-index-PX3BIHAH.mjs +1387 -0
- package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
- package/dist/react-native/chunks/import-H6AQREWI.mjs +32 -0
- package/dist/react-native/chunks/{methods-X6F36SJE.mjs → methods-6W5U4C3H.mjs} +3 -3
- package/dist/react-native/chunks/module-LBZPGOWH.mjs +36 -0
- package/dist/react-native/chunks/{module-S4DKSWMF.mjs → module-TTEVPRCW.mjs} +14 -13
- package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
- package/dist/react-native/chunks/{phrase-module-JZ37TB7N.mjs → phrase-module-QK22HSQ2.mjs} +2 -2
- package/dist/react-native/chunks/{pool-RTGXJXPU.mjs → pool-JR3NJCAF.mjs} +1 -1
- package/dist/react-native/chunks/restore-hooks-IBGIY3DR.mjs +127 -0
- package/dist/react-native/chunks/restore-queue-ZZX54AH7.mjs +55 -0
- package/dist/react-native/chunks/{retention-PPCTP2VY.mjs → retention-EW4TTDFB.mjs} +29 -25
- package/dist/react-native/chunks/{runtime-KUATOLYB.mjs → runtime-R5E3TB3J.mjs} +1 -1
- package/dist/react-native/chunks/{snapshot-ZBIEOZTZ.mjs → snapshot-REYVIN3X.mjs} +80 -44
- package/dist/react-native/chunks/start-BQK6KN3R.mjs +38 -0
- package/dist/react-native/chunks/{write-2W4FTX7J.mjs → write-FQAYCZF5.mjs} +27 -24
- package/dist/react-native/partial-words.mjs +11 -9
- package/dist/react-native/pattern.mjs +4 -4
- package/dist/react-native/query-suggestions.mjs +260 -0
- package/dist/react-native/sync.mjs +78 -15
- package/dist/react-native/synonyms.mjs +95 -27
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +1 -0
- package/dist/{rerank-IZOB6NII.mjs → rerank-MQ37IYRV.mjs} +4 -4
- package/dist/rerankers/http.mjs +2 -2
- package/dist/restore-hooks-CDERDEF4.mjs +153 -0
- package/dist/restore-queue-7NNSTROA.mjs +55 -0
- package/dist/retention-QSVBBNRM.mjs +66 -0
- package/dist/{runtime-UZOC3NPY.mjs → runtime-COIUORCN.mjs} +5 -5
- package/dist/{schema-DDauvDOv.d.ts → schema-Jwt928nJ.d.ts} +1 -1
- package/dist/server.d.ts +108 -12
- package/dist/server.mjs +303 -50
- package/dist/{snapshot-NFX2EYN2.mjs → snapshot-RH4NSKIZ.mjs} +98 -61
- package/dist/start-MCKCOGIW.mjs +66 -0
- package/dist/sync/filesystem.d.ts +4 -4
- package/dist/sync/filesystem.mjs +6 -6
- package/dist/sync/indexeddb.d.ts +4 -4
- package/dist/sync/indexeddb.mjs +2 -2
- package/dist/sync.browser.mjs +74 -11
- package/dist/sync.d.ts +5 -5
- package/dist/sync.mjs +78 -16
- package/dist/synonyms.mjs +9 -8
- package/dist/{tasks-BShx8pdK.d.ts → tasks-qrJojgST.d.ts} +13 -5
- package/dist/thread-O4SBJJJS.mjs +50 -0
- package/dist/{types-SnO7_tAI.d.ts → types-BZCGjfLn.d.ts} +2 -3
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +8 -8
- package/dist/workers/entry.mjs +19 -8
- package/dist/{write-FGB62BHQ.mjs → write-3FK7NG3Y.mjs} +40 -33
- package/openapi.json +798 -7
- package/package.json +32 -8
- package/dist/browser/import-YI5GNB4H.mjs +0 -17
- package/dist/browser/operations-WVYLF72Q.mjs +0 -5
- package/dist/browser/restore-queue-TYIGDL5L.mjs +0 -41
- package/dist/chunk-37IVJLP6.mjs +0 -44
- package/dist/chunk-DJHHF2L5.mjs +0 -17
- package/dist/direct-executor-FI5GJHWX.mjs +0 -29
- package/dist/engine-DYu-e0oR.d.ts +0 -674
- package/dist/import-SRBNC6TE.mjs +0 -49
- package/dist/operations-PGOAY2KS.mjs +0 -5
- package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
- package/dist/react-native/chunks/gzip.react-native-DNB5YNFA.mjs +0 -3
- package/dist/react-native/chunks/import-JYBMEJPQ.mjs +0 -29
- package/dist/react-native/chunks/module-QT5HZAY4.mjs +0 -33
- package/dist/react-native/chunks/operations-RYKTSZQA.mjs +0 -5
- package/dist/react-native/chunks/restore-queue-ZBVIKJWI.mjs +0 -41
- package/dist/restore-queue-COI2GSSK.mjs +0 -41
- package/dist/retention-55WA7GPU.mjs +0 -58
- package/dist/thread-P2G2FWM2.mjs +0 -44
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-IZXVW2ZJ.mjs';
|
|
2
|
+
import './chunk-EXQZGUQH.mjs';
|
|
3
|
+
import './chunk-DSXIBE6N.mjs';
|
|
4
|
+
import './chunk-6LWDPLTB.mjs';
|
|
5
|
+
import './chunk-3V7DNNZL.mjs';
|
|
6
|
+
import './chunk-ML7THVLJ.mjs';
|
|
7
|
+
import './chunk-VI7BQR4U.mjs';
|
|
8
|
+
import './chunk-JPTQZWJQ.mjs';
|
|
9
|
+
import './chunk-STOWQFT3.mjs';
|
|
10
|
+
import './chunk-RA6LSBCM.mjs';
|
|
11
|
+
import './chunk-MOG4OVDK.mjs';
|
|
12
|
+
import './chunk-TK63WFXK.mjs';
|
|
13
|
+
import './chunk-XAWNZ4G2.mjs';
|
|
14
|
+
import './chunk-TY7L6OXO.mjs';
|
|
15
|
+
import './chunk-4RD3AFSB.mjs';
|
|
16
|
+
import './chunk-NXQG7DRA.mjs';
|
|
17
|
+
import './chunk-GPPOG6PT.mjs';
|
|
18
|
+
import './chunk-WXLBZJMT.mjs';
|
|
19
|
+
import './chunk-SRMZXJSL.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { updateIndexSync } from './chunk-
|
|
2
|
-
import './chunk-5W3MMTLG.mjs';
|
|
1
|
+
import { updateIndexSync } from './chunk-NLWTBAGB.mjs';
|
|
3
2
|
import './chunk-YJHGOJAC.mjs';
|
|
3
|
+
import './chunk-5W3MMTLG.mjs';
|
|
4
4
|
import './chunk-ML7THVLJ.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-SRMZXJSL.mjs';
|
|
6
6
|
|
|
7
7
|
// src/engine/sync/status.ts
|
|
8
8
|
function syncStatusOf(sync) {
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
1
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-4NGKC4H4.mjs';
|
|
2
|
+
import './chunk-WI4MR75E.mjs';
|
|
3
|
+
import './chunk-6LWDPLTB.mjs';
|
|
4
|
+
import './chunk-EA63E3D2.mjs';
|
|
5
|
+
import './chunk-KZWSX6BH.mjs';
|
|
6
6
|
import './chunk-ZI2V4VD7.mjs';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-23XRXIBW.mjs';
|
|
8
|
+
import './chunk-3V7DNNZL.mjs';
|
|
9
|
+
import './chunk-ML7THVLJ.mjs';
|
|
8
10
|
import './chunk-VI7BQR4U.mjs';
|
|
9
11
|
import './chunk-JPTQZWJQ.mjs';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-7TTWXUH6.mjs';
|
|
12
|
+
import './chunk-STOWQFT3.mjs';
|
|
12
13
|
import './chunk-RA6LSBCM.mjs';
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import './chunk-MOG4OVDK.mjs';
|
|
15
|
+
import './chunk-TK63WFXK.mjs';
|
|
16
|
+
import './chunk-U3JOQGWX.mjs';
|
|
17
|
+
import './chunk-XAWNZ4G2.mjs';
|
|
16
18
|
import './chunk-TY7L6OXO.mjs';
|
|
17
19
|
import './chunk-4RD3AFSB.mjs';
|
|
18
|
-
import './chunk-
|
|
20
|
+
import './chunk-NXQG7DRA.mjs';
|
|
21
|
+
import './chunk-GPPOG6PT.mjs';
|
|
19
22
|
import './chunk-WXLBZJMT.mjs';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-MYITLCHT.mjs';
|
|
23
|
+
import './chunk-SRMZXJSL.mjs';
|
|
@@ -1,17 +1,18 @@
|
|
|
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-
|
|
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-U4YDIBUT.mjs';
|
|
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-3I27KXQD.mjs';
|
|
2
3
|
import './chunk-OIZS5KIX.mjs';
|
|
3
4
|
import { spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, isDead } from './chunk-
|
|
8
|
-
import {
|
|
9
|
-
import { createDocIdMap, turnIsSpent, yieldTurn, resolveWorkerEntry, detectRuntime, noteThreadSlotLive, noteThreadSlotGone } from './chunk-U2E3HMYW.mjs';
|
|
5
|
+
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, adoptBackgroundScheduler, VECTOR_MEMORY_LIMITS, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, turnsAreBudgeted, yieldBackgroundTurn, 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, holdWritesAndBackgroundWork, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, UI_THREAD_HOP_BEFORE_TURN_WITHIN_MS, grownByteLength, createVectorBlock, ensureBlockSlots, sharedMemoryAvailable, UI_THREAD_TURN_BUDGET_MS, createHNSWIndex, topLayerInParts, shuffleInPlace, requireWholeNeighbourLists, backgroundTurnIsSpent, createCentroidSums, shuffleStep, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, nativeStoreFor, withNativeThreadSlot, nativeMetricCode, NATIVE_OK, releaseLocksHeldBy, UI_THREAD_BACKGROUND_SLICE_DURING_WRITES_MS } from './chunk-VLJQW4J6.mjs';
|
|
6
|
+
export { releaseLocksHeldBy } from './chunk-VLJQW4J6.mjs';
|
|
7
|
+
import { createVectorFileReader } from './chunk-U3JOQGWX.mjs';
|
|
8
|
+
import { NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, isDead } from './chunk-WN464PTL.mjs';
|
|
9
|
+
import { createDocIdMap, turnIsSpent, yieldTurn, resolveWorkerEntry, detectRuntime, noteThreadSlotLive, noteThreadSlotGone } from './chunk-XAWNZ4G2.mjs';
|
|
10
10
|
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, WORKER_YOUNG_GENERATION_MB, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-TY7L6OXO.mjs';
|
|
11
11
|
import './chunk-4RD3AFSB.mjs';
|
|
12
|
-
import { compareCodePoints } from './chunk-
|
|
12
|
+
import { compareCodePoints } from './chunk-NXQG7DRA.mjs';
|
|
13
|
+
import './chunk-GPPOG6PT.mjs';
|
|
13
14
|
import './chunk-WXLBZJMT.mjs';
|
|
14
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-
|
|
15
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-SRMZXJSL.mjs';
|
|
15
16
|
|
|
16
17
|
// src/engine/vector-maintenance.ts
|
|
17
18
|
function resolveVectorIndexes(manager, indexName, fieldName) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createBitSet, bitsetIsEmpty, GrowableUint32, PHRASE_ROWS_START, bitsetHas, bitsetSet, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-
|
|
1
|
+
import { createBitSet, bitsetIsEmpty, GrowableUint32, PHRASE_ROWS_START, bitsetHas, bitsetSet, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-TK63WFXK.mjs';
|
|
2
2
|
import { MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-WXLBZJMT.mjs';
|
|
3
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
4
4
|
|
|
5
5
|
// src/core/partition/phrase-matching.ts
|
|
6
6
|
var UINT32_BITS = 32;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequestId } from './chunk-VI7BQR4U.mjs';
|
|
2
2
|
import { fnv1a } from './chunk-RA6LSBCM.mjs';
|
|
3
3
|
import { resolveWorkerCount, SHUTDOWN_TIMEOUT_MS } from './chunk-TY7L6OXO.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
5
5
|
|
|
6
6
|
// src/workers/pool-memory.ts
|
|
7
7
|
function toFinite(value) {
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { withState, unionOfBans } from './chunk-3SSRJMFN.mjs';
|
|
2
|
+
import { RestoredHistory } from './chunk-CRE3G7F3.mjs';
|
|
3
|
+
import './chunk-BHFQATSC.mjs';
|
|
4
|
+
import { installSuggestionHooks, clearLeftoversOfName } from './chunk-MGI4BCXC.mjs';
|
|
5
|
+
import './chunk-OEDCEZXJ.mjs';
|
|
6
|
+
import { attachedRuntimeOf } from './chunk-ATEBYXP6.mjs';
|
|
7
|
+
import { BUILD_WRITE_BATCH } from './chunk-7IGKGWSQ.mjs';
|
|
8
|
+
import { emitEngineEvent, removeDocumentBatch } from './chunk-3V7DNNZL.mjs';
|
|
9
|
+
import './chunk-ML7THVLJ.mjs';
|
|
10
|
+
import './chunk-VI7BQR4U.mjs';
|
|
11
|
+
import './chunk-JPTQZWJQ.mjs';
|
|
12
|
+
import './chunk-STOWQFT3.mjs';
|
|
13
|
+
import './chunk-RA6LSBCM.mjs';
|
|
14
|
+
import './chunk-MOG4OVDK.mjs';
|
|
15
|
+
import './chunk-TK63WFXK.mjs';
|
|
16
|
+
import './chunk-XAWNZ4G2.mjs';
|
|
17
|
+
import './chunk-TY7L6OXO.mjs';
|
|
18
|
+
import './chunk-4RD3AFSB.mjs';
|
|
19
|
+
import './chunk-NXQG7DRA.mjs';
|
|
20
|
+
import './chunk-GPPOG6PT.mjs';
|
|
21
|
+
import './chunk-WXLBZJMT.mjs';
|
|
22
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
23
|
+
|
|
24
|
+
// src/query-suggestions/restore-hooks.ts
|
|
25
|
+
function warn(core, event) {
|
|
26
|
+
if (emitEngineEvent(core.eventHandlers, "querySuggestionsWarning", event) > 0) return;
|
|
27
|
+
console.warn("Popular query suggestions warning:", event);
|
|
28
|
+
}
|
|
29
|
+
function requireNoSyncConflict(indexName, entry) {
|
|
30
|
+
if (entry.sync === null || entry.querySuggestions?.querySuggestions?.enabled !== true) return;
|
|
31
|
+
throw new NarsilError(
|
|
32
|
+
ErrorCodes.CONFIG_INVALID,
|
|
33
|
+
`Index "${indexName}" has device sync on, and the archive turns popular query suggestions on, which a synced index cannot hold`,
|
|
34
|
+
{ indexName }
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
async function removeFromOthers(core, engine, indexName, bans) {
|
|
38
|
+
for (const [name, other] of core.indexRegistry) {
|
|
39
|
+
if (name === indexName || other.querySuggestions?.querySuggestionsSource?.index !== indexName) continue;
|
|
40
|
+
for (let start = 0; start < bans.length; start += BUILD_WRITE_BATCH) {
|
|
41
|
+
const result = await engine.removeBatch(name, bans.slice(start, start + BUILD_WRITE_BATCH));
|
|
42
|
+
const failure = result.failed.find((failed) => failed.error.code !== ErrorCodes.DOC_NOT_FOUND);
|
|
43
|
+
if (failure !== void 0) throw failure.error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
async function removeFromRestored(core, indexName, bans) {
|
|
48
|
+
for (let start = 0; start < bans.length; start += BUILD_WRITE_BATCH) {
|
|
49
|
+
const result = await removeDocumentBatch(core.mutationCtx, indexName, bans.slice(start, start + BUILD_WRITE_BATCH));
|
|
50
|
+
const failure = result.failed.find((failed) => failed.error.code !== ErrorCodes.DOC_NOT_FOUND);
|
|
51
|
+
if (failure !== void 0) throw failure.error;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function applyBans(core, engine, indexName, entry) {
|
|
55
|
+
const bans = entry.querySuggestions?.bannedQueries ?? [];
|
|
56
|
+
if (bans.length > 0) await removeFromOthers(core, engine, indexName, bans);
|
|
57
|
+
const marker = entry.querySuggestions?.querySuggestionsSource;
|
|
58
|
+
if (marker === void 0 || marker.index === indexName) return;
|
|
59
|
+
const sourceBans = core.indexRegistry.get(marker.index)?.querySuggestions?.bannedQueries ?? [];
|
|
60
|
+
if (sourceBans.length > 0) await removeFromRestored(core, indexName, sourceBans);
|
|
61
|
+
}
|
|
62
|
+
function restoreSuggestionHooksOf(core, engine, indexName) {
|
|
63
|
+
installSuggestionHooks(core);
|
|
64
|
+
return {
|
|
65
|
+
async historySink(restored) {
|
|
66
|
+
return attachedRuntimeOf(core)?.restoredHistory(indexName, restored?.querySuggestions) ?? null;
|
|
67
|
+
},
|
|
68
|
+
async beforeInstall(entry, previous) {
|
|
69
|
+
requireNoSyncConflict(indexName, entry);
|
|
70
|
+
const previousBans = previous?.querySuggestions?.bannedQueries ?? [];
|
|
71
|
+
if (previousBans.length > 0) {
|
|
72
|
+
const restoredBans = entry.querySuggestions?.bannedQueries ?? [];
|
|
73
|
+
entry.querySuggestions = withState(entry.querySuggestions, {
|
|
74
|
+
bannedQueries: unionOfBans(previousBans, restoredBans)
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (previous === void 0) await clearLeftoversOfName(core, indexName);
|
|
78
|
+
},
|
|
79
|
+
async afterActivate(entry) {
|
|
80
|
+
try {
|
|
81
|
+
await applyBans(core, engine, indexName, entry);
|
|
82
|
+
} catch (error) {
|
|
83
|
+
warn(core, {
|
|
84
|
+
indexName,
|
|
85
|
+
reason: "ban-removal-failed",
|
|
86
|
+
message: error instanceof Error ? error.message : String(error)
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
async afterInstall(entry, history) {
|
|
91
|
+
const runtime = attachedRuntimeOf(core);
|
|
92
|
+
const enabled = entry.querySuggestions?.querySuggestions?.enabled === true;
|
|
93
|
+
try {
|
|
94
|
+
if (!enabled) {
|
|
95
|
+
if (runtime !== void 0) await runtime.discardHistory(indexName);
|
|
96
|
+
else await core.durability?.manager.removeQueryHistory?.(indexName);
|
|
97
|
+
} else if (runtime === void 0 || runtime.scrambler === null) {
|
|
98
|
+
warn(core, { indexName, reason: "no-key" });
|
|
99
|
+
} else if (history instanceof RestoredHistory) {
|
|
100
|
+
await history.commit();
|
|
101
|
+
}
|
|
102
|
+
} catch (error) {
|
|
103
|
+
warn(core, {
|
|
104
|
+
indexName,
|
|
105
|
+
reason: "save-failed",
|
|
106
|
+
message: error instanceof Error ? error.message : String(error)
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
runtime?.settingChanged(indexName);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export { restoreSuggestionHooksOf };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { abandonChangeOf } from './chunk-NQAME3RK.mjs';
|
|
2
|
+
import { attachedRuntimeOf } from './chunk-ATEBYXP6.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-YPN4ZFCY.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-VEQNIE6C.mjs');
|
|
52
|
+
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host, engine, indexName));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { runRestore };
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
+
import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-G64Q6OJF.mjs';
|
|
2
|
+
import { syncStorageOf } from './chunk-NLWTBAGB.mjs';
|
|
1
3
|
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-ELV4OZOI.mjs';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import './chunk-
|
|
4
|
+
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEntryHeaders, tarPadding, tarEnd } from './chunk-2TI4SSUP.mjs';
|
|
5
|
+
import './chunk-2CFI5VVV.mjs';
|
|
6
|
+
import { isSyncEpoch } from './chunk-YJHGOJAC.mjs';
|
|
7
|
+
import { oneSyncChangeAtATime } from './chunk-5W3MMTLG.mjs';
|
|
8
|
+
import './chunk-7IGKGWSQ.mjs';
|
|
5
9
|
import './chunk-ZI2V4VD7.mjs';
|
|
6
|
-
import {
|
|
10
|
+
import { manifestFileRefs } from './chunk-23XRXIBW.mjs';
|
|
11
|
+
import { emitEngineEvent, encodeIndexConfiguration } from './chunk-3V7DNNZL.mjs';
|
|
12
|
+
import { withOpenIndex } from './chunk-ML7THVLJ.mjs';
|
|
7
13
|
import './chunk-VI7BQR4U.mjs';
|
|
8
14
|
import './chunk-JPTQZWJQ.mjs';
|
|
9
|
-
import {
|
|
10
|
-
import { openChecksummedEnvelope, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-7TTWXUH6.mjs';
|
|
15
|
+
import { openChecksummedEnvelope, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-STOWQFT3.mjs';
|
|
11
16
|
import './chunk-RA6LSBCM.mjs';
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
17
|
+
import './chunk-MOG4OVDK.mjs';
|
|
18
|
+
import './chunk-TK63WFXK.mjs';
|
|
19
|
+
import './chunk-WN464PTL.mjs';
|
|
20
|
+
import './chunk-XAWNZ4G2.mjs';
|
|
15
21
|
import './chunk-TY7L6OXO.mjs';
|
|
16
22
|
import './chunk-4RD3AFSB.mjs';
|
|
17
|
-
import './chunk-
|
|
23
|
+
import './chunk-NXQG7DRA.mjs';
|
|
24
|
+
import './chunk-GPPOG6PT.mjs';
|
|
18
25
|
import './chunk-WXLBZJMT.mjs';
|
|
19
|
-
import {
|
|
20
|
-
import { oneSyncChangeAtATime } from './chunk-5W3MMTLG.mjs';
|
|
21
|
-
import { isSyncEpoch } from './chunk-YJHGOJAC.mjs';
|
|
22
|
-
import { withOpenIndex } from './chunk-ML7THVLJ.mjs';
|
|
23
|
-
import { NarsilError, ErrorCodes } from './chunk-MYITLCHT.mjs';
|
|
26
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
24
27
|
import { decode } from '@msgpack/msgpack';
|
|
25
28
|
|
|
26
29
|
// src/persistence/archive/range-layout.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_RERANK_WINDOW } from './chunk-JPTQZWJQ.mjs';
|
|
2
2
|
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-4RD3AFSB.mjs';
|
|
3
3
|
import { MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-WXLBZJMT.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
5
5
|
|
|
6
6
|
// src/search/hybrid-depth.ts
|
|
7
7
|
function fixedHybridDepthOf(hybrid) {
|
|
@@ -1,35 +1,40 @@
|
|
|
1
|
-
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-
|
|
2
|
-
import {
|
|
1
|
+
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-EXQZGUQH.mjs';
|
|
2
|
+
import { indexMetadataOf, writeCheckpointSegments, writeLiveVectors, commitCheckpointManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-K4Q6KX3R.mjs';
|
|
3
|
+
import { requireRestoreMemory, earlierSnapshotFootprint, storedBytesOfSegments, archiveFootprint } from './chunk-7U3WVJUP.mjs';
|
|
3
4
|
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-ELV4OZOI.mjs';
|
|
4
|
-
import { indexMetadataOf, writeCheckpointSegments, writeLiveVectors, commitCheckpointManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-G7LUMBSG.mjs';
|
|
5
5
|
import { createByteReader } from './chunk-DSXIBE6N.mjs';
|
|
6
|
-
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEnd, readSnapshotArchive, tarEntryHeaders, tarPadding, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-
|
|
7
|
-
import { decodeSegmentManifest } from './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import {
|
|
10
|
-
import './chunk-
|
|
6
|
+
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEnd, readSnapshotArchive, tarEntryHeaders, tarPadding, ARCHIVE_FILE_CHUNK_BYTES } from './chunk-2TI4SSUP.mjs';
|
|
7
|
+
import { decodeSegmentManifest } from './chunk-2CFI5VVV.mjs';
|
|
8
|
+
import { newSyncEpoch } from './chunk-YJHGOJAC.mjs';
|
|
9
|
+
import { storedStateOf } from './chunk-3SSRJMFN.mjs';
|
|
10
|
+
import './chunk-BHFQATSC.mjs';
|
|
11
|
+
import { oneSyncChangeAtATime } from './chunk-5W3MMTLG.mjs';
|
|
12
|
+
import './chunk-7IGKGWSQ.mjs';
|
|
13
|
+
import { vectorsPerFile } from './chunk-U4YDIBUT.mjs';
|
|
14
|
+
import './chunk-3I27KXQD.mjs';
|
|
15
|
+
import './chunk-OIZS5KIX.mjs';
|
|
16
|
+
import { readSegmentFile } from './chunk-EA63E3D2.mjs';
|
|
17
|
+
import './chunk-KZWSX6BH.mjs';
|
|
11
18
|
import { DEFAULT_COMPACTION_THRESHOLD } from './chunk-ZI2V4VD7.mjs';
|
|
12
|
-
import {
|
|
19
|
+
import { manifestKey, manifestFileRefs } from './chunk-23XRXIBW.mjs';
|
|
20
|
+
import { encodeIndexConfiguration, ARRAY_POSITION_GAP, raiseEarlierReleaseGraphSetting, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateTextStorage, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, prepareStoredSynonyms, loadSchemaCodeFor, decodeEveryStoredDocument, parseVectorDimension, isCompositePartition, arrayPositionsAreStale, insertDocumentVectors } from './chunk-3V7DNNZL.mjs';
|
|
21
|
+
import { emitSyncChange } from './chunk-ML7THVLJ.mjs';
|
|
13
22
|
import './chunk-VI7BQR4U.mjs';
|
|
14
23
|
import './chunk-JPTQZWJQ.mjs';
|
|
15
|
-
import {
|
|
16
|
-
import { hasNrslMagic, HEADER_SIZE, readHeader, getLanguage, validateSchema, resolveIndexAnalysis, decodeIndexConfiguration, flattenSchema } from './chunk-7TTWXUH6.mjs';
|
|
24
|
+
import { hasNrslMagic, HEADER_SIZE, readHeader, getLanguage, validateSchema, resolveIndexAnalysis, decodeIndexConfiguration, flattenSchema } from './chunk-STOWQFT3.mjs';
|
|
17
25
|
import './chunk-RA6LSBCM.mjs';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-
|
|
22
|
-
import './chunk-
|
|
23
|
-
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-3U3QR5YP.mjs';
|
|
24
|
-
import './chunk-U2E3HMYW.mjs';
|
|
26
|
+
import './chunk-MOG4OVDK.mjs';
|
|
27
|
+
import './chunk-TK63WFXK.mjs';
|
|
28
|
+
import './chunk-VLJQW4J6.mjs';
|
|
29
|
+
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-WN464PTL.mjs';
|
|
30
|
+
import './chunk-XAWNZ4G2.mjs';
|
|
25
31
|
import './chunk-TY7L6OXO.mjs';
|
|
26
32
|
import './chunk-4RD3AFSB.mjs';
|
|
27
|
-
import
|
|
33
|
+
import './chunk-NXQG7DRA.mjs';
|
|
34
|
+
import { MAX_FILE_BYTES } from './chunk-GPPOG6PT.mjs';
|
|
28
35
|
import './chunk-WXLBZJMT.mjs';
|
|
29
|
-
import {
|
|
30
|
-
import
|
|
31
|
-
import { emitSyncChange } from './chunk-ML7THVLJ.mjs';
|
|
32
|
-
import { NarsilError, ErrorCodes } from './chunk-MYITLCHT.mjs';
|
|
36
|
+
import { NarsilError, ErrorCodes } from './chunk-SRMZXJSL.mjs';
|
|
37
|
+
import './chunk-JNOAKDUM.mjs';
|
|
33
38
|
import { decode } from '@msgpack/msgpack';
|
|
34
39
|
|
|
35
40
|
// src/persistence/archive/memory-store.ts
|
|
@@ -205,6 +210,9 @@ async function* archiveChunks(source) {
|
|
|
205
210
|
for (const ref of manifestFileRefs(source.manifest)) {
|
|
206
211
|
yield* fileEntryChunks(source, ref.key.slice(prefix.length), ref);
|
|
207
212
|
}
|
|
213
|
+
if (source.trailingEntries !== void 0) {
|
|
214
|
+
for await (const entry of source.trailingEntries()) yield* entryChunks(entry.name, entry.bytes);
|
|
215
|
+
}
|
|
208
216
|
yield tarEnd();
|
|
209
217
|
}
|
|
210
218
|
function archiveStream(source) {
|
|
@@ -283,7 +291,7 @@ async function validateStagedCheckpoint(store, manifest) {
|
|
|
283
291
|
for (const ref of partition.segments) {
|
|
284
292
|
const { directory } = store;
|
|
285
293
|
if (directory !== void 0) {
|
|
286
|
-
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-
|
|
294
|
+
const { checkPagedSegmentFully, isPagedSegmentFile } = await import('./module-NIYMEA5R.mjs');
|
|
287
295
|
if (await isPagedSegmentFile(directory, ref.key)) {
|
|
288
296
|
requireSchemaOfManifest(ref.key, await checkPagedSegmentFully(directory, ref), manifest);
|
|
289
297
|
continue;
|
|
@@ -380,7 +388,8 @@ function prepareRestoredIndex(configuration, deps, reject) {
|
|
|
380
388
|
storedRevision,
|
|
381
389
|
analysisGeneration,
|
|
382
390
|
storedArrayPositionGap: storedArrayPositionGap(configuration.arrayPositionGap),
|
|
383
|
-
synonyms
|
|
391
|
+
synonyms,
|
|
392
|
+
querySuggestions: storedStateOf(configuration)
|
|
384
393
|
};
|
|
385
394
|
}
|
|
386
395
|
function restoredSynonyms(raw, config, language, reject) {
|
|
@@ -388,8 +397,8 @@ function restoredSynonyms(raw, config, language, reject) {
|
|
|
388
397
|
return prepareStoredSynonyms(raw, config, language, (message) => reject(`synonyms: ${message}`));
|
|
389
398
|
}
|
|
390
399
|
async function prepareDetachedIndex(indexName, prepared, partitionCount, deps) {
|
|
391
|
-
const
|
|
392
|
-
if (
|
|
400
|
+
const loadingSchemaCode = loadSchemaCodeFor(prepared.config.schema);
|
|
401
|
+
if (loadingSchemaCode !== null) await loadingSchemaCode;
|
|
393
402
|
const detached = createDetachedIndex(
|
|
394
403
|
indexName,
|
|
395
404
|
prepared.config,
|
|
@@ -417,7 +426,8 @@ function restoredRegistryEntry(prepared, manager, deps) {
|
|
|
417
426
|
analysisGeneration: prepared.analysisGeneration,
|
|
418
427
|
pendingAnalysis: null,
|
|
419
428
|
durableAnalysis: null,
|
|
420
|
-
sync: null
|
|
429
|
+
sync: null,
|
|
430
|
+
querySuggestions: prepared.querySuggestions
|
|
421
431
|
};
|
|
422
432
|
}
|
|
423
433
|
|
|
@@ -530,6 +540,7 @@ async function replaceExisting(indexName, restored, entry, deps) {
|
|
|
530
540
|
for (const vectorIndex of vectorIndexes) await vectorIndex.releaseVectorFiles();
|
|
531
541
|
await commitToStorage(indexName, restored, previous?.partitionCount ?? 0, deps);
|
|
532
542
|
activate(indexName, restored, entry, deps);
|
|
543
|
+
await deps.querySuggestions?.afterActivate(entry);
|
|
533
544
|
});
|
|
534
545
|
} finally {
|
|
535
546
|
const ending = endRelease(indexName, release, deps).catch(() => void 0);
|
|
@@ -544,6 +555,7 @@ async function createFresh(indexName, restored, entry, deps) {
|
|
|
544
555
|
await deps.indexState.registerReplacing(indexName, async () => {
|
|
545
556
|
await commitToStorage(indexName, restored, 0, deps);
|
|
546
557
|
activate(indexName, restored, entry, deps);
|
|
558
|
+
await deps.querySuggestions?.afterActivate(entry);
|
|
547
559
|
});
|
|
548
560
|
} catch (error) {
|
|
549
561
|
if (deps.indexRegistry.get(indexName) === entry) deps.indexRegistry.delete(indexName);
|
|
@@ -556,12 +568,14 @@ async function stageMetadata(indexName, staging, entry) {
|
|
|
556
568
|
const metadata = indexMetadataOf(indexName, entry, entry.partitionCount);
|
|
557
569
|
await staging.store.write(`${indexName}/meta`, [await writeMetadataEnvelope(metadata, { checksum: true })]);
|
|
558
570
|
}
|
|
559
|
-
async function installRestoredIndex(indexName, restored, deps) {
|
|
571
|
+
async function installRestoredIndex(indexName, restored, deps, history = null) {
|
|
560
572
|
const entry = restoredRegistryEntry(restored.prepared, restored.detached.manager, deps);
|
|
561
573
|
const previousSync = deps.indexRegistry.get(indexName)?.sync ?? null;
|
|
562
574
|
if (previousSync !== null) entry.sync = { ...previousSync, active: false, epoch: newSyncEpoch() };
|
|
563
575
|
let replaced;
|
|
564
576
|
try {
|
|
577
|
+
if (deps.indexRegistry.has(indexName)) await deps.abandonAnalysisChange(indexName);
|
|
578
|
+
await deps.querySuggestions?.beforeInstall(entry, deps.indexRegistry.get(indexName));
|
|
565
579
|
if (restored.staging !== null) await stageMetadata(indexName, restored.staging, entry);
|
|
566
580
|
replaced = deps.indexRegistry.get(indexName);
|
|
567
581
|
if (replaced !== void 0) await replaceExisting(indexName, restored, entry, deps);
|
|
@@ -583,6 +597,7 @@ async function installRestoredIndex(indexName, restored, deps) {
|
|
|
583
597
|
await oneSyncChangeAtATime(deps.indexRegistry, indexName, () => storage.release(indexName));
|
|
584
598
|
emitSyncChange(deps.indexRegistry, { kind: "epoch", indexName });
|
|
585
599
|
}
|
|
600
|
+
await deps.querySuggestions?.afterInstall(entry, history);
|
|
586
601
|
if (replaced !== void 0) await deps.announceIndexDropped(indexName, replaced.config);
|
|
587
602
|
await deps.announceIndexCreated(indexName, restored.prepared.config);
|
|
588
603
|
for (const vectorIndex of restored.detached.manager.getVectorIndexes().values()) {
|
|
@@ -633,9 +648,14 @@ function missingPart(what) {
|
|
|
633
648
|
function keepsTextOnDisk(prepared, staging) {
|
|
634
649
|
return prepared.config.textStorage === "disk" && staging.directory !== void 0;
|
|
635
650
|
}
|
|
636
|
-
async function stageArchive(indexName, reader, staging, deps) {
|
|
637
|
-
const staged = { prepared: null, manifest: null };
|
|
651
|
+
async function stageArchive(indexName, reader, staging, deps, staged) {
|
|
638
652
|
await readSnapshotArchive(reader, {
|
|
653
|
+
history: async (chunks) => {
|
|
654
|
+
if (staged.history === void 0) {
|
|
655
|
+
staged.history = await deps.querySuggestions?.historySink(staged.prepared?.querySuggestions ?? null) ?? null;
|
|
656
|
+
}
|
|
657
|
+
await staged.history?.add(chunks);
|
|
658
|
+
},
|
|
639
659
|
config: async (bytes) => {
|
|
640
660
|
staged.prepared = prepareRestoredIndex(await decodeIndexConfiguration(bytes), deps, rejectConfiguration);
|
|
641
661
|
},
|
|
@@ -661,7 +681,7 @@ async function stageArchive(indexName, reader, staging, deps) {
|
|
|
661
681
|
if (manifest === null) missingPart("manifest");
|
|
662
682
|
const { directory } = staging;
|
|
663
683
|
if (keepsTextOnDisk(prepared, staging) && directory !== void 0) {
|
|
664
|
-
const { bytesThatSegmentsHoldInMemory } = await import('./module-
|
|
684
|
+
const { bytesThatSegmentsHoldInMemory } = await import('./module-NIYMEA5R.mjs');
|
|
665
685
|
const replacesIndex = deps.indexRegistry.has(indexName);
|
|
666
686
|
const segmentBytes = await bytesThatSegmentsHoldInMemory(directory, manifest);
|
|
667
687
|
requireRestoreMemory(indexName, archiveFootprint(prepared, manifest, replacesIndex, segmentBytes), replacesIndex);
|
|
@@ -690,9 +710,14 @@ async function loadStagedIndex(indexName, staged, staging, store, deps) {
|
|
|
690
710
|
async function restoreArchive(indexName, reader, deps) {
|
|
691
711
|
const staging = deps.durability?.manager.stageRestore?.(indexName) ?? null;
|
|
692
712
|
const store = staging?.store ?? memoryCheckpointStore();
|
|
713
|
+
const archive = { prepared: null, manifest: null, history: void 0 };
|
|
693
714
|
try {
|
|
694
|
-
const staged = await stageArchive(indexName, reader, store, deps);
|
|
695
|
-
|
|
715
|
+
const staged = await stageArchive(indexName, reader, store, deps, archive);
|
|
716
|
+
const restored = await loadStagedIndex(indexName, staged, staging, store, deps);
|
|
717
|
+
await installRestoredIndex(indexName, restored, deps, archive.history ?? null);
|
|
718
|
+
} catch (error) {
|
|
719
|
+
await archive.history?.abandon().catch(() => void 0);
|
|
720
|
+
throw error;
|
|
696
721
|
} finally {
|
|
697
722
|
await staging?.discard().catch(() => void 0);
|
|
698
723
|
await reader.close();
|
|
@@ -847,13 +872,23 @@ async function checkpointForArchive(deps) {
|
|
|
847
872
|
partitionId: null
|
|
848
873
|
});
|
|
849
874
|
}
|
|
850
|
-
async function
|
|
875
|
+
async function* queryHistoryEntries(core, indexName) {
|
|
876
|
+
const { historyArchiveEntries } = await import('./archive-history-4IP5XQZY.mjs');
|
|
877
|
+
yield* historyArchiveEntries(core, indexName);
|
|
878
|
+
}
|
|
879
|
+
async function createSnapshot(deps, coreWithAddedHistory) {
|
|
880
|
+
const trailingEntries = coreWithAddedHistory === null ? void 0 : () => queryHistoryEntries(coreWithAddedHistory, deps.indexName);
|
|
851
881
|
for (let attempt = 0; attempt < MAX_SNAPSHOT_ANALYSIS_ATTEMPTS; attempt += 1) {
|
|
852
882
|
const checkpoint = await checkpointForArchive(deps);
|
|
853
883
|
try {
|
|
854
884
|
if ((checkpoint.manifest.analysisGeneration ?? 0) === deps.entry.analysisGeneration) {
|
|
855
885
|
const config = await encodeIndexConfiguration(deps.entry);
|
|
856
|
-
return archiveStream({
|
|
886
|
+
return archiveStream({
|
|
887
|
+
...checkpoint,
|
|
888
|
+
config,
|
|
889
|
+
sourceIndexName: deps.indexName,
|
|
890
|
+
...trailingEntries !== void 0 ? { trailingEntries } : {}
|
|
891
|
+
});
|
|
857
892
|
}
|
|
858
893
|
} catch (error) {
|
|
859
894
|
checkpoint.release();
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { localRuntimeOf } from './chunk-SSTPBZZX.mjs';
|
|
2
|
+
import './chunk-M3MQE2X7.mjs';
|
|
3
|
+
import './chunk-CRE3G7F3.mjs';
|
|
4
|
+
import './chunk-BHFQATSC.mjs';
|
|
5
|
+
import './chunk-MGI4BCXC.mjs';
|
|
6
|
+
import './chunk-OEDCEZXJ.mjs';
|
|
7
|
+
import './chunk-ATEBYXP6.mjs';
|
|
8
|
+
import './chunk-5W3MMTLG.mjs';
|
|
9
|
+
import './chunk-7IGKGWSQ.mjs';
|
|
10
|
+
import './chunk-HOZW3PKP.mjs';
|
|
11
|
+
import './chunk-3V7DNNZL.mjs';
|
|
12
|
+
import './chunk-ML7THVLJ.mjs';
|
|
13
|
+
import './chunk-VI7BQR4U.mjs';
|
|
14
|
+
import './chunk-JPTQZWJQ.mjs';
|
|
15
|
+
import './chunk-STOWQFT3.mjs';
|
|
16
|
+
import './chunk-RA6LSBCM.mjs';
|
|
17
|
+
import './chunk-MOG4OVDK.mjs';
|
|
18
|
+
import './chunk-TK63WFXK.mjs';
|
|
19
|
+
import './chunk-XAWNZ4G2.mjs';
|
|
20
|
+
import './chunk-TY7L6OXO.mjs';
|
|
21
|
+
import './chunk-4RD3AFSB.mjs';
|
|
22
|
+
import './chunk-NXQG7DRA.mjs';
|
|
23
|
+
import './chunk-GPPOG6PT.mjs';
|
|
24
|
+
import './chunk-WXLBZJMT.mjs';
|
|
25
|
+
import './chunk-SRMZXJSL.mjs';
|