@functional-systems/memdrive 0.1.1-dev.2 → 0.1.1-dev.3
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/CHANGELOG.md +6 -0
- package/README.md +20 -279
- package/dist/commonjs/chunking.d.ts +1 -2
- package/dist/commonjs/chunking.d.ts.map +1 -1
- package/dist/commonjs/chunking.js +2 -5
- package/dist/commonjs/chunking.js.map +1 -1
- package/dist/commonjs/config.d.ts +17 -0
- package/dist/commonjs/config.d.ts.map +1 -0
- package/dist/commonjs/config.js +116 -0
- package/dist/commonjs/config.js.map +1 -0
- package/dist/commonjs/errors.d.ts +10 -6
- package/dist/commonjs/errors.d.ts.map +1 -1
- package/dist/commonjs/errors.js +25 -5
- package/dist/commonjs/errors.js.map +1 -1
- package/dist/commonjs/index.d.ts +15 -5
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +332 -280
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/records.d.ts +44 -0
- package/dist/commonjs/records.d.ts.map +1 -0
- package/dist/commonjs/records.js +88 -0
- package/dist/commonjs/records.js.map +1 -0
- package/dist/commonjs/search.d.ts +8 -0
- package/dist/commonjs/search.d.ts.map +1 -0
- package/dist/commonjs/search.js +56 -0
- package/dist/commonjs/search.js.map +1 -0
- package/dist/commonjs/types.d.ts +84 -252
- package/dist/commonjs/types.d.ts.map +1 -1
- package/dist/esm/chunking.d.ts +1 -2
- package/dist/esm/chunking.d.ts.map +1 -1
- package/dist/esm/chunking.js +2 -4
- package/dist/esm/chunking.js.map +1 -1
- package/dist/esm/config.d.ts +17 -0
- package/dist/esm/config.d.ts.map +1 -0
- package/dist/esm/config.js +107 -0
- package/dist/esm/config.js.map +1 -0
- package/dist/esm/errors.d.ts +10 -6
- package/dist/esm/errors.d.ts.map +1 -1
- package/dist/esm/errors.js +22 -4
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/index.d.ts +15 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +332 -278
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/records.d.ts +44 -0
- package/dist/esm/records.d.ts.map +1 -0
- package/dist/esm/records.js +77 -0
- package/dist/esm/records.js.map +1 -0
- package/dist/esm/search.d.ts +8 -0
- package/dist/esm/search.d.ts.map +1 -0
- package/dist/esm/search.js +52 -0
- package/dist/esm/search.js.map +1 -0
- package/dist/esm/types.d.ts +84 -252
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +7 -42
- package/src/chunking.ts +2 -3
- package/src/config.ts +121 -0
- package/src/errors.ts +20 -6
- package/src/index.ts +352 -260
- package/src/records.ts +83 -0
- package/src/search.ts +57 -0
- package/src/types.ts +74 -253
- package/dist/commonjs/filter.d.ts +0 -30
- package/dist/commonjs/filter.d.ts.map +0 -1
- package/dist/commonjs/filter.js +0 -224
- package/dist/commonjs/filter.js.map +0 -1
- package/dist/commonjs/recall-input.d.ts +0 -8
- package/dist/commonjs/recall-input.d.ts.map +0 -1
- package/dist/commonjs/recall-input.js +0 -45
- package/dist/commonjs/recall-input.js.map +0 -1
- package/dist/commonjs/retriever/index.d.ts +0 -7
- package/dist/commonjs/retriever/index.d.ts.map +0 -1
- package/dist/commonjs/retriever/index.js +0 -167
- package/dist/commonjs/retriever/index.js.map +0 -1
- package/dist/commonjs/retriever/scope.d.ts +0 -5
- package/dist/commonjs/retriever/scope.d.ts.map +0 -1
- package/dist/commonjs/retriever/scope.js +0 -69
- package/dist/commonjs/retriever/scope.js.map +0 -1
- package/dist/commonjs/retriever/types.d.ts +0 -89
- package/dist/commonjs/retriever/types.d.ts.map +0 -1
- package/dist/commonjs/retriever/types.js +0 -3
- package/dist/commonjs/retriever/types.js.map +0 -1
- package/dist/commonjs/storage.d.ts +0 -274
- package/dist/commonjs/storage.d.ts.map +0 -1
- package/dist/commonjs/storage.js +0 -861
- package/dist/commonjs/storage.js.map +0 -1
- package/dist/commonjs/tools/definitions.d.ts +0 -5
- package/dist/commonjs/tools/definitions.d.ts.map +0 -1
- package/dist/commonjs/tools/definitions.js +0 -147
- package/dist/commonjs/tools/definitions.js.map +0 -1
- package/dist/commonjs/tools/evidence-ids.d.ts +0 -7
- package/dist/commonjs/tools/evidence-ids.d.ts.map +0 -1
- package/dist/commonjs/tools/evidence-ids.js +0 -71
- package/dist/commonjs/tools/evidence-ids.js.map +0 -1
- package/dist/commonjs/tools/factory.d.ts +0 -7
- package/dist/commonjs/tools/factory.d.ts.map +0 -1
- package/dist/commonjs/tools/factory.js +0 -169
- package/dist/commonjs/tools/factory.js.map +0 -1
- package/dist/commonjs/tools/index.d.ts +0 -6
- package/dist/commonjs/tools/index.d.ts.map +0 -1
- package/dist/commonjs/tools/index.js +0 -25
- package/dist/commonjs/tools/index.js.map +0 -1
- package/dist/commonjs/tools/internal-types.d.ts +0 -18
- package/dist/commonjs/tools/internal-types.d.ts.map +0 -1
- package/dist/commonjs/tools/internal-types.js +0 -3
- package/dist/commonjs/tools/internal-types.js.map +0 -1
- package/dist/commonjs/tools/short-ids.d.ts +0 -8
- package/dist/commonjs/tools/short-ids.d.ts.map +0 -1
- package/dist/commonjs/tools/short-ids.js +0 -81
- package/dist/commonjs/tools/short-ids.js.map +0 -1
- package/dist/commonjs/tools/types.d.ts +0 -53
- package/dist/commonjs/tools/types.d.ts.map +0 -1
- package/dist/commonjs/tools/types.js +0 -3
- package/dist/commonjs/tools/types.js.map +0 -1
- package/dist/commonjs/values.d.ts +0 -17
- package/dist/commonjs/values.d.ts.map +0 -1
- package/dist/commonjs/values.js +0 -90
- package/dist/commonjs/values.js.map +0 -1
- package/dist/esm/filter.d.ts +0 -30
- package/dist/esm/filter.d.ts.map +0 -1
- package/dist/esm/filter.js +0 -209
- package/dist/esm/filter.js.map +0 -1
- package/dist/esm/recall-input.d.ts +0 -8
- package/dist/esm/recall-input.d.ts.map +0 -1
- package/dist/esm/recall-input.js +0 -40
- package/dist/esm/recall-input.js.map +0 -1
- package/dist/esm/retriever/index.d.ts +0 -7
- package/dist/esm/retriever/index.d.ts.map +0 -1
- package/dist/esm/retriever/index.js +0 -163
- package/dist/esm/retriever/index.js.map +0 -1
- package/dist/esm/retriever/scope.d.ts +0 -5
- package/dist/esm/retriever/scope.d.ts.map +0 -1
- package/dist/esm/retriever/scope.js +0 -66
- package/dist/esm/retriever/scope.js.map +0 -1
- package/dist/esm/retriever/types.d.ts +0 -89
- package/dist/esm/retriever/types.d.ts.map +0 -1
- package/dist/esm/retriever/types.js +0 -2
- package/dist/esm/retriever/types.js.map +0 -1
- package/dist/esm/storage.d.ts +0 -274
- package/dist/esm/storage.d.ts.map +0 -1
- package/dist/esm/storage.js +0 -845
- package/dist/esm/storage.js.map +0 -1
- package/dist/esm/tools/definitions.d.ts +0 -5
- package/dist/esm/tools/definitions.d.ts.map +0 -1
- package/dist/esm/tools/definitions.js +0 -144
- package/dist/esm/tools/definitions.js.map +0 -1
- package/dist/esm/tools/evidence-ids.d.ts +0 -7
- package/dist/esm/tools/evidence-ids.d.ts.map +0 -1
- package/dist/esm/tools/evidence-ids.js +0 -68
- package/dist/esm/tools/evidence-ids.js.map +0 -1
- package/dist/esm/tools/factory.d.ts +0 -7
- package/dist/esm/tools/factory.d.ts.map +0 -1
- package/dist/esm/tools/factory.js +0 -166
- package/dist/esm/tools/factory.js.map +0 -1
- package/dist/esm/tools/index.d.ts +0 -6
- package/dist/esm/tools/index.d.ts.map +0 -1
- package/dist/esm/tools/index.js +0 -22
- package/dist/esm/tools/index.js.map +0 -1
- package/dist/esm/tools/internal-types.d.ts +0 -18
- package/dist/esm/tools/internal-types.d.ts.map +0 -1
- package/dist/esm/tools/internal-types.js +0 -2
- package/dist/esm/tools/internal-types.js.map +0 -1
- package/dist/esm/tools/short-ids.d.ts +0 -8
- package/dist/esm/tools/short-ids.d.ts.map +0 -1
- package/dist/esm/tools/short-ids.js +0 -78
- package/dist/esm/tools/short-ids.js.map +0 -1
- package/dist/esm/tools/types.d.ts +0 -53
- package/dist/esm/tools/types.d.ts.map +0 -1
- package/dist/esm/tools/types.js +0 -2
- package/dist/esm/tools/types.js.map +0 -1
- package/dist/esm/values.d.ts +0 -17
- package/dist/esm/values.d.ts.map +0 -1
- package/dist/esm/values.js +0 -87
- package/dist/esm/values.js.map +0 -1
- package/docs/tools.md +0 -264
- package/src/filter.ts +0 -189
- package/src/recall-input.ts +0 -46
- package/src/retriever/index.ts +0 -142
- package/src/retriever/scope.ts +0 -56
- package/src/retriever/types.ts +0 -68
- package/src/storage.ts +0 -765
- package/src/tools/definitions.ts +0 -175
- package/src/tools/evidence-ids.ts +0 -57
- package/src/tools/factory.ts +0 -153
- package/src/tools/index.ts +0 -25
- package/src/tools/internal-types.ts +0 -12
- package/src/tools/short-ids.ts +0 -58
- package/src/tools/types.ts +0 -48
- package/src/values.ts +0 -103
package/dist/commonjs/index.js
CHANGED
|
@@ -1,315 +1,367 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MemDrive = exports.MemDriveError = void 0;
|
|
4
4
|
exports.create = create;
|
|
5
5
|
exports.open = open;
|
|
6
|
-
const storage_js_1 = require("./storage.js");
|
|
7
|
-
const filter_js_1 = require("./filter.js");
|
|
8
6
|
const errors_js_1 = require("./errors.js");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
7
|
+
const config_js_1 = require("./config.js");
|
|
8
|
+
const records_js_1 = require("./records.js");
|
|
9
|
+
const search_js_1 = require("./search.js");
|
|
11
10
|
var errors_js_2 = require("./errors.js");
|
|
12
11
|
Object.defineProperty(exports, "MemDriveError", { enumerable: true, get: function () { return errors_js_2.MemDriveError; } });
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(0, errors_js_1.requireInput)(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return { ...options };
|
|
12
|
+
const main = 'main';
|
|
13
|
+
const prefix = 'fork-';
|
|
14
|
+
const clients = new WeakMap();
|
|
15
|
+
const requestMaxBytes = 6_029_312;
|
|
16
|
+
const maximumInputBytes = 300_000;
|
|
17
|
+
const maximumRequestDocuments = 1000;
|
|
18
|
+
const writeBatchLimit = 100;
|
|
19
|
+
const validName = (name, maxLength = 52) => typeof name === 'string' && name.length >= 3 && name.length <= maxLength && /^[A-Za-z0-9_-]+$/.test(name);
|
|
20
|
+
const validForkName = (name) => validName(name, 52 - prefix.length) && name !== main;
|
|
21
|
+
function validateConnection(options, keys) {
|
|
22
|
+
(0, errors_js_1.requireInput)((0, config_js_1.keysOnly)(options, keys) && options.client !== null && typeof options.client === 'object'
|
|
23
|
+
&& 'collection' in options.client && typeof options.client.collection === 'function', 'Provide a LambdaDB client and documented file store options.');
|
|
24
|
+
(0, errors_js_1.requireInput)(validName(options.name), 'Store name must be 3–52 letters, digits, underscores or hyphens.');
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const entry = { start() {
|
|
41
|
-
signal?.removeEventListener('abort', cancel);
|
|
42
|
-
active++;
|
|
43
|
-
Promise.resolve().then(() => { (0, errors_js_1.checkAbort)(signal); return operation(); }).then(resolve, reject).finally(() => {
|
|
44
|
-
active--;
|
|
45
|
-
waiting.shift()?.start();
|
|
46
|
-
});
|
|
47
|
-
} };
|
|
48
|
-
const cancel = () => {
|
|
49
|
-
const index = waiting.indexOf(entry);
|
|
50
|
-
if (index < 0)
|
|
51
|
-
return;
|
|
52
|
-
waiting.splice(index, 1);
|
|
53
|
-
signal?.removeEventListener('abort', cancel);
|
|
54
|
-
reject((0, errors_js_1.abortError)(undefined, signal));
|
|
55
|
-
};
|
|
56
|
-
if (active < limit)
|
|
57
|
-
entry.start();
|
|
58
|
-
else {
|
|
59
|
-
waiting.push(entry);
|
|
60
|
-
signal?.addEventListener('abort', cancel, { once: true });
|
|
61
|
-
if (signal?.aborted)
|
|
62
|
-
cancel();
|
|
63
|
-
}
|
|
64
|
-
});
|
|
26
|
+
async function remote(operation, message, signal, codes = {}) {
|
|
27
|
+
try {
|
|
28
|
+
return await (0, errors_js_1.nativeRequest)(operation, signal);
|
|
29
|
+
}
|
|
30
|
+
catch (cause) {
|
|
31
|
+
const error = (0, errors_js_1.databaseError)(cause, message);
|
|
32
|
+
if (error.status !== undefined && codes[error.status] !== undefined)
|
|
33
|
+
error.code = codes[error.status];
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
65
36
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const semantic = { knn: { field: 'embedding', queryText: context, k: candidates, filter } };
|
|
78
|
-
const query = textSearch ? { bayesian: [semantic,
|
|
79
|
-
{ bool: [{ ...filter, occur: 'filter' },
|
|
80
|
-
{ queryString: { query: request.query, defaultField: 'content', skipSyntax: true }, occur: 'must' }] },
|
|
81
|
-
] } : semantic;
|
|
82
|
-
return { size: request.limit, query, ...(request.rerank === false ? (textSearch ? { candidateSize: candidates } : {}) : {
|
|
83
|
-
rerank: { provider: 'typesafe', model: 'jev-1.13.0', queryText: context,
|
|
84
|
-
fields: ['content'], candidateSize: candidates, onFailure: 'error' },
|
|
85
|
-
}) };
|
|
37
|
+
const branchRead = (branch) => ({
|
|
38
|
+
ref: { kind: 'branch', name: branch }, consistentRead: true, includeVectors: false,
|
|
39
|
+
});
|
|
40
|
+
const kindClause = { queryString: { query: '"file"', defaultField: 'kind' }, occur: 'filter' };
|
|
41
|
+
const pathClause = (path) => ({ queryString: { query: JSON.stringify(path), defaultField: 'path' } });
|
|
42
|
+
function pathQuery(paths) {
|
|
43
|
+
return { bool: [
|
|
44
|
+
kindClause,
|
|
45
|
+
paths.length === 1 ? { ...pathClause(paths[0]), occur: 'filter' }
|
|
46
|
+
: { bool: paths.map(path => ({ ...pathClause(path), occur: 'should' })), occur: 'filter' },
|
|
47
|
+
] };
|
|
86
48
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
49
|
+
function writeBatches(records, branch) {
|
|
50
|
+
const envelope = (0, records_js_1.bytes)({ docs: [], branch });
|
|
51
|
+
const batches = [];
|
|
52
|
+
let batch = [];
|
|
53
|
+
let inputBytes = 0, wireBytes = envelope;
|
|
54
|
+
const flush = () => {
|
|
55
|
+
if (batch.length)
|
|
56
|
+
batches.push(batch);
|
|
57
|
+
batch = [];
|
|
58
|
+
inputBytes = 0;
|
|
59
|
+
wireBytes = envelope;
|
|
60
|
+
};
|
|
61
|
+
const fits = (docs) => batch.length + docs.length <= maximumRequestDocuments
|
|
62
|
+
&& inputBytes + docs.reduce((sum, doc) => sum + doc.inputBytes, 0) <= maximumInputBytes
|
|
63
|
+
&& wireBytes + docs.reduce((sum, doc) => sum + doc.wireBytes, 0) <= requestMaxBytes;
|
|
64
|
+
const append = (docs) => {
|
|
65
|
+
batch.push(...docs);
|
|
66
|
+
for (const doc of docs) {
|
|
67
|
+
inputBytes += doc.inputBytes;
|
|
68
|
+
wireBytes += doc.wireBytes;
|
|
97
69
|
}
|
|
98
|
-
|
|
99
|
-
|
|
70
|
+
};
|
|
71
|
+
for (const { docs } of records) {
|
|
72
|
+
if (!fits(docs))
|
|
73
|
+
flush();
|
|
74
|
+
if (fits(docs))
|
|
75
|
+
append(docs);
|
|
76
|
+
else {
|
|
77
|
+
// Keep each ordinary file together. For a large file, stage its
|
|
78
|
+
// chunks first and include the original only in the final request.
|
|
79
|
+
for (const doc of docs) {
|
|
80
|
+
const next = [doc];
|
|
81
|
+
if (!fits(next))
|
|
82
|
+
flush();
|
|
83
|
+
(0, errors_js_1.requireInput)(fits(next), 'A file record exceeds the limit for a native write.');
|
|
84
|
+
append(next);
|
|
85
|
+
}
|
|
100
86
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return mem;
|
|
105
|
-
}));
|
|
106
|
-
}
|
|
107
|
-
function verifyRerank(response, body) {
|
|
108
|
-
const result = response.rerank;
|
|
109
|
-
const same = result?.provider === body.rerank.provider && result?.model === body.rerank.model;
|
|
110
|
-
const applied = result?.status === 'applied' && Number.isSafeInteger(result.candidateCount)
|
|
111
|
-
&& result.scoredCount === result.candidateCount && result.candidateCount !== undefined && result.candidateCount >= response.docs.length
|
|
112
|
-
&& result.candidateCount <= body.rerank.candidateSize
|
|
113
|
-
&& response.docs.every(hit => typeof hit.score === 'number' && Number.isFinite(hit.score) && hit.score >= 0 && hit.score <= 1);
|
|
114
|
-
const empty = result?.status === 'skipped' && result.reason === 'noCandidates'
|
|
115
|
-
&& result.candidateCount === 0 && result.scoredCount === 0 && response.docs.length === 0;
|
|
116
|
-
if (!same || (!applied && !empty))
|
|
117
|
-
throw new errors_js_1.MemDriveError('RERANK_FAILED', 'Native reranking was not confirmed.');
|
|
87
|
+
}
|
|
88
|
+
flush();
|
|
89
|
+
return batches;
|
|
118
90
|
}
|
|
119
|
-
function
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
if (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
};
|
|
138
|
-
const mutation = async (operation) => {
|
|
139
|
-
try {
|
|
140
|
-
return await operation();
|
|
91
|
+
function store(handle, description) {
|
|
92
|
+
const { name, metadataSchema } = description;
|
|
93
|
+
const forks = new Map();
|
|
94
|
+
async function describe(options) {
|
|
95
|
+
const { signal } = (0, errors_js_1.operationOptions)(options);
|
|
96
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
97
|
+
return structuredClone(description);
|
|
98
|
+
}
|
|
99
|
+
async function fetchFiles(branch, fileIds, signal) {
|
|
100
|
+
const response = await remote(() => handle.docs.fetch({ ids: fileIds.map(records_js_1.originalId), ...branchRead(branch) }, (0, errors_js_1.nativeOptions)(signal)), 'Could not read file originals.', signal);
|
|
101
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
102
|
+
const files = new Map();
|
|
103
|
+
const expected = new Set(fileIds);
|
|
104
|
+
for (const doc of (0, records_js_1.resultDocs)(response, name, fileIds.length)) {
|
|
105
|
+
const file = (0, records_js_1.decodeFile)(doc, metadataSchema);
|
|
106
|
+
if (!expected.has(file.fileId) || files.has(file.fileId))
|
|
107
|
+
throw new errors_js_1.MemDriveError('INVALID_RESULT', 'Read returned unexpected or duplicate file originals.');
|
|
108
|
+
files.set(file.fileId, file);
|
|
141
109
|
}
|
|
142
|
-
|
|
143
|
-
|
|
110
|
+
return files;
|
|
111
|
+
}
|
|
112
|
+
function reader(branch) {
|
|
113
|
+
async function read(request, options) {
|
|
114
|
+
const { signal } = (0, errors_js_1.operationOptions)(options);
|
|
115
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
116
|
+
(0, errors_js_1.requireInput)((0, config_js_1.keysOnly)(request, ['fileId', 'path', 'paths']) && Object.keys(request).length === 1, 'Read requires exactly one of fileId, path or paths.');
|
|
117
|
+
if ('fileId' in request) {
|
|
118
|
+
const fileId = request.fileId;
|
|
119
|
+
(0, errors_js_1.requireInput)((0, records_js_1.validFileId)(fileId), 'Provide a fileId returned by MemDrive.');
|
|
120
|
+
return (await fetchFiles(branch, [fileId], signal)).get(fileId) ?? null;
|
|
121
|
+
}
|
|
122
|
+
const multi = 'paths' in request;
|
|
123
|
+
const value = multi ? request.paths : [request.path];
|
|
124
|
+
(0, errors_js_1.requireInput)(Array.isArray(value) && value.length >= 1 && value.length <= writeBatchLimit && [...value].every(records_js_1.validPath)
|
|
125
|
+
&& new Set(value).size === value.length, 'Provide 1–100 distinct valid absolute file paths.');
|
|
126
|
+
const paths = [...value];
|
|
127
|
+
const response = await remote(() => handle.query({ size: paths.length * 2, ...branchRead(branch), query: pathQuery(paths) }, (0, errors_js_1.nativeOptions)(signal)), 'Could not read files by path.', signal);
|
|
128
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
129
|
+
const expected = new Set(paths), files = new Map();
|
|
130
|
+
for (const doc of (0, records_js_1.resultDocs)(response, name, paths.length)) {
|
|
131
|
+
const file = (0, records_js_1.decodeFile)(doc, metadataSchema);
|
|
132
|
+
if (!expected.has(file.path) || files.has(file.path))
|
|
133
|
+
throw new errors_js_1.MemDriveError('INVALID_RESULT', 'Read returned unexpected or duplicate paths.');
|
|
134
|
+
files.set(file.path, file);
|
|
135
|
+
}
|
|
136
|
+
return multi ? paths.flatMap(path => files.has(path) ? [files.get(path)] : []) : files.get(paths[0]) ?? null;
|
|
144
137
|
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
138
|
+
return read;
|
|
139
|
+
}
|
|
140
|
+
function searcher(branch) {
|
|
141
|
+
return async (request, options) => {
|
|
142
|
+
const { signal } = (0, errors_js_1.operationOptions)(options);
|
|
149
143
|
(0, errors_js_1.checkAbort)(signal);
|
|
150
|
-
|
|
144
|
+
const body = (0, search_js_1.searchQuery)(request, metadataSchema);
|
|
145
|
+
const response = await remote(() => handle.query({ ...body, ...branchRead(branch),
|
|
146
|
+
fields: { include: ['id', 'kind', 'fileId', 'path', 'modifiedAt', 'content', 'start', 'end'] } }, (0, errors_js_1.nativeOptions)(signal)), 'File search failed.', signal);
|
|
151
147
|
(0, errors_js_1.checkAbort)(signal);
|
|
148
|
+
const docs = (0, records_js_1.resultDocs)(response, name, body.size);
|
|
149
|
+
const reranked = (0, search_js_1.validateReranking)(response, body);
|
|
150
|
+
const fileIds = new Set(), chunkIds = new Set();
|
|
151
|
+
const chunks = docs.map(doc => {
|
|
152
|
+
if (doc.kind !== 'chunk' || !(0, records_js_1.validFileId)(doc.fileId) || typeof doc.id !== 'string'
|
|
153
|
+
|| !doc.id.startsWith(`chunk:${doc.fileId}:`) || chunkIds.has(doc.id) || !(0, records_js_1.validPath)(doc.path)
|
|
154
|
+
|| typeof doc.content !== 'string' || !doc.content.trim() || /\p{Surrogate}/u.test(doc.content))
|
|
155
|
+
throw new errors_js_1.MemDriveError('INVALID_RESULT', 'Search returned an invalid or duplicate chunk.');
|
|
156
|
+
fileIds.add(doc.fileId);
|
|
157
|
+
chunkIds.add(doc.id);
|
|
158
|
+
return { fileId: doc.fileId, path: doc.path, modifiedAt: doc.modifiedAt, content: doc.content,
|
|
159
|
+
start: doc.start, end: doc.end };
|
|
160
|
+
});
|
|
161
|
+
if (!chunks.length)
|
|
162
|
+
return { hits: [], reranked };
|
|
163
|
+
const files = await fetchFiles(branch, [...fileIds], signal);
|
|
164
|
+
const hits = [];
|
|
165
|
+
for (const chunk of chunks) {
|
|
166
|
+
const file = files.get(chunk.fileId);
|
|
167
|
+
// An orphan or stale chunk must not expose body text from another file or revision.
|
|
168
|
+
if (!file || file.path !== chunk.path || file.modifiedAt !== chunk.modifiedAt)
|
|
169
|
+
continue;
|
|
170
|
+
const { start, end } = chunk;
|
|
171
|
+
const verified = typeof start === 'number' && typeof end === 'number'
|
|
172
|
+
&& Number.isSafeInteger(start) && Number.isSafeInteger(end) && start >= 0 && end > start && end <= file.content.length
|
|
173
|
+
&& file.content.slice(start, end) === chunk.content;
|
|
174
|
+
hits.push({ ...file, content: chunk.content, ...(verified ? { range: { start, end } } : {}) });
|
|
175
|
+
}
|
|
176
|
+
return { hits, reranked };
|
|
152
177
|
};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
|
|
178
|
+
}
|
|
179
|
+
function working(fork) {
|
|
180
|
+
const existing = forks.get(fork);
|
|
181
|
+
if (existing)
|
|
182
|
+
return existing;
|
|
183
|
+
const branch = prefix + fork;
|
|
184
|
+
let writes = Promise.resolve();
|
|
185
|
+
const unconfirmed = new Map();
|
|
186
|
+
async function write(request, options) {
|
|
187
|
+
const { signal } = (0, errors_js_1.operationOptions)(options);
|
|
157
188
|
(0, errors_js_1.checkAbort)(signal);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
189
|
+
const multi = Array.isArray(request);
|
|
190
|
+
const operations = multi ? [...request] : [request];
|
|
191
|
+
(0, errors_js_1.requireInput)(operations.length >= 1 && operations.length <= writeBatchLimit, 'Submit 1–100 file create operations.');
|
|
192
|
+
const prepared = Promise.all(operations.map(operation => (0, records_js_1.fileRecords)(operation, metadataSchema)));
|
|
193
|
+
// Validation and hashing begin immediately. Attach the queue now so overlapping writes keep call order.
|
|
194
|
+
void prepared.catch(() => { });
|
|
195
|
+
const write = writes.then(async () => {
|
|
161
196
|
(0, errors_js_1.checkAbort)(signal);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const mems = await validatedHits(response, request, schema(), options.name, body.size ?? 10, backend.embedding);
|
|
185
|
-
return { ...response, docs: response.docs.map((hit, i) => ({ ...hit, doc: mems[i] })) };
|
|
186
|
-
};
|
|
187
|
-
const body = recallQuery(request, schema(), backend.textSearch, backend.embedding);
|
|
188
|
-
await record({ phase: 'query', request: structuredClone(body) });
|
|
189
|
-
const response = await query(body);
|
|
190
|
-
if (body.rerank)
|
|
191
|
-
verifyRerank(response, body);
|
|
192
|
-
const mems = response.docs.map(hit => hit.doc);
|
|
193
|
-
await record({ phase: 'query_result', response: structuredClone(response) });
|
|
194
|
-
await observe({ type: 'retrieved', ids: mems.map(mem => mem.id), matches: mems.map(storage_js_1.publicMatch) });
|
|
195
|
-
backend.assertActive();
|
|
196
|
-
(0, errors_js_1.checkAbort)(signal);
|
|
197
|
-
usage.elapsedMs = performance.now() - start;
|
|
198
|
-
return { matches: mems.map(storage_js_1.publicMatch), usage };
|
|
199
|
-
}
|
|
200
|
-
catch (cause) {
|
|
201
|
-
const failure = (0, errors_js_1.abortError)(cause, signal);
|
|
202
|
-
usage.elapsedMs = performance.now() - start;
|
|
203
|
-
const error = failure instanceof errors_js_1.MemDriveError ? failure
|
|
204
|
-
: new errors_js_1.MemDriveError('RECALL_FAILED', 'MemDrive retrieval failed.', { cause: failure });
|
|
205
|
-
error.usage = structuredClone(usage);
|
|
206
|
-
throw error;
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
const snapshot = (input) => {
|
|
210
|
-
const start = performance.now();
|
|
211
|
-
try {
|
|
212
|
-
return { input: structuredClone(input), start };
|
|
213
|
-
}
|
|
214
|
-
catch (cause) {
|
|
215
|
-
const error = new errors_js_1.MemDriveError('INVALID_INPUT', 'Recall input must be cloneable data.', { cause });
|
|
216
|
-
error.usage = { elapsedMs: 0, databaseRequests: 0 };
|
|
217
|
-
return { error };
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
const submit = async (prepared, requestIndex, signal) => {
|
|
221
|
-
if (prepared.error)
|
|
222
|
-
throw prepared.error;
|
|
223
|
-
try {
|
|
224
|
-
return await recallQueue(() => executeRecall(prepared.input, prepared.start, requestIndex, signal), signal);
|
|
225
|
-
}
|
|
226
|
-
catch (cause) {
|
|
227
|
-
// Queue cancellation and executeRecall both reject with MemDriveError.
|
|
228
|
-
const error = cause;
|
|
229
|
-
error.usage ??= { elapsedMs: performance.now() - prepared.start, databaseRequests: 0 };
|
|
230
|
-
throw error;
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
|
-
async function recall(input, options) {
|
|
234
|
-
const { signal } = (0, errors_js_1.operationOptions)(options);
|
|
235
|
-
if (input !== null && typeof input === 'object' && Object.hasOwn(input, 'requests')) {
|
|
236
|
-
(0, errors_js_1.requireInput)(keys(input, ['requests']) && Array.isArray(input.requests) && input.requests.length > 0, 'Batch recall requires only a nonempty requests array.');
|
|
237
|
-
// Snapshot every item before any operation can yield or mutate caller data.
|
|
238
|
-
const prepared = Array.from(input.requests, snapshot);
|
|
239
|
-
const results = await Promise.all(prepared.map(async (item, requestIndex) => {
|
|
240
|
-
try {
|
|
241
|
-
return await submit(item, requestIndex, signal);
|
|
197
|
+
const records = await prepared;
|
|
198
|
+
const paths = records.map(record => record.file.path);
|
|
199
|
+
const expectedPaths = new Set(paths);
|
|
200
|
+
(0, errors_js_1.requireInput)(expectedPaths.size === paths.length, 'Create paths must be distinct within one write.');
|
|
201
|
+
const batches = writeBatches(records, branch);
|
|
202
|
+
const response = await remote(() => handle.query({ size: 2 * paths.length, ...branchRead(branch),
|
|
203
|
+
query: pathQuery(paths), fields: { include: ['id', 'kind', 'fileId', 'path'] } }, (0, errors_js_1.nativeOptions)(signal)), 'Could not check create destinations.', signal);
|
|
204
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
205
|
+
const occupied = new Set();
|
|
206
|
+
for (const doc of (0, records_js_1.resultDocs)(response, name, 2 * paths.length)) {
|
|
207
|
+
if (doc.kind !== 'file' || !(0, records_js_1.validFileId)(doc.fileId) || doc.id !== (0, records_js_1.originalId)(doc.fileId)
|
|
208
|
+
|| typeof doc.path !== 'string' || !expectedPaths.has(doc.path) || occupied.has(doc.path))
|
|
209
|
+
throw new errors_js_1.MemDriveError('INVALID_RESULT', 'Destination lookup returned an unexpected or duplicate file.');
|
|
210
|
+
occupied.add(doc.path);
|
|
211
|
+
unconfirmed.delete(doc.path);
|
|
212
|
+
}
|
|
213
|
+
if (occupied.size)
|
|
214
|
+
throw new errors_js_1.MemDriveError('PATH_EXISTS', 'A file already exists at a requested path.', { details: { paths: [...occupied] } });
|
|
215
|
+
for (const path of paths) {
|
|
216
|
+
const fileId = unconfirmed.get(path);
|
|
217
|
+
if (fileId)
|
|
218
|
+
throw new errors_js_1.MemDriveError('WRITE_UNCONFIRMED', 'An earlier create at this path is still unconfirmed.', { details: { fileId, path } });
|
|
242
219
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
220
|
+
const completed = [];
|
|
221
|
+
const staged = new Map();
|
|
222
|
+
const filesById = new Map(records.map(({ file }) => [file.fileId, file]));
|
|
223
|
+
const details = () => ({
|
|
224
|
+
completedFileIds: completed.map(file => file.fileId),
|
|
225
|
+
incompleteTargets: [...staged].map(([fileId, path]) => ({ fileId, path })),
|
|
226
|
+
});
|
|
227
|
+
for (const batch of batches) {
|
|
228
|
+
const docs = batch.map(record => record.doc);
|
|
229
|
+
const ids = new Set(docs.map(doc => doc.id));
|
|
230
|
+
const targets = [...new Map(docs.map(({ fileId, path }) => [fileId, { fileId, path }])).values()];
|
|
231
|
+
const uncertain = (cause) => {
|
|
232
|
+
for (const { kind, fileId, path } of docs)
|
|
233
|
+
if (kind === 'file')
|
|
234
|
+
unconfirmed.set(path, fileId);
|
|
235
|
+
return new errors_js_1.MemDriveError('WRITE_UNCONFIRMED', 'The create may have been accepted. Inspect the files on this fork.', {
|
|
236
|
+
cause, details: { ...(targets.length === 1 ? targets[0] : {}), targets, ...details() },
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
try {
|
|
240
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
241
|
+
}
|
|
242
|
+
catch (cause) {
|
|
243
|
+
throw new errors_js_1.MemDriveError('ABORTED', 'Write aborted before the next request.', { cause, details: details() });
|
|
244
|
+
}
|
|
245
|
+
try {
|
|
246
|
+
await (0, errors_js_1.nativeRequest)(() => handle.docs.upsert({ docs, branch }, (0, errors_js_1.nativeOptions)(signal)), signal);
|
|
247
|
+
}
|
|
248
|
+
catch (cause) {
|
|
249
|
+
const error = (0, errors_js_1.databaseError)(cause, 'The file create was rejected.');
|
|
250
|
+
if ([400, 401, 403, 404, 413, 422, 429].includes(error.status ?? 0)) {
|
|
251
|
+
if (completed.length || staged.size) {
|
|
252
|
+
const partial = new errors_js_1.MemDriveError(error.code, error.message, { cause: error, details: details() });
|
|
253
|
+
partial.status = error.status;
|
|
254
|
+
throw partial;
|
|
255
|
+
}
|
|
256
|
+
throw error;
|
|
257
|
+
}
|
|
258
|
+
throw uncertain(cause);
|
|
259
|
+
}
|
|
260
|
+
try {
|
|
261
|
+
const confirmation = await (0, errors_js_1.nativeRequest)(() => handle.docs.fetch({ ids: [...ids], ...branchRead(branch),
|
|
262
|
+
fields: { include: ['id'] } }, (0, errors_js_1.nativeOptions)(signal)), signal);
|
|
263
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
264
|
+
const found = (0, records_js_1.resultDocs)(confirmation, name, ids.size);
|
|
265
|
+
if (found.some(doc => typeof doc.id !== 'string' || !ids.delete(doc.id)) || ids.size)
|
|
266
|
+
throw new errors_js_1.MemDriveError('INVALID_RESULT', 'The original and its complete chunk set were not confirmed.');
|
|
267
|
+
}
|
|
268
|
+
catch (cause) {
|
|
269
|
+
throw uncertain(cause);
|
|
270
|
+
}
|
|
271
|
+
for (const { fileId, kind, path } of docs) {
|
|
272
|
+
if (kind === 'file') {
|
|
273
|
+
staged.delete(fileId);
|
|
274
|
+
completed.push(filesById.get(fileId));
|
|
275
|
+
}
|
|
276
|
+
else
|
|
277
|
+
staged.set(fileId, path);
|
|
278
|
+
}
|
|
248
279
|
}
|
|
249
|
-
|
|
250
|
-
|
|
280
|
+
return multi ? completed : completed[0];
|
|
281
|
+
});
|
|
282
|
+
writes = write.then(() => undefined, () => undefined);
|
|
283
|
+
return write;
|
|
251
284
|
}
|
|
252
|
-
|
|
285
|
+
const drive = Object.freeze({
|
|
286
|
+
name, at: Object.freeze({ kind: 'fork', name: fork }), read: reader(branch), search: searcher(branch), describe, write,
|
|
287
|
+
});
|
|
288
|
+
forks.set(fork, drive);
|
|
289
|
+
return drive;
|
|
253
290
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
read: (request, options) => backend.read(request, undefined, options),
|
|
258
|
-
list: (request, options) => backend.list(request, options),
|
|
259
|
-
embedding: Object.freeze(structuredClone(backend.embedding)),
|
|
260
|
-
recall,
|
|
261
|
-
async countValues(request, options) {
|
|
291
|
+
const mainView = Object.freeze({
|
|
292
|
+
name, at: Object.freeze({ kind: 'main' }), read: reader(main), search: searcher(main), describe,
|
|
293
|
+
async fork(request, options) {
|
|
262
294
|
const { signal } = (0, errors_js_1.operationOptions)(options);
|
|
263
295
|
(0, errors_js_1.checkAbort)(signal);
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
296
|
+
(0, errors_js_1.requireInput)((0, config_js_1.keysOnly)(request, ['name']) && validForkName(request.name), 'Fork name must be 3–47 letters, digits, underscores or hyphens and cannot be main.');
|
|
297
|
+
const fork = request.name;
|
|
298
|
+
const branch = prefix + fork;
|
|
299
|
+
const result = await remote(() => handle.branches.create({ branchName: branch, source: { kind: 'branch', name: main } }, (0, errors_js_1.nativeOptions)(signal)), 'Could not create the working fork.', signal, { 409: 'BRANCH_CONFLICT' });
|
|
300
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
301
|
+
if (result?.branch?.name !== branch)
|
|
302
|
+
throw new errors_js_1.MemDriveError('INVALID_RESULT', 'Fork creation returned an invalid branch.');
|
|
303
|
+
return working(fork);
|
|
272
304
|
},
|
|
273
305
|
});
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
306
|
+
return {
|
|
307
|
+
main: mainView,
|
|
308
|
+
async openFork(fork, signal) {
|
|
309
|
+
const cached = forks.get(fork);
|
|
310
|
+
if (cached)
|
|
311
|
+
return cached;
|
|
312
|
+
const response = await remote(() => handle.branches.list((0, errors_js_1.nativeOptions)(signal)), 'Could not find the working fork.', signal);
|
|
313
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
314
|
+
if (!Array.isArray(response?.branches) || !response.branches.every(branch => typeof branch?.name === 'string'))
|
|
315
|
+
throw new errors_js_1.MemDriveError('INVALID_RESULT', 'Fork lookup returned invalid branches.');
|
|
316
|
+
if (!response.branches.some(branch => branch.name === prefix + fork))
|
|
317
|
+
throw new errors_js_1.MemDriveError('BRANCH_NOT_FOUND', 'The working fork does not exist.');
|
|
318
|
+
return working(fork);
|
|
319
|
+
},
|
|
281
320
|
};
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
configure: (request, options) => backend.configure(request, options),
|
|
291
|
-
destroy: (options) => backend.destroy(options),
|
|
292
|
-
describe: (options) => backend.describeDescriptor(options),
|
|
293
|
-
});
|
|
321
|
+
}
|
|
322
|
+
function storesFor(client) {
|
|
323
|
+
const existing = clients.get(client);
|
|
324
|
+
if (existing)
|
|
325
|
+
return existing;
|
|
326
|
+
const stores = new Map();
|
|
327
|
+
clients.set(client, stores);
|
|
328
|
+
return stores;
|
|
294
329
|
}
|
|
295
330
|
async function create(options, requestOptions) {
|
|
296
|
-
|
|
297
|
-
(0, errors_js_1.checkAbort)(
|
|
298
|
-
options
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
|
|
331
|
+
const { signal } = (0, errors_js_1.operationOptions)(requestOptions);
|
|
332
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
333
|
+
validateConnection(options, ['client', 'name', 'labels', 'textSearch', 'metadataSchema']);
|
|
334
|
+
const { client, name } = options;
|
|
335
|
+
(0, errors_js_1.requireInput)(typeof client.createCollection === 'function', 'Client must support collection creation.');
|
|
336
|
+
const { indexConfigs, tags, description } = (0, config_js_1.storeConfiguration)(options);
|
|
337
|
+
await remote(() => client.createCollection({ collectionName: name, indexConfigs, tags }, (0, errors_js_1.nativeOptions)(signal)), 'Could not create the file store.', signal, { 409: 'STORE_EXISTS' });
|
|
338
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
339
|
+
const stores = storesFor(client);
|
|
340
|
+
const created = stores.get(name) ?? store(client.collection(name), description);
|
|
341
|
+
stores.set(name, created);
|
|
342
|
+
return created.main;
|
|
302
343
|
}
|
|
303
344
|
async function open(options, requestOptions) {
|
|
304
|
-
|
|
305
|
-
(0, errors_js_1.checkAbort)(
|
|
306
|
-
options
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
345
|
+
const { signal } = (0, errors_js_1.operationOptions)(requestOptions);
|
|
346
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
347
|
+
validateConnection(options, ['client', 'name', 'at']);
|
|
348
|
+
const { client, name, at } = options;
|
|
349
|
+
let fork;
|
|
350
|
+
if (at !== undefined) {
|
|
351
|
+
(0, errors_js_1.requireInput)((0, config_js_1.keysOnly)(at, ['fork']) && validForkName(at.fork), 'Select a working fork by its name.');
|
|
352
|
+
fork = at.fork;
|
|
353
|
+
}
|
|
354
|
+
const stores = storesFor(client);
|
|
355
|
+
let selected = stores.get(name);
|
|
356
|
+
if (!selected) {
|
|
357
|
+
const handle = client.collection(name);
|
|
358
|
+
const response = await remote(() => handle.get((0, errors_js_1.nativeOptions)(signal)), 'Could not inspect the file store.', signal, { 404: 'STORE_NOT_FOUND' });
|
|
359
|
+
(0, errors_js_1.checkAbort)(signal);
|
|
360
|
+
const description = (0, config_js_1.parseStore)(response?.collection, name);
|
|
361
|
+
selected = stores.get(name) ?? store(handle, description);
|
|
362
|
+
stores.set(name, selected);
|
|
363
|
+
}
|
|
364
|
+
return fork === undefined ? selected.main : selected.openFork(fork, signal);
|
|
312
365
|
}
|
|
313
|
-
|
|
314
|
-
exports.list = list;
|
|
366
|
+
exports.MemDrive = Object.freeze({ create, open });
|
|
315
367
|
//# sourceMappingURL=index.js.map
|