@delali/narsil 0.3.1-next.144 → 0.3.1-next.145
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/dist/adapters/filesystem.d.ts +1 -1
- package/dist/adapters/filesystem.mjs +101 -13
- package/dist/adapters/gcs.d.ts +49 -0
- package/dist/adapters/gcs.mjs +213 -0
- package/dist/adapters/indexeddb.d.ts +1 -1
- package/dist/adapters/indexeddb.mjs +2 -7
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/memory.mjs +5 -0
- package/dist/adapters/s3.d.ts +53 -0
- package/dist/adapters/s3.mjs +263 -0
- package/dist/{adapters-BQFQ4PRz.d.ts → adapters-pljAqmrC.d.ts} +33 -0
- package/dist/{analysis-change-HQUT2Z3I.mjs → analysis-change-D5APH4Z3.mjs} +24 -33
- package/dist/{browser/analysis-change-entry-7HR4LWL3.mjs → analysis-change-entry-V4SQQSXQ.mjs} +1 -1
- package/dist/browser/{analysis-change-JPV775LR.mjs → analysis-change-QTCQ5ETU.mjs} +5 -5
- package/dist/{analysis-change-entry-TZTG4AZB.mjs → browser/analysis-change-entry-KYEQSP3I.mjs} +1 -1
- package/dist/{chunk-46NZOPHS.mjs → browser/chunk-5WYWLTM5.mjs} +2 -2
- package/dist/browser/{chunk-ZEV26AQ6.mjs → chunk-6OFS7RUN.mjs} +1 -1
- package/dist/browser/{chunk-MZI3TEOW.mjs → chunk-75PMIFQA.mjs} +1 -1
- package/dist/browser/{chunk-R4WUDZQV.mjs → chunk-AOKLYVTT.mjs} +2 -2
- package/dist/browser/{chunk-LVY2LI35.mjs → chunk-BTMRV5MY.mjs} +2 -2
- package/dist/browser/{chunk-3ZBJYAS4.mjs → chunk-FHO5N7FD.mjs} +1 -1
- package/dist/browser/{chunk-KTOK275N.mjs → chunk-FXPMF65P.mjs} +12 -12
- package/dist/browser/{chunk-VFYMPCOV.mjs → chunk-GP4QLUQM.mjs} +5 -5
- package/dist/browser/{chunk-35B42UFM.mjs → chunk-IFGTRRPU.mjs} +9 -0
- package/dist/browser/{chunk-6RHTAVZX.mjs → chunk-K7UFXEJS.mjs} +31 -14
- package/dist/browser/{chunk-MVM33ZUL.mjs → chunk-LGJ6XMH5.mjs} +5 -5
- package/dist/{chunk-NN33CZRE.mjs → browser/chunk-PMBSBSCN.mjs} +2 -2
- package/dist/browser/{chunk-D33A5VMU.mjs → chunk-QNDWMPV2.mjs} +1 -1
- package/dist/browser/{chunk-HKX2G6WH.mjs → chunk-U77XQJOY.mjs} +3 -3
- package/dist/browser/{chunk-TCLEOZ4P.mjs → chunk-XIHLIMFX.mjs} +2 -2
- package/dist/browser/{chunk-WCFCHIBB.mjs → chunk-XWMEGKDC.mjs} +2 -2
- package/dist/browser/{chunk-5DB2VDGI.mjs → chunk-ZALEKEUH.mjs} +27 -27
- package/dist/browser/{chunk-MWUK3DA5.mjs → chunk-ZKVDQ5ZH.mjs} +8 -8
- package/dist/browser/{cold-module-MJMKNUYJ.mjs → cold-module-Y2IJAP7S.mjs} +14 -14
- package/dist/browser/{durability-wiring-SNOWIT6Z.mjs → durability-wiring-MLXZ5QQF.mjs} +78 -61
- package/dist/browser/import-FTMLTPGQ.mjs +9 -0
- package/dist/browser/{module-BUFNZMEU.mjs → module-5LMDGXQH.mjs} +10 -10
- package/dist/browser/{module-BVP4TKZU.mjs → module-Q6VFGLMG.mjs} +71 -11
- package/dist/browser/{phrase-module-HGVBO24W.mjs → phrase-module-KXNRTWCS.mjs} +1 -1
- package/dist/{restore-queue-FEYAC4SB.mjs → browser/restore-queue-SOAHKZSQ.mjs} +2 -2
- package/dist/browser/{runtime-VEUH674B.mjs → runtime-ZNEGK33G.mjs} +2 -2
- package/dist/browser/{snapshot-QXBKHJAG.mjs → snapshot-2EGS2FYU.mjs} +16 -15
- package/dist/browser/{write-WHFBDWQS.mjs → write-WMZA6NSF.mjs} +11 -11
- package/dist/{capabilities-BCdUwK_L.d.ts → capabilities-CNnzGtqP.d.ts} +3 -3
- package/dist/{chunk-ZMBFWQXN.mjs → chunk-2E2ZFOPT.mjs} +2 -2
- package/dist/{chunk-BOJZGUS6.mjs → chunk-5K2JHKM3.mjs} +1 -1
- package/dist/{chunk-YH5OIL7B.mjs → chunk-5QMHMELB.mjs} +6 -1
- package/dist/{browser/chunk-CCOAOO73.mjs → chunk-6FOJKNUR.mjs} +2 -2
- package/dist/{chunk-GLZHNSGB.mjs → chunk-6Z22L5RN.mjs} +1 -1
- package/dist/{chunk-AST3SHFA.mjs → chunk-7523VCM4.mjs} +2 -2
- package/dist/{chunk-KZL72VTC.mjs → chunk-7AJAW6NN.mjs} +11 -10
- package/dist/{chunk-DQNKVOJ2.mjs → chunk-BTARFTEN.mjs} +695 -8
- package/dist/{chunk-YLNSJQLX.mjs → chunk-DHEJAGVW.mjs} +5 -5
- package/dist/{chunk-Z4HFMYNX.mjs → chunk-DKMZ7JFW.mjs} +29 -12
- package/dist/{chunk-NRUXBYPH.mjs → chunk-F442VZUL.mjs} +5 -5
- package/dist/{chunk-O4LJQI4G.mjs → chunk-FRJ5RGX7.mjs} +126 -4
- package/dist/{chunk-L76W3IZJ.mjs → chunk-FTQLF5JI.mjs} +1 -1
- package/dist/{chunk-UIKN2OTQ.mjs → chunk-G6Q5DEF5.mjs} +37 -3
- package/dist/{chunk-DD2673TX.mjs → chunk-GRFXSEFF.mjs} +2 -2
- package/dist/{chunk-ZSWHPKGM.mjs → chunk-GVPYMSLO.mjs} +69 -2
- package/dist/{chunk-VEFN6X6Q.mjs → chunk-HOC5JP2H.mjs} +9 -10
- package/dist/{chunk-SRJBFG2T.mjs → chunk-HTMUGEFU.mjs} +6 -7
- package/dist/{chunk-J6YVB2XM.mjs → chunk-IJPK5PGM.mjs} +1 -1
- package/dist/{chunk-HNHCNTVG.mjs → chunk-IQHZMCLX.mjs} +9 -0
- package/dist/{chunk-C3YDYX6C.mjs → chunk-ISUOSACK.mjs} +1 -1
- package/dist/{chunk-YHUTF6EA.mjs → chunk-IV2XTSS2.mjs} +14 -14
- package/dist/chunk-K5HSUPYS.mjs +11 -0
- package/dist/{chunk-LA4WNDHL.mjs → chunk-KG5N7LE6.mjs} +12 -14
- package/dist/{chunk-NPNK57CA.mjs → chunk-LWFK3TC2.mjs} +1 -1
- package/dist/{chunk-RKAVHNRW.mjs → chunk-LYKUJNAV.mjs} +10 -5
- package/dist/{chunk-TNBIK2LQ.mjs → chunk-MJTEU2XK.mjs} +3 -4
- package/dist/chunk-NWTEJ2T7.mjs +100 -0
- package/dist/{chunk-WJGO5PGV.mjs → chunk-OH7SX5MY.mjs} +28 -16
- package/dist/{chunk-W2COJ5AH.mjs → chunk-ONDEEBTA.mjs} +2 -2
- package/dist/{chunk-PWIWSUCX.mjs → chunk-POUYICOU.mjs} +1 -1
- package/dist/chunk-PRID7CA6.mjs +104 -0
- package/dist/{chunk-ICW45TTU.mjs → chunk-QLDLQW36.mjs} +1 -1
- package/dist/{chunk-KEIYVZUX.mjs → chunk-QU2XF7VI.mjs} +3 -4
- package/dist/{chunk-74XB2SXI.mjs → chunk-QXH2CS4V.mjs} +35 -2
- package/dist/{chunk-ZPWS2SKJ.mjs → chunk-QYMAYU7M.mjs} +165 -11
- package/dist/{chunk-NJJCPFXN.mjs → chunk-RNUP6WZ6.mjs} +2 -2
- package/dist/{chunk-SBMAWTRG.mjs → chunk-RTVAWNUL.mjs} +80 -14
- package/dist/{chunk-7AUASRE7.mjs → chunk-RVBUQITB.mjs} +7 -7
- package/dist/{chunk-VJEGOELZ.mjs → chunk-SA52N7G3.mjs} +3 -3
- package/dist/{chunk-NOT5QOHU.mjs → chunk-SE7MKJVK.mjs} +1 -1
- package/dist/{chunk-BRUUBXCB.mjs → chunk-SNB4DYL3.mjs} +10 -38
- package/dist/chunk-SVO6NV4D.mjs +248 -0
- package/dist/{chunk-GWOS5DYC.mjs → chunk-UGQULMSU.mjs} +11 -13
- package/dist/{chunk-6SNBQESJ.mjs → chunk-UHVTEVF5.mjs} +5 -5
- package/dist/{chunk-HJJWY6PT.mjs → chunk-UQS5PAS5.mjs} +1 -1
- package/dist/{chunk-UUZCQQG2.mjs → chunk-W6M4RRAT.mjs} +3 -3
- package/dist/{browser/chunk-XNWPP5NS.mjs → chunk-WDEWU46C.mjs} +2 -2
- package/dist/{chunk-XZ3SRNDJ.mjs → chunk-WMIV7PJ7.mjs} +65 -5
- package/dist/{chunk-RHKRTYGO.mjs → chunk-X5SBWARI.mjs} +3 -3
- package/dist/{chunk-XS2VM7UE.mjs → chunk-XLAI4OIO.mjs} +2 -2
- package/dist/{chunk-IO5F7ZBE.mjs → chunk-YUCGFPMS.mjs} +454 -37
- package/dist/{client-B12YFALP.d.ts → client-DoYPHcUn.d.ts} +62 -5
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +44 -0
- package/dist/{cold-module-4X7WJCFM.mjs → cold-module-NUD332YD.mjs} +32 -41
- package/dist/{config-CIG5yDyg.d.ts → config-CuUfls_H.d.ts} +150 -3
- package/dist/{config-BhZxIeb1.d.ts → config-Dzs46im6.d.ts} +11 -2
- package/dist/direct-executor-FDQYQEJQ.mjs +22 -0
- package/dist/distribution/coordinator/etcd.d.ts +3 -3
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +3 -3
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +16219 -14535
- package/dist/{durability-wiring-324D2DDD.mjs → durability-wiring-K7RDXWL6.mjs} +103 -95
- package/dist/embeddings/openai.d.ts +1 -1
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-CtzbHOmG.d.ts → engine-C0ifUEcm.d.ts} +3 -3
- package/dist/import-6KXFY6XI.mjs +35 -0
- package/dist/{index-DsEurhSl.d.ts → index-MsF7e5hL.d.ts} +2 -2
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +21 -30
- package/dist/invalidation/broadcast-channel.d.ts +1 -1
- package/dist/invalidation/filesystem.d.ts +1 -1
- package/dist/invalidation/filesystem.mjs +1 -1
- package/dist/invalidation/noop.d.ts +1 -1
- package/dist/{long-query-thread-4SW7RWDE.mjs → long-query-thread-FKVHRCHF.mjs} +18 -23
- package/dist/{module-DXSJ5LT2.mjs → module-GJUKW5VU.mjs} +14 -16
- package/dist/{module-IYPLWHGC.mjs → module-TMFIWOD2.mjs} +28 -37
- package/dist/{paged-partition-archive-HFP45PLU.mjs → paged-partition-archive-WNUEMYWM.mjs} +34 -39
- package/dist/partial-words.mjs +7 -9
- package/dist/pattern.mjs +4 -6
- package/dist/persistence/durability/checkpoint-worker.d.ts +2 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +27 -36
- package/dist/{phrase-module-5QHBD2VJ.mjs → phrase-module-OMY3QQV7.mjs} +1 -1
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +9 -0
- package/dist/{rerank-KTLC3E6N.mjs → rerank-ZZ5CHKLW.mjs} +4 -4
- package/dist/rerankers/http.d.ts +1 -1
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{browser/restore-queue-ONYNYUDE.mjs → restore-queue-UAVGBSJG.mjs} +2 -2
- package/dist/{runtime-DYV75DCB.mjs → runtime-RAOCKSYA.mjs} +5 -5
- package/dist/{schema-B-Runv0n.d.ts → schema-D33CyXCy.d.ts} +1 -1
- package/dist/server.d.ts +24 -12
- package/dist/server.mjs +153 -36
- package/dist/{snapshot-CGM65VCD.mjs → snapshot-DB5ZVCDN.mjs} +39 -48
- package/dist/synonyms.mjs +3 -4
- package/dist/{tasks-CjRJRGTb.d.ts → tasks-ChWp0wrF.d.ts} +59 -7
- package/dist/{thread-KGNAIKPD.mjs → thread-OV6T555H.mjs} +17 -22
- package/dist/vector/search-worker.d.ts +2 -2
- package/dist/vector/search-worker.mjs +5 -6
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-2DZPEQL2.mjs → write-KZVTLGCI.mjs} +28 -37
- package/openapi.json +349 -2
- package/package.json +27 -8
- package/dist/browser/import-TLB2A5LJ.mjs +0 -9
- package/dist/chunk-5WYVUPGD.mjs +0 -427
- package/dist/chunk-AV4IJKD2.mjs +0 -35
- package/dist/chunk-GES7U2PM.mjs +0 -68
- package/dist/chunk-KGOXHLLZ.mjs +0 -693
- package/dist/chunk-N37VMC62.mjs +0 -18
- package/dist/chunk-QSK35UC2.mjs +0 -35
- package/dist/chunk-WNBRW4Q2.mjs +0 -128
- package/dist/chunk-WQBCBKY3.mjs +0 -8
- package/dist/chunk-ZATRDAYU.mjs +0 -160
- package/dist/direct-executor-7XOQ7VQP.mjs +0 -28
- package/dist/import-OOBUW3RR.mjs +0 -44
|
@@ -1,59 +1,50 @@
|
|
|
1
|
-
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, removeLeftoverRewriteFiles, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-
|
|
3
|
-
import { decodeSegmentManifest, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, createSeqOwner, readSegmentManifest,
|
|
4
|
-
import { VECTOR_FILE_ENVELOPE_VERSION } from './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-
|
|
1
|
+
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-RNUP6WZ6.mjs';
|
|
2
|
+
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, removeLeftoverRewriteFiles, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-X5SBWARI.mjs';
|
|
3
|
+
import { writeMetadataEnvelope, decodeSegmentManifest, metadataFromConfig, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, metadataConfigOf, durableMetadataConfigOf, readCurrentManifest } from './chunk-IV2XTSS2.mjs';
|
|
4
|
+
import { VECTOR_FILE_ENVELOPE_VERSION } from './chunk-F442VZUL.mjs';
|
|
5
|
+
import './chunk-ONDEEBTA.mjs';
|
|
6
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-QLDLQW36.mjs';
|
|
7
7
|
import './chunk-37CD3OKS.mjs';
|
|
8
|
-
import { createDurableDirectory } from './chunk-
|
|
8
|
+
import { createDurableDirectory } from './chunk-7523VCM4.mjs';
|
|
9
9
|
import { spawnNodeWorker } from './chunk-W55X2BYN.mjs';
|
|
10
10
|
import { getFs } from './chunk-HLPRHOSO.mjs';
|
|
11
|
-
import { nextSegmentKey, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, SEGMENT_HEADER_SIZE, buildEntry, captureWholePartition, checkpointLastSeqNo } from './chunk-
|
|
11
|
+
import { nextSegmentKey, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, SEGMENT_HEADER_SIZE, buildEntry, captureWholePartition, checkpointLastSeqNo } from './chunk-KG5N7LE6.mjs';
|
|
12
12
|
import './chunk-JDDXV6UF.mjs';
|
|
13
|
-
import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, readSegmentFile, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-
|
|
14
|
-
import
|
|
15
|
-
import './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-
|
|
18
|
-
import './chunk-
|
|
19
|
-
import './chunk-5WYVUPGD.mjs';
|
|
13
|
+
import { DEFAULT_SEGMENT_MAX_BYTES, DEFAULT_CHECKPOINT_INTERVAL_MS, DEFAULT_CHECKPOINT_MUTATION_THRESHOLD, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ASYNC_FLUSH_INTERVAL_MS, WRITES_STALL_ABOVE_UNCHECKPOINTED_BYTES, readSegmentFile, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-RVBUQITB.mjs';
|
|
14
|
+
import './chunk-QU2XF7VI.mjs';
|
|
15
|
+
import { directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, MAX_SEGMENTS_PER_PARTITION } from './chunk-W6M4RRAT.mjs';
|
|
16
|
+
import './chunk-5QMHMELB.mjs';
|
|
17
|
+
import { toError, openChecksummedEnvelope, HEADER_SIZE } from './chunk-YUCGFPMS.mjs';
|
|
18
|
+
import './chunk-HOC5JP2H.mjs';
|
|
20
19
|
import './chunk-HJSN7UYG.mjs';
|
|
21
|
-
import { resolveWorkerEntry } from './chunk-
|
|
22
|
-
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
20
|
+
import { detectRuntime, resolveWorkerEntry } from './chunk-G6Q5DEF5.mjs';
|
|
23
21
|
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-EEBCDP36.mjs';
|
|
24
|
-
import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
25
|
-
import { fnv1a } from './chunk-
|
|
26
|
-
import './chunk-N37VMC62.mjs';
|
|
27
|
-
import './chunk-ZATRDAYU.mjs';
|
|
22
|
+
import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-OH7SX5MY.mjs';
|
|
23
|
+
import { fnv1a } from './chunk-QYMAYU7M.mjs';
|
|
28
24
|
import './chunk-EBIHRL7B.mjs';
|
|
29
|
-
import './chunk-
|
|
30
|
-
import './chunk-QSK35UC2.mjs';
|
|
31
|
-
import './chunk-74XB2SXI.mjs';
|
|
32
|
-
import './chunk-RKAVHNRW.mjs';
|
|
33
|
-
import './chunk-WQBCBKY3.mjs';
|
|
34
|
-
import './chunk-JUKYYXSP.mjs';
|
|
35
|
-
import './chunk-DQNKVOJ2.mjs';
|
|
36
|
-
import { encodeDocument, requireValidFieldTypes } from './chunk-KGOXHLLZ.mjs';
|
|
37
|
-
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
38
|
-
import './chunk-FQBFZAWG.mjs';
|
|
39
|
-
import { MIN_M } from './chunk-VJS4JFBQ.mjs';
|
|
40
|
-
import './chunk-GES7U2PM.mjs';
|
|
41
|
-
import './chunk-ZSWHPKGM.mjs';
|
|
42
|
-
import './chunk-O4LJQI4G.mjs';
|
|
25
|
+
import './chunk-FRJ5RGX7.mjs';
|
|
43
26
|
import './chunk-X5CV2E2B.mjs';
|
|
44
|
-
import './chunk-WNBRW4Q2.mjs';
|
|
45
27
|
import './chunk-TGP5M5R7.mjs';
|
|
46
28
|
import './chunk-U2BKYEC7.mjs';
|
|
47
|
-
import './chunk-NPNK57CA.mjs';
|
|
48
|
-
import './chunk-4UMZ7KQL.mjs';
|
|
49
|
-
import './chunk-R6A773WK.mjs';
|
|
50
|
-
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
51
29
|
import { createRequestId } from './chunk-QHPYS427.mjs';
|
|
52
|
-
import './chunk-
|
|
30
|
+
import './chunk-6Z22L5RN.mjs';
|
|
53
31
|
import './chunk-22YPZVMG.mjs';
|
|
32
|
+
import './chunk-KOKM4PQN.mjs';
|
|
33
|
+
import './chunk-QXH2CS4V.mjs';
|
|
54
34
|
import './chunk-RFBLQLLZ.mjs';
|
|
35
|
+
import './chunk-LYKUJNAV.mjs';
|
|
36
|
+
import './chunk-JUKYYXSP.mjs';
|
|
37
|
+
import { encodeDocument, requireValidFieldTypes } from './chunk-BTARFTEN.mjs';
|
|
38
|
+
import './chunk-FQBFZAWG.mjs';
|
|
39
|
+
import './chunk-LWFK3TC2.mjs';
|
|
40
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
41
|
+
import { MIN_M } from './chunk-VJS4JFBQ.mjs';
|
|
42
|
+
import './chunk-GVPYMSLO.mjs';
|
|
55
43
|
import './chunk-L5ORED7V.mjs';
|
|
56
|
-
import {
|
|
44
|
+
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
45
|
+
import { NarsilError, ErrorCodes } from './chunk-IQHZMCLX.mjs';
|
|
46
|
+
import './chunk-R6A773WK.mjs';
|
|
47
|
+
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
57
48
|
import { decode } from '@msgpack/msgpack';
|
|
58
49
|
|
|
59
50
|
// src/persistence/durability/sha256.ts
|
|
@@ -360,7 +351,7 @@ function recoverDirectoryRestores(directory) {
|
|
|
360
351
|
}
|
|
361
352
|
|
|
362
353
|
// src/persistence/durability/restore-staging.ts
|
|
363
|
-
function
|
|
354
|
+
function toError2(error) {
|
|
364
355
|
return error instanceof Error ? error : new Error(String(error));
|
|
365
356
|
}
|
|
366
357
|
function pathUnder(path, root) {
|
|
@@ -429,7 +420,7 @@ function createRestoreStaging(storage, indexName, options = {}) {
|
|
|
429
420
|
await storage.remove(journalKey(indexName));
|
|
430
421
|
} catch (removal) {
|
|
431
422
|
committed = true;
|
|
432
|
-
options.onStorageLost?.(
|
|
423
|
+
options.onStorageLost?.(toError2(removal));
|
|
433
424
|
}
|
|
434
425
|
throw error;
|
|
435
426
|
}
|
|
@@ -439,7 +430,7 @@ function createRestoreStaging(storage, indexName, options = {}) {
|
|
|
439
430
|
try {
|
|
440
431
|
await (options.finish === void 0 ? finishOnStorage() : options.finish(finishOnStorage));
|
|
441
432
|
} catch (error) {
|
|
442
|
-
options.onStorageLost?.(
|
|
433
|
+
options.onStorageLost?.(toError2(error));
|
|
443
434
|
}
|
|
444
435
|
},
|
|
445
436
|
async removeRetired() {
|
|
@@ -471,7 +462,7 @@ function adapterRestoreStorage(adapter) {
|
|
|
471
462
|
}
|
|
472
463
|
|
|
473
464
|
// src/persistence/durability/archive-checkpoint.ts
|
|
474
|
-
function
|
|
465
|
+
function toError3(error) {
|
|
475
466
|
return error instanceof Error ? error : new Error(String(error));
|
|
476
467
|
}
|
|
477
468
|
function stageDirectoryRestore(deps, indexName) {
|
|
@@ -480,7 +471,7 @@ function stageDirectoryRestore(deps, indexName) {
|
|
|
480
471
|
try {
|
|
481
472
|
await run();
|
|
482
473
|
} catch (error) {
|
|
483
|
-
deps.markFatal(
|
|
474
|
+
deps.markFatal(toError3(error));
|
|
484
475
|
throw error;
|
|
485
476
|
}
|
|
486
477
|
},
|
|
@@ -504,8 +495,8 @@ function createArchiveCheckpointAccess(deps) {
|
|
|
504
495
|
deps.held.set(indexName, (deps.held.get(indexName) ?? 0) + 1);
|
|
505
496
|
const release = releaser(deps.held, indexName);
|
|
506
497
|
try {
|
|
507
|
-
await deps.checkpoint(indexName);
|
|
508
|
-
await deps.checkpoint(indexName);
|
|
498
|
+
await deps.checkpoint(indexName, false);
|
|
499
|
+
await deps.checkpoint(indexName, true);
|
|
509
500
|
const manifestBytes = await deps.directory.read(manifestKey(indexName));
|
|
510
501
|
if (manifestBytes === null) {
|
|
511
502
|
throw new NarsilError(ErrorCodes.PERSISTENCE_SAVE_FAILED, `Index "${indexName}" holds no checkpoint`, {
|
|
@@ -710,7 +701,7 @@ function wholePartitionsWhereMostChanged(manager, rules) {
|
|
|
710
701
|
return whole;
|
|
711
702
|
};
|
|
712
703
|
}
|
|
713
|
-
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = [], termHistoryOf, onCaptured) {
|
|
704
|
+
async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartitionsOf = noWholePartitions, priorCheckpointThatLimitsTheRecords, listedVectorFields = [], termHistoryOf, onCaptured, pinsRetiredVectors = false) {
|
|
714
705
|
for (const vectorIndex of vectorIndexes.values()) await vectorIndex.completeGraph();
|
|
715
706
|
return whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
716
707
|
onCaptured?.();
|
|
@@ -735,14 +726,19 @@ async function captureCheckpoint(indexState, manager, vectorIndexes, wholePartit
|
|
|
735
726
|
targets.push(target);
|
|
736
727
|
}
|
|
737
728
|
const vectorPlans = /* @__PURE__ */ new Map();
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
729
|
+
try {
|
|
730
|
+
for (const [fieldPath, vectorIndex] of vectorIndexes) {
|
|
731
|
+
const listed = listedVectorFields.find((ref) => ref.fieldPath === fieldPath);
|
|
732
|
+
const listedKeys2 = listed === void 0 ? null : listed.files.map((file) => file.key);
|
|
733
|
+
vectorPlans.set(fieldPath, vectorIndex.planCheckpoint(listedKeys2, false, pinsRetiredVectors));
|
|
734
|
+
}
|
|
735
|
+
const memoryMatchesTheTargets = recordsLeftInLog === 0;
|
|
736
|
+
const wholePartitions = memoryMatchesTheTargets ? wholePartitionsOf(targets) : noWholePartitions();
|
|
737
|
+
return { targets, documentCount, vectorPlans, wholePartitions, recordsLeftInLog };
|
|
738
|
+
} catch (error) {
|
|
739
|
+
for (const plan of vectorPlans.values()) plan.release();
|
|
740
|
+
throw error;
|
|
741
|
+
}
|
|
746
742
|
});
|
|
747
743
|
}
|
|
748
744
|
async function writeCapturedVectors(store, indexName, capture2, priorManifest, rewriteUnchanged) {
|
|
@@ -1090,7 +1086,8 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1090
1086
|
writeRecords === null ? void 0 : (partitionId, lastSeqNo) => writeRecords.termHistoryOf(indexName, partitionId, lastSeqNo),
|
|
1091
1087
|
textOnDisk ? () => {
|
|
1092
1088
|
changesSinceCapture = manager.openCheckpointChangeLog();
|
|
1093
|
-
} : void 0
|
|
1089
|
+
} : void 0,
|
|
1090
|
+
input.pinsRetiredVectors
|
|
1094
1091
|
);
|
|
1095
1092
|
try {
|
|
1096
1093
|
await openNewLogSegments(input.indexState, input.failPartition);
|
|
@@ -1098,12 +1095,13 @@ async function writeOneBoundedCheckpoint(input) {
|
|
|
1098
1095
|
return changesSinceCapture;
|
|
1099
1096
|
});
|
|
1100
1097
|
} finally {
|
|
1098
|
+
for (const plan of capture2.vectorPlans.values()) plan.release();
|
|
1101
1099
|
changesSinceCapture?.close();
|
|
1102
1100
|
}
|
|
1103
1101
|
}
|
|
1104
1102
|
async function adoptWrittenSegments(input, manager, partitions, changes) {
|
|
1105
1103
|
const { indexName, indexState, hooks } = input;
|
|
1106
|
-
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-
|
|
1104
|
+
const { actionPartitionsOf, closeUnusedSegments, prepareDiskAdoption, swapPreparedPartitions } = await import('./module-TMFIWOD2.mjs');
|
|
1107
1105
|
const adoption = await prepareDiskAdoption(input.directory, manager, partitions);
|
|
1108
1106
|
if (adoption === null) return [];
|
|
1109
1107
|
const adopted = await whileNoMutationApplies([...indexState.partitions.values()], () => {
|
|
@@ -1158,7 +1156,7 @@ async function finishBoundedCheckpoint(input, manager, store, metadata, priorMan
|
|
|
1158
1156
|
const droppedThisCheckpoint = changes !== null && capture2.recordsLeftInLog === 0 ? new Set(await adoptWrittenSegments(input, manager, segments.partitions, changes)) : /* @__PURE__ */ new Set();
|
|
1159
1157
|
if (!input.holdsCheckpointFiles()) {
|
|
1160
1158
|
const removable = await garbageThatNoFieldStillReads(store, vectorIndexes, written.garbage);
|
|
1161
|
-
const stillRead = metadata.textStorage === "disk" ? (await import('./module-
|
|
1159
|
+
const stillRead = metadata.textStorage === "disk" ? (await import('./module-TMFIWOD2.mjs')).keysThatSegmentsStillRead(manager) : /* @__PURE__ */ new Set();
|
|
1162
1160
|
await removeCheckpointGarbage(
|
|
1163
1161
|
store,
|
|
1164
1162
|
removable.filter((key) => !droppedThisCheckpoint.has(key) && !stillRead.has(key))
|
|
@@ -1383,8 +1381,28 @@ function createHeldCheckpoints(hooks) {
|
|
|
1383
1381
|
};
|
|
1384
1382
|
}
|
|
1385
1383
|
|
|
1384
|
+
// src/persistence/durability/metadata-write-queue.ts
|
|
1385
|
+
function createMetadataWriteQueue() {
|
|
1386
|
+
const writes = /* @__PURE__ */ new Map();
|
|
1387
|
+
return {
|
|
1388
|
+
queue(indexName, write) {
|
|
1389
|
+
const previous = writes.get(indexName) ?? Promise.resolve();
|
|
1390
|
+
const queued = previous.then(write);
|
|
1391
|
+
writes.set(
|
|
1392
|
+
indexName,
|
|
1393
|
+
queued.catch(() => void 0)
|
|
1394
|
+
);
|
|
1395
|
+
return queued;
|
|
1396
|
+
},
|
|
1397
|
+
pending: (indexName) => writes.get(indexName),
|
|
1398
|
+
forget(indexName) {
|
|
1399
|
+
writes.delete(indexName);
|
|
1400
|
+
}
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1386
1404
|
// src/persistence/durability/mutation-batch.ts
|
|
1387
|
-
function
|
|
1405
|
+
function toError4(err) {
|
|
1388
1406
|
return err instanceof Error ? err : new Error(String(err));
|
|
1389
1407
|
}
|
|
1390
1408
|
function requireAscendingSeqNo(record, seqNo, previousSeqNo) {
|
|
@@ -1404,7 +1422,7 @@ function failUnlessAlreadyFailed(outcomes, count, error) {
|
|
|
1404
1422
|
}
|
|
1405
1423
|
}
|
|
1406
1424
|
function failPartition(partition, address, deps, err) {
|
|
1407
|
-
const error =
|
|
1425
|
+
const error = toError4(err);
|
|
1408
1426
|
if (partition.failed !== null) return partition.failed;
|
|
1409
1427
|
partition.failed = error;
|
|
1410
1428
|
if (!deps.failsPartitionAlone(address.indexName, address.partitionId, error)) deps.markFatal(error);
|
|
@@ -1516,7 +1534,7 @@ async function recordPartitionBatch(partition, records, deps) {
|
|
|
1516
1534
|
}
|
|
1517
1535
|
}
|
|
1518
1536
|
} catch (err) {
|
|
1519
|
-
failUnlessAlreadyFailed(outcomes, records.length,
|
|
1537
|
+
failUnlessAlreadyFailed(outcomes, records.length, toError4(err));
|
|
1520
1538
|
}
|
|
1521
1539
|
return outcomes;
|
|
1522
1540
|
}
|
|
@@ -2355,7 +2373,7 @@ var decoder = new TextDecoder();
|
|
|
2355
2373
|
async function countPagedPartition(store, partition) {
|
|
2356
2374
|
const { directory } = store;
|
|
2357
2375
|
if (directory === void 0 || partition.segments.length === 0) return null;
|
|
2358
|
-
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-
|
|
2376
|
+
const { countsAsLatestHolder, isPagedSegmentFile, openPagedSegmentScan } = await import('./module-TMFIWOD2.mjs');
|
|
2359
2377
|
for (const ref of partition.segments) if (!await isPagedSegmentFile(directory, ref.key)) return null;
|
|
2360
2378
|
const scans = [];
|
|
2361
2379
|
try {
|
|
@@ -2802,7 +2820,8 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
2802
2820
|
let commitDeferral = null;
|
|
2803
2821
|
const partitionFailures = createPartitionFailureRouting();
|
|
2804
2822
|
const heldCheckpoints = createHeldCheckpoints(hooks);
|
|
2805
|
-
const metadataWrites =
|
|
2823
|
+
const metadataWrites = createMetadataWriteQueue();
|
|
2824
|
+
const queueMetadataWrite = metadataWrites.queue;
|
|
2806
2825
|
let checkpointTimer = null;
|
|
2807
2826
|
let asyncFlushTimer = null;
|
|
2808
2827
|
let shuttingDown = false;
|
|
@@ -2823,25 +2842,13 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
2823
2842
|
stopTimers();
|
|
2824
2843
|
hooks.onFatalError(error);
|
|
2825
2844
|
}
|
|
2826
|
-
function toError5(err) {
|
|
2827
|
-
return err instanceof Error ? err : new Error(String(err));
|
|
2828
|
-
}
|
|
2829
2845
|
async function closeWriterReportingFailure(closePromise) {
|
|
2830
2846
|
try {
|
|
2831
2847
|
await closePromise;
|
|
2832
2848
|
} catch (err) {
|
|
2833
|
-
markFatal(
|
|
2849
|
+
markFatal(toError(err));
|
|
2834
2850
|
}
|
|
2835
2851
|
}
|
|
2836
|
-
function queueMetadataWrite(indexName, write) {
|
|
2837
|
-
const previous = metadataWrites.get(indexName) ?? Promise.resolve();
|
|
2838
|
-
const queued = previous.then(write);
|
|
2839
|
-
metadataWrites.set(
|
|
2840
|
-
indexName,
|
|
2841
|
-
queued.catch(() => void 0)
|
|
2842
|
-
);
|
|
2843
|
-
return queued;
|
|
2844
|
-
}
|
|
2845
2852
|
function startCheckpointTimer() {
|
|
2846
2853
|
if (checkpointTimer !== null || shuttingDown || fatalError !== null || checkpointIntervalMs <= 0) {
|
|
2847
2854
|
return;
|
|
@@ -2865,25 +2872,25 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
2865
2872
|
try {
|
|
2866
2873
|
await checkpointIndex(indexName);
|
|
2867
2874
|
} catch (err) {
|
|
2868
|
-
markFatal(
|
|
2875
|
+
markFatal(toError(err));
|
|
2869
2876
|
}
|
|
2870
2877
|
}
|
|
2871
2878
|
}
|
|
2872
|
-
async function checkpointIndex(indexName, fromMemory = false, afterInFlight = fromMemory) {
|
|
2879
|
+
async function checkpointIndex(indexName, fromMemory = false, afterInFlight = fromMemory, pinsRetiredVectors = false) {
|
|
2873
2880
|
const indexState = indexes.get(indexName);
|
|
2874
2881
|
if (indexState === void 0 || indexState.unloading || heldCheckpoints.holds(indexName, indexState)) return;
|
|
2875
2882
|
return checkpointInTurn(indexState, {
|
|
2876
|
-
joinsInFlight: !afterInFlight,
|
|
2883
|
+
joinsInFlight: !afterInFlight && !pinsRetiredVectors,
|
|
2877
2884
|
mayStart: () => !indexState.unloading && !shuttingDown,
|
|
2878
|
-
perform: () => performCheckpoint(indexName, indexState, fromMemory),
|
|
2885
|
+
perform: () => performCheckpoint(indexName, indexState, fromMemory, pinsRetiredVectors),
|
|
2879
2886
|
afterSettling: () => releaseStalledWrites(indexState)
|
|
2880
2887
|
});
|
|
2881
2888
|
}
|
|
2882
|
-
async function requestedCheckpoint(indexName, fromMemory = false) {
|
|
2889
|
+
async function requestedCheckpoint(indexName, fromMemory = false, pinsVectors = false) {
|
|
2883
2890
|
heldCheckpoints.refuse(indexName, indexes.get(indexName));
|
|
2884
|
-
return checkpointIndex(indexName, fromMemory);
|
|
2891
|
+
return checkpointIndex(indexName, fromMemory, fromMemory, pinsVectors);
|
|
2885
2892
|
}
|
|
2886
|
-
async function performCheckpoint(indexName, indexState, fromMemory = false) {
|
|
2893
|
+
async function performCheckpoint(indexName, indexState, fromMemory = false, pinsRetiredVectors = false) {
|
|
2887
2894
|
await directoryWatch.verify();
|
|
2888
2895
|
if (fatalError !== null) throw fatalError;
|
|
2889
2896
|
await runDurableCheckpoint({
|
|
@@ -2894,6 +2901,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
2894
2901
|
compactionThreshold,
|
|
2895
2902
|
canOffload: canOffloadCheckpoint,
|
|
2896
2903
|
fromMemory,
|
|
2904
|
+
pinsRetiredVectors,
|
|
2897
2905
|
mutationThreshold: checkpointMutationThreshold,
|
|
2898
2906
|
mayContinue: () => !indexState.unloading && !shuttingDown && fatalError === null,
|
|
2899
2907
|
holdsCheckpointFiles: () => heldCheckpointFiles.has(indexName),
|
|
@@ -2935,7 +2943,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
2935
2943
|
indexState.documentBytesSinceCheckpoint += recorded.documentBytes;
|
|
2936
2944
|
if (checkpointIsDue(indexState, checkpointMutationThreshold)) {
|
|
2937
2945
|
void checkpointIndex(indexName).catch((err) => {
|
|
2938
|
-
markFatal(
|
|
2946
|
+
markFatal(toError(err));
|
|
2939
2947
|
});
|
|
2940
2948
|
}
|
|
2941
2949
|
await stallWhileCheckpointsFallBehind(indexState);
|
|
@@ -3039,7 +3047,7 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3039
3047
|
},
|
|
3040
3048
|
async checkpointAfterInFlight(indexName) {
|
|
3041
3049
|
await loads.settled(indexName);
|
|
3042
|
-
await checkpointIndex(indexName, false, true).catch((err) => markFatal(
|
|
3050
|
+
await checkpointIndex(indexName, false, true).catch((err) => markFatal(toError(err)));
|
|
3043
3051
|
},
|
|
3044
3052
|
async checkpointAll() {
|
|
3045
3053
|
for (const indexName of [...indexes.keys()]) {
|
|
@@ -3050,9 +3058,9 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3050
3058
|
hooks.writeRecords?.dropIndex(indexName);
|
|
3051
3059
|
const indexState = indexes.get(indexName);
|
|
3052
3060
|
if (indexState !== void 0) {
|
|
3053
|
-
await drainIndexStateForUnload(indexState, metadataWrites.
|
|
3061
|
+
await drainIndexStateForUnload(indexState, metadataWrites.pending(indexName), closeWriterReportingFailure);
|
|
3054
3062
|
indexes.delete(indexName);
|
|
3055
|
-
metadataWrites.
|
|
3063
|
+
metadataWrites.forget(indexName);
|
|
3056
3064
|
}
|
|
3057
3065
|
for (const vectorIndex of hooks.getVectorIndexes(indexName).values()) await vectorIndex.releaseVectorFiles();
|
|
3058
3066
|
for (const key of await directory.list(`${indexName}/`)) {
|
|
@@ -3064,14 +3072,14 @@ function createDurabilityManager(config, hooks, directoryOverride) {
|
|
|
3064
3072
|
if (indexState === void 0) {
|
|
3065
3073
|
return;
|
|
3066
3074
|
}
|
|
3067
|
-
await drainIndexStateForUnload(indexState, metadataWrites.
|
|
3075
|
+
await drainIndexStateForUnload(indexState, metadataWrites.pending(indexName), (close) => close);
|
|
3068
3076
|
indexes.delete(indexName);
|
|
3069
|
-
metadataWrites.
|
|
3077
|
+
metadataWrites.forget(indexName);
|
|
3070
3078
|
},
|
|
3071
3079
|
...createArchiveCheckpointAccess({
|
|
3072
3080
|
directory,
|
|
3073
3081
|
held: heldCheckpointFiles,
|
|
3074
|
-
checkpoint: (name) => requestedCheckpoint(name),
|
|
3082
|
+
checkpoint: (name, pinsVectors) => requestedCheckpoint(name, false, pinsVectors),
|
|
3075
3083
|
registerPartition: (name, partitionId, startSeqNo, primaryTerm) => getOrCreatePartition(name, partitionId, startSeqNo, primaryTerm),
|
|
3076
3084
|
markFatal
|
|
3077
3085
|
}),
|
|
@@ -3161,7 +3169,7 @@ function createSnapshotIndexState() {
|
|
|
3161
3169
|
}
|
|
3162
3170
|
|
|
3163
3171
|
// src/persistence/durability/snapshot-only/restores.ts
|
|
3164
|
-
function
|
|
3172
|
+
function toError5(error) {
|
|
3165
3173
|
return error instanceof Error ? error : new Error(String(error));
|
|
3166
3174
|
}
|
|
3167
3175
|
function createPendingRestores(onFatalError) {
|
|
@@ -3182,7 +3190,7 @@ function createPendingRestores(onFatalError) {
|
|
|
3182
3190
|
return running;
|
|
3183
3191
|
};
|
|
3184
3192
|
pending.set(indexName, finish);
|
|
3185
|
-
void finish().catch((error) => onFatalError(
|
|
3193
|
+
void finish().catch((error) => onFatalError(toError5(error)));
|
|
3186
3194
|
return Promise.resolve();
|
|
3187
3195
|
},
|
|
3188
3196
|
async settle(indexName) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-
|
|
2
|
-
import { NarsilError, ErrorCodes } from '../chunk-
|
|
1
|
+
import { resolveApiKey, buildSignal, postJsonWithRetry } from '../chunk-SE7MKJVK.mjs';
|
|
2
|
+
import { NarsilError, ErrorCodes } from '../chunk-IQHZMCLX.mjs';
|
|
3
3
|
|
|
4
4
|
// src/embeddings/constants.ts
|
|
5
5
|
var DEFAULT_REQUEST_TIMEOUT_MS = 3e4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-
|
|
2
|
-
import { B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions, a as IndexConfig, P as PartitionConfig } from './schema-
|
|
3
|
-
import { B as BatchResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, L as ListParams, f as ListResult, Q as QueryParams, m as QueryResult, j as PreflightResult, g as SuggestParams, h as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, l as NarsilEventMap } from './config-
|
|
1
|
+
import { E as EmbeddingAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
|
|
2
|
+
import { B as BM25Params, A as AnyDocument, I as InsertOptions, W as WriteOptions, a as IndexConfig, P as PartitionConfig } from './schema-D33CyXCy.js';
|
|
3
|
+
import { B as BatchResult, I as IndexInfo, k as IndexStats, P as PartitionStatsResult, L as ListParams, f as ListResult, Q as QueryParams, m as QueryResult, j as PreflightResult, g as SuggestParams, h as SuggestResult, D as DocumentImportResult, M as MemoryStats, V as VectorMaintenanceResult, l as NarsilEventMap } from './config-Dzs46im6.js';
|
|
4
4
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export { DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, readDocumentExport } from './chunk-UHVTEVF5.mjs';
|
|
2
|
+
import './chunk-5K2JHKM3.mjs';
|
|
3
|
+
import './chunk-CZQ33DLW.mjs';
|
|
4
|
+
import './chunk-FTQLF5JI.mjs';
|
|
5
|
+
import './chunk-YUCGFPMS.mjs';
|
|
6
|
+
import './chunk-HOC5JP2H.mjs';
|
|
7
|
+
import './chunk-HJSN7UYG.mjs';
|
|
8
|
+
import './chunk-G6Q5DEF5.mjs';
|
|
9
|
+
import './chunk-EEBCDP36.mjs';
|
|
10
|
+
import './chunk-OH7SX5MY.mjs';
|
|
11
|
+
import './chunk-QYMAYU7M.mjs';
|
|
12
|
+
import './chunk-EBIHRL7B.mjs';
|
|
13
|
+
import './chunk-FRJ5RGX7.mjs';
|
|
14
|
+
import './chunk-X5CV2E2B.mjs';
|
|
15
|
+
import './chunk-TGP5M5R7.mjs';
|
|
16
|
+
import './chunk-U2BKYEC7.mjs';
|
|
17
|
+
import './chunk-QHPYS427.mjs';
|
|
18
|
+
import './chunk-6Z22L5RN.mjs';
|
|
19
|
+
import './chunk-22YPZVMG.mjs';
|
|
20
|
+
import './chunk-KOKM4PQN.mjs';
|
|
21
|
+
import './chunk-QXH2CS4V.mjs';
|
|
22
|
+
import './chunk-RFBLQLLZ.mjs';
|
|
23
|
+
import './chunk-LYKUJNAV.mjs';
|
|
24
|
+
import './chunk-JUKYYXSP.mjs';
|
|
25
|
+
import './chunk-BTARFTEN.mjs';
|
|
26
|
+
import './chunk-FQBFZAWG.mjs';
|
|
27
|
+
import './chunk-LWFK3TC2.mjs';
|
|
28
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
29
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
30
|
+
import './chunk-GVPYMSLO.mjs';
|
|
31
|
+
import './chunk-L5ORED7V.mjs';
|
|
32
|
+
import './chunk-U476IXKQ.mjs';
|
|
33
|
+
import './chunk-IQHZMCLX.mjs';
|
|
34
|
+
import './chunk-R6A773WK.mjs';
|
|
35
|
+
import './chunk-YTJCGKM4.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as SchemaDefinition } from './schema-
|
|
1
|
+
import { S as SchemaDefinition } from './schema-D33CyXCy.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Tells watchers that the stored metadata of an index changed.
|
|
@@ -516,4 +516,4 @@ interface ClusterCoordinator extends IndexMetadataWatch {
|
|
|
516
516
|
shutdown(): Promise<void>;
|
|
517
517
|
}
|
|
518
518
|
|
|
519
|
-
export type {
|
|
519
|
+
export type { AllocationConstraints as A, ClusterCoordinator as C, IndexMetadataEvent as I, NodeRole as N, PartitionAssignment as P, RegistrationLease as R, SchemaEvent as S, UnassignedReason as U, AllocationTable as a, NodeRegistration as b, NodeCapacity as c, NodeMemoryReport as d, AllocationEvent as e, IndexMetadataWatch as f, IndexPartitionBytes as g, NodeEvent as h, PartitionState as i };
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-
|
|
1
|
+
export { VERSION, clearNormalizationCache, configureNormalizationCache, createNarsil, getLanguage, getNormalizationCacheSize, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerPartialWordSearch, registerPatternSearch, registerStopWords, registerSynonyms, registerTokenizer, resetNormalizationCache } from './browser/chunk-ZALEKEUH.mjs';
|
|
2
2
|
import './browser/chunk-JPTQZWJQ.mjs';
|
|
3
3
|
import './browser/chunk-26A5JFT2.mjs';
|
|
4
|
-
export { isSimdAvailable } from './browser/chunk-
|
|
5
|
-
import './browser/chunk-
|
|
6
|
-
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-
|
|
4
|
+
export { isSimdAvailable } from './browser/chunk-QNDWMPV2.mjs';
|
|
5
|
+
import './browser/chunk-75PMIFQA.mjs';
|
|
6
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-IFGTRRPU.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { b as StopWordOverride, C as CustomTokenizer } from './schema-
|
|
2
|
-
export { A as AnyDocument, c as BM25FieldParams, B as BM25Params, E as EmbeddingFieldConfig, d as FieldOptionChain, F as FieldType, a as IndexConfig, I as InsertOptions, P as PartitionConfig, S as SchemaDefinition, e as ScoringMode, T as TextFieldOption, V as VectorIndexConfig, f as VectorQuantizationMode, g as VectorStorageMode, W as WriteOptions } from './schema-
|
|
1
|
+
import { b as StopWordOverride, C as CustomTokenizer } from './schema-D33CyXCy.js';
|
|
2
|
+
export { A as AnyDocument, c as BM25FieldParams, B as BM25Params, E as EmbeddingFieldConfig, d as FieldOptionChain, F as FieldType, a as IndexConfig, I as InsertOptions, P as PartitionConfig, S as SchemaDefinition, e as ScoringMode, T as TextFieldOption, V as VectorIndexConfig, f as VectorQuantizationMode, g as VectorStorageMode, W as WriteOptions } from './schema-D33CyXCy.js';
|
|
3
3
|
import { P as PartialWordSearch } from './partial-words-DTIHO8G4.js';
|
|
4
4
|
import { P as PatternSearch } from './pattern-Cledccbl.js';
|
|
5
5
|
import { S as SynonymSearch } from './synonyms-CpOAHPa-.js';
|
|
6
6
|
export { O as OneWaySynonymRule, a as SynonymRule, T as TwoWaySynonymRule } from './synonyms-CpOAHPa-.js';
|
|
7
7
|
import { L as LanguageModule } from './language-DB8KG1z5.js';
|
|
8
8
|
export { T as TokenizerConfig } from './language-DB8KG1z5.js';
|
|
9
|
-
import { e as NarsilConfig } from './config-
|
|
10
|
-
export { A as AnalysisConfig, o as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, p as ComparisonFilter, D as DocumentImportResult, q as DocumentProjection, r as DurabilityConfig, E as ErrorCode, b as ErrorCodes, F as FacetConfig, s as FacetResult, t as FieldFilter, u as FilterExpression, v as GeoFilter, w as GeoPolygonFilter, x as GeoRadiusFilter, n as GroupConfig, y as GroupReducer, G as GroupResult, H as HeldCheckpointReport, z as HighlightConfig, J as HighlightMatch, K as Hit, O as HybridConfig, R as IndexContext, I as IndexInfo, T as IndexLifecycleConfig, k as IndexStats, U as InsertContext, L as ListParams, f as ListResult, W as ListedDocument, X as MainCopyQueries, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, Y as NarsilEventHandlers, l as NarsilEventMap, Z as NarsilPlugin, _ as PartitionContext, P as PartitionStatsResult, j as PreflightResult, $ as PresenceFilter, a0 as ProcessMemoryReport, a1 as QueryCoverage, Q as QueryParams, m as QueryResult, a2 as RemoveContext, a3 as RerankConfig, a4 as ScoreComponents, a5 as SearchContext, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, a7 as SortField, a8 as SortSpec, a9 as StaleAnalysis, aa as StringFilter, g as SuggestParams, h as SuggestResult, ab as TermMatchPolicy, ac as UpdateContext, V as VectorMaintenanceResult, ad as VectorQueryConfig, ae as WorkerConfig, af as WorkerContext, ag as WorkerCopyReport, i as isNarsilError } from './config-
|
|
11
|
-
import { N as Narsil } from './engine-
|
|
12
|
-
export { a as AdapterRegistrationOperations, A as AnalysisChange, b as AnalysisOperations, B as BM25Operations, c as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-
|
|
13
|
-
export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter, R as RerankAdapter } from './adapters-
|
|
9
|
+
import { e as NarsilConfig } from './config-Dzs46im6.js';
|
|
10
|
+
export { A as AnalysisConfig, o as ArrayFilter, B as BatchResult, C as ClientErrorCode, a as ClientErrorCodes, p as ComparisonFilter, D as DocumentImportResult, q as DocumentProjection, r as DurabilityConfig, E as ErrorCode, b as ErrorCodes, F as FacetConfig, s as FacetResult, t as FieldFilter, u as FilterExpression, v as GeoFilter, w as GeoPolygonFilter, x as GeoRadiusFilter, n as GroupConfig, y as GroupReducer, G as GroupResult, H as HeldCheckpointReport, z as HighlightConfig, J as HighlightMatch, K as Hit, O as HybridConfig, R as IndexContext, I as IndexInfo, T as IndexLifecycleConfig, k as IndexStats, U as InsertContext, L as ListParams, f as ListResult, W as ListedDocument, X as MainCopyQueries, M as MemoryStats, N as NarsilError, c as NarsilErrorCode, Y as NarsilEventHandlers, l as NarsilEventMap, Z as NarsilPlugin, _ as PartitionContext, P as PartitionStatsResult, j as PreflightResult, $ as PresenceFilter, a0 as ProcessMemoryReport, a1 as QueryCoverage, Q as QueryParams, m as QueryResult, a2 as RemoveContext, a3 as RerankConfig, a4 as ScoreComponents, a5 as SearchContext, a6 as SearchMode, S as ServerErrorCode, d as ServerErrorCodes, a7 as SortField, a8 as SortSpec, a9 as StaleAnalysis, aa as StringFilter, g as SuggestParams, h as SuggestResult, ab as TermMatchPolicy, ac as UpdateContext, V as VectorMaintenanceResult, ad as VectorQueryConfig, ae as WorkerConfig, af as WorkerContext, ag as WorkerCopyReport, i as isNarsilError } from './config-Dzs46im6.js';
|
|
11
|
+
import { N as Narsil } from './engine-C0ifUEcm.js';
|
|
12
|
+
export { a as AdapterRegistrationOperations, A as AnalysisChange, b as AnalysisOperations, B as BM25Operations, c as ByteSource, D as DocumentWriteOperations, I as IndexLifecycleOperations, S as SynonymOperations } from './engine-C0ifUEcm.js';
|
|
13
|
+
export { E as EmbeddingAdapter, I as InvalidationAdapter, a as InvalidationEvent, b as PartitionStatistics, P as PersistenceAdapter, R as RerankAdapter } from './adapters-pljAqmrC.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Registers a tokeniser under a name that an index config can then reference.
|
package/dist/index.mjs
CHANGED
|
@@ -1,40 +1,31 @@
|
|
|
1
|
-
export { VERSION, createNarsil } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-5WYVUPGD.mjs';
|
|
1
|
+
export { VERSION, createNarsil } from './chunk-YUCGFPMS.mjs';
|
|
2
|
+
import './chunk-HOC5JP2H.mjs';
|
|
4
3
|
import './chunk-HJSN7UYG.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-AV4IJKD2.mjs';
|
|
4
|
+
import './chunk-G6Q5DEF5.mjs';
|
|
7
5
|
import './chunk-EEBCDP36.mjs';
|
|
8
|
-
export { registerSynonyms } from './chunk-
|
|
9
|
-
export { registerPartialWordSearch, registerPatternSearch } from './chunk-
|
|
10
|
-
import './chunk-N37VMC62.mjs';
|
|
11
|
-
import './chunk-ZATRDAYU.mjs';
|
|
6
|
+
export { registerSynonyms } from './chunk-OH7SX5MY.mjs';
|
|
7
|
+
export { registerPartialWordSearch, registerPatternSearch } from './chunk-QYMAYU7M.mjs';
|
|
12
8
|
import './chunk-EBIHRL7B.mjs';
|
|
13
|
-
export {
|
|
14
|
-
import './chunk-QSK35UC2.mjs';
|
|
15
|
-
import './chunk-74XB2SXI.mjs';
|
|
16
|
-
import './chunk-RKAVHNRW.mjs';
|
|
17
|
-
import './chunk-WQBCBKY3.mjs';
|
|
18
|
-
import './chunk-JUKYYXSP.mjs';
|
|
19
|
-
import './chunk-DQNKVOJ2.mjs';
|
|
20
|
-
import './chunk-KGOXHLLZ.mjs';
|
|
21
|
-
import './chunk-U476IXKQ.mjs';
|
|
22
|
-
import './chunk-FQBFZAWG.mjs';
|
|
23
|
-
import './chunk-VJS4JFBQ.mjs';
|
|
24
|
-
import './chunk-GES7U2PM.mjs';
|
|
25
|
-
import './chunk-ZSWHPKGM.mjs';
|
|
26
|
-
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-O4LJQI4G.mjs';
|
|
9
|
+
export { getLanguage, getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerLanguage, registerStopWords, registerTokenizer } from './chunk-FRJ5RGX7.mjs';
|
|
27
10
|
import './chunk-X5CV2E2B.mjs';
|
|
28
|
-
export { getLanguage, registerLanguage } from './chunk-WNBRW4Q2.mjs';
|
|
29
11
|
import './chunk-TGP5M5R7.mjs';
|
|
30
12
|
import './chunk-U2BKYEC7.mjs';
|
|
31
|
-
export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-NPNK57CA.mjs';
|
|
32
|
-
import './chunk-4UMZ7KQL.mjs';
|
|
33
|
-
import './chunk-R6A773WK.mjs';
|
|
34
|
-
import './chunk-YTJCGKM4.mjs';
|
|
35
13
|
import './chunk-QHPYS427.mjs';
|
|
36
|
-
import './chunk-
|
|
14
|
+
import './chunk-6Z22L5RN.mjs';
|
|
37
15
|
import './chunk-22YPZVMG.mjs';
|
|
16
|
+
export { isSimdAvailable } from './chunk-KOKM4PQN.mjs';
|
|
17
|
+
import './chunk-QXH2CS4V.mjs';
|
|
38
18
|
import './chunk-RFBLQLLZ.mjs';
|
|
19
|
+
import './chunk-LYKUJNAV.mjs';
|
|
20
|
+
import './chunk-JUKYYXSP.mjs';
|
|
21
|
+
import './chunk-BTARFTEN.mjs';
|
|
22
|
+
import './chunk-FQBFZAWG.mjs';
|
|
23
|
+
export { clearNormalizationCache, configureNormalizationCache, getNormalizationCacheSize, resetNormalizationCache } from './chunk-LWFK3TC2.mjs';
|
|
24
|
+
import './chunk-4UMZ7KQL.mjs';
|
|
25
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
26
|
+
import './chunk-GVPYMSLO.mjs';
|
|
39
27
|
import './chunk-L5ORED7V.mjs';
|
|
40
|
-
|
|
28
|
+
import './chunk-U476IXKQ.mjs';
|
|
29
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-IQHZMCLX.mjs';
|
|
30
|
+
import './chunk-R6A773WK.mjs';
|
|
31
|
+
import './chunk-YTJCGKM4.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_POLL_INTERVAL_MS, MARKER_MAX_AGE_MS } from '../chunk-YEO6G2NG.mjs';
|
|
1
2
|
import '../chunk-R6A773WK.mjs';
|
|
2
3
|
import { compareCodePoints } from '../chunk-YTJCGKM4.mjs';
|
|
3
|
-
import { DEFAULT_POLL_INTERVAL_MS, MARKER_MAX_AGE_MS } from '../chunk-YEO6G2NG.mjs';
|
|
4
4
|
|
|
5
5
|
// src/invalidation/filesystem.ts
|
|
6
6
|
function generateInstanceId() {
|