@delali/narsil 0.3.1-next.91 → 0.3.1-next.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/browser/{chunk-66KYAOIK.mjs → chunk-3U636ADD.mjs} +2 -2
- package/dist/browser/{chunk-NOUZ6RH3.mjs → chunk-D3CC2NMZ.mjs} +238 -114
- package/dist/browser/{chunk-3ZRMZIH4.mjs → chunk-FYFQJKFW.mjs} +208 -78
- package/dist/browser/{chunk-FHFFWLEK.mjs → chunk-HARBSUWP.mjs} +3 -4
- package/dist/browser/{chunk-B6XE7KXY.mjs → chunk-LULHQXCK.mjs} +4 -4
- package/dist/browser/{chunk-NQW2YXEX.mjs → chunk-WKPJ4E73.mjs} +1 -1
- package/dist/browser/{durability-wiring-F4OGQUSU.mjs → durability-wiring-3ZRKSPJD.mjs} +498 -71
- package/dist/browser/{module-E25UDADM.mjs → module-IEOQI5GI.mjs} +102 -54
- package/dist/browser/release-76MXRPGV.mjs +33 -0
- package/dist/browser/replace-RURXTGVG.mjs +57 -0
- package/dist/browser/restore-queue-RBULSOVX.mjs +35 -0
- package/dist/browser/{snapshot-5EJ7I7QY.mjs → snapshot-Y3NGUJHX.mjs} +362 -103
- package/dist/browser/{write-K5V4XQ72.mjs → write-ZUBDNLCH.mjs} +4 -4
- package/dist/{capabilities-CvExBThq.d.ts → capabilities-BvxvFzVA.d.ts} +2 -2
- package/dist/{chunk-NVL4ZR3K.mjs → chunk-2GZGBOQI.mjs} +2 -2
- package/dist/{chunk-XLJ2S2BH.mjs → chunk-3LYY62M6.mjs} +40 -21
- package/dist/{chunk-CVQWQVFX.mjs → chunk-4ZJWRETC.mjs} +2 -2
- package/dist/{chunk-T4DB5YFB.mjs → chunk-54HYC5FT.mjs} +6 -6
- package/dist/{chunk-ZIJ63TBT.mjs → chunk-7KC56574.mjs} +1 -1
- package/dist/{chunk-67Z2V6TC.mjs → chunk-7QONURHW.mjs} +3 -3
- package/dist/{chunk-BVOJIYRV.mjs → chunk-BB7MASRQ.mjs} +1 -1
- package/dist/{chunk-6VZ3Q73N.mjs → chunk-CHOGQSHK.mjs} +44 -25
- package/dist/{chunk-QZN3MIJ3.mjs → chunk-ES33L3HO.mjs} +2 -2
- package/dist/{chunk-YCJLVNWR.mjs → chunk-F52QGNZ2.mjs} +1 -1
- package/dist/{chunk-43ORORN6.mjs → chunk-GJZHU4FC.mjs} +3 -3
- package/dist/{chunk-R7OSDAFK.mjs → chunk-HBVLF3HA.mjs} +1 -1
- package/dist/{chunk-ULRPNYAG.mjs → chunk-ICL2AELD.mjs} +120 -62
- package/dist/{chunk-3RDS4UHC.mjs → chunk-J7SDAOTP.mjs} +4 -4
- package/dist/{chunk-A4G7JSYO.mjs → chunk-JFUE6F2Y.mjs} +98 -49
- package/dist/chunk-KOKM4PQN.mjs +52 -0
- package/dist/{chunk-7OQHSDK6.mjs → chunk-L26LEDHO.mjs} +7 -7
- package/dist/{chunk-EONIHG3V.mjs → chunk-MASE2LTJ.mjs} +7 -7
- package/dist/{chunk-MXS5HWIH.mjs → chunk-MWT5WCJ5.mjs} +89 -17
- package/dist/{chunk-3TTYK5A7.mjs → chunk-Q4UTU5ZE.mjs} +9 -9
- package/dist/{chunk-T6CNO72J.mjs → chunk-QM3VPX4Z.mjs} +2 -2
- package/dist/chunk-QY7GC2MW.mjs +33 -0
- package/dist/{chunk-BJ2YKRNX.mjs → chunk-R36MIGBU.mjs} +86 -54
- package/dist/{chunk-RVM7AODE.mjs → chunk-RDJKYKMQ.mjs} +2 -2
- package/dist/{chunk-UXQE2ROB.mjs → chunk-RUIXODYU.mjs} +3 -2
- package/dist/{chunk-5ER245FI.mjs → chunk-SBCEHIPL.mjs} +3 -3
- package/dist/{chunk-TPJU7NDJ.mjs → chunk-SYWGORQB.mjs} +1 -0
- package/dist/{chunk-UKSUENHK.mjs → chunk-T2QN2FA4.mjs} +40 -26
- package/dist/{chunk-CO4MRKST.mjs → chunk-WLOF6HSP.mjs} +2 -2
- package/dist/{chunk-MKWUXWQH.mjs → chunk-ZHS44YKF.mjs} +1 -1
- package/dist/{client-Cc42b42j.d.ts → client-DKwterMb.d.ts} +2 -2
- package/dist/client.d.ts +6 -6
- package/dist/client.mjs +1 -0
- package/dist/{config-DyRowvVP.d.ts → config-6YBtxekG.d.ts} +1 -1
- package/dist/{config-BYne-yCI.d.ts → config-DPphZfuM.d.ts} +1 -1
- package/dist/direct-executor-5KJGVQHM.mjs +22 -0
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +5 -5
- package/dist/distribution.mjs +26 -26
- package/dist/{durability-wiring-6AN4QTT3.mjs → durability-wiring-FRPV6JLZ.mjs} +518 -91
- package/dist/embeddings/openai.mjs +1 -1
- package/dist/{engine-96_kLtSY.d.ts → engine-BGt9lI1V.d.ts} +11 -11
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +18 -18
- package/dist/{memory-dd3GESdc.d.ts → memory-COdoGthn.d.ts} +96 -76
- package/dist/{module-WIDYIJLY.mjs → module-IUTNXWMV.mjs} +72 -38
- package/dist/partial-words.mjs +5 -5
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.mjs +21 -21
- package/dist/react.d.ts +6 -6
- package/dist/react.mjs +1 -0
- package/dist/release-BH3DKW3T.mjs +33 -0
- package/dist/replace-CEO5KJJ3.mjs +57 -0
- package/dist/restore-queue-I5SI6AUQ.mjs +35 -0
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +10 -10
- package/dist/snapshot-YC6TS4OP.mjs +738 -0
- package/dist/synonyms.mjs +3 -3
- package/dist/{tasks-DA1Ff0G4.d.ts → tasks-BJmamiC4.d.ts} +1 -1
- package/dist/{thread-VTDLLYXC.mjs → thread-U7XYJWGG.mjs} +15 -12
- package/dist/vector/search-worker.mjs +6 -6
- package/dist/workers/entry.mjs +5 -5
- package/dist/{write-OJR3H4BI.mjs → write-M2OALSA4.mjs} +20 -20
- package/package.json +7 -7
- package/dist/chunk-Y2F66IQJ.mjs +0 -74
- package/dist/chunk-ZJ4CSAB2.mjs +0 -13
- package/dist/direct-executor-CHXVCBN7.mjs +0 -22
- package/dist/snapshot-JFZVOGZV.mjs +0 -479
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { openSharedQuantizer, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, BLOCK_MAX_BYTES, sharedVectorStoreBytes, STORE_SLOTS, STORE_LIVE_COUNT, IN_MEMORY,
|
|
2
|
-
import { MAX_VECTOR_ORDINALS } from './chunk-
|
|
3
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { openSharedQuantizer, STORE_ORDINAL_LAYOUT_GENERATION, searchOrdinals, insertNode, GRAPH_RETIRED, nodeCountOf, tombstoneCountOf, BLOCK_MAX_BYTES, sharedVectorStoreBytes, STORE_SLOTS, STORE_LIVE_COUNT, IN_MEMORY, resetStoreHeader, STORE_RELEASED_VECTORS_TO_DISK, magnitude, openGraphState, fixedView, createSharedVectorStoreHandles, growBufferTo, unplacedChunkCount, STORE_DOC_ID_BYTES, createOrdinalFilter, addToOrdinalFilter, slotByteOffset, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, createVectorBlock, ensureBlockSlots, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes } from './chunk-ICL2AELD.mjs';
|
|
2
|
+
import { MAX_VECTOR_ORDINALS } from './chunk-QY7GC2MW.mjs';
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-SYWGORQB.mjs';
|
|
4
4
|
import { readSync, closeSync, openSync } from 'fs';
|
|
5
5
|
|
|
6
6
|
function createVectorFileReader() {
|
|
@@ -404,6 +404,7 @@ function openSharedVectorField(initial, threadSlot) {
|
|
|
404
404
|
let graph = null;
|
|
405
405
|
let ordinals = null;
|
|
406
406
|
let scanned = 0;
|
|
407
|
+
let scannedLayoutGeneration = Atomics.load(store.handles.header, STORE_ORDINAL_LAYOUT_GENERATION);
|
|
407
408
|
let placed = 0;
|
|
408
409
|
function openGraph(next) {
|
|
409
410
|
graph = next.graph === null ? null : openGraphState(next.graph, next.dimension, store, quantizer, threadSlot);
|
|
@@ -414,6 +415,12 @@ function openSharedVectorField(initial, threadSlot) {
|
|
|
414
415
|
return store.docIdAt(ordinal);
|
|
415
416
|
}
|
|
416
417
|
function ordinalOf(docId) {
|
|
418
|
+
const layoutGeneration = Atomics.load(store.handles.header, STORE_ORDINAL_LAYOUT_GENERATION);
|
|
419
|
+
if (layoutGeneration !== scannedLayoutGeneration) {
|
|
420
|
+
ordinals = null;
|
|
421
|
+
scanned = 0;
|
|
422
|
+
scannedLayoutGeneration = layoutGeneration;
|
|
423
|
+
}
|
|
417
424
|
const slots = store.slots;
|
|
418
425
|
if (ordinals === null) ordinals = /* @__PURE__ */ new Map();
|
|
419
426
|
for (; scanned < slots; scanned++) {
|
|
@@ -581,6 +588,31 @@ function relayout(store) {
|
|
|
581
588
|
store.handles.layoutRevision += 1;
|
|
582
589
|
store.view.adoptHandles(store.handles);
|
|
583
590
|
}
|
|
591
|
+
function claimSlot(store, docId, cold) {
|
|
592
|
+
const ordinal = Atomics.load(store.handles.header, STORE_SLOTS);
|
|
593
|
+
ensureOrdinal(store, ordinal, cold);
|
|
594
|
+
store.diskFile[ordinal] = IN_MEMORY;
|
|
595
|
+
appendDocId(store.handles, ordinal, docId);
|
|
596
|
+
return ordinal;
|
|
597
|
+
}
|
|
598
|
+
function publishOrdinal(store, ordinal) {
|
|
599
|
+
Atomics.store(store.handles.header, STORE_SLOTS, ordinal + 1);
|
|
600
|
+
Atomics.store(store.present, ordinal, 1);
|
|
601
|
+
}
|
|
602
|
+
function publishOnDisk(store, ordinal, vectorMagnitude, location) {
|
|
603
|
+
store.magnitudes[ordinal] = vectorMagnitude;
|
|
604
|
+
store.diskOffset[ordinal] = location.offset;
|
|
605
|
+
store.diskFile[ordinal] = location.fileIndex;
|
|
606
|
+
publishOrdinal(store, ordinal);
|
|
607
|
+
}
|
|
608
|
+
function relocateFiles(store, rewrite) {
|
|
609
|
+
const files = store.handles.vectorFiles;
|
|
610
|
+
if (files.length === 0) return;
|
|
611
|
+
for (let file = 0; file < files.length; file++) {
|
|
612
|
+
if (files[file].length > 0) files[file] = rewrite(files[file]);
|
|
613
|
+
}
|
|
614
|
+
relayout(store);
|
|
615
|
+
}
|
|
584
616
|
function ensureCodeSlot(store, ordinal) {
|
|
585
617
|
const { handles } = store;
|
|
586
618
|
if (handles.codeLayout === null) return;
|
|
@@ -749,13 +781,6 @@ function createVectorStore(options) {
|
|
|
749
781
|
Atomics.store(store.present, ordinal, 1);
|
|
750
782
|
replacedOrdinals.add(ordinal);
|
|
751
783
|
}
|
|
752
|
-
function claimSlot(store, docId, cold) {
|
|
753
|
-
const ordinal = Atomics.load(store.handles.header, STORE_SLOTS);
|
|
754
|
-
ensureOrdinal(store, ordinal, cold);
|
|
755
|
-
store.diskFile[ordinal] = IN_MEMORY;
|
|
756
|
-
appendDocId(store.handles, ordinal, docId);
|
|
757
|
-
return ordinal;
|
|
758
|
-
}
|
|
759
784
|
function claimOrdinal(store, docId, cold, partitionId) {
|
|
760
785
|
const ordinal = claimSlot(store, docId, cold);
|
|
761
786
|
recordPartition(store, ordinal, partitionId);
|
|
@@ -763,16 +788,6 @@ function createVectorStore(options) {
|
|
|
763
788
|
docToOrd.set(docId, ordinal);
|
|
764
789
|
return ordinal;
|
|
765
790
|
}
|
|
766
|
-
function publishOrdinal(store, ordinal) {
|
|
767
|
-
Atomics.store(store.handles.header, STORE_SLOTS, ordinal + 1);
|
|
768
|
-
Atomics.store(store.present, ordinal, 1);
|
|
769
|
-
}
|
|
770
|
-
function publishOnDisk(store, ordinal, vectorMagnitude, location) {
|
|
771
|
-
store.magnitudes[ordinal] = vectorMagnitude;
|
|
772
|
-
store.diskOffset[ordinal] = location.offset;
|
|
773
|
-
store.diskFile[ordinal] = location.fileIndex;
|
|
774
|
-
publishOrdinal(store, ordinal);
|
|
775
|
-
}
|
|
776
791
|
function appendOrdinal(store, docId, vector, partitionId) {
|
|
777
792
|
const ordinal = claimOrdinal(store, docId, false, partitionId);
|
|
778
793
|
writeVector(store, ordinal, vector);
|
|
@@ -943,19 +958,18 @@ function createVectorStore(options) {
|
|
|
943
958
|
relayout(open);
|
|
944
959
|
}
|
|
945
960
|
resetDocIds(open.handles);
|
|
946
|
-
|
|
947
|
-
Atomics.store(open.handles.header, STORE_RELEASED_VECTORS_TO_DISK, 0);
|
|
948
|
-
Atomics.store(open.handles.header, STORE_LIVE_COUNT, 0);
|
|
949
|
-
Atomics.store(open.handles.header, STORE_CODE_COUNT, 0);
|
|
950
|
-
Atomics.store(open.handles.header, STORE_CALIBRATED, 0);
|
|
951
|
-
Atomics.add(open.handles.header, STORE_CALIBRATION_GENERATION, 1);
|
|
961
|
+
resetStoreHeader(open.handles.header);
|
|
952
962
|
},
|
|
953
963
|
release() {
|
|
954
964
|
forgetDocuments();
|
|
965
|
+
if (open !== null) Atomics.add(open.handles.header, STORE_ORDINAL_LAYOUT_GENERATION, 1);
|
|
955
966
|
open?.view.close();
|
|
956
967
|
open = null;
|
|
957
968
|
},
|
|
958
969
|
closeFiles: () => open?.view.close(),
|
|
970
|
+
relocateVectorFiles(rewrite) {
|
|
971
|
+
if (open !== null) relocateFiles(open, rewrite);
|
|
972
|
+
},
|
|
959
973
|
getOrdinal(docId) {
|
|
960
974
|
return docToOrd.get(docId);
|
|
961
975
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { requireDocumentWithinSizeLimit, validateRequiredFields } from './chunk-
|
|
2
|
-
import { ErrorCodes, NarsilError } from './chunk-
|
|
1
|
+
import { requireDocumentWithinSizeLimit, validateRequiredFields } from './chunk-4ZJWRETC.mjs';
|
|
2
|
+
import { ErrorCodes, NarsilError } from './chunk-SYWGORQB.mjs';
|
|
3
3
|
|
|
4
4
|
// src/narsil/internals.ts
|
|
5
5
|
var engineCores = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as PartitionConfig, A as AnyDocument, a as InsertOptions, W as WriteOptions } from './schema-DttzM-ln.js';
|
|
2
|
-
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult } from './memory-
|
|
2
|
+
import { V as VectorMaintenanceResult, B as BatchResult, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, P as PartitionStatsResult, Q as QueryParams, e as QueryResult, j as PreflightResult, k as SuggestParams, l as SuggestResult } from './memory-COdoGthn.js';
|
|
3
3
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
4
|
-
import { e as TaskRecord, M as MemoryStatsResponse, b as ImportResult, H as HttpIndexConfig, c as TaskListQuery, T as TaskListPage } from './tasks-
|
|
4
|
+
import { e as TaskRecord, M as MemoryStatsResponse, b as ImportResult, H as HttpIndexConfig, c as TaskListQuery, T as TaskListPage } from './tasks-BJmamiC4.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* This is the `fetch` implementation the client sends every request through.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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 './memory-
|
|
2
|
-
export { A as ASYNC_IMPORT_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-
|
|
3
|
-
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, H as HttpIndexConfig, I as ImportError, b as ImportResult, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, d as TaskProgress, e as TaskRecord, f as TaskStatus, g as TaskType } from './tasks-
|
|
4
|
-
export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-
|
|
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 './memory-COdoGthn.js';
|
|
2
|
+
export { A as ASYNC_IMPORT_CAPABILITY, D as DOCUMENT_EXPORT_CAPABILITY, E as ErrorEnvelope, I as INDEX_LIFECYCLE_CAPABILITY, R as REBUILD_ANALYSIS_CAPABILITY, S as SERVER_CAPABILITIES, a as SYNONYMS_CAPABILITY, T as TASK_CANCEL_CAPABILITY, b as TASK_FILTER_CAPABILITY } from './capabilities-BvxvFzVA.js';
|
|
3
|
+
export { C as CapabilitiesResponse, a as CreateIndexEmbedding, H as HttpIndexConfig, I as ImportError, b as ImportResult, M as MemoryStatsResponse, T as TaskListPage, c as TaskListQuery, d as TaskProgress, e as TaskRecord, f as TaskStatus, g as TaskType } from './tasks-BJmamiC4.js';
|
|
4
|
+
export { A as AdminOperations, B as BulkOperations, D as DocumentOperations, F as FetchFunction, I as ImportSource, a as IndexOperations, N as NarsilClient, b as NarsilClientOptions, P as PutResult, R as RequestOptions, S as SearchOperations, c as ServerOperations, d as ServerVersion, T as TaskOperations, W as WaitForTaskOptions, e as createNarsilClient } from './client-DKwterMb.js';
|
|
5
5
|
import './schema-DttzM-ln.js';
|
|
6
6
|
import './adapters-79OIa4xm.js';
|
|
7
7
|
import './synonyms-CpOAHPa-.js';
|
|
8
|
-
import './config-
|
|
9
|
-
import './config-
|
|
8
|
+
import './config-6YBtxekG.js';
|
|
9
|
+
import './config-DPphZfuM.js';
|
|
10
10
|
import './index-ONAEaqtx.js';
|
|
11
11
|
import './types-Cb9kiY5P.js';
|
package/dist/client.mjs
CHANGED
|
@@ -36,6 +36,7 @@ var ErrorCodes = {
|
|
|
36
36
|
ENVELOPE_VERSION_MISMATCH: "ENVELOPE_VERSION_MISMATCH",
|
|
37
37
|
ENVELOPE_INVALID_MAGIC: "ENVELOPE_INVALID_MAGIC",
|
|
38
38
|
PARTITION_CAPACITY_EXCEEDED: "PARTITION_CAPACITY_EXCEEDED",
|
|
39
|
+
RESTORE_MEMORY_EXCEEDED: "RESTORE_MEMORY_EXCEEDED",
|
|
39
40
|
EMBEDDING_FAILED: "EMBEDDING_FAILED",
|
|
40
41
|
EMBEDDING_DIMENSION_MISMATCH: "EMBEDDING_DIMENSION_MISMATCH",
|
|
41
42
|
EMBEDDING_NO_SOURCE: "EMBEDDING_NO_SOURCE",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NarsilConfig } from './config-
|
|
1
|
+
import { N as NarsilConfig } from './config-DPphZfuM.js';
|
|
2
2
|
import { A as AllocationTable, N as NodeRole, a as NodeRegistration, C as ClusterCoordinator, b as NodeCapacity } from './index-ONAEaqtx.js';
|
|
3
3
|
import { N as NodeTransport } from './types-Cb9kiY5P.js';
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PersistenceAdapter, I as InvalidationAdapter, E as EmbeddingAdapter } from './adapters-79OIa4xm.js';
|
|
2
|
-
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-
|
|
2
|
+
import { Q as QueryParams, e as QueryResult, f as NarsilEventHandlers } from './memory-COdoGthn.js';
|
|
3
3
|
import { I as IndexConfig, A as AnyDocument } from './schema-DttzM-ln.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { createDirectExecutor } from './chunk-3LYY62M6.mjs';
|
|
2
|
+
import './chunk-CHOGQSHK.mjs';
|
|
3
|
+
import './chunk-ZHS44YKF.mjs';
|
|
4
|
+
import './chunk-TGP5M5R7.mjs';
|
|
5
|
+
import './chunk-U2BKYEC7.mjs';
|
|
6
|
+
import './chunk-QM3VPX4Z.mjs';
|
|
7
|
+
import './chunk-WQBCBKY3.mjs';
|
|
8
|
+
import './chunk-SBCEHIPL.mjs';
|
|
9
|
+
import './chunk-4ZJWRETC.mjs';
|
|
10
|
+
import './chunk-FGMGUDHX.mjs';
|
|
11
|
+
import './chunk-KEHK2O6P.mjs';
|
|
12
|
+
import './chunk-GES7U2PM.mjs';
|
|
13
|
+
import './chunk-BB7MASRQ.mjs';
|
|
14
|
+
import './chunk-2GZGBOQI.mjs';
|
|
15
|
+
import './chunk-X5CV2E2B.mjs';
|
|
16
|
+
import './chunk-7X5JST5L.mjs';
|
|
17
|
+
import './chunk-7KC56574.mjs';
|
|
18
|
+
import './chunk-R6A773WK.mjs';
|
|
19
|
+
import './chunk-YTJCGKM4.mjs';
|
|
20
|
+
import './chunk-HBVLF3HA.mjs';
|
|
21
|
+
import './chunk-L5ORED7V.mjs';
|
|
22
|
+
import './chunk-SYWGORQB.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MAX_NODE_ID_LENGTH, MAX_WATCHERS } from '../../chunk-ORBLD3EL.mjs';
|
|
2
2
|
import '../../chunk-R6A773WK.mjs';
|
|
3
3
|
import { compareCodePoints } from '../../chunk-YTJCGKM4.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from '../../chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from '../../chunk-SYWGORQB.mjs';
|
|
5
5
|
import { decode, encode } from '@msgpack/msgpack';
|
|
6
6
|
|
|
7
7
|
// src/distribution/coordinator/etcd/constants.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { decodeTransportMessage, encodeTransportMessage } from '../../chunk-RSRVGAIQ.mjs';
|
|
2
2
|
import { MAX_MESSAGE_SIZE_BYTES, GRPC_KEEPALIVE_TIMEOUT_MS, GRPC_KEEPALIVE_TIME_MS, GRPC_ENVELOPE_OVERHEAD_BYTES } from '../../chunk-UNEEFTEU.mjs';
|
|
3
3
|
import { TransportError, TransportErrorCodes } from '../../chunk-OHP7QR33.mjs';
|
|
4
|
-
import { NarsilError, ErrorCodes } from '../../chunk-
|
|
4
|
+
import { NarsilError, ErrorCodes } from '../../chunk-SYWGORQB.mjs';
|
|
5
5
|
|
|
6
6
|
// src/distribution/transport/grpc/codec.ts
|
|
7
7
|
var FIELD_ONE_LENGTH_DELIMITED_KEY = 10;
|
package/dist/distribution.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-
|
|
2
|
-
export { c as ClusterControllerConfig, d as ClusterMemoryConfig, e as ClusterNodeInfo, f as ClusterQueryConfig, N as NodeReadiness, R as ReplicationConfig } from './config-
|
|
3
|
-
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-
|
|
1
|
+
import { a as CreateIndexOptions, C as ClusterNamespace, b as ClusterNodeConfig } from './config-6YBtxekG.js';
|
|
2
|
+
export { c as ClusterControllerConfig, d as ClusterMemoryConfig, e as ClusterNodeInfo, f as ClusterQueryConfig, N as NodeReadiness, R as ReplicationConfig } from './config-6YBtxekG.js';
|
|
3
|
+
import { B as BatchResult, L as ListParams, h as ListResult, k as SuggestParams, l as SuggestResult, Q as QueryParams, j as PreflightResult, g as IndexStats, P as PartitionStatsResult, M as MemoryStats, m as NarsilEventMap, e as QueryResult } from './memory-COdoGthn.js';
|
|
4
4
|
import { I as IndexConfig, A as AnyDocument, a as InsertOptions } from './schema-DttzM-ln.js';
|
|
5
5
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
6
6
|
import { b as NodeCapacity, N as NodeRole } from './index-ONAEaqtx.js';
|
|
7
7
|
export { c as AllocationConstraints, d as AllocationEvent, A as AllocationTable, C as ClusterCoordinator, I as IndexPartitionBytes, e as NodeEvent, f as NodeMemoryReport, a as NodeRegistration, P as PartitionAssignment, g as PartitionState, S as SchemaEvent, U as UnassignedReason } from './index-ONAEaqtx.js';
|
|
8
|
-
import { N as Narsil } from './engine-
|
|
8
|
+
import { N as Narsil } from './engine-BGt9lI1V.js';
|
|
9
9
|
export { L as ListenHandler, N as NodeTransport, R as RespondFn, T as TransportConfig, a as TransportMessage } from './types-Cb9kiY5P.js';
|
|
10
|
-
import './config-
|
|
10
|
+
import './config-DPphZfuM.js';
|
|
11
11
|
import './adapters-79OIa4xm.js';
|
|
12
12
|
|
|
13
13
|
/**
|
package/dist/distribution.mjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { indexMetadataOf, loadPartitionSegments } from './chunk-
|
|
4
|
-
import { decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-
|
|
1
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-L26LEDHO.mjs';
|
|
2
|
+
import './chunk-MWT5WCJ5.mjs';
|
|
3
|
+
import { indexMetadataOf, loadPartitionSegments } from './chunk-MASE2LTJ.mjs';
|
|
4
|
+
import { decodeVectorFilePayload, bytesToVectors, isDead } from './chunk-F52QGNZ2.mjs';
|
|
5
5
|
import { MAX_MESSAGE_SIZE_BYTES } from './chunk-UNEEFTEU.mjs';
|
|
6
|
-
import { DEFAULT_NODE_LIFECYCLE_CONFIG, DEFAULT_CONTROLLER_CONFIG, validateIndexName, readIndexState, readIndexMetadataSnapshot, storeSynonymSet, deleteSynonymSet, indexConfigKey, indexUuidOfStoredMetadata, getIndexMetadata, withPartitionCount, indexSettingsOf, putIndexMetadata, indexConfigFromSettings, metadataWithSynonymSet, isRecord, storedSynonymSetOf, ALLOCATION_RETRY_DELAY_MS, TEARDOWN_CAS_ATTEMPTS, TEARDOWN_RETRY_ROUNDS, isValidInteger, ALLOCATION_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, RECOVERY_CAS_ATTEMPTS, ESTIMATED_PARTITION_BYTES, REBALANCE_THRESHOLD, PARTITION_STORES_TIMEOUT_MS, LEADERSHIP_IMBALANCE_THRESHOLD, BOOTSTRAP_CAS_ATTEMPTS, getClusterIndexConfig } from './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import { DEFAULT_NODE_LIFECYCLE_CONFIG, DEFAULT_CONTROLLER_CONFIG, validateIndexName, readIndexState, readIndexMetadataSnapshot, storeSynonymSet, deleteSynonymSet, indexConfigKey, indexUuidOfStoredMetadata, getIndexMetadata, withPartitionCount, indexSettingsOf, putIndexMetadata, indexConfigFromSettings, metadataWithSynonymSet, isRecord, storedSynonymSetOf, ALLOCATION_RETRY_DELAY_MS, TEARDOWN_CAS_ATTEMPTS, TEARDOWN_RETRY_ROUNDS, isValidInteger, ALLOCATION_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, RECOVERY_CAS_ATTEMPTS, ESTIMATED_PARTITION_BYTES, REBALANCE_THRESHOLD, PARTITION_STORES_TIMEOUT_MS, LEADERSHIP_IMBALANCE_THRESHOLD, BOOTSTRAP_CAS_ATTEMPTS, getClusterIndexConfig } from './chunk-GJZHU4FC.mjs';
|
|
7
|
+
import './chunk-ICL2AELD.mjs';
|
|
8
8
|
import './chunk-37CD3OKS.mjs';
|
|
9
9
|
import './chunk-DJHHF2L5.mjs';
|
|
10
|
-
import { validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, createForwardBatchResultMessage, readListedFile, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage, computeEntryChecksum, createEntryMessage, createEntryBatchMessage, createInsyncConfirmMessage, validateAckPayload, createInsyncRemoveMessage, validateInsyncConfirmPayload, createInsyncAddMessage } from './chunk-
|
|
11
|
-
import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-
|
|
10
|
+
import { validateEntryBatchPayload, createAckMessage, validateEntryPayload, validateForwardBatchPayload, createForwardBatchResultMessage, readListedFile, createForwardBatchMessage, validateForwardBatchResultPayload, createForwardMessage, computeEntryChecksum, createEntryMessage, createEntryBatchMessage, createInsyncConfirmMessage, validateAckPayload, createInsyncRemoveMessage, validateInsyncConfirmPayload, createInsyncAddMessage } from './chunk-Q4UTU5ZE.mjs';
|
|
11
|
+
import { applyIndexEntry, applyDeleteEntry, validateReplicationEntry } from './chunk-J7SDAOTP.mjs';
|
|
12
12
|
import { TransportErrorCodes, ReplicationMessageTypes, ClusterMessageTypes, QueryMessageTypes, TransportError } from './chunk-OHP7QR33.mjs';
|
|
13
13
|
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR, WIRE_BATCH_BUDGET } from './chunk-P36MUFEJ.mjs';
|
|
14
|
-
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createByteReader, openChecksummedEnvelope, emptySerializablePartition, crc32Init, crc32Final, crc32Update } from './chunk-
|
|
15
|
-
import './chunk-
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import { oversampledShardSize, resolveProjection, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, normalizeSort, sortModesOf, encodePageCursor, applyProjection, readSortValues, requireWithinResultWindow, fnv1a, sortSignatureEntry, FILTER_EXPRESSION_KEYS, filterTestCount, fnv1aUint32s, mergePartitionStats, FIELD_FILTER_OPERATORS } from './chunk-
|
|
19
|
-
import { providedDocId } from './chunk-
|
|
14
|
+
import { requireKnownConfig, resolveRunnableConfig, createEngineCore, startEngineCore, createNarsilFromCore, runEngineQueryStats, runEngineListDocuments, runEngineSuggest, runEnginePreflight, runEngineQuery, createEngineIndex, encodeIndexConfiguration, requireConfigurationWithinSizeLimit, prepareConfiguredSynonyms, createByteReader, openChecksummedEnvelope, emptySerializablePartition, crc32Init, crc32Final, crc32Update } from './chunk-JFUE6F2Y.mjs';
|
|
15
|
+
import { now, listBindingOf, requireSurfaceFormsForPartialFields, queryBindingOf, hitsKeptPerGroup, clampLimit, resolveHybridFusion, dedupePinnedEntries, foldGroupReducer } from './chunk-R36MIGBU.mjs';
|
|
16
|
+
import './chunk-RDJKYKMQ.mjs';
|
|
17
|
+
import { synonymModule, readHeapStatistics } from './chunk-3LYY62M6.mjs';
|
|
18
|
+
import { oversampledShardSize, resolveProjection, clampRowCount, sortSignatureOf, requireMatchingCursor, decodePageCursor, normalizeSort, sortModesOf, encodePageCursor, applyProjection, readSortValues, requireWithinResultWindow, fnv1a, sortSignatureEntry, FILTER_EXPRESSION_KEYS, filterTestCount, fnv1aUint32s, mergePartitionStats, FIELD_FILTER_OPERATORS } from './chunk-CHOGQSHK.mjs';
|
|
19
|
+
import { providedDocId } from './chunk-WLOF6HSP.mjs';
|
|
20
20
|
import './chunk-AV4IJKD2.mjs';
|
|
21
|
-
import { generateId, getLanguage } from './chunk-MKWUXWQH.mjs';
|
|
22
21
|
import { DEFAULT_SUGGEST_LIMIT, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, MAX_INDEX_NAME_LENGTH, MAX_DOC_ID_LENGTH, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING, INDEX_NAME_PATTERN } from './chunk-Q5DC6WAB.mjs';
|
|
22
|
+
import { generateId, getLanguage } from './chunk-ZHS44YKF.mjs';
|
|
23
23
|
import './chunk-TGP5M5R7.mjs';
|
|
24
24
|
import './chunk-U2BKYEC7.mjs';
|
|
25
|
-
import './chunk-
|
|
26
|
-
import { MIN_OVERSAMPLE } from './chunk-
|
|
27
|
-
import './chunk-
|
|
28
|
-
import { isPatternTolerance } from './chunk-
|
|
25
|
+
import './chunk-KOKM4PQN.mjs';
|
|
26
|
+
import { MIN_OVERSAMPLE } from './chunk-QY7GC2MW.mjs';
|
|
27
|
+
import './chunk-ES33L3HO.mjs';
|
|
28
|
+
import { isPatternTolerance } from './chunk-QM3VPX4Z.mjs';
|
|
29
29
|
import { MAX_FILTER_DEPTH, MAX_FILTER_TESTS, MAX_FILTER_ARRAY_SIZE } from './chunk-WQBCBKY3.mjs';
|
|
30
|
-
import './chunk-
|
|
31
|
-
import { validateSchema, requireCreatableSchema, encodeDocument, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES } from './chunk-
|
|
30
|
+
import './chunk-SBCEHIPL.mjs';
|
|
31
|
+
import { validateSchema, requireCreatableSchema, encodeDocument, MIN_POLYGON_POINTS, isLatitude, MAX_LATITUDE_DEGREES, isLongitude, MAX_LONGITUDE_DEGREES } from './chunk-4ZJWRETC.mjs';
|
|
32
32
|
import { DEFAULT_PAGE_SIZE, MAX_SORT_FIELDS, MAX_CURSOR_LENGTH, MAX_TOLERANCE, MAX_PREFIX_LENGTH, RESULT_WINDOW } from './chunk-FGMGUDHX.mjs';
|
|
33
33
|
import './chunk-KEHK2O6P.mjs';
|
|
34
34
|
import './chunk-GES7U2PM.mjs';
|
|
35
|
-
import './chunk-
|
|
36
|
-
import './chunk-
|
|
35
|
+
import './chunk-BB7MASRQ.mjs';
|
|
36
|
+
import './chunk-2GZGBOQI.mjs';
|
|
37
37
|
import './chunk-X5CV2E2B.mjs';
|
|
38
38
|
import './chunk-7X5JST5L.mjs';
|
|
39
|
-
import './chunk-
|
|
39
|
+
import './chunk-7KC56574.mjs';
|
|
40
40
|
import { toComparableSortValue, compareComparableKeys, isSortMode, SORT_MODES, compareSortValues } from './chunk-R6A773WK.mjs';
|
|
41
41
|
import { compareCodePoints, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
42
42
|
import { collectAndReturnPages } from './chunk-5XNIRLFC.mjs';
|
|
43
43
|
import './chunk-R6PR4WYZ.mjs';
|
|
44
|
-
import './chunk-
|
|
44
|
+
import './chunk-HBVLF3HA.mjs';
|
|
45
45
|
import { MAX_STORED_VECTOR_DIMENSION, MAX_NESTING_DEPTH } from './chunk-L5ORED7V.mjs';
|
|
46
|
-
import { ErrorCodes, NarsilError, describeError } from './chunk-
|
|
46
|
+
import { ErrorCodes, NarsilError, describeError } from './chunk-SYWGORQB.mjs';
|
|
47
47
|
import { decode, encode } from '@msgpack/msgpack';
|
|
48
48
|
import { randomUUID } from 'crypto';
|
|
49
49
|
import { openSync, writeSync, closeSync, rmSync, readSync } from 'fs';
|