@delali/narsil 0.3.1-next.79 → 0.3.1-next.82
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/README.md +3 -3
- package/dist/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/{capabilities-1lEYL3WK.d.ts → capabilities-CAdkp2P-.d.ts} +2 -2
- package/dist/{chunk-XSZTF4ZQ.mjs → chunk-2453RJYK.mjs} +2 -2
- package/dist/{chunk-DFW3U5UW.mjs → chunk-4CWHWOBI.mjs} +24 -195
- package/dist/{chunk-R6WBLBTC.mjs → chunk-4D6OH4EF.mjs} +10 -46
- package/dist/{chunk-RTR44V2A.mjs → chunk-4VBG6PEH.mjs} +586 -4
- package/dist/{chunk-Y3L5MDRV.mjs → chunk-5XNIRLFC.mjs} +2 -2
- package/dist/{chunk-2E35UM3G.mjs → chunk-B3UOQJD3.mjs} +1 -1
- package/dist/{chunk-PJWG547Z.mjs → chunk-GNYXCLJS.mjs} +5 -5
- package/dist/{chunk-55WEJKWT.mjs → chunk-IH3GKNDQ.mjs} +197 -93
- package/dist/{chunk-AMGDG4ZJ.mjs → chunk-IN5CH4P2.mjs} +3 -3
- package/dist/{chunk-PXDQFYD5.mjs → chunk-KJ7LB3TR.mjs} +24 -140
- package/dist/chunk-LS5IRM23.mjs +140 -0
- package/dist/{chunk-4MQ5F4IL.mjs → chunk-OLXM65YH.mjs} +1 -1
- package/dist/{chunk-IBR6634K.mjs → chunk-R6A773WK.mjs} +2 -69
- package/dist/{chunk-4344I4MR.mjs → chunk-SREPGC6O.mjs} +336 -13
- package/dist/{chunk-I64LXKO3.mjs → chunk-TPJU7NDJ.mjs} +1 -0
- package/dist/chunk-WQBCBKY3.mjs +8 -0
- package/dist/{chunk-P2BEMMOD.mjs → chunk-XYDP7CCJ.mjs} +151 -204
- package/dist/{chunk-Z3BXCZXS.mjs → chunk-XZF4LZ3X.mjs} +5 -3
- package/dist/chunk-YTJCGKM4.mjs +56 -0
- package/dist/chunk-ZCKPRCYI.mjs +30 -0
- package/dist/{client-ZXcbSViH.d.ts → client-CKUtkLz3.d.ts} +2 -2
- package/dist/client.d.ts +7 -7
- package/dist/client.mjs +1 -0
- package/dist/{config-DHL2KsfD.d.ts → config-BuIkeM5C.d.ts} +39 -3
- package/dist/{config-DTe5EbWW.d.ts → config-CSDEPraV.d.ts} +1 -1
- package/dist/direct-executor-JVXDR5Y5.mjs +19 -0
- package/dist/distribution/coordinator/etcd.d.ts +1 -1
- package/dist/distribution/coordinator/etcd.mjs +3 -2
- package/dist/distribution/coordinator/in-memory.d.ts +1 -1
- package/dist/distribution/coordinator/in-memory.mjs +2 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +7 -7
- package/dist/distribution.mjs +759 -65
- package/dist/embeddings/openai.mjs +1 -1
- package/dist/{engine-BjPBzWkA.d.ts → engine-DMNZJAUq.d.ts} +1 -1
- package/dist/{types-ChrVy4lH.d.ts → index-DzONZUKE.d.ts} +79 -37
- package/dist/index.browser.mjs +138 -539
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +17 -15
- package/dist/invalidation/filesystem.mjs +2 -1
- package/dist/{memory-DW3OJ0im.d.ts → memory-BPKNx9Tl.d.ts} +1288 -1287
- package/dist/partial-words.mjs +6 -5
- package/dist/pattern.mjs +5 -2
- package/dist/persistence/durability/checkpoint-worker.d.ts +7 -7
- package/dist/persistence/durability/checkpoint-worker.mjs +17 -15
- package/dist/react.d.ts +6 -6
- package/dist/react.mjs +1 -0
- package/dist/server.d.ts +9 -9
- package/dist/server.mjs +21 -13
- package/dist/{tasks-BTbwBqar.d.ts → tasks-DGyz586z.d.ts} +1 -1
- package/dist/{thread-XBDVXKUE.mjs → thread-33M5AOEI.mjs} +13 -10
- package/dist/vector/search-worker.mjs +5 -4
- package/dist/workers/entry.mjs +5 -5
- package/package.json +13 -7
- package/dist/chunk-IOZPBNSG.mjs +0 -55
- package/dist/chunk-WFVOBZS4.mjs +0 -485
- package/dist/direct-executor-WB2HKU4N.mjs +0 -17
package/dist/partial-words.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { partialWordSearchModule } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-PXDQFYD5.mjs';
|
|
1
|
+
import { partialWordSearchModule } from './chunk-4VBG6PEH.mjs';
|
|
2
|
+
import './chunk-KJ7LB3TR.mjs';
|
|
4
3
|
import './chunk-KEHK2O6P.mjs';
|
|
5
4
|
import './chunk-GES7U2PM.mjs';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
5
|
+
import './chunk-LS5IRM23.mjs';
|
|
6
|
+
import './chunk-R6A773WK.mjs';
|
|
7
|
+
import './chunk-YTJCGKM4.mjs';
|
|
8
|
+
import './chunk-TPJU7NDJ.mjs';
|
|
8
9
|
|
|
9
10
|
// src/partial-words/index.ts
|
|
10
11
|
var partialWordSearch = partialWordSearchModule;
|
package/dist/pattern.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { patternSearchModule } from './chunk-
|
|
1
|
+
import { patternSearchModule } from './chunk-SREPGC6O.mjs';
|
|
2
|
+
import './chunk-WQBCBKY3.mjs';
|
|
2
3
|
import './chunk-GES7U2PM.mjs';
|
|
3
|
-
import './chunk-
|
|
4
|
+
import './chunk-LS5IRM23.mjs';
|
|
5
|
+
import './chunk-YTJCGKM4.mjs';
|
|
6
|
+
import './chunk-TPJU7NDJ.mjs';
|
|
4
7
|
|
|
5
8
|
// src/pattern/index.ts
|
|
6
9
|
var patternSearch = patternSearchModule;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { P as PartitionConfig, d as ScoringMode, V as VectorIndexConfig } from '../../schema-DgyDijhf.js';
|
|
2
2
|
import '../../adapters-79OIa4xm.js';
|
|
3
3
|
|
|
4
|
-
interface FrozenTokenTableData {
|
|
5
|
-
blob: Uint8Array;
|
|
6
|
-
offsets: Uint32Array;
|
|
7
|
-
payloadSlots: Uint32Array;
|
|
8
|
-
documentFrequencies: Uint32Array;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
4
|
interface IndexMetadata {
|
|
12
5
|
indexName: string;
|
|
13
6
|
/** Number of documents represented by the last completed checkpoint. */
|
|
@@ -59,6 +52,13 @@ interface IndexEmbeddingMetadata {
|
|
|
59
52
|
*/
|
|
60
53
|
type SerializedSurfaceForms = Record<string, number | [number, string]>;
|
|
61
54
|
|
|
55
|
+
interface FrozenTokenTableData {
|
|
56
|
+
blob: Uint8Array;
|
|
57
|
+
offsets: Uint32Array;
|
|
58
|
+
payloadSlots: Uint32Array;
|
|
59
|
+
documentFrequencies: Uint32Array;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
62
|
interface PatternIndexArrays {
|
|
63
63
|
fieldPath: string;
|
|
64
64
|
docIds: Uint32Array;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
import { CHECKPOINT_WORKER_HEARTBEAT_MS, createDurableDirectory, writeCheckpointSegments, directoryCheckpointStore } from '../../chunk-IH3GKNDQ.mjs';
|
|
2
|
+
import '../../chunk-4D6OH4EF.mjs';
|
|
3
3
|
import '../../chunk-GCM3JFVA.mjs';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
7
|
-
import '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-2453RJYK.mjs';
|
|
5
|
+
import '../../chunk-4CWHWOBI.mjs';
|
|
6
|
+
import '../../chunk-XYDP7CCJ.mjs';
|
|
7
|
+
import '../../chunk-OLXM65YH.mjs';
|
|
8
|
+
import '../../chunk-ZCKPRCYI.mjs';
|
|
9
9
|
import '../../chunk-TGP5M5R7.mjs';
|
|
10
|
-
import '../../chunk-
|
|
10
|
+
import '../../chunk-IN5CH4P2.mjs';
|
|
11
11
|
import '../../chunk-ZJ4CSAB2.mjs';
|
|
12
|
-
import '../../chunk-
|
|
13
|
-
import '../../chunk-
|
|
14
|
-
import '../../chunk-
|
|
15
|
-
import '../../chunk-
|
|
16
|
-
import '../../chunk-
|
|
12
|
+
import '../../chunk-B3UOQJD3.mjs';
|
|
13
|
+
import '../../chunk-SREPGC6O.mjs';
|
|
14
|
+
import '../../chunk-WQBCBKY3.mjs';
|
|
15
|
+
import '../../chunk-4VBG6PEH.mjs';
|
|
16
|
+
import '../../chunk-KJ7LB3TR.mjs';
|
|
17
17
|
import '../../chunk-KEHK2O6P.mjs';
|
|
18
18
|
import '../../chunk-GES7U2PM.mjs';
|
|
19
|
+
import '../../chunk-LS5IRM23.mjs';
|
|
19
20
|
import '../../chunk-U2BKYEC7.mjs';
|
|
20
|
-
import '../../chunk-
|
|
21
|
+
import '../../chunk-R6A773WK.mjs';
|
|
22
|
+
import '../../chunk-YTJCGKM4.mjs';
|
|
21
23
|
import '../../chunk-POWOTUKJ.mjs';
|
|
22
|
-
import '../../chunk-
|
|
24
|
+
import '../../chunk-TPJU7NDJ.mjs';
|
|
23
25
|
|
|
24
26
|
// src/persistence/durability/rebuild.ts
|
|
25
27
|
async function rebuildSegmentsFromDurable(root, metadata, targets, compactionThreshold, prior, capturedPartitions = []) {
|
package/dist/react.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { N as NarsilError, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, Q as QueryParams, j as PreflightResult, e as QueryResult, k as SuggestParams, l as SuggestResult } from './memory-
|
|
2
|
-
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-
|
|
3
|
-
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-
|
|
4
|
-
export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-
|
|
1
|
+
import { N as NarsilError, L as ListParams, h as ListResult, I as IndexInfo, g as IndexStats, Q as QueryParams, j as PreflightResult, e as QueryResult, k as SuggestParams, l as SuggestResult } from './memory-BPKNx9Tl.js';
|
|
2
|
+
export { C as ClientErrorCode, a as ClientErrorCodes, E as ErrorCode, b as ErrorCodes, c as NarsilErrorCode, S as ServerErrorCode, d as ServerErrorCodes, i as isNarsilError } from './memory-BPKNx9Tl.js';
|
|
3
|
+
import { e as TaskRecord, d as TaskProgress, b as ImportResult, c as TaskListQuery, T as TaskListPage } from './tasks-DGyz586z.js';
|
|
4
|
+
export { I as ImportError, f as TaskStatus, g as TaskType } from './tasks-DGyz586z.js';
|
|
5
5
|
import { ReactNode, ReactElement } from 'react';
|
|
6
|
-
import { N as Narsil } from './engine-
|
|
7
|
-
import { N as NarsilClient, I as ImportSource } from './client-
|
|
6
|
+
import { N as Narsil } from './engine-DMNZJAUq.js';
|
|
7
|
+
import { N as NarsilClient, I as ImportSource } from './client-CKUtkLz3.js';
|
|
8
8
|
import { A as AnyDocument } from './schema-DgyDijhf.js';
|
|
9
9
|
import './adapters-79OIa4xm.js';
|
|
10
10
|
|
package/dist/react.mjs
CHANGED
|
@@ -49,6 +49,7 @@ var ErrorCodes = {
|
|
|
49
49
|
QUERY_NODE_TIMEOUT: "QUERY_NODE_TIMEOUT",
|
|
50
50
|
QUERY_NO_ACTIVE_REPLICA: "QUERY_NO_ACTIVE_REPLICA",
|
|
51
51
|
CLUSTER_OPERATION_UNSUPPORTED: "CLUSTER_OPERATION_UNSUPPORTED",
|
|
52
|
+
CLUSTER_WRITE_BLOCKED: "CLUSTER_WRITE_BLOCKED",
|
|
52
53
|
ALLOCATION_NO_DATA_NODES: "ALLOCATION_NO_DATA_NODES",
|
|
53
54
|
ALLOCATION_INVALID_CONFIG: "ALLOCATION_INVALID_CONFIG",
|
|
54
55
|
ALLOCATION_FAILED: "ALLOCATION_FAILED",
|
package/dist/server.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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
|
-
import { b 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, c as RequestContext, d as RequestDenial, S as SERVER_CAPABILITIES, e as ServerLimits, T as TASK_CANCEL_CAPABILITY, a as TASK_FILTER_CAPABILITY } from './capabilities-
|
|
4
|
-
import { N as Narsil } from './engine-
|
|
5
|
-
import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-
|
|
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-
|
|
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-BPKNx9Tl.js';
|
|
2
|
+
import { b as ServerOptions, N as NarsilServer } from './capabilities-CAdkp2P-.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, c as RequestContext, d as RequestDenial, S as SERVER_CAPABILITIES, e as ServerLimits, T as TASK_CANCEL_CAPABILITY, a as TASK_FILTER_CAPABILITY } from './capabilities-CAdkp2P-.js';
|
|
4
|
+
import { N as Narsil } from './engine-DMNZJAUq.js';
|
|
5
|
+
import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-DGyz586z.js';
|
|
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-DGyz586z.js';
|
|
7
7
|
import './schema-DgyDijhf.js';
|
|
8
8
|
import './adapters-79OIa4xm.js';
|
|
9
|
-
import './config-
|
|
10
|
-
import './config-
|
|
11
|
-
import './
|
|
9
|
+
import './config-BuIkeM5C.js';
|
|
10
|
+
import './config-CSDEPraV.js';
|
|
11
|
+
import './index-DzONZUKE.js';
|
|
12
12
|
import './types-Cb9kiY5P.js';
|
|
13
13
|
|
|
14
14
|
/**
|
package/dist/server.mjs
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createRouteRunner, corsHeaderReader, createSharedRequestGate, MAIN_THREAD_GATE_SLOT, 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, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, createDocumentReadHandlers, sendError, respondError, respondJson, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, clearGateSlot, parseJson, validateCreateIndex, rejectInvalid, validateBatch, serializeBatchResult, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, parseTaskListQuery, parseJsonOptional, validateRebalance, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, IMPORT_FLUSHES_IN_FLIGHT, badRequest, 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, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-
|
|
3
|
-
import { validateIndexName } from './chunk-
|
|
4
|
-
import { engineCoreOf, providedDocId, resolveVectorText } from './chunk-
|
|
5
|
-
import { detectRuntime } from './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createRouteRunner, corsHeaderReader, createSharedRequestGate, MAIN_THREAD_GATE_SLOT, 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, RUNNING_TASK_TTL_MS, DEFAULT_TASK_PAGE_SIZE, TERMINAL_TASK_TTL_MS, TASK_PROGRESS_WRITE_INTERVAL_MS, serializeNarsilError, createVersionHandler, acceptorOf, createDocumentReadHandlers, sendError, respondError, respondJson, MAX_INDEX_TOUCH_INTERVAL_MS, INDEX_TOUCH_INTERVALS_PER_IDLE_TIMEOUT, clearGateSlot, parseJson, validateCreateIndex, rejectInvalid, validateBatch, serializeBatchResult, validateDocumentBody, validateSuggest, validateQuery, refuseRegex, parseTaskListQuery, parseJsonOptional, validateRebalance, sendStream, SNAPSHOT_ARCHIVE_CONTENT_TYPE, DOCUMENT_EXPORT_CONTENT_TYPE, IMPORT_FLUSHES_IN_FLIGHT, badRequest, SERVER_CAPABILITIES, toHttpError, RELAY_STREAM_CHUNKS_IN_FLIGHT, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-XZF4LZ3X.mjs';
|
|
2
|
+
export { ASYNC_IMPORT_CAPABILITY, DOCUMENT_EXPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-XZF4LZ3X.mjs';
|
|
3
|
+
import { validateIndexName } from './chunk-GNYXCLJS.mjs';
|
|
4
|
+
import { engineCoreOf, providedDocId, resolveVectorText } from './chunk-2453RJYK.mjs';
|
|
5
|
+
import { detectRuntime } from './chunk-OLXM65YH.mjs';
|
|
6
|
+
import './chunk-ZCKPRCYI.mjs';
|
|
7
7
|
import './chunk-TGP5M5R7.mjs';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-B3UOQJD3.mjs';
|
|
9
|
+
import './chunk-WQBCBKY3.mjs';
|
|
10
|
+
import './chunk-KJ7LB3TR.mjs';
|
|
10
11
|
import './chunk-KEHK2O6P.mjs';
|
|
12
|
+
import './chunk-LS5IRM23.mjs';
|
|
11
13
|
import './chunk-U2BKYEC7.mjs';
|
|
12
|
-
import './chunk-
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
|
|
14
|
+
import './chunk-R6A773WK.mjs';
|
|
15
|
+
import './chunk-YTJCGKM4.mjs';
|
|
16
|
+
import { startIdleHeapCleanup } from './chunk-5XNIRLFC.mjs';
|
|
17
|
+
import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-TPJU7NDJ.mjs';
|
|
18
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-TPJU7NDJ.mjs';
|
|
16
19
|
import { randomUUID } from 'crypto';
|
|
17
20
|
import { createReadStream } from 'fs';
|
|
18
21
|
import { rm } from 'fs/promises';
|
|
@@ -245,7 +248,12 @@ function createClusterHandlers(deps) {
|
|
|
245
248
|
respondJson(ctx, {
|
|
246
249
|
node: describeNode(cluster),
|
|
247
250
|
controllerNodeId,
|
|
248
|
-
nodes: nodes.map((node) => ({
|
|
251
|
+
nodes: nodes.map((node) => ({
|
|
252
|
+
nodeId: node.nodeId,
|
|
253
|
+
address: node.address,
|
|
254
|
+
roles: [...node.roles],
|
|
255
|
+
memory: node.memory ?? null
|
|
256
|
+
}))
|
|
249
257
|
});
|
|
250
258
|
} catch (err) {
|
|
251
259
|
respondError(ctx, err);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MemoryStats } from './memory-
|
|
1
|
+
import { M as MemoryStats } from './memory-BPKNx9Tl.js';
|
|
2
2
|
|
|
3
3
|
/** Declarative index configuration accepted over HTTP. Function-valued engine
|
|
4
4
|
* options (custom tokenizer, stopWords-as-function, group reducer, embedding
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedRequestGate, registerServerRoutes, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, statusLine, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery, refuseRegex } from './chunk-
|
|
2
|
-
import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-
|
|
3
|
-
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedRequestGate, registerServerRoutes, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, statusLine, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery, refuseRegex } from './chunk-XZF4LZ3X.mjs';
|
|
2
|
+
import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-4D6OH4EF.mjs';
|
|
3
|
+
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-XYDP7CCJ.mjs';
|
|
4
|
+
import './chunk-ZCKPRCYI.mjs';
|
|
5
5
|
import './chunk-ZJ4CSAB2.mjs';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import
|
|
6
|
+
import './chunk-B3UOQJD3.mjs';
|
|
7
|
+
import './chunk-SREPGC6O.mjs';
|
|
8
|
+
import './chunk-WQBCBKY3.mjs';
|
|
9
|
+
import './chunk-4VBG6PEH.mjs';
|
|
10
|
+
import { extractVectorFieldsFromSchema } from './chunk-KJ7LB3TR.mjs';
|
|
10
11
|
import './chunk-KEHK2O6P.mjs';
|
|
11
12
|
import './chunk-GES7U2PM.mjs';
|
|
12
|
-
import './chunk-
|
|
13
|
-
import
|
|
13
|
+
import './chunk-LS5IRM23.mjs';
|
|
14
|
+
import './chunk-R6A773WK.mjs';
|
|
15
|
+
import './chunk-YTJCGKM4.mjs';
|
|
16
|
+
import { ServerErrorCodes, NarsilError, ErrorCodes } from './chunk-TPJU7NDJ.mjs';
|
|
14
17
|
|
|
15
18
|
// src/server/request-threads/held-vectors.ts
|
|
16
19
|
function managerWithHeldVectors(manager, fieldPaths, vectorOf) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-
|
|
1
|
+
import { openSharedVectorField, MAX_WORKER_COPIES, createVectorStore, osqBitsOf, createHNSWIndex, createOsqQuantizer, osqRecordBytes } from '../chunk-IN5CH4P2.mjs';
|
|
2
2
|
import '../chunk-ZJ4CSAB2.mjs';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-B3UOQJD3.mjs';
|
|
4
4
|
import '../chunk-KEHK2O6P.mjs';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-R6A773WK.mjs';
|
|
6
|
+
import '../chunk-YTJCGKM4.mjs';
|
|
7
|
+
import '../chunk-TPJU7NDJ.mjs';
|
|
7
8
|
|
|
8
9
|
// src/vector/worker-copy.ts
|
|
9
10
|
function restoreQuantizer(snapshot, store) {
|
package/dist/workers/entry.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { startIdleHeapCleanup } from '../chunk-
|
|
1
|
+
import { startIdleHeapCleanup } from '../chunk-5XNIRLFC.mjs';
|
|
2
2
|
import { threadSlotOfWorker, isValidWorkerAction } from '../chunk-POWOTUKJ.mjs';
|
|
3
|
-
import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-
|
|
3
|
+
import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-TPJU7NDJ.mjs';
|
|
4
4
|
|
|
5
5
|
// src/workers/action-handler.ts
|
|
6
6
|
function buildErrorResponse(requestId, code, message, details) {
|
|
@@ -18,7 +18,7 @@ async function importBootstrapModule(moduleUrl) {
|
|
|
18
18
|
await import(moduleUrl);
|
|
19
19
|
}
|
|
20
20
|
async function stopServingRequests() {
|
|
21
|
-
const { closeRequestThread } = await import('../thread-
|
|
21
|
+
const { closeRequestThread } = await import('../thread-33M5AOEI.mjs');
|
|
22
22
|
closeRequestThread();
|
|
23
23
|
}
|
|
24
24
|
function holdsCopies(executor) {
|
|
@@ -49,7 +49,7 @@ function createActionHandler(executor) {
|
|
|
49
49
|
if (!holdsCopies(executor)) {
|
|
50
50
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "This executor holds no copies to answer requests from");
|
|
51
51
|
}
|
|
52
|
-
const starting = import('../thread-
|
|
52
|
+
const starting = import('../thread-33M5AOEI.mjs').then(
|
|
53
53
|
({ serveRequests }) => serveRequests(executor, action.settings)
|
|
54
54
|
);
|
|
55
55
|
serving.start = starting.then(
|
|
@@ -102,7 +102,7 @@ async function setup() {
|
|
|
102
102
|
} catch {
|
|
103
103
|
parentPort = null;
|
|
104
104
|
}
|
|
105
|
-
const { createDirectExecutor } = await import('../direct-executor-
|
|
105
|
+
const { createDirectExecutor } = await import('../direct-executor-JVXDR5Y5.mjs');
|
|
106
106
|
const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
|
|
107
107
|
if (parentPort) {
|
|
108
108
|
const port = parentPort;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delali/narsil",
|
|
3
|
-
"version": "0.3.1-next.
|
|
3
|
+
"version": "0.3.1-next.82",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Distributed search engine with full-text, vector, hybrid, and geosearch. One engine, embedded or on a server, with a cross-language .nrsl format.",
|
|
6
6
|
"author": "Delali (https://sondelali.com)",
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
"browser": "./src/persistence/durability/node-fs.browser.ts",
|
|
28
28
|
"default": "./src/persistence/durability/node-fs.ts"
|
|
29
29
|
},
|
|
30
|
+
"#platform/lock-holder": {
|
|
31
|
+
"browser": "./src/persistence/durability/lock-holder.browser.ts",
|
|
32
|
+
"default": "./src/persistence/durability/lock-holder.ts"
|
|
33
|
+
},
|
|
30
34
|
"#platform/node-worker": {
|
|
31
35
|
"browser": "./src/workers/node-worker.browser.ts",
|
|
32
36
|
"default": "./src/workers/node-worker.ts"
|
|
@@ -88,6 +92,7 @@
|
|
|
88
92
|
"revisions:record": "tsx scripts/analysis-revisions.ts --record",
|
|
89
93
|
"api": "tsx scripts/api-surface.ts",
|
|
90
94
|
"api:write": "tsx scripts/api-surface.ts --write",
|
|
95
|
+
"bundle-size:write": "rm -rf dist && tsup && node scripts/check-browser-bundle.mjs --update-baseline",
|
|
91
96
|
"lookalikes": "tsx scripts/lookalike-counts.ts",
|
|
92
97
|
"lookalikes:collect": "tsx scripts/lookalike-counts.ts --collect",
|
|
93
98
|
"fold-table": "tsx scripts/fold-table.ts",
|
|
@@ -205,6 +210,7 @@
|
|
|
205
210
|
"@types/react": "19.2.14",
|
|
206
211
|
"@types/react-dom": "19.2.3",
|
|
207
212
|
"@vitest/coverage-v8": "4.0.18",
|
|
213
|
+
"esbuild": "0.28.2",
|
|
208
214
|
"etcd3": "1.1.2",
|
|
209
215
|
"fflate": "0.8.3",
|
|
210
216
|
"jsdom": "28.1.0",
|
|
@@ -240,11 +246,11 @@
|
|
|
240
246
|
}
|
|
241
247
|
},
|
|
242
248
|
"optionalDependencies": {
|
|
243
|
-
"@delali/narsil-native-darwin-arm64": "0.3.1-next.
|
|
244
|
-
"@delali/narsil-native-darwin-x64": "0.3.1-next.
|
|
245
|
-
"@delali/narsil-native-linux-arm64": "0.3.1-next.
|
|
246
|
-
"@delali/narsil-native-linux-x64": "0.3.1-next.
|
|
247
|
-
"@delali/narsil-native-win32-arm64": "0.3.1-next.
|
|
248
|
-
"@delali/narsil-native-win32-x64": "0.3.1-next.
|
|
249
|
+
"@delali/narsil-native-darwin-arm64": "0.3.1-next.82",
|
|
250
|
+
"@delali/narsil-native-darwin-x64": "0.3.1-next.82",
|
|
251
|
+
"@delali/narsil-native-linux-arm64": "0.3.1-next.82",
|
|
252
|
+
"@delali/narsil-native-linux-x64": "0.3.1-next.82",
|
|
253
|
+
"@delali/narsil-native-win32-arm64": "0.3.1-next.82",
|
|
254
|
+
"@delali/narsil-native-win32-x64": "0.3.1-next.82"
|
|
249
255
|
}
|
|
250
256
|
}
|
package/dist/chunk-IOZPBNSG.mjs
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
// src/filters/constants.ts
|
|
2
|
-
var MAX_FILTER_DEPTH = 30;
|
|
3
|
-
var MAX_FILTER_TESTS = 1024;
|
|
4
|
-
var FILTER_OPERAND_COPY_DEPTH = 3;
|
|
5
|
-
var MAX_FILTER_ARRAY_SIZE = 65536;
|
|
6
|
-
var GEO_UNIT_METRES = { km: 1e3, mi: 1609.344, m: 1 };
|
|
7
|
-
|
|
8
|
-
// src/search/constants.ts
|
|
9
|
-
var RESULT_WINDOW = 1e4;
|
|
10
|
-
var DEFAULT_PAGE_SIZE = 10;
|
|
11
|
-
var MAX_CURSOR_LENGTH = 40960;
|
|
12
|
-
var MAX_SORT_FIELDS = 8;
|
|
13
|
-
var MAX_SORT_FIELD_NAME_LENGTH = 255;
|
|
14
|
-
var MAX_CURSOR_ANCHOR_CODE_POINTS = 512;
|
|
15
|
-
var PREFIX_MAX_EXPANSIONS = 50;
|
|
16
|
-
var PARTIAL_WORDS_ADDED_PER_QUERY = 50;
|
|
17
|
-
var PARTIAL_WORD_MIN_CODE_POINTS = 3;
|
|
18
|
-
var DEFAULT_FUZZY_PREFIX_LENGTH = 2;
|
|
19
|
-
var MAX_TOLERANCE = 10;
|
|
20
|
-
var MAX_PREFIX_LENGTH = 1024;
|
|
21
|
-
var DEFAULT_MAX_PER_GROUP = 1;
|
|
22
|
-
var DEFAULT_RANK_CONSTANT = 60;
|
|
23
|
-
var MIN_RANK_CONSTANT = 1;
|
|
24
|
-
var DEFAULT_LINEAR_ALPHA = 0.5;
|
|
25
|
-
var MIN_LINEAR_ALPHA = 0;
|
|
26
|
-
var MAX_LINEAR_ALPHA = 1;
|
|
27
|
-
|
|
28
|
-
// src/engine/constants.ts
|
|
29
|
-
var MIN_DOCUMENTS_FOR_SEGMENTS = 64;
|
|
30
|
-
var BATCH_CHUNK_SIZE = 1e3;
|
|
31
|
-
var DEFAULT_LIMIT = DEFAULT_PAGE_SIZE;
|
|
32
|
-
var DEFAULT_OFFSET = 0;
|
|
33
|
-
var INDEX_NAME_PATTERN = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
|
|
34
|
-
var ABSOLUTE_WINDOWS_PATH_PATTERN = /^[a-zA-Z]:[\\/]/;
|
|
35
|
-
var MODULE_URL_SCHEME_PATTERN = /^(file|https?|data|node):/;
|
|
36
|
-
var MAX_INDEX_NAME_LENGTH = 255;
|
|
37
|
-
var MAX_DOC_ID_LENGTH = 512;
|
|
38
|
-
var EXPORT_CHUNK_BYTES = 1048576;
|
|
39
|
-
var MAX_EXPORT_LINE_BYTES = 117443592;
|
|
40
|
-
var MAX_INDEX_CONFIGURATION_BYTES = 16777216;
|
|
41
|
-
var IMPORT_BATCH_DOCUMENTS = 1e3;
|
|
42
|
-
var MAX_IMPORT_REFUSALS_REPORTED = 1e3;
|
|
43
|
-
var MIN_SWEEP_INTERVAL_MS = 100;
|
|
44
|
-
var MAX_SWEEP_INTERVAL_MS = 6e4;
|
|
45
|
-
var HEAP_PRESSURE_WARNING_FRACTION = 0.9;
|
|
46
|
-
var HEAP_PRESSURE_REARM_FRACTION = 0.8;
|
|
47
|
-
var STATISTICS_BROADCAST_INTERVAL_MS = 5e3;
|
|
48
|
-
var FOREIGN_STATS_TTL_MS = 6e4;
|
|
49
|
-
var DEFAULT_SUGGEST_LIMIT = 10;
|
|
50
|
-
var MAX_SUGGEST_LIMIT = 100;
|
|
51
|
-
var SUGGEST_OVERSAMPLE_FACTOR = 1.5;
|
|
52
|
-
var SUGGEST_OVERSAMPLE_PADDING = 10;
|
|
53
|
-
var MAX_SUGGEST_SCATTER_LIMIT = Math.ceil(MAX_SUGGEST_LIMIT * SUGGEST_OVERSAMPLE_FACTOR) + SUGGEST_OVERSAMPLE_PADDING;
|
|
54
|
-
|
|
55
|
-
export { ABSOLUTE_WINDOWS_PATH_PATTERN, BATCH_CHUNK_SIZE, DEFAULT_FUZZY_PREFIX_LENGTH, DEFAULT_LIMIT, DEFAULT_LINEAR_ALPHA, DEFAULT_MAX_PER_GROUP, DEFAULT_OFFSET, DEFAULT_PAGE_SIZE, DEFAULT_RANK_CONSTANT, DEFAULT_SUGGEST_LIMIT, EXPORT_CHUNK_BYTES, FILTER_OPERAND_COPY_DEPTH, FOREIGN_STATS_TTL_MS, GEO_UNIT_METRES, HEAP_PRESSURE_REARM_FRACTION, HEAP_PRESSURE_WARNING_FRACTION, IMPORT_BATCH_DOCUMENTS, INDEX_NAME_PATTERN, MAX_CURSOR_ANCHOR_CODE_POINTS, MAX_CURSOR_LENGTH, MAX_DOC_ID_LENGTH, MAX_EXPORT_LINE_BYTES, MAX_FILTER_ARRAY_SIZE, MAX_FILTER_DEPTH, MAX_FILTER_TESTS, MAX_IMPORT_REFUSALS_REPORTED, MAX_INDEX_CONFIGURATION_BYTES, MAX_INDEX_NAME_LENGTH, MAX_LINEAR_ALPHA, MAX_PREFIX_LENGTH, MAX_SORT_FIELDS, MAX_SORT_FIELD_NAME_LENGTH, MAX_SUGGEST_LIMIT, MAX_SUGGEST_SCATTER_LIMIT, MAX_SWEEP_INTERVAL_MS, MAX_TOLERANCE, MIN_DOCUMENTS_FOR_SEGMENTS, MIN_LINEAR_ALPHA, MIN_RANK_CONSTANT, MIN_SWEEP_INTERVAL_MS, MODULE_URL_SCHEME_PATTERN, PARTIAL_WORDS_ADDED_PER_QUERY, PARTIAL_WORD_MIN_CODE_POINTS, PREFIX_MAX_EXPANSIONS, RESULT_WINDOW, STATISTICS_BROADCAST_INTERVAL_MS, SUGGEST_OVERSAMPLE_FACTOR, SUGGEST_OVERSAMPLE_PADDING };
|