@claude-flow/cli 3.0.0-alpha.121 β 3.0.0-alpha.122
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 +7 -3
- package/dist/src/commands/ruvector/import.d.ts +18 -0
- package/dist/src/commands/ruvector/import.d.ts.map +1 -0
- package/dist/src/commands/ruvector/import.js +349 -0
- package/dist/src/commands/ruvector/import.js.map +1 -0
- package/dist/src/commands/ruvector/index.d.ts +2 -0
- package/dist/src/commands/ruvector/index.d.ts.map +1 -1
- package/dist/src/commands/ruvector/index.js +10 -0
- package/dist/src/commands/ruvector/index.js.map +1 -1
- package/dist/src/commands/ruvector/setup.d.ts +18 -0
- package/dist/src/commands/ruvector/setup.d.ts.map +1 -0
- package/dist/src/commands/ruvector/setup.js +765 -0
- package/dist/src/commands/ruvector/setup.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -253,6 +253,7 @@ Smart routing skips expensive LLM calls when possible. Simple edits use WASM (fr
|
|
|
253
253
|
| **Hive Mind** | β Not available | π Queen-led swarms with collective intelligence, 3 queen types, 8 worker types |
|
|
254
254
|
| **Consensus** | β No multi-agent decisions | Byzantine fault-tolerant voting (f < n/3), weighted, majority |
|
|
255
255
|
| **Memory** | Session-only, no persistence | HNSW vector memory with 150x-12,500x faster retrieval |
|
|
256
|
+
| **Vector Database** | β No native support | π RuVector PostgreSQL with 77+ SQL functions, ~61Β΅s search, 16,400 QPS |
|
|
256
257
|
| **Collective Memory** | β No shared knowledge | Shared knowledge base with LRU cache, SQLite persistence, 8 memory types |
|
|
257
258
|
| **Learning** | Static behavior, no adaptation | SONA self-learning with <0.05ms adaptation, improves over time |
|
|
258
259
|
| **Task Routing** | You decide which agent to use | Intelligent routing based on learned patterns (89% accuracy) |
|
|
@@ -340,10 +341,12 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
340
341
|
| Feature | Claude Flow v3 | CrewAI | LangGraph | AutoGen | Manus |
|
|
341
342
|
|---------|----------------|--------|-----------|---------|-------|
|
|
342
343
|
| **Vector Memory** | β
HNSW (150x faster) | β | Via plugins | β | β |
|
|
343
|
-
| **
|
|
344
|
+
| **PostgreSQL Vector DB** | β
RuVector (77+ SQL functions, ~61Β΅s) | β | pgvector only | β | β |
|
|
345
|
+
| **Hyperbolic Embeddings** | β
PoincarΓ© ball (native + SQL) | β | β | β | β |
|
|
344
346
|
| **Quantization** | β
Int8 (3.92x savings) | β | β | β | β |
|
|
345
|
-
| **Persistent Memory** | β
SQLite + AgentDB | β | β | β | Limited |
|
|
347
|
+
| **Persistent Memory** | β
SQLite + AgentDB + PostgreSQL | β | β | β | Limited |
|
|
346
348
|
| **Cross-Session Context** | β
Full restoration | β | β | β | β |
|
|
349
|
+
| **GNN/Attention in SQL** | β
39 attention mechanisms | β | β | β | β |
|
|
347
350
|
|
|
348
351
|
#### π Swarm & Coordination
|
|
349
352
|
|
|
@@ -379,7 +382,7 @@ Claude-Flow v3 introduces **self-learning neural capabilities** that no other ag
|
|
|
379
382
|
<details>
|
|
380
383
|
<summary>π <strong>Key Differentiators</strong> β Self-learning, memory optimization, fault tolerance</summary>
|
|
381
384
|
|
|
382
|
-
What makes Claude-Flow different from other agent frameworks? These
|
|
385
|
+
What makes Claude-Flow different from other agent frameworks? These 10 capabilities work together to create a system that learns from experience, runs efficiently on any hardware, and keeps working even when things go wrong.
|
|
383
386
|
|
|
384
387
|
| | Feature | What It Does | Technical Details |
|
|
385
388
|
|---|---------|--------------|-------------------|
|
|
@@ -392,6 +395,7 @@ What makes Claude-Flow different from other agent frameworks? These 9 capabiliti
|
|
|
392
395
|
| ποΈ | **Int8 Quantization** | Converts 32-bit weights to 8-bit with minimal accuracy loss | 3.92x memory reduction with calibrated 8-bit integers |
|
|
393
396
|
| π€ | **Claims System** | Manages task ownership between humans and agents with handoff support | Work ownership with claim/release/handoff protocols |
|
|
394
397
|
| π‘οΈ | **Byzantine Consensus** | Coordinates agents even when some fail or return bad results | Fault-tolerant, handles up to 1/3 failing agents |
|
|
398
|
+
| π | **RuVector PostgreSQL** | Enterprise-grade vector database with 77+ SQL functions for AI operations | ~61Β΅s search, 16,400 QPS, GNN/attention in SQL |
|
|
395
399
|
|
|
396
400
|
</details>
|
|
397
401
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V3 CLI RuVector Import Command
|
|
3
|
+
* Import data from sql.js/JSON memory to RuVector PostgreSQL
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* npx claude-flow ruvector import --input memory-export.json
|
|
7
|
+
* npx claude-flow ruvector import --from-memory
|
|
8
|
+
* npx claude-flow ruvector import --input data.json --batch-size 100
|
|
9
|
+
*
|
|
10
|
+
* Created with care by ruv.io
|
|
11
|
+
*/
|
|
12
|
+
import type { Command } from '../../types.js';
|
|
13
|
+
/**
|
|
14
|
+
* RuVector Import command - import from sql.js/JSON to PostgreSQL
|
|
15
|
+
*/
|
|
16
|
+
export declare const importCommand: Command;
|
|
17
|
+
export default importCommand;
|
|
18
|
+
//# sourceMappingURL=import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../../src/commands/ruvector/import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,gBAAgB,CAAC;AAqF7E;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,OAyS3B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V3 CLI RuVector Import Command
|
|
3
|
+
* Import data from sql.js/JSON memory to RuVector PostgreSQL
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* npx claude-flow ruvector import --input memory-export.json
|
|
7
|
+
* npx claude-flow ruvector import --from-memory
|
|
8
|
+
* npx claude-flow ruvector import --input data.json --batch-size 100
|
|
9
|
+
*
|
|
10
|
+
* Created with care by ruv.io
|
|
11
|
+
*/
|
|
12
|
+
import { output } from '../../output.js';
|
|
13
|
+
import * as fs from 'fs';
|
|
14
|
+
import * as path from 'path';
|
|
15
|
+
/**
|
|
16
|
+
* Format a ruvector embedding array for PostgreSQL
|
|
17
|
+
*/
|
|
18
|
+
function formatEmbedding(embedding, dimensions = 384) {
|
|
19
|
+
// Ensure correct dimensions by padding or truncating
|
|
20
|
+
const padded = [...embedding];
|
|
21
|
+
while (padded.length < dimensions) {
|
|
22
|
+
padded.push(0);
|
|
23
|
+
}
|
|
24
|
+
if (padded.length > dimensions) {
|
|
25
|
+
padded.length = dimensions;
|
|
26
|
+
}
|
|
27
|
+
return `'[${padded.join(',')}]'::ruvector(${dimensions})`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Escape string for PostgreSQL
|
|
31
|
+
*/
|
|
32
|
+
function escapeString(str) {
|
|
33
|
+
return str.replace(/'/g, "''").replace(/\\/g, '\\\\');
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generate SQL INSERT statement for a memory entry
|
|
37
|
+
*/
|
|
38
|
+
function generateInsertSQL(entry) {
|
|
39
|
+
const key = escapeString(entry.key);
|
|
40
|
+
const value = typeof entry.value === 'string'
|
|
41
|
+
? escapeString(entry.value)
|
|
42
|
+
: escapeString(JSON.stringify(entry.value));
|
|
43
|
+
const namespace = entry.namespace || 'default';
|
|
44
|
+
const metadata = entry.metadata ? escapeString(JSON.stringify(entry.metadata)) : '{}';
|
|
45
|
+
let embeddingClause = 'NULL';
|
|
46
|
+
if (entry.embedding && Array.isArray(entry.embedding) && entry.embedding.length > 0) {
|
|
47
|
+
embeddingClause = formatEmbedding(entry.embedding);
|
|
48
|
+
}
|
|
49
|
+
return `INSERT INTO claude_flow.memory_entries (key, value, embedding, namespace, metadata, created_at, updated_at)
|
|
50
|
+
VALUES (
|
|
51
|
+
'${key}',
|
|
52
|
+
'${value}',
|
|
53
|
+
${embeddingClause},
|
|
54
|
+
'${namespace}',
|
|
55
|
+
'${metadata}'::jsonb,
|
|
56
|
+
${entry.created_at ? `'${entry.created_at}'::timestamptz` : 'NOW()'},
|
|
57
|
+
${entry.updated_at ? `'${entry.updated_at}'::timestamptz` : 'NOW()'}
|
|
58
|
+
)
|
|
59
|
+
ON CONFLICT (key, namespace) DO UPDATE SET
|
|
60
|
+
value = EXCLUDED.value,
|
|
61
|
+
embedding = COALESCE(EXCLUDED.embedding, claude_flow.memory_entries.embedding),
|
|
62
|
+
metadata = EXCLUDED.metadata,
|
|
63
|
+
updated_at = NOW();`;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* RuVector Import command - import from sql.js/JSON to PostgreSQL
|
|
67
|
+
*/
|
|
68
|
+
export const importCommand = {
|
|
69
|
+
name: 'import',
|
|
70
|
+
description: 'Import data from sql.js/JSON memory to RuVector PostgreSQL',
|
|
71
|
+
aliases: ['load', 'migrate-data'],
|
|
72
|
+
options: [
|
|
73
|
+
{
|
|
74
|
+
name: 'input',
|
|
75
|
+
short: 'i',
|
|
76
|
+
description: 'Input JSON file path',
|
|
77
|
+
type: 'string',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'from-memory',
|
|
81
|
+
description: 'Export from current Claude-Flow memory and import',
|
|
82
|
+
type: 'boolean',
|
|
83
|
+
default: false,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'output',
|
|
87
|
+
short: 'o',
|
|
88
|
+
description: 'Output SQL file instead of executing (dry-run)',
|
|
89
|
+
type: 'string',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'batch-size',
|
|
93
|
+
short: 'b',
|
|
94
|
+
description: 'Batch size for imports',
|
|
95
|
+
type: 'number',
|
|
96
|
+
default: 100,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'host',
|
|
100
|
+
short: 'h',
|
|
101
|
+
description: 'PostgreSQL host',
|
|
102
|
+
type: 'string',
|
|
103
|
+
default: 'localhost',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: 'port',
|
|
107
|
+
short: 'p',
|
|
108
|
+
description: 'PostgreSQL port',
|
|
109
|
+
type: 'number',
|
|
110
|
+
default: 5432,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'database',
|
|
114
|
+
short: 'd',
|
|
115
|
+
description: 'Database name',
|
|
116
|
+
type: 'string',
|
|
117
|
+
default: 'claude_flow',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'user',
|
|
121
|
+
short: 'u',
|
|
122
|
+
description: 'Database user',
|
|
123
|
+
type: 'string',
|
|
124
|
+
default: 'claude',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'password',
|
|
128
|
+
description: 'Database password (or use PGPASSWORD env var)',
|
|
129
|
+
type: 'string',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'container',
|
|
133
|
+
short: 'c',
|
|
134
|
+
description: 'Docker container name to exec into',
|
|
135
|
+
type: 'string',
|
|
136
|
+
default: 'ruvector-postgres',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'verbose',
|
|
140
|
+
short: 'v',
|
|
141
|
+
description: 'Verbose output',
|
|
142
|
+
type: 'boolean',
|
|
143
|
+
default: false,
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
examples: [
|
|
147
|
+
{ command: 'claude-flow ruvector import --input memory-export.json', description: 'Import from JSON file' },
|
|
148
|
+
{ command: 'claude-flow ruvector import --input data.json --output import.sql', description: 'Generate SQL file (dry-run)' },
|
|
149
|
+
{ command: 'claude-flow ruvector import --from-memory', description: 'Export current memory and import' },
|
|
150
|
+
{ command: 'claude-flow ruvector import --input data.json --container my-postgres', description: 'Import using custom container' },
|
|
151
|
+
],
|
|
152
|
+
action: async (ctx) => {
|
|
153
|
+
const inputFile = ctx.flags.input;
|
|
154
|
+
const fromMemory = ctx.flags['from-memory'];
|
|
155
|
+
const outputFile = ctx.flags.output;
|
|
156
|
+
const batchSize = ctx.flags['batch-size'] || 100;
|
|
157
|
+
const containerName = ctx.flags.container || 'ruvector-postgres';
|
|
158
|
+
const verbose = ctx.flags.verbose;
|
|
159
|
+
output.writeln();
|
|
160
|
+
output.writeln(output.bold('RuVector PostgreSQL Import'));
|
|
161
|
+
output.writeln(output.dim('='.repeat(50)));
|
|
162
|
+
output.writeln();
|
|
163
|
+
// Validate input
|
|
164
|
+
if (!inputFile && !fromMemory) {
|
|
165
|
+
output.printError('Either --input <file> or --from-memory is required');
|
|
166
|
+
output.writeln();
|
|
167
|
+
output.printInfo('Examples:');
|
|
168
|
+
output.writeln(' claude-flow ruvector import --input memory-export.json');
|
|
169
|
+
output.writeln(' claude-flow ruvector import --from-memory');
|
|
170
|
+
return { success: false, message: 'Missing input source' };
|
|
171
|
+
}
|
|
172
|
+
let entries = [];
|
|
173
|
+
// Load entries from JSON file
|
|
174
|
+
if (inputFile) {
|
|
175
|
+
if (!fs.existsSync(inputFile)) {
|
|
176
|
+
output.printError(`Input file not found: ${inputFile}`);
|
|
177
|
+
return { success: false, message: 'File not found' };
|
|
178
|
+
}
|
|
179
|
+
try {
|
|
180
|
+
output.printInfo(`Reading: ${inputFile}`);
|
|
181
|
+
const content = fs.readFileSync(inputFile, 'utf-8');
|
|
182
|
+
const data = JSON.parse(content);
|
|
183
|
+
// Handle different JSON formats
|
|
184
|
+
if (Array.isArray(data)) {
|
|
185
|
+
entries = data;
|
|
186
|
+
}
|
|
187
|
+
else if (data.entries && Array.isArray(data.entries)) {
|
|
188
|
+
entries = data.entries;
|
|
189
|
+
}
|
|
190
|
+
else if (data.results && Array.isArray(data.results)) {
|
|
191
|
+
entries = data.results;
|
|
192
|
+
}
|
|
193
|
+
else if (typeof data === 'object') {
|
|
194
|
+
// Convert object format { key: value } to entries
|
|
195
|
+
entries = Object.entries(data).map(([key, value]) => ({
|
|
196
|
+
key,
|
|
197
|
+
value: typeof value === 'object' ? JSON.stringify(value) : String(value),
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
output.printSuccess(`Loaded ${entries.length} entries from file`);
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
204
|
+
output.printError(`Failed to parse JSON: ${errorMessage}`);
|
|
205
|
+
return { success: false, message: errorMessage };
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
// Export from current memory
|
|
209
|
+
if (fromMemory) {
|
|
210
|
+
output.printInfo('Exporting from current Claude-Flow memory...');
|
|
211
|
+
output.printWarning('Note: Run "npx claude-flow memory list --format json > memory-export.json" first');
|
|
212
|
+
output.printInfo('Then use: npx claude-flow ruvector import --input memory-export.json');
|
|
213
|
+
return { success: false, message: 'Use explicit JSON export first' };
|
|
214
|
+
}
|
|
215
|
+
if (entries.length === 0) {
|
|
216
|
+
output.printWarning('No entries to import');
|
|
217
|
+
return { success: true };
|
|
218
|
+
}
|
|
219
|
+
// Calculate statistics
|
|
220
|
+
const stats = {
|
|
221
|
+
total: entries.length,
|
|
222
|
+
imported: 0,
|
|
223
|
+
skipped: 0,
|
|
224
|
+
errors: 0,
|
|
225
|
+
withEmbeddings: 0,
|
|
226
|
+
byNamespace: {},
|
|
227
|
+
};
|
|
228
|
+
// Generate SQL statements
|
|
229
|
+
const sqlStatements = [];
|
|
230
|
+
sqlStatements.push('-- RuVector PostgreSQL Import');
|
|
231
|
+
sqlStatements.push(`-- Generated: ${new Date().toISOString()}`);
|
|
232
|
+
sqlStatements.push(`-- Total entries: ${entries.length}`);
|
|
233
|
+
sqlStatements.push('');
|
|
234
|
+
sqlStatements.push('BEGIN;');
|
|
235
|
+
sqlStatements.push('');
|
|
236
|
+
for (const entry of entries) {
|
|
237
|
+
try {
|
|
238
|
+
// Track statistics
|
|
239
|
+
const ns = entry.namespace || 'default';
|
|
240
|
+
stats.byNamespace[ns] = (stats.byNamespace[ns] || 0) + 1;
|
|
241
|
+
if (entry.embedding && entry.embedding.length > 0) {
|
|
242
|
+
stats.withEmbeddings++;
|
|
243
|
+
}
|
|
244
|
+
const sql = generateInsertSQL(entry);
|
|
245
|
+
sqlStatements.push(sql);
|
|
246
|
+
sqlStatements.push('');
|
|
247
|
+
stats.imported++;
|
|
248
|
+
if (verbose) {
|
|
249
|
+
output.writeln(output.dim(` Processed: ${entry.key} (${ns})`));
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
stats.errors++;
|
|
254
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
255
|
+
output.printWarning(`Skipped entry "${entry.key}": ${errorMessage}`);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
sqlStatements.push('COMMIT;');
|
|
259
|
+
sqlStatements.push('');
|
|
260
|
+
sqlStatements.push(`-- Import complete: ${stats.imported} entries`);
|
|
261
|
+
const fullSQL = sqlStatements.join('\n');
|
|
262
|
+
// Output SQL file (dry-run)
|
|
263
|
+
if (outputFile) {
|
|
264
|
+
try {
|
|
265
|
+
output.printInfo(`Writing SQL to: ${outputFile}`);
|
|
266
|
+
fs.writeFileSync(outputFile, fullSQL);
|
|
267
|
+
output.printSuccess(`SQL file created: ${outputFile}`);
|
|
268
|
+
output.writeln();
|
|
269
|
+
output.printInfo('To execute the import:');
|
|
270
|
+
output.writeln(` docker exec -i ${containerName} psql -U claude -d claude_flow < ${outputFile}`);
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
274
|
+
output.printError(`Failed to write SQL file: ${errorMessage}`);
|
|
275
|
+
return { success: false, message: errorMessage };
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
// Execute directly via docker exec
|
|
280
|
+
output.printInfo(`Importing to PostgreSQL via container: ${containerName}`);
|
|
281
|
+
output.writeln();
|
|
282
|
+
// Write to temp file for execution
|
|
283
|
+
const tempFile = path.join(process.cwd(), '.ruvector-import-temp.sql');
|
|
284
|
+
try {
|
|
285
|
+
fs.writeFileSync(tempFile, fullSQL);
|
|
286
|
+
output.printInfo('Executing import...');
|
|
287
|
+
output.writeln();
|
|
288
|
+
output.writeln(output.dim('Command:'));
|
|
289
|
+
output.writeln(output.dim(` docker exec -i ${containerName} psql -U claude -d claude_flow < ${tempFile}`));
|
|
290
|
+
output.writeln();
|
|
291
|
+
// Execute via child_process
|
|
292
|
+
const { execSync } = await import('child_process');
|
|
293
|
+
try {
|
|
294
|
+
const result = execSync(`docker exec -i ${containerName} psql -U claude -d claude_flow < ${tempFile}`, {
|
|
295
|
+
encoding: 'utf-8',
|
|
296
|
+
timeout: 60000,
|
|
297
|
+
});
|
|
298
|
+
if (verbose) {
|
|
299
|
+
output.writeln(output.dim(result));
|
|
300
|
+
}
|
|
301
|
+
output.printSuccess('Import completed successfully!');
|
|
302
|
+
}
|
|
303
|
+
catch (execError) {
|
|
304
|
+
const execErrorMessage = execError instanceof Error ? execError.message : String(execError);
|
|
305
|
+
output.printError(`Import failed: ${execErrorMessage}`);
|
|
306
|
+
output.writeln();
|
|
307
|
+
output.printInfo('You can manually run the import with:');
|
|
308
|
+
output.writeln(` docker exec -i ${containerName} psql -U claude -d claude_flow < ${tempFile}`);
|
|
309
|
+
return { success: false, message: execErrorMessage };
|
|
310
|
+
}
|
|
311
|
+
finally {
|
|
312
|
+
// Clean up temp file
|
|
313
|
+
try {
|
|
314
|
+
fs.unlinkSync(tempFile);
|
|
315
|
+
}
|
|
316
|
+
catch {
|
|
317
|
+
// Ignore cleanup errors
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
catch (error) {
|
|
322
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
323
|
+
output.printError(`Failed to create temp file: ${errorMessage}`);
|
|
324
|
+
return { success: false, message: errorMessage };
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
// Print statistics
|
|
328
|
+
output.writeln();
|
|
329
|
+
output.printBox([
|
|
330
|
+
'Import Statistics',
|
|
331
|
+
'',
|
|
332
|
+
` Total entries: ${stats.total}`,
|
|
333
|
+
` Imported: ${stats.imported}`,
|
|
334
|
+
` With embeddings: ${stats.withEmbeddings}`,
|
|
335
|
+
` Errors: ${stats.errors}`,
|
|
336
|
+
'',
|
|
337
|
+
'By Namespace:',
|
|
338
|
+
...Object.entries(stats.byNamespace).map(([ns, count]) => ` ${ns}: ${count}`),
|
|
339
|
+
].join('\n'), 'Import Complete');
|
|
340
|
+
output.writeln();
|
|
341
|
+
// Show verification command
|
|
342
|
+
output.printInfo('To verify the import:');
|
|
343
|
+
output.writeln(` docker exec ${containerName} psql -U claude -d claude_flow -c "SELECT COUNT(*) FROM claude_flow.memory_entries;"`);
|
|
344
|
+
output.writeln();
|
|
345
|
+
return { success: true };
|
|
346
|
+
},
|
|
347
|
+
};
|
|
348
|
+
export default importCommand;
|
|
349
|
+
//# sourceMappingURL=import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../../../../src/commands/ruvector/import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AA2B7B;;GAEG;AACH,SAAS,eAAe,CAAC,SAAmB,EAAE,aAAqB,GAAG;IACpE,qDAAqD;IACrD,MAAM,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;IAC9B,OAAO,MAAM,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;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,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC5E,MAAM,CAAC,UAAU,CAAC,+BAA+B,YAAY,EAAE,CAAC,CAAC;gBACjE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;YACnD,CAAC;QACH,CAAC;QAED,mBAAmB;QACnB,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,CAAC,QAAQ,CAAC;YACd,mBAAmB;YACnB,EAAE;YACF,wBAAwB,KAAK,CAAC,KAAK,EAAE;YACrC,wBAAwB,KAAK,CAAC,QAAQ,EAAE;YACxC,wBAAwB,KAAK,CAAC,cAAc,EAAE;YAC9C,wBAAwB,KAAK,CAAC,MAAM,EAAE;YACtC,EAAE;YACF,eAAe;YACf,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,EAAE,CAAC;SAC/E,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC,CAAC;QAEjC,MAAM,CAAC,OAAO,EAAE,CAAC;QAEjB,4BAA4B;QAC5B,MAAM,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAC1C,MAAM,CAAC,OAAO,CAAC,iBAAiB,aAAa,sFAAsF,CAAC,CAAC;QACrI,MAAM,CAAC,OAAO,EAAE,CAAC;QAEjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -19,6 +19,8 @@ import type { Command } from '../../types.js';
|
|
|
19
19
|
export declare const ruvectorCommand: Command;
|
|
20
20
|
export default ruvectorCommand;
|
|
21
21
|
export { initCommand } from './init.js';
|
|
22
|
+
export { setupCommand } from './setup.js';
|
|
23
|
+
export { importCommand } from './import.js';
|
|
22
24
|
export { migrateCommand } from './migrate.js';
|
|
23
25
|
export { statusCommand } from './status.js';
|
|
24
26
|
export { benchmarkCommand } from './benchmark.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/ruvector/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/ruvector/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,gBAAgB,CAAC;AAa7E;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,OA6F7B,CAAC;AAEF,eAAe,eAAe,CAAC;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -20,6 +20,8 @@ import { statusCommand } from './status.js';
|
|
|
20
20
|
import { benchmarkCommand } from './benchmark.js';
|
|
21
21
|
import { optimizeCommand } from './optimize.js';
|
|
22
22
|
import { backupCommand } from './backup.js';
|
|
23
|
+
import { setupCommand } from './setup.js';
|
|
24
|
+
import { importCommand } from './import.js';
|
|
23
25
|
/**
|
|
24
26
|
* RuVector PostgreSQL Bridge main command
|
|
25
27
|
*/
|
|
@@ -29,6 +31,8 @@ export const ruvectorCommand = {
|
|
|
29
31
|
aliases: ['rv', 'pgvector'],
|
|
30
32
|
subcommands: [
|
|
31
33
|
initCommand,
|
|
34
|
+
setupCommand,
|
|
35
|
+
importCommand,
|
|
32
36
|
migrateCommand,
|
|
33
37
|
statusCommand,
|
|
34
38
|
benchmarkCommand,
|
|
@@ -71,6 +75,8 @@ export const ruvectorCommand = {
|
|
|
71
75
|
},
|
|
72
76
|
],
|
|
73
77
|
examples: [
|
|
78
|
+
{ command: 'claude-flow ruvector setup', description: 'Output Docker files and SQL for setup' },
|
|
79
|
+
{ command: 'claude-flow ruvector import --input memory.json', description: 'Import from sql.js/JSON export' },
|
|
74
80
|
{ command: 'claude-flow ruvector init --database mydb', description: 'Initialize RuVector in PostgreSQL' },
|
|
75
81
|
{ command: 'claude-flow ruvector status --verbose', description: 'Check connection and schema status' },
|
|
76
82
|
{ command: 'claude-flow ruvector migrate --up', description: 'Run pending migrations' },
|
|
@@ -95,6 +101,8 @@ export const ruvectorCommand = {
|
|
|
95
101
|
'',
|
|
96
102
|
'Available subcommands:',
|
|
97
103
|
'',
|
|
104
|
+
' setup Output Docker files and SQL for setup',
|
|
105
|
+
' import Import from sql.js/JSON to PostgreSQL',
|
|
98
106
|
' init Initialize RuVector in PostgreSQL',
|
|
99
107
|
' migrate Run database migrations',
|
|
100
108
|
' status Check connection and schema status',
|
|
@@ -111,6 +119,8 @@ export const ruvectorCommand = {
|
|
|
111
119
|
export default ruvectorCommand;
|
|
112
120
|
// Re-export subcommands for direct access
|
|
113
121
|
export { initCommand } from './init.js';
|
|
122
|
+
export { setupCommand } from './setup.js';
|
|
123
|
+
export { importCommand } from './import.js';
|
|
114
124
|
export { migrateCommand } from './migrate.js';
|
|
115
125
|
export { statusCommand } from './status.js';
|
|
116
126
|
export { benchmarkCommand } from './benchmark.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/ruvector/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;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
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V3 CLI RuVector Setup Command
|
|
3
|
+
* Outputs Docker files and SQL for easy RuVector PostgreSQL setup
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* npx claude-flow ruvector setup # Output to ./ruvector-postgres/
|
|
7
|
+
* npx claude-flow ruvector setup --output /path/to/dir
|
|
8
|
+
* npx claude-flow ruvector setup --print # Print to stdout only
|
|
9
|
+
*
|
|
10
|
+
* Created with care by ruv.io
|
|
11
|
+
*/
|
|
12
|
+
import type { Command } from '../../types.js';
|
|
13
|
+
/**
|
|
14
|
+
* RuVector Setup command - outputs Docker files and SQL
|
|
15
|
+
*/
|
|
16
|
+
export declare const setupCommand: Command;
|
|
17
|
+
export default setupCommand;
|
|
18
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../src/commands/ruvector/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,gBAAgB,CAAC;AAooB7E;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAyH1B,CAAC;AAEF,eAAe,YAAY,CAAC"}
|