@delali/narsil 0.3.1-next.115 → 0.3.1-next.117
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/browser/{chunk-FODCC3MK.mjs → chunk-7XRH7I4N.mjs} +1 -1
- package/dist/browser/{chunk-2TMWIATH.mjs → chunk-T6DA4IJO.mjs} +5 -5
- package/dist/browser/{chunk-I45FAGOF.mjs → chunk-UKNKUSWI.mjs} +2 -2
- package/dist/browser/{durability-wiring-CSMTKEYX.mjs → durability-wiring-A7GLH6BU.mjs} +28 -5
- package/dist/browser/{restore-queue-N7N42PBS.mjs → restore-queue-Y66KAYOQ.mjs} +1 -1
- package/dist/browser/{snapshot-EBH6RXQO.mjs → snapshot-KAKLYZ7C.mjs} +3 -3
- package/dist/browser/{write-5ZKFINX3.mjs → write-S3E3IAC5.mjs} +2 -2
- package/dist/{chunk-KVLX65KD.mjs → chunk-3COV4MDF.mjs} +3 -3
- package/dist/{chunk-7EWQZQDT.mjs → chunk-IYEO6BIS.mjs} +1 -1
- package/dist/{chunk-KGVC6KJ3.mjs → chunk-KYMFYHFR.mjs} +2 -2
- package/dist/{chunk-VOKEYJHU.mjs → chunk-LA3CDBKS.mjs} +1 -1
- package/dist/{chunk-BCSWODXP.mjs → chunk-LWTSMYRG.mjs} +5 -5
- package/dist/{chunk-YCSRB3IN.mjs → chunk-MMKE4KDE.mjs} +2 -2
- package/dist/{chunk-UDZYIWDP.mjs → chunk-RXSRYHUK.mjs} +3 -3
- package/dist/{chunk-YCFQ5754.mjs → chunk-V3F2H5EN.mjs} +26 -3
- package/dist/distribution.mjs +6 -6
- package/dist/{durability-wiring-5V6DVHFK.mjs → durability-wiring-UTSQ5NUE.mjs} +7 -7
- package/dist/index.browser.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +4 -4
- package/dist/{restore-queue-J6PCG4ON.mjs → restore-queue-NSDTCLFQ.mjs} +1 -1
- package/dist/{snapshot-57WF53MK.mjs → snapshot-FLGAN3TO.mjs} +6 -6
- package/dist/{write-YEI7A5OR.mjs → write-CMV3VCXA.mjs} +2 -2
- package/package.json +12 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, getNestedValue, requireValidFieldTypes, VECTOR_PATTERN } from './chunk-
|
|
1
|
+
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors, getNestedValue, requireValidFieldTypes, VECTOR_PATTERN } from './chunk-T6DA4IJO.mjs';
|
|
2
2
|
import { NarsilError, ErrorCodes } from './chunk-LJS6PREA.mjs';
|
|
3
3
|
import { decode } from '@msgpack/msgpack';
|
|
4
4
|
|
|
@@ -19200,7 +19200,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
19200
19200
|
if (config?.lifecycle !== void 0 && durabilityTier === null) {
|
|
19201
19201
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
|
|
19202
19202
|
}
|
|
19203
|
-
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-
|
|
19203
|
+
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-A7GLH6BU.mjs');
|
|
19204
19204
|
const filesystemDurability = durabilityTier?.kind === "wal";
|
|
19205
19205
|
const executor = createDirectExecutor({
|
|
19206
19206
|
vectorWorkerCopies: vectorCopyPolicy,
|
|
@@ -22634,14 +22634,14 @@ function portabilityOperations(core, config, engine) {
|
|
|
22634
22634
|
return {
|
|
22635
22635
|
snapshot(indexName) {
|
|
22636
22636
|
return withOpenIndex(indexName, async () => {
|
|
22637
|
-
const { createSnapshot } = await import('./snapshot-
|
|
22637
|
+
const { createSnapshot } = await import('./snapshot-KAKLYZ7C.mjs');
|
|
22638
22638
|
return createSnapshot(snapshotDepsOf(indexName));
|
|
22639
22639
|
});
|
|
22640
22640
|
},
|
|
22641
22641
|
async restore(indexName, data) {
|
|
22642
22642
|
core.guardShutdown();
|
|
22643
22643
|
validateIndexName(indexName);
|
|
22644
|
-
const restored = import('./restore-queue-
|
|
22644
|
+
const restored = import('./restore-queue-Y66KAYOQ.mjs').then(
|
|
22645
22645
|
({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
|
|
22646
22646
|
);
|
|
22647
22647
|
await emitWriteEventAfter(core, indexName, restored);
|
|
@@ -22650,8 +22650,8 @@ function portabilityOperations(core, config, engine) {
|
|
|
22650
22650
|
exportDocuments(indexName) {
|
|
22651
22651
|
return withOpenIndex(indexName, async () => {
|
|
22652
22652
|
const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
|
|
22653
|
-
import('./snapshot-
|
|
22654
|
-
import('./write-
|
|
22653
|
+
import('./snapshot-KAKLYZ7C.mjs'),
|
|
22654
|
+
import('./write-S3E3IAC5.mjs')
|
|
22655
22655
|
]);
|
|
22656
22656
|
const header = indexConfigurationOf(core.requireIndex(indexName));
|
|
22657
22657
|
return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-
|
|
2
|
-
import { VERSION, rulesOfStoredSynonyms, flattenSchema, packChecksummedEnvelope, openChecksummedEnvelope, requireValidFieldTypes, isCompositePartition, crc32, reconstructSchemaFromMetadata, extractVectorFieldsFromSchema, readHeader, HEADER_SIZE, engineVersionParts, writeHeader, partialFieldsOf, getLanguage, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, VECTOR_PATTERN, isQuantizationMode, isStorageMode, survivorDocumentsOf, partitionStateOf, freezeSegmentShared, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, fnv1a, selectionKeeps, decodeMapWithoutFields, prepareDocumentVectors, messagePackUpperBoundBytes, segmentArraysOf, mergeSegmentContents, resolveIndexAnalysis } from './chunk-
|
|
1
|
+
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-7XRH7I4N.mjs';
|
|
2
|
+
import { VERSION, rulesOfStoredSynonyms, flattenSchema, packChecksummedEnvelope, openChecksummedEnvelope, requireValidFieldTypes, isCompositePartition, crc32, reconstructSchemaFromMetadata, extractVectorFieldsFromSchema, readHeader, HEADER_SIZE, engineVersionParts, writeHeader, partialFieldsOf, getLanguage, decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays, VECTOR_PATTERN, isQuantizationMode, isStorageMode, survivorDocumentsOf, partitionStateOf, freezeSegmentShared, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, fnv1a, selectionKeeps, decodeMapWithoutFields, prepareDocumentVectors, messagePackUpperBoundBytes, segmentArraysOf, mergeSegmentContents, resolveIndexAnalysis } from './chunk-T6DA4IJO.mjs';
|
|
3
3
|
import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead, VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-P7C2S5JX.mjs';
|
|
4
4
|
import { compareCodePoints, MAX_FILE_BYTES, VALID_HNSW_METRICS } from './chunk-2CBQ2PCC.mjs';
|
|
5
5
|
import { NarsilError, ErrorCodes } from './chunk-LJS6PREA.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { nodeThreadId, spawnNodeWorker } from './chunk-HOZW3PKP.mjs';
|
|
2
|
-
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, directoryCheckpointStore, manifestKey, decodeSegmentManifest, readListedFile, adapterCheckpointStore, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, DIRECTORY_LOCK_ATTEMPTS, createSeqOwner, readSegmentManifest, snapshotBundleKey, reclaimUnlistedKeys, manifestReferencedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, manifestFileRefs, DIRECTORY_LOCK_SETTLE_MS, readSegmentFile, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, MAX_SEGMENTS_PER_PARTITION, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, metadataConfigOf, buildEntry, readCurrentManifest, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-
|
|
3
|
-
import { applyDeleteEntry, applyIndexEntry } from './chunk-
|
|
4
|
-
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
2
|
+
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, directoryCheckpointStore, manifestKey, decodeSegmentManifest, readListedFile, adapterCheckpointStore, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, DIRECTORY_LOCK_ATTEMPTS, createSeqOwner, readSegmentManifest, snapshotBundleKey, reclaimUnlistedKeys, manifestReferencedKeys, loadSegmentedCheckpoint, checkpointLastSeqNo, manifestFileRefs, DIRECTORY_LOCK_SETTLE_MS, readSegmentFile, isRecord, invalidManifest, deserializePayloadV2, unpackEnvelopeBytes, checkpointPrimaryTerm, frameRecord, isId, isUint32, isSequenceNumber, writeCheckpointSegments, partitionContentsOf, writeLiveVectors, commitCheckpointManifest, removeCheckpointGarbage, readWalSegments, durableRecordMissing, MAX_SEGMENTS_PER_PARTITION, growPartitionsTo, writeSegmentHeader, VECTOR_FILE_ENVELOPE_VERSION, SEGMENT_HEADER_SIZE, documentsOfPayloadV2, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, metadataConfigOf, buildEntry, readCurrentManifest, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-UKNKUSWI.mjs';
|
|
3
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-7XRH7I4N.mjs';
|
|
4
|
+
import { encodeDocument, fnv1a, requireValidFieldTypes, openChecksummedEnvelope, HEADER_SIZE, buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-T6DA4IJO.mjs';
|
|
5
5
|
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-P7C2S5JX.mjs';
|
|
6
6
|
import { compareCodePoints, MIN_M, MAX_FILE_BYTES, detectRuntime, resolveWorkerEntry } from './chunk-2CBQ2PCC.mjs';
|
|
7
7
|
import './chunk-JPTQZWJQ.mjs';
|
|
@@ -217,7 +217,22 @@ async function openReadWriteCreating(filePath, fs) {
|
|
|
217
217
|
async function writeFully(handle, buffer, key) {
|
|
218
218
|
let offset = 0;
|
|
219
219
|
while (offset < buffer.length) {
|
|
220
|
-
|
|
220
|
+
let bytesWritten;
|
|
221
|
+
try {
|
|
222
|
+
;
|
|
223
|
+
({ bytesWritten } = await handle.write(buffer, offset, buffer.length - offset));
|
|
224
|
+
} catch (err) {
|
|
225
|
+
throw new NarsilError(
|
|
226
|
+
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
227
|
+
`Write to "${key}" failed; the write is not acknowledged`,
|
|
228
|
+
{
|
|
229
|
+
key,
|
|
230
|
+
written: offset,
|
|
231
|
+
total: buffer.length,
|
|
232
|
+
cause: err instanceof Error ? err.message : String(err)
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
}
|
|
221
236
|
if (bytesWritten <= 0) {
|
|
222
237
|
throw new NarsilError(
|
|
223
238
|
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
@@ -329,7 +344,15 @@ function createDurableDirectory(root) {
|
|
|
329
344
|
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
330
345
|
},
|
|
331
346
|
async writeSlot(offset, slot) {
|
|
332
|
-
|
|
347
|
+
try {
|
|
348
|
+
await handle.write(slot, 0, slot.length, offset);
|
|
349
|
+
} catch (err) {
|
|
350
|
+
throw new NarsilError(
|
|
351
|
+
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
352
|
+
`Write to "${key}" failed; the write is not acknowledged`,
|
|
353
|
+
{ key, cause: err instanceof Error ? err.message : String(err) }
|
|
354
|
+
);
|
|
355
|
+
}
|
|
333
356
|
try {
|
|
334
357
|
await handle.sync();
|
|
335
358
|
} catch (err) {
|
|
@@ -18,7 +18,7 @@ function restoreDepsOf(core, host) {
|
|
|
18
18
|
function queueRestore(core, host, restoresInFlight, indexName, data) {
|
|
19
19
|
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
20
20
|
const restored = previous.then(async () => {
|
|
21
|
-
const { restoreFromSnapshot } = await import('./snapshot-
|
|
21
|
+
const { restoreFromSnapshot } = await import('./snapshot-KAKLYZ7C.mjs');
|
|
22
22
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
23
23
|
});
|
|
24
24
|
const settled = restored.then(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { collectAndReturnPages, vectorsPerFile } from './chunk-73U5DWOZ.mjs';
|
|
2
|
-
import { indexMetadataOf, writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, writeLiveVectors, commitCheckpointManifest, manifestKey, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, manifestFileRefs, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readSegmentFile, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, raiseEarlierReleaseGraphSetting, restoredConfigFields, restoredEmbedding, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, prepareStoredSynonyms, rejectSnapshot, readHeapStatistics, readResidentMemory, extractVectorFieldsFromSchema, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-
|
|
2
|
+
import { indexMetadataOf, writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, writeLiveVectors, commitCheckpointManifest, manifestKey, decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, partitionContentsOf, manifestFileRefs, unpackIndexSnapshotEnvelope, encodeSegmentManifest, loadSegmentedCheckpoint, writeMetadataEnvelope, openManifestPayload, listedKeysOf, decodeManifestPayload, readSegmentFile, readVectorFile, readGraphParts, documentsOfPayloadV2, deserializePayloadV1 } from './chunk-UKNKUSWI.mjs';
|
|
3
|
+
import './chunk-7XRH7I4N.mjs';
|
|
4
|
+
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, raiseEarlierReleaseGraphSetting, restoredConfigFields, restoredEmbedding, getLanguage, validateSchema, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateVectorPromotion, validateVectorStorage, validateRequiredFieldsInSchema, resolveIndexAnalysis, validateEmbeddingConfig, prepareStoredSynonyms, rejectSnapshot, readHeapStatistics, readResidentMemory, extractVectorFieldsFromSchema, loadVectorCodeFor, decodeEveryStoredDocument, parseVectorDimension, insertDocumentVectors, decodeIndexConfiguration, flattenSchema } from './chunk-T6DA4IJO.mjs';
|
|
5
5
|
import { decodeVectorIndexParts, vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION, bytesToVectors } from './chunk-P7C2S5JX.mjs';
|
|
6
6
|
import { MAX_FILE_BYTES } from './chunk-2CBQ2PCC.mjs';
|
|
7
7
|
import './chunk-JPTQZWJQ.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-
|
|
2
|
-
import { decodeStoredDocument, openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-
|
|
1
|
+
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-7XRH7I4N.mjs';
|
|
2
|
+
import { decodeStoredDocument, openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-T6DA4IJO.mjs';
|
|
3
3
|
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-P7C2S5JX.mjs';
|
|
4
4
|
import './chunk-2CBQ2PCC.mjs';
|
|
5
5
|
import './chunk-JPTQZWJQ.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { vectorsPerFile } from './chunk-NX7KU77V.mjs';
|
|
2
|
-
import { writeLiveVectors, decodeSegmentManifest, openManifestPayload, listedKeysOf, decodeManifestPayload, SINGLE_NODE_PRIMARY_TERM } from './chunk-
|
|
2
|
+
import { writeLiveVectors, decodeSegmentManifest, openManifestPayload, listedKeysOf, decodeManifestPayload, SINGLE_NODE_PRIMARY_TERM } from './chunk-MMKE4KDE.mjs';
|
|
3
3
|
import { vectorsToBytes, VECTOR_FILE_PAYLOAD_VERSION } from './chunk-OCB7TMUQ.mjs';
|
|
4
|
-
import { writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, commitCheckpointManifest, manifestKey, manifestFileRefs, partitionContentsOf } from './chunk-
|
|
5
|
-
import { HEADER_SIZE } from './chunk-
|
|
4
|
+
import { writeCheckpointSegments, DEFAULT_COMPACTION_THRESHOLD, commitCheckpointManifest, manifestKey, manifestFileRefs, partitionContentsOf } from './chunk-KYMFYHFR.mjs';
|
|
5
|
+
import { HEADER_SIZE } from './chunk-LWTSMYRG.mjs';
|
|
6
6
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
7
7
|
import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-
|
|
1
|
+
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-LWTSMYRG.mjs';
|
|
2
2
|
import { getNestedValue } from './chunk-KCQG2PJT.mjs';
|
|
3
3
|
import { requireValidFieldTypes } from './chunk-DG62H7OD.mjs';
|
|
4
4
|
import { VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-
|
|
1
|
+
import { KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment, restoreVectorFields, KEYWORD_SEGMENT_PAYLOAD_VERSION, littleEndianBytes, uint64Bytes } from './chunk-IYEO6BIS.mjs';
|
|
2
2
|
import { WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
|
|
3
3
|
import { ReplicationMessageTypes } from './chunk-YH5OIL7B.mjs';
|
|
4
|
-
import { packChecksummedEnvelope, crc32, openChecksummedEnvelope, reconstructSchemaFromMetadata, HEADER_SIZE, prepareDocumentVectors } from './chunk-
|
|
4
|
+
import { packChecksummedEnvelope, crc32, openChecksummedEnvelope, reconstructSchemaFromMetadata, HEADER_SIZE, prepareDocumentVectors } from './chunk-LWTSMYRG.mjs';
|
|
5
5
|
import { freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, selectionKeeps, decodeMapWithoutFields, shareSegmentArrays, segmentArraysOf, mergeSegmentContents } from './chunk-Q62NDKEC.mjs';
|
|
6
6
|
import { fnv1a, isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-N53HN5VA.mjs';
|
|
7
7
|
import { generateId, getLanguage } from './chunk-FUUP45IS.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-
|
|
1
|
+
import { sanitizeSurfaceForms, patternIndexesFromWire, dropStoredVectorValues } from './chunk-MMKE4KDE.mjs';
|
|
2
2
|
import { requireValidFieldTypes } from './chunk-DG62H7OD.mjs';
|
|
3
3
|
import { VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
|
|
4
4
|
import { decode } from '@msgpack/msgpack';
|
|
@@ -4056,7 +4056,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
4056
4056
|
if (config?.lifecycle !== void 0 && durabilityTier === null) {
|
|
4057
4057
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
|
|
4058
4058
|
}
|
|
4059
|
-
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-
|
|
4059
|
+
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-UTSQ5NUE.mjs');
|
|
4060
4060
|
const filesystemDurability = durabilityTier?.kind === "wal";
|
|
4061
4061
|
const executor = createDirectExecutor({
|
|
4062
4062
|
vectorWorkerCopies: vectorCopyPolicy,
|
|
@@ -6971,14 +6971,14 @@ function portabilityOperations(core, config, engine) {
|
|
|
6971
6971
|
return {
|
|
6972
6972
|
snapshot(indexName) {
|
|
6973
6973
|
return withOpenIndex(indexName, async () => {
|
|
6974
|
-
const { createSnapshot } = await import('./snapshot-
|
|
6974
|
+
const { createSnapshot } = await import('./snapshot-FLGAN3TO.mjs');
|
|
6975
6975
|
return createSnapshot(snapshotDepsOf(indexName));
|
|
6976
6976
|
});
|
|
6977
6977
|
},
|
|
6978
6978
|
async restore(indexName, data) {
|
|
6979
6979
|
core.guardShutdown();
|
|
6980
6980
|
validateIndexName(indexName);
|
|
6981
|
-
const restored = import('./restore-queue-
|
|
6981
|
+
const restored = import('./restore-queue-NSDTCLFQ.mjs').then(
|
|
6982
6982
|
({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
|
|
6983
6983
|
);
|
|
6984
6984
|
await emitWriteEventAfter(core, indexName, restored);
|
|
@@ -6987,8 +6987,8 @@ function portabilityOperations(core, config, engine) {
|
|
|
6987
6987
|
exportDocuments(indexName) {
|
|
6988
6988
|
return withOpenIndex(indexName, async () => {
|
|
6989
6989
|
const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
|
|
6990
|
-
import('./snapshot-
|
|
6991
|
-
import('./write-
|
|
6990
|
+
import('./snapshot-FLGAN3TO.mjs'),
|
|
6991
|
+
import('./write-CMV3VCXA.mjs')
|
|
6992
6992
|
]);
|
|
6993
6993
|
const header = indexConfigurationOf(core.requireIndex(indexName));
|
|
6994
6994
|
return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { decodeVectorGraphPartPayload, assembleGraphParts, decodeVectorFilePayload, countDead, VECTOR_FILE_MAX_VECTORS, deadBytesFor } from './chunk-OCB7TMUQ.mjs';
|
|
2
|
-
import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, readSegmentFile, manifestKey, segmentsPrefix, readListedFile, requireListedChecksum, vectorFileKey, graphPartKey } from './chunk-
|
|
3
|
-
import { VERSION, rulesOfStoredSynonyms, openChecksummedEnvelope, readHeader, HEADER_SIZE, crc32, engineVersionParts, writeHeader, packChecksummedEnvelope } from './chunk-
|
|
2
|
+
import { MAX_SEGMENT_ID, MANIFEST_ENVELOPE_VERSION, EARLIER_SEGMENT_MANIFEST_VERSION, SEGMENT_MANIFEST_VERSION, MAX_SEGMENTS_PER_PARTITION, segmentKey, readSegmentFile, manifestKey, segmentsPrefix, readListedFile, requireListedChecksum, vectorFileKey, graphPartKey } from './chunk-KYMFYHFR.mjs';
|
|
3
|
+
import { VERSION, rulesOfStoredSynonyms, openChecksummedEnvelope, readHeader, HEADER_SIZE, crc32, engineVersionParts, writeHeader, packChecksummedEnvelope } from './chunk-LWTSMYRG.mjs';
|
|
4
4
|
import { decodeEveryStoredDocument, createSharedFrozenSegment, shareSegmentArrays } from './chunk-Q62NDKEC.mjs';
|
|
5
5
|
import { flattenSchema, requireValidFieldTypes, isQuantizationMode, isStorageMode } from './chunk-DG62H7OD.mjs';
|
|
6
6
|
import { MAX_FILE_BYTES, VALID_HNSW_METRICS } from './chunk-U476IXKQ.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { readMetadataEnvelope } from './chunk-
|
|
2
|
-
import { readWalSegments, durableRecordMissing, checkpointLastSeqNo, SEGMENT_HEADER_SIZE } from './chunk-
|
|
3
|
-
import { applyDeleteEntry, applyIndexEntry } from './chunk-
|
|
1
|
+
import { readMetadataEnvelope } from './chunk-MMKE4KDE.mjs';
|
|
2
|
+
import { readWalSegments, durableRecordMissing, checkpointLastSeqNo, SEGMENT_HEADER_SIZE } from './chunk-KYMFYHFR.mjs';
|
|
3
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-IYEO6BIS.mjs';
|
|
4
4
|
|
|
5
5
|
// src/persistence/durability/recovery.ts
|
|
6
6
|
async function listPersistedIndexes(directory) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nodeThreadId } from './chunk-W55X2BYN.mjs';
|
|
2
2
|
import { getFs, getPath } from './chunk-HLPRHOSO.mjs';
|
|
3
|
-
import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-
|
|
3
|
+
import { DIRECTORY_LOCK_ATTEMPTS, DIRECTORY_LOCK_SETTLE_MS, DIRECTORY_LOCK_PROCESS_START_TOLERANCE_MS } from './chunk-KYMFYHFR.mjs';
|
|
4
4
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
5
5
|
import { NarsilError, ErrorCodes } from './chunk-OBWUWZRA.mjs';
|
|
6
6
|
import { openSync, close, readFileSync } from 'fs';
|
|
@@ -338,7 +338,22 @@ async function openReadWriteCreating(filePath, fs) {
|
|
|
338
338
|
async function writeFully(handle, buffer, key) {
|
|
339
339
|
let offset = 0;
|
|
340
340
|
while (offset < buffer.length) {
|
|
341
|
-
|
|
341
|
+
let bytesWritten;
|
|
342
|
+
try {
|
|
343
|
+
;
|
|
344
|
+
({ bytesWritten } = await handle.write(buffer, offset, buffer.length - offset));
|
|
345
|
+
} catch (err) {
|
|
346
|
+
throw new NarsilError(
|
|
347
|
+
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
348
|
+
`Write to "${key}" failed; the write is not acknowledged`,
|
|
349
|
+
{
|
|
350
|
+
key,
|
|
351
|
+
written: offset,
|
|
352
|
+
total: buffer.length,
|
|
353
|
+
cause: err instanceof Error ? err.message : String(err)
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
342
357
|
if (bytesWritten <= 0) {
|
|
343
358
|
throw new NarsilError(
|
|
344
359
|
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
@@ -450,7 +465,15 @@ function createDurableDirectory(root) {
|
|
|
450
465
|
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
451
466
|
},
|
|
452
467
|
async writeSlot(offset, slot) {
|
|
453
|
-
|
|
468
|
+
try {
|
|
469
|
+
await handle.write(slot, 0, slot.length, offset);
|
|
470
|
+
} catch (err) {
|
|
471
|
+
throw new NarsilError(
|
|
472
|
+
ErrorCodes.PERSISTENCE_SAVE_FAILED,
|
|
473
|
+
`Write to "${key}" failed; the write is not acknowledged`,
|
|
474
|
+
{ key, cause: err instanceof Error ? err.message : String(err) }
|
|
475
|
+
);
|
|
476
|
+
}
|
|
454
477
|
try {
|
|
455
478
|
await handle.sync();
|
|
456
479
|
} catch (err) {
|
package/dist/distribution.mjs
CHANGED
|
@@ -4,10 +4,10 @@ export { DEFAULT_CAPACITY, DEFAULT_PARTITION_COUNT, DEFAULT_REPLICATION_FACTOR }
|
|
|
4
4
|
import { addBackgroundAdmission, workWaitingForMemory } from './chunk-PELHVTO7.mjs';
|
|
5
5
|
import { onRefusalAfterCollection, reservedHeapBytes, reserveHeapBytes, collectYoungGenerationBeforeRefusal, collectGarbageBeforeRefusal } from './chunk-IWVEG5CX.mjs';
|
|
6
6
|
import { fixedHybridDepthOf, requireWithinHybridDepth, pageByPosition } from './chunk-ZR63OGT2.mjs';
|
|
7
|
-
import { closePartitionWriter, replaySyncedWal } from './chunk-
|
|
8
|
-
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-
|
|
7
|
+
import { closePartitionWriter, replaySyncedWal } from './chunk-RXSRYHUK.mjs';
|
|
8
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-3COV4MDF.mjs';
|
|
9
9
|
import './chunk-NX7KU77V.mjs';
|
|
10
|
-
import { indexMetadataOf, loadPartitionSegments, readSegmentManifest, readVectorFile } from './chunk-
|
|
10
|
+
import { indexMetadataOf, loadPartitionSegments, readSegmentManifest, readVectorFile } from './chunk-MMKE4KDE.mjs';
|
|
11
11
|
import { decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-OCB7TMUQ.mjs';
|
|
12
12
|
import { CONTROLLER_LEASE_KEY } from './chunk-44W3CBNG.mjs';
|
|
13
13
|
import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
|
|
@@ -15,11 +15,11 @@ import './chunk-HC5NURS6.mjs';
|
|
|
15
15
|
import './chunk-DJHHF2L5.mjs';
|
|
16
16
|
import './chunk-37CD3OKS.mjs';
|
|
17
17
|
import { getPath, getFs } from './chunk-HLPRHOSO.mjs';
|
|
18
|
-
import { createForwardBatchResultMessage, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, readListedFile, optionalIndexUuid, computeEntryChecksum, createPrimaryResignMessage, validateInsyncConfirmPayload, buildEntry, createInsyncRemoveMessage, createEntryBatchMessage, createInsyncConfirmMessage, createEntryMessage, validateAckPayload, createInsyncAddMessage, directoryCheckpointStore, checkpointLastSeqNo, checkpointPrimaryTerm, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage } from './chunk-
|
|
19
|
-
import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-
|
|
18
|
+
import { createForwardBatchResultMessage, validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, readListedFile, optionalIndexUuid, computeEntryChecksum, createPrimaryResignMessage, validateInsyncConfirmPayload, buildEntry, createInsyncRemoveMessage, createEntryBatchMessage, createInsyncConfirmMessage, createEntryMessage, validateAckPayload, createInsyncAddMessage, directoryCheckpointStore, checkpointLastSeqNo, checkpointPrimaryTerm, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage } from './chunk-KYMFYHFR.mjs';
|
|
19
|
+
import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-IYEO6BIS.mjs';
|
|
20
20
|
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
|
|
21
21
|
import { TransportErrorCodes, ReplicationMessageTypes, ClusterMessageTypes, QueryMessageTypes, TransportError, DEFAULT_TRANSPORT_CONFIG } from './chunk-YH5OIL7B.mjs';
|
|
22
|
-
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createByteReader, openChecksummedEnvelope, emptySerializablePartition, crc32Init, crc32Final, crc32Update, yieldToEventLoop } from './chunk-
|
|
22
|
+
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createByteReader, openChecksummedEnvelope, emptySerializablePartition, crc32Init, crc32Final, crc32Update, yieldToEventLoop } from './chunk-LWTSMYRG.mjs';
|
|
23
23
|
import { runtimeHost, requireSurfaceFormsForPartialFields, now, listBindingOf, clampLimit, hitsKeptPerGroup, queryBindingOf, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-5VVSHCXT.mjs';
|
|
24
24
|
import { bindRerankWindowSource, rerankWindowCapOf, providedDocId, engineCoreOf } from './chunk-N57XXGPG.mjs';
|
|
25
25
|
import './chunk-6PN3U6XW.mjs';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-
|
|
3
|
-
import { decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, VECTOR_FILE_ENVELOPE_VERSION, metadataConfigOf, readCurrentManifest } from './chunk-
|
|
1
|
+
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-LA3CDBKS.mjs';
|
|
2
|
+
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-RXSRYHUK.mjs';
|
|
3
|
+
import { decodeSegmentManifest, SINGLE_NODE_PRIMARY_TERM, readMetadataEnvelope, writeMetadataEnvelope, metadataFromConfig, createSeqOwner, readSegmentManifest, reclaimUnlistedKeys, loadSegmentedCheckpoint, isRecord, invalidManifest, unpackEnvelopeBytes, isId, isUint32, isSequenceNumber, writeLiveVectors, growPartitionsTo, VECTOR_FILE_ENVELOPE_VERSION, metadataConfigOf, readCurrentManifest } from './chunk-MMKE4KDE.mjs';
|
|
4
4
|
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-OCB7TMUQ.mjs';
|
|
5
5
|
import './chunk-37CD3OKS.mjs';
|
|
6
|
-
import { createDurableDirectory } from './chunk-
|
|
6
|
+
import { createDurableDirectory } from './chunk-V3F2H5EN.mjs';
|
|
7
7
|
import { spawnNodeWorker } from './chunk-W55X2BYN.mjs';
|
|
8
8
|
import { getFs } from './chunk-HLPRHOSO.mjs';
|
|
9
|
-
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, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, readSegmentFile, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, MAX_SEGMENTS_PER_PARTITION, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, SEGMENT_HEADER_SIZE, buildEntry, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, checkpointLastSeqNo, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
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, directoryCheckpointStore, manifestKey, readListedFile, adapterCheckpointStore, snapshotBundleKey, manifestReferencedKeys, manifestFileRefs, readSegmentFile, checkpointPrimaryTerm, frameRecord, writeCheckpointSegments, partitionContentsOf, commitCheckpointManifest, removeCheckpointGarbage, MAX_SEGMENTS_PER_PARTITION, writeSegmentHeader, readCommitMarker, nextMarkerSlot, encodeMarkerSlot, markerSlotOffset, DIRECTORY_IDENTITY_CHECK_INTERVAL_MS, SEGMENT_HEADER_SIZE, buildEntry, WHOLE_PARTITION_LARGEST_DOCUMENT_COUNT, WHOLE_PARTITION_MIN_CHANGED_SHARE, captureWholePartition, checkpointLastSeqNo, CHECKPOINT_TIMEOUT_RECOVERY_BACKOFF_MS, CHECKPOINT_WORKER_TIMEOUT_MS, CHECKPOINT_WORKER_IDLE_MS, LOG_RECORDS_PER_CHECKPOINT } from './chunk-KYMFYHFR.mjs';
|
|
10
|
+
import './chunk-IYEO6BIS.mjs';
|
|
11
11
|
import './chunk-P36MUFEJ.mjs';
|
|
12
12
|
import './chunk-YH5OIL7B.mjs';
|
|
13
|
-
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-
|
|
13
|
+
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-LWTSMYRG.mjs';
|
|
14
14
|
import './chunk-5VVSHCXT.mjs';
|
|
15
15
|
import './chunk-N57XXGPG.mjs';
|
|
16
16
|
import { resolveWorkerEntry } from './chunk-6PN3U6XW.mjs';
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-T6DA4IJO.mjs';
|
|
2
2
|
export { isSimdAvailable } from './browser/chunk-2CBQ2PCC.mjs';
|
|
3
3
|
import './browser/chunk-JPTQZWJQ.mjs';
|
|
4
4
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-LJS6PREA.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createDurableDirectory } from '../../chunk-
|
|
1
|
+
import { createDurableDirectory } from '../../chunk-V3F2H5EN.mjs';
|
|
2
2
|
import '../../chunk-W55X2BYN.mjs';
|
|
3
3
|
import '../../chunk-HLPRHOSO.mjs';
|
|
4
|
-
import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
4
|
+
import { CHECKPOINT_WORKER_HEARTBEAT_MS, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-KYMFYHFR.mjs';
|
|
5
|
+
import '../../chunk-IYEO6BIS.mjs';
|
|
6
6
|
import '../../chunk-P36MUFEJ.mjs';
|
|
7
7
|
import '../../chunk-YH5OIL7B.mjs';
|
|
8
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-LWTSMYRG.mjs';
|
|
9
9
|
import '../../chunk-5VVSHCXT.mjs';
|
|
10
10
|
import '../../chunk-N57XXGPG.mjs';
|
|
11
11
|
import '../../chunk-6PN3U6XW.mjs';
|
|
@@ -18,7 +18,7 @@ function restoreDepsOf(core, host) {
|
|
|
18
18
|
function queueRestore(core, host, restoresInFlight, indexName, data) {
|
|
19
19
|
const previous = restoresInFlight.get(indexName) ?? Promise.resolve();
|
|
20
20
|
const restored = previous.then(async () => {
|
|
21
|
-
const { restoreFromSnapshot } = await import('./snapshot-
|
|
21
|
+
const { restoreFromSnapshot } = await import('./snapshot-FLGAN3TO.mjs');
|
|
22
22
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
23
23
|
});
|
|
24
24
|
const settled = restored.then(
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-
|
|
1
|
+
import { documentsOfPayloadV2 } from './chunk-LA3CDBKS.mjs';
|
|
2
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-3COV4MDF.mjs';
|
|
3
3
|
import './chunk-NX7KU77V.mjs';
|
|
4
|
-
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-
|
|
4
|
+
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-MMKE4KDE.mjs';
|
|
5
5
|
import { decodeVectorIndexParts, bytesToVectors } from './chunk-OCB7TMUQ.mjs';
|
|
6
6
|
import './chunk-HC5NURS6.mjs';
|
|
7
7
|
import './chunk-DJHHF2L5.mjs';
|
|
8
8
|
import './chunk-37CD3OKS.mjs';
|
|
9
|
-
import { manifestKey, encodeSegmentManifest, manifestFileRefs, readSegmentFile } from './chunk-
|
|
10
|
-
import './chunk-
|
|
9
|
+
import { manifestKey, encodeSegmentManifest, manifestFileRefs, readSegmentFile } from './chunk-KYMFYHFR.mjs';
|
|
10
|
+
import './chunk-IYEO6BIS.mjs';
|
|
11
11
|
import './chunk-P36MUFEJ.mjs';
|
|
12
12
|
import './chunk-YH5OIL7B.mjs';
|
|
13
|
-
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, decodeIndexConfiguration, prepareStoredSynonyms, insertDocumentVectors } from './chunk-
|
|
13
|
+
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, decodeIndexConfiguration, prepareStoredSynonyms, insertDocumentVectors } from './chunk-LWTSMYRG.mjs';
|
|
14
14
|
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-5VVSHCXT.mjs';
|
|
15
15
|
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-N57XXGPG.mjs';
|
|
16
16
|
import './chunk-6PN3U6XW.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-OCB7TMUQ.mjs';
|
|
2
2
|
import './chunk-37CD3OKS.mjs';
|
|
3
|
-
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-
|
|
4
|
-
import { openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-
|
|
3
|
+
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-IYEO6BIS.mjs';
|
|
4
|
+
import { openChecksummedEnvelope, NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-LWTSMYRG.mjs';
|
|
5
5
|
import './chunk-5VVSHCXT.mjs';
|
|
6
6
|
import './chunk-N57XXGPG.mjs';
|
|
7
7
|
import './chunk-6PN3U6XW.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delali/narsil",
|
|
3
|
-
"version": "0.3.1-next.
|
|
3
|
+
"version": "0.3.1-next.117",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Distributed search engine with full-text, vector, hybrid, and geosearch. One engine, embedded or on a server, with a cross-language .nrsl format.",
|
|
6
6
|
"author": "Delali (https://sondelali.com)",
|
|
@@ -91,7 +91,12 @@
|
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
|
93
93
|
"build": "rm -rf dist && tsup && node scripts/check-browser-bundle.mjs && tsx scripts/api-surface.ts",
|
|
94
|
+
"build:code": "rm -rf dist && NARSIL_BUILD_CODE_ONLY=1 tsup",
|
|
94
95
|
"test": "vitest run --exclude='**/vector/recall.test.ts' --exclude='**/e2e/cluster-memory/**' --exclude='**/e2e/cluster-faults/**' --exclude='**/frozen-removal-memory/container-removes.test.ts'",
|
|
96
|
+
"test:presubmit": "node scripts/check-postsubmit-list.mjs lists && vitest run --config vitest.presubmit.config.ts --reporter=default --reporter=json --outputFile.json=node_modules/.cache/narsil-presubmit-tests.json && node scripts/check-postsubmit-list.mjs presubmit node_modules/.cache/narsil-presubmit-tests.json",
|
|
97
|
+
"test:postsubmit": "pnpm run test --reporter=default --reporter=json --outputFile.json=node_modules/.cache/narsil-postsubmit-tests.json",
|
|
98
|
+
"test:postsubmit-times": "node scripts/check-postsubmit-list.mjs postsubmit node_modules/.cache/narsil-postsubmit-tests.json",
|
|
99
|
+
"test:native": "vitest run src/__tests__/vector/native src/__tests__/integration/filtered-vector-recall/native src/__tests__/integration/filtered-vectors/mutations-native src/__tests__/integration/removed-vectors/main-thread",
|
|
95
100
|
"test:cluster": "vitest run src/__tests__/e2e/cluster-memory --no-file-parallelism",
|
|
96
101
|
"test:faults": "vitest run src/__tests__/e2e/cluster-faults --no-file-parallelism",
|
|
97
102
|
"test:etcd": "vitest run src/__tests__/distribution/coordinator/etcd-integration/*.test.ts",
|
|
@@ -269,11 +274,11 @@
|
|
|
269
274
|
}
|
|
270
275
|
},
|
|
271
276
|
"optionalDependencies": {
|
|
272
|
-
"@delali/narsil-native-darwin-arm64": "0.3.1-next.
|
|
273
|
-
"@delali/narsil-native-darwin-x64": "0.3.1-next.
|
|
274
|
-
"@delali/narsil-native-linux-arm64": "0.3.1-next.
|
|
275
|
-
"@delali/narsil-native-linux-x64": "0.3.1-next.
|
|
276
|
-
"@delali/narsil-native-win32-arm64": "0.3.1-next.
|
|
277
|
-
"@delali/narsil-native-win32-x64": "0.3.1-next.
|
|
277
|
+
"@delali/narsil-native-darwin-arm64": "0.3.1-next.117",
|
|
278
|
+
"@delali/narsil-native-darwin-x64": "0.3.1-next.117",
|
|
279
|
+
"@delali/narsil-native-linux-arm64": "0.3.1-next.117",
|
|
280
|
+
"@delali/narsil-native-linux-x64": "0.3.1-next.117",
|
|
281
|
+
"@delali/narsil-native-win32-arm64": "0.3.1-next.117",
|
|
282
|
+
"@delali/narsil-native-win32-x64": "0.3.1-next.117"
|
|
278
283
|
}
|
|
279
284
|
}
|