@delali/narsil 0.3.1-next.127 → 0.3.1-next.129
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-LJS6PREA.mjs → chunk-3NVZD52E.mjs} +3 -1
- package/dist/browser/{chunk-4Y2EGA3U.mjs → chunk-5D6NJD6C.mjs} +554 -127
- package/dist/browser/{chunk-6POI2KNI.mjs → chunk-II5POT55.mjs} +3 -3
- package/dist/browser/{chunk-2CBQ2PCC.mjs → chunk-WLD6DDIX.mjs} +1 -1
- package/dist/browser/{chunk-V5DCQIOT.mjs → chunk-WZBTVTSU.mjs} +2 -2
- package/dist/browser/{chunk-B65QVTST.mjs → chunk-XTFJZHQP.mjs} +14 -9
- package/dist/browser/{chunk-P7C2S5JX.mjs → chunk-YAGXZU4W.mjs} +2 -2
- package/dist/browser/{durability-wiring-PUC4QSCR.mjs → durability-wiring-HCCC6BJB.mjs} +6 -6
- package/dist/browser/{module-ACWDC7YI.mjs → module-S2VDU2JE.mjs} +5 -5
- package/dist/browser/{restore-queue-MLUEUEAN.mjs → restore-queue-BZ7WWEC4.mjs} +1 -1
- package/dist/browser/{runtime-BX6XRFYR.mjs → runtime-PL4TTFJE.mjs} +1 -1
- package/dist/browser/{snapshot-U5Y346XG.mjs → snapshot-RTUCHI2L.mjs} +7 -7
- package/dist/browser/{write-GZHR6AVG.mjs → write-IMU7G5NU.mjs} +5 -5
- package/dist/{capabilities-9YwwCcqP.d.ts → capabilities-BTjv-tK8.d.ts} +10 -3
- package/dist/{chunk-N57XXGPG.mjs → chunk-2HQQ7Y5D.mjs} +23 -4
- package/dist/{chunk-ENBN5VQ6.mjs → chunk-2YOAGAGF.mjs} +115 -46
- package/dist/{chunk-QSCVJJW5.mjs → chunk-37RTD6KD.mjs} +8 -8
- package/dist/{chunk-N6J6EJW3.mjs → chunk-3LJVM6XM.mjs} +2 -2
- package/dist/{chunk-VK45J47R.mjs → chunk-3XHFVYIQ.mjs} +1 -1
- package/dist/{chunk-LOBYK2FG.mjs → chunk-43Q7HAI2.mjs} +20 -9
- package/dist/{chunk-6PN3U6XW.mjs → chunk-44TB6AIZ.mjs} +1 -1
- package/dist/{chunk-6ODIY6ZB.mjs → chunk-4XEVROSP.mjs} +1 -1
- package/dist/{chunk-4IHMMDRF.mjs → chunk-5LC5VMDQ.mjs} +4 -4
- package/dist/{chunk-MFPJVITN.mjs → chunk-5VSTAJET.mjs} +2 -2
- package/dist/{chunk-DG62H7OD.mjs → chunk-AFOZR4ZQ.mjs} +2 -2
- package/dist/{chunk-P34VZEXB.mjs → chunk-AN3CUMPZ.mjs} +2 -2
- package/dist/{chunk-4PQNDHSA.mjs → chunk-CSSCLRGY.mjs} +2 -2
- package/dist/{chunk-HWQDZB2U.mjs → chunk-CTF6WFTX.mjs} +3 -3
- package/dist/{chunk-E74YLAIG.mjs → chunk-DX2FI4LU.mjs} +2 -1
- package/dist/{chunk-22CK2LQO.mjs → chunk-EZIGAOUJ.mjs} +5 -5
- package/dist/{chunk-KCQG2PJT.mjs → chunk-F4UKMTKM.mjs} +4 -4
- package/dist/{chunk-542TD4BL.mjs → chunk-FRSWYMXH.mjs} +1 -1
- package/dist/{chunk-ANFNYCQG.mjs → chunk-J4LRE5Q7.mjs} +6 -6
- package/dist/{chunk-OGFSUXYY.mjs → chunk-K73PZTBR.mjs} +4 -4
- package/dist/{chunk-IBGMFR5Y.mjs → chunk-K76F5YYX.mjs} +274 -75
- package/dist/{chunk-FUUP45IS.mjs → chunk-M6MBSVIJ.mjs} +1 -1
- package/dist/{chunk-IR4KQ4WB.mjs → chunk-MGD7XETB.mjs} +32 -30
- package/dist/{chunk-7ZZQNOIY.mjs → chunk-OPO5SE4J.mjs} +1 -1
- package/dist/{chunk-UKXMSO5H.mjs → chunk-PCRWCOZC.mjs} +155 -31
- package/dist/{chunk-HFJXEFFV.mjs → chunk-PTIJAZWL.mjs} +3 -3
- package/dist/chunk-Q2AP2FSN.mjs +15 -0
- package/dist/{chunk-SEG4CL6W.mjs → chunk-QQS4QZQA.mjs} +4 -4
- package/dist/{chunk-OFYKBKKV.mjs → chunk-RC27KF7F.mjs} +1 -1
- package/dist/{chunk-JEXJDCQH.mjs → chunk-RYH3PASD.mjs} +17 -12
- package/dist/{chunk-IE43SRL3.mjs → chunk-TB7YMDD5.mjs} +10 -6
- package/dist/{chunk-ZR63OGT2.mjs → chunk-TY64A3ZW.mjs} +2 -2
- package/dist/{chunk-Z4DZ4KK2.mjs → chunk-UJWGQIXU.mjs} +1 -0
- package/dist/{chunk-OBWUWZRA.mjs → chunk-WI5Q3L43.mjs} +1 -0
- package/dist/{chunk-SJEIIR56.mjs → chunk-WQYB4TNR.mjs} +2 -2
- package/dist/{chunk-JIXO442E.mjs → chunk-WUIDPBSY.mjs} +16 -10
- package/dist/{chunk-62IPM62F.mjs → chunk-XRXBCOA4.mjs} +2 -2
- package/dist/{chunk-U6NGTWI3.mjs → chunk-XTER67YM.mjs} +1 -1
- package/dist/{chunk-LXWDQLTW.mjs → chunk-Y4NOHICF.mjs} +1 -1
- package/dist/{chunk-OCB7TMUQ.mjs → chunk-Y4US5EGH.mjs} +1 -1
- package/dist/{client-DyiYkQ8o.d.ts → client-BOcveV7A.d.ts} +34 -11
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +42 -20
- package/dist/{config-DLVnlByZ.d.ts → config-C3YXk5Rn.d.ts} +2 -2
- package/dist/{config-CtTfxbpV.d.ts → config-CPmIY3aH.d.ts} +2 -2
- package/dist/{direct-executor-6KCVVHYT.mjs → direct-executor-ULA6V5HC.mjs} +12 -12
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +18 -1
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.mjs +33 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +71 -43
- package/dist/distribution.mjs +359 -115
- package/dist/{durability-wiring-UGGUNATA.mjs → durability-wiring-6R26AJDI.mjs} +26 -26
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-Bq5wz6c1.d.ts → engine-JjRAXpT3.d.ts} +38 -8
- package/dist/{events-x2aVu0_o.d.ts → events-pM0lna7M.d.ts} +12 -1
- package/dist/{index-Cl5qQauj.d.ts → index-DkQ2DlgR.d.ts} +37 -3
- package/dist/index.browser.mjs +3 -3
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +19 -19
- package/dist/{long-query-thread-5BIPZVS6.mjs → long-query-thread-6VLA6YJI.mjs} +15 -15
- package/dist/{module-7OHZ2OPI.mjs → module-S4WGMFNW.mjs} +11 -11
- package/dist/partial-words.mjs +6 -6
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +2 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +22 -22
- package/dist/react.d.ts +7 -7
- package/dist/react.mjs +1 -0
- package/dist/{rerank-NYX5S7OG.mjs → rerank-V4J4MIWR.mjs} +6 -6
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{restore-queue-NVMWJMHI.mjs → restore-queue-PUGWCPCX.mjs} +1 -1
- package/dist/{runtime-XNYW6AWX.mjs → runtime-TBFBQQQO.mjs} +7 -7
- package/dist/{schema-4W_7tk1f.d.ts → schema-DGAP_8HJ.d.ts} +50 -24
- package/dist/server.d.ts +10 -10
- package/dist/server.mjs +27 -15
- package/dist/{snapshot-P7IQGNNQ.mjs → snapshot-PUVSMV7E.mjs} +27 -27
- package/dist/synonyms.mjs +3 -3
- package/dist/{tasks-DLQIfXqy.d.ts → tasks-txGvNz6h.d.ts} +4 -6
- package/dist/{thread-QPETQEPK.mjs → thread-TA7QQBWP.mjs} +14 -14
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +4 -4
- package/dist/workers/entry.mjs +8 -8
- package/dist/{write-WZVM7ZL6.mjs → write-TGKYT3C4.mjs} +21 -21
- package/package.json +7 -7
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, lazyQueryBinding, executeQuery, executePreflight, executeSuggest, executeListDocuments, validateDocId } from './chunk-
|
|
2
|
-
import { resolveVectorText, bindEngineCore, restoredConfigFields, restoredEmbedding, collectRequiredFieldFailures, embedChunkDocuments, providedDocId, requireDocumentObject, admitInsert, asBatchInsertError, requireMatchingDocId, embedDocumentFields, assertDocumentCarriesMappedVectors, admitBufferedUpsert, createPendingAdmissions, recordPendingAdmission } from './chunk-
|
|
3
|
-
import { splitWorkerBudget, resolveWorkerCount, resolveWorkerEntry, missingWorkerEntry, DEFAULT_REQUEST_TIMEOUT_MS, resolveRequestThreadCount, workerResourceLimits, DEFAULT_BACKPRESSURE_LIMIT, SHUTDOWN_TIMEOUT_MS, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH } from './chunk-
|
|
1
|
+
import { validateWorkerConfig, validateIndexName, validatePatternValueLimit, requireSurfaceFormsForPartialFields, validateBM25Params, validatePartitionConfig, lazyQueryBinding, executeQuery, executePreflight, executeSuggest, executeListDocuments, storedBM25Params, validateDocId } from './chunk-PCRWCOZC.mjs';
|
|
2
|
+
import { resolveVectorText, bindEngineCore, restoredConfigFields, restoredEmbedding, collectRequiredFieldFailures, embedChunkDocuments, providedDocId, requireDocumentObject, admitInsert, asBatchInsertError, requireMatchingDocId, embedDocumentFields, assertDocumentCarriesMappedVectors, admitBufferedUpsert, createPendingAdmissions, recordPendingAdmission } from './chunk-2HQQ7Y5D.mjs';
|
|
3
|
+
import { splitWorkerBudget, resolveWorkerCount, resolveWorkerEntry, missingWorkerEntry, DEFAULT_REQUEST_TIMEOUT_MS, resolveRequestThreadCount, workerResourceLimits, DEFAULT_BACKPRESSURE_LIMIT, SHUTDOWN_TIMEOUT_MS, CONSECUTIVE_TIMEOUTS_BEFORE_DEATH } from './chunk-44TB6AIZ.mjs';
|
|
4
4
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
5
|
-
import { isEmptySynonymSet, synonymModule, createDirectExecutor, createPartitionRouter, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, resolvePartitionInsertOptions, createFrozenSegment } from './chunk-
|
|
6
|
-
import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, mergePartitionStats, createPartitionIndex, oversampledFacetConfig, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, isCompositePartition, fnv1a, encodeSegmentState } from './chunk-
|
|
7
|
-
import { generateId, getLanguage } from './chunk-
|
|
5
|
+
import { isEmptySynonymSet, synonymModule, createDirectExecutor, createPartitionRouter, availableSynonymModule, mergeFrozenSegments, createSharedFrozenSegment, freezeSegmentShared, resolvePartitionInsertOptions, createFrozenSegment } from './chunk-RYH3PASD.mjs';
|
|
6
|
+
import { requirePatternSearchFor, requirePartialWordSearchFor, collectQueryTermStats, mergePartitionStats, createPartitionIndex, oversampledFacetConfig, availablePatternSearch, PATTERN_HOST, kWayMerge, mergeFacets, isCompositePartition, fnv1a, encodeSegmentState } from './chunk-K76F5YYX.mjs';
|
|
7
|
+
import { generateId, getLanguage } from './chunk-M6MBSVIJ.mjs';
|
|
8
8
|
import { readHeapStatistics } from './chunk-ZATRDAYU.mjs';
|
|
9
9
|
import { countEngineThread } from './chunk-EBIHRL7B.mjs';
|
|
10
10
|
import { DEFAULT_MAX_RERANK_WINDOW, DEFAULT_RERANK_TIMEOUT_MS } from './chunk-HJSN7UYG.mjs';
|
|
11
|
-
import { MAX_INDEX_CONFIGURATION_BYTES, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, HEAP_PRESSURE_WARNING_FRACTION, FOREIGN_STATS_TTL_MS, MAX_IMPORT_REFUSALS_REPORTED, MIN_DOCUMENTS_FOR_SEGMENTS, HEAP_PRESSURE_REARM_FRACTION, BATCH_CHUNK_SIZE } from './chunk-
|
|
12
|
-
import { requireSearchBackendSettings } from './chunk-
|
|
13
|
-
import { DEFAULT_PATTERN_WORK_CAP, MATCHER_STATE_BUDGET_BYTES } from './chunk-
|
|
14
|
-
import { getNestedValue } from './chunk-
|
|
15
|
-
import { flattenSchema, raiseEarlierReleaseGraphSetting, messagePackUpperBoundBytes, validateSchema, requireCreatableSchema, validateVectorPromotion, validateVectorStorage, extractVectorFieldsFromSchema, schemaFieldsOf, validateRequiredFields, requireDocumentWithinSizeLimit, validateDocument, validateDocumentStrict } from './chunk-
|
|
11
|
+
import { MAX_INDEX_CONFIGURATION_BYTES, MAX_SWEEP_INTERVAL_MS, MIN_SWEEP_INTERVAL_MS, STATISTICS_BROADCAST_INTERVAL_MS, MAX_EXPORT_LINE_BYTES, IMPORT_BATCH_DOCUMENTS, HEAP_PRESSURE_WARNING_FRACTION, FOREIGN_STATS_TTL_MS, MAX_IMPORT_REFUSALS_REPORTED, MIN_DOCUMENTS_FOR_SEGMENTS, HEAP_PRESSURE_REARM_FRACTION, BATCH_CHUNK_SIZE } from './chunk-Y4NOHICF.mjs';
|
|
12
|
+
import { requireSearchBackendSettings } from './chunk-3XHFVYIQ.mjs';
|
|
13
|
+
import { DEFAULT_PATTERN_WORK_CAP, MATCHER_STATE_BUDGET_BYTES } from './chunk-AN3CUMPZ.mjs';
|
|
14
|
+
import { getNestedValue } from './chunk-F4UKMTKM.mjs';
|
|
15
|
+
import { flattenSchema, raiseEarlierReleaseGraphSetting, messagePackUpperBoundBytes, validateSchema, requireCreatableSchema, validateVectorPromotion, validateVectorStorage, extractVectorFieldsFromSchema, schemaFieldsOf, validateRequiredFields, requireDocumentWithinSizeLimit, validateDocument, validateDocumentStrict } from './chunk-AFOZR4ZQ.mjs';
|
|
16
16
|
import { NATIVE_CRC32_MIN_BYTES, MAX_FILE_BYTES, CHECKSUM_YIELD_CHUNK_BYTES } from './chunk-U476IXKQ.mjs';
|
|
17
|
-
import { isSingleStringFieldType } from './chunk-
|
|
17
|
+
import { isSingleStringFieldType } from './chunk-4XEVROSP.mjs';
|
|
18
|
+
import { withOpenIndex, oneAtATime } from './chunk-MGD7XETB.mjs';
|
|
18
19
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
19
|
-
import { createRequestId, isValidWorkerResponse } from './chunk-
|
|
20
|
-
import { loadVectorCodeFor, requireLoadedVectorCode } from './chunk-
|
|
20
|
+
import { createRequestId, isValidWorkerResponse } from './chunk-UJWGQIXU.mjs';
|
|
21
|
+
import { loadVectorCodeFor, requireLoadedVectorCode } from './chunk-XTER67YM.mjs';
|
|
21
22
|
import { noteThreadSlotLive, threadSlotOfWorker, noteThreadSlotGone } from './chunk-RFBLQLLZ.mjs';
|
|
22
23
|
import { MAX_DOCUMENT_NESTING_DEPTH } from './chunk-L5ORED7V.mjs';
|
|
23
|
-
import { ErrorCodes, NarsilError } from './chunk-
|
|
24
|
+
import { ErrorCodes, NarsilError } from './chunk-WI5Q3L43.mjs';
|
|
24
25
|
import { encode, decode } from '@msgpack/msgpack';
|
|
25
26
|
import * as zlib from 'zlib';
|
|
26
27
|
|
|
@@ -839,7 +840,11 @@ function reconstructSchemaFromMetadata(metadata) {
|
|
|
839
840
|
const config = {
|
|
840
841
|
schema: unflattenSchema(metadata.schema),
|
|
841
842
|
language: metadata.language,
|
|
842
|
-
bm25: {
|
|
843
|
+
bm25: {
|
|
844
|
+
k1: metadata.bm25Params.k1,
|
|
845
|
+
b: metadata.bm25Params.b,
|
|
846
|
+
...metadata.bm25Params.fields !== void 0 ? { fields: metadata.bm25Params.fields } : {}
|
|
847
|
+
}
|
|
843
848
|
};
|
|
844
849
|
if (metadata.embedding) {
|
|
845
850
|
config.embedding = metadata.embedding.adapter !== void 0 ? { adapter: metadata.embedding.adapter, fields: metadata.embedding.fields } : { fields: metadata.embedding.fields };
|
|
@@ -3643,23 +3648,24 @@ function scoresPerPartition(state, indexName, params, globalStats) {
|
|
|
3643
3648
|
if (mode === "local") return true;
|
|
3644
3649
|
return mode === "broadcast" && globalStats !== void 0;
|
|
3645
3650
|
}
|
|
3646
|
-
function queryAction(indexName, params, globalStats, partitionIds, patternWork) {
|
|
3651
|
+
function queryAction(indexName, params, globalStats, partitionIds, patternWork, bm25) {
|
|
3647
3652
|
return {
|
|
3648
3653
|
type: "query",
|
|
3649
3654
|
indexName,
|
|
3650
3655
|
params,
|
|
3651
3656
|
requestId: createRequestId(),
|
|
3652
3657
|
patternWork,
|
|
3658
|
+
bm25: bm25 ?? null,
|
|
3653
3659
|
...partitionIds !== void 0 ? { partitionIds } : {},
|
|
3654
3660
|
...globalStats !== void 0 ? { globalStats } : {}
|
|
3655
3661
|
};
|
|
3656
3662
|
}
|
|
3657
|
-
async function runSplit(leases, scope, indexName, params, globalStats, patternWork) {
|
|
3663
|
+
async function runSplit(leases, scope, indexName, params, globalStats, patternWork, bm25) {
|
|
3658
3664
|
const assignments = partitionsPerLease(scope, leases.length);
|
|
3659
3665
|
const workerParams = params.facets !== void 0 ? { ...params, facets: oversampledFacetConfig(params.facets) } : params;
|
|
3660
3666
|
const outcomes = await Promise.allSettled(
|
|
3661
3667
|
assignments.map(
|
|
3662
|
-
(partitionIds, at) => leases[at].executor.execute(queryAction(indexName, workerParams, globalStats, partitionIds, patternWork)).finally(() => leases[at].release())
|
|
3668
|
+
(partitionIds, at) => leases[at].executor.execute(queryAction(indexName, workerParams, globalStats, partitionIds, patternWork, bm25)).finally(() => leases[at].release())
|
|
3663
3669
|
)
|
|
3664
3670
|
);
|
|
3665
3671
|
const results = [];
|
|
@@ -3695,7 +3701,7 @@ function answersFasterOnMainCopy(state, pool, manager) {
|
|
|
3695
3701
|
if (manager.countDocuments() > MAIN_COPY_LONE_QUERY_DOCUMENTS) return false;
|
|
3696
3702
|
return takeMainCopyTurn(state);
|
|
3697
3703
|
}
|
|
3698
|
-
async function searchViaWorker(state, indexName, params, globalStats, partitionIds, patternWork) {
|
|
3704
|
+
async function searchViaWorker(state, indexName, params, globalStats, partitionIds, patternWork, bm25) {
|
|
3699
3705
|
const pool = state.workerPool;
|
|
3700
3706
|
if (!pool) return null;
|
|
3701
3707
|
if (!state.scaledOutIndexes.has(indexName) || state.copyLoadBuffers.has(indexName)) return null;
|
|
@@ -3710,7 +3716,7 @@ async function searchViaWorker(state, indexName, params, globalStats, partitionI
|
|
|
3710
3716
|
if (idle.length >= 2 && scoresPerPartition(state, indexName, params, globalStats)) {
|
|
3711
3717
|
leases.push(...idle);
|
|
3712
3718
|
fork = patternWork.fork(leases.length);
|
|
3713
|
-
const merged = await runSplit(leases, scope, indexName, params, globalStats, fork.shared);
|
|
3719
|
+
const merged = await runSplit(leases, scope, indexName, params, globalStats, fork.shared, bm25);
|
|
3714
3720
|
fork.settle(merged.patternWorkSpent ?? 0);
|
|
3715
3721
|
return merged;
|
|
3716
3722
|
}
|
|
@@ -3720,7 +3726,7 @@ async function searchViaWorker(state, indexName, params, globalStats, partitionI
|
|
|
3720
3726
|
leases.push(lease);
|
|
3721
3727
|
fork = patternWork.fork(1);
|
|
3722
3728
|
const result = await lease.executor.execute(
|
|
3723
|
-
queryAction(indexName, params, globalStats, partitionIds, fork.shared)
|
|
3729
|
+
queryAction(indexName, params, globalStats, partitionIds, fork.shared, bm25)
|
|
3724
3730
|
);
|
|
3725
3731
|
fork.settle(result.patternWorkSpent ?? 0);
|
|
3726
3732
|
return result;
|
|
@@ -3981,7 +3987,7 @@ function createWorkerOrchestrator(config, executor, indexRegistry, callbacks, ve
|
|
|
3981
3987
|
segmentBuildConcurrency: (indexName) => segmentBuildConcurrency(state, indexName),
|
|
3982
3988
|
holdUnbroadcastSegments: (indexName, segmentIds) => holdUnbroadcastSegments(state, indexName, segmentIds),
|
|
3983
3989
|
releaseUnbroadcastSegments: (indexName, segmentIds) => releaseUnbroadcastSegments(state, indexName, segmentIds),
|
|
3984
|
-
searchViaWorker: (indexName, params, globalStats, partitionIds, patternWork) => searchViaWorker(state, indexName, params, globalStats, partitionIds, patternWork),
|
|
3990
|
+
searchViaWorker: (indexName, params, globalStats, partitionIds, patternWork, bm25) => searchViaWorker(state, indexName, params, globalStats, partitionIds, patternWork, bm25),
|
|
3985
3991
|
hasWorkerPool: () => state.workerPool !== null,
|
|
3986
3992
|
mainCopyQueries: () => state.mainCopyQueries ?? "lone",
|
|
3987
3993
|
shareMainThread: () => {
|
|
@@ -4045,7 +4051,7 @@ async function emitWriteEventAfter(source, indexName, write) {
|
|
|
4045
4051
|
// src/engine/core.ts
|
|
4046
4052
|
async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
4047
4053
|
validateWorkerConfig(config?.workers, config?.lifecycle);
|
|
4048
|
-
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-
|
|
4054
|
+
const rerankSettings = config?.rerankTimeout === void 0 && config?.maxRerankWindow === void 0 ? { timeoutMs: DEFAULT_RERANK_TIMEOUT_MS, maxWindow: DEFAULT_MAX_RERANK_WINDOW } : (await import('./runtime-TBFBQQQO.mjs')).resolveRerankSettings(config);
|
|
4049
4055
|
const eventHandlers = eventHandlersOf(config?.events);
|
|
4050
4056
|
const vectorWorkerCount = splitWorkerBudget(resolveWorkerCount(config?.workers?.count)).vector;
|
|
4051
4057
|
const vectorCopyPolicy = {
|
|
@@ -4056,7 +4062,7 @@ async function createEngineCore(config, hooks, capacityScope = "index") {
|
|
|
4056
4062
|
if (config?.lifecycle !== void 0 && durabilityTier === null) {
|
|
4057
4063
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "Index lifecycle settings require durability");
|
|
4058
4064
|
}
|
|
4059
|
-
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-
|
|
4065
|
+
const durabilityWiring = durabilityTier === null ? null : await import('./durability-wiring-6R26AJDI.mjs');
|
|
4060
4066
|
const filesystemDurability = durabilityTier?.kind === "wal";
|
|
4061
4067
|
const executor = createDirectExecutor({
|
|
4062
4068
|
vectorWorkerCopies: vectorCopyPolicy,
|
|
@@ -4353,7 +4359,7 @@ async function shutdownEngine(core) {
|
|
|
4353
4359
|
}
|
|
4354
4360
|
}
|
|
4355
4361
|
if (core.rerankAdapters.size > 0) {
|
|
4356
|
-
await (await import('./runtime-
|
|
4362
|
+
await (await import('./runtime-TBFBQQQO.mjs')).shutdownRerankAdapters(core.rerankAdapters);
|
|
4357
4363
|
}
|
|
4358
4364
|
await orchestrator.shutdown();
|
|
4359
4365
|
await executor.shutdown();
|
|
@@ -4721,7 +4727,8 @@ function configurationPayloadOf(config, language, adapterName, analysisRevision,
|
|
|
4721
4727
|
...bm25 !== void 0 ? {
|
|
4722
4728
|
bm25: {
|
|
4723
4729
|
...bm25.k1 !== void 0 ? { k1: bm25.k1 } : {},
|
|
4724
|
-
...bm25.b !== void 0 ? { b: bm25.b } : {}
|
|
4730
|
+
...bm25.b !== void 0 ? { b: bm25.b } : {},
|
|
4731
|
+
...bm25.fields !== void 0 ? { fields: bm25.fields } : {}
|
|
4725
4732
|
}
|
|
4726
4733
|
} : {},
|
|
4727
4734
|
surfaceForms: config.surfaceForms !== false,
|
|
@@ -4809,14 +4816,21 @@ async function createEngineIndex(core, config, name, requestedConfig, creation =
|
|
|
4809
4816
|
const schema = validateSchema(requestedConfig.schema);
|
|
4810
4817
|
if (appliesCreationLimits) requireCreatableSchema(schema);
|
|
4811
4818
|
const configured = schema === requestedConfig.schema ? requestedConfig : { ...requestedConfig, schema };
|
|
4812
|
-
const indexConfig = withoutSynonyms(configured);
|
|
4819
|
+
const indexConfig = { ...withoutSynonyms(configured) };
|
|
4813
4820
|
requirePatternSearchFor(schema);
|
|
4814
4821
|
requirePartialWordSearchFor(schema);
|
|
4815
4822
|
validatePatternValueLimit(indexConfig.patternValueLimit);
|
|
4816
4823
|
requireSurfaceFormsForPartialFields(schema, indexConfig.surfaceForms);
|
|
4817
4824
|
validateVectorPromotion(indexConfig.vectorPromotion);
|
|
4818
4825
|
validateVectorStorage(indexConfig.vectorPromotion, core.filesystemDurability);
|
|
4819
|
-
|
|
4826
|
+
if (indexConfig.bm25 !== void 0) {
|
|
4827
|
+
validateBM25Params(
|
|
4828
|
+
indexConfig.bm25,
|
|
4829
|
+
schema,
|
|
4830
|
+
ErrorCodes.CONFIG_INVALID,
|
|
4831
|
+
appliesCreationLimits ? "settable" : "stored"
|
|
4832
|
+
);
|
|
4833
|
+
}
|
|
4820
4834
|
if (indexConfig.partitions) {
|
|
4821
4835
|
validatePartitionConfig(indexConfig.partitions);
|
|
4822
4836
|
}
|
|
@@ -6485,6 +6499,58 @@ function readProcessMemory() {
|
|
|
6485
6499
|
}
|
|
6486
6500
|
}
|
|
6487
6501
|
|
|
6502
|
+
// src/engine/bm25-update.ts
|
|
6503
|
+
async function replaceNow(core, indexName, bm25) {
|
|
6504
|
+
const { config } = core.requireIndex(indexName);
|
|
6505
|
+
const previous = config.bm25;
|
|
6506
|
+
config.bm25 = bm25;
|
|
6507
|
+
try {
|
|
6508
|
+
if (core.durability) await core.durability.manager.persistMetadata(indexName);
|
|
6509
|
+
} catch (err) {
|
|
6510
|
+
config.bm25 = previous;
|
|
6511
|
+
throw err;
|
|
6512
|
+
}
|
|
6513
|
+
await core.orchestrator.replicateToWorkers({
|
|
6514
|
+
type: "replaceBm25",
|
|
6515
|
+
indexName,
|
|
6516
|
+
requestId: `replace-bm25-${indexName}`,
|
|
6517
|
+
...bm25 !== void 0 ? { bm25 } : {}
|
|
6518
|
+
});
|
|
6519
|
+
await core.orchestrator.awaitWrites(indexName);
|
|
6520
|
+
}
|
|
6521
|
+
function updateIndexBm25(core, indexName, value) {
|
|
6522
|
+
return withOpenIndex(
|
|
6523
|
+
core,
|
|
6524
|
+
indexName,
|
|
6525
|
+
() => oneAtATime(core, indexName, () => {
|
|
6526
|
+
const entry = core.requireIndex(indexName);
|
|
6527
|
+
validateBM25Params(value, entry.config.schema, ErrorCodes.CONFIG_INVALID);
|
|
6528
|
+
return replaceNow(core, indexName, storedBM25Params(value));
|
|
6529
|
+
})
|
|
6530
|
+
);
|
|
6531
|
+
}
|
|
6532
|
+
function applyStoredIndexBm25(core, indexName, load) {
|
|
6533
|
+
return withOpenIndex(
|
|
6534
|
+
core,
|
|
6535
|
+
indexName,
|
|
6536
|
+
() => oneAtATime(core, indexName, async () => {
|
|
6537
|
+
const loaded = load();
|
|
6538
|
+
if (loaded === null) return false;
|
|
6539
|
+
await replaceNow(core, indexName, loaded.bm25);
|
|
6540
|
+
return true;
|
|
6541
|
+
})
|
|
6542
|
+
);
|
|
6543
|
+
}
|
|
6544
|
+
|
|
6545
|
+
// src/narsil/bm25.ts
|
|
6546
|
+
function bm25Operations(core) {
|
|
6547
|
+
return {
|
|
6548
|
+
async updateBM25(indexName, bm25) {
|
|
6549
|
+
await updateIndexBm25(core, indexName, bm25);
|
|
6550
|
+
}
|
|
6551
|
+
};
|
|
6552
|
+
}
|
|
6553
|
+
|
|
6488
6554
|
// src/persistence/archive/byte-reader.ts
|
|
6489
6555
|
async function* chunksOf(source) {
|
|
6490
6556
|
if (source instanceof Uint8Array) {
|
|
@@ -6942,7 +7008,7 @@ async function readDocumentExport(engine, indexName, source) {
|
|
|
6942
7008
|
|
|
6943
7009
|
// src/narsil/portability.ts
|
|
6944
7010
|
function portabilityOperations(core, config, engine) {
|
|
6945
|
-
async function
|
|
7011
|
+
async function withOpenIndex2(indexName, action) {
|
|
6946
7012
|
core.guardShutdown();
|
|
6947
7013
|
core.requireIndex(indexName);
|
|
6948
7014
|
const release = await core.indexState.acquire(indexName);
|
|
@@ -6970,25 +7036,25 @@ function portabilityOperations(core, config, engine) {
|
|
|
6970
7036
|
}
|
|
6971
7037
|
return {
|
|
6972
7038
|
snapshot(indexName) {
|
|
6973
|
-
return
|
|
6974
|
-
const { createSnapshot } = await import('./snapshot-
|
|
7039
|
+
return withOpenIndex2(indexName, async () => {
|
|
7040
|
+
const { createSnapshot } = await import('./snapshot-PUVSMV7E.mjs');
|
|
6975
7041
|
return createSnapshot(snapshotDepsOf(indexName));
|
|
6976
7042
|
});
|
|
6977
7043
|
},
|
|
6978
7044
|
async restore(indexName, data) {
|
|
6979
7045
|
core.guardShutdown();
|
|
6980
7046
|
validateIndexName(indexName);
|
|
6981
|
-
const restored = import('./restore-queue-
|
|
7047
|
+
const restored = import('./restore-queue-PUGWCPCX.mjs').then(
|
|
6982
7048
|
({ queueRestore }) => queueRestore(core, restoreHost, restoresInFlight, indexName, data)
|
|
6983
7049
|
);
|
|
6984
7050
|
await emitWriteEventAfter(core, indexName, restored);
|
|
6985
7051
|
core.heapPressureNotifier.check(indexName);
|
|
6986
7052
|
},
|
|
6987
7053
|
exportDocuments(indexName) {
|
|
6988
|
-
return
|
|
7054
|
+
return withOpenIndex2(indexName, async () => {
|
|
6989
7055
|
const [{ checkpointForArchive }, { documentExportStream }] = await Promise.all([
|
|
6990
|
-
import('./snapshot-
|
|
6991
|
-
import('./write-
|
|
7056
|
+
import('./snapshot-PUVSMV7E.mjs'),
|
|
7057
|
+
import('./write-TGKYT3C4.mjs')
|
|
6992
7058
|
]);
|
|
6993
7059
|
const header = indexConfigurationOf(core.requireIndex(indexName));
|
|
6994
7060
|
return documentExportStream(header, await checkpointForArchive(snapshotDepsOf(indexName)));
|
|
@@ -7040,7 +7106,7 @@ async function runEngineQuery(core, indexName, params, options) {
|
|
|
7040
7106
|
const manager = core.requireManager(indexName);
|
|
7041
7107
|
const scoped = scopedParams(params, options);
|
|
7042
7108
|
await core.pluginRegistry.runHook("beforeSearch", { indexName, params: scoped });
|
|
7043
|
-
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-
|
|
7109
|
+
const rerank = scoped.rerank === void 0 ? void 0 : await import('./runtime-TBFBQQQO.mjs');
|
|
7044
7110
|
const resolvedParams = await resolveVectorText(
|
|
7045
7111
|
rerank === void 0 ? scoped : rerank.withRerankQueryText(scoped),
|
|
7046
7112
|
entry.embeddingAdapter,
|
|
@@ -7057,6 +7123,7 @@ async function runEngineQuery(core, indexName, params, options) {
|
|
|
7057
7123
|
broadcastStats: broadcastStatsFor(core, options),
|
|
7058
7124
|
partitionIds: options?.partitionIds,
|
|
7059
7125
|
rescoreWindow: options?.rescoreWindow,
|
|
7126
|
+
indexBm25: options?.indexBm25,
|
|
7060
7127
|
cursorBinding: lazyQueryBinding(params),
|
|
7061
7128
|
patternWorkCap: core.patternWorkCap,
|
|
7062
7129
|
rerank: rerank?.rerankRunnerFor(core)
|
|
@@ -7106,6 +7173,7 @@ async function runEnginePreflight(core, indexName, params, options) {
|
|
|
7106
7173
|
indexName,
|
|
7107
7174
|
broadcastStats: broadcastStatsFor(core, options),
|
|
7108
7175
|
partitionIds: options?.partitionIds,
|
|
7176
|
+
indexBm25: options?.indexBm25,
|
|
7109
7177
|
cursorBinding: lazyQueryBinding(params),
|
|
7110
7178
|
patternWorkCap: core.patternWorkCap
|
|
7111
7179
|
};
|
|
@@ -7216,7 +7284,7 @@ function createNarsilFromCore(core, config) {
|
|
|
7216
7284
|
mutationCtx,
|
|
7217
7285
|
rebalanceCtx
|
|
7218
7286
|
} = core;
|
|
7219
|
-
async function
|
|
7287
|
+
async function withOpenIndex2(indexName, action) {
|
|
7220
7288
|
guardShutdown();
|
|
7221
7289
|
requireIndex(indexName);
|
|
7222
7290
|
const release = await core.indexState.acquire(indexName);
|
|
@@ -7227,7 +7295,7 @@ function createNarsilFromCore(core, config) {
|
|
|
7227
7295
|
}
|
|
7228
7296
|
}
|
|
7229
7297
|
function withOpenIndexWrite(indexName, action) {
|
|
7230
|
-
return emitWriteEventAfter(core, indexName,
|
|
7298
|
+
return emitWriteEventAfter(core, indexName, withOpenIndex2(indexName, action));
|
|
7231
7299
|
}
|
|
7232
7300
|
const narsil = {
|
|
7233
7301
|
createIndex(name, indexConfig) {
|
|
@@ -7313,12 +7381,12 @@ function createNarsilFromCore(core, config) {
|
|
|
7313
7381
|
return orchestrator.awaitWrites(indexName);
|
|
7314
7382
|
},
|
|
7315
7383
|
async get(indexName, docId) {
|
|
7316
|
-
return
|
|
7384
|
+
return withOpenIndex2(indexName, () => executor.execute({ type: "get", indexName, docId, requestId: docId }));
|
|
7317
7385
|
},
|
|
7318
7386
|
async getMultiple(indexName, docIds) {
|
|
7319
7387
|
guardShutdown();
|
|
7320
7388
|
requireIndex(indexName);
|
|
7321
|
-
return
|
|
7389
|
+
return withOpenIndex2(indexName, async () => {
|
|
7322
7390
|
const result = /* @__PURE__ */ new Map();
|
|
7323
7391
|
for (const docId of docIds) {
|
|
7324
7392
|
const doc = await executor.execute({
|
|
@@ -7333,10 +7401,10 @@ function createNarsilFromCore(core, config) {
|
|
|
7333
7401
|
});
|
|
7334
7402
|
},
|
|
7335
7403
|
async has(indexName, docId) {
|
|
7336
|
-
return
|
|
7404
|
+
return withOpenIndex2(indexName, () => executor.execute({ type: "has", indexName, docId, requestId: docId }));
|
|
7337
7405
|
},
|
|
7338
7406
|
async countDocuments(indexName) {
|
|
7339
|
-
return
|
|
7407
|
+
return withOpenIndex2(indexName, () => executor.execute({ type: "count", indexName, requestId: indexName }));
|
|
7340
7408
|
},
|
|
7341
7409
|
async listDocuments(indexName, params) {
|
|
7342
7410
|
return runEngineListDocuments(core, indexName, params ?? {});
|
|
@@ -7357,10 +7425,11 @@ function createNarsilFromCore(core, config) {
|
|
|
7357
7425
|
},
|
|
7358
7426
|
...portabilityOperations(core, config, () => narsil),
|
|
7359
7427
|
...synonymOperations(core),
|
|
7428
|
+
...bm25Operations(core),
|
|
7360
7429
|
async checkpoint(indexName) {
|
|
7361
7430
|
guardShutdown();
|
|
7362
7431
|
requireIndex(indexName);
|
|
7363
|
-
await
|
|
7432
|
+
await withOpenIndex2(indexName, async () => {
|
|
7364
7433
|
if (durability) await durability.manager.checkpoint(indexName);
|
|
7365
7434
|
});
|
|
7366
7435
|
},
|
|
@@ -7383,7 +7452,7 @@ function createNarsilFromCore(core, config) {
|
|
|
7383
7452
|
},
|
|
7384
7453
|
async updatePartitionConfig(indexName, partitionConfig) {
|
|
7385
7454
|
guardShutdown();
|
|
7386
|
-
return
|
|
7455
|
+
return withOpenIndex2(indexName, async () => {
|
|
7387
7456
|
const entry = requireIndex(indexName);
|
|
7388
7457
|
const manager = requireManager(indexName);
|
|
7389
7458
|
if (rebalancingIndexes.has(indexName)) {
|
|
@@ -7498,4 +7567,4 @@ async function createNarsil(config) {
|
|
|
7498
7567
|
// src/index.ts
|
|
7499
7568
|
var VERSION = "0.1.0";
|
|
7500
7569
|
|
|
7501
|
-
export { BYTES_TAG, DATE_TAG, DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, HEADER_SIZE, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, NUMBER_TAG, OBJECT_TAG, VERSION, crc322 as crc32, crc32Final, crc32Init, crc32Update, createByteReader, createEngineCore, createEngineIndex, createNarsil, createNarsilFromCore, decodeIndexConfiguration, emptySerializablePartition, encodeBase64, encodeIndexConfiguration, engineVersionParts, hasNrslMagic, insertDocumentVectors, openChecksummedEnvelope, packChecksummedEnvelope, prepareConfiguredSynonyms, prepareDocumentVectors, prepareStoredSynonyms, readHeader, reconstructSchemaFromMetadata, removeDocumentVectors, requireConfigurationWithinSizeLimit, requireKnownConfig, resolveRunnableConfig, rulesOfStoredSynonyms, runEngineListDocuments, runEnginePreflight, runEngineQuery, runEngineQueryStats, runEngineSuggest, startEngineCore, startsWithTagPrefix, validateEmbeddingConfig, validateRequiredFieldsInSchema, writeHeader, yieldToEventLoop };
|
|
7570
|
+
export { BYTES_TAG, DATE_TAG, DOCUMENT_EXPORT_FORMAT, DOCUMENT_EXPORT_VERSION, HEADER_SIZE, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, NUMBER_TAG, OBJECT_TAG, VERSION, applyStoredIndexBm25, crc322 as crc32, crc32Final, crc32Init, crc32Update, createByteReader, createEngineCore, createEngineIndex, createNarsil, createNarsilFromCore, decodeIndexConfiguration, emptySerializablePartition, encodeBase64, encodeIndexConfiguration, engineVersionParts, hasNrslMagic, insertDocumentVectors, openChecksummedEnvelope, packChecksummedEnvelope, prepareConfiguredSynonyms, prepareDocumentVectors, prepareStoredSynonyms, readHeader, reconstructSchemaFromMetadata, removeDocumentVectors, requireConfigurationWithinSizeLimit, requireKnownConfig, resolveRunnableConfig, rulesOfStoredSynonyms, runEngineListDocuments, runEnginePreflight, runEngineQuery, runEngineQueryStats, runEngineSuggest, startEngineCore, startsWithTagPrefix, validateEmbeddingConfig, validateRequiredFieldsInSchema, writeHeader, yieldToEventLoop };
|
|
@@ -1,14 +1,14 @@
|
|
|
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-5LC5VMDQ.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-
|
|
5
|
-
import { freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, selectionKeeps, decodeMapWithoutFields, shareSegmentArrays, segmentArraysOf, mergeSegmentContents } from './chunk-
|
|
6
|
-
import { fnv1a, isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-
|
|
7
|
-
import { generateId, getLanguage } from './chunk-
|
|
8
|
-
import { extractVectorFieldsFromSchema, partialFieldsOf, messagePackUpperBoundBytes } from './chunk-
|
|
4
|
+
import { packChecksummedEnvelope, crc32, openChecksummedEnvelope, reconstructSchemaFromMetadata, HEADER_SIZE, prepareDocumentVectors } from './chunk-2YOAGAGF.mjs';
|
|
5
|
+
import { freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, selectionKeeps, decodeMapWithoutFields, shareSegmentArrays, segmentArraysOf, mergeSegmentContents } from './chunk-RYH3PASD.mjs';
|
|
6
|
+
import { fnv1a, isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-K76F5YYX.mjs';
|
|
7
|
+
import { generateId, getLanguage } from './chunk-M6MBSVIJ.mjs';
|
|
8
|
+
import { extractVectorFieldsFromSchema, partialFieldsOf, messagePackUpperBoundBytes } from './chunk-AFOZR4ZQ.mjs';
|
|
9
9
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
10
|
-
import { resolveIndexAnalysis } from './chunk-
|
|
11
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
10
|
+
import { resolveIndexAnalysis } from './chunk-MGD7XETB.mjs';
|
|
11
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
12
12
|
import { encode, decode } from '@msgpack/msgpack';
|
|
13
13
|
|
|
14
14
|
// src/persistence/durability/constants.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sendError, RELAY_STREAM_CHUNKS_IN_FLIGHT } from './chunk-
|
|
2
|
-
import { ServerErrorCodes } from './chunk-
|
|
1
|
+
import { sendError, RELAY_STREAM_CHUNKS_IN_FLIGHT } from './chunk-TB7YMDD5.mjs';
|
|
2
|
+
import { ServerErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
3
3
|
import { rm } from 'fs/promises';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { MAX_PARTITION_COUNT, MAX_REPLICATION_FACTOR } from './chunk-P36MUFEJ.mjs';
|
|
2
|
-
import {
|
|
3
|
-
import { generateId, getLanguage } from './chunk-
|
|
4
|
-
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-
|
|
2
|
+
import { restoredEmbedding, restoredPartitionConfig, readSharedConfigFields } from './chunk-2HQQ7Y5D.mjs';
|
|
3
|
+
import { generateId, getLanguage } from './chunk-M6MBSVIJ.mjs';
|
|
4
|
+
import { MAX_INDEX_NAME_LENGTH, INDEX_NAME_PATTERN } from './chunk-Y4NOHICF.mjs';
|
|
5
5
|
import { decodeSynonymRules } from './chunk-7X5JST5L.mjs';
|
|
6
6
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
7
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
7
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
8
8
|
import { encode, decode } from '@msgpack/msgpack';
|
|
9
9
|
|
|
10
10
|
// src/narsil/write-blocks.ts
|
|
@@ -217,7 +217,8 @@ function settingsFieldsOf(source) {
|
|
|
217
217
|
...bm25 !== void 0 ? {
|
|
218
218
|
bm25: {
|
|
219
219
|
...bm25.k1 !== void 0 ? { k1: bm25.k1 } : {},
|
|
220
|
-
...bm25.b !== void 0 ? { b: bm25.b } : {}
|
|
220
|
+
...bm25.b !== void 0 ? { b: bm25.b } : {},
|
|
221
|
+
...bm25.fields !== void 0 ? { fields: bm25.fields } : {}
|
|
221
222
|
}
|
|
222
223
|
} : {},
|
|
223
224
|
...source.surfaceForms !== void 0 ? { surfaceForms: source.surfaceForms } : {},
|
|
@@ -268,8 +269,13 @@ function decodeIndexSettings(raw, indexName) {
|
|
|
268
269
|
const embedding = restoredEmbedding(raw.embedding, reject);
|
|
269
270
|
const partitions = restoredPartitionConfig(raw.partitionConfig, reject);
|
|
270
271
|
const synonyms = raw.synonyms === void 0 ? void 0 : decodeSynonymSetRef(raw.synonyms, reject);
|
|
272
|
+
const bm25Revision = raw.bm25Revision;
|
|
273
|
+
if (bm25Revision !== void 0 && (!Number.isSafeInteger(bm25Revision) || bm25Revision < 0)) {
|
|
274
|
+
return reject("bm25Revision must be a non-negative integer");
|
|
275
|
+
}
|
|
271
276
|
return {
|
|
272
277
|
language: raw.language,
|
|
278
|
+
...typeof bm25Revision === "number" ? { bm25Revision } : {},
|
|
273
279
|
...settingsFieldsOf({
|
|
274
280
|
...readSharedConfigFields(raw, reject),
|
|
275
281
|
...partitions !== void 0 ? { partitions } : {},
|
|
@@ -285,7 +291,7 @@ function indexConfigFromSettings(schema, settings, indexName) {
|
|
|
285
291
|
if (settings === void 0) {
|
|
286
292
|
return { schema };
|
|
287
293
|
}
|
|
288
|
-
const { language, embedding, partitionConfig, synonyms: _synonyms, ...fields } = settings;
|
|
294
|
+
const { language, embedding, partitionConfig, synonyms: _synonyms, bm25Revision: _revision, ...fields } = settings;
|
|
289
295
|
return {
|
|
290
296
|
schema,
|
|
291
297
|
language,
|
|
@@ -294,8 +300,6 @@ function indexConfigFromSettings(schema, settings, indexName) {
|
|
|
294
300
|
...embedding !== void 0 ? { embedding } : {}
|
|
295
301
|
};
|
|
296
302
|
}
|
|
297
|
-
|
|
298
|
-
// src/distribution/cluster/index-metadata.ts
|
|
299
303
|
var INDEX_CONFIG_PREFIX = "_narsil/index/";
|
|
300
304
|
var INDEX_CONFIG_SUFFIX = "/config";
|
|
301
305
|
function truncateForDisplay(value) {
|
|
@@ -445,6 +449,13 @@ function metadataWithSynonymSet(snapshot, ref) {
|
|
|
445
449
|
const nextSettings = ref === null ? settings : { ...settings, synonyms: ref };
|
|
446
450
|
return new Uint8Array(encode({ ...fields, settings: nextSettings }, { ignoreUndefined: true }));
|
|
447
451
|
}
|
|
452
|
+
function metadataWithBm25(snapshot, bm25, bm25Revision) {
|
|
453
|
+
const decoded = decode(snapshot.bytes);
|
|
454
|
+
const fields = isRecord2(decoded) ? decoded : {};
|
|
455
|
+
const { bm25: _replaced, ...settings } = isRecord2(fields.settings) ? fields.settings : { language: snapshot.settings?.language ?? getLanguage("english").name };
|
|
456
|
+
const nextSettings = { ...settings, bm25Revision, ...bm25 !== void 0 ? { bm25 } : {} };
|
|
457
|
+
return new Uint8Array(encode({ ...fields, settings: nextSettings }, { ignoreUndefined: true }));
|
|
458
|
+
}
|
|
448
459
|
async function putIndexReplicationFactor(coordinator, indexName, replicationFactor) {
|
|
449
460
|
validateIndexName(indexName);
|
|
450
461
|
const key = indexConfigKey(indexName);
|
|
@@ -518,4 +529,4 @@ function storedSynonymSetOf(bytes) {
|
|
|
518
529
|
return ref === null ? null : { indexUuid: decoded.indexUuid, ref };
|
|
519
530
|
}
|
|
520
531
|
|
|
521
|
-
export { ALLOCATION_CAS_ATTEMPTS, ALLOCATION_RETRY_DELAY_MS, BOOTSTRAP_CAS_ATTEMPTS, DEFAULT_CONTROLLER_CONFIG, DEFAULT_NODE_LIFECYCLE_CONFIG, ESTIMATED_PARTITION_BYTES, HIDDEN_GENERATION_PREFIX, LEADERSHIP_IMBALANCE_THRESHOLD, MAX_RESHARD_CUTOVER_ATTEMPTS, PARTITION_STORES_TIMEOUT_MS, REBALANCE_THRESHOLD, RECOVERY_CAS_ATTEMPTS, RESHARD_CONTROLLER_POLL_INTERVAL_MS, RESHARD_CUTOVER_LAG_ENTRIES, RESHARD_CUTOVER_TIMEOUT_MS, RESHARD_FORWARD_BATCH_DOCUMENTS, RESHARD_POLL_INTERVAL_MS, RESHARD_RECORD_CAS_ATTEMPTS, RESHARD_RECORD_CHECK_INTERVAL_MS, RESHARD_RETRY_DELAY_MS, TEARDOWN_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, TEARDOWN_RETRY_ROUNDS, bindEngineWriteBlock, bindIndexReads, bindWriteBlockLookup, deleteSynonymSet, getClusterIndexConfig, getIndexMetadata, indexConfigFromSettings, indexConfigKey, indexReadsOf, indexSettingsOf, indexUuidOfStoredMetadata, isRecord, isValidInteger, metadataWithSynonymSet, putGenerationMetadata, putIndexMetadata, putIndexReplicationFactor, readIndexMetadataSnapshot, readIndexState, storeSynonymSet, storedSynonymSetOf, validateIndexName, withPartitionCount, writeBlockLookupOf };
|
|
532
|
+
export { ALLOCATION_CAS_ATTEMPTS, ALLOCATION_RETRY_DELAY_MS, BOOTSTRAP_CAS_ATTEMPTS, DEFAULT_CONTROLLER_CONFIG, DEFAULT_NODE_LIFECYCLE_CONFIG, ESTIMATED_PARTITION_BYTES, HIDDEN_GENERATION_PREFIX, LEADERSHIP_IMBALANCE_THRESHOLD, MAX_RESHARD_CUTOVER_ATTEMPTS, PARTITION_STORES_TIMEOUT_MS, REBALANCE_THRESHOLD, RECOVERY_CAS_ATTEMPTS, RESHARD_CONTROLLER_POLL_INTERVAL_MS, RESHARD_CUTOVER_LAG_ENTRIES, RESHARD_CUTOVER_TIMEOUT_MS, RESHARD_FORWARD_BATCH_DOCUMENTS, RESHARD_POLL_INTERVAL_MS, RESHARD_RECORD_CAS_ATTEMPTS, RESHARD_RECORD_CHECK_INTERVAL_MS, RESHARD_RETRY_DELAY_MS, TEARDOWN_CAS_ATTEMPTS, TEARDOWN_RETRY_DELAY_MS, TEARDOWN_RETRY_ROUNDS, bindEngineWriteBlock, bindIndexReads, bindWriteBlockLookup, decodeIndexSettings, deleteSynonymSet, getClusterIndexConfig, getIndexMetadata, indexConfigFromSettings, indexConfigKey, indexReadsOf, indexSettingsOf, indexUuidOfStoredMetadata, isRecord, isRecord2, isValidInteger, metadataWithBm25, metadataWithSynonymSet, putGenerationMetadata, putIndexMetadata, putIndexReplicationFactor, readIndexMetadataSnapshot, readIndexState, storeSynonymSet, storedSynonymSetOf, validateIndexName, withPartitionCount, writeBlockLookupOf };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SCRATCH_SLOTS_PER_THREAD_POOL } from './chunk-QSK35UC2.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
3
3
|
|
|
4
4
|
// src/workers/constants.ts
|
|
5
5
|
var WORKER_YOUNG_GENERATION_MB = 24;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PARSED_FIELD_TYPE_CACHE_ENTRIES, VECTOR_PATTERN, MAX_STORED_VECTOR_DIMENSION } from './chunk-L5ORED7V.mjs';
|
|
2
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
2
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
3
3
|
|
|
4
4
|
// src/schema/validator/field-type.ts
|
|
5
5
|
var FIELD_OPTION_ORDER = ["sortable", "pattern", "partial"];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-
|
|
2
|
-
import { getNestedValue } from './chunk-
|
|
3
|
-
import { requireValidFieldTypes } from './chunk-
|
|
1
|
+
import { removeDocumentVectors, prepareDocumentVectors, insertDocumentVectors } from './chunk-2YOAGAGF.mjs';
|
|
2
|
+
import { getNestedValue } from './chunk-F4UKMTKM.mjs';
|
|
3
|
+
import { requireValidFieldTypes } from './chunk-AFOZR4ZQ.mjs';
|
|
4
4
|
import { VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
5
|
-
import { ErrorCodes, NarsilError } from './chunk-
|
|
5
|
+
import { ErrorCodes, NarsilError } from './chunk-WI5Q3L43.mjs';
|
|
6
6
|
import { decode } from '@msgpack/msgpack';
|
|
7
7
|
|
|
8
8
|
function validateReplicationEntry(entry, localPrimaryTerm, log) {
|
|
@@ -1,6 +1,6 @@
|
|
|
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, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, createOrdinalFilter, addToOrdinalFilter, slotByteOffset, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, grownByteLength, createVectorBlock, ensureBlockSlots, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes } 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, STORE_DOC_ID_BYTES, unplacedChunkCount, blocksGrowthBytes, growBufferTo, createOrdinalFilter, addToOrdinalFilter, slotByteOffset, openVectorBlock, NOTHING_STAGED, arenaFloat32Distance, detachNativeStore, STORE_BLOCK_COUNT, STORE_CODE_BLOCK_COUNT, grownByteLength, createVectorBlock, ensureBlockSlots, QUERY_STAGED, euclideanDistance, dotProduct, cosineSimilarityWithMagnitudes } from './chunk-XRXBCOA4.mjs';
|
|
2
2
|
import { MAX_VECTOR_ORDINALS } from './chunk-QSK35UC2.mjs';
|
|
3
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
4
4
|
import { readSync, closeSync, openSync } from 'fs';
|
|
5
5
|
|
|
6
6
|
function createVectorFileReader() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MAX_DOCUMENT_ENCODING_DEPTH, DOCUMENT_ENCODER_RETAINED_BUFFER_BYTES, DOCUMENT_REPLY_ENVELOPE_DEPTH } from './chunk-U476IXKQ.mjs';
|
|
2
2
|
import { EARLIER_RELEASE_MIN_M, MIN_M, MAX_M } from './chunk-VJS4JFBQ.mjs';
|
|
3
|
-
import { isWordIndexedBase, parseFieldType } from './chunk-
|
|
3
|
+
import { isWordIndexedBase, parseFieldType } from './chunk-4XEVROSP.mjs';
|
|
4
4
|
import { compareCodePoints, holdsUnpairedSurrogate, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
5
5
|
import { DEFAULT_PATTERN_VALUE_LIMIT, isPlainObject, MAX_TEXT_FIELDS, MAX_VECTOR_DIMENSION, MAX_DOCUMENT_BYTES, MAX_NESTING_DEPTH, PROTOTYPE_POLLUTION_KEYS, FIELD_NAME_PATTERN, RESERVED_ROOT_FIELDS, MAX_DOCUMENT_NESTING_DEPTH, VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
6
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
7
7
|
import { Encoder, encode } from '@msgpack/msgpack';
|
|
8
8
|
|
|
9
9
|
// src/schema/validator/schema.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MAX_FILTER_ARRAY_SIZE } from './chunk-WQBCBKY3.mjs';
|
|
2
2
|
import { tabulatedLevenshtein } from './chunk-GES7U2PM.mjs';
|
|
3
|
-
import { parsedTypeOf } from './chunk-
|
|
3
|
+
import { parsedTypeOf } from './chunk-4XEVROSP.mjs';
|
|
4
4
|
import { codePointCount, exceedsCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
5
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
5
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
6
6
|
|
|
7
7
|
// src/core/bitset.ts
|
|
8
8
|
function createBitSet(capacity) {
|
|
@@ -1,8 +1,8 @@
|
|
|
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-37RTD6KD.mjs';
|
|
4
4
|
import { compareCodePoints } from './chunk-YTJCGKM4.mjs';
|
|
5
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
5
|
+
import { NarsilError, ErrorCodes } from './chunk-WI5Q3L43.mjs';
|
|
6
6
|
import { openSync, close, readFileSync } from 'fs';
|
|
7
7
|
import { rename, readFile, writeFile, unlink, realpath, readdir, readlink } from 'fs/promises';
|
|
8
8
|
import { endianness } from 'os';
|
|
@@ -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-WUIDPBSY.mjs';
|
|
2
|
+
import { readWalSegments, durableRecordMissing, checkpointLastSeqNo, SEGMENT_HEADER_SIZE } from './chunk-37RTD6KD.mjs';
|
|
3
|
+
import { applyDeleteEntry, applyIndexEntry } from './chunk-5LC5VMDQ.mjs';
|
|
4
4
|
|
|
5
5
|
// src/persistence/durability/recovery.ts
|
|
6
6
|
async function listPersistedIndexes(directory) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// src/search/constants.ts
|
|
2
2
|
var RESULT_WINDOW = 1e4;
|
|
3
3
|
var DEFAULT_PAGE_SIZE = 10;
|
|
4
|
+
var BM25_DISPLAYED_NAME_LENGTH = 64;
|
|
4
5
|
var MAX_CURSOR_LENGTH = 40960;
|
|
5
6
|
var MAX_SORT_FIELDS = 8;
|
|
6
7
|
var MAX_SORT_FIELD_NAME_LENGTH = 255;
|
|
@@ -21,4 +22,4 @@ var MIN_HYBRID_DEPTH = 1;
|
|
|
21
22
|
var MAX_HYBRID_DEPTH = 1e4;
|
|
22
23
|
var HYBRID_RESCORE_WINDOW = 10;
|
|
23
24
|
|
|
24
|
-
export { DEFAULT_FUZZY_PREFIX_LENGTH, DEFAULT_LINEAR_ALPHA, DEFAULT_MAX_PER_GROUP, DEFAULT_PAGE_SIZE, DEFAULT_RANK_CONSTANT, HYBRID_RESCORE_WINDOW, MAX_CURSOR_ANCHOR_CODE_POINTS, MAX_CURSOR_LENGTH, MAX_HYBRID_DEPTH, MAX_LINEAR_ALPHA, MAX_PREFIX_LENGTH, MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, MAX_TOLERANCE, MIN_HYBRID_DEPTH, MIN_LINEAR_ALPHA, MIN_RANK_CONSTANT, PARTIAL_WORDS_ADDED_PER_QUERY, PARTIAL_WORD_MIN_CODE_POINTS, PREFIX_MAX_EXPANSIONS, RESULT_WINDOW };
|
|
25
|
+
export { BM25_DISPLAYED_NAME_LENGTH, DEFAULT_FUZZY_PREFIX_LENGTH, DEFAULT_LINEAR_ALPHA, DEFAULT_MAX_PER_GROUP, DEFAULT_PAGE_SIZE, DEFAULT_RANK_CONSTANT, HYBRID_RESCORE_WINDOW, MAX_CURSOR_ANCHOR_CODE_POINTS, MAX_CURSOR_LENGTH, MAX_HYBRID_DEPTH, MAX_LINEAR_ALPHA, MAX_PREFIX_LENGTH, MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, MAX_TOLERANCE, MIN_HYBRID_DEPTH, MIN_LINEAR_ALPHA, MIN_RANK_CONSTANT, PARTIAL_WORDS_ADDED_PER_QUERY, PARTIAL_WORD_MIN_CODE_POINTS, PREFIX_MAX_EXPANSIONS, RESULT_WINDOW };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { sendRelayed, parseJson, validateQuery, rejectInvalid, refuseRegex, respondJson, withServerRerankWindow, respondError, loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedBodyBudget, createSharedRequestGate, registerServerRoutes, closeWhenTheProcessExits, statusLine, sendError, REQUEST_THREAD_MOVE_AFTER_MS, MAX_LONG_QUERIES_IN_FLIGHT, createDocumentReadHandlers, SERVER_CAPABILITIES, versionReport, serverRoutes, validateSuggest, SEARCH_CLOCK_SAMPLE_UNITS, awaitDepartureConfirmation, departureConfirmation, REQUEST_THREAD_DEPARTURE_DRAIN_MS, departureConfirmed, encodeJson } from './chunk-
|
|
1
|
+
import { sendRelayed, parseJson, validateQuery, rejectInvalid, refuseRegex, respondJson, withServerRerankWindow, respondError, loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedBodyBudget, createSharedRequestGate, registerServerRoutes, closeWhenTheProcessExits, statusLine, sendError, REQUEST_THREAD_MOVE_AFTER_MS, MAX_LONG_QUERIES_IN_FLIGHT, createDocumentReadHandlers, SERVER_CAPABILITIES, versionReport, serverRoutes, validateSuggest, SEARCH_CLOCK_SAMPLE_UNITS, awaitDepartureConfirmation, departureConfirmation, REQUEST_THREAD_DEPARTURE_DRAIN_MS, departureConfirmed, encodeJson } from './chunk-TB7YMDD5.mjs';
|
|
2
2
|
import { withRerankQueryText } from './chunk-KZ3NX2P7.mjs';
|
|
3
|
-
import { executeListDocuments, executeSuggest, executeQuery, lazyQueryBinding, executePreflight } from './chunk-
|
|
4
|
-
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-
|
|
5
|
-
import { extractVectorFieldsFromSchema } from './chunk-
|
|
6
|
-
import { ServerErrorCodes, ErrorCodes, NarsilError, isNarsilError } from './chunk-
|
|
3
|
+
import { executeListDocuments, executeSuggest, executeQuery, lazyQueryBinding, executePreflight } from './chunk-PCRWCOZC.mjs';
|
|
4
|
+
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-K76F5YYX.mjs';
|
|
5
|
+
import { extractVectorFieldsFromSchema } from './chunk-AFOZR4ZQ.mjs';
|
|
6
|
+
import { ServerErrorCodes, ErrorCodes, NarsilError, isNarsilError } from './chunk-WI5Q3L43.mjs';
|
|
7
7
|
|
|
8
8
|
// src/server/request-threads/messages.ts
|
|
9
9
|
function isLongQueryPortNote(message) {
|