@delali/narsil 0.3.1-next.152 → 0.3.1-next.154
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 +2 -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-4GCRVRBW.mjs} +27 -18
- package/dist/{react-native/chunks/analysis-change-entry-CXNRW324.mjs → analysis-change-entry-KYGSXW4K.mjs} +1 -1
- package/dist/browser/{analysis-change-2V2HZ2NY.mjs → analysis-change-IXWPXXJJ.mjs} +17 -7
- package/dist/{analysis-change-entry-QD7YNDEE.mjs → browser/analysis-change-entry-FCSHFQSS.mjs} +1 -1
- package/dist/browser/{chunk-TQ5UMFG5.mjs → chunk-2FX6ROWR.mjs} +15 -6
- package/dist/browser/{chunk-KWYQ6KX4.mjs → chunk-2SHAKW2Z.mjs} +119 -1922
- package/dist/browser/{chunk-55WYRLDZ.mjs → chunk-3U3QR5YP.mjs} +2 -2
- package/dist/browser/chunk-4PD752F6.mjs +85 -0
- package/dist/browser/chunk-5W3MMTLG.mjs +19 -0
- package/dist/browser/{chunk-IAXZAVYL.mjs → chunk-7MEYN7V6.mjs} +1 -151
- package/dist/browser/chunk-7TTWXUH6.mjs +1828 -0
- package/dist/browser/{chunk-CSCKZBVJ.mjs → chunk-AJ4HHOVT.mjs} +4 -4
- package/dist/{react-native/chunks/chunk-DFQJ4IJB.mjs → browser/chunk-AYY6PIKL.mjs} +2 -2
- package/dist/browser/{chunk-VD7JEUIR.mjs → chunk-C4KS2QNF.mjs} +9 -8
- package/dist/browser/chunk-DSXIBE6N.mjs +78 -0
- package/dist/browser/chunk-ELV4OZOI.mjs +29 -0
- package/dist/browser/{chunk-PM4MUM5N.mjs → chunk-EUNBNLKM.mjs} +6 -5
- package/dist/browser/{chunk-GJKXW3SF.mjs → chunk-G7LUMBSG.mjs} +137 -253
- package/dist/browser/{chunk-B3JM6Z74.mjs → chunk-H6QFBMVE.mjs} +3 -2
- package/dist/browser/chunk-J433A7P3.mjs +241 -0
- package/dist/browser/chunk-ML6HY7T7.mjs +96 -0
- package/dist/browser/chunk-ML7THVLJ.mjs +38 -0
- package/dist/{chunk-MDF6PDIA.mjs → browser/chunk-MYITLCHT.mjs} +7 -1
- package/dist/browser/{chunk-QJCO3TJU.mjs → chunk-QXTPSX2H.mjs} +9 -150
- package/dist/browser/{chunk-MPK76GVS.mjs → chunk-RA6LSBCM.mjs} +1 -21
- package/dist/browser/{chunk-7ZJTRUVW.mjs → chunk-SIR3LMTV.mjs} +2 -2
- package/dist/browser/{chunk-LURXVCHG.mjs → chunk-SJB6VIZG.mjs} +1 -1
- package/dist/browser/chunk-TTD27VXX.mjs +298 -0
- package/dist/browser/chunk-U2E3HMYW.mjs +151 -0
- package/dist/browser/{chunk-2A2IPRC3.mjs → chunk-VCOYGVP7.mjs} +5 -31
- package/dist/browser/chunk-VI7BQR4U.mjs +21 -0
- package/dist/browser/chunk-W5X2UFWQ.mjs +102 -0
- package/dist/browser/{chunk-HT7J73QL.mjs → chunk-XRV72TJD.mjs} +2 -2
- package/dist/browser/chunk-YJHGOJAC.mjs +15 -0
- package/dist/browser/chunk-ZI2V4VD7.mjs +21 -0
- package/dist/{react-native/chunks/chunk-QC4ZRBSX.mjs → browser/chunk-ZPTA75ZC.mjs} +2 -79
- package/dist/browser/{cold-module-YECAK4MN.mjs → cold-module-VTUGDYNY.mjs} +20 -14
- package/dist/browser/{durability-wiring-LM7WFL6X.mjs → durability-wiring-GL4A7KDV.mjs} +1886 -1364
- package/dist/browser/import-YI5GNB4H.mjs +17 -0
- package/dist/browser/methods-LMUTS7OI.mjs +30 -0
- package/dist/browser/{module-XQLEOYNM.mjs → module-EC3FYW7N.mjs} +9 -8
- package/dist/browser/{module-KAMRAJLE.mjs → module-M4JNBV6V.mjs} +16 -10
- package/dist/browser/operations-WVYLF72Q.mjs +5 -0
- package/dist/browser/{phrase-module-CNKMUY4U.mjs → phrase-module-NPYUVX75.mjs} +1 -1
- package/dist/browser/{pool-DTYSPBMQ.mjs → pool-WCGDZHJP.mjs} +3 -2
- package/dist/{restore-queue-AOF5OTQV.mjs → browser/restore-queue-TYIGDL5L.mjs} +2 -2
- package/dist/browser/retention-6QMRS5VK.mjs +207 -0
- package/dist/browser/{runtime-D2ULZGCN.mjs → runtime-3EW2AGB6.mjs} +1 -1
- package/dist/browser/{snapshot-UGZVMP4H.mjs → snapshot-DN3CRVUQ.mjs} +38 -307
- package/dist/browser/sync-state-P5XG6LTQ.mjs +15 -0
- package/dist/browser/{write-I5P5MW4O.mjs → write-WAWAFGKQ.mjs} +16 -11
- package/dist/{capabilities-BT-HLDC8.d.ts → capabilities-B3Brs1Rc.d.ts} +62 -7
- package/dist/{chunk-DGRM4EZZ.mjs → chunk-37IVJLP6.mjs} +1 -1
- package/dist/{chunk-KYVRZAYP.mjs → chunk-3A5KI24C.mjs} +2 -69
- package/dist/{chunk-POUYICOU.mjs → chunk-3OFU3NJT.mjs} +1 -1
- package/dist/{chunk-3TVDTACC.mjs → chunk-3Y3J4V2R.mjs} +1 -1
- package/dist/{chunk-FNBNZCGP.mjs → chunk-466PYR4P.mjs} +2 -2
- package/dist/{chunk-SEAJS664.mjs → chunk-4HWZV5MK.mjs} +5 -5
- package/dist/{chunk-UGVUW27S.mjs → chunk-5FUOVJKG.mjs} +13 -9
- package/dist/{chunk-ZHAXP7SD.mjs → chunk-5KGYQT6W.mjs} +6 -235
- package/dist/{chunk-NPXVQS33.mjs → chunk-62G63NMH.mjs} +4 -3
- package/dist/chunk-6MSZ543Y.mjs +32 -0
- package/dist/chunk-7GXJUJ24.mjs +49 -0
- package/dist/{chunk-3E4RRF5J.mjs → chunk-7HCZWC7B.mjs} +58 -8
- package/dist/{chunk-6RKSY3BX.mjs → chunk-7NTMUDC5.mjs} +5 -5
- package/dist/chunk-7QUGDVFC.mjs +101 -0
- package/dist/{chunk-G5KHSM6E.mjs → chunk-AO2FAYIZ.mjs} +1 -1
- package/dist/chunk-B7S6YEBP.mjs +102 -0
- package/dist/{chunk-AWNHDBKV.mjs → chunk-BPSKLCS7.mjs} +15 -7
- package/dist/chunk-BUMREPLU.mjs +15 -0
- package/dist/{chunk-T4CJDBBE.mjs → chunk-C6ASEFZI.mjs} +1 -1
- package/dist/{chunk-NITCPDFL.mjs → chunk-C73JLU4E.mjs} +2 -2
- package/dist/{chunk-NYSONUB7.mjs → chunk-CP5RRPJR.mjs} +1 -1
- package/dist/{chunk-TTCKT2RT.mjs → chunk-DMQPFLGI.mjs} +134 -11
- package/dist/{chunk-3SBJVQLL.mjs → chunk-DVWYODEB.mjs} +2 -2
- package/dist/chunk-ECX4SGX6.mjs +167 -0
- package/dist/chunk-GES7U2PM.mjs +68 -0
- package/dist/{chunk-NVTFQFUL.mjs → chunk-HVKXNBFL.mjs} +1 -1
- package/dist/chunk-HVYICDY3.mjs +214 -0
- package/dist/{chunk-3HV7M5OJ.mjs → chunk-HWEDFLB7.mjs} +9 -133
- package/dist/{chunk-52QQWEBS.mjs → chunk-IBNLW3AV.mjs} +21 -6
- package/dist/chunk-IJU7LL7D.mjs +242 -0
- package/dist/chunk-IPN7S4KX.mjs +130 -0
- package/dist/{chunk-5QMHMELB.mjs → chunk-IQ4R2I6N.mjs} +4 -1
- package/dist/chunk-JCLTESFN.mjs +96 -0
- package/dist/{chunk-J4BDAH2W.mjs → chunk-JFNKIBDT.mjs} +2 -2
- package/dist/{chunk-LDGGR7YT.mjs → chunk-K4B7OH65.mjs} +2 -2
- package/dist/{chunk-7TE2AJIH.mjs → chunk-K7KLL263.mjs} +13 -10
- package/dist/{chunk-CSHHU7PA.mjs → chunk-KCUIFVVW.mjs} +11 -30
- package/dist/{react-native/chunks/chunk-YH7W556M.mjs → chunk-KUZKUONM.mjs} +11 -2
- package/dist/chunk-KYYABCSW.mjs +72 -0
- package/dist/{chunk-B2FTZNNF.mjs → chunk-LKUE5GXS.mjs} +34 -14
- package/dist/{chunk-2PNYKG2D.mjs → chunk-LSM2YTKM.mjs} +100 -335
- package/dist/{chunk-DMNPYF54.mjs → chunk-LTUGDMV4.mjs} +2 -2
- package/dist/{chunk-FDG4KXX5.mjs → chunk-MLHNSAPK.mjs} +5 -3
- package/dist/{chunk-VP6XRMWR.mjs → chunk-MMBEANB2.mjs} +6 -32
- package/dist/{chunk-LJ4ENXOD.mjs → chunk-MMEMEUOO.mjs} +2 -2
- package/dist/{chunk-2HJWQPR6.mjs → chunk-NTZOXVUZ.mjs} +6 -122
- package/dist/{chunk-5WB2A3XU.mjs → chunk-NZMAXR2S.mjs} +397 -24
- package/dist/{chunk-IZT3G24Q.mjs → chunk-O43Z4MS6.mjs} +2 -2
- package/dist/{chunk-U46IZNCW.mjs → chunk-OKX2BBNW.mjs} +3 -2
- package/dist/{chunk-RBEHLIKX.mjs → chunk-PFKM7VNZ.mjs} +14 -8
- package/dist/chunk-PGVPE7GJ.mjs +96 -0
- package/dist/chunk-Q3TCTQCC.mjs +85 -0
- package/dist/chunk-Q7MS6P2J.mjs +74 -0
- package/dist/chunk-QDZJM7NI.mjs +23 -0
- package/dist/{chunk-ZS6CMXAE.mjs → chunk-QKZHLADX.mjs} +89 -250
- package/dist/{chunk-IJSFWGVW.mjs → chunk-REL7LFLR.mjs} +3 -3
- package/dist/chunk-RVKFI3A2.mjs +237 -0
- package/dist/chunk-S2N75OTN.mjs +83 -0
- package/dist/chunk-TRISKD4Q.mjs +50 -0
- package/dist/{chunk-6F6USYII.mjs → chunk-TV2L3BN7.mjs} +13 -11
- package/dist/{chunk-6BWLDLS3.mjs → chunk-URPCYQVJ.mjs} +1 -1
- package/dist/chunk-USR7FQRZ.mjs +34 -0
- package/dist/chunk-V6EUBAIT.mjs +19 -0
- package/dist/{chunk-SOUZMPME.mjs → chunk-VMXSVVXG.mjs} +7 -194
- package/dist/{chunk-4QCSHLNM.mjs → chunk-VREK3MYG.mjs} +3 -3
- package/dist/{chunk-YGQOPB2Z.mjs → chunk-WCBA2LVZ.mjs} +1 -1
- package/dist/{chunk-KQJVNPRM.mjs → chunk-X6NSJYQ3.mjs} +19 -16
- package/dist/chunk-Y4WPNHMC.mjs +50 -0
- package/dist/{chunk-IRWP524D.mjs → chunk-YBJDOA2T.mjs} +1 -1
- package/dist/{chunk-IJPK5PGM.mjs → chunk-YPUEV6ZC.mjs} +1 -1
- package/dist/{chunk-J7M73VY7.mjs → chunk-YROWNOMH.mjs} +1 -1
- package/dist/chunk-Z3TNWCI5.mjs +196 -0
- package/dist/{chunk-65WCV5JO.mjs → chunk-ZIFJXCKA.mjs} +1 -1
- package/dist/chunk-ZYAY26KG.mjs +29 -0
- package/dist/{client-Cn3gNxUU.d.ts → client-Df76GNKm.d.ts} +76 -6
- package/dist/client.d.ts +8 -7
- package/dist/client.mjs +56 -5
- package/dist/{cold-module-PYSSBIL7.mjs → cold-module-YLWMTTZG.mjs} +38 -28
- package/dist/{config-CfhH1IWQ.d.ts → config-05G_hy-1.d.ts} +3 -3
- package/dist/config-B8DP2VwR.d.ts +463 -0
- package/dist/{direct-executor-WYALQSMD.mjs → direct-executor-FI5GJHWX.mjs} +14 -9
- package/dist/distribution/coordinator/etcd.d.ts +11 -2
- package/dist/distribution/coordinator/etcd.mjs +268 -107
- 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 +1296 -117
- package/dist/{durability-wiring-7VBZEJLG.mjs → durability-wiring-RHLXDIVF.mjs} +1751 -1226
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-CJRUHXgf.d.ts → engine-DYu-e0oR.d.ts} +50 -40
- package/dist/{import-GJOMB2HC.mjs → import-SRBNC6TE.mjs} +27 -19
- package/dist/{index-MsF7e5hL.d.ts → index-nRqDM6uS.d.ts} +1 -1
- package/dist/index.browser.mjs +8 -4
- package/dist/index.d.ts +7 -6
- package/dist/index.mjs +24 -16
- package/dist/index.react-native.mjs +17 -11
- package/dist/{long-query-thread-SCUE62TO.mjs → long-query-thread-EMYTGSJP.mjs} +28 -15
- package/dist/methods-ABM5ELBR.mjs +30 -0
- package/dist/{module-AVQEIB7O.mjs → module-3OMJZUFT.mjs} +12 -12
- package/dist/{module-6RLIKSZQ.mjs → module-MG7JMV2U.mjs} +33 -23
- package/dist/operations-PGOAY2KS.mjs +5 -0
- package/dist/{paged-partition-archive-KGRW366Y.mjs → paged-partition-archive-UOLHOEZJ.mjs} +37 -26
- package/dist/partial-words.mjs +6 -4
- package/dist/pattern.mjs +4 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +9 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +34 -23
- package/dist/{phrase-module-OUQIRUQU.mjs → phrase-module-O3MDRQXP.mjs} +1 -1
- package/dist/{pool-UPV5PVPY.mjs → pool-CQXYPFLG.mjs} +2 -2
- package/dist/react-native/chunks/{analysis-change-DXPZRGWF.mjs → analysis-change-EAYO3Y6Q.mjs} +27 -15
- package/dist/{browser/analysis-change-entry-JL5U2N3Q.mjs → react-native/chunks/analysis-change-entry-TNLUC6IZ.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-D7LFYPYI.mjs → chunk-2CGSQM4O.mjs} +12 -10
- package/dist/react-native/chunks/chunk-3NQOVO3K.mjs +1 -0
- package/dist/react-native/chunks/{chunk-R4OPUZQ5.mjs → chunk-3O57C2ZO.mjs} +2 -2
- package/dist/react-native/chunks/chunk-3XKMRNRE.mjs +298 -0
- package/dist/react-native/chunks/{chunk-IDFMNRIC.mjs → chunk-63YSZOXB.mjs} +97 -333
- package/dist/react-native/chunks/{chunk-UFNCLEQM.mjs → chunk-75VWIY35.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-2J2727V4.mjs → chunk-7GWPJDOA.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-PU55IOG4.mjs → chunk-AUT7PMA4.mjs} +6 -190
- package/dist/react-native/chunks/chunk-C2H2QQFW.mjs +288 -0
- package/dist/react-native/chunks/chunk-CHPTFFJM.mjs +43 -0
- package/dist/{browser/chunk-PIS7ZAP7.mjs → react-native/chunks/chunk-CUNGPR5R.mjs} +11 -2
- package/dist/{browser/chunk-NVEJJP4R.mjs → react-native/chunks/chunk-DCKMICOB.mjs} +2 -79
- package/dist/react-native/chunks/chunk-DH3TVWWK.mjs +102 -0
- package/dist/react-native/chunks/{chunk-ZCKNBPQ4.mjs → chunk-EH5CFV6Z.mjs} +2 -2
- package/dist/react-native/chunks/chunk-F753DA54.mjs +23 -0
- package/dist/{browser/chunk-VBX2TI5V.mjs → react-native/chunks/chunk-GFYFQLJD.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-7IQR3SZO.mjs → chunk-I5PGWQJF.mjs} +142 -257
- package/dist/react-native/chunks/{chunk-NFGBOI46.mjs → chunk-IOY2SM2P.mjs} +1 -1
- package/dist/react-native/chunks/chunk-JDOEEMEF.mjs +38 -0
- package/dist/react-native/chunks/{chunk-TLYD7IJ2.mjs → chunk-JPAJWO6D.mjs} +1 -1
- package/dist/react-native/chunks/chunk-JWUCMVRK.mjs +15 -0
- package/dist/react-native/chunks/{chunk-KLZGAOLT.mjs → chunk-JX2RIAXH.mjs} +4 -4
- package/dist/react-native/chunks/chunk-LU3Y3P63.mjs +68 -0
- package/dist/react-native/chunks/{chunk-LQAKO5QV.mjs → chunk-NCJS3WIY.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-BRNAVOKP.mjs → chunk-NKIZX26F.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-CLE3LZ77.mjs → chunk-NP7DD4G5.mjs} +5 -4
- package/dist/react-native/chunks/chunk-NVVRSRX5.mjs +78 -0
- package/dist/react-native/chunks/chunk-O32RB3BL.mjs +191 -0
- package/dist/react-native/chunks/{chunk-DKJTZ625.mjs → chunk-OQQVRWZ2.mjs} +2 -69
- package/dist/react-native/chunks/chunk-PB2YXVQW.mjs +29 -0
- package/dist/react-native/chunks/chunk-Q32DDFKX.mjs +19 -0
- package/dist/react-native/chunks/{chunk-LRGWK367.mjs → chunk-RVAEBN74.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-KOCTCUXW.mjs → chunk-RYMDHGL4.mjs} +16 -8
- package/dist/react-native/chunks/chunk-SJWDBRNP.mjs +85 -0
- package/dist/react-native/chunks/chunk-UNUFZ2QY.mjs +68 -0
- package/dist/react-native/chunks/chunk-UWDNZDWK.mjs +242 -0
- package/dist/react-native/chunks/{chunk-FS7BYE23.mjs → chunk-VQSKZ3EZ.mjs} +9 -152
- package/dist/react-native/chunks/{chunk-UCJU6WNH.mjs → chunk-VVFYOADG.mjs} +7 -6
- package/dist/react-native/chunks/{chunk-VGUWIZFQ.mjs → chunk-YBEW6YTR.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-JYL35A4A.mjs → chunk-YHKZSLOC.mjs} +7 -33
- package/dist/react-native/chunks/{chunk-3CTWSQRW.mjs → chunk-ZBSWRSBG.mjs} +4 -30
- package/dist/react-native/chunks/chunk-ZYDKJXQJ.mjs +96 -0
- package/dist/react-native/chunks/{cold-module-KFGEWYEL.mjs → cold-module-TJL6AFAD.mjs} +29 -21
- package/dist/react-native/chunks/{durability-wiring-QKJB2QBT.mjs → durability-wiring-RRDYJLLM.mjs} +1882 -1358
- package/dist/react-native/chunks/gzip.react-native-DNB5YNFA.mjs +3 -0
- package/dist/react-native/chunks/import-JYBMEJPQ.mjs +29 -0
- package/dist/react-native/chunks/methods-X6F36SJE.mjs +30 -0
- package/dist/react-native/chunks/module-QT5HZAY4.mjs +33 -0
- package/dist/react-native/chunks/{module-UJ5VUARS.mjs → module-S4DKSWMF.mjs} +10 -9
- package/dist/react-native/chunks/operations-RYKTSZQA.mjs +5 -0
- package/dist/react-native/chunks/{phrase-module-76UAPPSG.mjs → phrase-module-JZ37TB7N.mjs} +1 -1
- package/dist/react-native/chunks/{pool-CD4ANYUI.mjs → pool-RTGXJXPU.mjs} +3 -2
- package/dist/{browser/restore-queue-UQ6AAUVX.mjs → react-native/chunks/restore-queue-ZBVIKJWI.mjs} +2 -2
- package/dist/react-native/chunks/retention-PPCTP2VY.mjs +219 -0
- package/dist/react-native/chunks/{runtime-3MCDLJAF.mjs → runtime-KUATOLYB.mjs} +1 -1
- package/dist/react-native/chunks/{snapshot-KVBD4LRC.mjs → snapshot-ZBIEOZTZ.mjs} +47 -314
- package/dist/react-native/chunks/sync-state-PASCIHHT.mjs +15 -0
- package/dist/react-native/chunks/{write-ES5A3WUA.mjs → write-2W4FTX7J.mjs} +25 -18
- package/dist/react-native/partial-words.mjs +6 -4
- package/dist/react-native/pattern.mjs +4 -3
- package/dist/react-native/sync.mjs +2236 -0
- package/dist/react-native/synonyms.mjs +7 -4
- package/dist/react.d.ts +10 -9
- package/dist/react.mjs +7 -1
- package/dist/{rerank-3W54N6P2.mjs → rerank-IZOB6NII.mjs} +4 -4
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{react-native/chunks/restore-queue-H5VCN453.mjs → restore-queue-COI2GSSK.mjs} +2 -2
- package/dist/retention-55WA7GPU.mjs +58 -0
- package/dist/{runtime-L2DZYY6N.mjs → runtime-UZOC3NPY.mjs} +5 -5
- package/dist/{schema-D33CyXCy.d.ts → schema-DDauvDOv.d.ts} +1 -1
- package/dist/server.d.ts +22 -19
- package/dist/server.mjs +868 -50
- package/dist/{snapshot-WMX6JCLP.mjs → snapshot-NFX2EYN2.mjs} +62 -36
- 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/{config-aIsy7mcL.d.ts → sync-uXR7MmM7.d.ts} +53 -444
- package/dist/sync.browser.mjs +2231 -0
- package/dist/sync.d.ts +23 -0
- package/dist/sync.mjs +2206 -0
- package/dist/synonyms.mjs +5 -3
- package/dist/{tasks-C4ElXr4P.d.ts → tasks-BShx8pdK.d.ts} +4 -4
- package/dist/thread-P2G2FWM2.mjs +44 -0
- package/dist/types-SnO7_tAI.d.ts +228 -0
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +6 -6
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-SKJ6HW7O.mjs → write-FGB62BHQ.mjs} +31 -23
- package/openapi.json +119 -3
- package/package.json +28 -8
- package/dist/browser/import-QOY6ZH6X.mjs +0 -12
- package/dist/chunk-7LDMWKP6.mjs +0 -209
- package/dist/react-native/chunks/chunk-L4M7QJNP.mjs +0 -110
- 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/thread-I7DVHHW7.mjs +0 -31
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { createDocIdMap, detectRuntime, countWrite, HEAP_RESUME_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE, HEAP_BLOCK_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE, yieldBackgroundTurn, backgroundTurnIsSpent, reservedHeapBytes, reserveHeapBytes, turnIsSpent, yieldTurn, MIN_OVERSAMPLE, noteThreadSlotGone, threadSlotOfWorker, collectYoungGenerationBeforeRefusal, collectGarbageBeforeRefusal, collectAndReturnPages, admittedHeapBytes, turnsAreBudgeted, indexChangeOutsideExternalWaits, changeIndexOutsideExternalWaits } from './chunk-LQAKO5QV.mjs';
|
|
2
|
-
import { createRequestId } from './chunk-NNE4VDMM.mjs';
|
|
3
|
-
import { fnv1a, splitWorkerBudget, resolveWorkerCount, DEFAULT_REQUEST_TIMEOUT_MS, resolveRequestThreadCount, FNV_OFFSET_BASIS, MAX_RENUMBERED_SEARCH_ATTEMPTS, fnv1aContinue, fnv1aContinueTaggedNumbers } from './chunk-L4M7QJNP.mjs';
|
|
4
1
|
import { DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS } from './chunk-IO2SMUQD.mjs';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
2
|
+
import { createDocIdMap, detectRuntime, countWrite, HEAP_RESUME_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE, HEAP_BLOCK_FRACTION_BELOW_V8_INEFFECTIVE_MARK_COMPACT_LINE, yieldBackgroundTurn, backgroundTurnIsSpent, reservedHeapBytes, reserveHeapBytes, turnIsSpent, yieldTurn, MIN_OVERSAMPLE, noteThreadSlotGone, threadSlotOfWorker, collectYoungGenerationBeforeRefusal, collectGarbageBeforeRefusal, collectAndReturnPages, admittedHeapBytes, turnsAreBudgeted, indexChangeOutsideExternalWaits, changeIndexOutsideExternalWaits } from './chunk-NCJS3WIY.mjs';
|
|
3
|
+
import { MAX_INDEX_CONFIGURATION_BYTES, ABSOLUTE_WINDOWS_PATH_PATTERN, MODULE_URL_SCHEME_PATTERN, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, BATCH_CHUNK_SIZE, MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN, HEAP_PRESSURE_WARNING_FRACTION, MAX_SUGGEST_LIMIT, FOREIGN_STATS_TTL_MS, DEFAULT_SUGGEST_LIMIT, DEFAULT_LIMIT, DEFAULT_OFFSET, MIN_DOCUMENTS_FOR_SEGMENTS, HEAP_PRESSURE_REARM_FRACTION, MAX_DOC_ID_LENGTH } from './chunk-AM7RSBPF.mjs';
|
|
4
|
+
import { createRequestId } from './chunk-NNE4VDMM.mjs';
|
|
5
|
+
import { splitWorkerBudget, resolveWorkerCount, DEFAULT_REQUEST_TIMEOUT_MS, resolveRequestThreadCount, MAX_RENUMBERED_SEARCH_ATTEMPTS } from './chunk-LU3Y3P63.mjs';
|
|
6
|
+
import { PATTERN_EXPRESSION_OPERATORS, PATTERN_TEST_OPERATORS, PATTERN_ELEMENT_OPERATORS, requireTextRangeField, isFiniteNumber, invalid, requireFieldKind, kindOfValue, requireListLength, isObjectRecord, GEO_UNIT_METRES, DEFAULT_PATTERN_WORK_CAP, MAX_FILTER_DEPTH, MATCHER_STATE_BUDGET_BYTES, MAX_FILTER_TESTS, FILTER_OPERAND_COPY_DEPTH, TYPO_CLAIM_SLOTS_PER_WORD, PATTERN_WORK_FLUSH_UNITS } from './chunk-EH5CFV6Z.mjs';
|
|
7
|
+
import { isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES, MIN_POLYGON_POINTS, expandTermPrefix, getNestedValue, tokenizeOptions, raiseEarlierReleaseGraphSetting, messagePackUpperBoundBytes, suggestDisplayTerms, validateDocument, validateDocumentStrict, textFieldsChanged, sameFields, getFlatSchema, getOrCreateFieldNameIndex, partitionDocumentFrequency, visitDocumentSurfaceSpellings, visitDocumentSpellings, validateVectorStorage, validateTextStorage, validateVectorPromotion, ANTIMERIDIAN_SPAN_DEGREES, FULL_TURN_DEGREES, LOCATION_CODE_BITS_PER_AXIS, MAX_COVERING_CELLS, VINCENTY_CONVERGENCE_THRESHOLD, EARTH_RADIUS_METERS, RADIUS_BOX_MARGIN_RATIO, RADIUS_BOX_MARGIN_RADIANS, DEG_TO_RAD, validateRequiredFields, requireDocumentWithinSizeLimit, VINCENTY_MAX_ITERATIONS } from './chunk-AUT7PMA4.mjs';
|
|
8
|
+
import { fuzzyPrefixOf, boundedLevenshtein, fuzzyTermMatches } from './chunk-UNUFZ2QY.mjs';
|
|
9
|
+
import { withOpenIndex, oneAtATime, emitSyncChange } from './chunk-JDOEEMEF.mjs';
|
|
10
|
+
import { encodeStringBlob, encodeLookupKey, visitTokens, codePointOrder, tokenize } from './chunk-7GWPJDOA.mjs';
|
|
11
|
+
import { requireWithinFileLimit, HEADER_SIZE, payloadByteLength, checksumOfChunks, packEnvelopeWithEngineVersion, INDEX_CONFIGURATION_ENVELOPE_VERSION, readHeapStatistics, readOldGenerationStatistics } from './chunk-C2H2QQFW.mjs';
|
|
12
|
+
import { fnv1a, FNV_OFFSET_BASIS, fnv1aContinue, fnv1aContinueTaggedNumbers } from './chunk-CHPTFFJM.mjs';
|
|
13
|
+
import { flattenSchema, partialFieldsOf, schemaFieldsOf, encodeDocument, validateSchema, extractVectorFieldsFromSchema, requireCreatableSchema } from './chunk-O32RB3BL.mjs';
|
|
14
|
+
import { MAX_FILE_BYTES, MAX_DOCUMENT_ENCODING_DEPTH } from './chunk-TJMSKBEM.mjs';
|
|
15
|
+
import { parsedTypeOf, isSingleStringFieldType, isWordIndexedBase, MIN_PATTERN_VALUE_LIMIT, MAX_PATTERN_VALUE_LIMIT, PROTOTYPE_POLLUTION_KEYS, isPlainObject, MAX_NESTING_DEPTH, isStringValuedBase, withSortableOption, isGeopointOrVectorType, isWordIndexedFieldType, isListBase, VECTOR_PATTERN } from './chunk-OQQVRWZ2.mjs';
|
|
16
|
+
import { resolveIndexAnalysis, getLanguage } from './chunk-ZBSWRSBG.mjs';
|
|
12
17
|
import { singleFoldTable, appendFoldedCodePoint, toReducedSortValue, compareComparableValues, defaultSortMode, readSortField, truncateSortString, toComparableSortValue, SORT_VALUE_MAX_CODE_POINTS, compareComparableKeys, sortModeOf, isSortMode, SORT_MODES, compareSortValues } from './chunk-KWRW5U65.mjs';
|
|
13
18
|
import { compareCodePoints, exceedsCodePoints, holdsUnpairedSurrogate, codePointCount } from './chunk-PPEPTUVV.mjs';
|
|
14
19
|
import { bitsetHas, createBitSet, GrowableUint32, bitsetIsEmpty, bitsetSet, bitsetOrInto, bitsetAndNotInto, bitsetAndInto, bitsetFromSet } from './chunk-LVIKKAA6.mjs';
|
|
15
20
|
import { DEFAULT_FUZZY_PREFIX_LENGTH, MAX_CURSOR_LENGTH, MAX_CURSOR_ANCHOR_CODE_POINTS, MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, BM25_DISPLAYED_NAME_LENGTH, RESULT_WINDOW, DEFAULT_LINEAR_ALPHA, MIN_LINEAR_ALPHA, MAX_LINEAR_ALPHA, DEFAULT_RANK_CONSTANT, MIN_RANK_CONSTANT, DEFAULT_PAGE_SIZE, DEFAULT_MAX_PER_GROUP, PREFIX_MAX_EXPANSIONS, MAX_TOLERANCE, MAX_PREFIX_LENGTH } from './chunk-AAAETEJK.mjs';
|
|
16
21
|
import { TARGET_BLOCK_ENTRIES, SEGMENT_TOKEN_TABLE_START, SEGMENT_POSTING_LOG_START, SEGMENT_POSITION_POOL_START, SEGMENT_FIELD_SCRATCH_START, SCORE_BUFFER_INITIAL_TOUCHED_CAPACITY, PRUNING_REJECTION_SLACK, FROZEN_REMOVAL_INDEX_MAX_PROCESS_FRACTION, SORT_COLUMN_MINIMUM_REBUILD_THRESHOLD, SORT_COLUMN_REBUILD_FRACTION_SHIFT } from './chunk-JV6VQY2S.mjs';
|
|
17
|
-
import { reactNativeHost } from './chunk-
|
|
18
|
-
import { ErrorCodes, NarsilError } from './chunk-
|
|
22
|
+
import { reactNativeHost } from './chunk-IOY2SM2P.mjs';
|
|
23
|
+
import { ErrorCodes, NarsilError } from './chunk-CUNGPR5R.mjs';
|
|
19
24
|
import { Decoder, decode, encode } from '@msgpack/msgpack';
|
|
20
25
|
|
|
21
26
|
// src/core/partition/partial-words/platform.browser.ts
|
|
@@ -300,14 +305,6 @@ async function applyInGroups(projection, indexName, write) {
|
|
|
300
305
|
return null;
|
|
301
306
|
}
|
|
302
307
|
|
|
303
|
-
// src/runtime/heap-statistics.browser.ts
|
|
304
|
-
function readHeapStatistics() {
|
|
305
|
-
return null;
|
|
306
|
-
}
|
|
307
|
-
function readOldGenerationStatistics() {
|
|
308
|
-
return null;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
308
|
// src/runtime/process-limit.react-native.ts
|
|
312
309
|
var limitBytes = 0;
|
|
313
310
|
var limitReadAt = Number.NEGATIVE_INFINITY;
|
|
@@ -6182,7 +6179,7 @@ function requireLoadedPhraseCode() {
|
|
|
6182
6179
|
}
|
|
6183
6180
|
function loadPhraseCode() {
|
|
6184
6181
|
if (loading === null) {
|
|
6185
|
-
loading = import('./phrase-module-
|
|
6182
|
+
loading = import('./phrase-module-JZ37TB7N.mjs').then(
|
|
6186
6183
|
(code) => {
|
|
6187
6184
|
loaded = code;
|
|
6188
6185
|
return code;
|
|
@@ -13518,7 +13515,7 @@ async function attachSegments(entry, action) {
|
|
|
13518
13515
|
growPartitionsTo(entry.manager, segment.partitionId);
|
|
13519
13516
|
const surfaceForms = segment.survivingSurfaceForms;
|
|
13520
13517
|
const spellings = surfaceForms === void 0 ? void 0 : NO_REMOVED_SPELLINGS;
|
|
13521
|
-
const frozen = isPagedSnapshot(segment.snapshot) ? (await import('./module-
|
|
13518
|
+
const frozen = isPagedSnapshot(segment.snapshot) ? (await import('./module-QT5HZAY4.mjs')).createPagedFrozenSegment(segment.snapshot) : createSharedFrozenSegment(segment.snapshot, surfaceForms);
|
|
13522
13519
|
for (const docId of segment.tombstonedDocIds ?? []) frozen.tombstoneDocument(docId, spellings);
|
|
13523
13520
|
entry.manager.attachFrozenSegment(segment.partitionId, frozen);
|
|
13524
13521
|
}
|
|
@@ -13573,7 +13570,7 @@ function runSegmentAction(entry, action) {
|
|
|
13573
13570
|
case "attachSegments":
|
|
13574
13571
|
return attachSegments(entry, action);
|
|
13575
13572
|
case "adoptDiskSegments":
|
|
13576
|
-
return import('./module-
|
|
13573
|
+
return import('./module-QT5HZAY4.mjs').then((code) => code.adoptSegmentsOnWorker(entry.manager, action));
|
|
13577
13574
|
case "compactSegments": {
|
|
13578
13575
|
const partition = requireComposite(entry, action.indexName, action.partitionId, "compact");
|
|
13579
13576
|
return mergeFrozenSegments(
|
|
@@ -13621,7 +13618,7 @@ function requireLoadedVectorCode() {
|
|
|
13621
13618
|
function loadVectorCode() {
|
|
13622
13619
|
if (loaded2 !== null) return Promise.resolve(loaded2);
|
|
13623
13620
|
if (loading2 === null) {
|
|
13624
|
-
loading2 = import('./module-
|
|
13621
|
+
loading2 = import('./module-S4DKSWMF.mjs').then(
|
|
13625
13622
|
(code) => {
|
|
13626
13623
|
loaded2 = code;
|
|
13627
13624
|
return code;
|
|
@@ -14037,7 +14034,7 @@ var TEXT_REBUILD_SWITCH_BACKLOG_DOCUMENTS = 1e3;
|
|
|
14037
14034
|
// src/partitioning/rewrite-spill-of.ts
|
|
14038
14035
|
async function rewriteSpillOf(storage, manager, target) {
|
|
14039
14036
|
if (storage === void 0 || (target?.config ?? manager.config).textStorage !== "disk") return null;
|
|
14040
|
-
const { openRewriteSpill } = await import('./module-
|
|
14037
|
+
const { openRewriteSpill } = await import('./module-QT5HZAY4.mjs');
|
|
14041
14038
|
return openRewriteSpill(storage, manager, target);
|
|
14042
14039
|
}
|
|
14043
14040
|
|
|
@@ -14730,7 +14727,7 @@ async function createIndexFromMetadata(deps, metadata, loadData) {
|
|
|
14730
14727
|
const existing = deps.indexRegistry.get(metadata.indexName);
|
|
14731
14728
|
if (existing !== void 0) {
|
|
14732
14729
|
if ((metadata.analysisGeneration ?? 0) > existing.analysisGeneration) {
|
|
14733
|
-
const { adoptSavedAnalysis } = await import('./analysis-change-
|
|
14730
|
+
const { adoptSavedAnalysis } = await import('./analysis-change-EAYO3Y6Q.mjs');
|
|
14734
14731
|
adoptSavedAnalysis(deps.executor.getManager(metadata.indexName), existing, metadata);
|
|
14735
14732
|
}
|
|
14736
14733
|
if (loadData && deps.executor.getManager(metadata.indexName) === void 0) {
|
|
@@ -14785,7 +14782,8 @@ async function createIndexFromMetadata(deps, metadata, loadData) {
|
|
|
14785
14782
|
synonyms,
|
|
14786
14783
|
analysisGeneration: metadata.analysisGeneration ?? 0,
|
|
14787
14784
|
pendingAnalysis: metadata.pendingAnalysis ?? null,
|
|
14788
|
-
durableAnalysis: null
|
|
14785
|
+
durableAnalysis: null,
|
|
14786
|
+
sync: metadata.sync?.enabled === true ? (await import('./sync-state-PASCIHHT.mjs')).syncStateOfMetadata(metadata) : null
|
|
14789
14787
|
});
|
|
14790
14788
|
if (loadData) await deps.indexState().registerOpen(metadata.indexName);
|
|
14791
14789
|
else deps.indexState().registerClosed(metadata.indexName);
|
|
@@ -16662,7 +16660,7 @@ async function startPool(state) {
|
|
|
16662
16660
|
);
|
|
16663
16661
|
}
|
|
16664
16662
|
eligibleIndexNames(state);
|
|
16665
|
-
const [factory, { createWorkerPool }] = await Promise.all([createWorkerFactory(), import('./pool-
|
|
16663
|
+
const [factory, { createWorkerPool }] = await Promise.all([createWorkerFactory(), import('./pool-RTGXJXPU.mjs')]);
|
|
16666
16664
|
let started = null;
|
|
16667
16665
|
const pool = createWorkerPool({
|
|
16668
16666
|
count: state.keywordWorkerCount + state.longQueryWorkerCount,
|
|
@@ -17353,7 +17351,7 @@ async function emitWriteEventAfter(source, indexName, write) {
|
|
|
17353
17351
|
// src/engine/core.ts
|
|
17354
17352
|
async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
17355
17353
|
validateWorkerConfig(config?.workers, config?.lifecycle);
|
|
17356
|
-
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-
|
|
17354
|
+
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-KUATOLYB.mjs')).resolveRerankSettings(config);
|
|
17357
17355
|
const eventHandlers = eventHandlersOf(config?.events);
|
|
17358
17356
|
const vectorWorkerCount = splitWorkerBudget(resolveWorkerCount(config?.workers?.count)).vector;
|
|
17359
17357
|
const vectorCopyPolicy = {
|
|
@@ -17364,7 +17362,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
17364
17362
|
if (config?.lifecycle !== void 0 && durabilityTier === null) {
|
|
17365
17363
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
|
|
17366
17364
|
}
|
|
17367
|
-
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-
|
|
17365
|
+
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-RRDYJLLM.mjs');
|
|
17368
17366
|
const filesystemDurability = durabilityTier?.kind === "wal";
|
|
17369
17367
|
const executor = createDirectExecutor({
|
|
17370
17368
|
vectorWorkerCopies: vectorCopyPolicy,
|
|
@@ -17491,7 +17489,8 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
17491
17489
|
if (entry === void 0) return;
|
|
17492
17490
|
entry.documentCount = documentCount;
|
|
17493
17491
|
entry.partitionCount = partitionCount;
|
|
17494
|
-
}
|
|
17492
|
+
},
|
|
17493
|
+
engineCore: () => engineCore
|
|
17495
17494
|
});
|
|
17496
17495
|
invalidation = createInvalidationFromConfig(config, durabilityTier?.kind ?? null, {
|
|
17497
17496
|
getManager: (indexName) => executor.getManager(indexName) ?? void 0,
|
|
@@ -17549,7 +17548,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
17549
17548
|
requireManager,
|
|
17550
17549
|
resumeChange: async (indexName) => {
|
|
17551
17550
|
if ((indexRegistry.get(indexName)?.pendingAnalysis ?? null) === null) return;
|
|
17552
|
-
await (await import('./analysis-change-entry-
|
|
17551
|
+
await (await import('./analysis-change-entry-TNLUC6IZ.mjs')).resumeChangeOf(engineCore, indexName);
|
|
17553
17552
|
},
|
|
17554
17553
|
onClose: hooks?.onIndexClose,
|
|
17555
17554
|
onOpen: (indexName) => {
|
|
@@ -17636,7 +17635,7 @@ async function startEngineCore(core, config) {
|
|
|
17636
17635
|
checkHeapAfterRecovery(core);
|
|
17637
17636
|
}
|
|
17638
17637
|
if (core.invalidation) await core.invalidation.start();
|
|
17639
|
-
if (core.durability) await (await import('./analysis-change-entry-
|
|
17638
|
+
if (core.durability) await (await import('./analysis-change-entry-TNLUC6IZ.mjs')).resumeEveryChange(core);
|
|
17640
17639
|
if (config?.lifecycle === void 0) await core.analysisRebuild.reviewStaleIndexes();
|
|
17641
17640
|
} catch (err) {
|
|
17642
17641
|
await core.durability?.manager.shutdown().catch(() => void 0);
|
|
@@ -17674,7 +17673,7 @@ async function shutdownEngine(core) {
|
|
|
17674
17673
|
}
|
|
17675
17674
|
}
|
|
17676
17675
|
if (core.rerankAdapters.size > 0) {
|
|
17677
|
-
await (await import('./runtime-
|
|
17676
|
+
await (await import('./runtime-KUATOLYB.mjs')).shutdownRerankAdapters(core.rerankAdapters);
|
|
17678
17677
|
}
|
|
17679
17678
|
await orchestrator.shutdown();
|
|
17680
17679
|
await executor.shutdown();
|
|
@@ -17806,162 +17805,7 @@ function storedBM25Params(params) {
|
|
|
17806
17805
|
return Object.keys(stored).length === 0 ? void 0 : stored;
|
|
17807
17806
|
}
|
|
17808
17807
|
|
|
17809
|
-
// src/serialization/
|
|
17810
|
-
var IEEE_POLYNOMIAL = 3988292384;
|
|
17811
|
-
var ALL_BITS = 4294967295;
|
|
17812
|
-
var cachedTable = null;
|
|
17813
|
-
function buildTable() {
|
|
17814
|
-
const table = new Uint32Array(256);
|
|
17815
|
-
for (let i = 0; i < 256; i++) {
|
|
17816
|
-
let crc = i;
|
|
17817
|
-
for (let bit = 0; bit < 8; bit++) {
|
|
17818
|
-
crc = crc & 1 ? crc >>> 1 ^ IEEE_POLYNOMIAL : crc >>> 1;
|
|
17819
|
-
}
|
|
17820
|
-
table[i] = crc;
|
|
17821
|
-
}
|
|
17822
|
-
return table;
|
|
17823
|
-
}
|
|
17824
|
-
function getTable() {
|
|
17825
|
-
if (cachedTable === null) {
|
|
17826
|
-
cachedTable = buildTable();
|
|
17827
|
-
}
|
|
17828
|
-
return cachedTable;
|
|
17829
|
-
}
|
|
17830
|
-
function crc32(data) {
|
|
17831
|
-
return crc32Final(crc32Update(crc32Init(), data));
|
|
17832
|
-
}
|
|
17833
|
-
function crc32Init() {
|
|
17834
|
-
return ALL_BITS;
|
|
17835
|
-
}
|
|
17836
|
-
function crc32Update(state, data) {
|
|
17837
|
-
const table = getTable();
|
|
17838
|
-
let crc = state;
|
|
17839
|
-
for (let i = 0; i < data.length; i++) {
|
|
17840
|
-
crc = crc >>> 8 ^ table[(crc ^ data[i]) & 255];
|
|
17841
|
-
}
|
|
17842
|
-
return crc;
|
|
17843
|
-
}
|
|
17844
|
-
function crc32Final(state) {
|
|
17845
|
-
return (state ^ ALL_BITS) >>> 0;
|
|
17846
|
-
}
|
|
17847
|
-
|
|
17848
|
-
// src/serialization/chunk-checksum.ts
|
|
17849
|
-
function yieldToEventLoop3() {
|
|
17850
|
-
if (typeof setImmediate === "function") {
|
|
17851
|
-
return new Promise((resolve) => setImmediate(resolve));
|
|
17852
|
-
}
|
|
17853
|
-
return new Promise((resolve) => setTimeout(resolve, 0));
|
|
17854
|
-
}
|
|
17855
|
-
async function advanceChecksum(start, payload) {
|
|
17856
|
-
let state = start;
|
|
17857
|
-
for (let offset = 0; offset < payload.length; offset += CHECKSUM_YIELD_CHUNK_BYTES) {
|
|
17858
|
-
const end = Math.min(offset + CHECKSUM_YIELD_CHUNK_BYTES, payload.length);
|
|
17859
|
-
state = crc32Update(state, payload.subarray(offset, end));
|
|
17860
|
-
if (end < payload.length) {
|
|
17861
|
-
await yieldToEventLoop3();
|
|
17862
|
-
}
|
|
17863
|
-
}
|
|
17864
|
-
return state;
|
|
17865
|
-
}
|
|
17866
|
-
async function checksumOfChunks(chunks) {
|
|
17867
|
-
let state = crc32Init();
|
|
17868
|
-
for (const chunk of chunks) state = await advanceChecksum(state, chunk);
|
|
17869
|
-
return crc32Final(state);
|
|
17870
|
-
}
|
|
17871
|
-
|
|
17872
|
-
// src/serialization/header.ts
|
|
17873
|
-
var MAGIC_BYTES = new Uint8Array([78, 82, 83, 76]);
|
|
17874
|
-
var HEADER_SIZE = 32;
|
|
17875
|
-
var MAX_PAYLOAD_LENGTH = 4294967295;
|
|
17876
|
-
var COMPRESSION_ALGORITHMS = {
|
|
17877
|
-
0: "none",
|
|
17878
|
-
1: "gzip",
|
|
17879
|
-
2: "lz4",
|
|
17880
|
-
3: "zstd"
|
|
17881
|
-
};
|
|
17882
|
-
var COMPRESSION_TO_BITS = {
|
|
17883
|
-
none: 0,
|
|
17884
|
-
gzip: 1,
|
|
17885
|
-
lz4: 2,
|
|
17886
|
-
zstd: 3
|
|
17887
|
-
};
|
|
17888
|
-
function encodeFlags(flags) {
|
|
17889
|
-
let bits = 0;
|
|
17890
|
-
if (flags.compressionEnabled) bits |= 1;
|
|
17891
|
-
bits |= (COMPRESSION_TO_BITS[flags.compressionAlgorithm] & 3) << 1;
|
|
17892
|
-
if (flags.checksumPresent) bits |= 1 << 3;
|
|
17893
|
-
if (flags.encryptionEnabled) bits |= 1 << 4;
|
|
17894
|
-
return bits;
|
|
17895
|
-
}
|
|
17896
|
-
function decodeFlags(value) {
|
|
17897
|
-
const compressionEnabled = (value & 1) === 1;
|
|
17898
|
-
const algorithmBits = value >> 1 & 3;
|
|
17899
|
-
const checksumPresent = (value >> 3 & 1) === 1;
|
|
17900
|
-
const encryptionEnabled = (value >> 4 & 1) === 1;
|
|
17901
|
-
return {
|
|
17902
|
-
compressionEnabled,
|
|
17903
|
-
compressionAlgorithm: COMPRESSION_ALGORITHMS[algorithmBits] ?? "none",
|
|
17904
|
-
checksumPresent,
|
|
17905
|
-
encryptionEnabled
|
|
17906
|
-
};
|
|
17907
|
-
}
|
|
17908
|
-
function writeHeader(header) {
|
|
17909
|
-
if (header.payloadLength > MAX_PAYLOAD_LENGTH) {
|
|
17910
|
-
throw new NarsilError(
|
|
17911
|
-
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
17912
|
-
`A payload of ${header.payloadLength} bytes exceeds the ${MAX_PAYLOAD_LENGTH} bytes the envelope header can describe`,
|
|
17913
|
-
{ payloadLength: header.payloadLength, maxPayloadLength: MAX_PAYLOAD_LENGTH }
|
|
17914
|
-
);
|
|
17915
|
-
}
|
|
17916
|
-
const buffer = new Uint8Array(HEADER_SIZE);
|
|
17917
|
-
const view = new DataView(buffer.buffer);
|
|
17918
|
-
buffer.set(MAGIC_BYTES, 0);
|
|
17919
|
-
buffer[4] = header.envelopeFormatVersion & 255;
|
|
17920
|
-
buffer[5] = header.engineVersionMajor & 255;
|
|
17921
|
-
buffer[6] = header.engineVersionMinor & 255;
|
|
17922
|
-
buffer[7] = header.engineVersionPatch & 255;
|
|
17923
|
-
view.setUint32(8, header.payloadLength, false);
|
|
17924
|
-
view.setUint16(12, encodeFlags(header.flags), false);
|
|
17925
|
-
view.setUint32(14, header.checksum, false);
|
|
17926
|
-
for (let i = 18; i < HEADER_SIZE; i++) {
|
|
17927
|
-
buffer[i] = 0;
|
|
17928
|
-
}
|
|
17929
|
-
return buffer;
|
|
17930
|
-
}
|
|
17931
|
-
function hasNrslMagic(data) {
|
|
17932
|
-
return data.length >= MAGIC_BYTES.length && data[0] === MAGIC_BYTES[0] && data[1] === MAGIC_BYTES[1] && data[2] === MAGIC_BYTES[2] && data[3] === MAGIC_BYTES[3];
|
|
17933
|
-
}
|
|
17934
|
-
function readHeader(data) {
|
|
17935
|
-
if (data.length < HEADER_SIZE) {
|
|
17936
|
-
throw new NarsilError(
|
|
17937
|
-
ErrorCodes.ENVELOPE_INVALID_MAGIC,
|
|
17938
|
-
`Expected at least ${HEADER_SIZE} bytes, received ${data.length}`
|
|
17939
|
-
);
|
|
17940
|
-
}
|
|
17941
|
-
if (data[0] !== MAGIC_BYTES[0] || data[1] !== MAGIC_BYTES[1] || data[2] !== MAGIC_BYTES[2] || data[3] !== MAGIC_BYTES[3]) {
|
|
17942
|
-
throw new NarsilError(ErrorCodes.ENVELOPE_INVALID_MAGIC, "File does not begin with NRSL magic bytes");
|
|
17943
|
-
}
|
|
17944
|
-
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
17945
|
-
const envelopeFormatVersion = data[4];
|
|
17946
|
-
const engineVersionMajor = data[5];
|
|
17947
|
-
const engineVersionMinor = data[6];
|
|
17948
|
-
const engineVersionPatch = data[7];
|
|
17949
|
-
const payloadLength = view.getUint32(8, false);
|
|
17950
|
-
const flagBits = view.getUint16(12, false);
|
|
17951
|
-
const checksum = view.getUint32(14, false);
|
|
17952
|
-
const reserved = data.slice(18, HEADER_SIZE);
|
|
17953
|
-
return {
|
|
17954
|
-
magic: "NRSL",
|
|
17955
|
-
envelopeFormatVersion,
|
|
17956
|
-
engineVersionMajor,
|
|
17957
|
-
engineVersionMinor,
|
|
17958
|
-
engineVersionPatch,
|
|
17959
|
-
payloadLength,
|
|
17960
|
-
flags: decodeFlags(flagBits),
|
|
17961
|
-
checksum,
|
|
17962
|
-
reserved
|
|
17963
|
-
};
|
|
17964
|
-
}
|
|
17808
|
+
// src/serialization/envelope-file.ts
|
|
17965
17809
|
function engineVersionParts() {
|
|
17966
17810
|
const parts = VERSION.split(".");
|
|
17967
17811
|
return [
|
|
@@ -17970,103 +17814,15 @@ function engineVersionParts() {
|
|
|
17970
17814
|
Number.parseInt(parts[2] ?? "0", 10)
|
|
17971
17815
|
];
|
|
17972
17816
|
}
|
|
17973
|
-
function payloadByteLength(chunks) {
|
|
17974
|
-
let total = 0;
|
|
17975
|
-
for (const chunk of chunks) total += chunk.byteLength;
|
|
17976
|
-
return total;
|
|
17977
|
-
}
|
|
17978
|
-
function requireWithinFileLimit(byteLength, what) {
|
|
17979
|
-
if (byteLength <= MAX_FILE_BYTES) return;
|
|
17980
|
-
throw new NarsilError(
|
|
17981
|
-
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
17982
|
-
`The ${what} would take ${byteLength} bytes, above the file size limit of ${MAX_FILE_BYTES}`,
|
|
17983
|
-
{ bytes: byteLength, maximum: MAX_FILE_BYTES }
|
|
17984
|
-
);
|
|
17985
|
-
}
|
|
17986
17817
|
async function packChecksummedEnvelope(payloadChunks, envelopeFormatVersion, what) {
|
|
17987
17818
|
requireWithinFileLimit(HEADER_SIZE + payloadByteLength(payloadChunks), what);
|
|
17988
17819
|
return packEnvelopeWithChecksum(payloadChunks, envelopeFormatVersion, what, await checksumOfChunks(payloadChunks));
|
|
17989
17820
|
}
|
|
17990
17821
|
function packEnvelopeWithChecksum(payloadChunks, envelopeFormatVersion, what, checksum) {
|
|
17991
|
-
|
|
17992
|
-
requireWithinFileLimit(HEADER_SIZE + payloadLength, what);
|
|
17993
|
-
const [major, minor, patch] = engineVersionParts();
|
|
17994
|
-
const header = writeHeader({
|
|
17995
|
-
envelopeFormatVersion,
|
|
17996
|
-
engineVersionMajor: major,
|
|
17997
|
-
engineVersionMinor: minor,
|
|
17998
|
-
engineVersionPatch: patch,
|
|
17999
|
-
payloadLength,
|
|
18000
|
-
flags: { compressionEnabled: false, compressionAlgorithm: "none", checksumPresent: true, encryptionEnabled: false },
|
|
18001
|
-
checksum});
|
|
18002
|
-
return { chunks: [header, ...payloadChunks], byteLength: HEADER_SIZE + payloadLength, checksum };
|
|
18003
|
-
}
|
|
18004
|
-
function loadFailed(message, details) {
|
|
18005
|
-
throw new NarsilError(ErrorCodes.PERSISTENCE_LOAD_FAILED, message, details);
|
|
18006
|
-
}
|
|
18007
|
-
async function gunzipWithinLimit(compressed, what) {
|
|
18008
|
-
const { gunzip } = await import('./gzip.react-native-7JWCLVOB.mjs');
|
|
18009
|
-
try {
|
|
18010
|
-
return await gunzip(compressed, MAX_FILE_BYTES);
|
|
18011
|
-
} catch (error) {
|
|
18012
|
-
if (error?.code === "EFBIG") {
|
|
18013
|
-
loadFailed(`The ${what} inflates past the file size limit of ${MAX_FILE_BYTES} bytes`);
|
|
18014
|
-
}
|
|
18015
|
-
loadFailed(`The ${what} holds a gzip payload that fails to inflate`, {
|
|
18016
|
-
cause: error instanceof Error ? error.message : String(error)
|
|
18017
|
-
});
|
|
18018
|
-
}
|
|
18019
|
-
}
|
|
18020
|
-
async function openChecksummedEnvelope(data, expected) {
|
|
18021
|
-
const { envelopeFormatVersion, what } = expected;
|
|
18022
|
-
const header = readHeader(data);
|
|
18023
|
-
if (header.envelopeFormatVersion !== envelopeFormatVersion) {
|
|
18024
|
-
throw new NarsilError(
|
|
18025
|
-
ErrorCodes.ENVELOPE_VERSION_MISMATCH,
|
|
18026
|
-
`The ${what} holds envelope format v${header.envelopeFormatVersion}, while this build reads it as v${envelopeFormatVersion}`,
|
|
18027
|
-
{ version: header.envelopeFormatVersion, expected: envelopeFormatVersion }
|
|
18028
|
-
);
|
|
18029
|
-
}
|
|
18030
|
-
if (header.flags.encryptionEnabled) {
|
|
18031
|
-
throw new NarsilError(
|
|
18032
|
-
ErrorCodes.ENVELOPE_VERSION_MISMATCH,
|
|
18033
|
-
`The ${what} is encrypted, which this build cannot read`
|
|
18034
|
-
);
|
|
18035
|
-
}
|
|
18036
|
-
if (header.flags.compressionEnabled && !expected.allowsCompression) {
|
|
18037
|
-
loadFailed(`The ${what} is compressed, while its format stores it raw`);
|
|
18038
|
-
}
|
|
18039
|
-
if (header.flags.compressionEnabled && header.flags.compressionAlgorithm !== "gzip") {
|
|
18040
|
-
throw new NarsilError(
|
|
18041
|
-
ErrorCodes.ENVELOPE_VERSION_MISMATCH,
|
|
18042
|
-
`The ${what} uses ${header.flags.compressionAlgorithm} compression, which this build cannot read`
|
|
18043
|
-
);
|
|
18044
|
-
}
|
|
18045
|
-
if (!header.flags.checksumPresent) loadFailed(`The ${what} carries no checksum, while its format requires one`);
|
|
18046
|
-
if (data.byteLength !== HEADER_SIZE + header.payloadLength) {
|
|
18047
|
-
loadFailed(
|
|
18048
|
-
`The ${what} holds ${data.byteLength} bytes where its header gives ${HEADER_SIZE + header.payloadLength}`,
|
|
18049
|
-
{ bytes: data.byteLength, expected: HEADER_SIZE + header.payloadLength }
|
|
18050
|
-
);
|
|
18051
|
-
}
|
|
18052
|
-
const payload = data.subarray(HEADER_SIZE);
|
|
18053
|
-
const computed = await checksumOfChunks([payload]);
|
|
18054
|
-
if (computed !== header.checksum) {
|
|
18055
|
-
throw new NarsilError(
|
|
18056
|
-
ErrorCodes.PERSISTENCE_CRC_MISMATCH,
|
|
18057
|
-
`The checksum of the ${what} does not match its payload`,
|
|
18058
|
-
{
|
|
18059
|
-
expected: header.checksum,
|
|
18060
|
-
computed
|
|
18061
|
-
}
|
|
18062
|
-
);
|
|
18063
|
-
}
|
|
18064
|
-
if (header.flags.compressionEnabled) return { header, payload: await gunzipWithinLimit(payload, what) };
|
|
18065
|
-
return { header, payload };
|
|
17822
|
+
return packEnvelopeWithEngineVersion(payloadChunks, envelopeFormatVersion, what, checksum, engineVersionParts());
|
|
18066
17823
|
}
|
|
18067
17824
|
|
|
18068
17825
|
// src/engine/snapshot/index-configuration.ts
|
|
18069
|
-
var INDEX_CONFIGURATION_ENVELOPE_VERSION = 5;
|
|
18070
17826
|
function refuseCode(entry) {
|
|
18071
17827
|
if (entry.config.tokenizer !== void 0 && typeof entry.config.tokenizer !== "string") {
|
|
18072
17828
|
throw new NarsilError(
|
|
@@ -18084,7 +17840,7 @@ function refuseCode(entry) {
|
|
|
18084
17840
|
function indexConfigurationOf(entry) {
|
|
18085
17841
|
refuseCode(entry);
|
|
18086
17842
|
const synonyms = entry.synonyms === null ? void 0 : rulesOfStoredSynonyms(entry.synonyms);
|
|
18087
|
-
|
|
17843
|
+
const payload = configurationPayloadOf(
|
|
18088
17844
|
entry.config,
|
|
18089
17845
|
entry.language,
|
|
18090
17846
|
entry.embeddingAdapterName,
|
|
@@ -18093,6 +17849,7 @@ function indexConfigurationOf(entry) {
|
|
|
18093
17849
|
synonyms,
|
|
18094
17850
|
entry.analysisGeneration
|
|
18095
17851
|
);
|
|
17852
|
+
return entry.sync === null ? payload : { ...payload, syncEpoch: entry.sync.epoch };
|
|
18096
17853
|
}
|
|
18097
17854
|
function requireConfigurationWithinSizeLimit(config, language) {
|
|
18098
17855
|
const adapter = config.embedding?.adapter;
|
|
@@ -18162,33 +17919,6 @@ async function encodeIndexConfiguration(entry) {
|
|
|
18162
17919
|
}
|
|
18163
17920
|
return bytes;
|
|
18164
17921
|
}
|
|
18165
|
-
function requireConfigurationShape(raw, what) {
|
|
18166
|
-
if (raw === null || typeof raw !== "object" || Array.isArray(raw)) {
|
|
18167
|
-
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `The ${what} does not hold an index configuration`);
|
|
18168
|
-
}
|
|
18169
|
-
const configuration = raw;
|
|
18170
|
-
if (configuration.schema === null || typeof configuration.schema !== "object") {
|
|
18171
|
-
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `The ${what} holds no schema`);
|
|
18172
|
-
}
|
|
18173
|
-
if (typeof configuration.language !== "string" || configuration.language.length === 0) {
|
|
18174
|
-
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `The ${what} holds no language`);
|
|
18175
|
-
}
|
|
18176
|
-
return configuration;
|
|
18177
|
-
}
|
|
18178
|
-
async function decodeIndexConfiguration(bytes) {
|
|
18179
|
-
const { payload } = await openChecksummedEnvelope(bytes, {
|
|
18180
|
-
envelopeFormatVersion: INDEX_CONFIGURATION_ENVELOPE_VERSION,
|
|
18181
|
-
what: "index configuration",
|
|
18182
|
-
allowsCompression: true
|
|
18183
|
-
});
|
|
18184
|
-
let raw;
|
|
18185
|
-
try {
|
|
18186
|
-
raw = decode(payload);
|
|
18187
|
-
} catch {
|
|
18188
|
-
throw new NarsilError(ErrorCodes.PERSISTENCE_LOAD_FAILED, "The index configuration is not MessagePack");
|
|
18189
|
-
}
|
|
18190
|
-
return requireConfigurationShape(raw, "index configuration");
|
|
18191
|
-
}
|
|
18192
17922
|
|
|
18193
17923
|
// src/engine/index-lifecycle.ts
|
|
18194
17924
|
async function runLifecycleHook(core, hookName, context) {
|
|
@@ -18302,7 +18032,8 @@ async function createEngineIndex(core, config, name, requestedConfig, creation =
|
|
|
18302
18032
|
synonyms: synonyms?.encoded ?? null,
|
|
18303
18033
|
analysisGeneration: 0,
|
|
18304
18034
|
pendingAnalysis: null,
|
|
18305
|
-
durableAnalysis: null
|
|
18035
|
+
durableAnalysis: null,
|
|
18036
|
+
sync: null
|
|
18306
18037
|
});
|
|
18307
18038
|
await core.indexState.registerOpen(name);
|
|
18308
18039
|
if (core.durability) {
|
|
@@ -18315,7 +18046,7 @@ async function dropEngineIndex(core, name) {
|
|
|
18315
18046
|
const entry = core.requireIndex(name);
|
|
18316
18047
|
const changeRecorded = () => entry.pendingAnalysis !== null || entry.durableAnalysis !== null;
|
|
18317
18048
|
const abandonChange = async () => {
|
|
18318
|
-
await (await import('./analysis-change-entry-
|
|
18049
|
+
await (await import('./analysis-change-entry-TNLUC6IZ.mjs')).abandonChangeOf(core, name);
|
|
18319
18050
|
};
|
|
18320
18051
|
if (changeRecorded()) await abandonChange();
|
|
18321
18052
|
await core.indexState.drop(name, async () => {
|
|
@@ -18334,6 +18065,7 @@ async function dropEngineIndex(core, name) {
|
|
|
18334
18065
|
core.indexRegistry.delete(name);
|
|
18335
18066
|
core.watermarkNotifier.forget(name);
|
|
18336
18067
|
core.analysisRebuild.clearStale(name);
|
|
18068
|
+
if (entry.sync !== null) emitSyncChange(core.indexRegistry, { kind: "dropped", indexName: name });
|
|
18337
18069
|
});
|
|
18338
18070
|
await runLifecycleHook(core, "onIndexDrop", { indexName: name, config: entry.config });
|
|
18339
18071
|
}
|
|
@@ -20070,6 +19802,31 @@ async function dropEngineIndex2(core, name) {
|
|
|
20070
19802
|
core.mutationCtx.memoryWriteBlock?.memoryReleased();
|
|
20071
19803
|
}
|
|
20072
19804
|
|
|
19805
|
+
// src/engine/sync-epoch.ts
|
|
19806
|
+
async function holdSyncEpochChange(core, indexName) {
|
|
19807
|
+
if ((core.indexRegistry.get(indexName)?.sync ?? null) === null) return () => void 0;
|
|
19808
|
+
return (await import('./operations-RYKTSZQA.mjs')).holdRenewedSyncEpoch(core, indexName);
|
|
19809
|
+
}
|
|
19810
|
+
async function withRenewedSyncEpoch(core, indexName, change) {
|
|
19811
|
+
const release = await holdSyncEpochChange(core, indexName);
|
|
19812
|
+
try {
|
|
19813
|
+
return await change();
|
|
19814
|
+
} finally {
|
|
19815
|
+
release();
|
|
19816
|
+
}
|
|
19817
|
+
}
|
|
19818
|
+
|
|
19819
|
+
// src/engine/clear-index.ts
|
|
19820
|
+
function clearEngineIndex(core, indexName) {
|
|
19821
|
+
return withRenewedSyncEpoch(core, indexName, async () => {
|
|
19822
|
+
await core.executor.execute({ type: "clear", indexName, requestId: indexName });
|
|
19823
|
+
await core.orchestrator.replicateToWorkers({ type: "clear", indexName, requestId: `replicate-clear-${indexName}` });
|
|
19824
|
+
core.watermarkNotifier.forget(indexName);
|
|
19825
|
+
const durable = core.durability?.manager;
|
|
19826
|
+
await (durable?.checkpointFromMemory?.(indexName) ?? durable?.checkpoint(indexName));
|
|
19827
|
+
});
|
|
19828
|
+
}
|
|
19829
|
+
|
|
20073
19830
|
// src/runtime/process-memory.ts
|
|
20074
19831
|
function readProcessMemory() {
|
|
20075
19832
|
const proc = globalThis.process;
|
|
@@ -20112,6 +19869,7 @@ async function replaceNow(core, indexName, bm25) {
|
|
|
20112
19869
|
...bm25 !== void 0 ? { bm25 } : {}
|
|
20113
19870
|
});
|
|
20114
19871
|
await core.orchestrator.awaitWrites(indexName);
|
|
19872
|
+
if (core.requireIndex(indexName).sync !== null) emitSyncChange(core.indexRegistry, { kind: "settings", indexName });
|
|
20115
19873
|
}
|
|
20116
19874
|
function updateIndexBm25(core, indexName, value) {
|
|
20117
19875
|
return withOpenIndex(
|
|
@@ -20171,14 +19929,14 @@ function portabilityOperations(core, config, engine) {
|
|
|
20171
19929
|
return {
|
|
20172
19930
|
snapshot(indexName) {
|
|
20173
19931
|
return withOpenIndex2(indexName, async () => {
|
|
20174
|
-
const { createSnapshot } = await import('./snapshot-
|
|
19932
|
+
const { createSnapshot } = await import('./snapshot-ZBIEOZTZ.mjs');
|
|
20175
19933
|
return createSnapshot(snapshotDepsOf(indexName));
|
|
20176
19934
|
});
|
|
20177
19935
|
},
|
|
20178
19936
|
async restore(indexName, data) {
|
|
20179
19937
|
core.guardShutdown();
|
|
20180
19938
|
validateIndexName(indexName);
|
|
20181
|
-
const restored = import('./restore-queue-
|
|
19939
|
+
const restored = import('./restore-queue-ZBVIKJWI.mjs').then(
|
|
20182
19940
|
({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
|
|
20183
19941
|
);
|
|
20184
19942
|
await emitWriteEventAfter(core, indexName, restored);
|
|
@@ -20187,8 +19945,8 @@ function portabilityOperations(core, config, engine) {
|
|
|
20187
19945
|
exportDocuments(indexName) {
|
|
20188
19946
|
return withOpenIndex2(indexName, async () => {
|
|
20189
19947
|
const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
|
|
20190
|
-
import('./snapshot-
|
|
20191
|
-
import('./write-
|
|
19948
|
+
import('./snapshot-ZBIEOZTZ.mjs'),
|
|
19949
|
+
import('./write-2W4FTX7J.mjs')
|
|
20192
19950
|
]);
|
|
20193
19951
|
const header = indexConfigurationOf(core.requireIndex(indexName));
|
|
20194
19952
|
return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
|
|
@@ -20196,7 +19954,7 @@ function portabilityOperations(core, config, engine) {
|
|
|
20196
19954
|
},
|
|
20197
19955
|
importDocumentExport(indexName, data) {
|
|
20198
19956
|
core.guardShutdown();
|
|
20199
|
-
const imported = import('./import-
|
|
19957
|
+
const imported = import('./import-JYBMEJPQ.mjs').then(
|
|
20200
19958
|
({ readDocumentExport }) => readDocumentExport(engine(), indexName, data)
|
|
20201
19959
|
);
|
|
20202
19960
|
return emitWriteEventAfter(core, indexName, imported);
|
|
@@ -21503,7 +21261,7 @@ function requireCursorDepth(cursor, signature, binding) {
|
|
|
21503
21261
|
}
|
|
21504
21262
|
function hybridSearchOf(params, context, limit, offset, cursorDepth) {
|
|
21505
21263
|
if ((params.hybrid?.depth ?? null) === null) return executeHybridSearch(params, context, limit, offset, cursorDepth);
|
|
21506
|
-
return import('./runtime-
|
|
21264
|
+
return import('./runtime-KUATOLYB.mjs').then(
|
|
21507
21265
|
(runtime) => runtime.searchFixedDepthHybrid(params, context, { cursorDepth: cursorDepth ?? 0, offset, limit }, runtimeHost)
|
|
21508
21266
|
);
|
|
21509
21267
|
}
|
|
@@ -21513,7 +21271,7 @@ function executeQuery(request, callerContext) {
|
|
|
21513
21271
|
if (loadingPhraseCode === null) return runQuery(request, callerContext);
|
|
21514
21272
|
return loadingPhraseCode.then(() => runQuery(request, callerContext));
|
|
21515
21273
|
}
|
|
21516
|
-
return import('./runtime-
|
|
21274
|
+
return import('./runtime-KUATOLYB.mjs').then(
|
|
21517
21275
|
(runtime) => runtime.executeRerankedQuery(request, callerContext, executeQuery, runtimeHost)
|
|
21518
21276
|
);
|
|
21519
21277
|
}
|
|
@@ -21912,7 +21670,7 @@ async function runEngineQuery(core, indexName, params, options) {
|
|
|
21912
21670
|
const manager = core.requireManager(indexName);
|
|
21913
21671
|
const scoped = scopedParams(params, options);
|
|
21914
21672
|
await core.pluginRegistry.runHook("beforeSearch", { indexName, params: scoped });
|
|
21915
|
-
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-
|
|
21673
|
+
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-KUATOLYB.mjs');
|
|
21916
21674
|
const resolvedParams = await resolveVectorText(
|
|
21917
21675
|
rerank === void 0 ? scoped : rerank.withRerankQueryText(scoped),
|
|
21918
21676
|
entry.embeddingAdapter,
|
|
@@ -22031,6 +21789,14 @@ async function runEngineListDocuments(core, indexName, params, partitionIds) {
|
|
|
22031
21789
|
}
|
|
22032
21790
|
}
|
|
22033
21791
|
|
|
21792
|
+
// src/narsil/sync.ts
|
|
21793
|
+
function syncOperations(core) {
|
|
21794
|
+
return {
|
|
21795
|
+
updateSync: async (indexName, setting) => (await import('./methods-X6F36SJE.mjs')).updateSyncOf(core, indexName, setting),
|
|
21796
|
+
getSync: async (indexName) => (await import('./methods-X6F36SJE.mjs')).syncOf(core, indexName)
|
|
21797
|
+
};
|
|
21798
|
+
}
|
|
21799
|
+
|
|
22034
21800
|
// src/narsil/synonyms.ts
|
|
22035
21801
|
function synonymOperations(core) {
|
|
22036
21802
|
return {
|
|
@@ -22209,7 +21975,7 @@ function createNarsilFromCore(core, config) {
|
|
|
22209
21975
|
const entry = requireIndex(indexName);
|
|
22210
21976
|
await withOpenIndexWrite(indexName, async () => {
|
|
22211
21977
|
if (entry.pendingAnalysis === null) return core.analysisRebuild.rebuild(indexName);
|
|
22212
|
-
return (await import('./analysis-change-
|
|
21978
|
+
return (await import('./analysis-change-EAYO3Y6Q.mjs')).resumeAnalysisChange(core, indexName);
|
|
22213
21979
|
});
|
|
22214
21980
|
},
|
|
22215
21981
|
async changeAnalysis(indexName, change) {
|
|
@@ -22217,13 +21983,14 @@ function createNarsilFromCore(core, config) {
|
|
|
22217
21983
|
requireIndex(indexName);
|
|
22218
21984
|
const changed = withOpenIndex2(
|
|
22219
21985
|
indexName,
|
|
22220
|
-
async () => (await import('./analysis-change-
|
|
21986
|
+
async () => (await import('./analysis-change-EAYO3Y6Q.mjs')).changeIndexAnalysis(core, indexName, change)
|
|
22221
21987
|
);
|
|
22222
21988
|
await emitWriteEventAfter(core, indexName, changed);
|
|
22223
21989
|
},
|
|
22224
21990
|
...portabilityOperations(core, config, () => narsil),
|
|
22225
21991
|
...synonymOperations(core),
|
|
22226
21992
|
...bm25Operations(core),
|
|
21993
|
+
...syncOperations(core),
|
|
22227
21994
|
async checkpoint(indexName) {
|
|
22228
21995
|
guardShutdown();
|
|
22229
21996
|
requireIndex(indexName);
|
|
@@ -22234,13 +22001,7 @@ function createNarsilFromCore(core, config) {
|
|
|
22234
22001
|
async clear(indexName) {
|
|
22235
22002
|
guardShutdown();
|
|
22236
22003
|
requireIndex(indexName);
|
|
22237
|
-
await withOpenIndexWrite(indexName,
|
|
22238
|
-
await executor.execute({ type: "clear", indexName, requestId: indexName });
|
|
22239
|
-
await orchestrator.replicateToWorkers({ type: "clear", indexName, requestId: `replicate-clear-${indexName}` });
|
|
22240
|
-
core.watermarkNotifier.forget(indexName);
|
|
22241
|
-
const durable = core.durability?.manager;
|
|
22242
|
-
await (durable?.checkpointFromMemory?.(indexName) ?? durable?.checkpoint(indexName));
|
|
22243
|
-
});
|
|
22004
|
+
await withOpenIndexWrite(indexName, () => clearEngineIndex(core, indexName));
|
|
22244
22005
|
},
|
|
22245
22006
|
async rebalance(indexName, targetPartitionCount) {
|
|
22246
22007
|
guardShutdown();
|
|
@@ -22254,12 +22015,15 @@ function createNarsilFromCore(core, config) {
|
|
|
22254
22015
|
if (rebalancesStarting.get(indexName) === started) rebalancesStarting.delete(indexName);
|
|
22255
22016
|
}
|
|
22256
22017
|
rebalancesStarting.set(indexName, started);
|
|
22257
|
-
const rebalanced = withOpenIndex2(
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
|
|
22018
|
+
const rebalanced = withOpenIndex2(
|
|
22019
|
+
indexName,
|
|
22020
|
+
() => withRenewedSyncEpoch(core, indexName, async () => {
|
|
22021
|
+
const { executeRebalance } = await import('./analysis-change-EAYO3Y6Q.mjs');
|
|
22022
|
+
const running = executeRebalance(requireManager(indexName), indexName, targetPartitionCount, rebalanceCtx);
|
|
22023
|
+
releaseWrites();
|
|
22024
|
+
await running;
|
|
22025
|
+
})
|
|
22026
|
+
);
|
|
22263
22027
|
return emitWriteEventAfter(core, indexName, rebalanced).finally(releaseWrites);
|
|
22264
22028
|
},
|
|
22265
22029
|
async updatePartitionConfig(indexName, partitionConfig) {
|
|
@@ -22382,4 +22146,4 @@ async function createNarsil(config) {
|
|
|
22382
22146
|
// src/index.ts
|
|
22383
22147
|
var VERSION = "0.1.0";
|
|
22384
22148
|
|
|
22385
|
-
export { ARRAY_POSITION_GAP, DEFAULT_BM25_B, DEFAULT_BM25_K1, DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE,
|
|
22149
|
+
export { ARRAY_POSITION_GAP, DEFAULT_BM25_B, DEFAULT_BM25_K1, DEFAULT_WRITE_AHEAD_QUEUE_MAX_SIZE, REBALANCE_CHUNK_SIZE, VERSION, arrayPositionsAreStale, assemblePagedFrozenSegment, buildPartialWordTableFrom, buildSegmentPayload, createCompositePartition, createEncodedDocumentSource, createFrozenSegment, createNarsil, createPartitionIndex, createPartitionManager, createPartitionRouter, createSharedFrozenSegment, decodeEveryStoredDocument, decodeMapWithoutFields, decodeStoredDocument, decodeSurfaceTable, deleteNestedValue, emitEngineEvent, encodeIndexConfiguration, encodeSurfaceTable, endOfValue, engineVersionParts, extractVectorFromDoc, fieldIndexRemapOf, freezeSegmentShared, generateId, holdSyncEpochChange, holdsADiscardedField, insertDocumentVectors, isCompositePartition, loadVectorCodeFor, mergeDocFrequencies, mergeFieldIndexes2 as mergeFieldIndexes, mergeFieldLengths, mergePartialWords, mergeSegmentContents, mergeSurfaceForms2 as mergeSurfaceForms, packChecksummedEnvelope, packEnvelopeWithChecksum, partitionStateOf, prepareConfiguredSynonyms, prepareDocumentVectors, prepareStoredSynonyms, readResidentMemory, rebuildTextIndexes, reconstructSchemaFromMetadata, registerPartialWordSearch, registerPatternSearch, registerSynonyms, removeDocumentVectors, requireConfigurationWithinSizeLimit, requireSurfaceFormsForPartialFields, resolvePartialWordAnalysis, resolvePartitionInsertOptions, rewriteSpillOf, rulesOfStoredSynonyms, scanPostingBlocks, segmentArraysOf, selectionKeeps, shareSegmentArrays, storedArrayPositionGap, survivorDocumentsOf, textRebuildTargetOf, toError2 as toError, validateEmbeddingConfig, validatePatternValueLimit, validateRequiredFieldsInSchema, vectorsEqual, wrapFrozenTokenTable, yieldToEventLoop2 as yieldToEventLoop };
|