@delali/narsil 0.3.1-next.153 → 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 +2 -2
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +41 -9
- package/dist/distribution.mjs +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,29 @@
|
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-VVFYOADG.mjs';
|
|
2
|
+
import './chunk-DCKMICOB.mjs';
|
|
3
|
+
import './chunk-NVVRSRX5.mjs';
|
|
4
|
+
import './chunk-NKIZX26F.mjs';
|
|
5
|
+
import './chunk-63YSZOXB.mjs';
|
|
6
|
+
import './chunk-IO2SMUQD.mjs';
|
|
7
|
+
import './chunk-NCJS3WIY.mjs';
|
|
8
|
+
import './chunk-AM7RSBPF.mjs';
|
|
9
|
+
import './chunk-NNE4VDMM.mjs';
|
|
10
|
+
import './chunk-LU3Y3P63.mjs';
|
|
11
|
+
import './chunk-EH5CFV6Z.mjs';
|
|
12
|
+
import './chunk-AUT7PMA4.mjs';
|
|
13
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
14
|
+
import './chunk-3NQOVO3K.mjs';
|
|
15
|
+
import './chunk-JDOEEMEF.mjs';
|
|
16
|
+
import './chunk-7GWPJDOA.mjs';
|
|
17
|
+
import './chunk-C2H2QQFW.mjs';
|
|
18
|
+
import './chunk-CHPTFFJM.mjs';
|
|
19
|
+
import './chunk-O32RB3BL.mjs';
|
|
20
|
+
import './chunk-TJMSKBEM.mjs';
|
|
21
|
+
import './chunk-OQQVRWZ2.mjs';
|
|
22
|
+
import './chunk-ZBSWRSBG.mjs';
|
|
23
|
+
import './chunk-KWRW5U65.mjs';
|
|
24
|
+
import './chunk-PPEPTUVV.mjs';
|
|
25
|
+
import './chunk-LVIKKAA6.mjs';
|
|
26
|
+
import './chunk-AAAETEJK.mjs';
|
|
27
|
+
import './chunk-JV6VQY2S.mjs';
|
|
28
|
+
import './chunk-IOY2SM2P.mjs';
|
|
29
|
+
import './chunk-CUNGPR5R.mjs';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { updateIndexSync } from './chunk-DH3TVWWK.mjs';
|
|
2
|
+
import './chunk-Q32DDFKX.mjs';
|
|
3
|
+
import './chunk-JWUCMVRK.mjs';
|
|
4
|
+
import './chunk-JDOEEMEF.mjs';
|
|
5
|
+
import './chunk-CUNGPR5R.mjs';
|
|
6
|
+
|
|
7
|
+
// src/engine/sync/status.ts
|
|
8
|
+
function syncStatusOf(sync) {
|
|
9
|
+
if (sync === null) return { enabled: false, active: false, epoch: null };
|
|
10
|
+
return {
|
|
11
|
+
enabled: true,
|
|
12
|
+
...sync.historyMaxAgeMs !== void 0 ? { historyMaxAgeMs: sync.historyMaxAgeMs } : {},
|
|
13
|
+
...sync.historyMaxBytes !== void 0 ? { historyMaxBytes: sync.historyMaxBytes } : {},
|
|
14
|
+
active: sync.active,
|
|
15
|
+
epoch: sync.epoch
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// src/engine/sync/methods.ts
|
|
20
|
+
async function updateSyncOf(core, indexName, setting) {
|
|
21
|
+
core.guardShutdown();
|
|
22
|
+
core.requireIndex(indexName);
|
|
23
|
+
await updateIndexSync(core, indexName, setting);
|
|
24
|
+
}
|
|
25
|
+
function syncOf(core, indexName) {
|
|
26
|
+
core.guardShutdown();
|
|
27
|
+
return syncStatusOf(core.requireIndex(indexName).sync);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { syncOf, updateSyncOf };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export { actionPartitionsOf, adoptSegmentsOnWorker, bytesThatSegmentsHoldInMemory, checkPagedSegmentFully, closeUnusedSegments, countsAsLatestHolder, createPagedFrozenSegment, isPagedSegmentFile, keysThatSegmentsStillRead, mergePagedWindow, openFileVectorReads, openPagedSegmentScan, openPagedSnapshot, openRewriteSpill, pagedListingOf, pagedPartitionLines, pagedTombstonesFor, prepareDiskAdoption, startReadingOpeningSectionsAhead, swapPreparedPartitions, writePagedSegment } from './chunk-2CGSQM4O.mjs';
|
|
2
|
+
import './chunk-VQSKZ3EZ.mjs';
|
|
3
|
+
import './chunk-F753DA54.mjs';
|
|
4
|
+
import './chunk-3O57C2ZO.mjs';
|
|
5
|
+
import './chunk-NP7DD4G5.mjs';
|
|
6
|
+
import './chunk-NKIZX26F.mjs';
|
|
7
|
+
import './chunk-75VWIY35.mjs';
|
|
8
|
+
import './chunk-63YSZOXB.mjs';
|
|
9
|
+
import './chunk-IO2SMUQD.mjs';
|
|
10
|
+
import './chunk-NCJS3WIY.mjs';
|
|
11
|
+
import './chunk-AM7RSBPF.mjs';
|
|
12
|
+
import './chunk-NNE4VDMM.mjs';
|
|
13
|
+
import './chunk-LU3Y3P63.mjs';
|
|
14
|
+
import './chunk-EH5CFV6Z.mjs';
|
|
15
|
+
import './chunk-AUT7PMA4.mjs';
|
|
16
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
17
|
+
import './chunk-3NQOVO3K.mjs';
|
|
18
|
+
import './chunk-JDOEEMEF.mjs';
|
|
19
|
+
import './chunk-7GWPJDOA.mjs';
|
|
20
|
+
import './chunk-SJWDBRNP.mjs';
|
|
21
|
+
import './chunk-C2H2QQFW.mjs';
|
|
22
|
+
import './chunk-CHPTFFJM.mjs';
|
|
23
|
+
import './chunk-O32RB3BL.mjs';
|
|
24
|
+
import './chunk-TJMSKBEM.mjs';
|
|
25
|
+
import './chunk-OQQVRWZ2.mjs';
|
|
26
|
+
import './chunk-ZBSWRSBG.mjs';
|
|
27
|
+
import './chunk-KWRW5U65.mjs';
|
|
28
|
+
import './chunk-PPEPTUVV.mjs';
|
|
29
|
+
import './chunk-LVIKKAA6.mjs';
|
|
30
|
+
import './chunk-AAAETEJK.mjs';
|
|
31
|
+
import './chunk-JV6VQY2S.mjs';
|
|
32
|
+
import './chunk-IOY2SM2P.mjs';
|
|
33
|
+
import './chunk-CUNGPR5R.mjs';
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, noBuildHistory, recordCheckpoint, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, graphNeedsRebuild, yieldBuildTurn, threadsHoldCurrentLayout, emptyFieldBeforeRestore, recalibrateFromStore, signatureOf, allLiveDocIds, fieldHandlesOf, releaseReplacedVectors, adoptGraph, liveOrdinals, adoptLoadedCalibration, planCheckpoint, deserialize } from './chunk-KLZGAOLT.mjs';
|
|
2
1
|
import './chunk-PSWKQVVT.mjs';
|
|
2
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, noBuildHistory, recordCheckpoint, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, filterForOptions, graphNeedsRebuild, yieldBuildTurn, threadsHoldCurrentLayout, emptyFieldBeforeRestore, recalibrateFromStore, signatureOf, allLiveDocIds, fieldHandlesOf, releaseReplacedVectors, adoptGraph, liveOrdinals, adoptLoadedCalibration, planCheckpoint, deserialize } from './chunk-JX2RIAXH.mjs';
|
|
3
3
|
import { DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, defaultQuantizationFor, DEFAULT_VECTOR_METRIC, ESTIMATED_MS_PER_TOMBSTONE, ESTIMATED_MS_PER_VECTOR_REBUILD, WORKER_COPY_MIN_VECTORS, SHUFFLED_REBUILD_MEMORY_RETRY_MS, SEARCH_ATTEMPTS_BEFORE_HOLDING_WRITES, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, BUILD_STEPS_BETWEEN_CLOCK_CHECKS, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, SEARCH_REFILL_RESERVE, SEARCH_SCAN_CHUNK_VECTORS, DRIFT_CHECK_GROWTH_FACTOR, RECALIBRATION_DRIFT_RATIO, DISK_ADOPTION_YIELD_INTERVAL } from './chunk-HJBJBH26.mjs';
|
|
4
|
-
import { openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, osqBitsOf, createOsqQuantizer, ordinalFilterValues, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, VECTOR_MEMORY_LIMITS, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, threadedNativeCore, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, nativeStoreScratchBytes, noteFallback, toDistance, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, grownByteLength, createVectorBlock, ensureBlockSlots, sharedMemoryAvailable, createHNSWIndex, topLayerInParts, shuffleInPlace, requireWholeNeighbourLists, createCentroidSums, shuffleStep, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, nativeStoreFor, withNativeThreadSlot, nativeMetricCode, NATIVE_OK, releaseLocksHeldBy } from './chunk-
|
|
5
|
-
export { releaseLocksHeldBy } from './chunk-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { createDocIdMap, turnsAreBudgeted, yieldBackgroundTurn, chargeHeapBytes, holdWritesAndBackgroundWork, backgroundTurnIsSpent, turnIsSpent, yieldTurn, noteThreadSlotLive, noteThreadSlotGone } from './chunk-LQAKO5QV.mjs';
|
|
9
|
-
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, NATIVE_THREAD_SCAN_CHUNK_ORDINALS, resolveWorkerCount, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-L4M7QJNP.mjs';
|
|
4
|
+
import { openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, osqBitsOf, createOsqQuantizer, ordinalFilterValues, openGraphState, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, fixedView, VECTOR_MEMORY_LIMITS, sharedVectorStoreBytes, STORE_SLOTS, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, threadedNativeCore, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, slotByteOffset, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createSharedVectorStoreHandles, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, nativeStoreScratchBytes, noteFallback, toDistance, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, grownByteLength, createVectorBlock, ensureBlockSlots, sharedMemoryAvailable, createHNSWIndex, topLayerInParts, shuffleInPlace, requireWholeNeighbourLists, createCentroidSums, shuffleStep, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, nativeStoreFor, withNativeThreadSlot, nativeMetricCode, NATIVE_OK, releaseLocksHeldBy } from './chunk-RYMDHGL4.mjs';
|
|
5
|
+
export { releaseLocksHeldBy } from './chunk-RYMDHGL4.mjs';
|
|
6
|
+
import { createVectorFileReader } from './chunk-75VWIY35.mjs';
|
|
7
|
+
import { createDocIdMap, turnsAreBudgeted, yieldBackgroundTurn, chargeHeapBytes, holdWritesAndBackgroundWork, backgroundTurnIsSpent, turnIsSpent, yieldTurn, noteThreadSlotLive, noteThreadSlotGone } from './chunk-NCJS3WIY.mjs';
|
|
10
8
|
import './chunk-AM7RSBPF.mjs';
|
|
9
|
+
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, NATIVE_THREAD_SCAN_CHUNK_ORDINALS, resolveWorkerCount, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-LU3Y3P63.mjs';
|
|
10
|
+
import { NO_LIVE_VECTOR_AT_POSITION, bytesToVectors, isDead } from './chunk-YBEW6YTR.mjs';
|
|
11
|
+
import './chunk-CHPTFFJM.mjs';
|
|
11
12
|
import './chunk-TJMSKBEM.mjs';
|
|
12
13
|
import './chunk-KWRW5U65.mjs';
|
|
13
14
|
import { compareCodePoints } from './chunk-PPEPTUVV.mjs';
|
|
14
15
|
import './chunk-AAAETEJK.mjs';
|
|
15
|
-
import './chunk-
|
|
16
|
-
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-
|
|
16
|
+
import './chunk-IOY2SM2P.mjs';
|
|
17
|
+
import { NarsilError, ErrorCodes, isNarsilError } from './chunk-CUNGPR5R.mjs';
|
|
17
18
|
|
|
18
19
|
// src/engine/vector-maintenance.ts
|
|
19
20
|
function resolveVectorIndexes(manager, indexName, fieldName) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBitSet, bitsetIsEmpty, GrowableUint32, bitsetHas, bitsetSet } from './chunk-LVIKKAA6.mjs';
|
|
2
2
|
import { MAX_QUERY_PHRASES, MAX_PHRASE_WORDS } from './chunk-AAAETEJK.mjs';
|
|
3
3
|
import { PHRASE_ROWS_START, PHRASE_SORT_RADIX_BITS, PHRASE_SORT_CLOCK_ROWS } from './chunk-JV6VQY2S.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-CUNGPR5R.mjs';
|
|
5
5
|
|
|
6
6
|
// src/core/partition/phrase-matching.ts
|
|
7
7
|
var UINT32_BITS = 32;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createRequestId } from './chunk-NNE4VDMM.mjs';
|
|
2
|
-
import { resolveWorkerCount, SHUTDOWN_TIMEOUT_MS
|
|
3
|
-
import {
|
|
2
|
+
import { resolveWorkerCount, SHUTDOWN_TIMEOUT_MS } from './chunk-LU3Y3P63.mjs';
|
|
3
|
+
import { fnv1a } from './chunk-CHPTFFJM.mjs';
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-CUNGPR5R.mjs';
|
|
4
5
|
|
|
5
6
|
// src/workers/pool-memory.ts
|
|
6
7
|
function toFinite(value) {
|
package/dist/{browser/restore-queue-UQ6AAUVX.mjs → react-native/chunks/restore-queue-ZBVIKJWI.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { abandonChangeOf } from './chunk-
|
|
1
|
+
import { abandonChangeOf } from './chunk-GFYFQLJD.mjs';
|
|
2
2
|
|
|
3
3
|
// src/narsil/restore-queue.ts
|
|
4
4
|
function restoreDepsOf(core, host) {
|
|
@@ -24,7 +24,7 @@ function restoreDepsOf(core, host) {
|
|
|
24
24
|
function queueRestore(core, host, restoresInFlight, indexName, data) {
|
|
25
25
|
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
26
26
|
const restored = previous.then(async () => {
|
|
27
|
-
const { restoreFromSnapshot } = await import('./snapshot-
|
|
27
|
+
const { restoreFromSnapshot } = await import('./snapshot-ZBIEOZTZ.mjs');
|
|
28
28
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
29
29
|
});
|
|
30
30
|
const settled = restored.then(
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { unrefInterval, DEFAULT_HISTORY_MAX_AGE_MS } from './chunk-ZYDKJXQJ.mjs';
|
|
2
|
+
import { syncStorageOf } from './chunk-DH3TVWWK.mjs';
|
|
3
|
+
import { oneSyncChangeAtATime } from './chunk-Q32DDFKX.mjs';
|
|
4
|
+
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS } from './chunk-PB2YXVQW.mjs';
|
|
5
|
+
import { ARCHIVE_CONFIG_ENTRY, ARCHIVE_MANIFEST_ENTRY, tarEntryHeaders, tarPadding, tarEnd } from './chunk-3XKMRNRE.mjs';
|
|
6
|
+
import './chunk-UWDNZDWK.mjs';
|
|
7
|
+
import { isSyncEpoch } from './chunk-JWUCMVRK.mjs';
|
|
8
|
+
import './chunk-F753DA54.mjs';
|
|
9
|
+
import { emitEngineEvent, encodeIndexConfiguration } from './chunk-63YSZOXB.mjs';
|
|
10
|
+
import './chunk-IO2SMUQD.mjs';
|
|
11
|
+
import './chunk-NCJS3WIY.mjs';
|
|
12
|
+
import './chunk-AM7RSBPF.mjs';
|
|
13
|
+
import './chunk-NNE4VDMM.mjs';
|
|
14
|
+
import './chunk-LU3Y3P63.mjs';
|
|
15
|
+
import './chunk-EH5CFV6Z.mjs';
|
|
16
|
+
import './chunk-AUT7PMA4.mjs';
|
|
17
|
+
import './chunk-UNUFZ2QY.mjs';
|
|
18
|
+
import './chunk-3NQOVO3K.mjs';
|
|
19
|
+
import { withOpenIndex } from './chunk-JDOEEMEF.mjs';
|
|
20
|
+
import './chunk-7GWPJDOA.mjs';
|
|
21
|
+
import { manifestFileRefs } from './chunk-SJWDBRNP.mjs';
|
|
22
|
+
import './chunk-YBEW6YTR.mjs';
|
|
23
|
+
import { openChecksummedEnvelope, INDEX_CONFIGURATION_ENVELOPE_VERSION } from './chunk-C2H2QQFW.mjs';
|
|
24
|
+
import './chunk-CHPTFFJM.mjs';
|
|
25
|
+
import './chunk-O32RB3BL.mjs';
|
|
26
|
+
import './chunk-TJMSKBEM.mjs';
|
|
27
|
+
import './chunk-OQQVRWZ2.mjs';
|
|
28
|
+
import './chunk-ZBSWRSBG.mjs';
|
|
29
|
+
import './chunk-KWRW5U65.mjs';
|
|
30
|
+
import './chunk-PPEPTUVV.mjs';
|
|
31
|
+
import './chunk-LVIKKAA6.mjs';
|
|
32
|
+
import './chunk-AAAETEJK.mjs';
|
|
33
|
+
import './chunk-JV6VQY2S.mjs';
|
|
34
|
+
import './chunk-IOY2SM2P.mjs';
|
|
35
|
+
import { NarsilError, ErrorCodes } from './chunk-CUNGPR5R.mjs';
|
|
36
|
+
import { decode } from '@msgpack/msgpack';
|
|
37
|
+
|
|
38
|
+
// src/persistence/archive/range-layout.ts
|
|
39
|
+
function archiveLayout(config, manifestBytes, files) {
|
|
40
|
+
const parts = [];
|
|
41
|
+
let at = 0;
|
|
42
|
+
const inline = (bytes) => {
|
|
43
|
+
if (bytes.byteLength === 0) return;
|
|
44
|
+
parts.push({ start: at, length: bytes.byteLength, inline: bytes });
|
|
45
|
+
at += bytes.byteLength;
|
|
46
|
+
};
|
|
47
|
+
for (const [name, bytes] of [
|
|
48
|
+
[ARCHIVE_CONFIG_ENTRY, config],
|
|
49
|
+
[ARCHIVE_MANIFEST_ENTRY, manifestBytes]
|
|
50
|
+
]) {
|
|
51
|
+
for (const header of tarEntryHeaders(name, bytes.byteLength)) inline(header);
|
|
52
|
+
inline(bytes);
|
|
53
|
+
inline(tarPadding(bytes.byteLength));
|
|
54
|
+
}
|
|
55
|
+
for (const file of files) {
|
|
56
|
+
for (const header of tarEntryHeaders(file.name, file.bytes)) inline(header);
|
|
57
|
+
if (file.bytes > 0) {
|
|
58
|
+
parts.push({ start: at, length: file.bytes, file });
|
|
59
|
+
at += file.bytes;
|
|
60
|
+
}
|
|
61
|
+
inline(tarPadding(file.bytes));
|
|
62
|
+
}
|
|
63
|
+
inline(tarEnd());
|
|
64
|
+
return { parts, byteLength: at };
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// src/engine/sync/archive.ts
|
|
68
|
+
function publishedArchiveLayout(indexName, snapshot, storage) {
|
|
69
|
+
const prefix = `${indexName}/`;
|
|
70
|
+
return archiveLayout(
|
|
71
|
+
snapshot.config,
|
|
72
|
+
snapshot.manifestBytes,
|
|
73
|
+
manifestFileRefs(snapshot.manifest).map((ref) => ({
|
|
74
|
+
name: ref.key.slice(prefix.length),
|
|
75
|
+
bytes: ref.bytes,
|
|
76
|
+
read: (offset, length) => storage.readFileRange(ref.key, offset, length)
|
|
77
|
+
}))
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// src/engine/sync/constants.ts
|
|
82
|
+
var HISTORY_SWEEP_INTERVAL_MS = 36e5;
|
|
83
|
+
var epochsOfSnapshots = /* @__PURE__ */ new WeakMap();
|
|
84
|
+
async function epochOfSnapshot(snapshot) {
|
|
85
|
+
const known = epochsOfSnapshots.get(snapshot);
|
|
86
|
+
if (known !== void 0) return known;
|
|
87
|
+
const { payload } = await openChecksummedEnvelope(snapshot.config, {
|
|
88
|
+
envelopeFormatVersion: INDEX_CONFIGURATION_ENVELOPE_VERSION,
|
|
89
|
+
what: "index configuration",
|
|
90
|
+
allowsCompression: true
|
|
91
|
+
});
|
|
92
|
+
const raw = decode(payload);
|
|
93
|
+
const epoch = raw !== null && typeof raw === "object" && isSyncEpoch(raw.syncEpoch) ? raw.syncEpoch : null;
|
|
94
|
+
epochsOfSnapshots.set(snapshot, epoch);
|
|
95
|
+
return epoch;
|
|
96
|
+
}
|
|
97
|
+
function notEnabled(indexName) {
|
|
98
|
+
return new NarsilError(ErrorCodes.SYNC_NOT_ENABLED, `Index "${indexName}" has device sync off`, { indexName });
|
|
99
|
+
}
|
|
100
|
+
function configurationFor(core, indexName) {
|
|
101
|
+
return async (manifest) => {
|
|
102
|
+
const entry = core.requireIndex(indexName);
|
|
103
|
+
if ((manifest.analysisGeneration ?? 0) !== entry.analysisGeneration) {
|
|
104
|
+
throw new NarsilError(
|
|
105
|
+
ErrorCodes.ANALYSIS_CHANGE_NOT_READY,
|
|
106
|
+
`The analysis of index "${indexName}" changed while the engine published its snapshot`,
|
|
107
|
+
{ indexName }
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
return encodeIndexConfiguration(entry);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
async function publishWithinAnalysis(core, storage, indexName) {
|
|
114
|
+
let lastError = null;
|
|
115
|
+
for (let attempt = 0; attempt < MAX_SNAPSHOT_ANALYSIS_ATTEMPTS; attempt++) {
|
|
116
|
+
try {
|
|
117
|
+
return await storage.publish(indexName, configurationFor(core, indexName));
|
|
118
|
+
} catch (error) {
|
|
119
|
+
if (!(error instanceof NarsilError) || error.code !== ErrorCodes.ANALYSIS_CHANGE_NOT_READY) throw error;
|
|
120
|
+
lastError = error;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
throw lastError;
|
|
124
|
+
}
|
|
125
|
+
function publishedSyncSnapshot(core, indexName, republish = false) {
|
|
126
|
+
const entry = core.requireIndex(indexName);
|
|
127
|
+
if (entry.sync === null) throw notEnabled(indexName);
|
|
128
|
+
const storage = syncStorageOf(core, indexName);
|
|
129
|
+
return withOpenIndex(
|
|
130
|
+
core,
|
|
131
|
+
indexName,
|
|
132
|
+
() => oneSyncChangeAtATime(core.indexRegistry, indexName, async () => {
|
|
133
|
+
const sync = core.requireIndex(indexName).sync;
|
|
134
|
+
if (sync === null) throw notEnabled(indexName);
|
|
135
|
+
if (!sync.active) {
|
|
136
|
+
const activated = { ...sync, active: true };
|
|
137
|
+
core.requireIndex(indexName).sync = activated;
|
|
138
|
+
try {
|
|
139
|
+
await core.durability?.manager.persistMetadata(indexName);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
core.requireIndex(indexName).sync = sync;
|
|
142
|
+
throw error;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
const current = republish ? null : await storage.published(indexName);
|
|
146
|
+
if (current !== null) {
|
|
147
|
+
const unpin = storage.pin(current);
|
|
148
|
+
if (await epochOfSnapshot(current).catch(() => null) === sync.epoch) {
|
|
149
|
+
return { snapshot: current, epoch: sync.epoch, storage, unpin };
|
|
150
|
+
}
|
|
151
|
+
unpin();
|
|
152
|
+
}
|
|
153
|
+
const snapshot = await publishWithinAnalysis(core, storage, indexName);
|
|
154
|
+
return { snapshot, epoch: sync.epoch, storage, unpin: storage.pin(snapshot) };
|
|
155
|
+
})
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// src/engine/sync/retention.ts
|
|
160
|
+
var statesByCore = /* @__PURE__ */ new WeakMap();
|
|
161
|
+
function stateOf(core) {
|
|
162
|
+
let state = statesByCore.get(core);
|
|
163
|
+
if (state === void 0) {
|
|
164
|
+
state = { running: /* @__PURE__ */ new Map(), again: /* @__PURE__ */ new Set(), sweep: null };
|
|
165
|
+
statesByCore.set(core, state);
|
|
166
|
+
}
|
|
167
|
+
return state;
|
|
168
|
+
}
|
|
169
|
+
async function enforce(core, indexName) {
|
|
170
|
+
const sync = core.indexRegistry.get(indexName)?.sync ?? null;
|
|
171
|
+
const storage = core.durability?.manager.syncStorage?.();
|
|
172
|
+
if (sync === null || !sync.active || storage === void 0 || core.shutdownState.isShutdown) return;
|
|
173
|
+
const published = await storage.published(indexName);
|
|
174
|
+
const maxBytes = sync.historyMaxBytes ?? (published === null ? Number.POSITIVE_INFINITY : publishedArchiveLayout(indexName, published, storage).byteLength);
|
|
175
|
+
const publishesSnapshots = core.mutationCtx.capacityScope !== "partition";
|
|
176
|
+
await storage.enforceHistoryLimits(
|
|
177
|
+
indexName,
|
|
178
|
+
{ maxAgeMs: sync.historyMaxAgeMs ?? DEFAULT_HISTORY_MAX_AGE_MS, maxBytes },
|
|
179
|
+
publishesSnapshots ? async () => {
|
|
180
|
+
const { unpin } = await publishedSyncSnapshot(core, indexName, true);
|
|
181
|
+
unpin();
|
|
182
|
+
} : null,
|
|
183
|
+
Date.now()
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
function scheduleSyncRetention(core, indexName) {
|
|
187
|
+
const state = stateOf(core);
|
|
188
|
+
startSyncRetentionSweep(core);
|
|
189
|
+
if (state.running.has(indexName)) {
|
|
190
|
+
state.again.add(indexName);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
const run = (async () => {
|
|
194
|
+
do {
|
|
195
|
+
state.again.delete(indexName);
|
|
196
|
+
await enforce(core, indexName);
|
|
197
|
+
} while (state.again.has(indexName));
|
|
198
|
+
})().catch((error) => {
|
|
199
|
+
emitEngineEvent(core.eventHandlers, "durabilityError", {
|
|
200
|
+
error: error instanceof Error ? error : new Error(String(error))
|
|
201
|
+
});
|
|
202
|
+
}).finally(() => state.running.delete(indexName));
|
|
203
|
+
state.running.set(indexName, run);
|
|
204
|
+
}
|
|
205
|
+
function startSyncRetentionSweep(core) {
|
|
206
|
+
const state = stateOf(core);
|
|
207
|
+
if (state.sweep !== null) return;
|
|
208
|
+
state.sweep = unrefInterval(() => {
|
|
209
|
+
if (core.shutdownState.isShutdown) {
|
|
210
|
+
if (state.sweep !== null) clearInterval(state.sweep);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
for (const [indexName, entry] of core.indexRegistry) {
|
|
214
|
+
if (entry.sync?.active === true) scheduleSyncRetention(core, indexName);
|
|
215
|
+
}
|
|
216
|
+
}, HISTORY_SWEEP_INTERVAL_MS);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export { scheduleSyncRetention, startSyncRetentionSweep };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MIN_RERANK_TIMEOUT_MS, MAX_RERANK_TIMEOUT_MS, MIN_RERANK_WINDOW, MAX_RERANK_WINDOW, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS, DEFAULT_RERANK_WINDOW } from './chunk-IO2SMUQD.mjs';
|
|
2
2
|
import { DEFAULT_LIMIT, DEFAULT_OFFSET } from './chunk-AM7RSBPF.mjs';
|
|
3
3
|
import { MIN_HYBRID_DEPTH, MAX_HYBRID_DEPTH, HYBRID_RESCORE_WINDOW, RESULT_WINDOW } from './chunk-AAAETEJK.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from './chunk-CUNGPR5R.mjs';
|
|
5
5
|
|
|
6
6
|
// src/search/hybrid-depth.ts
|
|
7
7
|
function fixedHybridDepthOf(hybrid) {
|