@delali/narsil 0.3.1-next.104 → 0.3.1-next.107
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-PW7GJFPW.mjs → chunk-JJKVYLL3.mjs} +2 -1
- package/dist/browser/{chunk-ECSLQ3S5.mjs → chunk-NNQPZPTB.mjs} +4 -4
- package/dist/browser/{chunk-6E4SWUYZ.mjs → chunk-OKZGAJEF.mjs} +110 -9
- package/dist/browser/{chunk-SFXM7PLV.mjs → chunk-OL7S2KLL.mjs} +1 -1
- package/dist/browser/{chunk-CWWD2UHP.mjs → chunk-PA56PRWX.mjs} +1 -1
- package/dist/browser/{chunk-5YMT23EX.mjs → chunk-WZUSMF7A.mjs} +7 -7
- package/dist/browser/{durability-wiring-HTBWDAOX.mjs → durability-wiring-HFQULBSA.mjs} +5 -5
- package/dist/browser/{module-6FVNK7DO.mjs → module-VROKZ7IZ.mjs} +19 -15
- package/dist/browser/{restore-queue-CL43WZTZ.mjs → restore-queue-EU77FRCV.mjs} +1 -1
- package/dist/browser/{snapshot-NL4GSDUD.mjs → snapshot-G77LQBZX.mjs} +6 -6
- package/dist/browser/{write-YFOOPLAN.mjs → write-RUC64JIH.mjs} +4 -4
- package/dist/{capabilities-DGaz7cb3.d.ts → capabilities-ByKPha_q.d.ts} +1 -1
- package/dist/{chunk-MKPE3VZF.mjs → chunk-3BRFOMGX.mjs} +1 -1
- package/dist/{chunk-LPQOEU5M.mjs → chunk-5FPMDU54.mjs} +38 -9
- package/dist/{chunk-35KEGAOS.mjs → chunk-7IBX2LRA.mjs} +6 -22
- package/dist/{chunk-PQHR5FHC.mjs → chunk-BRIOLMIX.mjs} +1 -1
- package/dist/{chunk-O372FZM4.mjs → chunk-CKNOGER5.mjs} +14 -14
- package/dist/{chunk-RWXFSGKJ.mjs → chunk-DNKM67DF.mjs} +2 -2
- package/dist/{chunk-XWJGJ2SE.mjs → chunk-FEOLYA2Y.mjs} +2 -2
- package/dist/{chunk-BLDJ5I6I.mjs → chunk-G6YATIRT.mjs} +112 -9
- package/dist/chunk-HAQUJYMN.mjs +344 -0
- package/dist/{chunk-47PZE6CJ.mjs → chunk-HNAQNAFS.mjs} +2 -2
- package/dist/{chunk-VFEALJEA.mjs → chunk-IA3H54X4.mjs} +1 -1
- package/dist/{chunk-KSQS77DK.mjs → chunk-IA6I5U36.mjs} +1 -1
- package/dist/{chunk-J2KRH2RJ.mjs → chunk-IZLM2OOO.mjs} +3 -3
- package/dist/{chunk-5W2ODPPO.mjs → chunk-KOCHOOS5.mjs} +175 -7
- package/dist/{chunk-DQ5NJSBZ.mjs → chunk-M5EZVXIM.mjs} +1 -1
- package/dist/{chunk-6GFVUXUH.mjs → chunk-NRARRUKN.mjs} +2 -2
- package/dist/{chunk-OIN27OQH.mjs → chunk-OKZPYJZX.mjs} +1 -1
- package/dist/{chunk-KNRU5CJ4.mjs → chunk-QA6F5MML.mjs} +5 -5
- package/dist/{chunk-WU4P5J4G.mjs → chunk-UM6Z7AIP.mjs} +3 -3
- package/dist/{chunk-PAWVKEVS.mjs → chunk-VHPVBJOI.mjs} +1 -1
- package/dist/{chunk-HMFNFVP7.mjs → chunk-VJS4JFBQ.mjs} +2 -1
- package/dist/{chunk-RFVUDM5E.mjs → chunk-VVDQNCOG.mjs} +2 -15
- package/dist/{chunk-3IQZYNW6.mjs → chunk-VVFKFHWE.mjs} +1 -1
- package/dist/{chunk-PFQQ3LCQ.mjs → chunk-VWFFCDOL.mjs} +5 -5
- package/dist/{chunk-IGUTV3MX.mjs → chunk-WCJJCBR4.mjs} +5 -5
- package/dist/{chunk-TDUBQ546.mjs → chunk-WXVTQ6NO.mjs} +1 -1
- package/dist/chunk-ZXZ26WSO.mjs +14 -0
- package/dist/client.d.ts +3 -3
- package/dist/{config-DWxtDsJ6.d.ts → config-BZ_e3X8w.d.ts} +6 -3
- package/dist/{direct-executor-5NX2ZIAG.mjs → direct-executor-BPBD2PBK.mjs} +8 -7
- package/dist/distribution/coordinator/etcd.d.ts +1 -1
- package/dist/distribution/coordinator/in-memory.d.ts +1 -1
- package/dist/distribution.d.ts +4 -4
- package/dist/distribution.mjs +92 -169
- package/dist/{durability-wiring-LD4GWPWD.mjs → durability-wiring-AZL4EFLO.mjs} +19 -18
- package/dist/{index-Bkdt8nDw.d.ts → index-Cl5qQauj.d.ts} +6 -1
- package/dist/index.browser.mjs +2 -2
- package/dist/index.mjs +12 -11
- package/dist/{module-QFWZ5OBF.mjs → module-6EY7GW2W.mjs} +23 -19
- package/dist/partial-words.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.mjs +15 -14
- package/dist/{restore-queue-7QIKM6PY.mjs → restore-queue-DDXFDP7U.mjs} +1 -1
- package/dist/server.d.ts +4 -4
- package/dist/server.mjs +25 -12
- package/dist/{snapshot-JYTT36WI.mjs → snapshot-IDAM65JO.mjs} +21 -20
- package/dist/{thread-AHLISTRZ.mjs → thread-LMSYLCPI.mjs} +12 -10
- package/dist/vector/search-worker.d.ts +2 -0
- package/dist/vector/search-worker.mjs +4 -4
- package/dist/workers/entry.mjs +6 -5
- package/dist/{write-GPFM2EIX.mjs → write-3LIFIGOL.mjs} +14 -13
- package/package.json +7 -7
- package/dist/chunk-B7BSQZ27.mjs +0 -206
|
@@ -1,38 +1,38 @@
|
|
|
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-
|
|
4
|
-
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-
|
|
1
|
+
import { deserializePayloadV2, documentsOfPayloadV2 } from './chunk-DNKM67DF.mjs';
|
|
2
|
+
import { closePartitionWriter, drainIndexStateForUnload, listPersistedIndexes, loadMetadata, snapshotCheckpointFor, replayWal } from './chunk-UM6Z7AIP.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-QA6F5MML.mjs';
|
|
4
|
+
import { decodeVectorIndexParts, VECTOR_FILE_MAX_VECTORS, deadBytesFor, countDead, decodeVectorFilePayload, decodeVectorGraphPayload, graphPartsOfEarlierPayload } from './chunk-VHPVBJOI.mjs';
|
|
5
5
|
import './chunk-37CD3OKS.mjs';
|
|
6
|
-
import { createDurableDirectory } from './chunk-
|
|
6
|
+
import { createDurableDirectory } from './chunk-IA3H54X4.mjs';
|
|
7
7
|
import { spawnNodeWorker } from './chunk-C7SLA6CM.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-WCJJCBR4.mjs';
|
|
10
|
+
import './chunk-IZLM2OOO.mjs';
|
|
11
11
|
import './chunk-P36MUFEJ.mjs';
|
|
12
12
|
import './chunk-RPIE4QCL.mjs';
|
|
13
|
-
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
13
|
+
import { openChecksummedEnvelope, HEADER_SIZE } from './chunk-CKNOGER5.mjs';
|
|
14
|
+
import './chunk-NRARRUKN.mjs';
|
|
15
|
+
import './chunk-3BRFOMGX.mjs';
|
|
16
16
|
import { resolveWorkerEntry } from './chunk-CYHQNM3T.mjs';
|
|
17
17
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
18
|
-
import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-
|
|
19
|
-
import { fnv1a } from './chunk-
|
|
18
|
+
import { buildSegmentPayload, resolvePartitionInsertOptions, freezeSegmentShared, createSharedFrozenSegment } from './chunk-7IBX2LRA.mjs';
|
|
19
|
+
import { fnv1a } from './chunk-FEOLYA2Y.mjs';
|
|
20
20
|
import './chunk-QALAFGF5.mjs';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-5FPMDU54.mjs';
|
|
22
22
|
import './chunk-HJSN7UYG.mjs';
|
|
23
23
|
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-LXWDQLTW.mjs';
|
|
24
24
|
import './chunk-TGP5M5R7.mjs';
|
|
25
25
|
import './chunk-U2BKYEC7.mjs';
|
|
26
26
|
import './chunk-KOKM4PQN.mjs';
|
|
27
27
|
import './chunk-QSK35UC2.mjs';
|
|
28
|
-
import './chunk-
|
|
28
|
+
import './chunk-BRIOLMIX.mjs';
|
|
29
29
|
import './chunk-2MNJ2HX7.mjs';
|
|
30
30
|
import './chunk-WQBCBKY3.mjs';
|
|
31
|
-
import './chunk-
|
|
32
|
-
import { encodeDocument, requireValidFieldTypes } from './chunk-
|
|
31
|
+
import './chunk-WXVTQ6NO.mjs';
|
|
32
|
+
import { encodeDocument, requireValidFieldTypes } from './chunk-VVFKFHWE.mjs';
|
|
33
33
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
34
34
|
import './chunk-E74YLAIG.mjs';
|
|
35
|
-
import { MIN_M } from './chunk-
|
|
35
|
+
import { MIN_M } from './chunk-VJS4JFBQ.mjs';
|
|
36
36
|
import './chunk-GES7U2PM.mjs';
|
|
37
37
|
import './chunk-77SO7G55.mjs';
|
|
38
38
|
import './chunk-RI5VNFAI.mjs';
|
|
@@ -42,7 +42,8 @@ import './chunk-AEF2O7B4.mjs';
|
|
|
42
42
|
import './chunk-R6A773WK.mjs';
|
|
43
43
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
44
44
|
import './chunk-CQUMNIIG.mjs';
|
|
45
|
-
import './chunk-
|
|
45
|
+
import './chunk-IA6I5U36.mjs';
|
|
46
|
+
import './chunk-ZXZ26WSO.mjs';
|
|
46
47
|
import './chunk-RFBLQLLZ.mjs';
|
|
47
48
|
import './chunk-L5ORED7V.mjs';
|
|
48
49
|
import { NarsilError, ErrorCodes } from './chunk-6JUOMMHQ.mjs';
|
|
@@ -33,7 +33,12 @@ interface NodeCapacity {
|
|
|
33
33
|
interface NodeMemoryReport {
|
|
34
34
|
/** The whole process holds this many bytes of resident memory, including vectors and segments kept outside the heap. */
|
|
35
35
|
processBytes: number;
|
|
36
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* The process may hold this many bytes. Where a container sets a memory limit, this figure is that limit. Without one,
|
|
38
|
+
* a node on Linux reports its own resident memory plus the memory that the host reports as available, up to the
|
|
39
|
+
* host's total memory, so the figure falls whenever other processes on the host take memory. A node on any other
|
|
40
|
+
* system reports the host's total memory.
|
|
41
|
+
*/
|
|
37
42
|
processLimitBytes: number;
|
|
38
43
|
/**
|
|
39
44
|
* The main thread's old generation uses this many bytes. The old generation is the V8 heap without the young
|
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-
|
|
2
|
-
export { isSimdAvailable } 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-WZUSMF7A.mjs';
|
|
2
|
+
export { isSimdAvailable } from './browser/chunk-JJKVYLL3.mjs';
|
|
3
3
|
import './browser/chunk-JPTQZWJQ.mjs';
|
|
4
4
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './browser/chunk-J3QB4LBD.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export { VERSION, createNarsil } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { VERSION, createNarsil } from './chunk-CKNOGER5.mjs';
|
|
2
|
+
import './chunk-NRARRUKN.mjs';
|
|
3
|
+
import './chunk-3BRFOMGX.mjs';
|
|
4
4
|
import './chunk-CYHQNM3T.mjs';
|
|
5
5
|
import './chunk-AV4IJKD2.mjs';
|
|
6
|
-
export { registerSynonyms } from './chunk-
|
|
7
|
-
export { registerPartialWordSearch, registerPatternSearch } from './chunk-
|
|
6
|
+
export { registerSynonyms } from './chunk-7IBX2LRA.mjs';
|
|
7
|
+
export { registerPartialWordSearch, registerPatternSearch } from './chunk-FEOLYA2Y.mjs';
|
|
8
8
|
export { getLanguage, registerLanguage } from './chunk-QALAFGF5.mjs';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-5FPMDU54.mjs';
|
|
10
10
|
import './chunk-HJSN7UYG.mjs';
|
|
11
11
|
import './chunk-LXWDQLTW.mjs';
|
|
12
12
|
import './chunk-TGP5M5R7.mjs';
|
|
13
13
|
import './chunk-U2BKYEC7.mjs';
|
|
14
14
|
export { isSimdAvailable } from './chunk-KOKM4PQN.mjs';
|
|
15
15
|
import './chunk-QSK35UC2.mjs';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-BRIOLMIX.mjs';
|
|
17
17
|
import './chunk-2MNJ2HX7.mjs';
|
|
18
18
|
import './chunk-WQBCBKY3.mjs';
|
|
19
|
-
import './chunk-
|
|
20
|
-
import './chunk-
|
|
19
|
+
import './chunk-WXVTQ6NO.mjs';
|
|
20
|
+
import './chunk-VVFKFHWE.mjs';
|
|
21
21
|
import './chunk-U476IXKQ.mjs';
|
|
22
22
|
import './chunk-E74YLAIG.mjs';
|
|
23
|
-
import './chunk-
|
|
23
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
24
24
|
import './chunk-GES7U2PM.mjs';
|
|
25
25
|
import './chunk-77SO7G55.mjs';
|
|
26
26
|
export { getStopWords, getTokenizer, hasStopWords, hasTokenizer, registerStopWords, registerTokenizer } from './chunk-RI5VNFAI.mjs';
|
|
@@ -30,7 +30,8 @@ export { clearNormalizationCache, configureNormalizationCache, getNormalizationC
|
|
|
30
30
|
import './chunk-R6A773WK.mjs';
|
|
31
31
|
import './chunk-YTJCGKM4.mjs';
|
|
32
32
|
import './chunk-CQUMNIIG.mjs';
|
|
33
|
-
import './chunk-
|
|
33
|
+
import './chunk-IA6I5U36.mjs';
|
|
34
|
+
import './chunk-ZXZ26WSO.mjs';
|
|
34
35
|
import './chunk-RFBLQLLZ.mjs';
|
|
35
36
|
import './chunk-L5ORED7V.mjs';
|
|
36
37
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-6JUOMMHQ.mjs';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, noBuildHistory, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, WORKER_COPY_MIN_VECTORS, allLiveDocIds, recalibrateFromStore, signatureOf, adoptGraph, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-
|
|
2
|
-
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-
|
|
3
|
-
import { createVectorStore } from './chunk-
|
|
4
|
-
export { openSharedVectorField } from './chunk-
|
|
5
|
-
import { osqBitsOf, createOsqQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, ordinalFilterValues, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, magnitude, nativeStoreScratchBytes, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy } from './chunk-
|
|
6
|
-
export { releaseLocksHeldBy } from './chunk-
|
|
1
|
+
import { VECTOR_WORKER_COPIES_ALLOWED, DEFAULT_PROMOTION_THRESHOLD, DEFAULT_FILTER_THRESHOLD, noBuildHistory, recordCheckpoint, planCheckpoint, deserialize, assignStorePartitions, liveSize, ordinalFilterForSubsets, handOverBuildTurns, threadsHoldCurrentLayout, filterForOptions, OSQ4_MIN_DIMENSION, emptyFieldBeforeRestore, ESTIMATED_MS_PER_TOMBSTONE, graphNeedsRebuild, ESTIMATED_MS_PER_VECTOR_REBUILD, releaseReplacedVectors, yieldBuildTurn, WORKER_COPY_MIN_VECTORS, allLiveDocIds, recalibrateFromStore, signatureOf, adoptGraph, BUILD_RETRY_MAX_DELAY_MS, BUILD_RETRY_FIRST_DELAY_MS, fieldHandlesOf, liveOrdinals, RECALIBRATION_CHUNK_VECTORS, BUILD_CHUNK_SIZE, DRIFT_CHECK_GROWTH_FACTOR, DISK_ADOPTION_YIELD_INTERVAL, adoptLoadedCalibration, RECALIBRATION_DRIFT_RATIO } from './chunk-HNAQNAFS.mjs';
|
|
2
|
+
import { isDead, NO_LIVE_VECTOR_AT_POSITION, bytesToVectors } from './chunk-VHPVBJOI.mjs';
|
|
3
|
+
import { createVectorStore } from './chunk-M5EZVXIM.mjs';
|
|
4
|
+
export { openSharedVectorField } from './chunk-M5EZVXIM.mjs';
|
|
5
|
+
import { osqBitsOf, createOsqQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, ordinalFilterValues, STORE_UNPLACED_COUNT, STORE_LIVE_COUNT, STORE_REMOVED_COUNT, createOrdinalFilter, addToOrdinalFilter, nativeScoresOf, toScore, ordinalFilterHas, magnitude, nativeStoreScratchBytes, toDistance, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes, createHNSWIndex, topLayerInParts, sharedMemoryAvailable, requireWholeNeighbourLists, shuffleInPlace, createCentroidSums, centroidOfCentroidSums, meanOfCentroidSums, countOfCentroidSums, squaredLengthsOfCentroidSums, releaseLocksHeldBy } from './chunk-G6YATIRT.mjs';
|
|
6
|
+
export { releaseLocksHeldBy } from './chunk-G6YATIRT.mjs';
|
|
7
7
|
import { noteFallback } from './chunk-DJHHF2L5.mjs';
|
|
8
8
|
import './chunk-37CD3OKS.mjs';
|
|
9
9
|
import { spawnNodeWorker } from './chunk-C7SLA6CM.mjs';
|
|
@@ -12,10 +12,10 @@ import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
|
12
12
|
import './chunk-LXWDQLTW.mjs';
|
|
13
13
|
import './chunk-KOKM4PQN.mjs';
|
|
14
14
|
import { MAX_RENUMBERED_SEARCH_ATTEMPTS, DISK_STORAGE_BLOCK_BYTES, UNPLACED_FLAG_CHUNK_ORDINALS, GRAPH_BUILD_CHUNKS_IN_FLIGHT_PER_WORKER, GRAPH_BUILD_DISPATCH_CHUNK, VECTOR_SEARCH_TIMEOUT_MS, VECTOR_SEARCH_LOAD_TIMEOUT_MS, VECTOR_SCRATCH_SLOTS, VECTOR_INSERT_TIMEOUT_MS } from './chunk-QSK35UC2.mjs';
|
|
15
|
-
import './chunk-
|
|
15
|
+
import './chunk-BRIOLMIX.mjs';
|
|
16
16
|
import './chunk-U476IXKQ.mjs';
|
|
17
17
|
import './chunk-E74YLAIG.mjs';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
19
19
|
import './chunk-R6A773WK.mjs';
|
|
20
20
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
21
21
|
import { noteThreadSlotLive, noteThreadSlotGone } from './chunk-RFBLQLLZ.mjs';
|
|
@@ -699,16 +699,20 @@ function nextHandle(state) {
|
|
|
699
699
|
return `${state.indexName}/${state.fieldName}#${handleCounter}`;
|
|
700
700
|
}
|
|
701
701
|
async function dropHandle(state, handle) {
|
|
702
|
-
const host = state.workerCopies.host;
|
|
703
|
-
if (host !== void 0) {
|
|
704
|
-
await host.drop(state.indexName, state.fieldName, handle).catch(() => void 0);
|
|
705
|
-
return;
|
|
706
|
-
}
|
|
707
702
|
const pool = state.workerCopyPool;
|
|
708
703
|
if (pool !== null) {
|
|
709
704
|
await pool.drop(handle).catch(() => void 0);
|
|
710
|
-
|
|
705
|
+
return;
|
|
711
706
|
}
|
|
707
|
+
const host = state.workerCopies.host;
|
|
708
|
+
if (host !== void 0) await host.drop(state.indexName, state.fieldName, handle).catch(() => void 0);
|
|
709
|
+
}
|
|
710
|
+
function letGoOfUnusedPool(state) {
|
|
711
|
+
if (state.workerCopyPool === null || state.sharedHandles.size > 0 || state.workerCopyHandle !== null) {
|
|
712
|
+
return Promise.resolve();
|
|
713
|
+
}
|
|
714
|
+
state.workerCopyPool = null;
|
|
715
|
+
return releaseVectorSearchPool().catch(() => void 0);
|
|
712
716
|
}
|
|
713
717
|
function dropSharedGraph(state, graph) {
|
|
714
718
|
const shared = state.sharedHandles.get(graph);
|
|
@@ -731,9 +735,7 @@ function invalidateWorkerCopies(state) {
|
|
|
731
735
|
state.workerCopyMode = null;
|
|
732
736
|
void dropHandle(state, handle);
|
|
733
737
|
}
|
|
734
|
-
|
|
735
|
-
state.workerCopyPool = null;
|
|
736
|
-
}
|
|
738
|
+
void letGoOfUnusedPool(state);
|
|
737
739
|
}
|
|
738
740
|
async function withdrawWorkerCopies(state) {
|
|
739
741
|
state.revision += 1;
|
|
@@ -745,7 +747,7 @@ async function withdrawWorkerCopies(state) {
|
|
|
745
747
|
state.workerCopyRevision = -1;
|
|
746
748
|
state.workerCopyMode = null;
|
|
747
749
|
await Promise.all([...handles].map((handle) => dropHandle(state, handle)));
|
|
748
|
-
|
|
750
|
+
await letGoOfUnusedPool(state);
|
|
749
751
|
}
|
|
750
752
|
async function holdWorkerCopies(state) {
|
|
751
753
|
state.workerCopiesHeld = true;
|
|
@@ -1449,12 +1451,14 @@ function bufferEveryVectorOutsideTheGraph(state) {
|
|
|
1449
1451
|
}
|
|
1450
1452
|
function insertNodesOfLaterGraph(state, graph, later, ordinals) {
|
|
1451
1453
|
for (const part of later.parts) requireWholeNeighbourLists(part);
|
|
1454
|
+
let placed = 0;
|
|
1452
1455
|
for (let number = 0; number < ordinals.length; number++) {
|
|
1453
1456
|
const ordinal = ordinals[number];
|
|
1454
1457
|
if (ordinal === NO_LIVE_VECTOR_AT_POSITION || topLayerInParts(later, number) < 0) continue;
|
|
1455
1458
|
const docId = state.store.docIdForOrdinal(ordinal);
|
|
1456
|
-
if (docId !== void 0 && !graph.has(docId)
|
|
1459
|
+
if (docId !== void 0 && !graph.has(docId) && graph.insertOrdinal(ordinal)) placed += 1;
|
|
1457
1460
|
}
|
|
1461
|
+
if (placed > 0) graph.connectUnreached();
|
|
1458
1462
|
}
|
|
1459
1463
|
function restoreGraph(state, payload, ordinalOfNumber, tombstoned, calibrationLoaded) {
|
|
1460
1464
|
const first = payload?.graphs[0]?.parts[0];
|
package/dist/partial-words.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { partialWordSearchModule } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { partialWordSearchModule } from './chunk-WXVTQ6NO.mjs';
|
|
2
|
+
import './chunk-VVFKFHWE.mjs';
|
|
3
3
|
import './chunk-U476IXKQ.mjs';
|
|
4
4
|
import './chunk-E74YLAIG.mjs';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
6
6
|
import './chunk-GES7U2PM.mjs';
|
|
7
7
|
import './chunk-77SO7G55.mjs';
|
|
8
8
|
import './chunk-AEF2O7B4.mjs';
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { createDurableDirectory } from '../../chunk-
|
|
1
|
+
import { createDurableDirectory } from '../../chunk-IA3H54X4.mjs';
|
|
2
2
|
import '../../chunk-C7SLA6CM.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-WCJJCBR4.mjs';
|
|
5
|
+
import '../../chunk-IZLM2OOO.mjs';
|
|
6
6
|
import '../../chunk-P36MUFEJ.mjs';
|
|
7
7
|
import '../../chunk-RPIE4QCL.mjs';
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
8
|
+
import '../../chunk-CKNOGER5.mjs';
|
|
9
|
+
import '../../chunk-NRARRUKN.mjs';
|
|
10
|
+
import '../../chunk-3BRFOMGX.mjs';
|
|
11
11
|
import '../../chunk-CYHQNM3T.mjs';
|
|
12
12
|
import '../../chunk-AV4IJKD2.mjs';
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-7IBX2LRA.mjs';
|
|
14
|
+
import '../../chunk-FEOLYA2Y.mjs';
|
|
15
15
|
import '../../chunk-QALAFGF5.mjs';
|
|
16
|
-
import '../../chunk-
|
|
16
|
+
import '../../chunk-5FPMDU54.mjs';
|
|
17
17
|
import '../../chunk-HJSN7UYG.mjs';
|
|
18
18
|
import '../../chunk-LXWDQLTW.mjs';
|
|
19
19
|
import '../../chunk-TGP5M5R7.mjs';
|
|
20
20
|
import '../../chunk-U2BKYEC7.mjs';
|
|
21
21
|
import '../../chunk-KOKM4PQN.mjs';
|
|
22
22
|
import '../../chunk-QSK35UC2.mjs';
|
|
23
|
-
import '../../chunk-
|
|
23
|
+
import '../../chunk-BRIOLMIX.mjs';
|
|
24
24
|
import '../../chunk-2MNJ2HX7.mjs';
|
|
25
25
|
import '../../chunk-WQBCBKY3.mjs';
|
|
26
|
-
import '../../chunk-
|
|
27
|
-
import '../../chunk-
|
|
26
|
+
import '../../chunk-WXVTQ6NO.mjs';
|
|
27
|
+
import '../../chunk-VVFKFHWE.mjs';
|
|
28
28
|
import '../../chunk-U476IXKQ.mjs';
|
|
29
29
|
import '../../chunk-E74YLAIG.mjs';
|
|
30
|
-
import '../../chunk-
|
|
30
|
+
import '../../chunk-VJS4JFBQ.mjs';
|
|
31
31
|
import '../../chunk-GES7U2PM.mjs';
|
|
32
32
|
import '../../chunk-77SO7G55.mjs';
|
|
33
33
|
import '../../chunk-RI5VNFAI.mjs';
|
|
@@ -37,7 +37,8 @@ import '../../chunk-AEF2O7B4.mjs';
|
|
|
37
37
|
import '../../chunk-R6A773WK.mjs';
|
|
38
38
|
import '../../chunk-YTJCGKM4.mjs';
|
|
39
39
|
import '../../chunk-CQUMNIIG.mjs';
|
|
40
|
-
import '../../chunk-
|
|
40
|
+
import '../../chunk-IA6I5U36.mjs';
|
|
41
|
+
import '../../chunk-ZXZ26WSO.mjs';
|
|
41
42
|
import '../../chunk-RFBLQLLZ.mjs';
|
|
42
43
|
import '../../chunk-L5ORED7V.mjs';
|
|
43
44
|
import '../../chunk-6JUOMMHQ.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-IDAM65JO.mjs');
|
|
22
22
|
await restoreFromSnapshot(indexName, data, restoreDepsOf(core, host));
|
|
23
23
|
});
|
|
24
24
|
const settled = restored.then(
|
package/dist/server.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, N as NarsilError, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './events-C7_dboUr.js';
|
|
2
|
-
import { c as ServerOptions, N as NarsilServer } from './capabilities-
|
|
3
|
-
export { A as ASYNC_IMPORT_CAPABILITY, C as CorsOptions, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, O as OnRequestHook, R as REBUILD_ANALYSIS_CAPABILITY, d as RequestContext, e as RequestDenial, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, f as ServerLimits, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-
|
|
2
|
+
import { c as ServerOptions, N as NarsilServer } from './capabilities-ByKPha_q.js';
|
|
3
|
+
export { A as ASYNC_IMPORT_CAPABILITY, C as CorsOptions, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, O as OnRequestHook, R as REBUILD_ANALYSIS_CAPABILITY, d as RequestContext, e as RequestDenial, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, f as ServerLimits, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-ByKPha_q.js';
|
|
4
4
|
import { N as Narsil } from './engine-D_SYDsId.js';
|
|
5
5
|
import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-BhjQZ8Qf.js';
|
|
6
6
|
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, i as CreateIndexRequest, H as HttpIndexConfig, I as ImportError, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, f as TaskStatus, g as TaskType } from './tasks-BhjQZ8Qf.js';
|
|
7
7
|
import './schema-4W_7tk1f.js';
|
|
8
8
|
import './adapters-BQFQ4PRz.js';
|
|
9
9
|
import './synonyms-CpOAHPa-.js';
|
|
10
|
-
import './config-
|
|
10
|
+
import './config-BZ_e3X8w.js';
|
|
11
11
|
import './config-DL_bDDD8.js';
|
|
12
|
-
import './index-
|
|
12
|
+
import './index-Cl5qQauj.js';
|
|
13
13
|
import './types-DvncmvuQ.js';
|
|
14
14
|
|
|
15
15
|
/**
|
package/dist/server.mjs
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createBodyBudgetBuffer, createRouteRunner, corsHeaderReader, createSharedBodyBudget, MAIN_THREAD_GATE_SLOT, createSharedRequestGate, registerServerRoutes, DEFAULT_MAX_CONCURRENT_TASKS, DEFAULT_MAX_TASK_PAGE_SIZE, DEFAULT_MAX_IMPORT_ERRORS, DEFAULT_MAX_FETCH_DOCUMENTS, DEFAULT_MAX_RESULT_WINDOW, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_IMPORT_BATCH_SIZE, DEFAULT_MAX_LINE_BYTES, DEFAULT_MAX_RESTORE_BYTES, DEFAULT_MAX_IMPORT_BYTES, DEFAULT_MAX_BODY_BYTES, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_MAX_BODY_BYTES_IN_FLIGHT_FRACTION, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, MAX_BODY_BYTES_IN_FLIGHT_FRACTION, createDocumentReadHandlers, sendError, respondError, respondJson, sendText, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, clearGateSlot, clearBodyBudgetSlot, createDepartureWord, departureConfirmed, parseJson, validateCreateIndex, rejectInvalid, validateBatch, serializeBatchResult, parseWriteJson, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, withServerRerankWindow, parseTaskListQuery, parseJsonOptional, validateRebalance, badRequest, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, parseRefusalOf, IMPORT_FLUSHES_IN_FLIGHT, confirmDeparture, closingQuoteOf, SERVER_CAPABILITIES, toHttpError, RELAY_STREAM_CHUNKS_IN_FLIGHT, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-
|
|
2
|
-
export { ASYNC_IMPORT_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-
|
|
1
|
+
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createBodyBudgetBuffer, createRouteRunner, corsHeaderReader, createSharedBodyBudget, MAIN_THREAD_GATE_SLOT, createSharedRequestGate, registerServerRoutes, DEFAULT_MAX_CONCURRENT_TASKS, DEFAULT_MAX_TASK_PAGE_SIZE, DEFAULT_MAX_IMPORT_ERRORS, DEFAULT_MAX_FETCH_DOCUMENTS, DEFAULT_MAX_RESULT_WINDOW, DEFAULT_MAX_CONCURRENT_REQUESTS, DEFAULT_IMPORT_BATCH_SIZE, DEFAULT_MAX_LINE_BYTES, DEFAULT_MAX_RESTORE_BYTES, DEFAULT_MAX_IMPORT_BYTES, DEFAULT_MAX_BODY_BYTES, DEFAULT_MAX_RERANK_WINDOW, DEFAULT_MAX_BODY_BYTES_IN_FLIGHT_FRACTION, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, MAX_BODY_BYTES_IN_FLIGHT_FRACTION, createDocumentReadHandlers, sendError, respondError, respondJson, sendText, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, closeEveryThreadAtExit, REQUEST_THREAD_CLOSE_AT_EXIT_MS, clearGateSlot, clearBodyBudgetSlot, createCloseAtExitWords, createDepartureWord, departureConfirmed, parseJson, validateCreateIndex, rejectInvalid, validateBatch, serializeBatchResult, parseWriteJson, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, withServerRerankWindow, respondAnswer, parseTaskListQuery, parseJsonOptional, validateRebalance, badRequest, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, parseRefusalOf, IMPORT_FLUSHES_IN_FLIGHT, confirmDeparture, closingQuoteOf, SERVER_CAPABILITIES, toHttpError, RELAY_STREAM_CHUNKS_IN_FLIGHT, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-KOCHOOS5.mjs';
|
|
2
|
+
export { ASYNC_IMPORT_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, SYNONYMS_CAPABILITY, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-KOCHOOS5.mjs';
|
|
3
3
|
import { rerankOnHost } from './chunk-JSSGO4B5.mjs';
|
|
4
|
-
import { writeBlockLookupOf, indexReadsOf, isRecord, validateIndexName } from './chunk-
|
|
5
|
-
import { readMemoryFigures } from './chunk-
|
|
4
|
+
import { writeBlockLookupOf, indexReadsOf, isRecord, validateIndexName } from './chunk-OKZPYJZX.mjs';
|
|
5
|
+
import { readMemoryFigures } from './chunk-HAQUJYMN.mjs';
|
|
6
6
|
import './chunk-DJHHF2L5.mjs';
|
|
7
7
|
import './chunk-P36MUFEJ.mjs';
|
|
8
|
-
import { rerankWindowCapOf, engineCoreOf, providedDocId, resolveVectorText } from './chunk-
|
|
8
|
+
import { rerankWindowCapOf, engineCoreOf, providedDocId, resolveVectorText } from './chunk-3BRFOMGX.mjs';
|
|
9
9
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
10
10
|
import './chunk-QALAFGF5.mjs';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-5FPMDU54.mjs';
|
|
12
12
|
import { MAX_RERANK_WINDOW } from './chunk-HJSN7UYG.mjs';
|
|
13
13
|
import './chunk-LXWDQLTW.mjs';
|
|
14
14
|
import './chunk-TGP5M5R7.mjs';
|
|
15
15
|
import './chunk-U2BKYEC7.mjs';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-BRIOLMIX.mjs';
|
|
17
17
|
import './chunk-WQBCBKY3.mjs';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-VVFKFHWE.mjs';
|
|
19
19
|
import './chunk-U476IXKQ.mjs';
|
|
20
20
|
import './chunk-E74YLAIG.mjs';
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
22
22
|
import './chunk-77SO7G55.mjs';
|
|
23
23
|
import './chunk-7X5JST5L.mjs';
|
|
24
24
|
import './chunk-R6A773WK.mjs';
|
|
25
25
|
import './chunk-YTJCGKM4.mjs';
|
|
26
|
-
import { startIdleHeapCleanup } from './chunk-
|
|
26
|
+
import { startIdleHeapCleanup } from './chunk-VVDQNCOG.mjs';
|
|
27
|
+
import './chunk-ZXZ26WSO.mjs';
|
|
27
28
|
import './chunk-L5ORED7V.mjs';
|
|
28
29
|
import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-6JUOMMHQ.mjs';
|
|
29
30
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-6JUOMMHQ.mjs';
|
|
@@ -1022,7 +1023,8 @@ function createSearchHandlers(deps) {
|
|
|
1022
1023
|
}
|
|
1023
1024
|
if (refuseRegex(ctx, params.filters, allowRegex)) return;
|
|
1024
1025
|
try {
|
|
1025
|
-
|
|
1026
|
+
const result = await engine.query(ctx.params[0], withServerRerankWindow(params, limits));
|
|
1027
|
+
await respondAnswer(ctx, result, "hits", `a search on index '${ctx.params[0]}'`);
|
|
1026
1028
|
} catch (err) {
|
|
1027
1029
|
respondError(ctx, err);
|
|
1028
1030
|
}
|
|
@@ -1398,8 +1400,13 @@ async function startRequestThreads(options) {
|
|
|
1398
1400
|
const searchHooks = core.pluginRegistry.hasHooks("beforeSearch") || core.pluginRegistry.hasHooks("afterSearch");
|
|
1399
1401
|
const touchIntervalMs = touchIntervalFor(core.orchestrator.copyIdleTimeoutMs());
|
|
1400
1402
|
const threads = /* @__PURE__ */ new Map();
|
|
1403
|
+
const closeAtExit = /* @__PURE__ */ new Set();
|
|
1401
1404
|
let stopped = false;
|
|
1405
|
+
function closeThreadsAtExit() {
|
|
1406
|
+
closeEveryThreadAtExit(closeAtExit, REQUEST_THREAD_CLOSE_AT_EXIT_MS);
|
|
1407
|
+
}
|
|
1402
1408
|
function releaseDescriptor(thread) {
|
|
1409
|
+
closeAtExit.delete(thread.closeAtExit);
|
|
1403
1410
|
if (thread.descriptor !== null) {
|
|
1404
1411
|
try {
|
|
1405
1412
|
acceptor.removeChildAppDescriptor(thread.descriptor);
|
|
@@ -1450,9 +1457,11 @@ async function startRequestThreads(options) {
|
|
|
1450
1457
|
descriptor: null,
|
|
1451
1458
|
port: channel.port2,
|
|
1452
1459
|
executor,
|
|
1453
|
-
departure: createDepartureWord()
|
|
1460
|
+
departure: createDepartureWord(),
|
|
1461
|
+
closeAtExit: createCloseAtExitWords()
|
|
1454
1462
|
};
|
|
1455
1463
|
relayFrom(thread);
|
|
1464
|
+
closeAtExit.add(thread.closeAtExit);
|
|
1456
1465
|
let result;
|
|
1457
1466
|
try {
|
|
1458
1467
|
result = await executor.execute(
|
|
@@ -1462,6 +1471,7 @@ async function startRequestThreads(options) {
|
|
|
1462
1471
|
settings: {
|
|
1463
1472
|
port: channel.port1,
|
|
1464
1473
|
departure: thread.departure.buffer,
|
|
1474
|
+
closeAtExit: thread.closeAtExit.buffer,
|
|
1465
1475
|
gate: options.gate,
|
|
1466
1476
|
gateSlot: gateSlotOfWorker(workerId),
|
|
1467
1477
|
maxConcurrentRequests: options.limits.maxConcurrentRequests,
|
|
@@ -1480,6 +1490,7 @@ async function startRequestThreads(options) {
|
|
|
1480
1490
|
[channel.port1]
|
|
1481
1491
|
);
|
|
1482
1492
|
} catch (err) {
|
|
1493
|
+
closeAtExit.delete(thread.closeAtExit);
|
|
1483
1494
|
channel.port2.close();
|
|
1484
1495
|
console.warn(`Worker ${workerId} could not start taking requests:`, err);
|
|
1485
1496
|
return;
|
|
@@ -1502,6 +1513,7 @@ async function startRequestThreads(options) {
|
|
|
1502
1513
|
clearBodyBudgetSlot(options.bodyBudget, gateSlotOfWorker(workerId));
|
|
1503
1514
|
}
|
|
1504
1515
|
};
|
|
1516
|
+
process.on("exit", closeThreadsAtExit);
|
|
1505
1517
|
await core.orchestrator.serveRequestsOnWorkers(listener);
|
|
1506
1518
|
return {
|
|
1507
1519
|
get threadCount() {
|
|
@@ -1509,6 +1521,7 @@ async function startRequestThreads(options) {
|
|
|
1509
1521
|
},
|
|
1510
1522
|
async stop() {
|
|
1511
1523
|
stopped = true;
|
|
1524
|
+
process.off("exit", closeThreadsAtExit);
|
|
1512
1525
|
core.orchestrator.stopRequestThreads();
|
|
1513
1526
|
const stopping = [...threads.entries()].map(([workerId, thread]) => {
|
|
1514
1527
|
threads.delete(workerId);
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-
|
|
5
|
-
import { decodeVectorIndexParts, bytesToVectors } from './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { documentsOfPayloadV2 } from './chunk-DNKM67DF.mjs';
|
|
2
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-VWFFCDOL.mjs';
|
|
3
|
+
import './chunk-HNAQNAFS.mjs';
|
|
4
|
+
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-QA6F5MML.mjs';
|
|
5
|
+
import { decodeVectorIndexParts, bytesToVectors } from './chunk-VHPVBJOI.mjs';
|
|
6
|
+
import './chunk-G6YATIRT.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-WCJJCBR4.mjs';
|
|
10
|
+
import './chunk-IZLM2OOO.mjs';
|
|
11
11
|
import './chunk-P36MUFEJ.mjs';
|
|
12
12
|
import './chunk-RPIE4QCL.mjs';
|
|
13
|
-
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, decodeIndexConfiguration, prepareStoredSynonyms, insertDocumentVectors } from './chunk-
|
|
14
|
-
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-
|
|
15
|
-
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-
|
|
13
|
+
import { encodeIndexConfiguration, createByteReader, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, decodeIndexConfiguration, prepareStoredSynonyms, insertDocumentVectors } from './chunk-CKNOGER5.mjs';
|
|
14
|
+
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-NRARRUKN.mjs';
|
|
15
|
+
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-3BRFOMGX.mjs';
|
|
16
16
|
import './chunk-CYHQNM3T.mjs';
|
|
17
17
|
import './chunk-AV4IJKD2.mjs';
|
|
18
|
-
import {
|
|
19
|
-
import './chunk-
|
|
18
|
+
import { decodeEveryStoredDocument } from './chunk-7IBX2LRA.mjs';
|
|
19
|
+
import './chunk-FEOLYA2Y.mjs';
|
|
20
20
|
import { getLanguage } from './chunk-QALAFGF5.mjs';
|
|
21
|
-
import { readHeapStatistics } from './chunk-
|
|
21
|
+
import { readHeapStatistics, readResidentMemory } from './chunk-5FPMDU54.mjs';
|
|
22
22
|
import './chunk-HJSN7UYG.mjs';
|
|
23
23
|
import './chunk-LXWDQLTW.mjs';
|
|
24
24
|
import './chunk-TGP5M5R7.mjs';
|
|
25
25
|
import './chunk-U2BKYEC7.mjs';
|
|
26
26
|
import './chunk-KOKM4PQN.mjs';
|
|
27
27
|
import './chunk-QSK35UC2.mjs';
|
|
28
|
-
import './chunk-
|
|
28
|
+
import './chunk-BRIOLMIX.mjs';
|
|
29
29
|
import './chunk-2MNJ2HX7.mjs';
|
|
30
30
|
import './chunk-WQBCBKY3.mjs';
|
|
31
|
-
import { parseVectorDimension } from './chunk-
|
|
32
|
-
import { raiseEarlierReleaseGraphSetting, validateSchema, validateVectorPromotion, validateVectorStorage, extractVectorFieldsFromSchema, flattenSchema } from './chunk-
|
|
31
|
+
import { parseVectorDimension } from './chunk-WXVTQ6NO.mjs';
|
|
32
|
+
import { raiseEarlierReleaseGraphSetting, validateSchema, validateVectorPromotion, validateVectorStorage, extractVectorFieldsFromSchema, flattenSchema } from './chunk-VVFKFHWE.mjs';
|
|
33
33
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
34
34
|
import './chunk-E74YLAIG.mjs';
|
|
35
|
-
import './chunk-
|
|
35
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
36
36
|
import './chunk-GES7U2PM.mjs';
|
|
37
37
|
import './chunk-77SO7G55.mjs';
|
|
38
38
|
import { resolveIndexAnalysis } from './chunk-RI5VNFAI.mjs';
|
|
@@ -41,9 +41,10 @@ import './chunk-7X5JST5L.mjs';
|
|
|
41
41
|
import './chunk-AEF2O7B4.mjs';
|
|
42
42
|
import './chunk-R6A773WK.mjs';
|
|
43
43
|
import './chunk-YTJCGKM4.mjs';
|
|
44
|
-
import { collectAndReturnPages } from './chunk-
|
|
44
|
+
import { collectAndReturnPages } from './chunk-VVDQNCOG.mjs';
|
|
45
45
|
import './chunk-CQUMNIIG.mjs';
|
|
46
|
-
import { loadVectorCodeFor } from './chunk-
|
|
46
|
+
import { loadVectorCodeFor } from './chunk-IA6I5U36.mjs';
|
|
47
|
+
import './chunk-ZXZ26WSO.mjs';
|
|
47
48
|
import './chunk-RFBLQLLZ.mjs';
|
|
48
49
|
import './chunk-L5ORED7V.mjs';
|
|
49
50
|
import { NarsilError, ErrorCodes } from './chunk-6JUOMMHQ.mjs';
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedBodyBudget, createSharedRequestGate, registerServerRoutes, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, statusLine, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery, refuseRegex, withServerRerankWindow, awaitDepartureConfirmation, departureConfirmation, REQUEST_THREAD_DEPARTURE_DRAIN_MS, departureConfirmed, encodeJson } from './chunk-
|
|
1
|
+
import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedBodyBudget, createSharedRequestGate, registerServerRoutes, closeWhenTheProcessExits, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, statusLine, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery, refuseRegex, withServerRerankWindow, awaitDepartureConfirmation, departureConfirmation, REQUEST_THREAD_DEPARTURE_DRAIN_MS, departureConfirmed, encodeJson } from './chunk-KOCHOOS5.mjs';
|
|
2
2
|
import { withRerankQueryText } from './chunk-KZ3NX2P7.mjs';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-HAQUJYMN.mjs';
|
|
4
4
|
import './chunk-DJHHF2L5.mjs';
|
|
5
|
-
import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-
|
|
6
|
-
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-
|
|
7
|
-
import './chunk-
|
|
5
|
+
import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-NRARRUKN.mjs';
|
|
6
|
+
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-FEOLYA2Y.mjs';
|
|
7
|
+
import './chunk-5FPMDU54.mjs';
|
|
8
8
|
import './chunk-HJSN7UYG.mjs';
|
|
9
9
|
import './chunk-LXWDQLTW.mjs';
|
|
10
10
|
import './chunk-QSK35UC2.mjs';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-BRIOLMIX.mjs';
|
|
12
12
|
import './chunk-2MNJ2HX7.mjs';
|
|
13
13
|
import './chunk-WQBCBKY3.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import { extractVectorFieldsFromSchema } from './chunk-
|
|
14
|
+
import './chunk-WXVTQ6NO.mjs';
|
|
15
|
+
import { extractVectorFieldsFromSchema } from './chunk-VVFKFHWE.mjs';
|
|
16
16
|
import './chunk-U476IXKQ.mjs';
|
|
17
17
|
import './chunk-E74YLAIG.mjs';
|
|
18
|
-
import './chunk-
|
|
18
|
+
import './chunk-VJS4JFBQ.mjs';
|
|
19
19
|
import './chunk-GES7U2PM.mjs';
|
|
20
20
|
import './chunk-77SO7G55.mjs';
|
|
21
21
|
import './chunk-X5CV2E2B.mjs';
|
|
22
22
|
import './chunk-AEF2O7B4.mjs';
|
|
23
23
|
import './chunk-R6A773WK.mjs';
|
|
24
24
|
import './chunk-YTJCGKM4.mjs';
|
|
25
|
-
import './chunk-
|
|
25
|
+
import './chunk-VVDQNCOG.mjs';
|
|
26
|
+
import './chunk-ZXZ26WSO.mjs';
|
|
26
27
|
import './chunk-L5ORED7V.mjs';
|
|
27
28
|
import { ServerErrorCodes, ErrorCodes, NarsilError, isNarsilError } from './chunk-6JUOMMHQ.mjs';
|
|
28
29
|
|
|
@@ -683,6 +684,7 @@ async function serveRequests(executor, settings) {
|
|
|
683
684
|
const handlers = guardEveryRoute(threadHandlers(local, relay, settings), departure);
|
|
684
685
|
registerServerRoutes(app, run, handlers, settings.limits, settings.cors);
|
|
685
686
|
servingApp = { app: child, relay };
|
|
687
|
+
void closeWhenTheProcessExits(new Int32Array(settings.closeAtExit), closeRequestThread);
|
|
686
688
|
return { descriptor: child.getDescriptor() };
|
|
687
689
|
}
|
|
688
690
|
function closeRequestThread() {
|
|
@@ -253,6 +253,8 @@ interface SharedGraphHandles {
|
|
|
253
253
|
tombstones: GrowableBuffer;
|
|
254
254
|
/** This holds one word per ordinal, the number of base-layer lists that hold that ordinal. */
|
|
255
255
|
incoming: GrowableBuffer;
|
|
256
|
+
/** This holds one byte per ordinal, which reads 1 from the moment a node is placed or loses a base-layer connection until the next pass checks that its nearest neighbour links back to it. */
|
|
257
|
+
nearestLinkDue: GrowableBuffer;
|
|
256
258
|
/** This records the node lock and the graph lock each thread slot holds right now. */
|
|
257
259
|
heldLocks: Int32Array;
|
|
258
260
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { openSharedVectorField, createVectorStore } from '../chunk-
|
|
2
|
-
import { osqBitsOf, createHNSWIndex, createOsqQuantizer } from '../chunk-
|
|
1
|
+
import { openSharedVectorField, createVectorStore } from '../chunk-M5EZVXIM.mjs';
|
|
2
|
+
import { osqBitsOf, createHNSWIndex, createOsqQuantizer } from '../chunk-G6YATIRT.mjs';
|
|
3
3
|
import '../chunk-DJHHF2L5.mjs';
|
|
4
4
|
import { osqRecordBytes } from '../chunk-37CD3OKS.mjs';
|
|
5
5
|
import '../chunk-KOKM4PQN.mjs';
|
|
6
6
|
import { MAX_WORKER_COPIES } from '../chunk-QSK35UC2.mjs';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-BRIOLMIX.mjs';
|
|
8
|
+
import '../chunk-VJS4JFBQ.mjs';
|
|
9
9
|
import '../chunk-R6A773WK.mjs';
|
|
10
10
|
import '../chunk-YTJCGKM4.mjs';
|
|
11
11
|
import '../chunk-RFBLQLLZ.mjs';
|