@delali/narsil 0.3.1-next.131 → 0.3.1-next.140
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/analysis-change-JN23AZQP.mjs +43 -0
- package/dist/analysis-change-entry-5JSIMEKG.mjs +1 -0
- package/dist/browser/analysis-change-57MIRJWR.mjs +499 -0
- package/dist/browser/analysis-change-entry-ICGRR3IN.mjs +1 -0
- package/dist/browser/{chunk-UDGB2MWT.mjs → chunk-35B42UFM.mjs} +4 -0
- package/dist/browser/{chunk-VBBLTD7O.mjs → chunk-3EYDURFD.mjs} +39 -27
- package/dist/browser/{chunk-AIIJDWMG.mjs → chunk-4MFH226Q.mjs} +1 -1
- package/dist/browser/{chunk-D7WQF6DV.mjs → chunk-5LYWZJE2.mjs} +2 -2
- package/dist/browser/chunk-67KSBUYR.mjs +173 -0
- package/dist/browser/{chunk-M5UAAXGU.mjs → chunk-6BSB4N6B.mjs} +2 -2
- package/dist/browser/{chunk-NSCSR6MA.mjs → chunk-CGVBGHBX.mjs} +81 -6
- package/dist/browser/chunk-E5SFTOQR.mjs +21 -0
- package/dist/browser/{chunk-VEGHFP2P.mjs → chunk-MZI3TEOW.mjs} +4 -2
- package/dist/browser/chunk-OIZS5KIX.mjs +6 -0
- package/dist/browser/chunk-QHNNULPW.mjs +265 -0
- package/dist/browser/chunk-XVMOQQ34.mjs +384 -0
- package/dist/browser/{chunk-2Y3CO4EQ.mjs → chunk-ZAIZQOTM.mjs} +256 -777
- package/dist/browser/{durability-wiring-FNZSRH4N.mjs → durability-wiring-MTIAN6VT.mjs} +145 -50
- package/dist/browser/import-Q7MXD6BS.mjs +8 -0
- package/dist/browser/{module-4HIMOQM5.mjs → module-5J3PEUEB.mjs} +7 -6
- package/dist/browser/{phrase-module-WESYVU7K.mjs → phrase-module-HGVBO24W.mjs} +1 -1
- package/dist/{restore-queue-JAMNRC6T.mjs → browser/restore-queue-DISFECE4.mjs} +8 -2
- package/dist/browser/{runtime-3X7ZJ5T3.mjs → runtime-VEUH674B.mjs} +2 -2
- package/dist/browser/{snapshot-V7VF6BN6.mjs → snapshot-YBJ5MF2M.mjs} +36 -167
- package/dist/browser/{write-YIC2MKRY.mjs → write-RTWI5MXL.mjs} +8 -6
- package/dist/{capabilities-B6WxrWxt.d.ts → capabilities-DXAmysqJ.d.ts} +10 -3
- package/dist/{chunk-NMXRXFGZ.mjs → chunk-4GCN34JV.mjs} +2 -2
- package/dist/{chunk-SOHMMNCH.mjs → chunk-6VHWXAOI.mjs} +4 -4
- package/dist/{chunk-2C3WXBQS.mjs → chunk-74XB2SXI.mjs} +1 -1
- package/dist/{chunk-OGLV4I3L.mjs → chunk-B5I3IL4H.mjs} +12 -7
- package/dist/chunk-BDIDUW2B.mjs +387 -0
- package/dist/{chunk-5LX6MOIB.mjs → chunk-C3YDYX6C.mjs} +1 -1
- package/dist/{chunk-Y4BVTQ53.mjs → chunk-CCCGEPJM.mjs} +2 -2
- package/dist/{chunk-2JWNJSNE.mjs → chunk-CPCGEIOM.mjs} +11 -8
- package/dist/chunk-CZQ33DLW.mjs +78 -0
- package/dist/{chunk-4GDLFDPZ.mjs → chunk-DD2673TX.mjs} +3 -2
- package/dist/{chunk-RNSC4NFI.mjs → chunk-EEBCDP36.mjs} +3 -1
- package/dist/{chunk-HCGJKDZV.mjs → chunk-FFVLPCLH.mjs} +1 -1
- package/dist/{chunk-WVRDRLIC.mjs → chunk-FKARMUWH.mjs} +6 -6
- package/dist/{chunk-PATMDIMN.mjs → chunk-HJJWY6PT.mjs} +1 -1
- package/dist/chunk-HMDT3I63.mjs +21 -0
- package/dist/{chunk-CZ7ISLXA.mjs → chunk-HNHCNTVG.mjs} +4 -0
- package/dist/{chunk-RWESFSJI.mjs → chunk-IBATGS3J.mjs} +87 -61
- package/dist/{chunk-Y2U5VVWX.mjs → chunk-ICW45TTU.mjs} +1 -1
- package/dist/{chunk-T4OFG4IQ.mjs → chunk-IP4HJOGC.mjs} +90 -16
- package/dist/{chunk-EUCX5K74.mjs → chunk-J3EHATEZ.mjs} +3 -3
- package/dist/{chunk-X5CNUKD5.mjs → chunk-K3AQOZVM.mjs} +37 -20
- package/dist/chunk-LK3MOTXF.mjs +174 -0
- package/dist/{chunk-7OIQ2SIO.mjs → chunk-LLDFIKGP.mjs} +4 -4
- package/dist/{chunk-K77FJXKS.mjs → chunk-MTQTX4BP.mjs} +81 -8
- package/dist/{chunk-ZR4VM4A6.mjs → chunk-N37VMC62.mjs} +1 -18
- package/dist/{chunk-2WBY4Y4M.mjs → chunk-NOT5QOHU.mjs} +1 -1
- package/dist/{chunk-D5TFRB5G.mjs → chunk-NPNK57CA.mjs} +1 -1
- package/dist/{chunk-6SSVIW7Y.mjs → chunk-O4LJQI4G.mjs} +31 -5
- package/dist/{chunk-JJ6EUMXB.mjs → chunk-PNNVTKMT.mjs} +2 -2
- package/dist/{chunk-2SEL6SBS.mjs → chunk-RKAVHNRW.mjs} +2 -2
- package/dist/{chunk-RCMNL7RI.mjs → chunk-SBMAWTRG.mjs} +41 -4
- package/dist/chunk-TCWQJL7O.mjs +188 -0
- package/dist/{chunk-2MKX2SCO.mjs → chunk-U4X4AWKL.mjs} +7 -7
- package/dist/{chunk-PU6SKH7O.mjs → chunk-UBXJQJII.mjs} +2 -2
- package/dist/chunk-UEV53BBO.mjs +480 -0
- package/dist/{chunk-NNO7CO3A.mjs → chunk-UIKN2OTQ.mjs} +1 -1
- package/dist/{chunk-F6AAXI7T.mjs → chunk-VSUYTPME.mjs} +3 -3
- package/dist/{chunk-TGHNXN7W.mjs → chunk-W2XDK66Z.mjs} +180 -541
- package/dist/{chunk-7X5JST5L.mjs → chunk-WNBRW4Q2.mjs} +16 -2
- package/dist/{chunk-6M6SDH3S.mjs → chunk-XMQNOD5V.mjs} +8 -8
- package/dist/{chunk-SZGRYEIC.mjs → chunk-XS2VM7UE.mjs} +3 -3
- package/dist/{chunk-JT3YZGCE.mjs → chunk-XXKWEG53.mjs} +3 -188
- package/dist/{chunk-5W7AEVTH.mjs → chunk-ZMBFWQXN.mjs} +2 -2
- package/dist/{chunk-7XY6VD7B.mjs → chunk-ZSWHPKGM.mjs} +1 -1
- package/dist/{client-gNAfaHcE.d.ts → client-DApBeLbk.d.ts} +17 -2
- package/dist/client.d.ts +5 -5
- package/dist/client.mjs +11 -1
- package/dist/{config-D1cDv3sE.d.ts → config-B0H-vp4U.d.ts} +4 -0
- package/dist/{config-CmYJO34X.d.ts → config-Brysl9NO.d.ts} +1 -1
- package/dist/{direct-executor-HQ4QVDX7.mjs → direct-executor-J5UDLPL3.mjs} +14 -14
- package/dist/distribution/coordinator/etcd.mjs +1 -1
- package/dist/distribution/transport/grpc.mjs +1 -1
- package/dist/distribution.d.ts +21 -5
- package/dist/distribution.mjs +882 -192
- package/dist/{durability-wiring-S7OX2MAI.mjs → durability-wiring-AYOTAPNQ.mjs} +165 -70
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{engine-m_Ddr1bz.d.ts → engine-CuLMbH1-.d.ts} +63 -6
- package/dist/import-QRZAQ5RH.mjs +43 -0
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +20 -20
- package/dist/{long-query-thread-BSL25PD6.mjs → long-query-thread-U7K5A72G.mjs} +14 -14
- package/dist/{module-2E4XYSGT.mjs → module-L2OZO5PQ.mjs} +11 -11
- package/dist/partial-words.mjs +5 -5
- package/dist/pattern.mjs +3 -3
- package/dist/persistence/durability/checkpoint-worker.d.ts +11 -0
- package/dist/persistence/durability/checkpoint-worker.mjs +23 -23
- package/dist/{phrase-module-JERF2IDG.mjs → phrase-module-5QHBD2VJ.mjs} +1 -1
- package/dist/react.d.ts +7 -7
- package/dist/react.mjs +4 -0
- package/dist/{rerank-DMMT4FZA.mjs → rerank-KTLC3E6N.mjs} +5 -5
- package/dist/rerankers/http.mjs +2 -2
- package/dist/{browser/restore-queue-GEZ54CA5.mjs → restore-queue-RYSRRFS4.mjs} +8 -2
- package/dist/{runtime-7MLQ7J64.mjs → runtime-DYV75DCB.mjs} +6 -6
- package/dist/server.d.ts +10 -8
- package/dist/server.mjs +51 -19
- package/dist/{snapshot-DOQLGGEX.mjs → snapshot-BTRZ3MZK.mjs} +59 -190
- package/dist/synonyms.mjs +6 -4
- package/dist/{tasks-Co8HfRD7.d.ts → tasks-DjGjK70Y.d.ts} +22 -6
- package/dist/{thread-SKO7CN3R.mjs → thread-USB3GOPY.mjs} +13 -13
- package/dist/vector/search-worker.mjs +5 -5
- package/dist/workers/entry.mjs +7 -7
- package/dist/{write-ZKR7SNRT.mjs → write-GHTA56OW.mjs} +25 -22
- package/openapi.json +101 -6
- package/package.json +7 -7
|
@@ -1,56 +1,59 @@
|
|
|
1
|
-
import { documentsOfPayloadV2 } from './chunk-
|
|
2
|
-
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
1
|
+
import { documentsOfPayloadV2 } from './chunk-PNNVTKMT.mjs';
|
|
2
|
+
import { buildArchiveFromMemory, archiveStream, memoryCheckpointStore, readSnapshotArchive } from './chunk-FKARMUWH.mjs';
|
|
3
|
+
import { indexMetadataOf, unpackIndexSnapshotEnvelope, loadSegmentedCheckpoint, writeMetadataEnvelope, readVectorFile, readGraphParts, deserializePayloadV1, SINGLE_NODE_PRIMARY_TERM } from './chunk-MTQTX4BP.mjs';
|
|
4
|
+
import { createByteReader } from './chunk-CZQ33DLW.mjs';
|
|
5
|
+
import { restoredConfigFields, restoredEmbedding, rejectSnapshot } from './chunk-TCWQJL7O.mjs';
|
|
6
|
+
import './chunk-6VHWXAOI.mjs';
|
|
7
|
+
import { decodeVectorIndexParts, bytesToVectors } from './chunk-ICW45TTU.mjs';
|
|
8
|
+
import { MAX_SNAPSHOT_ANALYSIS_ATTEMPTS, requireRestoreMemory, earlierSnapshotFootprint, archiveFootprint } from './chunk-LK3MOTXF.mjs';
|
|
9
|
+
import './chunk-K3AQOZVM.mjs';
|
|
8
10
|
import './chunk-37CD3OKS.mjs';
|
|
9
|
-
import
|
|
10
|
-
import './chunk-
|
|
11
|
+
import './chunk-DJHHF2L5.mjs';
|
|
12
|
+
import { manifestKey, encodeSegmentManifest, manifestFileRefs, readSegmentFile } from './chunk-CPCGEIOM.mjs';
|
|
13
|
+
import './chunk-LLDFIKGP.mjs';
|
|
11
14
|
import './chunk-P36MUFEJ.mjs';
|
|
12
15
|
import './chunk-YH5OIL7B.mjs';
|
|
13
|
-
import { encodeIndexConfiguration,
|
|
14
|
-
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-
|
|
15
|
-
import
|
|
16
|
-
import './chunk-
|
|
16
|
+
import { encodeIndexConfiguration, hasNrslMagic, HEADER_SIZE, readHeader, validateRequiredFieldsInSchema, validateEmbeddingConfig, storedArrayPositionGap, decodeIndexConfiguration, prepareStoredSynonyms, arrayPositionsAreStale, insertDocumentVectors } from './chunk-W2XDK66Z.mjs';
|
|
17
|
+
import { validatePatternValueLimit, requireSurfaceFormsForPartialFields } from './chunk-XMQNOD5V.mjs';
|
|
18
|
+
import './chunk-XXKWEG53.mjs';
|
|
19
|
+
import './chunk-UIKN2OTQ.mjs';
|
|
17
20
|
import './chunk-AV4IJKD2.mjs';
|
|
18
|
-
import { decodeEveryStoredDocument } from './chunk-
|
|
19
|
-
import { ARRAY_POSITION_GAP } from './chunk-
|
|
20
|
-
import
|
|
21
|
-
import
|
|
21
|
+
import { decodeEveryStoredDocument } from './chunk-IBATGS3J.mjs';
|
|
22
|
+
import { ARRAY_POSITION_GAP } from './chunk-U4X4AWKL.mjs';
|
|
23
|
+
import './chunk-N37VMC62.mjs';
|
|
24
|
+
import './chunk-ZATRDAYU.mjs';
|
|
22
25
|
import './chunk-EBIHRL7B.mjs';
|
|
23
26
|
import './chunk-HJSN7UYG.mjs';
|
|
24
|
-
import './chunk-
|
|
25
|
-
import './chunk-TGP5M5R7.mjs';
|
|
26
|
-
import './chunk-U2BKYEC7.mjs';
|
|
27
|
+
import './chunk-EEBCDP36.mjs';
|
|
27
28
|
import './chunk-KOKM4PQN.mjs';
|
|
28
29
|
import './chunk-QSK35UC2.mjs';
|
|
29
|
-
import './chunk-
|
|
30
|
-
import './chunk-
|
|
30
|
+
import './chunk-74XB2SXI.mjs';
|
|
31
|
+
import './chunk-RKAVHNRW.mjs';
|
|
31
32
|
import './chunk-WQBCBKY3.mjs';
|
|
32
33
|
import './chunk-JUKYYXSP.mjs';
|
|
33
|
-
import { parseVectorDimension } from './chunk-
|
|
34
|
-
import { raiseEarlierReleaseGraphSetting, validateSchema, validateVectorPromotion, validateVectorStorage,
|
|
34
|
+
import { parseVectorDimension } from './chunk-J3EHATEZ.mjs';
|
|
35
|
+
import { raiseEarlierReleaseGraphSetting, validateSchema, validateVectorPromotion, validateVectorStorage, flattenSchema } from './chunk-UBXJQJII.mjs';
|
|
35
36
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
36
37
|
import './chunk-FQBFZAWG.mjs';
|
|
37
38
|
import './chunk-VJS4JFBQ.mjs';
|
|
38
39
|
import './chunk-GES7U2PM.mjs';
|
|
39
|
-
import './chunk-
|
|
40
|
-
import { resolveIndexAnalysis } from './chunk-
|
|
40
|
+
import './chunk-ZSWHPKGM.mjs';
|
|
41
|
+
import { resolveIndexAnalysis } from './chunk-O4LJQI4G.mjs';
|
|
41
42
|
import './chunk-X5CV2E2B.mjs';
|
|
42
|
-
import './chunk-
|
|
43
|
-
import './chunk-
|
|
43
|
+
import { getLanguage } from './chunk-WNBRW4Q2.mjs';
|
|
44
|
+
import './chunk-TGP5M5R7.mjs';
|
|
45
|
+
import './chunk-U2BKYEC7.mjs';
|
|
46
|
+
import './chunk-NPNK57CA.mjs';
|
|
44
47
|
import './chunk-4UMZ7KQL.mjs';
|
|
45
48
|
import './chunk-R6A773WK.mjs';
|
|
46
49
|
import './chunk-YTJCGKM4.mjs';
|
|
47
|
-
import
|
|
50
|
+
import './chunk-RIIUZJQ3.mjs';
|
|
48
51
|
import './chunk-UJWGQIXU.mjs';
|
|
49
|
-
import { loadVectorCodeFor } from './chunk-
|
|
52
|
+
import { loadVectorCodeFor } from './chunk-FFVLPCLH.mjs';
|
|
50
53
|
import './chunk-22YPZVMG.mjs';
|
|
51
54
|
import './chunk-RFBLQLLZ.mjs';
|
|
52
55
|
import './chunk-L5ORED7V.mjs';
|
|
53
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
56
|
+
import { NarsilError, ErrorCodes } from './chunk-HNHCNTVG.mjs';
|
|
54
57
|
import { decode } from '@msgpack/msgpack';
|
|
55
58
|
|
|
56
59
|
// src/persistence/archive/validate.ts
|
|
@@ -92,161 +95,6 @@ async function validateStagedCheckpoint(store, manifest) {
|
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
|
|
95
|
-
// src/engine/snapshot/constants.ts
|
|
96
|
-
var RESTORE_WORST_HEAP_BYTES_PER_STORED_BYTE = 0.2;
|
|
97
|
-
var RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 7.86;
|
|
98
|
-
var RESTORE_WORST_HEAP_BYTES_PER_VECTOR = 264;
|
|
99
|
-
var RESTORE_WORST_HEAP_BYTES_PER_VECTOR_DIMENSION = 0.24;
|
|
100
|
-
var RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 738;
|
|
101
|
-
var RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 0.2;
|
|
102
|
-
var RESTORE_WORST_EXTERNAL_BYTES_PER_STORED_BYTE = 4.06;
|
|
103
|
-
var RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 14.5;
|
|
104
|
-
var RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR = 1482;
|
|
105
|
-
var RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR_DIMENSION = 9.29;
|
|
106
|
-
var RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 2141;
|
|
107
|
-
var RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 24.15;
|
|
108
|
-
var RESTORE_FLOOR_HEAP_BYTES_PER_STORED_BYTE = 0.16;
|
|
109
|
-
var RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 6.16;
|
|
110
|
-
var RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR = 204;
|
|
111
|
-
var RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR_DIMENSION = 0.17;
|
|
112
|
-
var RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 695;
|
|
113
|
-
var RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 0.04;
|
|
114
|
-
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_STORED_BYTE = 2.14;
|
|
115
|
-
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE = 5.05;
|
|
116
|
-
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR = 1080;
|
|
117
|
-
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR_DIMENSION = 0.72;
|
|
118
|
-
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR = 1744;
|
|
119
|
-
var RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION = 20.05;
|
|
120
|
-
var RESTORE_ESTIMATE_MARGIN = 1.25;
|
|
121
|
-
|
|
122
|
-
// src/engine/snapshot/memory-budget.ts
|
|
123
|
-
var MEGABYTE_BYTES = 1048576;
|
|
124
|
-
var ARCHIVE_RATES = {
|
|
125
|
-
worst: {
|
|
126
|
-
heap: {
|
|
127
|
-
perStoredByte: RESTORE_WORST_HEAP_BYTES_PER_STORED_BYTE,
|
|
128
|
-
perVector: RESTORE_WORST_HEAP_BYTES_PER_VECTOR,
|
|
129
|
-
perVectorDimension: RESTORE_WORST_HEAP_BYTES_PER_VECTOR_DIMENSION
|
|
130
|
-
},
|
|
131
|
-
external: {
|
|
132
|
-
perStoredByte: RESTORE_WORST_EXTERNAL_BYTES_PER_STORED_BYTE,
|
|
133
|
-
perVector: RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR,
|
|
134
|
-
perVectorDimension: RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR_DIMENSION
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
floor: {
|
|
138
|
-
heap: {
|
|
139
|
-
perStoredByte: RESTORE_FLOOR_HEAP_BYTES_PER_STORED_BYTE,
|
|
140
|
-
perVector: RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR,
|
|
141
|
-
perVectorDimension: RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR_DIMENSION
|
|
142
|
-
},
|
|
143
|
-
external: {
|
|
144
|
-
perStoredByte: RESTORE_FLOOR_EXTERNAL_BYTES_PER_STORED_BYTE,
|
|
145
|
-
perVector: RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR,
|
|
146
|
-
perVectorDimension: RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR_DIMENSION
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
var EARLIER_SNAPSHOT_RATES = {
|
|
151
|
-
worst: {
|
|
152
|
-
heap: {
|
|
153
|
-
perStoredByte: RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE,
|
|
154
|
-
perVector: RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR,
|
|
155
|
-
perVectorDimension: RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION
|
|
156
|
-
},
|
|
157
|
-
external: {
|
|
158
|
-
perStoredByte: RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE,
|
|
159
|
-
perVector: RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR,
|
|
160
|
-
perVectorDimension: RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
floor: {
|
|
164
|
-
heap: {
|
|
165
|
-
perStoredByte: RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE,
|
|
166
|
-
perVector: RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR,
|
|
167
|
-
perVectorDimension: RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION
|
|
168
|
-
},
|
|
169
|
-
external: {
|
|
170
|
-
perStoredByte: RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE,
|
|
171
|
-
perVector: RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR,
|
|
172
|
-
perVectorDimension: RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
function bytesAt(rate, storedBytes, vectors) {
|
|
177
|
-
let bytes = storedBytes * rate.perStoredByte;
|
|
178
|
-
for (const { dimension, count } of vectors) bytes += count * (rate.perVector + dimension * rate.perVectorDimension);
|
|
179
|
-
return bytes;
|
|
180
|
-
}
|
|
181
|
-
function footprintAt(rates, replacesIndex, storedBytes, vectors) {
|
|
182
|
-
const chosen = replacesIndex ? rates.worst : rates.floor;
|
|
183
|
-
const scale = replacesIndex ? RESTORE_ESTIMATE_MARGIN : 1 / RESTORE_ESTIMATE_MARGIN;
|
|
184
|
-
return {
|
|
185
|
-
heapBytes: bytesAt(chosen.heap, storedBytes, vectors) * scale,
|
|
186
|
-
externalBytes: bytesAt(chosen.external, storedBytes, vectors) * scale
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
function deadCountOf(dead) {
|
|
190
|
-
if (dead === null) return 0;
|
|
191
|
-
let count = 0;
|
|
192
|
-
for (const byte of dead) {
|
|
193
|
-
for (let bits = byte; bits !== 0; bits &= bits - 1) count += 1;
|
|
194
|
-
}
|
|
195
|
-
return count;
|
|
196
|
-
}
|
|
197
|
-
function archiveFootprint(prepared, manifest, replacesIndex) {
|
|
198
|
-
let segmentBytes = 0;
|
|
199
|
-
for (const partition of manifest.partitions) {
|
|
200
|
-
for (const segment of partition.segments) segmentBytes += segment.bytes;
|
|
201
|
-
}
|
|
202
|
-
const dimensions = extractVectorFieldsFromSchema(prepared.config.schema);
|
|
203
|
-
const vectors = [];
|
|
204
|
-
for (const field of manifest.vectors) {
|
|
205
|
-
const dimension = dimensions.get(field.fieldPath) ?? 0;
|
|
206
|
-
for (const file of field.files) vectors.push({ dimension, count: Math.max(0, file.count - deadCountOf(file.dead)) });
|
|
207
|
-
}
|
|
208
|
-
return footprintAt(ARCHIVE_RATES, replacesIndex, segmentBytes, vectors);
|
|
209
|
-
}
|
|
210
|
-
function earlierSnapshotFootprint(prepared, partitionBytes, vectorCounts, replacesIndex) {
|
|
211
|
-
const dimensions = extractVectorFieldsFromSchema(prepared.config.schema);
|
|
212
|
-
const vectors = [...vectorCounts].map(([fieldPath, count]) => ({ dimension: dimensions.get(fieldPath) ?? 0, count }));
|
|
213
|
-
return footprintAt(EARLIER_SNAPSHOT_RATES, replacesIndex, partitionBytes, vectors);
|
|
214
|
-
}
|
|
215
|
-
function inMegabytes(bytes) {
|
|
216
|
-
return Math.ceil(bytes / MEGABYTE_BYTES);
|
|
217
|
-
}
|
|
218
|
-
function shortfallOf(heapBytes, processBytes, countInUse) {
|
|
219
|
-
const heap = readHeapStatistics();
|
|
220
|
-
if (heap !== null) {
|
|
221
|
-
const limitBytes = heap.configuredLimitBytes ?? heap.limitBytes;
|
|
222
|
-
const availableBytes = countInUse ? limitBytes - heap.usedBytes : limitBytes;
|
|
223
|
-
if (heapBytes > availableBytes) return { budget: "heap", neededBytes: heapBytes, availableBytes };
|
|
224
|
-
}
|
|
225
|
-
const resident = readResidentMemory();
|
|
226
|
-
if (resident !== null) {
|
|
227
|
-
const availableBytes = countInUse ? resident.limitBytes - resident.residentBytes : resident.limitBytes;
|
|
228
|
-
if (processBytes > availableBytes) return { budget: "process", neededBytes: processBytes, availableBytes };
|
|
229
|
-
}
|
|
230
|
-
return null;
|
|
231
|
-
}
|
|
232
|
-
function refuse(indexName, replacesIndex, shortfall) {
|
|
233
|
-
const { budget, neededBytes, availableBytes } = shortfall;
|
|
234
|
-
const where = budget === "heap" ? "of JavaScript heap" : "of process memory";
|
|
235
|
-
const outcome = replacesIndex ? "so the index keeps its earlier contents. Drop the index first to free the memory that it holds, or give the process more memory, then restore again" : "so the engine creates no index. Give the process more memory, then restore again";
|
|
236
|
-
throw new NarsilError(
|
|
237
|
-
ErrorCodes.RESTORE_MEMORY_EXCEEDED,
|
|
238
|
-
`The restore of index "${indexName}" needs about ${inMegabytes(neededBytes)} MB ${where}, and this process has ${inMegabytes(Math.max(0, availableBytes))} MB free, ${outcome}`,
|
|
239
|
-
{ indexName, budget, neededBytes, availableBytes }
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
|
-
function requireRestoreMemory(indexName, footprint, replacesIndex) {
|
|
243
|
-
const processBytes = footprint.heapBytes + footprint.externalBytes;
|
|
244
|
-
if (shortfallOf(footprint.heapBytes, processBytes, true) === null) return;
|
|
245
|
-
const collected = collectAndReturnPages();
|
|
246
|
-
const shortfall = shortfallOf(footprint.heapBytes, processBytes, collected || replacesIndex);
|
|
247
|
-
if (shortfall !== null) refuse(indexName, replacesIndex, shortfall);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
98
|
// src/workers/detached-index.ts
|
|
251
99
|
function attachablePolicy(shared) {
|
|
252
100
|
let attached = false;
|
|
@@ -312,12 +160,14 @@ function prepareRestoredIndex(configuration, deps, reject) {
|
|
|
312
160
|
}
|
|
313
161
|
const storedRevision = typeof configuration.analysisRevision === "string" ? configuration.analysisRevision : null;
|
|
314
162
|
const synonyms = restoredSynonyms(configuration.synonyms, config, language, reject ?? rejectSnapshot);
|
|
163
|
+
const analysisGeneration = Number.isSafeInteger(configuration.analysisGeneration) ? Math.max(0, configuration.analysisGeneration) : 0;
|
|
315
164
|
return {
|
|
316
165
|
config,
|
|
317
166
|
language,
|
|
318
167
|
embeddingAdapter,
|
|
319
168
|
adapterName,
|
|
320
169
|
storedRevision,
|
|
170
|
+
analysisGeneration,
|
|
321
171
|
storedArrayPositionGap: storedArrayPositionGap(configuration.arrayPositionGap),
|
|
322
172
|
synonyms
|
|
323
173
|
};
|
|
@@ -352,7 +202,10 @@ function restoredRegistryEntry(prepared, manager, deps) {
|
|
|
352
202
|
partitionCount: manager.partitionCount,
|
|
353
203
|
analysisRevision: prepared.storedRevision,
|
|
354
204
|
arrayPositionGap: prepared.storedArrayPositionGap,
|
|
355
|
-
synonyms: prepared.synonyms?.encoded ?? null
|
|
205
|
+
synonyms: prepared.synonyms?.encoded ?? null,
|
|
206
|
+
analysisGeneration: prepared.analysisGeneration,
|
|
207
|
+
pendingAnalysis: null,
|
|
208
|
+
durableAnalysis: null
|
|
356
209
|
};
|
|
357
210
|
}
|
|
358
211
|
|
|
@@ -448,6 +301,7 @@ function activate(indexName, restored, entry, deps) {
|
|
|
448
301
|
async function replaceExisting(indexName, restored, entry, deps) {
|
|
449
302
|
const release = { reloads: false, held: [], settled: Promise.resolve(), timedOut: false };
|
|
450
303
|
try {
|
|
304
|
+
await deps.abandonAnalysisChange(indexName);
|
|
451
305
|
await withinLimit(indexName, release, releaseCopies(indexName, release, deps), deps);
|
|
452
306
|
await deps.indexState.replace(indexName, async (wasOpen) => {
|
|
453
307
|
await deps.abandonAnalysisRebuild(indexName);
|
|
@@ -751,9 +605,24 @@ async function checkpointForArchive(deps) {
|
|
|
751
605
|
});
|
|
752
606
|
}
|
|
753
607
|
async function createSnapshot(deps) {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
608
|
+
for (let attempt = 0; attempt < MAX_SNAPSHOT_ANALYSIS_ATTEMPTS; attempt += 1) {
|
|
609
|
+
const checkpoint = await checkpointForArchive(deps);
|
|
610
|
+
try {
|
|
611
|
+
if ((checkpoint.manifest.analysisGeneration ?? 0) === deps.entry.analysisGeneration) {
|
|
612
|
+
const config = await encodeIndexConfiguration(deps.entry);
|
|
613
|
+
return archiveStream({ ...checkpoint, config, sourceIndexName: deps.indexName });
|
|
614
|
+
}
|
|
615
|
+
} catch (error) {
|
|
616
|
+
checkpoint.release();
|
|
617
|
+
throw error;
|
|
618
|
+
}
|
|
619
|
+
checkpoint.release();
|
|
620
|
+
}
|
|
621
|
+
throw new NarsilError(
|
|
622
|
+
ErrorCodes.ANALYSIS_CHANGE_NOT_READY,
|
|
623
|
+
`The analysis of index "${deps.indexName}" changed while the engine wrote its snapshot, so try the snapshot again once the change has a durable checkpoint`,
|
|
624
|
+
{ indexName: deps.indexName }
|
|
625
|
+
);
|
|
757
626
|
}
|
|
758
627
|
function requireSnapshotSource(data) {
|
|
759
628
|
if (data instanceof Uint8Array) return data;
|
package/dist/synonyms.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { synonymSearchModule } from './chunk-
|
|
1
|
+
import { synonymSearchModule } from './chunk-O4LJQI4G.mjs';
|
|
2
2
|
import './chunk-X5CV2E2B.mjs';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-WNBRW4Q2.mjs';
|
|
4
|
+
import './chunk-TGP5M5R7.mjs';
|
|
5
|
+
import './chunk-U2BKYEC7.mjs';
|
|
6
|
+
import './chunk-NPNK57CA.mjs';
|
|
5
7
|
import './chunk-4UMZ7KQL.mjs';
|
|
6
8
|
import './chunk-R6A773WK.mjs';
|
|
7
9
|
import './chunk-YTJCGKM4.mjs';
|
|
8
|
-
import './chunk-
|
|
10
|
+
import './chunk-HNHCNTVG.mjs';
|
|
9
11
|
|
|
10
12
|
// src/synonyms/index.ts
|
|
11
13
|
var synonyms = synonymSearchModule;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { I as IndexInfo, P as PartitionStatsResult, V as VectorMaintenanceResult, M as MemoryStats } from './config-
|
|
1
|
+
import { I as IndexInfo, P as PartitionStatsResult, V as VectorMaintenanceResult, M as MemoryStats } from './config-B0H-vp4U.js';
|
|
2
2
|
import { A as AnyDocument, I as InsertOptions, B as BM25Params, W as WriteOptions } from './schema-BTXbHCqA.js';
|
|
3
3
|
import { a as SynonymRule } from './synonyms-CpOAHPa-.js';
|
|
4
4
|
import { N as NodeRole, c as NodeMemoryReport } from './index-HYnqS1SE.js';
|
|
5
|
-
import { a as ClusterNodeInfo, N as NodeReadiness } from './config-
|
|
5
|
+
import { a as ClusterNodeInfo, N as NodeReadiness } from './config-Brysl9NO.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* The body of `POST /indexes`, which the server sends once the index exists.
|
|
@@ -425,6 +425,20 @@ interface BatchBody {
|
|
|
425
425
|
/** These settings apply to the whole batch. */
|
|
426
426
|
options?: InsertOptions;
|
|
427
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* The body of `POST /indexes/{name}/_change-analysis`, where a key that you
|
|
430
|
+
* leave out keeps its current value.
|
|
431
|
+
*
|
|
432
|
+
* @public
|
|
433
|
+
*/
|
|
434
|
+
interface ChangeAnalysisBody {
|
|
435
|
+
/** This is the name of a language registered on the server. */
|
|
436
|
+
language?: string;
|
|
437
|
+
/** This is a name registered on the server, or `null` for the language default. */
|
|
438
|
+
tokenizer?: string | null;
|
|
439
|
+
/** This is a name registered on the server, a list of words, or `null` for the language default. */
|
|
440
|
+
stopWords?: string | string[] | null;
|
|
441
|
+
}
|
|
428
442
|
/**
|
|
429
443
|
* The body of `POST /indexes/{name}/_rebalance`.
|
|
430
444
|
*
|
|
@@ -459,8 +473,10 @@ interface HttpIndexConfig {
|
|
|
459
473
|
defaultScoring?: 'local' | 'dfs' | 'broadcast';
|
|
460
474
|
/** These parameters tune BM25 for this index and for each of its text fields. */
|
|
461
475
|
bm25?: BM25Params;
|
|
462
|
-
/** This
|
|
463
|
-
|
|
476
|
+
/** This is the name of a tokeniser registered on the server, which then splits text in place of the language's own rules. */
|
|
477
|
+
tokenizer?: string;
|
|
478
|
+
/** This name of a stop word set registered on the server, or this list, replaces the language's stop words. */
|
|
479
|
+
stopWords?: string | string[];
|
|
464
480
|
/** Setting this records term positions in each posting, which the `.nrsl` format carries for readers that match phrases. Highlighting works without it. */
|
|
465
481
|
trackPositions?: boolean;
|
|
466
482
|
/** Setting this to false returns index stems from suggestions and prefix expansion, instead of the words users typed. */
|
|
@@ -551,7 +567,7 @@ interface MemoryStatsResponse extends MemoryStats {
|
|
|
551
567
|
*
|
|
552
568
|
* @public
|
|
553
569
|
*/
|
|
554
|
-
type TaskType = 'optimizeVectors' | 'rebalance' | 'restore' | 'import' | 'importExport' | 'rebuildAnalysis';
|
|
570
|
+
type TaskType = 'optimizeVectors' | 'rebalance' | 'restore' | 'import' | 'importExport' | 'rebuildAnalysis' | 'changeAnalysis';
|
|
555
571
|
/**
|
|
556
572
|
* Where a long-running operation stands.
|
|
557
573
|
*
|
|
@@ -701,4 +717,4 @@ interface TaskStore {
|
|
|
701
717
|
shutdown?(): Promise<void>;
|
|
702
718
|
}
|
|
703
719
|
|
|
704
|
-
export type {
|
|
720
|
+
export type { IndexPartitionsResponse as A, BatchBody as B, CapabilitiesResponse as C, DocumentBody as D, ErrorDetail as E, IndexStateResponse as F, MultiGetResponse as G, HttpIndexConfig as H, ImportError as I, ReadinessResponse as J, ReplicationFactorResponse as K, LivenessResponse as L, MemoryStatsResponse as M, VectorMaintenanceResponse as N, OkResponse as O, VersionResponse as P, BatchFailure as Q, RebalanceBody as R, SynonymSetBody as S, TaskListPage as T, ClusterMemberReport as U, VectorFieldBody as V, ClusterNodeReport as W, PartitionAllocationReport as X, ChangeAnalysisBody as a, CreateIndexEmbedding as b, ImportResult as c, TaskListQuery as d, TaskProgress as e, TaskRecord as f, TaskStatus as g, TaskType as h, TaskStore as i, CreateIndexRequest as j, InsertBody as k, MultiGetBody as l, ReplicationFactorBody as m, BatchResponse as n, ClusterAllocationResponse as o, ClusterTopologyResponse as p, DocumentCountResponse as q, DocumentExistsResponse as r, DocumentIdResponse as s, DocumentPutResponse as t, DocumentRemovedResponse as u, DocumentResponse as v, IndexClearedResponse as w, IndexCreatedResponse as x, IndexDroppedResponse as y, IndexListResponse as z };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
export { closeRequestThread, searchHandler, serveRequests } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { closeRequestThread, searchHandler, serveRequests } from './chunk-B5I3IL4H.mjs';
|
|
2
|
+
import './chunk-SBMAWTRG.mjs';
|
|
3
3
|
import './chunk-KZ3NX2P7.mjs';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-DD2673TX.mjs';
|
|
5
5
|
import './chunk-IWVEG5CX.mjs';
|
|
6
6
|
import './chunk-DJHHF2L5.mjs';
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
7
|
+
import './chunk-XMQNOD5V.mjs';
|
|
8
|
+
import './chunk-U4X4AWKL.mjs';
|
|
9
9
|
import './chunk-ZATRDAYU.mjs';
|
|
10
10
|
import './chunk-EBIHRL7B.mjs';
|
|
11
11
|
import './chunk-HJSN7UYG.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-EEBCDP36.mjs';
|
|
13
13
|
import './chunk-QSK35UC2.mjs';
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import './chunk-74XB2SXI.mjs';
|
|
15
|
+
import './chunk-RKAVHNRW.mjs';
|
|
16
16
|
import './chunk-WQBCBKY3.mjs';
|
|
17
17
|
import './chunk-JUKYYXSP.mjs';
|
|
18
|
-
import './chunk-
|
|
19
|
-
import './chunk-
|
|
18
|
+
import './chunk-J3EHATEZ.mjs';
|
|
19
|
+
import './chunk-UBXJQJII.mjs';
|
|
20
20
|
import './chunk-U476IXKQ.mjs';
|
|
21
21
|
import './chunk-FQBFZAWG.mjs';
|
|
22
22
|
import './chunk-VJS4JFBQ.mjs';
|
|
23
23
|
import './chunk-GES7U2PM.mjs';
|
|
24
|
-
import './chunk-
|
|
24
|
+
import './chunk-ZSWHPKGM.mjs';
|
|
25
25
|
import './chunk-X5CV2E2B.mjs';
|
|
26
|
-
import './chunk-
|
|
26
|
+
import './chunk-NPNK57CA.mjs';
|
|
27
27
|
import './chunk-4UMZ7KQL.mjs';
|
|
28
28
|
import './chunk-R6A773WK.mjs';
|
|
29
29
|
import './chunk-YTJCGKM4.mjs';
|
|
30
30
|
import './chunk-RIIUZJQ3.mjs';
|
|
31
31
|
import './chunk-22YPZVMG.mjs';
|
|
32
32
|
import './chunk-L5ORED7V.mjs';
|
|
33
|
-
import './chunk-
|
|
33
|
+
import './chunk-HNHCNTVG.mjs';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { openSharedVectorField, createVectorStore } from '../chunk-
|
|
2
|
-
import { osqBitsOf, createHNSWIndex, createOsqQuantizer } from '../chunk-
|
|
3
|
-
import '../chunk-DJHHF2L5.mjs';
|
|
1
|
+
import { openSharedVectorField, createVectorStore } from '../chunk-CCCGEPJM.mjs';
|
|
2
|
+
import { osqBitsOf, createHNSWIndex, createOsqQuantizer } from '../chunk-K3AQOZVM.mjs';
|
|
4
3
|
import { osqRecordBytes } from '../chunk-37CD3OKS.mjs';
|
|
4
|
+
import '../chunk-DJHHF2L5.mjs';
|
|
5
5
|
import '../chunk-KOKM4PQN.mjs';
|
|
6
6
|
import { MAX_WORKER_COPIES } from '../chunk-QSK35UC2.mjs';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-74XB2SXI.mjs';
|
|
8
8
|
import '../chunk-VJS4JFBQ.mjs';
|
|
9
9
|
import '../chunk-R6A773WK.mjs';
|
|
10
10
|
import '../chunk-YTJCGKM4.mjs';
|
|
11
11
|
import '../chunk-RFBLQLLZ.mjs';
|
|
12
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-HNHCNTVG.mjs';
|
|
13
13
|
|
|
14
14
|
// src/vector/worker-copy.ts
|
|
15
15
|
function restoreQuantizer(snapshot, store) {
|
package/dist/workers/entry.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { startIdleHeapCleanup } from '../chunk-RIIUZJQ3.mjs';
|
|
2
2
|
import { isValidWorkerAction } from '../chunk-UJWGQIXU.mjs';
|
|
3
|
-
import { loadVectorCode } from '../chunk-
|
|
3
|
+
import { loadVectorCode } from '../chunk-FFVLPCLH.mjs';
|
|
4
4
|
import '../chunk-22YPZVMG.mjs';
|
|
5
5
|
import { threadSlotOfWorker } from '../chunk-RFBLQLLZ.mjs';
|
|
6
6
|
import '../chunk-L5ORED7V.mjs';
|
|
7
|
-
import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-
|
|
7
|
+
import { ErrorCodes, NarsilError, isNarsilError } from '../chunk-HNHCNTVG.mjs';
|
|
8
8
|
|
|
9
9
|
// src/workers/action-handler.ts
|
|
10
10
|
function buildErrorResponse(requestId, code, message, details) {
|
|
@@ -22,9 +22,9 @@ async function importBootstrapModule(moduleUrl) {
|
|
|
22
22
|
await import(moduleUrl);
|
|
23
23
|
}
|
|
24
24
|
async function stopServingRequests() {
|
|
25
|
-
const { closeRequestThread } = await import('../thread-
|
|
25
|
+
const { closeRequestThread } = await import('../thread-USB3GOPY.mjs');
|
|
26
26
|
closeRequestThread();
|
|
27
|
-
const { closeLongQueryThread } = await import('../long-query-thread-
|
|
27
|
+
const { closeLongQueryThread } = await import('../long-query-thread-U7K5A72G.mjs');
|
|
28
28
|
closeLongQueryThread();
|
|
29
29
|
}
|
|
30
30
|
function holdsCopies(executor) {
|
|
@@ -55,7 +55,7 @@ function createActionHandler(executor) {
|
|
|
55
55
|
if (!holdsCopies(executor)) {
|
|
56
56
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "This executor holds no copies to answer requests from");
|
|
57
57
|
}
|
|
58
|
-
const starting = import('../thread-
|
|
58
|
+
const starting = import('../thread-USB3GOPY.mjs').then(
|
|
59
59
|
({ serveRequests }) => serveRequests(executor, action.settings)
|
|
60
60
|
);
|
|
61
61
|
serving.start = starting.then(
|
|
@@ -72,7 +72,7 @@ function createActionHandler(executor) {
|
|
|
72
72
|
if (!holdsCopies(executor)) {
|
|
73
73
|
throw new NarsilError(ErrorCodes.CONFIG_INVALID, "This executor holds no copies to answer long queries from");
|
|
74
74
|
}
|
|
75
|
-
const { serveLongQueries } = await import('../long-query-thread-
|
|
75
|
+
const { serveLongQueries } = await import('../long-query-thread-U7K5A72G.mjs');
|
|
76
76
|
serveLongQueries(executor, action.settings);
|
|
77
77
|
servingRequests = true;
|
|
78
78
|
post(buildSuccessResponse(action.requestId, void 0));
|
|
@@ -118,7 +118,7 @@ async function setup() {
|
|
|
118
118
|
} catch {
|
|
119
119
|
parentPort = null;
|
|
120
120
|
}
|
|
121
|
-
const [{ createDirectExecutor }] = await Promise.all([import('../direct-executor-
|
|
121
|
+
const [{ createDirectExecutor }] = await Promise.all([import('../direct-executor-J5UDLPL3.mjs'), loadVectorCode()]);
|
|
122
122
|
const handleAction = createActionHandler(createDirectExecutor({ threadSlot }));
|
|
123
123
|
if (parentPort) {
|
|
124
124
|
const port = parentPort;
|
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NUMBER_TAG, DATE_TAG, BYTES_TAG, encodeBase64, startsWithTagPrefix, OBJECT_TAG, MILLISECONDS_PER_SECOND, NANOSECONDS_PER_MILLISECOND, DOCUMENT_EXPORT_VERSION, DOCUMENT_EXPORT_FORMAT } from './chunk-BDIDUW2B.mjs';
|
|
2
|
+
import './chunk-CZQ33DLW.mjs';
|
|
3
|
+
import './chunk-TCWQJL7O.mjs';
|
|
4
|
+
import { decodeVectorFilePayload, isDead, bytesToVectors } from './chunk-ICW45TTU.mjs';
|
|
2
5
|
import './chunk-37CD3OKS.mjs';
|
|
3
|
-
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-
|
|
4
|
-
import { openChecksummedEnvelope
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import { setNestedValue, KEYWORD_SEGMENT_ENVELOPE_VERSION, decodeKeywordSegment } from './chunk-LLDFIKGP.mjs';
|
|
7
|
+
import { openChecksummedEnvelope } from './chunk-W2XDK66Z.mjs';
|
|
8
|
+
import './chunk-XMQNOD5V.mjs';
|
|
9
|
+
import './chunk-XXKWEG53.mjs';
|
|
10
|
+
import './chunk-UIKN2OTQ.mjs';
|
|
8
11
|
import './chunk-AV4IJKD2.mjs';
|
|
9
|
-
import { decodeStoredDocument } from './chunk-
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
12
|
+
import { decodeStoredDocument } from './chunk-IBATGS3J.mjs';
|
|
13
|
+
import './chunk-U4X4AWKL.mjs';
|
|
14
|
+
import './chunk-N37VMC62.mjs';
|
|
12
15
|
import './chunk-ZATRDAYU.mjs';
|
|
13
16
|
import './chunk-EBIHRL7B.mjs';
|
|
14
17
|
import './chunk-HJSN7UYG.mjs';
|
|
15
|
-
import { EXPORT_CHUNK_BYTES } from './chunk-
|
|
16
|
-
import './chunk-TGP5M5R7.mjs';
|
|
17
|
-
import './chunk-U2BKYEC7.mjs';
|
|
18
|
+
import { EXPORT_CHUNK_BYTES } from './chunk-EEBCDP36.mjs';
|
|
18
19
|
import './chunk-KOKM4PQN.mjs';
|
|
19
20
|
import './chunk-QSK35UC2.mjs';
|
|
20
|
-
import './chunk-
|
|
21
|
-
import './chunk-
|
|
21
|
+
import './chunk-74XB2SXI.mjs';
|
|
22
|
+
import './chunk-RKAVHNRW.mjs';
|
|
22
23
|
import './chunk-WQBCBKY3.mjs';
|
|
23
24
|
import './chunk-JUKYYXSP.mjs';
|
|
24
|
-
import './chunk-
|
|
25
|
-
import './chunk-
|
|
25
|
+
import './chunk-J3EHATEZ.mjs';
|
|
26
|
+
import './chunk-UBXJQJII.mjs';
|
|
26
27
|
import './chunk-U476IXKQ.mjs';
|
|
27
28
|
import './chunk-FQBFZAWG.mjs';
|
|
28
29
|
import './chunk-VJS4JFBQ.mjs';
|
|
29
30
|
import './chunk-GES7U2PM.mjs';
|
|
30
|
-
import './chunk-
|
|
31
|
-
import './chunk-
|
|
31
|
+
import './chunk-ZSWHPKGM.mjs';
|
|
32
|
+
import './chunk-O4LJQI4G.mjs';
|
|
32
33
|
import './chunk-X5CV2E2B.mjs';
|
|
33
|
-
import './chunk-
|
|
34
|
-
import './chunk-
|
|
34
|
+
import './chunk-WNBRW4Q2.mjs';
|
|
35
|
+
import './chunk-TGP5M5R7.mjs';
|
|
36
|
+
import './chunk-U2BKYEC7.mjs';
|
|
37
|
+
import './chunk-NPNK57CA.mjs';
|
|
35
38
|
import './chunk-4UMZ7KQL.mjs';
|
|
36
39
|
import './chunk-R6A773WK.mjs';
|
|
37
40
|
import './chunk-YTJCGKM4.mjs';
|
|
38
41
|
import './chunk-UJWGQIXU.mjs';
|
|
39
|
-
import './chunk-
|
|
42
|
+
import './chunk-FFVLPCLH.mjs';
|
|
40
43
|
import './chunk-22YPZVMG.mjs';
|
|
41
44
|
import './chunk-RFBLQLLZ.mjs';
|
|
42
45
|
import './chunk-L5ORED7V.mjs';
|
|
43
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
46
|
+
import { NarsilError, ErrorCodes } from './chunk-HNHCNTVG.mjs';
|
|
44
47
|
import { decode } from '@msgpack/msgpack';
|
|
45
48
|
|
|
46
49
|
// src/engine/export/json-line.ts
|