@agentproto/adapter-knowledge-files 0.2.0

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/index.mjs ADDED
@@ -0,0 +1,646 @@
1
+ import { randomBytes } from 'crypto';
2
+ import { stat, readFile, mkdir, writeFile, rename, appendFile, readdir } from 'fs/promises';
3
+ import path from 'path';
4
+ import { makeAdapterResolver } from '@agentproto/provider-kit';
5
+
6
+ /**
7
+ * @agentproto/adapter-knowledge-files v0.1.0
8
+ * IKnowledgeProvider over local files with an in-process BM25 index
9
+ * (no embeddings, no network) + provider-kit family + node:fs FsPort.
10
+ */
11
+
12
+ // src/bm25.ts
13
+ var K1 = 1.5;
14
+ var B = 0.75;
15
+ var MIN_TOKEN_LEN = 2;
16
+ var MAX_TOKEN_LEN = 32;
17
+ var STOPWORDS = /* @__PURE__ */ new Set([
18
+ "a",
19
+ "an",
20
+ "and",
21
+ "are",
22
+ "as",
23
+ "at",
24
+ "be",
25
+ "but",
26
+ "by",
27
+ "for",
28
+ "from",
29
+ "has",
30
+ "have",
31
+ "he",
32
+ "her",
33
+ "his",
34
+ "i",
35
+ "if",
36
+ "in",
37
+ "is",
38
+ "it",
39
+ "its",
40
+ "me",
41
+ "my",
42
+ "no",
43
+ "not",
44
+ "of",
45
+ "on",
46
+ "or",
47
+ "she",
48
+ "so",
49
+ "that",
50
+ "the",
51
+ "their",
52
+ "them",
53
+ "then",
54
+ "there",
55
+ "they",
56
+ "this",
57
+ "to",
58
+ "was",
59
+ "we",
60
+ "were",
61
+ "what",
62
+ "when",
63
+ "which",
64
+ "who",
65
+ "will",
66
+ "with",
67
+ "you",
68
+ "your"
69
+ ]);
70
+ function stripFrontmatter(content) {
71
+ if (!content.startsWith("---")) return content;
72
+ const end = content.indexOf("\n---", 3);
73
+ if (end === -1) return content;
74
+ return content.slice(end + 4);
75
+ }
76
+ function tokenize(text) {
77
+ const out = [];
78
+ for (const raw of text.toLowerCase().split(/[^a-z0-9]+/)) {
79
+ if (raw.length < MIN_TOKEN_LEN || raw.length > MAX_TOKEN_LEN) continue;
80
+ if (STOPWORDS.has(raw)) continue;
81
+ out.push(raw);
82
+ }
83
+ return out;
84
+ }
85
+ function buildIndex(inputs) {
86
+ const docs = [];
87
+ const df = /* @__PURE__ */ new Map();
88
+ let totalLength = 0;
89
+ for (const input of inputs) {
90
+ const tokens = tokenize(stripFrontmatter(input.content));
91
+ const tf = /* @__PURE__ */ new Map();
92
+ for (const tok of tokens) {
93
+ tf.set(tok, (tf.get(tok) ?? 0) + 1);
94
+ }
95
+ for (const term of tf.keys()) {
96
+ df.set(term, (df.get(term) ?? 0) + 1);
97
+ }
98
+ docs.push({
99
+ id: input.id,
100
+ text: input.content,
101
+ length: tokens.length,
102
+ tf
103
+ });
104
+ totalLength += tokens.length;
105
+ }
106
+ const avgDocLength = docs.length === 0 ? 0 : totalLength / docs.length;
107
+ return { docs, df, avgDocLength };
108
+ }
109
+ async function buildIndexYielding(inputs, yieldEvery = 50) {
110
+ const docs = [];
111
+ const df = /* @__PURE__ */ new Map();
112
+ let totalLength = 0;
113
+ let i = 0;
114
+ for (const input of inputs) {
115
+ if (i++ % yieldEvery === 0)
116
+ await new Promise((resolve) => setImmediate(resolve));
117
+ const tokens = tokenize(stripFrontmatter(input.content));
118
+ const tf = /* @__PURE__ */ new Map();
119
+ for (const tok of tokens) {
120
+ tf.set(tok, (tf.get(tok) ?? 0) + 1);
121
+ }
122
+ for (const term of tf.keys()) {
123
+ df.set(term, (df.get(term) ?? 0) + 1);
124
+ }
125
+ docs.push({
126
+ id: input.id,
127
+ text: input.content,
128
+ length: tokens.length,
129
+ tf
130
+ });
131
+ totalLength += tokens.length;
132
+ }
133
+ const avgDocLength = docs.length === 0 ? 0 : totalLength / docs.length;
134
+ return { docs, df, avgDocLength };
135
+ }
136
+ function score(index, queryTokens, opts = {}) {
137
+ if (queryTokens.length === 0 || index.docs.length === 0) return [];
138
+ const topK = opts.topK ?? 10;
139
+ const minScore = opts.minScore ?? 0;
140
+ const N = index.docs.length;
141
+ const out = [];
142
+ for (const doc of index.docs) {
143
+ let s = 0;
144
+ for (const term of queryTokens) {
145
+ const f = doc.tf.get(term);
146
+ if (!f) continue;
147
+ const n = index.df.get(term) ?? 0;
148
+ const idf = Math.log((N - n + 0.5) / (n + 0.5) + 1);
149
+ const denom = f + K1 * (1 - B + B * doc.length / (index.avgDocLength === 0 ? 1 : index.avgDocLength));
150
+ s += idf * (f * (K1 + 1) / denom);
151
+ }
152
+ if (s <= minScore) continue;
153
+ out.push({ doc, score: s, snippet: makeSnippet(doc.text, queryTokens) });
154
+ }
155
+ out.sort((a, b) => b.score - a.score);
156
+ return out.slice(0, topK);
157
+ }
158
+ function makeSnippet(text, queryTokens) {
159
+ const body = stripFrontmatter(text);
160
+ const offset = text.length - body.length;
161
+ const lower = body.toLowerCase();
162
+ let firstAt = -1;
163
+ for (const tok of queryTokens) {
164
+ const idx = lower.indexOf(tok);
165
+ if (idx !== -1 && (firstAt === -1 || idx < firstAt)) firstAt = idx;
166
+ }
167
+ const around = 150;
168
+ const start = Math.max(0, (firstAt === -1 ? 0 : firstAt) - around);
169
+ const end = Math.min(body.length, start + 300);
170
+ return {
171
+ start: offset + start,
172
+ end: offset + end,
173
+ text: body.slice(start, end)
174
+ };
175
+ }
176
+
177
+ // src/adapter.ts
178
+ var FILES_ENGINE_ID = "files";
179
+ var INDEXED_EXTENSIONS = [
180
+ ".md",
181
+ ".markdown",
182
+ ".txt",
183
+ ".yaml",
184
+ ".yml",
185
+ ".json"
186
+ ];
187
+ var CACHE_TTL_MS = Number.POSITIVE_INFINITY;
188
+ var INDEX_READ_CONCURRENCY = 10;
189
+ var INDEX_QUERY_TIMEOUT_MS = 4e3;
190
+ var FILES_CAPABILITIES = Object.freeze({
191
+ vectorSearch: false,
192
+ graphTraversal: false,
193
+ hybridSearch: false,
194
+ multiModal: false,
195
+ streaming: false,
196
+ // BM25 returns ranked hits with file path + byte span — usable as
197
+ // citations even though there's no vector concept.
198
+ citations: true,
199
+ // Chunk size matters for backings that split — files engine indexes
200
+ // whole files so this is an informational ceiling.
201
+ maxChunkBytes: 64 * 1024
202
+ });
203
+ var FilesKnowledgeAdapter = class {
204
+ id = FILES_ENGINE_ID;
205
+ capabilities = FILES_CAPABILITIES;
206
+ fs;
207
+ workspacePath;
208
+ cachedIndex = null;
209
+ cachedAt = 0;
210
+ // In-flight build promise: concurrent turns that arrive while the index is
211
+ // still being built (cachedIndex === null) coalesce onto this promise instead
212
+ // of each kicking off a redundant 40-50s Supabase Storage re-scan.
213
+ buildInFlight = null;
214
+ constructor(opts) {
215
+ this.fs = opts.fs;
216
+ this.workspacePath = opts.workspacePath;
217
+ }
218
+ async ingest(input) {
219
+ const corpusBlock = readCorpusMeta(input.metadata);
220
+ if (corpusBlock?.entrySlug) {
221
+ this.invalidate();
222
+ return {
223
+ id: `${corpusBlock.entrySlug}#${corpusBlock.chunkIndex ?? 0}`,
224
+ kind: "text",
225
+ uri: corpusBlock.entryPath ?? input.uri,
226
+ title: input.title,
227
+ metadata: input.metadata ?? {},
228
+ bytes: byteLength(input.content),
229
+ status: "ready",
230
+ indexedAt: /* @__PURE__ */ new Date()
231
+ };
232
+ }
233
+ if (input.kind === "text") {
234
+ const sourceId = stableSlug(input.uri);
235
+ const dest = `${this.workspacePath}/sources/${sourceId}.md`;
236
+ const content = decodeContent(input.content) ?? "";
237
+ await this.fs.writeFile(dest, content);
238
+ this.invalidate();
239
+ return {
240
+ id: sourceId,
241
+ kind: "text",
242
+ uri: input.uri,
243
+ title: input.title,
244
+ metadata: input.metadata ?? {},
245
+ bytes: byteLength(content),
246
+ status: "ready",
247
+ indexedAt: /* @__PURE__ */ new Date()
248
+ };
249
+ }
250
+ if (input.kind === "url") {
251
+ const res = await fetch(input.uri);
252
+ if (!res.ok) {
253
+ throw new Error(
254
+ `files engine: failed to fetch ${input.uri}: ${res.status} ${res.statusText}`
255
+ );
256
+ }
257
+ const text = await res.text();
258
+ const sourceId = stableSlug(input.uri);
259
+ const dest = `${this.workspacePath}/sources/${sourceId}.txt`;
260
+ await this.fs.writeFile(dest, text);
261
+ this.invalidate();
262
+ return {
263
+ id: sourceId,
264
+ kind: "url",
265
+ uri: input.uri,
266
+ title: input.title,
267
+ metadata: input.metadata ?? {},
268
+ bytes: byteLength(text),
269
+ status: "ready",
270
+ indexedAt: /* @__PURE__ */ new Date()
271
+ };
272
+ }
273
+ throw new Error(
274
+ `files engine: ingest kind="${input.kind}" not supported. Pass kind="text" with inline content, or kind="url" for the engine to fetch.`
275
+ );
276
+ }
277
+ async query(q) {
278
+ const start = Date.now();
279
+ const index = await this.ensureIndex(INDEX_QUERY_TIMEOUT_MS);
280
+ const tokens = tokenize(q.query);
281
+ if (tokens.length === 0) {
282
+ return {
283
+ hits: Object.freeze([]),
284
+ tookMs: Date.now() - start,
285
+ engine: this.id,
286
+ modeUsed: "vector"
287
+ };
288
+ }
289
+ const scored = score(index, tokens, {
290
+ topK: q.topK,
291
+ minScore: q.minScore
292
+ });
293
+ const hits = scored.map((s) => {
294
+ const meta = parseFrontmatterMetadata(s.doc.text);
295
+ const snippetText = s.snippet?.text ?? s.doc.text.slice(0, 300);
296
+ return {
297
+ sourceId: s.doc.id,
298
+ chunkId: s.doc.id,
299
+ text: snippetText,
300
+ score: s.score,
301
+ // span is in original-file bytes; matches engine "citations" capability.
302
+ span: s.snippet ? { start: s.snippet.start, end: s.snippet.end } : void 0,
303
+ metadata: meta
304
+ };
305
+ });
306
+ return {
307
+ hits: Object.freeze(hits),
308
+ tookMs: Date.now() - start,
309
+ engine: this.id,
310
+ // BM25 isn't really "vector" — the union doesn't have a "keyword"
311
+ // option. Report "vector" as the closest existing label until the
312
+ // mode union widens.
313
+ modeUsed: "vector"
314
+ };
315
+ }
316
+ async listSources(filter) {
317
+ const index = await this.ensureIndex();
318
+ const out = [];
319
+ for (const doc of index.docs) {
320
+ const meta = parseFrontmatterMetadata(doc.text);
321
+ const source = {
322
+ id: doc.id,
323
+ kind: "file",
324
+ uri: doc.id,
325
+ title: typeof meta.title === "string" ? meta.title : void 0,
326
+ bytes: byteLength(doc.text),
327
+ status: "ready",
328
+ metadata: meta
329
+ };
330
+ if (filter?.kind && source.kind !== filter.kind) continue;
331
+ if (filter?.status && source.status !== filter.status) continue;
332
+ out.push(source);
333
+ }
334
+ return Object.freeze(out);
335
+ }
336
+ async getSource(id) {
337
+ const index = await this.ensureIndex();
338
+ const doc = index.docs.find((d) => d.id === id);
339
+ if (!doc) return null;
340
+ const meta = parseFrontmatterMetadata(doc.text);
341
+ return {
342
+ id: doc.id,
343
+ kind: "file",
344
+ uri: doc.id,
345
+ title: typeof meta.title === "string" ? meta.title : void 0,
346
+ bytes: byteLength(doc.text),
347
+ status: "ready",
348
+ metadata: meta
349
+ };
350
+ }
351
+ async deleteSource(id) {
352
+ if (await this.fs.exists(id)) {
353
+ await this.fs.writeFile(id, "");
354
+ }
355
+ this.invalidate();
356
+ }
357
+ async healthCheck() {
358
+ try {
359
+ return await this.fs.exists(this.workspacePath);
360
+ } catch {
361
+ return false;
362
+ }
363
+ }
364
+ async dispose() {
365
+ this.cachedIndex = null;
366
+ }
367
+ /** Drop the cached BM25 index — next query rebuilds. */
368
+ invalidate() {
369
+ this.cachedIndex = null;
370
+ this.cachedAt = 0;
371
+ }
372
+ async ensureIndex(timeoutMs) {
373
+ if (this.cachedIndex && Date.now() - this.cachedAt < CACHE_TTL_MS) {
374
+ return this.cachedIndex;
375
+ }
376
+ if (!this.buildInFlight) {
377
+ this.buildInFlight = this._buildIndex().finally(() => {
378
+ this.buildInFlight = null;
379
+ });
380
+ }
381
+ if (timeoutMs !== void 0) {
382
+ const EMPTY = { docs: [], avgDocLength: 0, df: /* @__PURE__ */ new Map() };
383
+ const deadline = new Promise(
384
+ (resolve) => setTimeout(() => resolve(EMPTY), timeoutMs)
385
+ );
386
+ return Promise.race([this.buildInFlight, deadline]);
387
+ }
388
+ return this.buildInFlight;
389
+ }
390
+ async _buildIndex() {
391
+ const allPaths = await this.fs.walk(this.workspacePath);
392
+ const candidates = allPaths.filter(
393
+ (p) => INDEXED_EXTENSIONS.some((ext) => p.toLowerCase().endsWith(ext))
394
+ );
395
+ const inputs = await mapWithConcurrency(
396
+ candidates,
397
+ INDEX_READ_CONCURRENCY,
398
+ async (path2) => ({
399
+ id: path2,
400
+ content: await this.fs.readFile(path2).catch(() => "")
401
+ })
402
+ );
403
+ const index = await buildIndexYielding(
404
+ inputs.filter((i) => i.content.length > 0)
405
+ );
406
+ this.cachedIndex = index;
407
+ this.cachedAt = Date.now();
408
+ return index;
409
+ }
410
+ };
411
+ async function mapWithConcurrency(items, limit, fn) {
412
+ const results = new Array(items.length);
413
+ let cursor = 0;
414
+ const workers = Array.from(
415
+ { length: Math.max(1, Math.min(limit, items.length)) },
416
+ async () => {
417
+ while (cursor < items.length) {
418
+ const i = cursor++;
419
+ results[i] = await fn(items[i], i);
420
+ }
421
+ }
422
+ );
423
+ await Promise.all(workers);
424
+ return results;
425
+ }
426
+ function decodeContent(content) {
427
+ if (typeof content === "string") return content;
428
+ if (content instanceof Uint8Array) return new TextDecoder().decode(content);
429
+ return void 0;
430
+ }
431
+ function byteLength(content) {
432
+ if (typeof content === "string")
433
+ return new TextEncoder().encode(content).byteLength;
434
+ if (content instanceof Uint8Array) return content.byteLength;
435
+ return 0;
436
+ }
437
+ function stableSlug(uri) {
438
+ const base = uri.replace(/^[a-z]+:\/+/, "").replace(/[/\\]+/g, "-");
439
+ const slug = base.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 96);
440
+ return slug || `source-${Date.now().toString(36)}`;
441
+ }
442
+ function parseFrontmatterMetadata(content) {
443
+ if (!content.startsWith("---")) return Object.freeze({});
444
+ const end = content.indexOf("\n---", 3);
445
+ if (end === -1) return Object.freeze({});
446
+ const block = content.slice(4, end).trim();
447
+ const out = {};
448
+ for (const line of block.split("\n")) {
449
+ const m = line.match(/^([a-zA-Z0-9_.-]+)\s*:\s*(.*)$/);
450
+ if (!m) continue;
451
+ const key = m[1];
452
+ let value = m[2].trim();
453
+ if (typeof value === "string") {
454
+ if (value.startsWith('"') && value.endsWith('"'))
455
+ value = value.slice(1, -1);
456
+ else if (value.startsWith("'") && value.endsWith("'"))
457
+ value = value.slice(1, -1);
458
+ }
459
+ out[key] = value;
460
+ }
461
+ if (typeof out.slug === "string" && !("entrySlug" in out)) {
462
+ out.entrySlug = out.slug;
463
+ }
464
+ return Object.freeze(out);
465
+ }
466
+ function readCorpusMeta(metadata) {
467
+ if (!metadata) return void 0;
468
+ const corpus = metadata.corpus;
469
+ if (!corpus || typeof corpus !== "object") return void 0;
470
+ const block = corpus;
471
+ return {
472
+ entrySlug: typeof block.entrySlug === "string" ? block.entrySlug : void 0,
473
+ entryPath: typeof block.entryPath === "string" ? block.entryPath : void 0,
474
+ chunkIndex: typeof block.chunkIndex === "number" ? block.chunkIndex : void 0
475
+ };
476
+ }
477
+ var LocalFs = class {
478
+ root;
479
+ constructor(opts) {
480
+ this.root = opts.root;
481
+ }
482
+ async exists(p) {
483
+ try {
484
+ await stat(this.resolve(p));
485
+ return true;
486
+ } catch {
487
+ return false;
488
+ }
489
+ }
490
+ async readFile(p) {
491
+ return await readFile(this.resolve(p), "utf8");
492
+ }
493
+ /**
494
+ * Atomic write: write to `${target}.tmp-{nonce}`, then rename. Rename is
495
+ * atomic on the same filesystem. Creates parent dirs as needed.
496
+ */
497
+ async writeFile(p, content) {
498
+ const target = this.resolve(p);
499
+ await mkdir(path.dirname(target), { recursive: true });
500
+ const tmp = `${target}.tmp-${randomBytes(8).toString("hex")}`;
501
+ await writeFile(tmp, content, "utf8");
502
+ await rename(tmp, target);
503
+ }
504
+ async appendFile(p, content) {
505
+ const target = this.resolve(p);
506
+ await mkdir(path.dirname(target), { recursive: true });
507
+ await appendFile(target, content, "utf8");
508
+ }
509
+ async readdir(p) {
510
+ return await readdir(this.resolve(p));
511
+ }
512
+ async walk(p) {
513
+ const out = [];
514
+ const start = this.resolve(p);
515
+ const visit = async (dir) => {
516
+ let entries = [];
517
+ try {
518
+ entries = await readdir(dir);
519
+ } catch {
520
+ return;
521
+ }
522
+ for (const ent of entries) {
523
+ if (ent.startsWith(".")) continue;
524
+ const full = path.join(dir, ent);
525
+ const s = await stat(full);
526
+ if (s.isDirectory()) {
527
+ await visit(full);
528
+ } else if (s.isFile()) {
529
+ out.push(path.relative(this.root, full).split(path.sep).join("/"));
530
+ }
531
+ }
532
+ };
533
+ await visit(start);
534
+ return out;
535
+ }
536
+ async stat(p) {
537
+ try {
538
+ const s = await stat(this.resolve(p));
539
+ return {
540
+ kind: s.isDirectory() ? "directory" : "file",
541
+ bytes: s.isFile() ? s.size : void 0,
542
+ modifiedAt: s.mtime
543
+ };
544
+ } catch {
545
+ return null;
546
+ }
547
+ }
548
+ /**
549
+ * Advisory lock — a single-process no-op. The files engine never calls
550
+ * `lock()` (it only reads/writes whole source files), and this backing is
551
+ * local CLI, for which the `FsPort` contract permits a no-op lock.
552
+ */
553
+ async lock(_p) {
554
+ return { release: async () => {
555
+ } };
556
+ }
557
+ /**
558
+ * Resolve a workspace-relative path to an absolute host path, refusing to
559
+ * climb out of the workspace root (defense against `../../etc/passwd`-style
560
+ * abuse). The files engine's paths must stay inside the workspace.
561
+ */
562
+ resolve(p) {
563
+ const normalized = path.posix.normalize("/" + p.replace(/^\/+/, ""));
564
+ const rel = normalized.slice(1);
565
+ if (rel.startsWith("..")) {
566
+ throw new Error(
567
+ `LocalFs: path "${p}" escapes the workspace root "${this.root}"`
568
+ );
569
+ }
570
+ return path.join(this.root, rel);
571
+ }
572
+ };
573
+
574
+ // src/env.ts
575
+ function loadFilesKnowledgeEnv() {
576
+ const root = process.env.KNOWLEDGE_FILES_ROOT;
577
+ const workspacePath = process.env.KNOWLEDGE_FILES_PATH;
578
+ return {
579
+ root: root !== void 0 && root !== "" ? root : process.cwd(),
580
+ workspacePath: workspacePath !== void 0 && workspacePath !== "" ? workspacePath.trim() : "knowledge"
581
+ };
582
+ }
583
+
584
+ // src/standalone.ts
585
+ function createStandaloneFilesAdapter() {
586
+ const env = loadFilesKnowledgeEnv();
587
+ return new FilesKnowledgeAdapter({
588
+ fs: new LocalFs({ root: env.root }),
589
+ workspacePath: env.workspacePath
590
+ });
591
+ }
592
+
593
+ // src/catalog.ts
594
+ var KNOWLEDGE_FAMILY = "knowledge";
595
+ var FILES_BM25_SLUG = "files";
596
+ var KNOWLEDGE_FILES_CATALOG = [
597
+ {
598
+ slug: FILES_BM25_SLUG,
599
+ name: "files (BM25)",
600
+ description: "Knowledge retrieval from local workspace files via an in-process BM25 index. No embeddings, no network, no API key \u2014 works the instant a workspace has files to index.",
601
+ packageName: "@agentproto/adapter-knowledge-files",
602
+ hint: "files \xB7 bm25"
603
+ }
604
+ ];
605
+ function resolveKnowledgeBackend(slug) {
606
+ const catalogEntry = KNOWLEDGE_FILES_CATALOG.find(
607
+ (entry) => entry.slug === slug
608
+ );
609
+ if (catalogEntry === void 0) {
610
+ throw new Error(`unknown knowledge backend slug: ${slug}`);
611
+ }
612
+ switch (slug) {
613
+ case FILES_BM25_SLUG: {
614
+ let cached = null;
615
+ const provider = () => cached ??= createStandaloneFilesAdapter();
616
+ return {
617
+ slug,
618
+ name: catalogEntry.name,
619
+ description: catalogEntry.description,
620
+ version: "0.1.0",
621
+ // No creds, no external service — indexing the local workspace works
622
+ // out of the box, so there is nothing to set up.
623
+ requiresSetup: false,
624
+ check: () => provider().healthCheck(),
625
+ info() {
626
+ return {
627
+ slug,
628
+ engine: "bm25",
629
+ capabilities: { vectorSearch: false, needsCreds: false }
630
+ };
631
+ },
632
+ provider
633
+ };
634
+ }
635
+ }
636
+ throw new Error(`unhandled knowledge backend slug: ${slug}`);
637
+ }
638
+ function makeKnowledgeFilesResolver() {
639
+ return makeAdapterResolver({
640
+ load: async (slug) => resolveKnowledgeBackend(slug)
641
+ });
642
+ }
643
+
644
+ export { FILES_BM25_SLUG, FILES_CAPABILITIES, FILES_ENGINE_ID, FilesKnowledgeAdapter, KNOWLEDGE_FAMILY, KNOWLEDGE_FILES_CATALOG, LocalFs, buildIndex, buildIndexYielding, createStandaloneFilesAdapter, loadFilesKnowledgeEnv, makeKnowledgeFilesResolver, resolveKnowledgeBackend, score, tokenize };
645
+ //# sourceMappingURL=index.mjs.map
646
+ //# sourceMappingURL=index.mjs.map