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
|
@@ -121,8 +121,8 @@ const spawnCommand = {
|
|
|
121
121
|
}
|
|
122
122
|
],
|
|
123
123
|
examples: [
|
|
124
|
-
{ command: '
|
|
125
|
-
{ command: '
|
|
124
|
+
{ command: 'flo agent spawn --type coder --name bot-1', description: 'Spawn a coder agent' },
|
|
125
|
+
{ command: 'flo agent spawn -t researcher --task "Research React 19"', description: 'Spawn researcher with task' }
|
|
126
126
|
],
|
|
127
127
|
action: async (ctx) => {
|
|
128
128
|
let agentType = ctx.flags.type;
|
|
@@ -533,8 +533,8 @@ const poolCommand = {
|
|
|
533
533
|
}
|
|
534
534
|
],
|
|
535
535
|
examples: [
|
|
536
|
-
{ command: '
|
|
537
|
-
{ command: '
|
|
536
|
+
{ command: 'flo agent pool --size 5', description: 'Set pool size' },
|
|
537
|
+
{ command: 'flo agent pool --min 2 --max 15', description: 'Configure auto-scaling' }
|
|
538
538
|
],
|
|
539
539
|
action: async (ctx) => {
|
|
540
540
|
try {
|
|
@@ -614,8 +614,8 @@ const healthCommand = {
|
|
|
614
614
|
}
|
|
615
615
|
],
|
|
616
616
|
examples: [
|
|
617
|
-
{ command: '
|
|
618
|
-
{ command: '
|
|
617
|
+
{ command: 'flo agent health', description: 'Show all agents health' },
|
|
618
|
+
{ command: 'flo agent health -i agent-001 -d', description: 'Detailed health for specific agent' }
|
|
619
619
|
],
|
|
620
620
|
action: async (ctx) => {
|
|
621
621
|
const agentId = ctx.args[0] || ctx.flags.id;
|
|
@@ -737,9 +737,9 @@ const logsCommand = {
|
|
|
737
737
|
}
|
|
738
738
|
],
|
|
739
739
|
examples: [
|
|
740
|
-
{ command: '
|
|
741
|
-
{ command: '
|
|
742
|
-
{ command: '
|
|
740
|
+
{ command: 'flo agent logs -i agent-001', description: 'Show agent logs' },
|
|
741
|
+
{ command: 'flo agent logs -i agent-001 -f', description: 'Follow agent logs' },
|
|
742
|
+
{ command: 'flo agent logs -l error --since 1h', description: 'Show errors from last hour' }
|
|
743
743
|
],
|
|
744
744
|
action: async (ctx) => {
|
|
745
745
|
const agentId = ctx.args[0] || ctx.flags.id;
|
|
@@ -806,16 +806,16 @@ export const agentCommand = {
|
|
|
806
806
|
subcommands: [spawnCommand, listCommand, statusCommand, stopCommand, metricsCommand, poolCommand, healthCommand, logsCommand],
|
|
807
807
|
options: [],
|
|
808
808
|
examples: [
|
|
809
|
-
{ command: '
|
|
810
|
-
{ command: '
|
|
811
|
-
{ command: '
|
|
809
|
+
{ command: 'flo agent spawn -t coder', description: 'Spawn a coder agent' },
|
|
810
|
+
{ command: 'flo agent list', description: 'List all agents' },
|
|
811
|
+
{ command: 'flo agent status agent-001', description: 'Show agent status' }
|
|
812
812
|
],
|
|
813
813
|
action: async (ctx) => {
|
|
814
814
|
// Show help if no subcommand
|
|
815
815
|
output.writeln();
|
|
816
816
|
output.writeln(output.bold('Agent Management Commands'));
|
|
817
817
|
output.writeln();
|
|
818
|
-
output.writeln('Usage:
|
|
818
|
+
output.writeln('Usage: flo agent <subcommand> [options]');
|
|
819
819
|
output.writeln();
|
|
820
820
|
output.writeln('Subcommands:');
|
|
821
821
|
output.printList([
|
|
@@ -826,7 +826,7 @@ export const agentCommand = {
|
|
|
826
826
|
`${output.highlight('metrics')} - Show agent metrics`
|
|
827
827
|
]);
|
|
828
828
|
output.writeln();
|
|
829
|
-
output.writeln('Run "
|
|
829
|
+
output.writeln('Run "flo agent <subcommand> --help" for subcommand help');
|
|
830
830
|
return { success: true };
|
|
831
831
|
}
|
|
832
832
|
};
|
|
@@ -80,10 +80,10 @@ const diffCommand = {
|
|
|
80
80
|
},
|
|
81
81
|
],
|
|
82
82
|
examples: [
|
|
83
|
-
{ command: '
|
|
84
|
-
{ command: '
|
|
85
|
-
{ command: '
|
|
86
|
-
{ command: '
|
|
83
|
+
{ command: 'flo analyze diff --risk', description: 'Analyze current diff with risk assessment' },
|
|
84
|
+
{ command: 'flo analyze diff HEAD~1 --classify', description: 'Classify changes from last commit' },
|
|
85
|
+
{ command: 'flo analyze diff main..feature --format json', description: 'Compare branches with JSON output' },
|
|
86
|
+
{ command: 'flo analyze diff --reviewers', description: 'Get recommended reviewers for changes' },
|
|
87
87
|
],
|
|
88
88
|
action: async (ctx) => {
|
|
89
89
|
const ref = ctx.args[0] || 'HEAD';
|
|
@@ -248,8 +248,8 @@ const codeCommand = {
|
|
|
248
248
|
{ name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
249
249
|
],
|
|
250
250
|
examples: [
|
|
251
|
-
{ command: '
|
|
252
|
-
{ command: '
|
|
251
|
+
{ command: 'flo analyze code -p ./src', description: 'Analyze source directory' },
|
|
252
|
+
{ command: 'flo analyze code --type complexity', description: 'Run complexity analysis' },
|
|
253
253
|
],
|
|
254
254
|
action: async (ctx) => {
|
|
255
255
|
const path = ctx.flags.path || '.';
|
|
@@ -361,10 +361,10 @@ const astCommand = {
|
|
|
361
361
|
},
|
|
362
362
|
],
|
|
363
363
|
examples: [
|
|
364
|
-
{ command: '
|
|
365
|
-
{ command: '
|
|
366
|
-
{ command: '
|
|
367
|
-
{ command: '
|
|
364
|
+
{ command: 'flo analyze ast src/', description: 'Analyze all files in src/' },
|
|
365
|
+
{ command: 'flo analyze ast src/index.ts --complexity', description: 'Analyze with complexity' },
|
|
366
|
+
{ command: 'flo analyze ast . --format json', description: 'JSON output' },
|
|
367
|
+
{ command: 'flo analyze ast src/ --symbols', description: 'Extract symbols' },
|
|
368
368
|
],
|
|
369
369
|
action: async (ctx) => {
|
|
370
370
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -580,8 +580,8 @@ const complexityAstCommand = {
|
|
|
580
580
|
},
|
|
581
581
|
],
|
|
582
582
|
examples: [
|
|
583
|
-
{ command: '
|
|
584
|
-
{ command: '
|
|
583
|
+
{ command: 'flo analyze complexity src/', description: 'Analyze complexity' },
|
|
584
|
+
{ command: 'flo analyze complexity src/ --threshold 15', description: 'Flag high complexity' },
|
|
585
585
|
],
|
|
586
586
|
action: async (ctx) => {
|
|
587
587
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -732,9 +732,9 @@ const symbolsCommand = {
|
|
|
732
732
|
},
|
|
733
733
|
],
|
|
734
734
|
examples: [
|
|
735
|
-
{ command: '
|
|
736
|
-
{ command: '
|
|
737
|
-
{ command: '
|
|
735
|
+
{ command: 'flo analyze symbols src/', description: 'Extract all symbols' },
|
|
736
|
+
{ command: 'flo analyze symbols src/ --type function', description: 'Only functions' },
|
|
737
|
+
{ command: 'flo analyze symbols src/ --format json', description: 'JSON output' },
|
|
738
738
|
],
|
|
739
739
|
action: async (ctx) => {
|
|
740
740
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -872,8 +872,8 @@ const importsCommand = {
|
|
|
872
872
|
},
|
|
873
873
|
],
|
|
874
874
|
examples: [
|
|
875
|
-
{ command: '
|
|
876
|
-
{ command: '
|
|
875
|
+
{ command: 'flo analyze imports src/', description: 'Analyze all imports' },
|
|
876
|
+
{ command: 'flo analyze imports src/ --external', description: 'Only npm packages' },
|
|
877
877
|
],
|
|
878
878
|
action: async (ctx) => {
|
|
879
879
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -1101,8 +1101,8 @@ const depsCommand = {
|
|
|
1101
1101
|
{ name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
1102
1102
|
],
|
|
1103
1103
|
examples: [
|
|
1104
|
-
{ command: '
|
|
1105
|
-
{ command: '
|
|
1104
|
+
{ command: 'flo analyze deps --outdated', description: 'Show outdated dependencies' },
|
|
1105
|
+
{ command: 'flo analyze deps --security', description: 'Check for vulnerabilities' },
|
|
1106
1106
|
],
|
|
1107
1107
|
action: async (ctx) => {
|
|
1108
1108
|
const showOutdated = ctx.flags.outdated;
|
|
@@ -1158,9 +1158,9 @@ const boundariesCommand = {
|
|
|
1158
1158
|
},
|
|
1159
1159
|
],
|
|
1160
1160
|
examples: [
|
|
1161
|
-
{ command: '
|
|
1162
|
-
{ command: '
|
|
1163
|
-
{ command: '
|
|
1161
|
+
{ command: 'flo analyze boundaries src/', description: 'Find code boundaries in src/' },
|
|
1162
|
+
{ command: 'flo analyze boundaries -p 3 src/', description: 'Find 3 partitions' },
|
|
1163
|
+
{ command: 'flo analyze boundaries -f dot -o graph.dot src/', description: 'Export to DOT format' },
|
|
1164
1164
|
],
|
|
1165
1165
|
action: async (ctx) => {
|
|
1166
1166
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1310,9 +1310,9 @@ const modulesCommand = {
|
|
|
1310
1310
|
},
|
|
1311
1311
|
],
|
|
1312
1312
|
examples: [
|
|
1313
|
-
{ command: '
|
|
1314
|
-
{ command: '
|
|
1315
|
-
{ command: '
|
|
1313
|
+
{ command: 'flo analyze modules src/', description: 'Detect module communities' },
|
|
1314
|
+
{ command: 'flo analyze modules -f dot -o modules.dot src/', description: 'Export colored DOT graph' },
|
|
1315
|
+
{ command: 'flo analyze modules -m 3 src/', description: 'Only show communities with 3+ files' },
|
|
1316
1316
|
],
|
|
1317
1317
|
action: async (ctx) => {
|
|
1318
1318
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1458,9 +1458,9 @@ const dependenciesCommand = {
|
|
|
1458
1458
|
},
|
|
1459
1459
|
],
|
|
1460
1460
|
examples: [
|
|
1461
|
-
{ command: '
|
|
1462
|
-
{ command: '
|
|
1463
|
-
{ command: '
|
|
1461
|
+
{ command: 'flo analyze dependencies src/', description: 'Build dependency graph' },
|
|
1462
|
+
{ command: 'flo analyze dependencies -f dot -o deps.dot src/', description: 'Export to DOT' },
|
|
1463
|
+
{ command: 'flo analyze dependencies -i .ts,.tsx src/', description: 'Only TypeScript files' },
|
|
1464
1464
|
],
|
|
1465
1465
|
action: async (ctx) => {
|
|
1466
1466
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1622,8 +1622,8 @@ const circularCommand = {
|
|
|
1622
1622
|
},
|
|
1623
1623
|
],
|
|
1624
1624
|
examples: [
|
|
1625
|
-
{ command: '
|
|
1626
|
-
{ command: '
|
|
1625
|
+
{ command: 'flo analyze circular src/', description: 'Find circular dependencies' },
|
|
1626
|
+
{ command: 'flo analyze circular -s high src/', description: 'Only high severity cycles' },
|
|
1627
1627
|
],
|
|
1628
1628
|
action: async (ctx) => {
|
|
1629
1629
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1765,16 +1765,16 @@ export const analyzeCommand = {
|
|
|
1765
1765
|
},
|
|
1766
1766
|
],
|
|
1767
1767
|
examples: [
|
|
1768
|
-
{ command: '
|
|
1769
|
-
{ command: '
|
|
1770
|
-
{ command: '
|
|
1771
|
-
{ command: '
|
|
1772
|
-
{ command: '
|
|
1773
|
-
{ command: '
|
|
1774
|
-
{ command: '
|
|
1775
|
-
{ command: '
|
|
1776
|
-
{ command: '
|
|
1777
|
-
{ command: '
|
|
1768
|
+
{ command: 'flo analyze ast src/', description: 'Analyze code with AST parsing' },
|
|
1769
|
+
{ command: 'flo analyze complexity src/ --threshold 15', description: 'Find high-complexity files' },
|
|
1770
|
+
{ command: 'flo analyze symbols src/ --type function', description: 'Extract all functions' },
|
|
1771
|
+
{ command: 'flo analyze imports src/ --external', description: 'List npm dependencies' },
|
|
1772
|
+
{ command: 'flo analyze diff --risk', description: 'Analyze diff with risk assessment' },
|
|
1773
|
+
{ command: 'flo analyze boundaries src/', description: 'Find code boundaries using MinCut' },
|
|
1774
|
+
{ command: 'flo analyze modules src/', description: 'Detect module communities with Louvain' },
|
|
1775
|
+
{ command: 'flo analyze dependencies src/ --format dot', description: 'Export dependency graph as DOT' },
|
|
1776
|
+
{ command: 'flo analyze circular src/', description: 'Find circular dependencies' },
|
|
1777
|
+
{ command: 'flo analyze deps --security', description: 'Check dependency vulnerabilities' },
|
|
1778
1778
|
],
|
|
1779
1779
|
action: async (ctx) => {
|
|
1780
1780
|
// If no subcommand, show help
|
|
@@ -1798,24 +1798,24 @@ export const analyzeCommand = {
|
|
|
1798
1798
|
output.writeln();
|
|
1799
1799
|
output.writeln(output.bold('AST Analysis Examples:'));
|
|
1800
1800
|
output.writeln();
|
|
1801
|
-
output.writeln(` ${output.dim('
|
|
1802
|
-
output.writeln(` ${output.dim('
|
|
1803
|
-
output.writeln(` ${output.dim('
|
|
1804
|
-
output.writeln(` ${output.dim('
|
|
1805
|
-
output.writeln(` ${output.dim('
|
|
1801
|
+
output.writeln(` ${output.dim('flo analyze ast src/')} # Full AST analysis`);
|
|
1802
|
+
output.writeln(` ${output.dim('flo analyze ast src/index.ts -c')} # Include complexity`);
|
|
1803
|
+
output.writeln(` ${output.dim('flo analyze complexity src/ -t 15')} # Flag high complexity`);
|
|
1804
|
+
output.writeln(` ${output.dim('flo analyze symbols src/ --type fn')} # Extract functions`);
|
|
1805
|
+
output.writeln(` ${output.dim('flo analyze imports src/ --external')} # Only npm imports`);
|
|
1806
1806
|
output.writeln();
|
|
1807
1807
|
output.writeln(output.bold('Graph Analysis Examples:'));
|
|
1808
1808
|
output.writeln();
|
|
1809
|
-
output.writeln(` ${output.dim('
|
|
1810
|
-
output.writeln(` ${output.dim('
|
|
1811
|
-
output.writeln(` ${output.dim('
|
|
1812
|
-
output.writeln(` ${output.dim('
|
|
1809
|
+
output.writeln(` ${output.dim('flo analyze boundaries src/')} # Find natural code boundaries`);
|
|
1810
|
+
output.writeln(` ${output.dim('flo analyze modules src/')} # Detect module communities`);
|
|
1811
|
+
output.writeln(` ${output.dim('flo analyze dependencies -f dot src/')} # Export to DOT format`);
|
|
1812
|
+
output.writeln(` ${output.dim('flo analyze circular src/')} # Find circular deps`);
|
|
1813
1813
|
output.writeln();
|
|
1814
1814
|
output.writeln(output.bold('Diff Analysis Examples:'));
|
|
1815
1815
|
output.writeln();
|
|
1816
|
-
output.writeln(` ${output.dim('
|
|
1817
|
-
output.writeln(` ${output.dim('
|
|
1818
|
-
output.writeln(` ${output.dim('
|
|
1816
|
+
output.writeln(` ${output.dim('flo analyze diff --risk')} # Risk assessment`);
|
|
1817
|
+
output.writeln(` ${output.dim('flo analyze diff HEAD~1 --classify')} # Classify changes`);
|
|
1818
|
+
output.writeln(` ${output.dim('flo analyze diff main..feature')} # Compare branches`);
|
|
1819
1819
|
output.writeln();
|
|
1820
1820
|
return { success: true };
|
|
1821
1821
|
},
|
|
@@ -22,9 +22,9 @@ const pretrainCommand = {
|
|
|
22
22
|
{ name: 'verbose', short: 'v', type: 'boolean', description: 'Verbose output', default: 'false' },
|
|
23
23
|
],
|
|
24
24
|
examples: [
|
|
25
|
-
{ command: '
|
|
26
|
-
{ command: '
|
|
27
|
-
{ command: '
|
|
25
|
+
{ command: 'flo benchmark pretrain', description: 'Run pre-training benchmarks' },
|
|
26
|
+
{ command: 'flo benchmark pretrain -i 500 --save results.json', description: 'Extended benchmark with results saved' },
|
|
27
|
+
{ command: 'flo benchmark pretrain -o json', description: 'Output results as JSON' },
|
|
28
28
|
],
|
|
29
29
|
action: async (ctx) => {
|
|
30
30
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -85,8 +85,8 @@ const neuralCommand = {
|
|
|
85
85
|
{ name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
86
86
|
],
|
|
87
87
|
examples: [
|
|
88
|
-
{ command: '
|
|
89
|
-
{ command: '
|
|
88
|
+
{ command: 'flo benchmark neural', description: 'Run neural benchmarks' },
|
|
89
|
+
{ command: 'flo benchmark neural -d 768 -n 5000', description: 'Higher dimension, more vectors' },
|
|
90
90
|
],
|
|
91
91
|
action: async (ctx) => {
|
|
92
92
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -243,7 +243,7 @@ const memoryCommand = {
|
|
|
243
243
|
{ name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
244
244
|
],
|
|
245
245
|
examples: [
|
|
246
|
-
{ command: '
|
|
246
|
+
{ command: 'flo benchmark memory', description: 'Run memory benchmarks' },
|
|
247
247
|
],
|
|
248
248
|
action: async (ctx) => {
|
|
249
249
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -358,8 +358,8 @@ const allCommand = {
|
|
|
358
358
|
{ name: 'save', short: 's', type: 'string', description: 'Save results to file' },
|
|
359
359
|
],
|
|
360
360
|
examples: [
|
|
361
|
-
{ command: '
|
|
362
|
-
{ command: '
|
|
361
|
+
{ command: 'flo benchmark all', description: 'Run all benchmarks' },
|
|
362
|
+
{ command: 'flo benchmark all --save full-results.json', description: 'Run all and save results' },
|
|
363
363
|
],
|
|
364
364
|
action: async (ctx) => {
|
|
365
365
|
output.writeln();
|
|
@@ -425,10 +425,10 @@ export const benchmarkCommand = {
|
|
|
425
425
|
allCommand,
|
|
426
426
|
],
|
|
427
427
|
examples: [
|
|
428
|
-
{ command: '
|
|
429
|
-
{ command: '
|
|
430
|
-
{ command: '
|
|
431
|
-
{ command: '
|
|
428
|
+
{ command: 'flo benchmark pretrain', description: 'Benchmark pre-training system' },
|
|
429
|
+
{ command: 'flo benchmark neural', description: 'Benchmark neural operations' },
|
|
430
|
+
{ command: 'flo benchmark memory', description: 'Benchmark memory operations' },
|
|
431
|
+
{ command: 'flo benchmark all', description: 'Run all benchmarks' },
|
|
432
432
|
],
|
|
433
433
|
action: async (_ctx) => {
|
|
434
434
|
output.writeln();
|
|
@@ -442,8 +442,8 @@ export const benchmarkCommand = {
|
|
|
442
442
|
output.writeln(` ${output.highlight('all')} - Run all benchmark suites`);
|
|
443
443
|
output.writeln();
|
|
444
444
|
output.writeln('Examples:');
|
|
445
|
-
output.writeln('
|
|
446
|
-
output.writeln('
|
|
445
|
+
output.writeln(' flo benchmark pretrain -i 200');
|
|
446
|
+
output.writeln(' flo benchmark all --save results.json');
|
|
447
447
|
output.writeln();
|
|
448
448
|
return { success: true, message: 'Use a subcommand to run benchmarks' };
|
|
449
449
|
},
|
|
@@ -16,8 +16,8 @@ const listCommand = {
|
|
|
16
16
|
{ name: 'resource', type: 'string', description: 'Filter by resource' },
|
|
17
17
|
],
|
|
18
18
|
examples: [
|
|
19
|
-
{ command: '
|
|
20
|
-
{ command: '
|
|
19
|
+
{ command: 'flo claims list', description: 'List all claims' },
|
|
20
|
+
{ command: 'flo claims list -u user123', description: 'List user claims' },
|
|
21
21
|
],
|
|
22
22
|
action: async (ctx) => {
|
|
23
23
|
output.writeln();
|
|
@@ -54,8 +54,8 @@ const checkCommand = {
|
|
|
54
54
|
{ name: 'resource', short: 'r', type: 'string', description: 'Resource context' },
|
|
55
55
|
],
|
|
56
56
|
examples: [
|
|
57
|
-
{ command: '
|
|
58
|
-
{ command: '
|
|
57
|
+
{ command: 'flo claims check -c swarm:create', description: 'Check swarm creation permission' },
|
|
58
|
+
{ command: 'flo claims check -c admin:delete -u user123', description: 'Check user permission' },
|
|
59
59
|
],
|
|
60
60
|
action: async (ctx) => {
|
|
61
61
|
const claim = ctx.flags.claim;
|
|
@@ -186,8 +186,8 @@ const grantCommand = {
|
|
|
186
186
|
{ name: 'expires', short: 'e', type: 'string', description: 'Expiration time (e.g., 24h, 7d)' },
|
|
187
187
|
],
|
|
188
188
|
examples: [
|
|
189
|
-
{ command: '
|
|
190
|
-
{ command: '
|
|
189
|
+
{ command: 'flo claims grant -c swarm:create -u user123', description: 'Grant to user' },
|
|
190
|
+
{ command: 'flo claims grant -c agent:spawn -r developer', description: 'Grant to role' },
|
|
191
191
|
],
|
|
192
192
|
action: async (ctx) => {
|
|
193
193
|
const claim = ctx.flags.claim;
|
|
@@ -227,8 +227,8 @@ const revokeCommand = {
|
|
|
227
227
|
{ name: 'role', short: 'r', type: 'string', description: 'Role name' },
|
|
228
228
|
],
|
|
229
229
|
examples: [
|
|
230
|
-
{ command: '
|
|
231
|
-
{ command: '
|
|
230
|
+
{ command: 'flo claims revoke -c swarm:delete -u user123', description: 'Revoke from user' },
|
|
231
|
+
{ command: 'flo claims revoke -c admin:* -r guest', description: 'Revoke from role' },
|
|
232
232
|
],
|
|
233
233
|
action: async (ctx) => {
|
|
234
234
|
const claim = ctx.flags.claim;
|
|
@@ -255,8 +255,8 @@ const rolesCommand = {
|
|
|
255
255
|
{ name: 'name', short: 'n', type: 'string', description: 'Role name' },
|
|
256
256
|
],
|
|
257
257
|
examples: [
|
|
258
|
-
{ command: '
|
|
259
|
-
{ command: '
|
|
258
|
+
{ command: 'flo claims roles', description: 'List all roles' },
|
|
259
|
+
{ command: 'flo claims roles -a show -n admin', description: 'Show role details' },
|
|
260
260
|
],
|
|
261
261
|
action: async (ctx) => {
|
|
262
262
|
const action = ctx.flags.action || 'list';
|
|
@@ -308,8 +308,8 @@ const policiesCommand = {
|
|
|
308
308
|
{ name: 'name', short: 'n', type: 'string', description: 'Policy name' },
|
|
309
309
|
],
|
|
310
310
|
examples: [
|
|
311
|
-
{ command: '
|
|
312
|
-
{ command: '
|
|
311
|
+
{ command: 'flo claims policies', description: 'List policies' },
|
|
312
|
+
{ command: 'flo claims policies -a create -n rate-limit', description: 'Create policy' },
|
|
313
313
|
],
|
|
314
314
|
action: async (ctx) => {
|
|
315
315
|
output.writeln();
|
|
@@ -339,9 +339,9 @@ export const claimsCommand = {
|
|
|
339
339
|
description: 'Claims-based authorization, permissions, and access control',
|
|
340
340
|
subcommands: [listCommand, checkCommand, grantCommand, revokeCommand, rolesCommand, policiesCommand],
|
|
341
341
|
examples: [
|
|
342
|
-
{ command: '
|
|
343
|
-
{ command: '
|
|
344
|
-
{ command: '
|
|
342
|
+
{ command: 'flo claims list', description: 'List all claims' },
|
|
343
|
+
{ command: 'flo claims check -c swarm:create', description: 'Check permission' },
|
|
344
|
+
{ command: 'flo claims grant -c agent:spawn -r developer', description: 'Grant claim' },
|
|
345
345
|
],
|
|
346
346
|
action: async () => {
|
|
347
347
|
output.writeln();
|
|
@@ -26,8 +26,8 @@ const HIVE_MIND_SUBCOMMANDS = ['init', 'spawn', 'status', 'task', 'join', 'leave
|
|
|
26
26
|
const HOOKS_SUBCOMMANDS = ['pre-edit', 'post-edit', 'pre-command', 'post-command', 'pre-task', 'post-task', 'route', 'explain', 'pretrain', 'build-agents', 'metrics', 'transfer', 'list', 'intelligence'];
|
|
27
27
|
// Generate bash completion script
|
|
28
28
|
function generateBashCompletion() {
|
|
29
|
-
return `#
|
|
30
|
-
# Generated by
|
|
29
|
+
return `# flo bash completion
|
|
30
|
+
# Generated by flo completions bash
|
|
31
31
|
# Add this to ~/.bashrc or ~/.bash_completion
|
|
32
32
|
|
|
33
33
|
_claude_flow_completions() {
|
|
@@ -117,16 +117,16 @@ _claude_flow_completions() {
|
|
|
117
117
|
fi
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
complete -F _claude_flow_completions
|
|
120
|
+
complete -F _claude_flow_completions flo
|
|
121
121
|
complete -F _claude_flow_completions npx\\ moflo
|
|
122
122
|
`;
|
|
123
123
|
}
|
|
124
124
|
// Generate zsh completion script
|
|
125
125
|
function generateZshCompletion() {
|
|
126
|
-
return `#compdef
|
|
127
|
-
#
|
|
128
|
-
# Generated by
|
|
129
|
-
# Add to ~/.zfunc/
|
|
126
|
+
return `#compdef flo
|
|
127
|
+
# flo zsh completion
|
|
128
|
+
# Generated by flo completions zsh
|
|
129
|
+
# Add to ~/.zfunc/_flo or ~/.zsh/completions/_flo
|
|
130
130
|
|
|
131
131
|
_claude_flow() {
|
|
132
132
|
local -a commands
|
|
@@ -165,7 +165,7 @@ _claude_flow() {
|
|
|
165
165
|
|
|
166
166
|
case $state in
|
|
167
167
|
command)
|
|
168
|
-
_describe -t commands '
|
|
168
|
+
_describe -t commands 'flo commands' commands
|
|
169
169
|
;;
|
|
170
170
|
subcommand)
|
|
171
171
|
case $words[2] in
|
|
@@ -343,66 +343,66 @@ _claude_flow "$@"
|
|
|
343
343
|
}
|
|
344
344
|
// Generate fish completion script
|
|
345
345
|
function generateFishCompletion() {
|
|
346
|
-
return `#
|
|
347
|
-
# Generated by
|
|
348
|
-
# Save to ~/.config/fish/completions/
|
|
346
|
+
return `# flo fish completion
|
|
347
|
+
# Generated by flo completions fish
|
|
348
|
+
# Save to ~/.config/fish/completions/flo.fish
|
|
349
349
|
|
|
350
350
|
# Disable file completion by default
|
|
351
|
-
complete -c
|
|
351
|
+
complete -c flo -f
|
|
352
352
|
|
|
353
353
|
# Top-level commands
|
|
354
|
-
${TOP_LEVEL_COMMANDS.map(cmd => `complete -c
|
|
354
|
+
${TOP_LEVEL_COMMANDS.map(cmd => `complete -c flo -n "__fish_use_subcommand" -a "${cmd}"`).join('\n')}
|
|
355
355
|
|
|
356
356
|
# Swarm subcommands
|
|
357
|
-
${SWARM_SUBCOMMANDS.map(sub => `complete -c
|
|
357
|
+
${SWARM_SUBCOMMANDS.map(sub => `complete -c flo -n "__fish_seen_subcommand_from swarm" -a "${sub}"`).join('\n')}
|
|
358
358
|
|
|
359
359
|
# Agent subcommands
|
|
360
|
-
${AGENT_SUBCOMMANDS.map(sub => `complete -c
|
|
360
|
+
${AGENT_SUBCOMMANDS.map(sub => `complete -c flo -n "__fish_seen_subcommand_from agent" -a "${sub}"`).join('\n')}
|
|
361
361
|
|
|
362
362
|
# Task subcommands
|
|
363
|
-
${TASK_SUBCOMMANDS.map(sub => `complete -c
|
|
363
|
+
${TASK_SUBCOMMANDS.map(sub => `complete -c flo -n "__fish_seen_subcommand_from task" -a "${sub}"`).join('\n')}
|
|
364
364
|
|
|
365
365
|
# Memory subcommands
|
|
366
|
-
${MEMORY_SUBCOMMANDS.map(sub => `complete -c
|
|
366
|
+
${MEMORY_SUBCOMMANDS.map(sub => `complete -c flo -n "__fish_seen_subcommand_from memory" -a "${sub}"`).join('\n')}
|
|
367
367
|
|
|
368
368
|
# Hive-mind subcommands
|
|
369
|
-
${HIVE_MIND_SUBCOMMANDS.map(sub => `complete -c
|
|
369
|
+
${HIVE_MIND_SUBCOMMANDS.map(sub => `complete -c flo -n "__fish_seen_subcommand_from hive-mind hive" -a "${sub}"`).join('\n')}
|
|
370
370
|
|
|
371
371
|
# Hooks subcommands
|
|
372
|
-
${HOOKS_SUBCOMMANDS.map(sub => `complete -c
|
|
372
|
+
${HOOKS_SUBCOMMANDS.map(sub => `complete -c flo -n "__fish_seen_subcommand_from hooks" -a "${sub}"`).join('\n')}
|
|
373
373
|
|
|
374
374
|
# Neural subcommands
|
|
375
|
-
complete -c
|
|
375
|
+
complete -c flo -n "__fish_seen_subcommand_from neural" -a "train status patterns predict optimize"
|
|
376
376
|
|
|
377
377
|
# Security subcommands
|
|
378
|
-
complete -c
|
|
378
|
+
complete -c flo -n "__fish_seen_subcommand_from security" -a "scan cve threats audit secrets"
|
|
379
379
|
|
|
380
380
|
# Performance subcommands
|
|
381
|
-
complete -c
|
|
381
|
+
complete -c flo -n "__fish_seen_subcommand_from performance" -a "benchmark profile metrics optimize bottleneck"
|
|
382
382
|
|
|
383
383
|
# Plugins subcommands
|
|
384
|
-
complete -c
|
|
384
|
+
complete -c flo -n "__fish_seen_subcommand_from plugins" -a "list install uninstall toggle info create"
|
|
385
385
|
|
|
386
386
|
# Deployment subcommands
|
|
387
|
-
complete -c
|
|
387
|
+
complete -c flo -n "__fish_seen_subcommand_from deployment deploy" -a "deploy status rollback history environments logs"
|
|
388
388
|
|
|
389
389
|
# Claims subcommands
|
|
390
|
-
complete -c
|
|
390
|
+
complete -c flo -n "__fish_seen_subcommand_from claims" -a "list check grant revoke roles policies"
|
|
391
391
|
|
|
392
392
|
# Embeddings subcommands
|
|
393
|
-
complete -c
|
|
393
|
+
complete -c flo -n "__fish_seen_subcommand_from embeddings" -a "generate search compare collections index providers"
|
|
394
394
|
|
|
395
395
|
# Daemon subcommands
|
|
396
|
-
complete -c
|
|
396
|
+
complete -c flo -n "__fish_seen_subcommand_from daemon" -a "start stop status trigger enable"
|
|
397
397
|
|
|
398
398
|
# Providers subcommands
|
|
399
|
-
complete -c
|
|
399
|
+
complete -c flo -n "__fish_seen_subcommand_from providers" -a "list configure test models usage"
|
|
400
400
|
`;
|
|
401
401
|
}
|
|
402
402
|
// Generate PowerShell completion script
|
|
403
403
|
function generatePowerShellCompletion() {
|
|
404
|
-
return `#
|
|
405
|
-
# Generated by
|
|
404
|
+
return `# flo PowerShell completion
|
|
405
|
+
# Generated by flo completions powershell
|
|
406
406
|
# Add to $PROFILE or save to a separate file and dot-source it
|
|
407
407
|
|
|
408
408
|
$script:ClaudeFlowCommands = @(
|
|
@@ -429,7 +429,7 @@ $script:SubCommands = @{
|
|
|
429
429
|
'providers' = @('list', 'configure', 'test', 'models', 'usage')
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
-
Register-ArgumentCompleter -Native -CommandName
|
|
432
|
+
Register-ArgumentCompleter -Native -CommandName flo -ScriptBlock {
|
|
433
433
|
param($wordToComplete, $commandAst, $cursorPosition)
|
|
434
434
|
|
|
435
435
|
$tokens = $commandAst.ToString().Split(' ')
|
|
@@ -498,10 +498,10 @@ export const completionsCommand = {
|
|
|
498
498
|
subcommands: [bashCommand, zshCommand, fishCommand, powershellCommand],
|
|
499
499
|
options: [],
|
|
500
500
|
examples: [
|
|
501
|
-
{ command: '
|
|
502
|
-
{ command: '
|
|
503
|
-
{ command: '
|
|
504
|
-
{ command: '
|
|
501
|
+
{ command: 'flo completions bash > ~/.bash_completion.d/flo', description: 'Install bash completions' },
|
|
502
|
+
{ command: 'flo completions zsh > ~/.zfunc/_flo', description: 'Install zsh completions' },
|
|
503
|
+
{ command: 'flo completions fish > ~/.config/fish/completions/flo.fish', description: 'Install fish completions' },
|
|
504
|
+
{ command: 'flo completions powershell >> $PROFILE', description: 'Install PowerShell completions' }
|
|
505
505
|
],
|
|
506
506
|
action: async () => {
|
|
507
507
|
output.writeln();
|
|
@@ -520,19 +520,19 @@ export const completionsCommand = {
|
|
|
520
520
|
output.writeln('Installation:');
|
|
521
521
|
output.writeln();
|
|
522
522
|
output.writeln(output.bold('Bash:'));
|
|
523
|
-
output.writeln(output.dim('
|
|
524
|
-
output.writeln(output.dim(' source ~/.bash_completion.d/
|
|
523
|
+
output.writeln(output.dim(' flo completions bash > ~/.bash_completion.d/flo'));
|
|
524
|
+
output.writeln(output.dim(' source ~/.bash_completion.d/flo'));
|
|
525
525
|
output.writeln();
|
|
526
526
|
output.writeln(output.bold('Zsh:'));
|
|
527
527
|
output.writeln(output.dim(' mkdir -p ~/.zfunc'));
|
|
528
|
-
output.writeln(output.dim('
|
|
528
|
+
output.writeln(output.dim(' flo completions zsh > ~/.zfunc/_flo'));
|
|
529
529
|
output.writeln(output.dim(' # Add to ~/.zshrc: fpath=(~/.zfunc $fpath); autoload -Uz compinit && compinit'));
|
|
530
530
|
output.writeln();
|
|
531
531
|
output.writeln(output.bold('Fish:'));
|
|
532
|
-
output.writeln(output.dim('
|
|
532
|
+
output.writeln(output.dim(' flo completions fish > ~/.config/fish/completions/flo.fish'));
|
|
533
533
|
output.writeln();
|
|
534
534
|
output.writeln(output.bold('PowerShell:'));
|
|
535
|
-
output.writeln(output.dim('
|
|
535
|
+
output.writeln(output.dim(' flo completions powershell >> $PROFILE'));
|
|
536
536
|
return { success: true };
|
|
537
537
|
}
|
|
538
538
|
};
|