embedded-raptor 2.0.0 → 2.1.1
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/candidate-set.d.ts +14 -1
- package/dist/candidate-set.d.ts.map +1 -1
- package/dist/cli.cjs +94 -29
- package/dist/cli.mjs +94 -29
- package/dist/commands/delete.d.ts +4 -1
- package/dist/commands/delete.d.ts.map +1 -1
- package/dist/commands/get.d.ts +4 -1
- package/dist/commands/get.d.ts.map +1 -1
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/search.d.ts +4 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/store.d.ts +4 -1
- package/dist/commands/store.d.ts.map +1 -1
- package/dist/commands/wal.d.ts +41 -0
- package/dist/commands/wal.d.ts.map +1 -0
- package/dist/engine-DKn_V99U.cjs +1545 -0
- package/dist/engine-Zax2PJSW.mjs +1488 -0
- package/dist/engine.d.ts +19 -2
- package/dist/engine.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/storage-engine/constants.d.ts +4 -3
- package/dist/storage-engine/constants.d.ts.map +1 -1
- package/dist/storage-engine/data-format.d.ts +2 -2
- package/dist/storage-engine/data-format.d.ts.map +1 -1
- package/dist/storage-engine/index.d.ts +3 -1
- package/dist/storage-engine/index.d.ts.map +1 -1
- package/dist/storage-engine/integration/helpers.d.ts +32 -0
- package/dist/storage-engine/integration/helpers.d.ts.map +1 -0
- package/dist/storage-engine/key-index.d.ts +6 -1
- package/dist/storage-engine/key-index.d.ts.map +1 -1
- package/dist/storage-engine/storage-engine.d.ts +17 -0
- package/dist/storage-engine/storage-engine.d.ts.map +1 -1
- package/dist/storage-engine/types.d.ts +19 -0
- package/dist/storage-engine/types.d.ts.map +1 -1
- package/dist/storage-engine/wal.d.ts +6 -0
- package/dist/storage-engine/wal.d.ts.map +1 -1
- package/dist/storage-engine/write-batch.d.ts +44 -0
- package/dist/storage-engine/write-batch.d.ts.map +1 -0
- package/dist/storage-engine/write-batcher.d.ts +58 -0
- package/dist/storage-engine/write-batcher.d.ts.map +1 -0
- package/package.json +3 -2
package/dist/candidate-set.d.ts
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A fixed-size collection that maintains the top N highest-value entries.
|
|
3
|
+
* Uses a min-heap internally for O(log n) insertion when at capacity.
|
|
4
|
+
*/
|
|
1
5
|
export declare class CandidateSet {
|
|
2
6
|
readonly size: number;
|
|
3
|
-
|
|
7
|
+
private readonly heap;
|
|
4
8
|
constructor(size?: number);
|
|
5
9
|
add(key: string, value: number): void;
|
|
6
10
|
count(): number;
|
|
7
11
|
getEntries(): CandidateSetEntry[];
|
|
8
12
|
getKeys(): string[];
|
|
13
|
+
/**
|
|
14
|
+
* Bubble up element at index to maintain min-heap property
|
|
15
|
+
*/
|
|
16
|
+
private bubbleUp;
|
|
17
|
+
/**
|
|
18
|
+
* Bubble down element at index to maintain min-heap property
|
|
19
|
+
*/
|
|
20
|
+
private bubbleDown;
|
|
21
|
+
private swap;
|
|
9
22
|
}
|
|
10
23
|
declare class CandidateSetEntry {
|
|
11
24
|
readonly key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidate-set.d.ts","sourceRoot":"","sources":["../src/candidate-set.ts"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IACvB,SAAgB,IAAI,EAAE,MAAM,CAAA;IAC5B,
|
|
1
|
+
{"version":3,"file":"candidate-set.d.ts","sourceRoot":"","sources":["../src/candidate-set.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,YAAY;IACvB,SAAgB,IAAI,EAAE,MAAM,CAAA;IAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA0B;gBAEnC,IAAI,SAAI;IAMpB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAmBrC,KAAK,IAAI,MAAM;IAIf,UAAU,IAAI,iBAAiB,EAAE;IAKjC,OAAO,IAAI,MAAM,EAAE;IAInB;;OAEG;IACH,OAAO,CAAC,QAAQ;IAWhB;;OAEG;IACH,OAAO,CAAC,UAAU;IAgClB,OAAO,CAAC,IAAI;CAKb;AAED,cAAM,iBAAiB;IACrB,SAAgB,GAAG,EAAE,MAAM,CAAA;IAC3B,SAAgB,KAAK,EAAE,MAAM,CAAA;gBAEjB,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAIvC"}
|
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_engine = require('./engine-
|
|
2
|
+
const require_engine = require('./engine-DKn_V99U.cjs');
|
|
3
3
|
let node_path = require("node:path");
|
|
4
4
|
node_path = require_engine.__toESM(node_path);
|
|
5
5
|
let node_fs = require("node:fs");
|
|
@@ -35,36 +35,49 @@ const searchFlags = {
|
|
|
35
35
|
//#region src/commands/store.ts
|
|
36
36
|
const store = (0, cleye.command)({
|
|
37
37
|
name: "store",
|
|
38
|
-
description: "Store a text embedding with a key",
|
|
39
38
|
parameters: ["<key>", "<text>"],
|
|
40
|
-
flags: { ...sharedFlags }
|
|
39
|
+
flags: { ...sharedFlags },
|
|
40
|
+
help: {
|
|
41
|
+
description: "Store a text embedding with a key",
|
|
42
|
+
examples: ["raptor store doc1 \"Machine learning is awesome\"", "raptor store -s ./my-db.raptor mykey \"Some text to embed\""]
|
|
43
|
+
}
|
|
41
44
|
}, async (argv) => {
|
|
42
45
|
const engine = new require_engine.EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
try {
|
|
47
|
+
const [key, text] = argv._;
|
|
48
|
+
await engine.store(key, text);
|
|
49
|
+
console.log(`Stored embedding for key: ${key}`);
|
|
50
|
+
} finally {
|
|
51
|
+
await engine.dispose();
|
|
52
|
+
}
|
|
46
53
|
});
|
|
47
54
|
|
|
48
55
|
//#endregion
|
|
49
56
|
//#region src/commands/get.ts
|
|
50
57
|
const get = (0, cleye.command)({
|
|
51
58
|
name: "get",
|
|
52
|
-
description: "Retrieve an embedding entry by key",
|
|
53
59
|
parameters: ["<key>"],
|
|
54
|
-
flags: { ...sharedFlags }
|
|
60
|
+
flags: { ...sharedFlags },
|
|
61
|
+
help: {
|
|
62
|
+
description: "Retrieve an embedding entry by key",
|
|
63
|
+
examples: ["raptor get doc1", "raptor get -s ./my-db.raptor mykey"]
|
|
64
|
+
}
|
|
55
65
|
}, async (argv) => {
|
|
56
66
|
const engine = new require_engine.EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
try {
|
|
68
|
+
const [key] = argv._;
|
|
69
|
+
const entry = await engine.get(key);
|
|
70
|
+
if (entry) console.log(JSON.stringify({
|
|
71
|
+
key: entry.key,
|
|
72
|
+
embeddingDimensions: entry.embedding.length,
|
|
73
|
+
timestamp: new Date(entry.timestamp).toISOString()
|
|
74
|
+
}, null, 2));
|
|
75
|
+
else {
|
|
76
|
+
console.log(`Key "${key}" not found`);
|
|
77
|
+
process.exit(1);
|
|
78
|
+
}
|
|
79
|
+
} finally {
|
|
80
|
+
await engine.dispose();
|
|
68
81
|
}
|
|
69
82
|
});
|
|
70
83
|
|
|
@@ -72,20 +85,31 @@ const get = (0, cleye.command)({
|
|
|
72
85
|
//#region src/commands/search.ts
|
|
73
86
|
const search = (0, cleye.command)({
|
|
74
87
|
name: "search",
|
|
75
|
-
description: "Search for similar embeddings using a query",
|
|
76
88
|
parameters: ["<query>"],
|
|
77
89
|
flags: {
|
|
78
90
|
...sharedFlags,
|
|
79
91
|
...searchFlags
|
|
92
|
+
},
|
|
93
|
+
help: {
|
|
94
|
+
description: "Search for similar embeddings using a query",
|
|
95
|
+
examples: [
|
|
96
|
+
"raptor search \"artificial intelligence\"",
|
|
97
|
+
"raptor search -l 5 -m 0.7 \"machine learning\"",
|
|
98
|
+
"raptor search -s ./my-db.raptor \"find similar docs\""
|
|
99
|
+
]
|
|
80
100
|
}
|
|
81
101
|
}, async (argv) => {
|
|
82
102
|
const engine = new require_engine.EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
103
|
+
try {
|
|
104
|
+
const [query] = argv._;
|
|
105
|
+
const results = await engine.search(query, argv.flags.limit, argv.flags.minSimilarity);
|
|
106
|
+
if (results.length === 0) console.log("No results found");
|
|
107
|
+
else {
|
|
108
|
+
console.log(`Found ${results.length} result(s):\n`);
|
|
109
|
+
for (const result of results) console.log(`${result.key}: ${result.similarity.toFixed(6)}`);
|
|
110
|
+
}
|
|
111
|
+
} finally {
|
|
112
|
+
await engine.dispose();
|
|
89
113
|
}
|
|
90
114
|
});
|
|
91
115
|
|
|
@@ -93,9 +117,12 @@ const search = (0, cleye.command)({
|
|
|
93
117
|
//#region src/commands/delete.ts
|
|
94
118
|
const deleteCmd = (0, cleye.command)({
|
|
95
119
|
name: "delete",
|
|
96
|
-
description: "Delete an embedding entry by key",
|
|
97
120
|
parameters: ["<key>"],
|
|
98
|
-
flags: { ...sharedFlags }
|
|
121
|
+
flags: { ...sharedFlags },
|
|
122
|
+
help: {
|
|
123
|
+
description: "Delete an embedding entry by key",
|
|
124
|
+
examples: ["raptor delete doc1", "raptor delete -s ./my-db.raptor mykey"]
|
|
125
|
+
}
|
|
99
126
|
}, async (argv) => {
|
|
100
127
|
const engine = new require_engine.EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
101
128
|
try {
|
|
@@ -110,6 +137,43 @@ const deleteCmd = (0, cleye.command)({
|
|
|
110
137
|
}
|
|
111
138
|
});
|
|
112
139
|
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/commands/wal.ts
|
|
142
|
+
const opTypeNames = {
|
|
143
|
+
[require_engine.opType.insert]: "INSERT",
|
|
144
|
+
[require_engine.opType.update]: "UPDATE",
|
|
145
|
+
[require_engine.opType.delete]: "DELETE"
|
|
146
|
+
};
|
|
147
|
+
function formatKeyHash(hash) {
|
|
148
|
+
return Array.from(hash.slice(0, 8)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
149
|
+
}
|
|
150
|
+
const walCmd = (0, cleye.command)({
|
|
151
|
+
name: "wal",
|
|
152
|
+
flags: { ...sharedFlags },
|
|
153
|
+
help: {
|
|
154
|
+
description: "Display WAL entries in human-readable format",
|
|
155
|
+
examples: ["raptor wal", "raptor wal -s ./my-db.raptor"]
|
|
156
|
+
}
|
|
157
|
+
}, async (argv) => {
|
|
158
|
+
const wal = new require_engine.Wal(argv.flags.storePath.replace(/\.raptor$/, "") + require_engine.fileExtensions.wal);
|
|
159
|
+
try {
|
|
160
|
+
let count = 0;
|
|
161
|
+
for await (const entry of wal.recover()) {
|
|
162
|
+
const opName = opTypeNames[entry.opType] ?? `UNKNOWN(${entry.opType})`;
|
|
163
|
+
const keyHashHex = formatKeyHash(entry.keyHash);
|
|
164
|
+
console.log(`[${entry.sequenceNumber}] ${opName}`);
|
|
165
|
+
console.log(` offset: ${entry.offset}, length: ${entry.length}`);
|
|
166
|
+
console.log(` keyHash: ${keyHashHex}`);
|
|
167
|
+
console.log();
|
|
168
|
+
count++;
|
|
169
|
+
}
|
|
170
|
+
if (count === 0) console.log("WAL is empty");
|
|
171
|
+
else console.log(`Total: ${count} entries`);
|
|
172
|
+
} finally {
|
|
173
|
+
await wal.close();
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
|
|
113
177
|
//#endregion
|
|
114
178
|
//#region src/cli.ts
|
|
115
179
|
const __dirname$1 = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
|
|
@@ -122,7 +186,8 @@ function main() {
|
|
|
122
186
|
store,
|
|
123
187
|
get,
|
|
124
188
|
search,
|
|
125
|
-
deleteCmd
|
|
189
|
+
deleteCmd,
|
|
190
|
+
walCmd
|
|
126
191
|
]
|
|
127
192
|
}, () => {});
|
|
128
193
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as EmbeddingEngine } from "./engine-
|
|
2
|
+
import { i as opType, n as Wal, r as fileExtensions, t as EmbeddingEngine } from "./engine-Zax2PJSW.mjs";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import { cli, command } from "cleye";
|
|
@@ -31,36 +31,49 @@ const searchFlags = {
|
|
|
31
31
|
//#region src/commands/store.ts
|
|
32
32
|
const store = command({
|
|
33
33
|
name: "store",
|
|
34
|
-
description: "Store a text embedding with a key",
|
|
35
34
|
parameters: ["<key>", "<text>"],
|
|
36
|
-
flags: { ...sharedFlags }
|
|
35
|
+
flags: { ...sharedFlags },
|
|
36
|
+
help: {
|
|
37
|
+
description: "Store a text embedding with a key",
|
|
38
|
+
examples: ["raptor store doc1 \"Machine learning is awesome\"", "raptor store -s ./my-db.raptor mykey \"Some text to embed\""]
|
|
39
|
+
}
|
|
37
40
|
}, async (argv) => {
|
|
38
41
|
const engine = new EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
try {
|
|
43
|
+
const [key, text] = argv._;
|
|
44
|
+
await engine.store(key, text);
|
|
45
|
+
console.log(`Stored embedding for key: ${key}`);
|
|
46
|
+
} finally {
|
|
47
|
+
await engine.dispose();
|
|
48
|
+
}
|
|
42
49
|
});
|
|
43
50
|
|
|
44
51
|
//#endregion
|
|
45
52
|
//#region src/commands/get.ts
|
|
46
53
|
const get = command({
|
|
47
54
|
name: "get",
|
|
48
|
-
description: "Retrieve an embedding entry by key",
|
|
49
55
|
parameters: ["<key>"],
|
|
50
|
-
flags: { ...sharedFlags }
|
|
56
|
+
flags: { ...sharedFlags },
|
|
57
|
+
help: {
|
|
58
|
+
description: "Retrieve an embedding entry by key",
|
|
59
|
+
examples: ["raptor get doc1", "raptor get -s ./my-db.raptor mykey"]
|
|
60
|
+
}
|
|
51
61
|
}, async (argv) => {
|
|
52
62
|
const engine = new EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
try {
|
|
64
|
+
const [key] = argv._;
|
|
65
|
+
const entry = await engine.get(key);
|
|
66
|
+
if (entry) console.log(JSON.stringify({
|
|
67
|
+
key: entry.key,
|
|
68
|
+
embeddingDimensions: entry.embedding.length,
|
|
69
|
+
timestamp: new Date(entry.timestamp).toISOString()
|
|
70
|
+
}, null, 2));
|
|
71
|
+
else {
|
|
72
|
+
console.log(`Key "${key}" not found`);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
} finally {
|
|
76
|
+
await engine.dispose();
|
|
64
77
|
}
|
|
65
78
|
});
|
|
66
79
|
|
|
@@ -68,20 +81,31 @@ const get = command({
|
|
|
68
81
|
//#region src/commands/search.ts
|
|
69
82
|
const search = command({
|
|
70
83
|
name: "search",
|
|
71
|
-
description: "Search for similar embeddings using a query",
|
|
72
84
|
parameters: ["<query>"],
|
|
73
85
|
flags: {
|
|
74
86
|
...sharedFlags,
|
|
75
87
|
...searchFlags
|
|
88
|
+
},
|
|
89
|
+
help: {
|
|
90
|
+
description: "Search for similar embeddings using a query",
|
|
91
|
+
examples: [
|
|
92
|
+
"raptor search \"artificial intelligence\"",
|
|
93
|
+
"raptor search -l 5 -m 0.7 \"machine learning\"",
|
|
94
|
+
"raptor search -s ./my-db.raptor \"find similar docs\""
|
|
95
|
+
]
|
|
76
96
|
}
|
|
77
97
|
}, async (argv) => {
|
|
78
98
|
const engine = new EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
99
|
+
try {
|
|
100
|
+
const [query] = argv._;
|
|
101
|
+
const results = await engine.search(query, argv.flags.limit, argv.flags.minSimilarity);
|
|
102
|
+
if (results.length === 0) console.log("No results found");
|
|
103
|
+
else {
|
|
104
|
+
console.log(`Found ${results.length} result(s):\n`);
|
|
105
|
+
for (const result of results) console.log(`${result.key}: ${result.similarity.toFixed(6)}`);
|
|
106
|
+
}
|
|
107
|
+
} finally {
|
|
108
|
+
await engine.dispose();
|
|
85
109
|
}
|
|
86
110
|
});
|
|
87
111
|
|
|
@@ -89,9 +113,12 @@ const search = command({
|
|
|
89
113
|
//#region src/commands/delete.ts
|
|
90
114
|
const deleteCmd = command({
|
|
91
115
|
name: "delete",
|
|
92
|
-
description: "Delete an embedding entry by key",
|
|
93
116
|
parameters: ["<key>"],
|
|
94
|
-
flags: { ...sharedFlags }
|
|
117
|
+
flags: { ...sharedFlags },
|
|
118
|
+
help: {
|
|
119
|
+
description: "Delete an embedding entry by key",
|
|
120
|
+
examples: ["raptor delete doc1", "raptor delete -s ./my-db.raptor mykey"]
|
|
121
|
+
}
|
|
95
122
|
}, async (argv) => {
|
|
96
123
|
const engine = new EmbeddingEngine({ storePath: argv.flags.storePath });
|
|
97
124
|
try {
|
|
@@ -106,6 +133,43 @@ const deleteCmd = command({
|
|
|
106
133
|
}
|
|
107
134
|
});
|
|
108
135
|
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/commands/wal.ts
|
|
138
|
+
const opTypeNames = {
|
|
139
|
+
[opType.insert]: "INSERT",
|
|
140
|
+
[opType.update]: "UPDATE",
|
|
141
|
+
[opType.delete]: "DELETE"
|
|
142
|
+
};
|
|
143
|
+
function formatKeyHash(hash) {
|
|
144
|
+
return Array.from(hash.slice(0, 8)).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
145
|
+
}
|
|
146
|
+
const walCmd = command({
|
|
147
|
+
name: "wal",
|
|
148
|
+
flags: { ...sharedFlags },
|
|
149
|
+
help: {
|
|
150
|
+
description: "Display WAL entries in human-readable format",
|
|
151
|
+
examples: ["raptor wal", "raptor wal -s ./my-db.raptor"]
|
|
152
|
+
}
|
|
153
|
+
}, async (argv) => {
|
|
154
|
+
const wal = new Wal(argv.flags.storePath.replace(/\.raptor$/, "") + fileExtensions.wal);
|
|
155
|
+
try {
|
|
156
|
+
let count = 0;
|
|
157
|
+
for await (const entry of wal.recover()) {
|
|
158
|
+
const opName = opTypeNames[entry.opType] ?? `UNKNOWN(${entry.opType})`;
|
|
159
|
+
const keyHashHex = formatKeyHash(entry.keyHash);
|
|
160
|
+
console.log(`[${entry.sequenceNumber}] ${opName}`);
|
|
161
|
+
console.log(` offset: ${entry.offset}, length: ${entry.length}`);
|
|
162
|
+
console.log(` keyHash: ${keyHashHex}`);
|
|
163
|
+
console.log();
|
|
164
|
+
count++;
|
|
165
|
+
}
|
|
166
|
+
if (count === 0) console.log("WAL is empty");
|
|
167
|
+
else console.log(`Total: ${count} entries`);
|
|
168
|
+
} finally {
|
|
169
|
+
await wal.close();
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
109
173
|
//#endregion
|
|
110
174
|
//#region src/cli.ts
|
|
111
175
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -118,7 +182,8 @@ function main() {
|
|
|
118
182
|
store,
|
|
119
183
|
get,
|
|
120
184
|
search,
|
|
121
|
-
deleteCmd
|
|
185
|
+
deleteCmd,
|
|
186
|
+
walCmd
|
|
122
187
|
]
|
|
123
188
|
}, () => {});
|
|
124
189
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const deleteCmd: import("cleye").Command<{
|
|
2
2
|
name: "delete";
|
|
3
|
-
description: string;
|
|
4
3
|
parameters: "<key>"[];
|
|
5
4
|
flags: {
|
|
6
5
|
storePath: {
|
|
@@ -10,6 +9,10 @@ export declare const deleteCmd: import("cleye").Command<{
|
|
|
10
9
|
readonly alias: "s";
|
|
11
10
|
};
|
|
12
11
|
};
|
|
12
|
+
help: {
|
|
13
|
+
description: string;
|
|
14
|
+
examples: string[];
|
|
15
|
+
};
|
|
13
16
|
}, {
|
|
14
17
|
command: "delete";
|
|
15
18
|
} & import("type-flag").TypeFlag<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/commands/delete.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/commands/delete.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAgCs+L,CAAC;;;;;;;;;;;;EAD5/L,CAAA"}
|
package/dist/commands/get.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const get: import("cleye").Command<{
|
|
2
2
|
name: "get";
|
|
3
|
-
description: string;
|
|
4
3
|
parameters: "<key>"[];
|
|
5
4
|
flags: {
|
|
6
5
|
storePath: {
|
|
@@ -10,6 +9,10 @@ export declare const get: import("cleye").Command<{
|
|
|
10
9
|
readonly alias: "s";
|
|
11
10
|
};
|
|
12
11
|
};
|
|
12
|
+
help: {
|
|
13
|
+
description: string;
|
|
14
|
+
examples: string[];
|
|
15
|
+
};
|
|
13
16
|
}, {
|
|
14
17
|
command: "get";
|
|
15
18
|
} & import("type-flag").TypeFlag<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/commands/get.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA0CgxL,CAAC;;;;;;;;;;;;EADhyL,CAAA"}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const search: import("cleye").Command<{
|
|
2
2
|
name: "search";
|
|
3
|
-
description: string;
|
|
4
3
|
parameters: "<query>"[];
|
|
5
4
|
flags: {
|
|
6
5
|
limit: {
|
|
@@ -22,6 +21,10 @@ export declare const search: import("cleye").Command<{
|
|
|
22
21
|
readonly alias: "s";
|
|
23
22
|
};
|
|
24
23
|
};
|
|
24
|
+
help: {
|
|
25
|
+
description: string;
|
|
26
|
+
examples: string[];
|
|
27
|
+
};
|
|
25
28
|
}, {
|
|
26
29
|
command: "search";
|
|
27
30
|
} & import("type-flag").TypeFlag<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA2CgoL,CAAC;;;;;;;;;;;;EADnpL,CAAA"}
|
package/dist/commands/store.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const store: import("cleye").Command<{
|
|
2
2
|
name: "store";
|
|
3
|
-
description: string;
|
|
4
3
|
parameters: ("<key>" | "<text>")[];
|
|
5
4
|
flags: {
|
|
6
5
|
storePath: {
|
|
@@ -10,6 +9,10 @@ export declare const store: import("cleye").Command<{
|
|
|
10
9
|
readonly alias: "s";
|
|
11
10
|
};
|
|
12
11
|
};
|
|
12
|
+
help: {
|
|
13
|
+
description: string;
|
|
14
|
+
examples: string[];
|
|
15
|
+
};
|
|
13
16
|
}, {
|
|
14
17
|
command: "store";
|
|
15
18
|
} & import("type-flag").TypeFlag<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/commands/store.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/commands/store.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA6BygM,CAAC;;;;;;;;;;;;EAD3hM,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export declare const walCmd: import("cleye").Command<{
|
|
2
|
+
name: "wal";
|
|
3
|
+
flags: {
|
|
4
|
+
storePath: {
|
|
5
|
+
readonly type: StringConstructor;
|
|
6
|
+
readonly description: "Path to the embeddings store file";
|
|
7
|
+
readonly default: "./database.raptor";
|
|
8
|
+
readonly alias: "s";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
help: {
|
|
12
|
+
description: string;
|
|
13
|
+
examples: string[];
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
command: "wal";
|
|
17
|
+
} & import("type-flag").TypeFlag<{
|
|
18
|
+
storePath: {
|
|
19
|
+
readonly type: StringConstructor;
|
|
20
|
+
readonly description: "Path to the embeddings store file";
|
|
21
|
+
readonly default: "./database.raptor";
|
|
22
|
+
readonly alias: "s";
|
|
23
|
+
};
|
|
24
|
+
} & {
|
|
25
|
+
help: BooleanConstructor;
|
|
26
|
+
}> & {
|
|
27
|
+
_: {};
|
|
28
|
+
showHelp: (options?: {
|
|
29
|
+
version?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
usage?: false | string | string[];
|
|
32
|
+
examples?: string | string[];
|
|
33
|
+
render?: (nodes: {
|
|
34
|
+
id?: string;
|
|
35
|
+
type: keyof import("cleye").Renderers;
|
|
36
|
+
data: any;
|
|
37
|
+
}[], renderers: import("cleye").Renderers) => string;
|
|
38
|
+
}) => void;
|
|
39
|
+
showVersion: () => void;
|
|
40
|
+
}>;
|
|
41
|
+
//# sourceMappingURL=wal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wal.d.ts","sourceRoot":"","sources":["../../src/commands/wal.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAyCiuK,CAAC;;;;;;;;;;;;EADpvK,CAAA"}
|