@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
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-AO2FAYIZ.mjs';
|
|
2
|
+
import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, graphPartKey, vectorFileKey } from './chunk-Q3TCTQCC.mjs';
|
|
3
|
+
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-HVYICDY3.mjs';
|
|
4
|
+
import { requireValidFieldTypes } from './chunk-Z3TNWCI5.mjs';
|
|
5
|
+
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
|
|
7
|
+
import { decode } from '@msgpack/msgpack';
|
|
8
|
+
|
|
9
|
+
// src/persistence/durability/segment/manifest-fields.ts
|
|
10
|
+
function invalidManifest(message, details) {
|
|
11
|
+
throw new NarsilError(ErrorCodes.PERSISTENCE_LOAD_FAILED, `Segment manifest ${message}`, details);
|
|
12
|
+
}
|
|
13
|
+
function isRecord(value) {
|
|
14
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof Uint8Array);
|
|
15
|
+
}
|
|
16
|
+
function isId(value) {
|
|
17
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= MAX_SEGMENT_ID;
|
|
18
|
+
}
|
|
19
|
+
function isUint32(value) {
|
|
20
|
+
return typeof value === "number" && Number.isInteger(value) && value >= 0 && value <= 4294967295;
|
|
21
|
+
}
|
|
22
|
+
function isSequenceNumber(value) {
|
|
23
|
+
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
24
|
+
}
|
|
25
|
+
function readFileRef(raw, expectedKey, what) {
|
|
26
|
+
if (raw.key !== expectedKey) {
|
|
27
|
+
invalidManifest(`lists the ${what} under the key "${String(raw.key)}" where it belongs at "${expectedKey}"`, {
|
|
28
|
+
key: raw.key,
|
|
29
|
+
expected: expectedKey
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const bytes = raw.bytes;
|
|
33
|
+
if (typeof bytes !== "number" || !Number.isInteger(bytes) || bytes < HEADER_SIZE || bytes > MAX_FILE_BYTES) {
|
|
34
|
+
invalidManifest(`gives the ${what} "${expectedKey}" an invalid length`, { key: expectedKey, bytes });
|
|
35
|
+
}
|
|
36
|
+
if (!isUint32(raw.checksum)) invalidManifest(`gives the ${what} "${expectedKey}" an invalid checksum`);
|
|
37
|
+
if (raw.headOffset === void 0) return { key: expectedKey, bytes, checksum: raw.checksum };
|
|
38
|
+
const { headOffset, headLength, headChecksum } = raw;
|
|
39
|
+
if (!isSequenceNumber(headOffset) || !isUint32(headLength) || !isUint32(headChecksum)) {
|
|
40
|
+
invalidManifest(`gives the ${what} "${expectedKey}" an invalid head`, { key: expectedKey });
|
|
41
|
+
}
|
|
42
|
+
if (headOffset + headLength > bytes - HEADER_SIZE) {
|
|
43
|
+
invalidManifest(`ends the head of the ${what} "${expectedKey}" outside its payload`, {
|
|
44
|
+
key: expectedKey,
|
|
45
|
+
headOffset,
|
|
46
|
+
headLength,
|
|
47
|
+
bytes
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return { key: expectedKey, bytes, checksum: raw.checksum, headOffset, headLength, headChecksum };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// src/persistence/durability/segment/manifest-vectors-decode.ts
|
|
54
|
+
function normalizeFile(raw, indexName, fieldPath, nextFileId, seenIds) {
|
|
55
|
+
if (!isRecord(raw) || !isId(raw.id)) invalidManifest("has an invalid vector file reference", { fieldPath });
|
|
56
|
+
if (raw.id >= nextFileId || seenIds.has(raw.id)) {
|
|
57
|
+
invalidManifest(`lists vector file ${raw.id} of "${fieldPath}" twice or at its next file id`, { fieldPath });
|
|
58
|
+
}
|
|
59
|
+
seenIds.add(raw.id);
|
|
60
|
+
const count = raw.count;
|
|
61
|
+
if (typeof count !== "number" || !Number.isInteger(count) || count < 0 || count > VECTOR_FILE_MAX_VECTORS) {
|
|
62
|
+
invalidManifest(`gives vector file ${raw.id} of "${fieldPath}" an invalid count`, { fieldPath, count });
|
|
63
|
+
}
|
|
64
|
+
const dead = raw.dead ?? null;
|
|
65
|
+
if (dead !== null && !(dead instanceof Uint8Array)) invalidManifest("has dead vectors that are not bytes");
|
|
66
|
+
if (dead !== null && dead.byteLength !== deadBytesFor(count)) {
|
|
67
|
+
invalidManifest(`marks the dead vectors of file ${raw.id} of "${fieldPath}" with the wrong number of bytes`);
|
|
68
|
+
}
|
|
69
|
+
const ref = readFileRef(raw, vectorFileKey(indexName, fieldPath, raw.id), "vector file");
|
|
70
|
+
return { ...ref, id: raw.id, count, dead };
|
|
71
|
+
}
|
|
72
|
+
function normalizeGraphParts(raw, indexName, fieldPath, generation) {
|
|
73
|
+
if (!Array.isArray(raw)) invalidManifest(`gives "${fieldPath}" no list of graph parts`, { fieldPath });
|
|
74
|
+
if (raw.length > 0 && generation === 0) invalidManifest(`lists graph parts of "${fieldPath}" at generation 0`);
|
|
75
|
+
return raw.map((part, at) => {
|
|
76
|
+
if (!isRecord(part)) invalidManifest(`has an invalid graph part of "${fieldPath}"`, { fieldPath });
|
|
77
|
+
return readFileRef(part, graphPartKey(indexName, fieldPath, generation, at), "graph part");
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function normalizeField(raw, indexName, seenFields) {
|
|
81
|
+
if (!isRecord(raw) || typeof raw.fieldPath !== "string") invalidManifest("has an invalid vector reference");
|
|
82
|
+
const fieldPath = raw.fieldPath;
|
|
83
|
+
if (seenFields.has(fieldPath)) invalidManifest(`lists the vector field "${fieldPath}" twice`, { fieldPath });
|
|
84
|
+
seenFields.add(fieldPath);
|
|
85
|
+
if (!isId(raw.nextFileId)) invalidManifest(`gives "${fieldPath}" an invalid next file id`, { fieldPath });
|
|
86
|
+
if (!Array.isArray(raw.files)) invalidManifest(`gives "${fieldPath}" no list of vector files`, { fieldPath });
|
|
87
|
+
if (!isId(raw.graphGeneration)) invalidManifest(`gives "${fieldPath}" an invalid graph generation`, { fieldPath });
|
|
88
|
+
const nextFileId = raw.nextFileId;
|
|
89
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
90
|
+
return {
|
|
91
|
+
fieldPath,
|
|
92
|
+
nextFileId,
|
|
93
|
+
files: raw.files.map((file) => normalizeFile(file, indexName, fieldPath, nextFileId, seenIds)),
|
|
94
|
+
graphGeneration: raw.graphGeneration,
|
|
95
|
+
graphParts: normalizeGraphParts(raw.graphParts, indexName, fieldPath, raw.graphGeneration)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
function normalizeVectorFields(raw, indexName) {
|
|
99
|
+
if (!Array.isArray(raw)) invalidManifest("has malformed vector references");
|
|
100
|
+
const seenFields = /* @__PURE__ */ new Set();
|
|
101
|
+
return raw.map((field) => normalizeField(field, indexName, seenFields));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// src/persistence/durability/segment/manifest-decode.ts
|
|
105
|
+
async function openManifestPayload(data) {
|
|
106
|
+
const { payload } = await openChecksummedEnvelope(data, {
|
|
107
|
+
envelopeFormatVersion: MANIFEST_ENVELOPE_VERSION,
|
|
108
|
+
what: "segment manifest",
|
|
109
|
+
allowsCompression: true
|
|
110
|
+
});
|
|
111
|
+
const raw = decode(payload);
|
|
112
|
+
if (!isRecord(raw)) invalidManifest("is not a map");
|
|
113
|
+
return raw;
|
|
114
|
+
}
|
|
115
|
+
function listedKeysOf(raw) {
|
|
116
|
+
const keys = [];
|
|
117
|
+
for (const partition of Array.isArray(raw.partitions) ? raw.partitions : []) {
|
|
118
|
+
if (!isRecord(partition) || !Array.isArray(partition.segments)) continue;
|
|
119
|
+
for (const segment of partition.segments)
|
|
120
|
+
if (isRecord(segment) && typeof segment.key === "string") keys.push(segment.key);
|
|
121
|
+
}
|
|
122
|
+
for (const field of Array.isArray(raw.vectors) ? raw.vectors : []) {
|
|
123
|
+
if (!isRecord(field)) continue;
|
|
124
|
+
for (const list of [field.files, field.graphParts]) {
|
|
125
|
+
if (!Array.isArray(list)) continue;
|
|
126
|
+
for (const file of list) if (isRecord(file) && typeof file.key === "string") keys.push(file.key);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return keys;
|
|
130
|
+
}
|
|
131
|
+
async function decodeSegmentManifest(data, indexName) {
|
|
132
|
+
return decodeManifestPayload(await openManifestPayload(data), indexName);
|
|
133
|
+
}
|
|
134
|
+
function decodeManifestPayload(raw, indexName) {
|
|
135
|
+
if (raw.version === EARLIER_SEGMENT_MANIFEST_VERSION) return { kind: "earlier", payload: raw };
|
|
136
|
+
if (raw.version !== SEGMENT_MANIFEST_VERSION) {
|
|
137
|
+
throw new NarsilError(
|
|
138
|
+
ErrorCodes.ENVELOPE_VERSION_MISMATCH,
|
|
139
|
+
`The segment manifest of index "${indexName}" holds layout ${String(raw.version)}, which this release cannot open. Export the index with the release that wrote it and import the export`,
|
|
140
|
+
{ indexName, version: raw.version }
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
const schema = raw.schema;
|
|
144
|
+
if (!isRecord(schema)) invalidManifest("is missing its schema");
|
|
145
|
+
requireValidFieldTypes(schema);
|
|
146
|
+
if (typeof raw.language !== "string") invalidManifest("is missing its language");
|
|
147
|
+
if (raw.analysisGeneration !== void 0 && !isSequenceNumber(raw.analysisGeneration)) {
|
|
148
|
+
invalidManifest("has an invalid analysis generation");
|
|
149
|
+
}
|
|
150
|
+
return {
|
|
151
|
+
kind: "current",
|
|
152
|
+
manifest: {
|
|
153
|
+
version: SEGMENT_MANIFEST_VERSION,
|
|
154
|
+
schema,
|
|
155
|
+
language: raw.language,
|
|
156
|
+
...raw.analysisGeneration ? { analysisGeneration: raw.analysisGeneration } : {},
|
|
157
|
+
checkpoint: normalizeCheckpoint(raw.checkpoint),
|
|
158
|
+
partitions: normalizePartitions(raw.partitions, indexName),
|
|
159
|
+
vectors: normalizeVectorFields(raw.vectors, indexName)
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function normalizeCheckpoint(raw) {
|
|
164
|
+
if (!Array.isArray(raw)) invalidManifest("is missing its checkpoint list");
|
|
165
|
+
const seen = /* @__PURE__ */ new Set();
|
|
166
|
+
return raw.map((entry) => {
|
|
167
|
+
if (!isRecord(entry) || !isUint32(entry.partitionId) || !isSequenceNumber(entry.lastSeqNo) || !isSequenceNumber(entry.primaryTerm) || seen.has(entry.partitionId)) {
|
|
168
|
+
invalidManifest("has an invalid partition checkpoint", { entry });
|
|
169
|
+
}
|
|
170
|
+
seen.add(entry.partitionId);
|
|
171
|
+
const checkpoint = {
|
|
172
|
+
partitionId: entry.partitionId,
|
|
173
|
+
lastSeqNo: entry.lastSeqNo,
|
|
174
|
+
primaryTerm: entry.primaryTerm
|
|
175
|
+
};
|
|
176
|
+
if (entry.termHistory !== void 0) {
|
|
177
|
+
checkpoint.termHistory = normalizeTermHistory(entry.termHistory, entry.partitionId, entry.lastSeqNo);
|
|
178
|
+
}
|
|
179
|
+
return checkpoint;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function normalizeTermHistory(raw, partitionId, lastSeqNo) {
|
|
183
|
+
if (!Array.isArray(raw)) invalidManifest("has a term history that is not a list", { partitionId });
|
|
184
|
+
let previous = null;
|
|
185
|
+
return raw.map((start) => {
|
|
186
|
+
if (!isRecord(start) || !isSequenceNumber(start.primaryTerm) || !isSequenceNumber(start.firstSeqNo)) {
|
|
187
|
+
invalidManifest("has an invalid term history entry", { partitionId });
|
|
188
|
+
}
|
|
189
|
+
const read = { primaryTerm: start.primaryTerm, firstSeqNo: start.firstSeqNo };
|
|
190
|
+
if (read.firstSeqNo > lastSeqNo) {
|
|
191
|
+
invalidManifest(`has a term starting at seqNo ${read.firstSeqNo}, above lastSeqNo ${lastSeqNo}`, { partitionId });
|
|
192
|
+
}
|
|
193
|
+
if (previous !== null && (read.primaryTerm <= previous.primaryTerm || read.firstSeqNo <= previous.firstSeqNo)) {
|
|
194
|
+
invalidManifest("has a term history that fails to ascend strictly", { partitionId });
|
|
195
|
+
}
|
|
196
|
+
previous = read;
|
|
197
|
+
return read;
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
function normalizePartitions(raw, indexName) {
|
|
201
|
+
if (!Array.isArray(raw)) invalidManifest("is missing partition entries");
|
|
202
|
+
const seen = /* @__PURE__ */ new Set();
|
|
203
|
+
return raw.map((entry) => {
|
|
204
|
+
if (!isRecord(entry) || !isUint32(entry.partitionId) || seen.has(entry.partitionId)) {
|
|
205
|
+
invalidManifest("has a partition without a valid id", { partitionId: isRecord(entry) ? entry.partitionId : null });
|
|
206
|
+
}
|
|
207
|
+
seen.add(entry.partitionId);
|
|
208
|
+
const segments = normalizeSegments(entry.segments, indexName, entry.partitionId);
|
|
209
|
+
return {
|
|
210
|
+
partitionId: entry.partitionId,
|
|
211
|
+
nextSegmentId: readNextSegmentId(entry.nextSegmentId, segments, entry.partitionId),
|
|
212
|
+
segments
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function normalizeSegments(raw, indexName, partitionId) {
|
|
217
|
+
if (!Array.isArray(raw)) invalidManifest("has malformed segment references", { partitionId });
|
|
218
|
+
if (raw.length > MAX_SEGMENTS_PER_PARTITION) {
|
|
219
|
+
invalidManifest(`lists ${raw.length} segments for partition ${partitionId}, above ${MAX_SEGMENTS_PER_PARTITION}`);
|
|
220
|
+
}
|
|
221
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
222
|
+
return raw.map((segment) => {
|
|
223
|
+
if (!isRecord(segment) || !isId(segment.id) || !isUint32(segment.docCount) || !isUint32(segment.tombstoneCount)) {
|
|
224
|
+
invalidManifest("has an invalid segment reference", { partitionId });
|
|
225
|
+
}
|
|
226
|
+
if (seenIds.has(segment.id)) invalidManifest(`reuses segment id ${segment.id} in partition ${partitionId}`);
|
|
227
|
+
seenIds.add(segment.id);
|
|
228
|
+
const ref = readFileRef(segment, segmentKey(indexName, partitionId, segment.id), "segment");
|
|
229
|
+
return { ...ref, id: segment.id, docCount: segment.docCount, tombstoneCount: segment.tombstoneCount };
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function readNextSegmentId(value, segments, partitionId) {
|
|
233
|
+
if (!isId(value)) invalidManifest("has an invalid next segment id", { partitionId });
|
|
234
|
+
for (const segment of segments) {
|
|
235
|
+
if (segment.id >= value) {
|
|
236
|
+
invalidManifest(`next segment id ${value} does not exceed segment id ${segment.id}`, { partitionId });
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return value;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { decodeManifestPayload, decodeSegmentManifest, invalidManifest, isId, isRecord, isSequenceNumber, isUint32, listedKeysOf, openManifestPayload };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { youngGenerationBytesOfThisV8 } from './chunk-Q2UL2TPC.mjs';
|
|
2
|
+
import { totalmem } from 'os';
|
|
3
|
+
import { getHeapSpaceStatistics, getHeapStatistics } from 'v8';
|
|
4
|
+
|
|
5
|
+
var MEGABYTE_BYTES = 1048576;
|
|
6
|
+
var IN_MEGABYTES = /^--max-old-space-size=(\d+)$/;
|
|
7
|
+
var AS_PERCENTAGE = /^--max-old-space-size-percentage=(\d+(?:\.\d+)?)$/;
|
|
8
|
+
var SEMI_SPACE_IN_MEGABYTES = /^--max-semi-space-size=(\d+)$/;
|
|
9
|
+
var YOUNG_GENERATION_SPACES = /* @__PURE__ */ new Set(["new_space", "new_large_object_space"]);
|
|
10
|
+
var V8_YOUNG_GENERATION_BYTES_PER_SEMI_SPACE_BYTE = 3;
|
|
11
|
+
function flagEntries() {
|
|
12
|
+
const fromNodeOptions = (process.env.NODE_OPTIONS ?? "").split(/\s+/).filter((entry) => entry.length > 0);
|
|
13
|
+
return [...fromNodeOptions, ...process.execArgv];
|
|
14
|
+
}
|
|
15
|
+
function memoryTheHostAllows() {
|
|
16
|
+
const constrained = process.constrainedMemory?.() ?? 0;
|
|
17
|
+
return constrained > 0 ? constrained : totalmem();
|
|
18
|
+
}
|
|
19
|
+
function readConfiguredOldSpaceMegabytes() {
|
|
20
|
+
let megabytes = null;
|
|
21
|
+
for (const entry of flagEntries()) {
|
|
22
|
+
const inMegabytes = IN_MEGABYTES.exec(entry);
|
|
23
|
+
if (inMegabytes !== null) megabytes = Number(inMegabytes[1]);
|
|
24
|
+
if (AS_PERCENTAGE.test(entry)) megabytes = null;
|
|
25
|
+
}
|
|
26
|
+
return megabytes !== null && Number.isFinite(megabytes) && megabytes > 0 ? megabytes : null;
|
|
27
|
+
}
|
|
28
|
+
function readConfiguredLimit() {
|
|
29
|
+
let megabytes = null;
|
|
30
|
+
let percentage = null;
|
|
31
|
+
for (const entry of flagEntries()) {
|
|
32
|
+
const inMegabytes = IN_MEGABYTES.exec(entry);
|
|
33
|
+
if (inMegabytes !== null) {
|
|
34
|
+
megabytes = Number(inMegabytes[1]);
|
|
35
|
+
percentage = null;
|
|
36
|
+
}
|
|
37
|
+
const asPercentage = AS_PERCENTAGE.exec(entry);
|
|
38
|
+
if (asPercentage !== null) {
|
|
39
|
+
percentage = Number(asPercentage[1]);
|
|
40
|
+
megabytes = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const bytes = megabytes !== null && megabytes > 0 ? megabytes * MEGABYTE_BYTES : percentage !== null && percentage > 0 && percentage <= 100 ? Math.floor(memoryTheHostAllows() * percentage / 100) : null;
|
|
44
|
+
return bytes !== null && Number.isFinite(bytes) && bytes > 0 ? bytes : null;
|
|
45
|
+
}
|
|
46
|
+
var configuredLimit;
|
|
47
|
+
function configuredLimitBytes() {
|
|
48
|
+
if (configuredLimit === void 0) configuredLimit = readConfiguredLimit();
|
|
49
|
+
return configuredLimit;
|
|
50
|
+
}
|
|
51
|
+
function readConfiguredYoungGeneration() {
|
|
52
|
+
let megabytes = 0;
|
|
53
|
+
for (const entry of flagEntries()) {
|
|
54
|
+
const semiSpace = SEMI_SPACE_IN_MEGABYTES.exec(entry);
|
|
55
|
+
if (semiSpace !== null) megabytes = Number(semiSpace[1]);
|
|
56
|
+
}
|
|
57
|
+
if (!Number.isFinite(megabytes) || megabytes <= 0) return null;
|
|
58
|
+
const semiSpaceBytes = 2 ** Math.ceil(Math.log2(megabytes)) * MEGABYTE_BYTES;
|
|
59
|
+
return semiSpaceBytes * V8_YOUNG_GENERATION_BYTES_PER_SEMI_SPACE_BYTE;
|
|
60
|
+
}
|
|
61
|
+
var configuredYoungGeneration;
|
|
62
|
+
function configuredYoungGenerationBytes() {
|
|
63
|
+
if (configuredYoungGeneration === void 0) configuredYoungGeneration = readConfiguredYoungGeneration();
|
|
64
|
+
return configuredYoungGeneration;
|
|
65
|
+
}
|
|
66
|
+
var heapSizeLimit;
|
|
67
|
+
function heapSizeLimitBytes() {
|
|
68
|
+
if (heapSizeLimit === void 0) heapSizeLimit = getHeapStatistics().heap_size_limit;
|
|
69
|
+
return heapSizeLimit;
|
|
70
|
+
}
|
|
71
|
+
function readYoungGenerationCeiling() {
|
|
72
|
+
const fromSemiSpace = configuredYoungGenerationBytes();
|
|
73
|
+
if (fromSemiSpace !== null) return fromSemiSpace;
|
|
74
|
+
const oldSpaceMegabytes = readConfiguredOldSpaceMegabytes();
|
|
75
|
+
if (oldSpaceMegabytes !== null) {
|
|
76
|
+
const beyondOldSpace = heapSizeLimitBytes() - oldSpaceMegabytes * MEGABYTE_BYTES;
|
|
77
|
+
if (beyondOldSpace > 0) return beyondOldSpace;
|
|
78
|
+
}
|
|
79
|
+
return youngGenerationBytesOfThisV8();
|
|
80
|
+
}
|
|
81
|
+
var youngGenerationCeiling;
|
|
82
|
+
function youngGenerationCeilingBytes() {
|
|
83
|
+
if (youngGenerationCeiling === void 0) youngGenerationCeiling = readYoungGenerationCeiling();
|
|
84
|
+
return youngGenerationCeiling;
|
|
85
|
+
}
|
|
86
|
+
function readOldGenerationStatistics() {
|
|
87
|
+
try {
|
|
88
|
+
let usedBytes = 0;
|
|
89
|
+
let committedBytes = 0;
|
|
90
|
+
let youngCapacityBytes = 0;
|
|
91
|
+
let youngUsedBytes = 0;
|
|
92
|
+
for (const space of getHeapSpaceStatistics()) {
|
|
93
|
+
if (YOUNG_GENERATION_SPACES.has(space.space_name)) {
|
|
94
|
+
youngCapacityBytes += space.space_size;
|
|
95
|
+
youngUsedBytes += space.space_used_size;
|
|
96
|
+
} else {
|
|
97
|
+
usedBytes += space.space_used_size;
|
|
98
|
+
committedBytes += space.space_size;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const youngCeilingBytes = youngGenerationCeilingBytes();
|
|
102
|
+
const limitBytes = configuredLimitBytes() ?? heapSizeLimitBytes() - youngCeilingBytes;
|
|
103
|
+
if (!Number.isFinite(usedBytes) || !Number.isFinite(limitBytes) || limitBytes <= 0) return null;
|
|
104
|
+
return {
|
|
105
|
+
usedBytes,
|
|
106
|
+
limitBytes,
|
|
107
|
+
youngUsedBytes: Number.isFinite(youngUsedBytes) ? youngUsedBytes : 0,
|
|
108
|
+
committedBytes: Number.isFinite(committedBytes) ? committedBytes : usedBytes,
|
|
109
|
+
youngReserveBytes: Number.isFinite(youngCapacityBytes) ? Math.max(0, youngCeilingBytes - youngCapacityBytes) : 0,
|
|
110
|
+
youngCeilingBytes
|
|
111
|
+
};
|
|
112
|
+
} catch {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function readHeapStatistics() {
|
|
117
|
+
try {
|
|
118
|
+
const stats = getHeapStatistics();
|
|
119
|
+
const usedBytes = stats.used_heap_size;
|
|
120
|
+
const limitBytes = stats.heap_size_limit;
|
|
121
|
+
if (!Number.isFinite(usedBytes) || !Number.isFinite(limitBytes) || limitBytes <= 0) return null;
|
|
122
|
+
const available = stats.total_available_size;
|
|
123
|
+
const availableBytes = Number.isFinite(available) && available >= 0 ? available : null;
|
|
124
|
+
return { usedBytes, limitBytes, availableBytes, configuredLimitBytes: configuredLimitBytes() };
|
|
125
|
+
} catch {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export { readHeapStatistics, readOldGenerationStatistics };
|
|
@@ -75,5 +75,8 @@ var ClusterMessageTypes = {
|
|
|
75
75
|
BACKUP_PARTITION: "cluster.backup_partition",
|
|
76
76
|
RESTORE_PARTITION: "cluster.restore_partition"
|
|
77
77
|
};
|
|
78
|
+
var SyncMessageTypes = {
|
|
79
|
+
READ: "sync.read"
|
|
80
|
+
};
|
|
78
81
|
|
|
79
|
-
export { ClusterMessageTypes, DEFAULT_TRANSPORT_CONFIG, QueryMessageTypes, ReplicationMessageTypes, TransportError, TransportErrorCodes };
|
|
82
|
+
export { ClusterMessageTypes, DEFAULT_TRANSPORT_CONFIG, QueryMessageTypes, ReplicationMessageTypes, SyncMessageTypes, TransportError, TransportErrorCodes };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { english } from './chunk-TGP5M5R7.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
|
|
3
|
+
|
|
4
|
+
// src/analysis/registry.ts
|
|
5
|
+
var tokenizers = /* @__PURE__ */ new Map();
|
|
6
|
+
var stopWordSets = /* @__PURE__ */ new Map();
|
|
7
|
+
function requireName(name, kind) {
|
|
8
|
+
if (typeof name !== "string" || name.trim().length === 0) {
|
|
9
|
+
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `A registered ${kind} needs a non-empty name`, { name });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
function registerTokenizer(name, tokenizer) {
|
|
13
|
+
requireName(name, "tokenizer");
|
|
14
|
+
if (typeof tokenizer?.tokenize !== "function") {
|
|
15
|
+
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `Tokenizer "${name}" needs a tokenize method`, { tokenizer: name });
|
|
16
|
+
}
|
|
17
|
+
tokenizers.set(name, tokenizer);
|
|
18
|
+
}
|
|
19
|
+
function registerStopWords(name, stopWords) {
|
|
20
|
+
requireName(name, "stop word set");
|
|
21
|
+
if (!(stopWords instanceof Set) && typeof stopWords !== "function") {
|
|
22
|
+
throw new NarsilError(
|
|
23
|
+
ErrorCodes.CONFIG_INVALID,
|
|
24
|
+
`Stop word set "${name}" needs a Set of words or a function returning one`,
|
|
25
|
+
{ stopWords: name }
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
stopWordSets.set(name, stopWords);
|
|
29
|
+
}
|
|
30
|
+
function hasTokenizer(name) {
|
|
31
|
+
return tokenizers.has(name);
|
|
32
|
+
}
|
|
33
|
+
function hasStopWords(name) {
|
|
34
|
+
return stopWordSets.has(name);
|
|
35
|
+
}
|
|
36
|
+
function getTokenizer(name) {
|
|
37
|
+
const tokenizer = tokenizers.get(name);
|
|
38
|
+
if (!tokenizer) {
|
|
39
|
+
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `Tokenizer "${name}" is not registered on this engine`, {
|
|
40
|
+
tokenizer: name,
|
|
41
|
+
available: [...tokenizers.keys()]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return tokenizer;
|
|
45
|
+
}
|
|
46
|
+
function getStopWords(name) {
|
|
47
|
+
const stopWords = stopWordSets.get(name);
|
|
48
|
+
if (!stopWords) {
|
|
49
|
+
throw new NarsilError(ErrorCodes.CONFIG_INVALID, `Stop word set "${name}" is not registered on this engine`, {
|
|
50
|
+
stopWords: name,
|
|
51
|
+
available: [...stopWordSets.keys()]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return stopWords;
|
|
55
|
+
}
|
|
56
|
+
function holdsPositionsOutOfOrder(entries) {
|
|
57
|
+
for (let index = 1; index < entries.length; index++) {
|
|
58
|
+
if (entries[index].position < entries[index - 1].position) return true;
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
function inPositionOrder(tokenizer) {
|
|
63
|
+
return {
|
|
64
|
+
tokenize(text) {
|
|
65
|
+
const entries = tokenizer.tokenize(text);
|
|
66
|
+
if (!holdsPositionsOutOfOrder(entries)) return entries;
|
|
67
|
+
return [...entries].sort((first, second) => first.position - second.position);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function resolveIndexAnalysis(config) {
|
|
72
|
+
const tokenizer = typeof config.tokenizer === "string" ? getTokenizer(config.tokenizer) : config.tokenizer;
|
|
73
|
+
return {
|
|
74
|
+
stopWords: typeof config.stopWords === "string" ? getStopWords(config.stopWords) : config.stopWords,
|
|
75
|
+
customTokenizer: tokenizer === void 0 ? void 0 : inPositionOrder(tokenizer)
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// src/languages/registry.ts
|
|
80
|
+
var languages = /* @__PURE__ */ new Map();
|
|
81
|
+
languages.set("english", english);
|
|
82
|
+
function registerLanguage(module) {
|
|
83
|
+
languages.set(module.name, module);
|
|
84
|
+
}
|
|
85
|
+
function getLanguage(name) {
|
|
86
|
+
const lang = languages.get(name);
|
|
87
|
+
if (!lang) {
|
|
88
|
+
throw new NarsilError(ErrorCodes.LANGUAGE_NOT_SUPPORTED, `Language "${name}" is not registered`, { language: name });
|
|
89
|
+
}
|
|
90
|
+
return lang;
|
|
91
|
+
}
|
|
92
|
+
function hasLanguage(name) {
|
|
93
|
+
return languages.has(name);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { getLanguage, getStopWords, getTokenizer, hasLanguage, hasStopWords, hasTokenizer, registerLanguage, registerStopWords, registerTokenizer, resolveIndexAnalysis };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getIndexMetadata } from './chunk-
|
|
1
|
+
import { getIndexMetadata } from './chunk-7HCZWC7B.mjs';
|
|
2
2
|
import { fnv1a } from './chunk-KAKQ74LS.mjs';
|
|
3
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
|
|
4
4
|
|
|
5
5
|
// src/distribution/cluster-node/routable-allocation.ts
|
|
6
6
|
async function routableAllocation(coordinator, indexName) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-
|
|
1
|
+
import { readRecentMemoryFigures, readMemoryFigures } from './chunk-TV2L3BN7.mjs';
|
|
2
2
|
import { collectGarbageBeforeAnswerRefusal, collectYoungGenerationBeforeRefusal, reservedHeapBytes, admitHeapBytes } from './chunk-XIHUI4KB.mjs';
|
|
3
|
-
import { NarsilError, ErrorCodes, ServerErrorCodes } from './chunk-
|
|
3
|
+
import { NarsilError, ErrorCodes, ServerErrorCodes } from './chunk-KUZKUONM.mjs';
|
|
4
4
|
|
|
5
5
|
// src/distribution/cluster-node/constants.ts
|
|
6
6
|
var DEFAULT_PARTITION_COUNT = 5;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { encodeDocumentJson } from './chunk-
|
|
2
|
-
import { loadFailed, sectionNamed, PAGED_SEGMENT_ENVELOPE_VERSION, encodePagedSegmentHead, SECTION_ALIGNMENT_BYTES, SEGMENT_PAGE_BYTES, PAYLOAD_PREFIX_BYTES, decodePagedSegmentHead, BLOCK_SUMMARY_BYTES, SMALLEST_BLOCK_POSTINGS, DOCUMENT_BLOCK_BYTES, decodeSections, DOCUMENT_BLOCK_MIN_RAW_BYTES, ID_SAMPLE_INTERVAL, POSITION_WIDTH_BYTES, POSTING_WIDTH_BYTES, RECORD_PAGE_BYTES, MAX_DOCUMENT_BLOCK_RAW_BYTES } from './chunk-
|
|
1
|
+
import { encodeDocumentJson } from './chunk-DVWYODEB.mjs';
|
|
2
|
+
import { loadFailed, sectionNamed, PAGED_SEGMENT_ENVELOPE_VERSION, encodePagedSegmentHead, SECTION_ALIGNMENT_BYTES, SEGMENT_PAGE_BYTES, PAYLOAD_PREFIX_BYTES, decodePagedSegmentHead, BLOCK_SUMMARY_BYTES, SMALLEST_BLOCK_POSTINGS, DOCUMENT_BLOCK_BYTES, decodeSections, DOCUMENT_BLOCK_MIN_RAW_BYTES, ID_SAMPLE_INTERVAL, POSITION_WIDTH_BYTES, POSTING_WIDTH_BYTES, RECORD_PAGE_BYTES, MAX_DOCUMENT_BLOCK_RAW_BYTES } from './chunk-LTUGDMV4.mjs';
|
|
3
3
|
import { createVectorFileReader } from './chunk-FOCV4CBZ.mjs';
|
|
4
|
-
import { writeSegmentsOf, MessagePackChunks, writeSurfaceForms, writeFieldLengths, writeValueColumns, writeBooleanColumns, writeEnumColumns, writeGeopointColumns, writePatternColumns, writePartialWords, FILE_ASSEMBLY_CHUNK_BYTES, REWRITE_SPILL_BYTES, LIST_VIEWS_HELD_PER_SEGMENT, TOMBSTONES_BETWEEN_YIELDS, readSegmentFile, READS_AHEAD_AT_ONCE, WRITER_YIELD_INTERVAL_TOKENS, LARGEST_CACHED_ENTRY_SHARE, MAX_THREAD_FILE_NUMBER, REMOVAL_BUCKET_WRITE_BUFFER_BYTES, SECTION_WRITE_BUFFER_BYTES, READ_AHEAD_CHUNK_BYTES, LARGEST_REMOVAL_BUCKET_COUNT, REMOVAL_BUCKET_TARGET_BYTES, THREAD_READ_CACHE_BYTES, MERGE_READ_CACHE_BYTES } from './chunk-
|
|
5
|
-
import { requireOffsets, requireUtf8Entries, requireEntriesAscend, decodeFieldLengths, decodePartialWords, decodePatternColumns, decodeGeopointColumns, decodeEnumColumns, decodeBooleanColumns, decodeValueColumns, setNestedValue, littleEndianBytes, uint32sFrom, uint64Bytes, decodeSurfaceForms } from './chunk-
|
|
6
|
-
import {
|
|
7
|
-
import { generateId, wrapFrozenTokenTable, createEncodedDocumentSource, assemblePagedFrozenSegment, decodeStoredDocument, mergeFieldLengths, mergeSurfaceForms, encodeSurfaceTable, mergePartialWords, mergeFieldIndexes, resolvePartitionInsertOptions, decodeSurfaceTable, createSharedFrozenSegment, shareSegmentArrays, selectionKeeps, fieldIndexRemapOf, freezeSegmentShared, createFrozenSegment, holdsADiscardedField, endOfValue } from './chunk-
|
|
8
|
-
import { isCompositePartition, buildPartialWordTableFrom, createPartitionIndex, createCompositePartition, mergeDocFrequencies, scanPostingBlocks } from './chunk-
|
|
9
|
-
import {
|
|
4
|
+
import { writeSegmentsOf, MessagePackChunks, writeSurfaceForms, writeFieldLengths, writeValueColumns, writeBooleanColumns, writeEnumColumns, writeGeopointColumns, writePatternColumns, writePartialWords, FILE_ASSEMBLY_CHUNK_BYTES, REWRITE_SPILL_BYTES, LIST_VIEWS_HELD_PER_SEGMENT, TOMBSTONES_BETWEEN_YIELDS, readSegmentFile, READS_AHEAD_AT_ONCE, WRITER_YIELD_INTERVAL_TOKENS, LARGEST_CACHED_ENTRY_SHARE, MAX_THREAD_FILE_NUMBER, REMOVAL_BUCKET_WRITE_BUFFER_BYTES, SECTION_WRITE_BUFFER_BYTES, READ_AHEAD_CHUNK_BYTES, LARGEST_REMOVAL_BUCKET_COUNT, REMOVAL_BUCKET_TARGET_BYTES, THREAD_READ_CACHE_BYTES, MERGE_READ_CACHE_BYTES } from './chunk-KCUIFVVW.mjs';
|
|
5
|
+
import { requireOffsets, requireUtf8Entries, requireEntriesAscend, decodeFieldLengths, decodePartialWords, decodePatternColumns, decodeGeopointColumns, decodeEnumColumns, decodeBooleanColumns, decodeValueColumns, setNestedValue, littleEndianBytes, uint32sFrom, uint64Bytes, decodeSurfaceForms } from './chunk-62G63NMH.mjs';
|
|
6
|
+
import { engineVersionParts } from './chunk-LSM2YTKM.mjs';
|
|
7
|
+
import { generateId, wrapFrozenTokenTable, createEncodedDocumentSource, assemblePagedFrozenSegment, decodeStoredDocument, mergeFieldLengths, mergeSurfaceForms, encodeSurfaceTable, mergePartialWords, mergeFieldIndexes, resolvePartitionInsertOptions, decodeSurfaceTable, createSharedFrozenSegment, shareSegmentArrays, selectionKeeps, fieldIndexRemapOf, freezeSegmentShared, createFrozenSegment, holdsADiscardedField, endOfValue } from './chunk-5FUOVJKG.mjs';
|
|
8
|
+
import { isCompositePartition, buildPartialWordTableFrom, createPartitionIndex, createCompositePartition, mergeDocFrequencies, scanPostingBlocks } from './chunk-HWEDFLB7.mjs';
|
|
9
|
+
import { HEADER_SIZE, requireWithinFileLimit, writeHeader, readHeader } from './chunk-HVYICDY3.mjs';
|
|
10
|
+
import { crc32Init, crc32Update, crc32Final, crc32 } from './chunk-7GXJUJ24.mjs';
|
|
11
|
+
import { parseVectorDimension } from './chunk-VMXSVVXG.mjs';
|
|
12
|
+
import { flattenSchema, encodeDocument } from './chunk-Z3TNWCI5.mjs';
|
|
10
13
|
import { VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
11
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
14
|
+
import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
|
|
12
15
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
13
16
|
import { decode, encode } from '@msgpack/msgpack';
|
|
14
17
|
import { deflateRawSync, inflateRawSync } from 'zlib';
|
|
@@ -1307,7 +1310,7 @@ async function coldFieldOf(checkpoint, field) {
|
|
|
1307
1310
|
const dimension = fieldType === void 0 ? null : parseVectorDimension(fieldType);
|
|
1308
1311
|
if (dimension === null) return null;
|
|
1309
1312
|
const withPath = async (ref) => ({ ref, path: await directory.pathOf(ref.key) });
|
|
1310
|
-
const { openColdVectorField } = await import('./cold-module-
|
|
1313
|
+
const { openColdVectorField } = await import('./cold-module-YLWMTTZG.mjs');
|
|
1311
1314
|
return openColdVectorField({
|
|
1312
1315
|
fieldPath: field.fieldPath,
|
|
1313
1316
|
dimension,
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
import { littleEndianBytes, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, KEYWORD_SEGMENT_PAYLOAD_VERSION, uint64Bytes } from './chunk-
|
|
2
|
-
import { readListedFile, requireListedChecksum
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { littleEndianBytes, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, KEYWORD_SEGMENT_PAYLOAD_VERSION, uint64Bytes } from './chunk-62G63NMH.mjs';
|
|
2
|
+
import { readListedFile, requireListedChecksum } from './chunk-S2N75OTN.mjs';
|
|
3
|
+
import { segmentKey, MAX_SEGMENTS_PER_PARTITION } from './chunk-Q3TCTQCC.mjs';
|
|
4
|
+
import { SEGMENT_FILE_FRAMING_SLACK_BYTES, SEGMENT_TOKEN_TABLE_SHARE_OF_FILE } from './chunk-QDZJM7NI.mjs';
|
|
5
|
+
import { packChecksummedEnvelope } from './chunk-LSM2YTKM.mjs';
|
|
6
|
+
import { selectionKeeps, segmentArraysOf, mergeSegmentContents } from './chunk-5FUOVJKG.mjs';
|
|
7
|
+
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-HVYICDY3.mjs';
|
|
8
|
+
import { messagePackUpperBoundBytes } from './chunk-VMXSVVXG.mjs';
|
|
6
9
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
7
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
10
|
+
import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
|
|
8
11
|
import { encode } from '@msgpack/msgpack';
|
|
9
12
|
|
|
10
|
-
// src/persistence/durability/constants.ts
|
|
11
|
-
var DEFAULT_CHECKPOINT_INTERVAL_MS = 3e5;
|
|
12
|
-
var DEFAULT_CHECKPOINT_MUTATION_THRESHOLD = 1e5;
|
|
13
|
-
var DEFAULT_ASYNC_FLUSH_INTERVAL_MS = 1e3;
|
|
14
|
-
var DIRECTORY_IDENTITY_CHECK_INTERVAL_MS = 1e3;
|
|
15
|
-
var DIRECTORY_LOCK_ATTEMPTS = 3;
|
|
16
|
-
var DIRECTORY_LOCK_SETTLE_MS = 50;
|
|
17
|
-
var DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS = 1e3;
|
|
18
|
-
var DEFAULT_SEGMENT_MAX_BYTES = 67108864;
|
|
19
|
-
var DEFAULT_COMPACTION_THRESHOLD = 12;
|
|
20
|
-
var COMPACTION_LARGEST_MERGED_DOCUMENT_COUNT = 2e5;
|
|
21
|
-
var SEGMENT_FILE_FRAMING_SLACK_BYTES = 65536;
|
|
22
|
-
var SEGMENT_TOKEN_TABLE_SHARE_OF_FILE = 0.25;
|
|
23
|
-
var WHOLE_PARTITION_MIN_CHANGED_SHARE = 0.5;
|
|
24
|
-
var WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT = 1e5;
|
|
25
|
-
var LOG_RECORDS_PER_CHECKPOINT = 1e5;
|
|
26
|
-
var WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES = 2147483648;
|
|
27
|
-
var CHECKPOINT_WORKER_TIMEOUT_MS = 6e5;
|
|
28
|
-
var CHECKPOINT_WORKER_HEARTBEAT_MS = 5e3;
|
|
29
|
-
var CHECKPOINT_WORKER_IDLE_MS = 5e3;
|
|
30
|
-
var CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS = 50;
|
|
31
|
-
|
|
32
13
|
// src/persistence/paged/constants.ts
|
|
33
14
|
var THREAD_READ_CACHE_BYTES = 134217728;
|
|
34
15
|
var MERGE_READ_CACHE_BYTES = 33554432;
|
|
@@ -566,7 +547,7 @@ async function writePagedGroup(state, group) {
|
|
|
566
547
|
const tombstones = state.tombstonesWritten ? [] : [...request.tombstones];
|
|
567
548
|
const id = state.nextSegmentId;
|
|
568
549
|
const key = segmentKey(request.indexName, request.partitionId, id);
|
|
569
|
-
const { writePagedSegment } = await import('./module-
|
|
550
|
+
const { writePagedSegment } = await import('./module-MG7JMV2U.mjs');
|
|
570
551
|
const written = await writePagedSegment({
|
|
571
552
|
directory,
|
|
572
553
|
key,
|
|
@@ -650,4 +631,4 @@ async function writeSegmentsOf(request) {
|
|
|
650
631
|
return { segments: state.segments, nextSegmentId: state.nextSegmentId };
|
|
651
632
|
}
|
|
652
633
|
|
|
653
|
-
export {
|
|
634
|
+
export { COLD_LOAD_WAIT_WITHOUT_SEARCH_MS, COLD_WALK_NODES_READ_AHEAD, FILE_ASSEMBLY_CHUNK_BYTES, LARGEST_CACHED_ENTRY_SHARE, LARGEST_REMOVAL_BUCKET_COUNT, LIST_VIEWS_HELD_PER_SEGMENT, MAX_THREAD_FILE_NUMBER, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES, MERGE_READ_CACHE_BYTES, MessagePackChunks, READS_AHEAD_AT_ONCE, READ_AHEAD_CHUNK_BYTES, REMOVAL_BUCKET_TARGET_BYTES, REMOVAL_BUCKET_WRITE_BUFFER_BYTES, REWRITE_SPILL_BYTES, SECTION_WRITE_BUFFER_BYTES, STABLE_HEAD_ATTEMPTS, THREAD_READ_CACHE_BYTES, TOMBSTONES_BETWEEN_YIELDS, WRITER_YIELD_INTERVAL_TOKENS, readSegmentFile, writeBooleanColumns, writeEnumColumns, writeFieldLengths, writeGeopointColumns, writePartialWords, writePatternColumns, writeSegmentsOf, writeSurfaceForms, writeValueColumns };
|
|
@@ -34,6 +34,11 @@ var ErrorCodes = {
|
|
|
34
34
|
BACKUP_STORE_CLAIMED: "BACKUP_STORE_CLAIMED",
|
|
35
35
|
BACKUP_STORE_NOT_CONFIGURED: "BACKUP_STORE_NOT_CONFIGURED",
|
|
36
36
|
BACKUP_NOT_READY: "BACKUP_NOT_READY",
|
|
37
|
+
SYNC_DURABILITY_REQUIRED: "SYNC_DURABILITY_REQUIRED",
|
|
38
|
+
SYNC_BACKUP_STORE_REQUIRED: "SYNC_BACKUP_STORE_REQUIRED",
|
|
39
|
+
SYNC_NOT_READY: "SYNC_NOT_READY",
|
|
40
|
+
SYNC_NOT_ENABLED: "SYNC_NOT_ENABLED",
|
|
41
|
+
SYNC_SNAPSHOT_PREPARING: "SYNC_SNAPSHOT_PREPARING",
|
|
37
42
|
SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD",
|
|
38
43
|
VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH",
|
|
39
44
|
SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER",
|
|
@@ -143,7 +148,8 @@ var ClientErrorCodes = {
|
|
|
143
148
|
CLIENT_REQUEST_ABORTED: "CLIENT_REQUEST_ABORTED",
|
|
144
149
|
CLIENT_INVALID_RESPONSE: "CLIENT_INVALID_RESPONSE",
|
|
145
150
|
CLIENT_TASK_TIMEOUT: "CLIENT_TASK_TIMEOUT",
|
|
146
|
-
CLIENT_UNEXPECTED_ERROR: "CLIENT_UNEXPECTED_ERROR"
|
|
151
|
+
CLIENT_UNEXPECTED_ERROR: "CLIENT_UNEXPECTED_ERROR",
|
|
152
|
+
SYNC_ANALYSIS_UNAVAILABLE: "SYNC_ANALYSIS_UNAVAILABLE"
|
|
147
153
|
};
|
|
148
154
|
var NarsilError = class extends Error {
|
|
149
155
|
/** This says which failure it is. */
|
|
@@ -175,5 +181,8 @@ function isNarsilError(value) {
|
|
|
175
181
|
function createNarsilError(code, message, details) {
|
|
176
182
|
return new NarsilError(code, message, details);
|
|
177
183
|
}
|
|
184
|
+
function describeError(error) {
|
|
185
|
+
return error instanceof Error ? error.message : String(error);
|
|
186
|
+
}
|
|
178
187
|
|
|
179
|
-
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, createNarsilError, isNarsilError };
|
|
188
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, createNarsilError, describeError, isNarsilError };
|