@delali/narsil 0.2.4-next.54 → 0.2.4-next.59
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 +39 -28
- package/dist/adapters/filesystem.mjs +1 -1
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/{capabilities-DlYw0Ov0.d.ts → capabilities-DSsOGz6F.d.ts} +2 -2
- package/dist/{chunk-BH5SYB5W.mjs → chunk-24RXHMEL.mjs} +604 -150
- package/dist/{chunk-D2S642IV.mjs → chunk-3LHGNRYE.mjs} +1 -1
- package/dist/{chunk-TVT5V4E7.mjs → chunk-B2TFROFX.mjs} +299 -168
- package/dist/{chunk-L225SHNB.mjs → chunk-L6TNPLAR.mjs} +19 -5
- package/dist/{chunk-U2AL3SON.mjs → chunk-THYRHHO2.mjs} +3 -3
- package/dist/{chunk-NTZYA3SJ.mjs → chunk-U7KYW4BA.mjs} +3 -3
- package/dist/{chunk-FRQVMFY7.mjs → chunk-USKFU7J5.mjs} +1 -0
- package/dist/{chunk-4NVPQ6S5.mjs → chunk-UXNWQZST.mjs} +12 -3
- package/dist/{chunk-RGS7FMCB.mjs → chunk-VMRR3DQU.mjs} +74 -16
- package/dist/{chunk-2GWVQWGA.mjs → chunk-YMZCMH5M.mjs} +45 -1
- package/dist/{chunk-UTOFOJOR.mjs → chunk-YNVIUGF5.mjs} +6 -2
- package/dist/{chunk-5T6AOR37.mjs → chunk-ZNZBXMP5.mjs} +601 -60
- package/dist/{chunk-XNQAIO74.mjs → chunk-ZZT3EAUC.mjs} +177 -309
- package/dist/{client-CQUqt9Ir.d.ts → client-BQK6Tf6A.d.ts} +3 -3
- package/dist/client.d.ts +8 -8
- package/dist/client.mjs +1 -0
- package/dist/{config-CNas6wJH.d.ts → config-BhldZgaK.d.ts} +2 -2
- package/dist/{config-bXxnJrQc.d.ts → config-DmXULPa-.d.ts} +15 -7
- package/dist/direct-executor-ALAVE7FC.mjs +12 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +2 -2
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.mjs +1 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +382 -162
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-Dj4I91Jv.d.ts → engine-CIOyFozK.d.ts} +15 -12
- package/dist/index.browser.mjs +1565 -528
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +11 -11
- package/dist/invalidation/filesystem.mjs +1 -1
- package/dist/{memory-xrXOZMbw.d.ts → memory-yFaVn2xZ.d.ts} +199 -107
- package/dist/persistence/durability/checkpoint-worker.d.ts +1 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +11 -11
- package/dist/react.d.ts +6 -6
- package/dist/react.mjs +1 -0
- package/dist/{schema-mLpXZBEh.d.ts → schema-d5Afu03A.d.ts} +7 -2
- package/dist/server.d.ts +10 -10
- package/dist/server.mjs +10 -10
- package/dist/{tasks-Df73Tjgq.d.ts → tasks-CH2Dod8w.d.ts} +1 -1
- package/dist/{thread-5UP6MGED.mjs → thread-DYHEQRVY.mjs} +14 -10
- package/dist/{types-BTIVO8DI.d.ts → types-DAK7mnUZ.d.ts} +1 -1
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +4 -4
- package/dist/workers/entry.mjs +4 -4
- package/package.json +9 -9
- package/dist/direct-executor-RBA5O7EN.mjs +0 -12
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, 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 { a 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-
|
|
7
|
-
import './schema-
|
|
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-yFaVn2xZ.js';
|
|
2
|
+
import { b as ServerOptions, N as NarsilServer } from './capabilities-DSsOGz6F.js';
|
|
3
|
+
export { A as ASYNC_IMPORT_CAPABILITY, C as CorsOptions, 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-DSsOGz6F.js';
|
|
4
|
+
import { a as Narsil } from './engine-CIOyFozK.js';
|
|
5
|
+
import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-CH2Dod8w.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-CH2Dod8w.js';
|
|
7
|
+
import './schema-d5Afu03A.js';
|
|
8
8
|
import './adapters-79OIa4xm.js';
|
|
9
|
-
import './config-
|
|
10
|
-
import './config-
|
|
11
|
-
import './types-
|
|
9
|
+
import './config-BhldZgaK.js';
|
|
10
|
+
import './config-DmXULPa-.js';
|
|
11
|
+
import './types-DAK7mnUZ.js';
|
|
12
12
|
import './types-D5OwhtsQ.js';
|
|
13
13
|
|
|
14
14
|
/**
|
package/dist/server.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { DEFAULT_MAX_RETAINED_TASKS, loadUWebSockets, resolveCors, authorizerFor, createSharedGateBuffer, gateSlotOfWorker, createRouteRunner,
|
|
2
|
-
export { ASYNC_IMPORT_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-
|
|
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_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, parseTaskListQuery, parseJsonOptional, validateRebalance, sendBinary, IMPORT_FLUSHES_IN_FLIGHT, badRequest, SERVER_CAPABILITIES, toHttpError, MIN_UNBOUNDED_SERVER_LIMIT, MIN_COUNTED_SERVER_LIMIT } from './chunk-VMRR3DQU.mjs';
|
|
2
|
+
export { ASYNC_IMPORT_CAPABILITY, INDEX_LIFECYCLE_CAPABILITY, REBUILD_ANALYSIS_CAPABILITY, SERVER_CAPABILITIES, TASK_CANCEL_CAPABILITY, TASK_FILTER_CAPABILITY, httpStatusForNarsilError } from './chunk-VMRR3DQU.mjs';
|
|
3
|
+
import { validateIndexName } from './chunk-U7KYW4BA.mjs';
|
|
4
|
+
import { engineCoreOf, providedDocId, resolveVectorText } from './chunk-UXNWQZST.mjs';
|
|
5
5
|
import { detectRuntime } from './chunk-AV4IJKD2.mjs';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
6
|
+
import './chunk-3LHGNRYE.mjs';
|
|
7
|
+
import './chunk-L6TNPLAR.mjs';
|
|
8
|
+
import './chunk-YNVIUGF5.mjs';
|
|
9
9
|
import { startIdleHeapCleanup } from './chunk-Y3L5MDRV.mjs';
|
|
10
|
-
import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-
|
|
11
|
-
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-
|
|
10
|
+
import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-USKFU7J5.mjs';
|
|
11
|
+
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-USKFU7J5.mjs';
|
|
12
12
|
import { randomUUID } from 'crypto';
|
|
13
13
|
import { MessageChannel } from 'worker_threads';
|
|
14
14
|
|
|
@@ -1422,7 +1422,7 @@ var NarsilHttpServer = class {
|
|
|
1422
1422
|
const run = createRouteRunner({
|
|
1423
1423
|
authorize,
|
|
1424
1424
|
gate: createSharedRequestGate(gate, limits.maxConcurrentRequests, MAIN_THREAD_GATE_SLOT),
|
|
1425
|
-
|
|
1425
|
+
corsHeaders: cors ? corsHeaderReader(cors) : void 0
|
|
1426
1426
|
});
|
|
1427
1427
|
registerServerRoutes(app, run, handlers, limits, cors);
|
|
1428
1428
|
if (core === void 0 || threadCount === 0 || !detectRuntime().supportsWorkerThreads) return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MemoryStats } from './memory-
|
|
1
|
+
import { M as MemoryStats } from './memory-yFaVn2xZ.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,12 +1,12 @@
|
|
|
1
|
-
import { loadUWebSockets, childAppOf, createRouteRunner,
|
|
2
|
-
import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-
|
|
5
|
-
import { extractVectorFieldsFromSchema } from './chunk-
|
|
1
|
+
import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedRequestGate, registerServerRoutes, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery } from './chunk-VMRR3DQU.mjs';
|
|
2
|
+
import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-B2TFROFX.mjs';
|
|
3
|
+
import './chunk-3LHGNRYE.mjs';
|
|
4
|
+
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-ZNZBXMP5.mjs';
|
|
5
|
+
import { extractVectorFieldsFromSchema } from './chunk-L6TNPLAR.mjs';
|
|
6
6
|
import './chunk-ZJ4CSAB2.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import { ServerErrorCodes, NarsilError, ErrorCodes } from './chunk-
|
|
7
|
+
import './chunk-YNVIUGF5.mjs';
|
|
8
|
+
import './chunk-YMZCMH5M.mjs';
|
|
9
|
+
import { ServerErrorCodes, NarsilError, ErrorCodes } from './chunk-USKFU7J5.mjs';
|
|
10
10
|
|
|
11
11
|
// src/server/request-threads/held-vectors.ts
|
|
12
12
|
function managerWithHeldVectors(manager, fieldPaths, vectorOf) {
|
|
@@ -154,7 +154,11 @@ function createThreadReadEngine(options) {
|
|
|
154
154
|
},
|
|
155
155
|
async listDocuments(indexName, params) {
|
|
156
156
|
const { context, manager } = requireWholeDocuments(indexName);
|
|
157
|
-
return executeListDocuments(params ?? {}, {
|
|
157
|
+
return executeListDocuments(params ?? {}, {
|
|
158
|
+
manager,
|
|
159
|
+
schema: context.config.schema,
|
|
160
|
+
strict: context.config.strict
|
|
161
|
+
});
|
|
158
162
|
}
|
|
159
163
|
};
|
|
160
164
|
}
|
|
@@ -381,7 +385,7 @@ async function serveRequests(executor, settings) {
|
|
|
381
385
|
const run = createRouteRunner({
|
|
382
386
|
authorize: settings.authorizes ? (context) => relay.authorize(context) : void 0,
|
|
383
387
|
gate: createSharedRequestGate(settings.gate, settings.maxConcurrentRequests, settings.gateSlot),
|
|
384
|
-
|
|
388
|
+
corsHeaders: settings.cors ? corsHeaderReader(settings.cors) : void 0
|
|
385
389
|
});
|
|
386
390
|
registerServerRoutes(app, run, threadHandlers(local, relay, settings), settings.limits, settings.cors);
|
|
387
391
|
servingApp = { app: child, relay };
|
|
@@ -1,8 +1,8 @@
|
|
|
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-THYRHHO2.mjs';
|
|
2
2
|
import '../chunk-ZJ4CSAB2.mjs';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-YNVIUGF5.mjs';
|
|
4
|
+
import '../chunk-YMZCMH5M.mjs';
|
|
5
|
+
import '../chunk-USKFU7J5.mjs';
|
|
6
6
|
|
|
7
7
|
// src/vector/worker-copy.ts
|
|
8
8
|
function restoreQuantizer(snapshot, store) {
|
package/dist/workers/entry.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { startIdleHeapCleanup } from '../chunk-Y3L5MDRV.mjs';
|
|
2
2
|
import { threadSlotOfWorker, isValidWorkerAction } from '../chunk-POWOTUKJ.mjs';
|
|
3
|
-
import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-
|
|
3
|
+
import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-USKFU7J5.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-DYHEQRVY.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-DYHEQRVY.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-ALAVE7FC.mjs');
|
|
106
106
|
const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
|
|
107
107
|
if (parentPort) {
|
|
108
108
|
const port = parentPort;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delali/narsil",
|
|
3
|
-
"version": "0.2.4-next.
|
|
3
|
+
"version": "0.2.4-next.59",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
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)",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
-
"homepage": "https://
|
|
8
|
+
"homepage": "https://narsil.sondelali.com",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/assetcorp/narsil.git",
|
|
@@ -223,11 +223,11 @@
|
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
225
|
"optionalDependencies": {
|
|
226
|
-
"@delali/narsil-native-darwin-arm64": "0.2.4-next.
|
|
227
|
-
"@delali/narsil-native-darwin-x64": "0.2.4-next.
|
|
228
|
-
"@delali/narsil-native-linux-arm64": "0.2.4-next.
|
|
229
|
-
"@delali/narsil-native-linux-x64": "0.2.4-next.
|
|
230
|
-
"@delali/narsil-native-win32-arm64": "0.2.4-next.
|
|
231
|
-
"@delali/narsil-native-win32-x64": "0.2.4-next.
|
|
226
|
+
"@delali/narsil-native-darwin-arm64": "0.2.4-next.59",
|
|
227
|
+
"@delali/narsil-native-darwin-x64": "0.2.4-next.59",
|
|
228
|
+
"@delali/narsil-native-linux-arm64": "0.2.4-next.59",
|
|
229
|
+
"@delali/narsil-native-linux-x64": "0.2.4-next.59",
|
|
230
|
+
"@delali/narsil-native-win32-arm64": "0.2.4-next.59",
|
|
231
|
+
"@delali/narsil-native-win32-x64": "0.2.4-next.59"
|
|
232
232
|
}
|
|
233
233
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { createDirectExecutor } from './chunk-XNQAIO74.mjs';
|
|
2
|
-
import './chunk-AV4IJKD2.mjs';
|
|
3
|
-
import './chunk-5T6AOR37.mjs';
|
|
4
|
-
import './chunk-L225SHNB.mjs';
|
|
5
|
-
import './chunk-TGP5M5R7.mjs';
|
|
6
|
-
import './chunk-U2AL3SON.mjs';
|
|
7
|
-
import './chunk-ZJ4CSAB2.mjs';
|
|
8
|
-
import './chunk-UTOFOJOR.mjs';
|
|
9
|
-
import './chunk-IFBKLBGB.mjs';
|
|
10
|
-
import './chunk-U2BKYEC7.mjs';
|
|
11
|
-
import './chunk-2GWVQWGA.mjs';
|
|
12
|
-
import './chunk-FRQVMFY7.mjs';
|