@zenera/rag 1.1.5 → 1.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -6
- package/dist/command.js +41 -674
- package/dist/common/embedder.d.ts +3 -0
- package/dist/common/embedder.js +64 -0
- package/dist/common/locate.d.ts +18 -0
- package/dist/common/locate.js +155 -0
- package/dist/common/manifest.d.ts +50 -0
- package/dist/common/manifest.js +62 -0
- package/dist/{schema → common}/match.d.ts +4 -0
- package/dist/{schema → common}/match.js +7 -0
- package/dist/common/progress.d.ts +57 -0
- package/dist/common/progress.js +155 -0
- package/dist/common/prose.d.ts +13 -0
- package/dist/common/prose.js +56 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +6 -3
- package/dist/schema/build.js +6 -2
- package/dist/schema/command.d.ts +3 -0
- package/dist/schema/command.js +819 -0
- package/dist/schema/files.d.ts +5 -27
- package/dist/schema/files.js +9 -29
- package/dist/schema/lookup.d.ts +12 -2
- package/dist/schema/lookup.js +29 -2
- package/dist/{present.d.ts → schema/present.d.ts} +5 -5
- package/dist/{present.js → schema/present.js} +2 -2
- package/dist/{query.d.ts → schema/query.d.ts} +1 -1
- package/dist/schema/readme.d.ts +6 -0
- package/dist/schema/readme.js +122 -0
- package/dist/schema/render.d.ts +8 -0
- package/dist/schema/render.js +12 -2
- package/dist/{repl.d.ts → schema/repl.d.ts} +1 -1
- package/dist/schema/search.js +2 -1
- package/dist/schema/tools.d.ts +3 -1
- package/dist/schema/tools.js +152 -19
- package/dist/schema/trace.d.ts +52 -0
- package/dist/schema/trace.js +144 -0
- package/package.json +3 -3
- package/dist/schema/progress.d.ts +0 -26
- package/dist/schema/progress.js +0 -316
- /package/dist/{query.js → schema/query.js} +0 -0
- /package/dist/{repl.js → schema/repl.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './common/locate.ts';
|
|
2
|
+
export * from './common/manifest.ts';
|
|
3
|
+
export * from './common/match.ts';
|
|
3
4
|
export * from './schema/build.ts';
|
|
4
5
|
export * from './schema/entities.ts';
|
|
5
6
|
export * from './schema/files.ts';
|
|
6
7
|
export * from './schema/graph.ts';
|
|
7
8
|
export * from './schema/hydrate.ts';
|
|
8
9
|
export * from './schema/lookup.ts';
|
|
9
|
-
export * from './schema/
|
|
10
|
+
export * from './schema/present.ts';
|
|
11
|
+
export * from './schema/query.ts';
|
|
10
12
|
export * from './schema/render.ts';
|
|
11
13
|
export * from './schema/schema.ts';
|
|
12
14
|
export * from './schema/search.ts';
|
|
@@ -14,5 +16,6 @@ export * from './schema/spec.ts';
|
|
|
14
16
|
export * from './schema/store.ts';
|
|
15
17
|
export * from './schema/subgraph.ts';
|
|
16
18
|
export * from './schema/tools.ts';
|
|
19
|
+
export * from './schema/trace.ts';
|
|
17
20
|
export * from './schema/typescript.ts';
|
|
18
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./common/locate.js";
|
|
2
|
+
export * from "./common/manifest.js";
|
|
3
|
+
export * from "./common/match.js";
|
|
3
4
|
export * from "./schema/build.js";
|
|
4
5
|
export * from "./schema/entities.js";
|
|
5
6
|
export * from "./schema/files.js";
|
|
6
7
|
export * from "./schema/graph.js";
|
|
7
8
|
export * from "./schema/hydrate.js";
|
|
8
9
|
export * from "./schema/lookup.js";
|
|
9
|
-
export * from "./schema/
|
|
10
|
+
export * from "./schema/present.js";
|
|
11
|
+
export * from "./schema/query.js";
|
|
10
12
|
export * from "./schema/render.js";
|
|
11
13
|
export * from "./schema/schema.js";
|
|
12
14
|
export * from "./schema/search.js";
|
|
@@ -14,5 +16,6 @@ export * from "./schema/spec.js";
|
|
|
14
16
|
export * from "./schema/store.js";
|
|
15
17
|
export * from "./schema/subgraph.js";
|
|
16
18
|
export * from "./schema/tools.js";
|
|
19
|
+
export * from "./schema/trace.js";
|
|
17
20
|
export * from "./schema/typescript.js";
|
|
18
21
|
//# sourceMappingURL=index.js.map
|
package/dist/schema/build.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { beginBuild } from "../common/progress.js";
|
|
1
2
|
import { toEntities } from "./entities.js";
|
|
2
3
|
import { INDEX_VERSION, SOURCES_DIR, writeIndex, } from "./files.js";
|
|
3
4
|
import { buildGraph } from "./graph.js";
|
|
4
|
-
import {
|
|
5
|
+
import { PHASES, SCHEMA_REPORT } from "./readme.js";
|
|
5
6
|
import { loadSpecs } from "./spec.js";
|
|
6
7
|
import { writeStore } from "./store.js";
|
|
7
8
|
const DEFAULT_BATCH = 96;
|
|
@@ -11,6 +12,8 @@ export async function buildIndex(options) {
|
|
|
11
12
|
files: options.files,
|
|
12
13
|
embedding: options.embeddingRef ?? options.embedder.id,
|
|
13
14
|
indexer: options.indexer,
|
|
15
|
+
phases: PHASES,
|
|
16
|
+
report: SCHEMA_REPORT,
|
|
14
17
|
});
|
|
15
18
|
try {
|
|
16
19
|
const corpus = await loadSpecs(options.files);
|
|
@@ -27,7 +30,7 @@ export async function buildIndex(options) {
|
|
|
27
30
|
entities: entities.length,
|
|
28
31
|
},
|
|
29
32
|
};
|
|
30
|
-
journal.read(summary.counts);
|
|
33
|
+
journal.read(summary.counts, summary.counts.entities);
|
|
31
34
|
options.onRead?.(summary);
|
|
32
35
|
journal.phase('embedding');
|
|
33
36
|
const vectors = await embedAll(entities, options, journal);
|
|
@@ -35,6 +38,7 @@ export async function buildIndex(options) {
|
|
|
35
38
|
const written = await writeStore(options.out, entities, vectors);
|
|
36
39
|
const manifest = {
|
|
37
40
|
version: INDEX_VERSION,
|
|
41
|
+
kind: 'schema',
|
|
38
42
|
createdAt: new Date().toISOString(),
|
|
39
43
|
indexer: options.indexer,
|
|
40
44
|
embedding: {
|