@sparkleideas/cli 3.1.0-alpha.20 → 3.1.0-alpha.22
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/appliance/rvfa-builder.js +4 -4
- package/dist/src/appliance/rvfa-format.d.ts +1 -1
- package/dist/src/appliance/rvfa-format.js +1 -1
- package/dist/src/appliance/rvfa-runner.js +8 -8
- package/dist/src/commands/agent.js +15 -15
- package/dist/src/commands/analyze.js +52 -52
- package/dist/src/commands/appliance-advanced.js +1 -1
- package/dist/src/commands/appliance.js +16 -16
- package/dist/src/commands/benchmark.js +16 -16
- package/dist/src/commands/categories.js +1 -1
- package/dist/src/commands/claims.js +17 -17
- package/dist/src/commands/completions.js +37 -37
- package/dist/src/commands/config.js +10 -10
- package/dist/src/commands/daemon.js +26 -26
- package/dist/src/commands/deployment.js +20 -20
- package/dist/src/commands/doctor.js +30 -30
- package/dist/src/commands/embeddings.js +51 -51
- package/dist/src/commands/guidance.js +23 -23
- package/dist/src/commands/hive-mind.js +21 -21
- package/dist/src/commands/hooks.js +114 -114
- package/dist/src/commands/init.js +41 -41
- package/dist/src/commands/issues.js +6 -6
- package/dist/src/commands/mcp.js +13 -13
- package/dist/src/commands/memory.js +35 -35
- package/dist/src/commands/migrate.js +13 -13
- package/dist/src/commands/neural.js +34 -34
- package/dist/src/commands/performance.js +13 -13
- package/dist/src/commands/plugins.js +26 -26
- package/dist/src/commands/process.js +36 -36
- package/dist/src/commands/progress.js +6 -6
- package/dist/src/commands/providers.js +13 -13
- package/dist/src/commands/route.js +26 -26
- package/dist/src/commands/ruvector/backup.js +9 -9
- package/dist/src/commands/ruvector/benchmark.js +4 -4
- package/dist/src/commands/ruvector/import.d.ts +3 -3
- package/dist/src/commands/ruvector/import.js +11 -11
- package/dist/src/commands/ruvector/index.js +9 -9
- package/dist/src/commands/ruvector/init.js +7 -7
- package/dist/src/commands/ruvector/migrate.js +5 -5
- package/dist/src/commands/ruvector/optimize.js +7 -7
- package/dist/src/commands/ruvector/setup.d.ts +3 -3
- package/dist/src/commands/ruvector/setup.js +9 -9
- package/dist/src/commands/ruvector/status.js +4 -4
- package/dist/src/commands/security.js +19 -19
- package/dist/src/commands/session.js +13 -13
- package/dist/src/commands/start.js +17 -17
- package/dist/src/commands/status.js +10 -10
- package/dist/src/commands/swarm.js +7 -7
- package/dist/src/commands/task.js +9 -9
- package/dist/src/commands/transfer-store.js +16 -16
- package/dist/src/commands/update.js +2 -2
- package/dist/src/commands/workflow.js +13 -13
- package/dist/src/config-adapter.js +5 -5
- package/dist/src/index.js +1 -1
- package/dist/src/init/claudemd-generator.js +1 -1
- package/dist/src/init/executor.js +47 -47
- package/dist/src/init/helpers-generator.js +14 -14
- package/dist/src/init/mcp-generator.js +6 -6
- package/dist/src/init/settings-generator.js +4 -4
- package/dist/src/init/statusline-generator.js +27 -27
- package/dist/src/init/types.d.ts +6 -6
- package/dist/src/init/types.js +3 -3
- package/dist/src/mcp-server.js +2 -2
- package/dist/src/mcp-tools/agent-tools.js +1 -1
- package/dist/src/mcp-tools/auto-install.js +5 -5
- package/dist/src/mcp-tools/claims-tools.js +1 -1
- package/dist/src/mcp-tools/config-tools.js +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +1 -1
- package/dist/src/mcp-tools/daa-tools.js +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +1 -1
- package/dist/src/mcp-tools/github-tools.js +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +3 -3
- package/dist/src/mcp-tools/hooks-tools.js +2 -2
- package/dist/src/mcp-tools/memory-tools.js +1 -1
- package/dist/src/mcp-tools/neural-tools.js +7 -7
- package/dist/src/mcp-tools/performance-tools.js +1 -1
- package/dist/src/mcp-tools/progress-tools.js +1 -1
- package/dist/src/mcp-tools/security-tools.js +2 -2
- package/dist/src/mcp-tools/session-tools.js +1 -1
- package/dist/src/mcp-tools/system-tools.js +2 -2
- package/dist/src/mcp-tools/task-tools.js +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +1 -1
- package/dist/src/memory/intelligence.js +5 -5
- package/dist/src/memory/memory-bridge.d.ts +4 -4
- package/dist/src/memory/memory-bridge.js +17 -17
- package/dist/src/memory/memory-initializer.js +11 -11
- package/dist/src/plugins/manager.js +10 -10
- package/dist/src/plugins/store/discovery.js +1 -1
- package/dist/src/plugins/tests/demo-plugin-store.js +6 -6
- package/dist/src/ruvector/enhanced-model-router.js +3 -3
- package/dist/src/services/agentic-flow-bridge.d.ts +11 -11
- package/dist/src/services/agentic-flow-bridge.js +11 -11
- package/dist/src/services/claim-service.js +1 -1
- package/dist/src/services/container-worker-pool.js +4 -4
- package/dist/src/services/headless-worker-executor.js +2 -2
- package/dist/src/services/worker-daemon.js +14 -14
- package/dist/src/services/worker-queue.js +1 -1
- package/dist/src/suggest.js +1 -1
- package/dist/src/transfer/models/seraphine.js +1 -1
- package/dist/src/transfer/serialization/cfp.js +1 -1
- package/dist/src/transfer/store/discovery.js +1 -1
- package/dist/src/transfer/store/registry.js +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/update/executor.js +1 -1
- package/dist/src/update/rate-limiter.js +1 -1
- package/dist/src/update/validator.js +1 -1
- package/package.json +1 -1
|
@@ -75,7 +75,7 @@ export class RvfaBuilder {
|
|
|
75
75
|
const stages = [
|
|
76
76
|
{ id: 'kernel', raw: this.buildKernelSection(), label: 'Kernel (Alpine rootfs)' },
|
|
77
77
|
{ id: 'runtime', raw: this.buildRuntimeSection(), label: 'Runtime (Node.js + Claude Code)' },
|
|
78
|
-
{ id: '
|
|
78
|
+
{ id: 'ruflo', raw: this.buildRufloSection(), label: 'Ruflo CLI' },
|
|
79
79
|
{ id: 'models', raw: this.buildModelsSection(), label: `Models (${this.opts.profile})` },
|
|
80
80
|
{ id: 'data', raw: this.buildDataSection(), label: 'Data (AgentDB)' },
|
|
81
81
|
{ id: 'verify', raw: this.buildVerifySection(), label: 'Verify (test suite)' },
|
|
@@ -140,15 +140,15 @@ export class RvfaBuilder {
|
|
|
140
140
|
buildRufloSection() {
|
|
141
141
|
let packageMeta = null;
|
|
142
142
|
try {
|
|
143
|
-
const raw = execSync('npm pack
|
|
143
|
+
const raw = execSync('npm pack ruflo@latest --dry-run --json 2>/dev/null', { encoding: 'utf-8', timeout: 15_000 });
|
|
144
144
|
const parsed = JSON.parse(raw);
|
|
145
145
|
if (Array.isArray(parsed) && parsed.length > 0)
|
|
146
146
|
packageMeta = parsed[0];
|
|
147
147
|
}
|
|
148
148
|
catch { /* manifest-only fallback */ }
|
|
149
149
|
return jsonBuf({
|
|
150
|
-
type: '
|
|
151
|
-
package: packageMeta ?? { name: '
|
|
150
|
+
type: 'ruflo', version: this.opts.rufloVersion,
|
|
151
|
+
package: packageMeta ?? { name: 'ruflo', version: this.opts.rufloVersion },
|
|
152
152
|
commands: RUFLO_COMMANDS, commandCount: RUFLO_COMMANDS.length,
|
|
153
153
|
agents: AGENT_TYPES, agentCount: AGENT_TYPES.length,
|
|
154
154
|
hooks: { count: HOOK_TYPES.length, types: HOOK_TYPES },
|
|
@@ -56,7 +56,7 @@ export declare class RvfaWriter {
|
|
|
56
56
|
/**
|
|
57
57
|
* Add a section to the appliance image.
|
|
58
58
|
*
|
|
59
|
-
* @param id Section identifier (e.g. 'kernel', 'runtime', '
|
|
59
|
+
* @param id Section identifier (e.g. 'kernel', 'runtime', 'ruflo').
|
|
60
60
|
* @param data Raw (uncompressed) section payload.
|
|
61
61
|
* @param options Optional compression and MIME type overrides.
|
|
62
62
|
*/
|
|
@@ -136,7 +136,7 @@ export class RvfaWriter {
|
|
|
136
136
|
/**
|
|
137
137
|
* Add a section to the appliance image.
|
|
138
138
|
*
|
|
139
|
-
* @param id Section identifier (e.g. 'kernel', 'runtime', '
|
|
139
|
+
* @param id Section identifier (e.g. 'kernel', 'runtime', 'ruflo').
|
|
140
140
|
* @param data Raw (uncompressed) section payload.
|
|
141
141
|
* @param options Optional compression and MIME type overrides.
|
|
142
142
|
*/
|
|
@@ -89,11 +89,11 @@ export class RvfaRunner {
|
|
|
89
89
|
const workDir = join(tmpdir(), `rvfa-${this.header.name}-${Date.now()}`);
|
|
90
90
|
try {
|
|
91
91
|
await mkdir(workDir, { recursive: true });
|
|
92
|
-
const
|
|
93
|
-
if (
|
|
94
|
-
return fail('RVFA appliance does not contain a "
|
|
92
|
+
const ruflo = tryExtract(this.reader, 'ruflo');
|
|
93
|
+
if (!ruflo)
|
|
94
|
+
return fail('RVFA appliance does not contain a "ruflo" section');
|
|
95
95
|
const entryFile = join(workDir, 'ruflo-bundle.js');
|
|
96
|
-
await writeFile(entryFile,
|
|
96
|
+
await writeFile(entryFile, ruflo);
|
|
97
97
|
const env = {
|
|
98
98
|
...this.header.boot.env,
|
|
99
99
|
RVFA_APPLIANCE_NAME: this.header.name,
|
|
@@ -132,10 +132,10 @@ export class RvfaRunner {
|
|
|
132
132
|
const workDir = join(tmpdir(), `rvfa-container-${Date.now()}`);
|
|
133
133
|
try {
|
|
134
134
|
await mkdir(workDir, { recursive: true });
|
|
135
|
-
const
|
|
136
|
-
if (
|
|
137
|
-
return fail('RVFA appliance does not contain a "
|
|
138
|
-
await writeFile(join(workDir, 'ruflo-bundle.js'),
|
|
135
|
+
const ruflo = tryExtract(this.reader, 'ruflo');
|
|
136
|
+
if (!ruflo)
|
|
137
|
+
return fail('RVFA appliance does not contain a "ruflo" section');
|
|
138
|
+
await writeFile(join(workDir, 'ruflo-bundle.js'), ruflo);
|
|
139
139
|
const data = tryExtract(this.reader, 'data');
|
|
140
140
|
if (data)
|
|
141
141
|
await writeFile(join(workDir, 'data.bin'), data);
|
|
@@ -73,8 +73,8 @@ const spawnCommand = {
|
|
|
73
73
|
}
|
|
74
74
|
],
|
|
75
75
|
examples: [
|
|
76
|
-
{ command: '
|
|
77
|
-
{ command: '
|
|
76
|
+
{ command: 'claude-flow agent spawn --type coder --name bot-1', description: 'Spawn a coder agent' },
|
|
77
|
+
{ command: 'claude-flow agent spawn -t researcher --task "Research React 19"', description: 'Spawn researcher with task' }
|
|
78
78
|
],
|
|
79
79
|
action: async (ctx) => {
|
|
80
80
|
let agentType = ctx.flags.type;
|
|
@@ -478,8 +478,8 @@ const poolCommand = {
|
|
|
478
478
|
}
|
|
479
479
|
],
|
|
480
480
|
examples: [
|
|
481
|
-
{ command: '
|
|
482
|
-
{ command: '
|
|
481
|
+
{ command: 'claude-flow agent pool --size 5', description: 'Set pool size' },
|
|
482
|
+
{ command: 'claude-flow agent pool --min 2 --max 15', description: 'Configure auto-scaling' }
|
|
483
483
|
],
|
|
484
484
|
action: async (ctx) => {
|
|
485
485
|
try {
|
|
@@ -555,8 +555,8 @@ const healthCommand = {
|
|
|
555
555
|
}
|
|
556
556
|
],
|
|
557
557
|
examples: [
|
|
558
|
-
{ command: '
|
|
559
|
-
{ command: '
|
|
558
|
+
{ command: 'claude-flow agent health', description: 'Show all agents health' },
|
|
559
|
+
{ command: 'claude-flow agent health -i agent-001 -d', description: 'Detailed health for specific agent' }
|
|
560
560
|
],
|
|
561
561
|
action: async (ctx) => {
|
|
562
562
|
const agentId = ctx.args[0] || ctx.flags.id;
|
|
@@ -678,9 +678,9 @@ const logsCommand = {
|
|
|
678
678
|
}
|
|
679
679
|
],
|
|
680
680
|
examples: [
|
|
681
|
-
{ command: '
|
|
682
|
-
{ command: '
|
|
683
|
-
{ command: '
|
|
681
|
+
{ command: 'claude-flow agent logs -i agent-001', description: 'Show agent logs' },
|
|
682
|
+
{ command: 'claude-flow agent logs -i agent-001 -f', description: 'Follow agent logs' },
|
|
683
|
+
{ command: 'claude-flow agent logs -l error --since 1h', description: 'Show errors from last hour' }
|
|
684
684
|
],
|
|
685
685
|
action: async (ctx) => {
|
|
686
686
|
const agentId = ctx.args[0] || ctx.flags.id;
|
|
@@ -760,16 +760,16 @@ export const agentCommand = {
|
|
|
760
760
|
subcommands: [spawnCommand, listCommand, statusCommand, stopCommand, metricsCommand, poolCommand, healthCommand, logsCommand],
|
|
761
761
|
options: [],
|
|
762
762
|
examples: [
|
|
763
|
-
{ command: '
|
|
764
|
-
{ command: '
|
|
765
|
-
{ command: '
|
|
763
|
+
{ command: 'claude-flow agent spawn -t coder', description: 'Spawn a coder agent' },
|
|
764
|
+
{ command: 'claude-flow agent list', description: 'List all agents' },
|
|
765
|
+
{ command: 'claude-flow agent status agent-001', description: 'Show agent status' }
|
|
766
766
|
],
|
|
767
767
|
action: async (ctx) => {
|
|
768
768
|
// Show help if no subcommand
|
|
769
769
|
output.writeln();
|
|
770
770
|
output.writeln(output.bold('Agent Management Commands'));
|
|
771
771
|
output.writeln();
|
|
772
|
-
output.writeln('Usage:
|
|
772
|
+
output.writeln('Usage: claude-flow agent <subcommand> [options]');
|
|
773
773
|
output.writeln();
|
|
774
774
|
output.writeln('Subcommands:');
|
|
775
775
|
output.printList([
|
|
@@ -780,7 +780,7 @@ export const agentCommand = {
|
|
|
780
780
|
`${output.highlight('metrics')} - Show agent metrics`
|
|
781
781
|
]);
|
|
782
782
|
output.writeln();
|
|
783
|
-
output.writeln('Run "
|
|
783
|
+
output.writeln('Run "claude-flow agent <subcommand> --help" for subcommand help');
|
|
784
784
|
return { success: true };
|
|
785
785
|
}
|
|
786
786
|
};
|
|
@@ -794,7 +794,7 @@ function getAgentCapabilities(type) {
|
|
|
794
794
|
architect: ['system-design', 'pattern-analysis', 'scalability', 'documentation'],
|
|
795
795
|
coordinator: ['task-orchestration', 'agent-management', 'workflow-control'],
|
|
796
796
|
'security-architect': ['threat-modeling', 'security-patterns', 'compliance', 'audit'],
|
|
797
|
-
'memory-specialist': ['vector-search', '
|
|
797
|
+
'memory-specialist': ['vector-search', 'agentdb', 'caching', 'optimization'],
|
|
798
798
|
'performance-engineer': ['benchmarking', 'profiling', 'optimization', 'monitoring']
|
|
799
799
|
};
|
|
800
800
|
return capabilities[type] || ['general'];
|
|
@@ -79,10 +79,10 @@ const diffCommand = {
|
|
|
79
79
|
},
|
|
80
80
|
],
|
|
81
81
|
examples: [
|
|
82
|
-
{ command: '
|
|
83
|
-
{ command: '
|
|
84
|
-
{ command: '
|
|
85
|
-
{ command: '
|
|
82
|
+
{ command: 'claude-flow analyze diff --risk', description: 'Analyze current diff with risk assessment' },
|
|
83
|
+
{ command: 'claude-flow analyze diff HEAD~1 --classify', description: 'Classify changes from last commit' },
|
|
84
|
+
{ command: 'claude-flow analyze diff main..feature --format json', description: 'Compare branches with JSON output' },
|
|
85
|
+
{ command: 'claude-flow analyze diff --reviewers', description: 'Get recommended reviewers for changes' },
|
|
86
86
|
],
|
|
87
87
|
action: async (ctx) => {
|
|
88
88
|
const ref = ctx.args[0] || 'HEAD';
|
|
@@ -247,8 +247,8 @@ const codeCommand = {
|
|
|
247
247
|
{ name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
248
248
|
],
|
|
249
249
|
examples: [
|
|
250
|
-
{ command: '
|
|
251
|
-
{ command: '
|
|
250
|
+
{ command: 'claude-flow analyze code -p ./src', description: 'Analyze source directory' },
|
|
251
|
+
{ command: 'claude-flow analyze code --type complexity', description: 'Run complexity analysis' },
|
|
252
252
|
],
|
|
253
253
|
action: async (ctx) => {
|
|
254
254
|
const path = ctx.flags.path || '.';
|
|
@@ -360,10 +360,10 @@ const astCommand = {
|
|
|
360
360
|
},
|
|
361
361
|
],
|
|
362
362
|
examples: [
|
|
363
|
-
{ command: '
|
|
364
|
-
{ command: '
|
|
365
|
-
{ command: '
|
|
366
|
-
{ command: '
|
|
363
|
+
{ command: 'claude-flow analyze ast src/', description: 'Analyze all files in src/' },
|
|
364
|
+
{ command: 'claude-flow analyze ast src/index.ts --complexity', description: 'Analyze with complexity' },
|
|
365
|
+
{ command: 'claude-flow analyze ast . --format json', description: 'JSON output' },
|
|
366
|
+
{ command: 'claude-flow analyze ast src/ --symbols', description: 'Extract symbols' },
|
|
367
367
|
],
|
|
368
368
|
action: async (ctx) => {
|
|
369
369
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -579,8 +579,8 @@ const complexityAstCommand = {
|
|
|
579
579
|
},
|
|
580
580
|
],
|
|
581
581
|
examples: [
|
|
582
|
-
{ command: '
|
|
583
|
-
{ command: '
|
|
582
|
+
{ command: 'claude-flow analyze complexity src/', description: 'Analyze complexity' },
|
|
583
|
+
{ command: 'claude-flow analyze complexity src/ --threshold 15', description: 'Flag high complexity' },
|
|
584
584
|
],
|
|
585
585
|
action: async (ctx) => {
|
|
586
586
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -731,9 +731,9 @@ const symbolsCommand = {
|
|
|
731
731
|
},
|
|
732
732
|
],
|
|
733
733
|
examples: [
|
|
734
|
-
{ command: '
|
|
735
|
-
{ command: '
|
|
736
|
-
{ command: '
|
|
734
|
+
{ command: 'claude-flow analyze symbols src/', description: 'Extract all symbols' },
|
|
735
|
+
{ command: 'claude-flow analyze symbols src/ --type function', description: 'Only functions' },
|
|
736
|
+
{ command: 'claude-flow analyze symbols src/ --format json', description: 'JSON output' },
|
|
737
737
|
],
|
|
738
738
|
action: async (ctx) => {
|
|
739
739
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -871,8 +871,8 @@ const importsCommand = {
|
|
|
871
871
|
},
|
|
872
872
|
],
|
|
873
873
|
examples: [
|
|
874
|
-
{ command: '
|
|
875
|
-
{ command: '
|
|
874
|
+
{ command: 'claude-flow analyze imports src/', description: 'Analyze all imports' },
|
|
875
|
+
{ command: 'claude-flow analyze imports src/ --external', description: 'Only npm packages' },
|
|
876
876
|
],
|
|
877
877
|
action: async (ctx) => {
|
|
878
878
|
const targetPath = ctx.args[0] || ctx.cwd;
|
|
@@ -1100,8 +1100,8 @@ const depsCommand = {
|
|
|
1100
1100
|
{ name: 'format', short: 'f', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
1101
1101
|
],
|
|
1102
1102
|
examples: [
|
|
1103
|
-
{ command: '
|
|
1104
|
-
{ command: '
|
|
1103
|
+
{ command: 'claude-flow analyze deps --outdated', description: 'Show outdated dependencies' },
|
|
1104
|
+
{ command: 'claude-flow analyze deps --security', description: 'Check for vulnerabilities' },
|
|
1105
1105
|
],
|
|
1106
1106
|
action: async (ctx) => {
|
|
1107
1107
|
const showOutdated = ctx.flags.outdated;
|
|
@@ -1157,9 +1157,9 @@ const boundariesCommand = {
|
|
|
1157
1157
|
},
|
|
1158
1158
|
],
|
|
1159
1159
|
examples: [
|
|
1160
|
-
{ command: '
|
|
1161
|
-
{ command: '
|
|
1162
|
-
{ command: '
|
|
1160
|
+
{ command: 'claude-flow analyze boundaries src/', description: 'Find code boundaries in src/' },
|
|
1161
|
+
{ command: 'claude-flow analyze boundaries -p 3 src/', description: 'Find 3 partitions' },
|
|
1162
|
+
{ command: 'claude-flow analyze boundaries -f dot -o graph.dot src/', description: 'Export to DOT format' },
|
|
1163
1163
|
],
|
|
1164
1164
|
action: async (ctx) => {
|
|
1165
1165
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1309,9 +1309,9 @@ const modulesCommand = {
|
|
|
1309
1309
|
},
|
|
1310
1310
|
],
|
|
1311
1311
|
examples: [
|
|
1312
|
-
{ command: '
|
|
1313
|
-
{ command: '
|
|
1314
|
-
{ command: '
|
|
1312
|
+
{ command: 'claude-flow analyze modules src/', description: 'Detect module communities' },
|
|
1313
|
+
{ command: 'claude-flow analyze modules -f dot -o modules.dot src/', description: 'Export colored DOT graph' },
|
|
1314
|
+
{ command: 'claude-flow analyze modules -m 3 src/', description: 'Only show communities with 3+ files' },
|
|
1315
1315
|
],
|
|
1316
1316
|
action: async (ctx) => {
|
|
1317
1317
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1457,9 +1457,9 @@ const dependenciesCommand = {
|
|
|
1457
1457
|
},
|
|
1458
1458
|
],
|
|
1459
1459
|
examples: [
|
|
1460
|
-
{ command: '
|
|
1461
|
-
{ command: '
|
|
1462
|
-
{ command: '
|
|
1460
|
+
{ command: 'claude-flow analyze dependencies src/', description: 'Build dependency graph' },
|
|
1461
|
+
{ command: 'claude-flow analyze dependencies -f dot -o deps.dot src/', description: 'Export to DOT' },
|
|
1462
|
+
{ command: 'claude-flow analyze dependencies -i .ts,.tsx src/', description: 'Only TypeScript files' },
|
|
1463
1463
|
],
|
|
1464
1464
|
action: async (ctx) => {
|
|
1465
1465
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1621,8 +1621,8 @@ const circularCommand = {
|
|
|
1621
1621
|
},
|
|
1622
1622
|
],
|
|
1623
1623
|
examples: [
|
|
1624
|
-
{ command: '
|
|
1625
|
-
{ command: '
|
|
1624
|
+
{ command: 'claude-flow analyze circular src/', description: 'Find circular dependencies' },
|
|
1625
|
+
{ command: 'claude-flow analyze circular -s high src/', description: 'Only high severity cycles' },
|
|
1626
1626
|
],
|
|
1627
1627
|
action: async (ctx) => {
|
|
1628
1628
|
const targetDir = ctx.args[0] || ctx.cwd;
|
|
@@ -1764,16 +1764,16 @@ export const analyzeCommand = {
|
|
|
1764
1764
|
},
|
|
1765
1765
|
],
|
|
1766
1766
|
examples: [
|
|
1767
|
-
{ command: '
|
|
1768
|
-
{ command: '
|
|
1769
|
-
{ command: '
|
|
1770
|
-
{ command: '
|
|
1771
|
-
{ command: '
|
|
1772
|
-
{ command: '
|
|
1773
|
-
{ command: '
|
|
1774
|
-
{ command: '
|
|
1775
|
-
{ command: '
|
|
1776
|
-
{ command: '
|
|
1767
|
+
{ command: 'claude-flow analyze ast src/', description: 'Analyze code with AST parsing' },
|
|
1768
|
+
{ command: 'claude-flow analyze complexity src/ --threshold 15', description: 'Find high-complexity files' },
|
|
1769
|
+
{ command: 'claude-flow analyze symbols src/ --type function', description: 'Extract all functions' },
|
|
1770
|
+
{ command: 'claude-flow analyze imports src/ --external', description: 'List npm dependencies' },
|
|
1771
|
+
{ command: 'claude-flow analyze diff --risk', description: 'Analyze diff with risk assessment' },
|
|
1772
|
+
{ command: 'claude-flow analyze boundaries src/', description: 'Find code boundaries using MinCut' },
|
|
1773
|
+
{ command: 'claude-flow analyze modules src/', description: 'Detect module communities with Louvain' },
|
|
1774
|
+
{ command: 'claude-flow analyze dependencies src/ --format dot', description: 'Export dependency graph as DOT' },
|
|
1775
|
+
{ command: 'claude-flow analyze circular src/', description: 'Find circular dependencies' },
|
|
1776
|
+
{ command: 'claude-flow analyze deps --security', description: 'Check dependency vulnerabilities' },
|
|
1777
1777
|
],
|
|
1778
1778
|
action: async (ctx) => {
|
|
1779
1779
|
// If no subcommand, show help
|
|
@@ -1797,24 +1797,24 @@ export const analyzeCommand = {
|
|
|
1797
1797
|
output.writeln();
|
|
1798
1798
|
output.writeln(output.bold('AST Analysis Examples:'));
|
|
1799
1799
|
output.writeln();
|
|
1800
|
-
output.writeln(` ${output.dim('
|
|
1801
|
-
output.writeln(` ${output.dim('
|
|
1802
|
-
output.writeln(` ${output.dim('
|
|
1803
|
-
output.writeln(` ${output.dim('
|
|
1804
|
-
output.writeln(` ${output.dim('
|
|
1800
|
+
output.writeln(` ${output.dim('claude-flow analyze ast src/')} # Full AST analysis`);
|
|
1801
|
+
output.writeln(` ${output.dim('claude-flow analyze ast src/index.ts -c')} # Include complexity`);
|
|
1802
|
+
output.writeln(` ${output.dim('claude-flow analyze complexity src/ -t 15')} # Flag high complexity`);
|
|
1803
|
+
output.writeln(` ${output.dim('claude-flow analyze symbols src/ --type fn')} # Extract functions`);
|
|
1804
|
+
output.writeln(` ${output.dim('claude-flow analyze imports src/ --external')} # Only npm imports`);
|
|
1805
1805
|
output.writeln();
|
|
1806
1806
|
output.writeln(output.bold('Graph Analysis Examples:'));
|
|
1807
1807
|
output.writeln();
|
|
1808
|
-
output.writeln(` ${output.dim('
|
|
1809
|
-
output.writeln(` ${output.dim('
|
|
1810
|
-
output.writeln(` ${output.dim('
|
|
1811
|
-
output.writeln(` ${output.dim('
|
|
1808
|
+
output.writeln(` ${output.dim('claude-flow analyze boundaries src/')} # Find natural code boundaries`);
|
|
1809
|
+
output.writeln(` ${output.dim('claude-flow analyze modules src/')} # Detect module communities`);
|
|
1810
|
+
output.writeln(` ${output.dim('claude-flow analyze dependencies -f dot src/')} # Export to DOT format`);
|
|
1811
|
+
output.writeln(` ${output.dim('claude-flow analyze circular src/')} # Find circular deps`);
|
|
1812
1812
|
output.writeln();
|
|
1813
1813
|
output.writeln(output.bold('Diff Analysis Examples:'));
|
|
1814
1814
|
output.writeln();
|
|
1815
|
-
output.writeln(` ${output.dim('
|
|
1816
|
-
output.writeln(` ${output.dim('
|
|
1817
|
-
output.writeln(` ${output.dim('
|
|
1815
|
+
output.writeln(` ${output.dim('claude-flow analyze diff --risk')} # Risk assessment`);
|
|
1816
|
+
output.writeln(` ${output.dim('claude-flow analyze diff HEAD~1 --classify')} # Classify changes`);
|
|
1817
|
+
output.writeln(` ${output.dim('claude-flow analyze diff main..feature')} # Compare branches`);
|
|
1818
1818
|
output.writeln();
|
|
1819
1819
|
return { success: true };
|
|
1820
1820
|
},
|
|
@@ -134,7 +134,7 @@ export const updateAppCommand = {
|
|
|
134
134
|
description: 'Hot-patch a section in an RVFA appliance',
|
|
135
135
|
options: [
|
|
136
136
|
{ name: 'file', short: 'f', type: 'string', description: 'Path to .rvf file', required: true },
|
|
137
|
-
{ name: 'section', short: 's', type: 'string', description: 'Section to patch (e.g.
|
|
137
|
+
{ name: 'section', short: 's', type: 'string', description: 'Section to patch (e.g. ruflo, models)', required: true },
|
|
138
138
|
{ name: 'patch', short: 'p', type: 'string', description: 'Path to .rvfp patch file' },
|
|
139
139
|
{ name: 'data', short: 'd', type: 'string', description: 'Path to new section data (creates patch automatically)' },
|
|
140
140
|
{ name: 'version', type: 'string', description: 'Patch version', default: '0.0.1' },
|
|
@@ -55,10 +55,10 @@ async function runSteps(steps, delay = 300) {
|
|
|
55
55
|
// BUILD
|
|
56
56
|
const buildCommand = {
|
|
57
57
|
name: 'build',
|
|
58
|
-
description: 'Build a self-contained
|
|
58
|
+
description: 'Build a self-contained ruflo.rvf appliance',
|
|
59
59
|
options: [
|
|
60
60
|
{ name: 'profile', short: 'p', type: 'string', description: 'Build profile: cloud, hybrid, offline', default: 'cloud' },
|
|
61
|
-
{ name: 'output', short: 'o', type: 'string', description: 'Output file path', default: '
|
|
61
|
+
{ name: 'output', short: 'o', type: 'string', description: 'Output file path', default: 'ruflo.rvf' },
|
|
62
62
|
{ name: 'arch', type: 'string', description: 'Target architecture', default: 'x86_64' },
|
|
63
63
|
{ name: 'models', short: 'm', type: 'array', description: 'Models to include (offline/hybrid)' },
|
|
64
64
|
{ name: 'api-keys', type: 'string', description: 'Path to .env file for API key vault' },
|
|
@@ -66,7 +66,7 @@ const buildCommand = {
|
|
|
66
66
|
],
|
|
67
67
|
action: async (ctx) => {
|
|
68
68
|
const profile = ctx.flags.profile || 'cloud';
|
|
69
|
-
const outputPath = ctx.flags.output || '
|
|
69
|
+
const outputPath = ctx.flags.output || 'ruflo.rvf';
|
|
70
70
|
const arch = ctx.flags.arch || 'x86_64';
|
|
71
71
|
const models = ctx.flags.models || [];
|
|
72
72
|
const apiKeysPath = ctx.flags['api-keys'];
|
|
@@ -83,7 +83,7 @@ const buildCommand = {
|
|
|
83
83
|
return { success: false, exitCode: 1 };
|
|
84
84
|
const steps = [
|
|
85
85
|
'Collecting kernel artifacts', 'Bundling runtime environment',
|
|
86
|
-
'Packaging
|
|
86
|
+
'Packaging ruflo CLI + MCP tools', 'Compressing sections',
|
|
87
87
|
'Computing SHA-256 checksums', 'Writing RVFA container',
|
|
88
88
|
];
|
|
89
89
|
if (profile !== 'cloud' && models.length > 0)
|
|
@@ -141,7 +141,7 @@ const inspectCommand = {
|
|
|
141
141
|
}
|
|
142
142
|
header('RVFA Appliance');
|
|
143
143
|
for (const [label, value] of [
|
|
144
|
-
['Name', hdr.name || '
|
|
144
|
+
['Name', hdr.name || 'ruflo'], ['Version', hdr.version || 'unknown'],
|
|
145
145
|
['Architecture', hdr.arch || 'x86_64'], ['Profile', hdr.profile || 'cloud'],
|
|
146
146
|
['Created', hdr.created || 'unknown'],
|
|
147
147
|
]) {
|
|
@@ -299,7 +299,7 @@ const extractCommand = {
|
|
|
299
299
|
output.writeln();
|
|
300
300
|
output.printSuccess(`Extraction complete: ${dest}`);
|
|
301
301
|
output.writeln(output.dim(' Directory structure:'));
|
|
302
|
-
for (const d of ['kernel', 'runtime', '
|
|
302
|
+
for (const d of ['kernel', 'runtime', 'ruflo', 'models', 'data', 'verify']) {
|
|
303
303
|
const exists = fs.existsSync(path.join(dest, d));
|
|
304
304
|
output.writeln(` ${exists ? output.success('+') : output.dim('-')} ${d}/`);
|
|
305
305
|
}
|
|
@@ -365,14 +365,14 @@ export const applianceCommand = {
|
|
|
365
365
|
aliases: ['rvfa'],
|
|
366
366
|
subcommands: [buildCommand, inspectCommand, verifyCommand, extractCommand, runCommand, signCommand, publishCommand, updateAppCommand],
|
|
367
367
|
examples: [
|
|
368
|
-
{ command: '
|
|
369
|
-
{ command: '
|
|
370
|
-
{ command: '
|
|
371
|
-
{ command: '
|
|
372
|
-
{ command: '
|
|
373
|
-
{ command: '
|
|
374
|
-
{ command: '
|
|
375
|
-
{ command: '
|
|
368
|
+
{ command: 'ruflo appliance build -p cloud', description: 'Build a cloud appliance' },
|
|
369
|
+
{ command: 'ruflo appliance inspect -f ruflo.rvf', description: 'Inspect appliance contents' },
|
|
370
|
+
{ command: 'ruflo appliance verify -f ruflo.rvf', description: 'Verify integrity' },
|
|
371
|
+
{ command: 'ruflo appliance extract -f ruflo.rvf', description: 'Extract sections' },
|
|
372
|
+
{ command: 'ruflo appliance run -f ruflo.rvf', description: 'Boot and run appliance' },
|
|
373
|
+
{ command: 'ruflo appliance sign -f ruflo.rvf --generate-keys', description: 'Generate keys and sign' },
|
|
374
|
+
{ command: 'ruflo appliance publish -f ruflo.rvf', description: 'Publish to IPFS via Pinata' },
|
|
375
|
+
{ command: 'ruflo appliance update -f ruflo.rvf -s ruflo -d ./new-ruflo.bin', description: 'Hot-patch a section' },
|
|
376
376
|
],
|
|
377
377
|
action: async () => {
|
|
378
378
|
output.writeln();
|
|
@@ -381,7 +381,7 @@ export const applianceCommand = {
|
|
|
381
381
|
output.writeln();
|
|
382
382
|
output.writeln('Subcommands:');
|
|
383
383
|
output.printList([
|
|
384
|
-
'build - Build a self-contained
|
|
384
|
+
'build - Build a self-contained ruflo.rvf appliance',
|
|
385
385
|
'inspect - Show appliance header and section manifest',
|
|
386
386
|
'verify - Verify appliance integrity and run capability tests',
|
|
387
387
|
'extract - Extract all sections from an appliance',
|
|
@@ -398,7 +398,7 @@ export const applianceCommand = {
|
|
|
398
398
|
`${output.bold('offline')} - Fully air-gapped with bundled models (~4 GB)`,
|
|
399
399
|
]);
|
|
400
400
|
output.writeln();
|
|
401
|
-
output.writeln(output.dim('Use "
|
|
401
|
+
output.writeln(output.dim('Use "ruflo appliance <subcommand> --help" for details.'));
|
|
402
402
|
return { success: true };
|
|
403
403
|
},
|
|
404
404
|
};
|
|
@@ -21,9 +21,9 @@ const pretrainCommand = {
|
|
|
21
21
|
{ name: 'verbose', short: 'v', type: 'boolean', description: 'Verbose output', default: 'false' },
|
|
22
22
|
],
|
|
23
23
|
examples: [
|
|
24
|
-
{ command: '
|
|
25
|
-
{ command: '
|
|
26
|
-
{ command: '
|
|
24
|
+
{ command: 'claude-flow benchmark pretrain', description: 'Run pre-training benchmarks' },
|
|
25
|
+
{ command: 'claude-flow benchmark pretrain -i 500 --save results.json', description: 'Extended benchmark with results saved' },
|
|
26
|
+
{ command: 'claude-flow benchmark pretrain -o json', description: 'Output results as JSON' },
|
|
27
27
|
],
|
|
28
28
|
action: async (ctx) => {
|
|
29
29
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -45,7 +45,7 @@ const pretrainCommand = {
|
|
|
45
45
|
}
|
|
46
46
|
// Save to file if requested
|
|
47
47
|
if (saveFile) {
|
|
48
|
-
const resultsDir = join(process.cwd(), '
|
|
48
|
+
const resultsDir = join(process.cwd(), '.claude-flow', 'benchmarks');
|
|
49
49
|
if (!existsSync(resultsDir)) {
|
|
50
50
|
mkdirSync(resultsDir, { recursive: true });
|
|
51
51
|
}
|
|
@@ -84,8 +84,8 @@ const neuralCommand = {
|
|
|
84
84
|
{ name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
85
85
|
],
|
|
86
86
|
examples: [
|
|
87
|
-
{ command: '
|
|
88
|
-
{ command: '
|
|
87
|
+
{ command: 'claude-flow benchmark neural', description: 'Run neural benchmarks' },
|
|
88
|
+
{ command: 'claude-flow benchmark neural -d 768 -n 5000', description: 'Higher dimension, more vectors' },
|
|
89
89
|
],
|
|
90
90
|
action: async (ctx) => {
|
|
91
91
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -250,7 +250,7 @@ const memoryCommand = {
|
|
|
250
250
|
{ name: 'output', short: 'o', type: 'string', description: 'Output format: text, json', default: 'text' },
|
|
251
251
|
],
|
|
252
252
|
examples: [
|
|
253
|
-
{ command: '
|
|
253
|
+
{ command: 'claude-flow benchmark memory', description: 'Run memory benchmarks' },
|
|
254
254
|
],
|
|
255
255
|
action: async (ctx) => {
|
|
256
256
|
const iterations = parseInt(ctx.flags.iterations || '100', 10);
|
|
@@ -365,8 +365,8 @@ const allCommand = {
|
|
|
365
365
|
{ name: 'save', short: 's', type: 'string', description: 'Save results to file' },
|
|
366
366
|
],
|
|
367
367
|
examples: [
|
|
368
|
-
{ command: '
|
|
369
|
-
{ command: '
|
|
368
|
+
{ command: 'claude-flow benchmark all', description: 'Run all benchmarks' },
|
|
369
|
+
{ command: 'claude-flow benchmark all --save full-results.json', description: 'Run all and save results' },
|
|
370
370
|
],
|
|
371
371
|
action: async (ctx) => {
|
|
372
372
|
output.writeln();
|
|
@@ -404,7 +404,7 @@ const allCommand = {
|
|
|
404
404
|
// Save if requested
|
|
405
405
|
const saveFile = ctx.flags.save;
|
|
406
406
|
if (saveFile) {
|
|
407
|
-
const resultsDir = join(process.cwd(), '
|
|
407
|
+
const resultsDir = join(process.cwd(), '.claude-flow', 'benchmarks');
|
|
408
408
|
if (!existsSync(resultsDir)) {
|
|
409
409
|
mkdirSync(resultsDir, { recursive: true });
|
|
410
410
|
}
|
|
@@ -432,10 +432,10 @@ export const benchmarkCommand = {
|
|
|
432
432
|
allCommand,
|
|
433
433
|
],
|
|
434
434
|
examples: [
|
|
435
|
-
{ command: '
|
|
436
|
-
{ command: '
|
|
437
|
-
{ command: '
|
|
438
|
-
{ command: '
|
|
435
|
+
{ command: 'claude-flow benchmark pretrain', description: 'Benchmark pre-training system' },
|
|
436
|
+
{ command: 'claude-flow benchmark neural', description: 'Benchmark neural operations' },
|
|
437
|
+
{ command: 'claude-flow benchmark memory', description: 'Benchmark memory operations' },
|
|
438
|
+
{ command: 'claude-flow benchmark all', description: 'Run all benchmarks' },
|
|
439
439
|
],
|
|
440
440
|
action: async (_ctx) => {
|
|
441
441
|
output.writeln();
|
|
@@ -449,8 +449,8 @@ export const benchmarkCommand = {
|
|
|
449
449
|
output.writeln(` ${output.highlight('all')} - Run all benchmark suites`);
|
|
450
450
|
output.writeln();
|
|
451
451
|
output.writeln('Examples:');
|
|
452
|
-
output.writeln('
|
|
453
|
-
output.writeln('
|
|
452
|
+
output.writeln(' claude-flow benchmark pretrain -i 200');
|
|
453
|
+
output.writeln(' claude-flow benchmark all --save results.json');
|
|
454
454
|
output.writeln();
|
|
455
455
|
return { success: true, message: 'Use a subcommand to run benchmarks' };
|
|
456
456
|
},
|
|
@@ -158,7 +158,7 @@ export function formatCategoriesHelp(commands, options = {}) {
|
|
|
158
158
|
.filter(cat => !cat.showInCondensed)
|
|
159
159
|
.reduce((sum, cat) => sum + cat.commands.length, 0);
|
|
160
160
|
if (hiddenCount > 0) {
|
|
161
|
-
lines.push(`Run "
|
|
161
|
+
lines.push(`Run "claude-flow --help-all" to see ${hiddenCount} more commands`);
|
|
162
162
|
lines.push('');
|
|
163
163
|
}
|
|
164
164
|
}
|