moflo 4.10.23 → 4.10.24
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/src/cli/commands/agent.js +14 -14
- package/dist/src/cli/commands/analyze.js +52 -52
- package/dist/src/cli/commands/benchmark.js +14 -14
- package/dist/src/cli/commands/claims.js +15 -15
- package/dist/src/cli/commands/completions.js +40 -40
- package/dist/src/cli/commands/config.js +8 -8
- package/dist/src/cli/commands/daemon.js +24 -24
- package/dist/src/cli/commands/deployment.js +15 -15
- package/dist/src/cli/commands/doctor-checks-config.js +6 -6
- package/dist/src/cli/commands/doctor.js +10 -10
- package/dist/src/cli/commands/embeddings.js +49 -49
- package/dist/src/cli/commands/guidance.js +22 -22
- package/dist/src/cli/commands/hive-mind.js +21 -21
- package/dist/src/cli/commands/hooks.js +95 -95
- package/dist/src/cli/commands/init.js +17 -17
- package/dist/src/cli/commands/issues.js +6 -6
- package/dist/src/cli/commands/mcp.js +10 -10
- package/dist/src/cli/commands/memory.js +56 -47
- package/dist/src/cli/commands/migrate.js +5 -5
- package/dist/src/cli/commands/neural.js +31 -31
- package/dist/src/cli/commands/performance.js +13 -13
- package/dist/src/cli/commands/plugins.js +26 -26
- package/dist/src/cli/commands/process.js +32 -32
- package/dist/src/cli/commands/progress.js +5 -5
- package/dist/src/cli/commands/providers.js +13 -13
- package/dist/src/cli/commands/route.js +26 -26
- package/dist/src/cli/commands/security.js +19 -19
- package/dist/src/cli/commands/session.js +13 -13
- package/dist/src/cli/commands/start.js +11 -11
- package/dist/src/cli/commands/status.js +8 -8
- package/dist/src/cli/commands/swarm.js +7 -7
- package/dist/src/cli/commands/task.js +9 -9
- package/dist/src/cli/commands/transfer-store.js +16 -16
- package/dist/src/cli/commands/update.js +2 -2
- package/dist/src/cli/hooks/statusline/index.js +3 -3
- package/dist/src/cli/init/executor.js +6 -6
- package/dist/src/cli/init/helpers-generator.js +4 -4
- package/dist/src/cli/mcp-tools/hooks-tools.js +1 -1
- package/dist/src/cli/memory/auto-memory-bridge.js +1 -1
- package/dist/src/cli/memory/memory-initializer.js +1 -1
- package/dist/src/cli/plugins/tests/demo-plugin-store.js +6 -6
- package/dist/src/cli/version.js +1 -1
- package/package.json +2 -2
|
@@ -10,6 +10,8 @@ import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
|
10
10
|
import { openDaemonDatabase } from '../memory/daemon-backend.js';
|
|
11
11
|
import { errorDetail } from '../shared/utils/error-detail.js';
|
|
12
12
|
import { legacySwarmPath, runtimePath } from '../services/moflo-paths.js';
|
|
13
|
+
import { resolveBridgeDbPath } from '../memory/bridge-core.js';
|
|
14
|
+
import { findProjectRoot } from '../services/project-root.js';
|
|
13
15
|
// Memory backends
|
|
14
16
|
const BACKENDS = [
|
|
15
17
|
{ value: 'agentdb', label: 'AgentDB', hint: 'Vector database with HNSW indexing (150x-12,500x faster)' },
|
|
@@ -67,9 +69,9 @@ const storeCommand = {
|
|
|
67
69
|
}
|
|
68
70
|
],
|
|
69
71
|
examples: [
|
|
70
|
-
{ command: '
|
|
71
|
-
{ command: '
|
|
72
|
-
{ command: '
|
|
72
|
+
{ command: 'flo memory store -k "api/auth" -v "JWT implementation"', description: 'Store text' },
|
|
73
|
+
{ command: 'flo memory store -k "pattern/singleton" --vector', description: 'Store vector' },
|
|
74
|
+
{ command: 'flo memory store -k "pattern" -v "updated" --upsert', description: 'Update existing' }
|
|
73
75
|
],
|
|
74
76
|
action: async (ctx) => {
|
|
75
77
|
const key = ctx.flags.key;
|
|
@@ -260,9 +262,9 @@ const searchCommand = {
|
|
|
260
262
|
}
|
|
261
263
|
],
|
|
262
264
|
examples: [
|
|
263
|
-
{ command: '
|
|
264
|
-
{ command: '
|
|
265
|
-
{ command: '
|
|
265
|
+
{ command: 'flo memory search -q "authentication patterns"', description: 'Semantic search' },
|
|
266
|
+
{ command: 'flo memory search -q "JWT" -t keyword', description: 'Keyword search' },
|
|
267
|
+
{ command: 'flo memory search -q "test" --build-hnsw', description: 'Build HNSW index and search' }
|
|
266
268
|
],
|
|
267
269
|
action: async (ctx) => {
|
|
268
270
|
const query = ctx.flags.query || ctx.args[0];
|
|
@@ -331,7 +333,7 @@ const searchCommand = {
|
|
|
331
333
|
output.writeln();
|
|
332
334
|
if (results.length === 0) {
|
|
333
335
|
output.printWarning('No results found');
|
|
334
|
-
output.writeln(output.dim('Try:
|
|
336
|
+
output.writeln(output.dim('Try: flo memory store -k "key" --value "data"'));
|
|
335
337
|
return { success: true, data: [] };
|
|
336
338
|
}
|
|
337
339
|
output.printTable({
|
|
@@ -408,7 +410,7 @@ const listCommand = {
|
|
|
408
410
|
output.writeln();
|
|
409
411
|
if (entries.length === 0) {
|
|
410
412
|
output.printWarning('No entries found');
|
|
411
|
-
output.printInfo('Store data:
|
|
413
|
+
output.printInfo('Store data: flo memory store -k "key" --value "data"');
|
|
412
414
|
return { success: true, data: [] };
|
|
413
415
|
}
|
|
414
416
|
output.printTable({
|
|
@@ -477,9 +479,9 @@ const deleteCommand = {
|
|
|
477
479
|
}
|
|
478
480
|
],
|
|
479
481
|
examples: [
|
|
480
|
-
{ command: '
|
|
481
|
-
{ command: '
|
|
482
|
-
{ command: '
|
|
482
|
+
{ command: 'flo memory delete -k "mykey"', description: 'Delete entry with default namespace' },
|
|
483
|
+
{ command: 'flo memory delete -k "lesson" -n "lessons"', description: 'Delete entry from specific namespace' },
|
|
484
|
+
{ command: 'flo memory delete mykey -f', description: 'Delete without confirmation' }
|
|
483
485
|
],
|
|
484
486
|
action: async (ctx) => {
|
|
485
487
|
// Support both --key flag and positional argument
|
|
@@ -710,9 +712,9 @@ const cleanupCommand = {
|
|
|
710
712
|
}
|
|
711
713
|
],
|
|
712
714
|
examples: [
|
|
713
|
-
{ command: '
|
|
714
|
-
{ command: '
|
|
715
|
-
{ command: '
|
|
715
|
+
{ command: 'flo memory cleanup --dry-run', description: 'Preview cleanup' },
|
|
716
|
+
{ command: 'flo memory cleanup --older-than 30d', description: 'Delete entries older than 30 days' },
|
|
717
|
+
{ command: 'flo memory cleanup --expired-only', description: 'Clean expired entries' }
|
|
716
718
|
],
|
|
717
719
|
action: async (ctx) => {
|
|
718
720
|
const dryRun = ctx.flags.dryRun;
|
|
@@ -823,9 +825,9 @@ const compressCommand = {
|
|
|
823
825
|
}
|
|
824
826
|
],
|
|
825
827
|
examples: [
|
|
826
|
-
{ command: '
|
|
827
|
-
{ command: '
|
|
828
|
-
{ command: '
|
|
828
|
+
{ command: 'flo memory compress', description: 'Balanced compression' },
|
|
829
|
+
{ command: 'flo memory compress --quantize --bits 4', description: '4-bit quantization (32x reduction)' },
|
|
830
|
+
{ command: 'flo memory compress -l max -t vectors', description: 'Max compression on vectors' }
|
|
829
831
|
],
|
|
830
832
|
action: async (ctx) => {
|
|
831
833
|
const level = ctx.flags.level || 'balanced';
|
|
@@ -933,8 +935,8 @@ const exportCommand = {
|
|
|
933
935
|
}
|
|
934
936
|
],
|
|
935
937
|
examples: [
|
|
936
|
-
{ command: '
|
|
937
|
-
{ command: '
|
|
938
|
+
{ command: 'flo memory export -o ./backup.json', description: 'Export all to JSON' },
|
|
939
|
+
{ command: 'flo memory export -o ./data.csv -f csv', description: 'Export to CSV' }
|
|
938
940
|
],
|
|
939
941
|
action: async (ctx) => {
|
|
940
942
|
const outputPath = ctx.flags.output;
|
|
@@ -998,8 +1000,8 @@ const importCommand = {
|
|
|
998
1000
|
}
|
|
999
1001
|
],
|
|
1000
1002
|
examples: [
|
|
1001
|
-
{ command: '
|
|
1002
|
-
{ command: '
|
|
1003
|
+
{ command: 'flo memory import -i ./backup.json', description: 'Import from file' },
|
|
1004
|
+
{ command: 'flo memory import -i ./data.json -n archive', description: 'Import to namespace' }
|
|
1003
1005
|
],
|
|
1004
1006
|
action: async (ctx) => {
|
|
1005
1007
|
const inputPath = ctx.flags.input || ctx.args[0];
|
|
@@ -1080,10 +1082,10 @@ const initMemoryCommand = {
|
|
|
1080
1082
|
}
|
|
1081
1083
|
],
|
|
1082
1084
|
examples: [
|
|
1083
|
-
{ command: '
|
|
1084
|
-
{ command: '
|
|
1085
|
-
{ command: '
|
|
1086
|
-
{ command: '
|
|
1085
|
+
{ command: 'flo memory init', description: 'Initialize hybrid backend with all features' },
|
|
1086
|
+
{ command: 'flo memory init -b agentdb', description: 'Initialize AgentDB backend' },
|
|
1087
|
+
{ command: 'flo memory init -p ./data/memory.db --force', description: 'Reinitialize at custom path' },
|
|
1088
|
+
{ command: 'flo memory init --verbose --verify', description: 'Initialize with full verification' }
|
|
1087
1089
|
],
|
|
1088
1090
|
action: async (ctx) => {
|
|
1089
1091
|
const backend = ctx.flags.backend || 'hybrid';
|
|
@@ -1229,10 +1231,10 @@ const initMemoryCommand = {
|
|
|
1229
1231
|
// Show next steps
|
|
1230
1232
|
output.writeln(output.bold('Next Steps:'));
|
|
1231
1233
|
output.printList([
|
|
1232
|
-
`Store data: ${output.highlight('
|
|
1233
|
-
`Search: ${output.highlight('
|
|
1234
|
-
`Train patterns: ${output.highlight('
|
|
1235
|
-
`View stats: ${output.highlight('
|
|
1234
|
+
`Store data: ${output.highlight('flo memory store -k "key" --value "data"')}`,
|
|
1235
|
+
`Search: ${output.highlight('flo memory search -q "query"')}`,
|
|
1236
|
+
`Train patterns: ${output.highlight('flo neural train -p coordination')}`,
|
|
1237
|
+
`View stats: ${output.highlight('flo memory stats')}`
|
|
1236
1238
|
]);
|
|
1237
1239
|
// Also sync to .claude directory
|
|
1238
1240
|
const fs = await import('fs');
|
|
@@ -1262,11 +1264,18 @@ const initMemoryCommand = {
|
|
|
1262
1264
|
// ============================================================================
|
|
1263
1265
|
// Shared DB helpers for batch commands (index-guidance, rebuild-index, code-map)
|
|
1264
1266
|
// ============================================================================
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
async function openDb(cwd) {
|
|
1268
|
-
|
|
1269
|
-
|
|
1267
|
+
// Exported for test access (swarm-path-relocation.test.ts pins the canonical
|
|
1268
|
+
// resolution); production callers use it via the `flo memory` command actions.
|
|
1269
|
+
export async function openDb(cwd) {
|
|
1270
|
+
// Canonical store is `.moflo/moflo.db`. Route through the shared bridge
|
|
1271
|
+
// resolver so these `flo memory` CLI writers land on the exact path the
|
|
1272
|
+
// daemon, MCP server, and bridge read — and so the post-#727 migration
|
|
1273
|
+
// window is honoured (legacy `.swarm/memory.db` is preferred only when it
|
|
1274
|
+
// is the sole existing file). Pre-fix this joined `.swarm/` under cwd
|
|
1275
|
+
// unconditionally, recreating the legacy dir on every call and stranding
|
|
1276
|
+
// user data in a store nothing else reads (#1168 follow-up — `openDb` was
|
|
1277
|
+
// the explicit-command writer the original relocation sweep missed).
|
|
1278
|
+
const dbPath = resolveBridgeDbPath(findProjectRoot({ cwd }));
|
|
1270
1279
|
// openDaemonDatabase ensures the parent directory exists and applies WAL.
|
|
1271
1280
|
const db = openDaemonDatabase(dbPath);
|
|
1272
1281
|
// Ensure table exists
|
|
@@ -1575,9 +1584,9 @@ const indexGuidanceCommand = {
|
|
|
1575
1584
|
}
|
|
1576
1585
|
],
|
|
1577
1586
|
examples: [
|
|
1578
|
-
{ command: '
|
|
1579
|
-
{ command: '
|
|
1580
|
-
{ command: '
|
|
1587
|
+
{ command: 'flo memory index-guidance', description: 'Index all guidance files' },
|
|
1588
|
+
{ command: 'flo memory index-guidance --force', description: 'Force reindex all' },
|
|
1589
|
+
{ command: 'flo memory index-guidance --file .claude/guidance/coding-rules.md', description: 'Index specific file' }
|
|
1581
1590
|
],
|
|
1582
1591
|
action: async (ctx) => {
|
|
1583
1592
|
const forceReindex = ctx.flags.force;
|
|
@@ -1832,9 +1841,9 @@ const rebuildIndexCommand = {
|
|
|
1832
1841
|
}
|
|
1833
1842
|
],
|
|
1834
1843
|
examples: [
|
|
1835
|
-
{ command: '
|
|
1836
|
-
{ command: '
|
|
1837
|
-
{ command: '
|
|
1844
|
+
{ command: 'flo memory rebuild-index', description: 'Embed entries without embeddings' },
|
|
1845
|
+
{ command: 'flo memory rebuild-index --force', description: 'Re-embed all entries' },
|
|
1846
|
+
{ command: 'flo memory rebuild-index -n guidance', description: 'Only guidance namespace' }
|
|
1838
1847
|
],
|
|
1839
1848
|
action: async (ctx) => {
|
|
1840
1849
|
const forceAll = ctx.flags.force;
|
|
@@ -2115,9 +2124,9 @@ const codeMapCommand = {
|
|
|
2115
2124
|
}
|
|
2116
2125
|
],
|
|
2117
2126
|
examples: [
|
|
2118
|
-
{ command: '
|
|
2119
|
-
{ command: '
|
|
2120
|
-
{ command: '
|
|
2127
|
+
{ command: 'flo memory code-map', description: 'Incremental code map update' },
|
|
2128
|
+
{ command: 'flo memory code-map --force', description: 'Full regeneration' },
|
|
2129
|
+
{ command: 'flo memory code-map --stats', description: 'Show stats only' }
|
|
2121
2130
|
],
|
|
2122
2131
|
action: async (ctx) => {
|
|
2123
2132
|
const forceRegen = ctx.flags.force;
|
|
@@ -2632,15 +2641,15 @@ export const memoryCommand = {
|
|
|
2632
2641
|
subcommands: [initMemoryCommand, storeCommand, retrieveCommand, searchCommand, listCommand, deleteCommand, statsCommand, configureCommand, cleanupCommand, compressCommand, exportCommand, importCommand, indexGuidanceCommand, rebuildIndexCommand, codeMapCommand, refreshCommand, restoreLearningsCommand],
|
|
2633
2642
|
options: [],
|
|
2634
2643
|
examples: [
|
|
2635
|
-
{ command: '
|
|
2636
|
-
{ command: '
|
|
2637
|
-
{ command: '
|
|
2644
|
+
{ command: 'flo memory store -k "key" -v "value"', description: 'Store data' },
|
|
2645
|
+
{ command: 'flo memory search -q "auth patterns"', description: 'Search memory' },
|
|
2646
|
+
{ command: 'flo memory stats', description: 'Show statistics' }
|
|
2638
2647
|
],
|
|
2639
2648
|
action: async (ctx) => {
|
|
2640
2649
|
output.writeln();
|
|
2641
2650
|
output.writeln(output.bold('Memory Management Commands'));
|
|
2642
2651
|
output.writeln();
|
|
2643
|
-
output.writeln('Usage:
|
|
2652
|
+
output.writeln('Usage: flo memory <subcommand> [options]');
|
|
2644
2653
|
output.writeln();
|
|
2645
2654
|
output.writeln('Subcommands:');
|
|
2646
2655
|
output.printList([
|
|
@@ -345,7 +345,7 @@ const breakingCommand = {
|
|
|
345
345
|
});
|
|
346
346
|
output.writeln();
|
|
347
347
|
}
|
|
348
|
-
output.printInfo('Run "
|
|
348
|
+
output.printInfo('Run "flo migrate run" to automatically handle these changes');
|
|
349
349
|
return { success: true, data: changes };
|
|
350
350
|
}
|
|
351
351
|
};
|
|
@@ -356,15 +356,15 @@ export const migrateCommand = {
|
|
|
356
356
|
subcommands: [statusCommand, runCommand, verifyCommand, rollbackCommand, breakingCommand],
|
|
357
357
|
options: [],
|
|
358
358
|
examples: [
|
|
359
|
-
{ command: '
|
|
360
|
-
{ command: '
|
|
361
|
-
{ command: '
|
|
359
|
+
{ command: 'flo migrate status', description: 'Check migration status' },
|
|
360
|
+
{ command: 'flo migrate run --dry-run', description: 'Preview migration' },
|
|
361
|
+
{ command: 'flo migrate run -t all', description: 'Run full migration' }
|
|
362
362
|
],
|
|
363
363
|
action: async (ctx) => {
|
|
364
364
|
output.writeln();
|
|
365
365
|
output.writeln(output.bold('V2 to V3 Migration Tools'));
|
|
366
366
|
output.writeln();
|
|
367
|
-
output.writeln('Usage:
|
|
367
|
+
output.writeln('Usage: flo migrate <subcommand> [options]');
|
|
368
368
|
output.writeln();
|
|
369
369
|
output.writeln('Subcommands:');
|
|
370
370
|
output.printList([
|
|
@@ -28,9 +28,9 @@ const trainCommand = {
|
|
|
28
28
|
{ name: 'curriculum', type: 'boolean', description: 'Enable curriculum learning', default: 'false' },
|
|
29
29
|
],
|
|
30
30
|
examples: [
|
|
31
|
-
{ command: '
|
|
32
|
-
{ command: '
|
|
33
|
-
{ command: '
|
|
31
|
+
{ command: 'flo neural train -p coordination -e 100', description: 'Train coordination patterns' },
|
|
32
|
+
{ command: 'flo neural train -d ./training-data.json --flash', description: 'Train from file with Flash Attention' },
|
|
33
|
+
{ command: 'flo neural train -p security --wasm --contrastive', description: 'Security patterns with contrastive learning' },
|
|
34
34
|
],
|
|
35
35
|
action: async (ctx) => {
|
|
36
36
|
const patternType = ctx.flags.pattern || 'coordination';
|
|
@@ -335,8 +335,8 @@ const statusCommand = {
|
|
|
335
335
|
{ name: 'verbose', short: 'v', type: 'boolean', description: 'Show detailed metrics' },
|
|
336
336
|
],
|
|
337
337
|
examples: [
|
|
338
|
-
{ command: '
|
|
339
|
-
{ command: '
|
|
338
|
+
{ command: 'flo neural status', description: 'Show all neural status' },
|
|
339
|
+
{ command: 'flo neural status -m model-123', description: 'Check specific model' },
|
|
340
340
|
],
|
|
341
341
|
action: async (ctx) => {
|
|
342
342
|
const verbose = ctx.flags.verbose === true;
|
|
@@ -475,8 +475,8 @@ const patternsCommand = {
|
|
|
475
475
|
{ name: 'limit', short: 'l', type: 'number', description: 'Max patterns to return', default: '10' },
|
|
476
476
|
],
|
|
477
477
|
examples: [
|
|
478
|
-
{ command: '
|
|
479
|
-
{ command: '
|
|
478
|
+
{ command: 'flo neural patterns --action list', description: 'List all patterns' },
|
|
479
|
+
{ command: 'flo neural patterns -a analyze -q "error handling"', description: 'Analyze patterns' },
|
|
480
480
|
],
|
|
481
481
|
action: async (ctx) => {
|
|
482
482
|
const action = ctx.flags.action || 'list';
|
|
@@ -557,7 +557,7 @@ const patternsCommand = {
|
|
|
557
557
|
catch (error) {
|
|
558
558
|
// Fallback if intelligence not initialized
|
|
559
559
|
output.writeln(output.dim('Intelligence system not initialized.'));
|
|
560
|
-
output.writeln(output.dim('Run:
|
|
560
|
+
output.writeln(output.dim('Run: flo neural train --pattern-type general'));
|
|
561
561
|
return { success: false };
|
|
562
562
|
}
|
|
563
563
|
},
|
|
@@ -572,8 +572,8 @@ const predictCommand = {
|
|
|
572
572
|
{ name: 'format', short: 'f', type: 'string', description: 'Output format: json, table', default: 'table' },
|
|
573
573
|
],
|
|
574
574
|
examples: [
|
|
575
|
-
{ command: '
|
|
576
|
-
{ command: '
|
|
575
|
+
{ command: 'flo neural predict -i "implement authentication"', description: 'Predict routing for task' },
|
|
576
|
+
{ command: 'flo neural predict -i "fix bug in login" -k 3', description: 'Get top 3 predictions' },
|
|
577
577
|
],
|
|
578
578
|
action: async (ctx) => {
|
|
579
579
|
const input = ctx.flags.input;
|
|
@@ -599,7 +599,7 @@ const predictCommand = {
|
|
|
599
599
|
spinner.succeed(`Prediction complete (search: ${searchTime.toFixed(1)}ms)`);
|
|
600
600
|
output.writeln();
|
|
601
601
|
if (matches.length === 0) {
|
|
602
|
-
output.writeln(output.warning('No similar patterns found. Try training first:
|
|
602
|
+
output.writeln(output.warning('No similar patterns found. Try training first: flo neural train'));
|
|
603
603
|
return { success: true, data: { matches: [] } };
|
|
604
604
|
}
|
|
605
605
|
if (format === 'json') {
|
|
@@ -657,8 +657,8 @@ const optimizeCommand = {
|
|
|
657
657
|
{ name: 'verbose', short: 'v', type: 'boolean', description: 'Show detailed metrics' },
|
|
658
658
|
],
|
|
659
659
|
examples: [
|
|
660
|
-
{ command: '
|
|
661
|
-
{ command: '
|
|
660
|
+
{ command: 'flo neural optimize --method quantize', description: 'Quantize patterns to Int8' },
|
|
661
|
+
{ command: 'flo neural optimize --method analyze -v', description: 'Analyze memory usage' },
|
|
662
662
|
],
|
|
663
663
|
action: async (ctx) => {
|
|
664
664
|
const method = ctx.flags.method || 'quantize';
|
|
@@ -807,8 +807,8 @@ const exportCommand = {
|
|
|
807
807
|
{ name: 'name', short: 'n', type: 'string', description: 'Custom name for exported model' },
|
|
808
808
|
],
|
|
809
809
|
examples: [
|
|
810
|
-
{ command: '
|
|
811
|
-
{ command: '
|
|
810
|
+
{ command: 'flo neural export -m security-patterns --ipfs', description: 'Export and pin to IPFS' },
|
|
811
|
+
{ command: 'flo neural export -m code-review -o ./export.json', description: 'Export to file' },
|
|
812
812
|
],
|
|
813
813
|
action: async (ctx) => {
|
|
814
814
|
const modelId = ctx.flags.model || 'all';
|
|
@@ -975,7 +975,7 @@ const exportCommand = {
|
|
|
975
975
|
});
|
|
976
976
|
output.writeln();
|
|
977
977
|
output.writeln(output.success('Share this CID for others to import your trained patterns'));
|
|
978
|
-
output.writeln(output.dim(`Import command:
|
|
978
|
+
output.writeln(output.dim(`Import command: flo neural import --cid ${result.IpfsHash}`));
|
|
979
979
|
}
|
|
980
980
|
if (!outputFile && !pinToIpfs) {
|
|
981
981
|
// Just display the export
|
|
@@ -1001,9 +1001,9 @@ const listCommand = {
|
|
|
1001
1001
|
{ name: 'cid', type: 'string', description: 'Custom registry CID (default: official registry)' },
|
|
1002
1002
|
],
|
|
1003
1003
|
examples: [
|
|
1004
|
-
{ command: '
|
|
1005
|
-
{ command: '
|
|
1006
|
-
{ command: '
|
|
1004
|
+
{ command: 'flo neural list', description: 'List all available models' },
|
|
1005
|
+
{ command: 'flo neural list --category security', description: 'List only security models' },
|
|
1006
|
+
{ command: 'flo neural list -f json', description: 'Output as JSON' },
|
|
1007
1007
|
],
|
|
1008
1008
|
action: async (ctx) => {
|
|
1009
1009
|
const category = ctx.flags.category;
|
|
@@ -1090,12 +1090,12 @@ const listCommand = {
|
|
|
1090
1090
|
output.writeln(output.dim('Registry CID: ' + registryCid));
|
|
1091
1091
|
output.writeln();
|
|
1092
1092
|
output.writeln(output.bold('Import Commands:'));
|
|
1093
|
-
output.writeln(output.dim(' All models: ') + `
|
|
1093
|
+
output.writeln(output.dim(' All models: ') + `flo neural import --cid ${registryCid}`);
|
|
1094
1094
|
if (category) {
|
|
1095
|
-
output.writeln(output.dim(` ${category} only: `) + `
|
|
1095
|
+
output.writeln(output.dim(` ${category} only: `) + `flo neural import --cid ${registryCid} --category ${category}`);
|
|
1096
1096
|
}
|
|
1097
1097
|
else {
|
|
1098
|
-
output.writeln(output.dim(' By category: ') + `
|
|
1098
|
+
output.writeln(output.dim(' By category: ') + `flo neural import --cid ${registryCid} --category <category>`);
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
1101
|
return { success: true };
|
|
@@ -1118,9 +1118,9 @@ const importCommand = {
|
|
|
1118
1118
|
{ name: 'category', type: 'string', description: 'Only import patterns from specific category' },
|
|
1119
1119
|
],
|
|
1120
1120
|
examples: [
|
|
1121
|
-
{ command: '
|
|
1122
|
-
{ command: '
|
|
1123
|
-
{ command: '
|
|
1121
|
+
{ command: 'flo neural import --cid QmXxx...', description: 'Import from IPFS' },
|
|
1122
|
+
{ command: 'flo neural import -f ./patterns.json --verify', description: 'Import from file' },
|
|
1123
|
+
{ command: 'flo neural import --cid QmNr1yYMK... --category security', description: 'Import only security patterns' },
|
|
1124
1124
|
],
|
|
1125
1125
|
action: async (ctx) => {
|
|
1126
1126
|
const cid = ctx.flags.cid;
|
|
@@ -1276,7 +1276,7 @@ const importCommand = {
|
|
|
1276
1276
|
});
|
|
1277
1277
|
output.writeln();
|
|
1278
1278
|
output.writeln(output.success('Patterns imported and ready to use'));
|
|
1279
|
-
output.writeln(output.dim('Run "
|
|
1279
|
+
output.writeln(output.dim('Run "flo neural patterns --action list" to see imported patterns'));
|
|
1280
1280
|
return { success: true };
|
|
1281
1281
|
}
|
|
1282
1282
|
catch (error) {
|
|
@@ -1295,8 +1295,8 @@ const benchmarkCommand = {
|
|
|
1295
1295
|
{ name: 'keys', short: 'k', type: 'number', description: 'Number of keys for attention', default: '100' },
|
|
1296
1296
|
],
|
|
1297
1297
|
examples: [
|
|
1298
|
-
{ command: '
|
|
1299
|
-
{ command: '
|
|
1298
|
+
{ command: 'flo neural benchmark', description: 'Run default benchmark' },
|
|
1299
|
+
{ command: 'flo neural benchmark -d 128 -i 5000', description: 'Custom benchmark' },
|
|
1300
1300
|
],
|
|
1301
1301
|
action: async (ctx) => {
|
|
1302
1302
|
const dim = Math.min(parseInt(ctx.flags.dim || '256', 10), 256);
|
|
@@ -1404,9 +1404,9 @@ export const neuralCommand = {
|
|
|
1404
1404
|
description: 'Neural pattern training, MoE, Flash Attention, pattern learning',
|
|
1405
1405
|
subcommands: [trainCommand, statusCommand, patternsCommand, predictCommand, optimizeCommand, benchmarkCommand, listCommand, exportCommand, importCommand],
|
|
1406
1406
|
examples: [
|
|
1407
|
-
{ command: '
|
|
1408
|
-
{ command: '
|
|
1409
|
-
{ command: '
|
|
1407
|
+
{ command: 'flo neural status', description: 'Check neural system status' },
|
|
1408
|
+
{ command: 'flo neural train -p coordination', description: 'Train coordination patterns' },
|
|
1409
|
+
{ command: 'flo neural patterns --action list', description: 'List learned patterns' },
|
|
1410
1410
|
],
|
|
1411
1411
|
action: async () => {
|
|
1412
1412
|
output.writeln();
|
|
@@ -16,8 +16,8 @@ const benchmarkCommand = {
|
|
|
16
16
|
{ name: 'output', short: 'o', type: 'string', description: 'Output format: text, json, csv', default: 'text' },
|
|
17
17
|
],
|
|
18
18
|
examples: [
|
|
19
|
-
{ command: '
|
|
20
|
-
{ command: '
|
|
19
|
+
{ command: 'flo performance benchmark -s neural', description: 'Benchmark neural operations' },
|
|
20
|
+
{ command: 'flo performance benchmark -i 1000', description: 'Run with 1000 iterations' },
|
|
21
21
|
],
|
|
22
22
|
action: async (ctx) => {
|
|
23
23
|
const suite = ctx.flags.suite || 'all';
|
|
@@ -217,8 +217,8 @@ const profileCommand = {
|
|
|
217
217
|
{ name: 'output', short: 'o', type: 'string', description: 'Output file for profile data' },
|
|
218
218
|
],
|
|
219
219
|
examples: [
|
|
220
|
-
{ command: '
|
|
221
|
-
{ command: '
|
|
220
|
+
{ command: 'flo performance profile -t cpu', description: 'Profile CPU usage' },
|
|
221
|
+
{ command: 'flo performance profile -d 60', description: 'Profile for 60 seconds' },
|
|
222
222
|
],
|
|
223
223
|
action: async (ctx) => {
|
|
224
224
|
const type = ctx.flags.type || 'all';
|
|
@@ -286,8 +286,8 @@ const metricsCommand = {
|
|
|
286
286
|
{ name: 'component', short: 'c', type: 'string', description: 'Component to filter' },
|
|
287
287
|
],
|
|
288
288
|
examples: [
|
|
289
|
-
{ command: '
|
|
290
|
-
{ command: '
|
|
289
|
+
{ command: 'flo performance metrics -t 7d', description: 'Show 7-day metrics' },
|
|
290
|
+
{ command: 'flo performance metrics -f prometheus', description: 'Export as Prometheus format' },
|
|
291
291
|
],
|
|
292
292
|
action: async (ctx) => {
|
|
293
293
|
const timeframe = ctx.flags.timeframe || '24h';
|
|
@@ -469,8 +469,8 @@ const optimizeCommand = {
|
|
|
469
469
|
{ name: 'dry-run', short: 'd', type: 'boolean', description: 'Show changes without applying' },
|
|
470
470
|
],
|
|
471
471
|
examples: [
|
|
472
|
-
{ command: '
|
|
473
|
-
{ command: '
|
|
472
|
+
{ command: 'flo performance optimize -t memory', description: 'Optimize memory usage' },
|
|
473
|
+
{ command: 'flo performance optimize --apply', description: 'Apply all optimizations' },
|
|
474
474
|
],
|
|
475
475
|
action: async (ctx) => {
|
|
476
476
|
const target = ctx.flags.target || 'all';
|
|
@@ -511,8 +511,8 @@ const bottleneckCommand = {
|
|
|
511
511
|
{ name: 'depth', short: 'd', type: 'string', description: 'Analysis depth: quick, full', default: 'quick' },
|
|
512
512
|
],
|
|
513
513
|
examples: [
|
|
514
|
-
{ command: '
|
|
515
|
-
{ command: '
|
|
514
|
+
{ command: 'flo performance bottleneck', description: 'Find bottlenecks' },
|
|
515
|
+
{ command: 'flo performance bottleneck -d full', description: 'Full analysis' },
|
|
516
516
|
],
|
|
517
517
|
action: async (ctx) => {
|
|
518
518
|
output.writeln();
|
|
@@ -546,9 +546,9 @@ export const performanceCommand = {
|
|
|
546
546
|
aliases: ['perf'],
|
|
547
547
|
subcommands: [benchmarkCommand, profileCommand, metricsCommand, optimizeCommand, bottleneckCommand],
|
|
548
548
|
examples: [
|
|
549
|
-
{ command: '
|
|
550
|
-
{ command: '
|
|
551
|
-
{ command: '
|
|
549
|
+
{ command: 'flo performance benchmark', description: 'Run benchmarks' },
|
|
550
|
+
{ command: 'flo performance profile', description: 'Profile application' },
|
|
551
|
+
{ command: 'flo perf metrics', description: 'View metrics (alias)' },
|
|
552
552
|
],
|
|
553
553
|
action: async () => {
|
|
554
554
|
output.writeln();
|
|
@@ -23,10 +23,10 @@ const listCommand = {
|
|
|
23
23
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use (default: claude-flow-official)' },
|
|
24
24
|
],
|
|
25
25
|
examples: [
|
|
26
|
-
{ command: '
|
|
27
|
-
{ command: '
|
|
28
|
-
{ command: '
|
|
29
|
-
{ command: '
|
|
26
|
+
{ command: 'flo plugins list', description: 'List all plugins from registry' },
|
|
27
|
+
{ command: 'flo plugins list --installed', description: 'List installed only' },
|
|
28
|
+
{ command: 'flo plugins list --official', description: 'List official plugins' },
|
|
29
|
+
{ command: 'flo plugins list --category security', description: 'List security plugins' },
|
|
30
30
|
],
|
|
31
31
|
action: async (ctx) => {
|
|
32
32
|
const installedOnly = ctx.flags.installed;
|
|
@@ -47,8 +47,8 @@ const listCommand = {
|
|
|
47
47
|
if (installed.length === 0) {
|
|
48
48
|
output.writeln(output.dim('No plugins installed.'));
|
|
49
49
|
output.writeln();
|
|
50
|
-
output.writeln(output.dim('Run "
|
|
51
|
-
output.writeln(output.dim('Run "
|
|
50
|
+
output.writeln(output.dim('Run "flo plugins list" to see available plugins'));
|
|
51
|
+
output.writeln(output.dim('Run "flo plugins install -n <plugin>" to install'));
|
|
52
52
|
return { success: true };
|
|
53
53
|
}
|
|
54
54
|
output.printTable({
|
|
@@ -183,8 +183,8 @@ const installCommand = {
|
|
|
183
183
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
184
184
|
],
|
|
185
185
|
examples: [
|
|
186
|
-
{ command: '
|
|
187
|
-
{ command: '
|
|
186
|
+
{ command: 'flo plugins install -n community-analytics', description: 'Install plugin from IPFS' },
|
|
187
|
+
{ command: 'flo plugins install -n ./my-plugin --dev', description: 'Install local plugin' },
|
|
188
188
|
],
|
|
189
189
|
action: async (ctx) => {
|
|
190
190
|
const name = ctx.flags.name;
|
|
@@ -213,7 +213,7 @@ const installCommand = {
|
|
|
213
213
|
if (existingPlugin) {
|
|
214
214
|
spinner.fail(`Plugin ${name} is already installed (v${existingPlugin.version})`);
|
|
215
215
|
output.writeln();
|
|
216
|
-
output.writeln(output.dim('Use "
|
|
216
|
+
output.writeln(output.dim('Use "flo plugins upgrade -n ' + name + '" to update'));
|
|
217
217
|
return { success: false, exitCode: 1 };
|
|
218
218
|
}
|
|
219
219
|
let result;
|
|
@@ -277,7 +277,7 @@ const uninstallCommand = {
|
|
|
277
277
|
{ name: 'force', short: 'f', type: 'boolean', description: 'Force uninstall without confirmation' },
|
|
278
278
|
],
|
|
279
279
|
examples: [
|
|
280
|
-
{ command: '
|
|
280
|
+
{ command: 'flo plugins uninstall -n community-analytics', description: 'Uninstall plugin' },
|
|
281
281
|
],
|
|
282
282
|
action: async (ctx) => {
|
|
283
283
|
const name = ctx.flags.name;
|
|
@@ -325,8 +325,8 @@ const toggleCommand = {
|
|
|
325
325
|
{ name: 'disable', short: 'd', type: 'boolean', description: 'Disable the plugin' },
|
|
326
326
|
],
|
|
327
327
|
examples: [
|
|
328
|
-
{ command: '
|
|
329
|
-
{ command: '
|
|
328
|
+
{ command: 'flo plugins toggle -n analytics --enable', description: 'Enable plugin' },
|
|
329
|
+
{ command: 'flo plugins toggle -n analytics --disable', description: 'Disable plugin' },
|
|
330
330
|
],
|
|
331
331
|
action: async (ctx) => {
|
|
332
332
|
const name = ctx.flags.name;
|
|
@@ -388,7 +388,7 @@ const infoCommand = {
|
|
|
388
388
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
389
389
|
],
|
|
390
390
|
examples: [
|
|
391
|
-
{ command: '
|
|
391
|
+
{ command: 'flo plugins info -n example-org/sample-plugin', description: 'Show plugin info' },
|
|
392
392
|
],
|
|
393
393
|
action: async (ctx) => {
|
|
394
394
|
const name = ctx.flags.name;
|
|
@@ -536,8 +536,8 @@ const createCommand = {
|
|
|
536
536
|
{ name: 'path', short: 'p', type: 'string', description: 'Output path', default: '.' },
|
|
537
537
|
],
|
|
538
538
|
examples: [
|
|
539
|
-
{ command: '
|
|
540
|
-
{ command: '
|
|
539
|
+
{ command: 'flo plugins create -n my-plugin', description: 'Create basic plugin' },
|
|
540
|
+
{ command: 'flo plugins create -n my-plugin -t hooks', description: 'Create hooks plugin' },
|
|
541
541
|
],
|
|
542
542
|
action: async (ctx) => {
|
|
543
543
|
const name = ctx.flags.name;
|
|
@@ -587,8 +587,8 @@ const upgradeCommand = {
|
|
|
587
587
|
{ name: 'version', short: 'v', type: 'string', description: 'Target version (default: latest)' },
|
|
588
588
|
],
|
|
589
589
|
examples: [
|
|
590
|
-
{ command: '
|
|
591
|
-
{ command: '
|
|
590
|
+
{ command: 'flo plugins upgrade -n example-org/sample-plugin', description: 'Upgrade to latest' },
|
|
591
|
+
{ command: 'flo plugins upgrade -n example-org/sample-plugin -v 3.1.0', description: 'Upgrade to specific version' },
|
|
592
592
|
],
|
|
593
593
|
action: async (ctx) => {
|
|
594
594
|
const name = ctx.flags.name;
|
|
@@ -640,8 +640,8 @@ const searchCommand = {
|
|
|
640
640
|
{ name: 'registry', short: 'r', type: 'string', description: 'Registry to use' },
|
|
641
641
|
],
|
|
642
642
|
examples: [
|
|
643
|
-
{ command: '
|
|
644
|
-
{ command: '
|
|
643
|
+
{ command: 'flo plugins search -q neural', description: 'Search for neural plugins' },
|
|
644
|
+
{ command: 'flo plugins search -q security --verified', description: 'Search verified security plugins' },
|
|
645
645
|
],
|
|
646
646
|
action: async (ctx) => {
|
|
647
647
|
const query = ctx.flags.query;
|
|
@@ -729,8 +729,8 @@ const rateCommand = {
|
|
|
729
729
|
{ name: 'rating', short: 'r', type: 'number', description: 'Rating (1-5)', required: true },
|
|
730
730
|
],
|
|
731
731
|
examples: [
|
|
732
|
-
{ command: '
|
|
733
|
-
{ command: '
|
|
732
|
+
{ command: 'flo plugins rate -n example-org/sample-plugin -r 5', description: 'Rate 5 stars' },
|
|
733
|
+
{ command: 'flo plugins rate -n my-plugin -r 4', description: 'Rate 4 stars' },
|
|
734
734
|
],
|
|
735
735
|
action: async (ctx) => {
|
|
736
736
|
const { rateItem } = await import('../services/registry-api.js');
|
|
@@ -770,10 +770,10 @@ export const pluginsCommand = {
|
|
|
770
770
|
description: 'Plugin management with IPFS-based decentralized registry',
|
|
771
771
|
subcommands: [listCommand, searchCommand, installCommand, uninstallCommand, upgradeCommand, toggleCommand, infoCommand, createCommand, rateCommand],
|
|
772
772
|
examples: [
|
|
773
|
-
{ command: '
|
|
774
|
-
{ command: '
|
|
775
|
-
{ command: '
|
|
776
|
-
{ command: '
|
|
773
|
+
{ command: 'flo plugins list', description: 'List plugins from IPFS registry' },
|
|
774
|
+
{ command: 'flo plugins search -q neural', description: 'Search for plugins' },
|
|
775
|
+
{ command: 'flo plugins install -n community-analytics', description: 'Install from IPFS' },
|
|
776
|
+
{ command: 'flo plugins create -n my-plugin', description: 'Create new plugin' },
|
|
777
777
|
],
|
|
778
778
|
action: async () => {
|
|
779
779
|
output.writeln();
|
|
@@ -806,7 +806,7 @@ export const pluginsCommand = {
|
|
|
806
806
|
'example-org/sample-plugin - Example community plugin (replace with a real plugin name)',
|
|
807
807
|
]);
|
|
808
808
|
output.writeln();
|
|
809
|
-
output.writeln(output.dim('Run "
|
|
809
|
+
output.writeln(output.dim('Run "flo plugins list --official" to see all official plugins'));
|
|
810
810
|
output.writeln(output.dim('Created with ❤️ by motailz.com'));
|
|
811
811
|
return { success: true };
|
|
812
812
|
},
|