@delali/narsil 0.3.1-next.74 → 0.3.1-next.75
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/{capabilities-CAMzmkAg.d.ts → capabilities-BHNksicw.d.ts} +16 -2
- package/dist/{chunk-Z3DQPOJQ.mjs → chunk-356UOTK2.mjs} +1 -1
- package/dist/chunk-7ODNRREZ.mjs +2050 -0
- package/dist/{chunk-T5ZWEWVD.mjs → chunk-AIUOAN7Y.mjs} +2 -2
- package/dist/{chunk-PO53FV4Q.mjs → chunk-AMGDG4ZJ.mjs} +1 -1
- package/dist/{chunk-LX4JERXI.mjs → chunk-BT62MUM5.mjs} +1 -1
- package/dist/{chunk-NOZUQM7J.mjs → chunk-BT6BI4GV.mjs} +41 -3
- package/dist/{chunk-LJYTW7GT.mjs → chunk-IBR6634K.mjs} +1 -1
- package/dist/{chunk-CUZOX6CN.mjs → chunk-LOARLB4F.mjs} +31 -27
- package/dist/{chunk-VKX2BPXD.mjs → chunk-NAMGDK45.mjs} +98 -19
- package/dist/{chunk-TVFLHM7M.mjs → chunk-PXDY5VRT.mjs} +3 -3
- package/dist/{chunk-I23G3IZC.mjs → chunk-UOJIV2NG.mjs} +1 -1
- package/dist/{chunk-3DDUNI6N.mjs → chunk-V3B24XR7.mjs} +7 -1
- package/dist/{chunk-CTOSGRM7.mjs → chunk-WL2GDSCV.mjs} +5 -5
- package/dist/{chunk-BVBIQQKG.mjs → chunk-YOVS4EV5.mjs} +16 -61
- package/dist/{client-C-I70ArH.d.ts → client-D4sXFS9f.d.ts} +2 -2
- package/dist/client.d.ts +6 -6
- package/dist/{config-C6Iw5rCX.d.ts → config-B-GRonqw.d.ts} +1 -1
- package/dist/{config-DJPH3IQB.d.ts → config-C1kbq1X2.d.ts} +1 -1
- package/dist/direct-executor-AVNWB73C.mjs +16 -0
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/coordinator/in-memory.mjs +1 -1
- package/dist/distribution.d.ts +5 -5
- package/dist/distribution.mjs +15 -15
- package/dist/{engine-B8eRPO7m.d.ts → engine-DcGSd5vh.d.ts} +1 -1
- package/dist/index.browser.mjs +72 -26
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +12 -13
- package/dist/invalidation/filesystem.mjs +1 -1
- package/dist/{memory-DJEwWoCi.d.ts → memory-M9kPmYP8.d.ts} +78 -24
- package/dist/partial-words.mjs +4 -4
- package/dist/pattern.mjs +2 -2
- package/dist/persistence/durability/checkpoint-worker.mjs +12 -13
- package/dist/react.d.ts +6 -6
- package/dist/server.d.ts +8 -8
- package/dist/server.mjs +34 -11
- package/dist/{tasks-BVmAKYBh.d.ts → tasks-A8se0J98.d.ts} +1 -1
- package/dist/{thread-W6DPKEF6.mjs → thread-BSIKT6ED.mjs} +14 -10
- package/dist/vector/search-worker.mjs +2 -2
- package/dist/workers/entry.mjs +3 -3
- package/package.json +8 -7
- package/dist/chunk-XW25X6AU.mjs +0 -614
- package/dist/chunk-ZKRV5M2P.mjs +0 -75
- package/dist/direct-executor-KFAGILJC.mjs +0 -17
package/dist/server.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-M9kPmYP8.js';
|
|
2
|
+
import { b as ServerOptions, N as NarsilServer } from './capabilities-BHNksicw.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-BHNksicw.js';
|
|
4
|
+
import { N as Narsil } from './engine-DcGSd5vh.js';
|
|
5
|
+
import { d as TaskProgress, b as ImportResult, h as TaskStore, e as TaskRecord } from './tasks-A8se0J98.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-A8se0J98.js';
|
|
7
7
|
import './schema-DgyDijhf.js';
|
|
8
8
|
import './adapters-79OIa4xm.js';
|
|
9
|
-
import './config-
|
|
10
|
-
import './config-
|
|
9
|
+
import './config-B-GRonqw.js';
|
|
10
|
+
import './config-C1kbq1X2.js';
|
|
11
11
|
import './types-ChrVy4lH.js';
|
|
12
12
|
import './types-Cb9kiY5P.js';
|
|
13
13
|
|
package/dist/server.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
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, 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-
|
|
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-BT6BI4GV.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-BT6BI4GV.mjs';
|
|
3
|
+
import { validateIndexName } from './chunk-PXDY5VRT.mjs';
|
|
4
|
+
import { engineCoreOf, providedDocId, resolveVectorText } from './chunk-BT62MUM5.mjs';
|
|
5
5
|
import { detectRuntime } from './chunk-4MQ5F4IL.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-V3B24XR7.mjs';
|
|
7
7
|
import './chunk-TGP5M5R7.mjs';
|
|
8
8
|
import './chunk-2E35UM3G.mjs';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-356UOTK2.mjs';
|
|
10
10
|
import './chunk-KEHK2O6P.mjs';
|
|
11
11
|
import './chunk-U2BKYEC7.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-IBR6634K.mjs';
|
|
13
13
|
import { startIdleHeapCleanup } from './chunk-Y3L5MDRV.mjs';
|
|
14
14
|
import { NarsilError, ErrorCodes, ServerErrorCodes, isNarsilError } from './chunk-I64LXKO3.mjs';
|
|
15
15
|
export { ClientErrorCodes, ErrorCodes, NarsilError, ServerErrorCodes, isNarsilError } from './chunk-I64LXKO3.mjs';
|
|
@@ -771,7 +771,7 @@ function createIndexHandlers(deps) {
|
|
|
771
771
|
|
|
772
772
|
// src/server/handlers/search.ts
|
|
773
773
|
function createSearchHandlers(deps) {
|
|
774
|
-
const { engine, limits } = deps;
|
|
774
|
+
const { engine, limits, allowRegex } = deps;
|
|
775
775
|
async function search(ctx) {
|
|
776
776
|
const params = parseJson(ctx);
|
|
777
777
|
if (!params) return;
|
|
@@ -780,6 +780,7 @@ function createSearchHandlers(deps) {
|
|
|
780
780
|
rejectInvalid(ctx, failure);
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
783
|
+
if (refuseRegex(ctx, params.filters, allowRegex)) return;
|
|
783
784
|
try {
|
|
784
785
|
respondJson(ctx, await engine.query(ctx.params[0], params));
|
|
785
786
|
} catch (err) {
|
|
@@ -794,6 +795,7 @@ function createSearchHandlers(deps) {
|
|
|
794
795
|
rejectInvalid(ctx, failure);
|
|
795
796
|
return;
|
|
796
797
|
}
|
|
798
|
+
if (refuseRegex(ctx, params.filters, allowRegex)) return;
|
|
797
799
|
try {
|
|
798
800
|
respondJson(ctx, await engine.preflight(ctx.params[0], params));
|
|
799
801
|
} catch (err) {
|
|
@@ -861,6 +863,14 @@ function assertServerLimits(limits) {
|
|
|
861
863
|
for (const field of LIMITS_UNBOUNDED_AT_ZERO) assertLimit(field, limits[field], MIN_UNBOUNDED_SERVER_LIMIT);
|
|
862
864
|
for (const field of COUNTED_LIMITS) assertLimit(field, limits[field], MIN_COUNTED_SERVER_LIMIT);
|
|
863
865
|
}
|
|
866
|
+
function assertAllowRegex(allowRegex) {
|
|
867
|
+
if (allowRegex === void 0 || typeof allowRegex === "boolean") return;
|
|
868
|
+
throw new NarsilError(
|
|
869
|
+
ErrorCodes.CONFIG_INVALID,
|
|
870
|
+
`allowRegex must be true or false; however, this configuration sets it to ${String(allowRegex)}`,
|
|
871
|
+
{ field: "allowRegex", value: String(allowRegex) }
|
|
872
|
+
);
|
|
873
|
+
}
|
|
864
874
|
|
|
865
875
|
// src/server/request-threads/captured-response.ts
|
|
866
876
|
var DEFAULT_STATUS = 200;
|
|
@@ -1159,7 +1169,8 @@ async function startRequestThreads(options) {
|
|
|
1159
1169
|
build: options.build,
|
|
1160
1170
|
authorizes: authorize !== void 0,
|
|
1161
1171
|
searchHooks,
|
|
1162
|
-
patternWorkCap: options.core.patternWorkCap
|
|
1172
|
+
patternWorkCap: options.core.patternWorkCap,
|
|
1173
|
+
allowRegex: options.allowRegex
|
|
1163
1174
|
}
|
|
1164
1175
|
},
|
|
1165
1176
|
[channel.port1]
|
|
@@ -1530,6 +1541,7 @@ var NarsilHttpServer = class {
|
|
|
1530
1541
|
constructor(engine, options = {}) {
|
|
1531
1542
|
assertServerEngine(engine);
|
|
1532
1543
|
assertServerLimits(options.limits);
|
|
1544
|
+
assertAllowRegex(options.allowRegex);
|
|
1533
1545
|
this.host = options.host ?? "127.0.0.1";
|
|
1534
1546
|
this.port = options.port ?? 9876;
|
|
1535
1547
|
this.options = options;
|
|
@@ -1545,6 +1557,7 @@ var NarsilHttpServer = class {
|
|
|
1545
1557
|
engine,
|
|
1546
1558
|
tasks: new TaskRegistry(taskStore, instanceId, limits.maxConcurrentTasks),
|
|
1547
1559
|
limits,
|
|
1560
|
+
allowRegex: options.allowRegex ?? true,
|
|
1548
1561
|
isReady: () => this.ready,
|
|
1549
1562
|
build: resolveBuild(options.build),
|
|
1550
1563
|
cluster: options.cluster,
|
|
@@ -1602,7 +1615,7 @@ var NarsilHttpServer = class {
|
|
|
1602
1615
|
const core = engineCoreOf(this.engine);
|
|
1603
1616
|
const threadCount = core === void 0 ? 0 : core.orchestrator.requestThreadCount();
|
|
1604
1617
|
const gate = createSharedGateBuffer(gateSlotOfWorker(threadCount));
|
|
1605
|
-
const { limits, build } = this.deps;
|
|
1618
|
+
const { limits, build, allowRegex } = this.deps;
|
|
1606
1619
|
const handlers = mainThreadHandlers(this.deps);
|
|
1607
1620
|
const run = createRouteRunner({
|
|
1608
1621
|
authorize,
|
|
@@ -1612,7 +1625,17 @@ var NarsilHttpServer = class {
|
|
|
1612
1625
|
registerServerRoutes(app, run, handlers, limits, cors);
|
|
1613
1626
|
if (core === void 0 || threadCount === 0 || !detectRuntime().supportsWorkerThreads) return;
|
|
1614
1627
|
try {
|
|
1615
|
-
this.threads = await startRequestThreads({
|
|
1628
|
+
this.threads = await startRequestThreads({
|
|
1629
|
+
core,
|
|
1630
|
+
app,
|
|
1631
|
+
handlers,
|
|
1632
|
+
authorize,
|
|
1633
|
+
gate,
|
|
1634
|
+
limits,
|
|
1635
|
+
allowRegex,
|
|
1636
|
+
build,
|
|
1637
|
+
cors
|
|
1638
|
+
});
|
|
1616
1639
|
} catch (err) {
|
|
1617
1640
|
console.warn("The server could not start request threads, so the main thread answers every request:", err);
|
|
1618
1641
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as MemoryStats } from './memory-
|
|
1
|
+
import { M as MemoryStats } from './memory-M9kPmYP8.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,14 +1,14 @@
|
|
|
1
|
-
import { loadUWebSockets, childAppOf, createRouteRunner, corsHeaderReader, createSharedRequestGate, registerServerRoutes, sendRelayed, createDocumentReadHandlers, respondJson, SERVER_CAPABILITIES, versionReport, statusLine, sendError, serverRoutes, parseJson, validateSuggest, rejectInvalid, respondError, validateQuery } 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-BT6BI4GV.mjs';
|
|
2
|
+
import { executeListDocuments, executeSuggest, executePreflight, queryBindingOf, executeQuery } from './chunk-WL2GDSCV.mjs';
|
|
3
|
+
import { resolveProjection, projectionKeepsField, setNestedValue } from './chunk-NAMGDK45.mjs';
|
|
4
|
+
import './chunk-V3B24XR7.mjs';
|
|
5
5
|
import './chunk-ZJ4CSAB2.mjs';
|
|
6
6
|
import './chunk-2E35UM3G.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import { extractVectorFieldsFromSchema } from './chunk-
|
|
7
|
+
import './chunk-7ODNRREZ.mjs';
|
|
8
|
+
import './chunk-UOJIV2NG.mjs';
|
|
9
|
+
import { extractVectorFieldsFromSchema } from './chunk-356UOTK2.mjs';
|
|
10
10
|
import './chunk-KEHK2O6P.mjs';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-IBR6634K.mjs';
|
|
12
12
|
import { ServerErrorCodes, NarsilError, ErrorCodes } from './chunk-I64LXKO3.mjs';
|
|
13
13
|
|
|
14
14
|
// src/server/request-threads/held-vectors.ts
|
|
@@ -359,7 +359,7 @@ function onWholeDocuments(local, handler, fallback) {
|
|
|
359
359
|
return (ctx) => local.holdsDocumentsOf(ctx.params[0]) ? handler(ctx) : fallback(ctx);
|
|
360
360
|
}
|
|
361
361
|
function searchHandler(options) {
|
|
362
|
-
const { fallback, maxResultWindow, staysOnThread, answer } = options;
|
|
362
|
+
const { fallback, maxResultWindow, allowRegex, staysOnThread, answer } = options;
|
|
363
363
|
return async (ctx) => {
|
|
364
364
|
const params = parseJson(ctx);
|
|
365
365
|
if (!params) return;
|
|
@@ -368,6 +368,7 @@ function searchHandler(options) {
|
|
|
368
368
|
rejectInvalid(ctx, failure);
|
|
369
369
|
return;
|
|
370
370
|
}
|
|
371
|
+
if (refuseRegex(ctx, params.filters, allowRegex)) return;
|
|
371
372
|
if (!staysOnThread(ctx.params[0], params)) {
|
|
372
373
|
await fallback(ctx);
|
|
373
374
|
return;
|
|
@@ -411,7 +412,8 @@ function relayedHandlers(relay, limits) {
|
|
|
411
412
|
return forwarded;
|
|
412
413
|
}
|
|
413
414
|
function threadHandlers(local, relay, settings) {
|
|
414
|
-
const
|
|
415
|
+
const { allowRegex } = settings;
|
|
416
|
+
const reads = createDocumentReadHandlers({ engine: local, limits: settings.limits, allowRegex });
|
|
415
417
|
const forwarded = relayedHandlers(relay, settings.limits);
|
|
416
418
|
const { maxResultWindow } = settings.limits;
|
|
417
419
|
return {
|
|
@@ -422,12 +424,14 @@ function threadHandlers(local, relay, settings) {
|
|
|
422
424
|
search: searchHandler({
|
|
423
425
|
fallback: forwarded.search,
|
|
424
426
|
maxResultWindow,
|
|
427
|
+
allowRegex,
|
|
425
428
|
staysOnThread: (name, params) => local.canAnswer(name, params),
|
|
426
429
|
answer: (name, params) => local.query(name, params)
|
|
427
430
|
}),
|
|
428
431
|
preflight: searchHandler({
|
|
429
432
|
fallback: forwarded.preflight,
|
|
430
433
|
maxResultWindow,
|
|
434
|
+
allowRegex,
|
|
431
435
|
staysOnThread: (name, params) => local.canCount(name, params),
|
|
432
436
|
answer: (name, params) => local.preflight(name, params)
|
|
433
437
|
}),
|
|
@@ -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-AMGDG4ZJ.mjs';
|
|
2
2
|
import '../chunk-ZJ4CSAB2.mjs';
|
|
3
3
|
import '../chunk-2E35UM3G.mjs';
|
|
4
4
|
import '../chunk-KEHK2O6P.mjs';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-IBR6634K.mjs';
|
|
6
6
|
import '../chunk-I64LXKO3.mjs';
|
|
7
7
|
|
|
8
8
|
// src/vector/worker-copy.ts
|
package/dist/workers/entry.mjs
CHANGED
|
@@ -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-BSIKT6ED.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-BSIKT6ED.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-AVNWB73C.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.75",
|
|
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)",
|
|
@@ -208,6 +208,7 @@
|
|
|
208
208
|
"etcd3": "1.1.2",
|
|
209
209
|
"fflate": "0.8.3",
|
|
210
210
|
"jsdom": "28.1.0",
|
|
211
|
+
"re2-wasm": "1.0.2",
|
|
211
212
|
"react": "19.2.4",
|
|
212
213
|
"react-dom": "19.2.4",
|
|
213
214
|
"selfsigned": "5.5.0",
|
|
@@ -239,11 +240,11 @@
|
|
|
239
240
|
}
|
|
240
241
|
},
|
|
241
242
|
"optionalDependencies": {
|
|
242
|
-
"@delali/narsil-native-darwin-arm64": "0.3.1-next.
|
|
243
|
-
"@delali/narsil-native-darwin-x64": "0.3.1-next.
|
|
244
|
-
"@delali/narsil-native-linux-arm64": "0.3.1-next.
|
|
245
|
-
"@delali/narsil-native-linux-x64": "0.3.1-next.
|
|
246
|
-
"@delali/narsil-native-win32-arm64": "0.3.1-next.
|
|
247
|
-
"@delali/narsil-native-win32-x64": "0.3.1-next.
|
|
243
|
+
"@delali/narsil-native-darwin-arm64": "0.3.1-next.75",
|
|
244
|
+
"@delali/narsil-native-darwin-x64": "0.3.1-next.75",
|
|
245
|
+
"@delali/narsil-native-linux-arm64": "0.3.1-next.75",
|
|
246
|
+
"@delali/narsil-native-linux-x64": "0.3.1-next.75",
|
|
247
|
+
"@delali/narsil-native-win32-arm64": "0.3.1-next.75",
|
|
248
|
+
"@delali/narsil-native-win32-x64": "0.3.1-next.75"
|
|
248
249
|
}
|
|
249
250
|
}
|