moflo 4.5.0 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/@claude-flow/cli/dist/src/commands/appliance.js +12 -12
- package/src/@claude-flow/cli/dist/src/commands/benchmark.js +2 -2
- package/src/@claude-flow/cli/dist/src/commands/claims.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/config.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/daemon.js +25 -3
- package/src/@claude-flow/cli/dist/src/commands/deployment.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/doctor.js +23 -6
- package/src/@claude-flow/cli/dist/src/commands/embeddings.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/hooks.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/init.js +14 -12
- package/src/@claude-flow/cli/dist/src/commands/neural.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/orc.d.ts +2 -2
- package/src/@claude-flow/cli/dist/src/commands/orc.js +12 -12
- package/src/@claude-flow/cli/dist/src/commands/performance.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/plugins.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/providers.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/security.js +1 -1
- package/src/@claude-flow/cli/dist/src/commands/start.js +11 -11
- package/src/@claude-flow/cli/dist/src/commands/status.js +3 -3
- package/src/@claude-flow/cli/dist/src/commands/transfer-store.js +1 -1
- package/src/@claude-flow/cli/dist/src/config/moflo-config.d.ts +30 -0
- package/src/@claude-flow/cli/dist/src/config/moflo-config.js +103 -7
- package/src/@claude-flow/cli/dist/src/index.d.ts +1 -1
- package/src/@claude-flow/cli/dist/src/index.js +3 -3
- package/src/@claude-flow/cli/dist/src/init/claudemd-generator.js +1 -1
- package/src/@claude-flow/cli/dist/src/init/executor.js +485 -472
- package/src/@claude-flow/cli/dist/src/init/helpers-generator.js +640 -640
- package/src/@claude-flow/cli/dist/src/init/moflo-init.js +530 -66
- package/src/@claude-flow/cli/dist/src/init/settings-generator.js +7 -12
- package/src/@claude-flow/cli/dist/src/init/statusline-generator.d.ts +1 -1
- package/src/@claude-flow/cli/dist/src/init/statusline-generator.js +784 -784
- package/src/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.js +12 -12
- package/src/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +122 -66
- package/src/@claude-flow/cli/dist/src/memory/intelligence.js +5 -1
- package/src/@claude-flow/cli/dist/src/memory/memory-initializer.d.ts +1 -1
- package/src/@claude-flow/cli/dist/src/memory/memory-initializer.js +371 -371
- package/src/@claude-flow/cli/dist/src/parser.d.ts +10 -0
- package/src/@claude-flow/cli/dist/src/parser.js +49 -3
- package/src/@claude-flow/cli/dist/src/plugins/store/discovery.js +1 -1
- package/src/@claude-flow/cli/dist/src/runtime/headless.js +30 -30
- package/src/@claude-flow/cli/dist/src/services/claim-service.js +1 -1
- package/src/@claude-flow/cli/dist/src/services/ruvector-training.js +11 -5
- package/src/@claude-flow/cli/dist/src/services/workflow-gate.d.ts +13 -3
- package/src/@claude-flow/cli/dist/src/services/workflow-gate.js +73 -5
- package/src/@claude-flow/cli/dist/src/types.d.ts +1 -1
- package/src/@claude-flow/cli/dist/src/types.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moflo",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.1",
|
|
4
4
|
"description": "MoFlo — AI agent orchestration for Claude Code. Forked from ruflo/claude-flow with patches applied to source, plus feature-level orchestration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -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 flo CLI + MCP tools', 'Compressing sections',
|
|
87
87
|
'Computing SHA-256 checksums', 'Writing RVFA container',
|
|
88
88
|
];
|
|
89
89
|
if (profile !== 'cloud' && models.length > 0)
|
|
@@ -365,19 +365,19 @@ 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: 'flo appliance build -p cloud', description: 'Build a cloud appliance' },
|
|
369
|
+
{ command: 'flo appliance inspect -f ruflo.rvf', description: 'Inspect appliance contents' },
|
|
370
|
+
{ command: 'flo appliance verify -f ruflo.rvf', description: 'Verify integrity' },
|
|
371
|
+
{ command: 'flo appliance extract -f ruflo.rvf', description: 'Extract sections' },
|
|
372
|
+
{ command: 'flo appliance run -f ruflo.rvf', description: 'Boot and run appliance' },
|
|
373
|
+
{ command: 'flo appliance sign -f ruflo.rvf --generate-keys', description: 'Generate keys and sign' },
|
|
374
|
+
{ command: 'flo appliance publish -f ruflo.rvf', description: 'Publish to IPFS via Pinata' },
|
|
375
|
+
{ command: 'flo 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();
|
|
379
|
-
output.writeln(output.bold('
|
|
380
|
-
output.writeln(output.dim('Self-contained deployment format for the full
|
|
379
|
+
output.writeln(output.bold('MoFlo Appliance (RVFA)'));
|
|
380
|
+
output.writeln(output.dim('Self-contained deployment format for the full MoFlo platform.'));
|
|
381
381
|
output.writeln();
|
|
382
382
|
output.writeln('Subcommands:');
|
|
383
383
|
output.printList([
|
|
@@ -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 "flo appliance <subcommand> --help" for details.'));
|
|
402
402
|
return { success: true };
|
|
403
403
|
},
|
|
404
404
|
};
|
|
@@ -371,7 +371,7 @@ const allCommand = {
|
|
|
371
371
|
action: async (ctx) => {
|
|
372
372
|
output.writeln();
|
|
373
373
|
output.writeln(output.bold(output.highlight('═'.repeat(65))));
|
|
374
|
-
output.writeln(output.bold('
|
|
374
|
+
output.writeln(output.bold(' MoFlo V4 - Full Benchmark Suite'));
|
|
375
375
|
output.writeln(output.bold(output.highlight('═'.repeat(65))));
|
|
376
376
|
const startTime = Date.now();
|
|
377
377
|
const allResults = {};
|
|
@@ -439,7 +439,7 @@ export const benchmarkCommand = {
|
|
|
439
439
|
],
|
|
440
440
|
action: async (_ctx) => {
|
|
441
441
|
output.writeln();
|
|
442
|
-
output.writeln(output.bold('
|
|
442
|
+
output.writeln(output.bold('MoFlo V4 Benchmark Suite'));
|
|
443
443
|
output.writeln(output.dim('─'.repeat(50)));
|
|
444
444
|
output.writeln();
|
|
445
445
|
output.writeln('Available subcommands:');
|
|
@@ -344,7 +344,7 @@ export const claimsCommand = {
|
|
|
344
344
|
],
|
|
345
345
|
action: async () => {
|
|
346
346
|
output.writeln();
|
|
347
|
-
output.writeln(output.bold('
|
|
347
|
+
output.writeln(output.bold('MoFlo Claims System'));
|
|
348
348
|
output.writeln(output.dim('Fine-grained authorization and access control'));
|
|
349
349
|
output.writeln();
|
|
350
350
|
output.writeln('Subcommands:');
|
|
@@ -33,7 +33,7 @@ const initCommand = {
|
|
|
33
33
|
const sparc = ctx.flags.sparc;
|
|
34
34
|
const v3 = ctx.flags.v3;
|
|
35
35
|
output.writeln();
|
|
36
|
-
output.printInfo('Initializing
|
|
36
|
+
output.printInfo('Initializing MoFlo configuration...');
|
|
37
37
|
output.writeln();
|
|
38
38
|
// Create default configuration
|
|
39
39
|
const config = {
|
|
@@ -86,6 +86,28 @@ const startCommand = {
|
|
|
86
86
|
if (!fs.existsSync(stateDir)) {
|
|
87
87
|
fs.mkdirSync(stateDir, { recursive: true });
|
|
88
88
|
}
|
|
89
|
+
// Check if another foreground daemon is already running (prevents duplicate daemons)
|
|
90
|
+
if (fs.existsSync(pidFile)) {
|
|
91
|
+
try {
|
|
92
|
+
const existingPid = parseInt(fs.readFileSync(pidFile, 'utf-8').trim(), 10);
|
|
93
|
+
if (!isNaN(existingPid) && existingPid !== process.pid) {
|
|
94
|
+
try {
|
|
95
|
+
process.kill(existingPid, 0); // Check if alive
|
|
96
|
+
// Another daemon is running — exit silently
|
|
97
|
+
if (!quiet) {
|
|
98
|
+
output.printWarning(`Daemon already running (PID: ${existingPid})`);
|
|
99
|
+
}
|
|
100
|
+
return { success: true };
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// Process not running — stale PID file, continue startup
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// Can't read PID file — continue startup
|
|
109
|
+
}
|
|
110
|
+
}
|
|
89
111
|
// Write PID file for foreground mode
|
|
90
112
|
fs.writeFileSync(pidFile, String(process.pid));
|
|
91
113
|
// Clean up PID file on exit
|
|
@@ -418,7 +440,7 @@ const statusCommand = {
|
|
|
418
440
|
`Max Concurrent: ${status.config.maxConcurrent}`,
|
|
419
441
|
`Max CPU Load: ${status.config.resourceThresholds.maxCpuLoad}`,
|
|
420
442
|
`Min Free Memory: ${status.config.resourceThresholds.minFreeMemoryPercent}%`,
|
|
421
|
-
].filter(Boolean).join('\n'), '
|
|
443
|
+
].filter(Boolean).join('\n'), 'MoFlo Daemon');
|
|
422
444
|
output.writeln();
|
|
423
445
|
output.writeln(output.bold('Worker Status'));
|
|
424
446
|
const workerData = status.config.workers.map(w => {
|
|
@@ -489,7 +511,7 @@ const statusCommand = {
|
|
|
489
511
|
`Status: ${output.error('○')} ${output.error('NOT INITIALIZED')}`,
|
|
490
512
|
'',
|
|
491
513
|
'Run "claude-flow daemon start" to start the daemon',
|
|
492
|
-
].join('\n'), '
|
|
514
|
+
].join('\n'), 'MoFlo Daemon');
|
|
493
515
|
return { success: true };
|
|
494
516
|
}
|
|
495
517
|
},
|
|
@@ -614,7 +636,7 @@ export const daemonCommand = {
|
|
|
614
636
|
],
|
|
615
637
|
action: async () => {
|
|
616
638
|
output.writeln();
|
|
617
|
-
output.writeln(output.bold('
|
|
639
|
+
output.writeln(output.bold('MoFlo Daemon - Background Task Management'));
|
|
618
640
|
output.writeln();
|
|
619
641
|
output.writeln('Node.js-based background worker system that auto-runs like shell daemons.');
|
|
620
642
|
output.writeln('Manages 12 specialized workers for continuous optimization and monitoring.');
|
|
@@ -260,7 +260,7 @@ export const deploymentCommand = {
|
|
|
260
260
|
],
|
|
261
261
|
action: async () => {
|
|
262
262
|
output.writeln();
|
|
263
|
-
output.writeln(output.bold('
|
|
263
|
+
output.writeln(output.bold('MoFlo Deployment'));
|
|
264
264
|
output.writeln(output.dim('Multi-environment deployment management'));
|
|
265
265
|
output.writeln();
|
|
266
266
|
output.writeln('Subcommands:');
|
|
@@ -59,12 +59,13 @@ async function checkNpmVersion() {
|
|
|
59
59
|
}
|
|
60
60
|
// Check config file
|
|
61
61
|
async function checkConfigFile() {
|
|
62
|
-
|
|
62
|
+
// JSON configs (parse-validated)
|
|
63
|
+
const jsonPaths = [
|
|
63
64
|
'.claude-flow/config.json',
|
|
64
65
|
'claude-flow.config.json',
|
|
65
66
|
'.claude-flow.json'
|
|
66
67
|
];
|
|
67
|
-
for (const configPath of
|
|
68
|
+
for (const configPath of jsonPaths) {
|
|
68
69
|
if (existsSync(configPath)) {
|
|
69
70
|
try {
|
|
70
71
|
const content = readFileSync(configPath, 'utf8');
|
|
@@ -76,6 +77,17 @@ async function checkConfigFile() {
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
}
|
|
80
|
+
// YAML configs (existence-checked only — no heavy yaml parser dependency)
|
|
81
|
+
const yamlPaths = [
|
|
82
|
+
'.claude-flow/config.yaml',
|
|
83
|
+
'.claude-flow/config.yml',
|
|
84
|
+
'claude-flow.config.yaml'
|
|
85
|
+
];
|
|
86
|
+
for (const configPath of yamlPaths) {
|
|
87
|
+
if (existsSync(configPath)) {
|
|
88
|
+
return { name: 'Config File', status: 'pass', message: `Found: ${configPath}` };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
79
91
|
return { name: 'Config File', status: 'warn', message: 'No config file (using defaults)', fix: 'claude-flow config init' };
|
|
80
92
|
}
|
|
81
93
|
// Check daemon status
|
|
@@ -128,9 +140,14 @@ async function checkApiKeys() {
|
|
|
128
140
|
found.push(key);
|
|
129
141
|
}
|
|
130
142
|
}
|
|
143
|
+
// Detect Claude Code environment — API keys are managed internally
|
|
144
|
+
const inClaudeCode = !!(process.env.CLAUDE_CODE || process.env.CLAUDE_PROJECT_DIR || process.env.MCP_SESSION_ID);
|
|
131
145
|
if (found.includes('ANTHROPIC_API_KEY') || found.includes('CLAUDE_API_KEY')) {
|
|
132
146
|
return { name: 'API Keys', status: 'pass', message: `Found: ${found.join(', ')}` };
|
|
133
147
|
}
|
|
148
|
+
else if (inClaudeCode) {
|
|
149
|
+
return { name: 'API Keys', status: 'pass', message: 'Claude Code (managed internally)' };
|
|
150
|
+
}
|
|
134
151
|
else if (found.length > 0) {
|
|
135
152
|
return { name: 'API Keys', status: 'warn', message: `Found: ${found.join(', ')} (no Claude key)`, fix: 'export ANTHROPIC_API_KEY=your_key' };
|
|
136
153
|
}
|
|
@@ -171,12 +188,12 @@ async function checkMcpServers() {
|
|
|
171
188
|
const content = JSON.parse(readFileSync(configPath, 'utf8'));
|
|
172
189
|
const servers = content.mcpServers || content.servers || {};
|
|
173
190
|
const count = Object.keys(servers).length;
|
|
174
|
-
const hasClaudeFlow = 'claude-flow' in servers || 'claude-flow_alpha' in servers;
|
|
191
|
+
const hasClaudeFlow = 'claude-flow' in servers || 'claude-flow_alpha' in servers || 'ruflo' in servers || 'ruflo_alpha' in servers;
|
|
175
192
|
if (hasClaudeFlow) {
|
|
176
|
-
return { name: 'MCP Servers', status: 'pass', message: `${count} servers (
|
|
193
|
+
return { name: 'MCP Servers', status: 'pass', message: `${count} servers (flo configured)` };
|
|
177
194
|
}
|
|
178
195
|
else {
|
|
179
|
-
return { name: 'MCP Servers', status: 'warn', message: `${count} servers (
|
|
196
|
+
return { name: 'MCP Servers', status: 'warn', message: `${count} servers (flo not found)`, fix: 'claude mcp add ruflo -- npx -y ruflo@latest mcp start' };
|
|
180
197
|
}
|
|
181
198
|
}
|
|
182
199
|
catch {
|
|
@@ -460,7 +477,7 @@ export const doctorCommand = {
|
|
|
460
477
|
const component = ctx.flags.component;
|
|
461
478
|
const verbose = ctx.flags.verbose;
|
|
462
479
|
output.writeln();
|
|
463
|
-
output.writeln(output.bold('
|
|
480
|
+
output.writeln(output.bold('MoFlo Doctor'));
|
|
464
481
|
output.writeln(output.dim('System diagnostics and health check'));
|
|
465
482
|
output.writeln(output.dim('─'.repeat(50)));
|
|
466
483
|
output.writeln();
|
|
@@ -1536,7 +1536,7 @@ export const embeddingsCommand = {
|
|
|
1536
1536
|
],
|
|
1537
1537
|
action: async () => {
|
|
1538
1538
|
output.writeln();
|
|
1539
|
-
output.writeln(output.bold('
|
|
1539
|
+
output.writeln(output.bold('MoFlo Embeddings'));
|
|
1540
1540
|
output.writeln(output.dim('Vector embeddings and semantic search'));
|
|
1541
1541
|
output.writeln();
|
|
1542
1542
|
output.writeln('Core Commands:');
|
|
@@ -2790,7 +2790,7 @@ const statuslineCommand = {
|
|
|
2790
2790
|
return '[' + '●'.repeat(filled) + '○'.repeat(empty) + ']';
|
|
2791
2791
|
};
|
|
2792
2792
|
// Generate lines
|
|
2793
|
-
let header = `${c.bold}${c.brightPurple}▊
|
|
2793
|
+
let header = `${c.bold}${c.brightPurple}▊ MoFlo V4${c.reset}`;
|
|
2794
2794
|
header += `${swarm.coordinationActive ? c.brightCyan : c.dim}● ${c.brightCyan}${user.name}${c.reset}`;
|
|
2795
2795
|
if (user.gitBranch) {
|
|
2796
2796
|
header += ` ${c.dim}│${c.reset} ${c.brightBlue}⎇ ${user.gitBranch}${c.reset}`;
|
|
@@ -11,7 +11,7 @@ import { executeInit, executeUpgrade, executeUpgradeWithMissing, DEFAULT_INIT_OP
|
|
|
11
11
|
async function initCodexAction(ctx, options) {
|
|
12
12
|
const { force, minimal, full, dualMode } = options;
|
|
13
13
|
output.writeln();
|
|
14
|
-
output.writeln(output.bold('Initializing
|
|
14
|
+
output.writeln(output.bold('Initializing MoFlo V4 for OpenAI Codex'));
|
|
15
15
|
output.writeln();
|
|
16
16
|
// Determine template
|
|
17
17
|
const template = minimal ? 'minimal' : full ? 'full' : 'default';
|
|
@@ -21,9 +21,11 @@ async function initCodexAction(ctx, options) {
|
|
|
21
21
|
// Dynamic import of the Codex initializer with lazy loading fallback
|
|
22
22
|
let CodexInitializer;
|
|
23
23
|
// Try multiple resolution strategies for the @claude-flow/codex package
|
|
24
|
+
// Use a variable to prevent TypeScript from statically resolving the optional module
|
|
25
|
+
const codexModuleId = '@claude-flow/codex';
|
|
24
26
|
const resolutionStrategies = [
|
|
25
27
|
// Strategy 1: Direct import (works if installed as CLI dependency)
|
|
26
|
-
async () => (await import(
|
|
28
|
+
async () => (await import(codexModuleId)).CodexInitializer,
|
|
27
29
|
// Strategy 2: Project node_modules (works if installed in user's project)
|
|
28
30
|
async () => {
|
|
29
31
|
const projectPath = path.join(ctx.cwd, 'node_modules', '@claude-flow', 'codex', 'dist', 'index.js');
|
|
@@ -180,7 +182,7 @@ const initAction = async (ctx) => {
|
|
|
180
182
|
const initialized = isInitialized(cwd);
|
|
181
183
|
const hasExisting = initialized.claude || initialized.claudeFlow;
|
|
182
184
|
if (hasExisting && !force) {
|
|
183
|
-
output.printWarning('
|
|
185
|
+
output.printWarning('MoFlo appears to be already initialized');
|
|
184
186
|
if (initialized.claude)
|
|
185
187
|
output.printInfo(' Found: .claude/settings.json');
|
|
186
188
|
if (initialized.claudeFlow)
|
|
@@ -200,7 +202,7 @@ const initAction = async (ctx) => {
|
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
output.writeln();
|
|
203
|
-
output.writeln(output.bold('Initializing
|
|
205
|
+
output.writeln(output.bold('Initializing MoFlo V4'));
|
|
204
206
|
output.writeln();
|
|
205
207
|
// Build init options based on flags
|
|
206
208
|
let options;
|
|
@@ -240,7 +242,7 @@ const initAction = async (ctx) => {
|
|
|
240
242
|
}
|
|
241
243
|
return { success: false, exitCode: 1 };
|
|
242
244
|
}
|
|
243
|
-
spinner.succeed('
|
|
245
|
+
spinner.succeed('MoFlo V4 initialized successfully!');
|
|
244
246
|
output.writeln();
|
|
245
247
|
// Display summary
|
|
246
248
|
const summary = [];
|
|
@@ -391,7 +393,7 @@ const wizardCommand = {
|
|
|
391
393
|
description: 'Interactive setup wizard for comprehensive configuration',
|
|
392
394
|
action: async (ctx) => {
|
|
393
395
|
output.writeln();
|
|
394
|
-
output.writeln(output.bold('
|
|
396
|
+
output.writeln(output.bold('MoFlo V4 Setup Wizard'));
|
|
395
397
|
output.writeln(output.dim('Answer questions to configure your project'));
|
|
396
398
|
output.writeln();
|
|
397
399
|
try {
|
|
@@ -625,7 +627,7 @@ const wizardCommand = {
|
|
|
625
627
|
// Check subcommand
|
|
626
628
|
const checkCommand = {
|
|
627
629
|
name: 'check',
|
|
628
|
-
description: 'Check if
|
|
630
|
+
description: 'Check if MoFlo is initialized',
|
|
629
631
|
action: async (ctx) => {
|
|
630
632
|
const initialized = isInitialized(ctx.cwd);
|
|
631
633
|
const result = {
|
|
@@ -642,7 +644,7 @@ const checkCommand = {
|
|
|
642
644
|
return { success: true, data: result };
|
|
643
645
|
}
|
|
644
646
|
if (result.initialized) {
|
|
645
|
-
output.printSuccess('
|
|
647
|
+
output.printSuccess('MoFlo is initialized');
|
|
646
648
|
if (initialized.claude) {
|
|
647
649
|
output.printInfo(` Claude Code: .claude/settings.json`);
|
|
648
650
|
}
|
|
@@ -651,8 +653,8 @@ const checkCommand = {
|
|
|
651
653
|
}
|
|
652
654
|
}
|
|
653
655
|
else {
|
|
654
|
-
output.printWarning('
|
|
655
|
-
output.printInfo('Run "
|
|
656
|
+
output.printWarning('MoFlo is not initialized in this directory');
|
|
657
|
+
output.printInfo('Run "flo init" to initialize');
|
|
656
658
|
}
|
|
657
659
|
return { success: true, data: result };
|
|
658
660
|
},
|
|
@@ -795,7 +797,7 @@ const upgradeCommand = {
|
|
|
795
797
|
const addMissing = (ctx.flags['add-missing'] || ctx.flags.addMissing);
|
|
796
798
|
const upgradeSettings = (ctx.flags.settings);
|
|
797
799
|
output.writeln();
|
|
798
|
-
output.writeln(output.bold('Upgrading
|
|
800
|
+
output.writeln(output.bold('Upgrading MoFlo'));
|
|
799
801
|
if (addMissing && upgradeSettings) {
|
|
800
802
|
output.writeln(output.dim('Updates helpers, settings, and adds any missing skills/agents/commands'));
|
|
801
803
|
}
|
|
@@ -895,7 +897,7 @@ const upgradeCommand = {
|
|
|
895
897
|
// Main init command
|
|
896
898
|
export const initCommand = {
|
|
897
899
|
name: 'init',
|
|
898
|
-
description: 'Initialize
|
|
900
|
+
description: 'Initialize MoFlo in the current directory',
|
|
899
901
|
subcommands: [wizardCommand, checkCommand, skillsCommand, hooksCommand, upgradeCommand],
|
|
900
902
|
options: [
|
|
901
903
|
{
|
|
@@ -1435,7 +1435,7 @@ export const neuralCommand = {
|
|
|
1435
1435
|
],
|
|
1436
1436
|
action: async () => {
|
|
1437
1437
|
output.writeln();
|
|
1438
|
-
output.writeln(output.bold('
|
|
1438
|
+
output.writeln(output.bold('MoFlo Neural System'));
|
|
1439
1439
|
output.writeln(output.dim('Advanced AI pattern learning and inference'));
|
|
1440
1440
|
output.writeln();
|
|
1441
1441
|
output.writeln('Use --help with subcommands for more info');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MoFlo Orc Command
|
|
3
|
-
* Feature orchestrator that sequences GitHub issues through /
|
|
3
|
+
* Feature orchestrator that sequences GitHub issues through /flo workflows.
|
|
4
4
|
*
|
|
5
5
|
* Loads a feature YAML definition, resolves story dependencies via topological
|
|
6
|
-
* sort, then executes each story sequentially by spawning `claude -p "/
|
|
6
|
+
* sort, then executes each story sequentially by spawning `claude -p "/flo ..."`.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* flo orc run <feature.yaml> Execute a feature
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MoFlo Orc Command
|
|
3
|
-
* Feature orchestrator that sequences GitHub issues through /
|
|
3
|
+
* Feature orchestrator that sequences GitHub issues through /flo workflows.
|
|
4
4
|
*
|
|
5
5
|
* Loads a feature YAML definition, resolves story dependencies via topological
|
|
6
|
-
* sort, then executes each story sequentially by spawning `claude -p "/
|
|
6
|
+
* sort, then executes each story sequentially by spawning `claude -p "/flo ..."`.
|
|
7
7
|
*
|
|
8
8
|
* Usage:
|
|
9
9
|
* flo orc run <feature.yaml> Execute a feature
|
|
@@ -307,12 +307,12 @@ async function runFeature(yamlPath, dryRun, verbose) {
|
|
|
307
307
|
console.log(`| Base: ${pad(feature.base_branch, 53)}|`);
|
|
308
308
|
console.log(`| Auto-merge: ${pad(autoMerge ? 'yes' : 'no', 47)}|`);
|
|
309
309
|
console.log('+-------------------------------------------------------------+');
|
|
310
|
-
console.log('| Stories (via /
|
|
310
|
+
console.log('| Stories (via /flo): |');
|
|
311
311
|
for (let i = 0; i < plan.order.length; i++) {
|
|
312
312
|
const story = feature.stories.find((s) => s.id === plan.order[i]);
|
|
313
313
|
const deps = story.depends_on?.length ? ` -> after ${story.depends_on.join(', ')}` : '';
|
|
314
|
-
const flags = story.
|
|
315
|
-
const line = `${i + 1}. /
|
|
314
|
+
const flags = story.flo_flags || '-sw';
|
|
315
|
+
const line = `${i + 1}. /flo ${story.issue} ${flags}${deps}`;
|
|
316
316
|
console.log(`| ${pad(line, 57)}|`);
|
|
317
317
|
console.log(`| ${pad(story.name.substring(0, 55), 55)}|`);
|
|
318
318
|
}
|
|
@@ -388,11 +388,11 @@ async function runFeature(yamlPath, dryRun, verbose) {
|
|
|
388
388
|
}
|
|
389
389
|
// ── Run the story ─────────────────────────────────────────────────
|
|
390
390
|
const startedAt = new Date().toISOString();
|
|
391
|
-
const flags = storyDef.
|
|
391
|
+
const flags = storyDef.flo_flags || '-sw';
|
|
392
392
|
console.log('');
|
|
393
393
|
console.log(`=== Starting story: ${storyId} (#${storyDef.issue}) ===`);
|
|
394
394
|
console.log(` ${storyDef.name}`);
|
|
395
|
-
console.log(` Command: /
|
|
395
|
+
console.log(` Command: /flo ${storyDef.issue} ${flags}`);
|
|
396
396
|
console.log('');
|
|
397
397
|
// Update state to running
|
|
398
398
|
state.features[feature.id].stories[storyId].status = 'running';
|
|
@@ -409,7 +409,7 @@ async function runFeature(yamlPath, dryRun, verbose) {
|
|
|
409
409
|
console.log('[warn] Failed to pull base branch -- continuing anyway');
|
|
410
410
|
}
|
|
411
411
|
// Spawn claude
|
|
412
|
-
const command = `/
|
|
412
|
+
const command = `/flo ${storyDef.issue} ${flags}`.trim();
|
|
413
413
|
const runResult = await runClaudeSession(command, feature.repository, STORY_TIMEOUT_MS, verbose ? (text) => process.stdout.write(text) : undefined);
|
|
414
414
|
if (!runResult.success) {
|
|
415
415
|
console.log(`[FAIL] ${storyId}: ${runResult.error}`);
|
|
@@ -430,17 +430,17 @@ async function runFeature(yamlPath, dryRun, verbose) {
|
|
|
430
430
|
// Find the PR
|
|
431
431
|
const prInfo = findPrForIssue(storyDef.issue, feature.repository);
|
|
432
432
|
if (!prInfo) {
|
|
433
|
-
console.log(`[FAIL] ${storyId}: No PR found after /
|
|
433
|
+
console.log(`[FAIL] ${storyId}: No PR found after /flo completed`);
|
|
434
434
|
state.features[feature.id].stories[storyId].status = 'failed';
|
|
435
435
|
state.features[feature.id].stories[storyId].completed_at = new Date().toISOString();
|
|
436
436
|
state.features[feature.id].stories[storyId].duration_ms = runResult.durationMs;
|
|
437
|
-
state.features[feature.id].stories[storyId].error = 'No PR created by /
|
|
437
|
+
state.features[feature.id].stories[storyId].error = 'No PR created by /flo';
|
|
438
438
|
saveState(feature.repository, state);
|
|
439
439
|
results.push({
|
|
440
440
|
story_id: storyId, issue: storyDef.issue, status: 'failed',
|
|
441
441
|
started_at: startedAt, completed_at: new Date().toISOString(),
|
|
442
442
|
duration_ms: runResult.durationMs, pr_url: null, pr_number: null,
|
|
443
|
-
merged: false, error: 'No PR created by /
|
|
443
|
+
merged: false, error: 'No PR created by /flo',
|
|
444
444
|
});
|
|
445
445
|
failed = true;
|
|
446
446
|
break;
|
|
@@ -568,7 +568,7 @@ function printSummary(feature, results, order) {
|
|
|
568
568
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
569
569
|
const orcCommand = {
|
|
570
570
|
name: 'orc',
|
|
571
|
-
description: 'Feature orchestrator — sequences GitHub issues through /
|
|
571
|
+
description: 'Feature orchestrator — sequences GitHub issues through /flo workflows',
|
|
572
572
|
options: [],
|
|
573
573
|
examples: [
|
|
574
574
|
{ command: 'flo orc run feature.yaml', description: 'Execute a feature definition' },
|
|
@@ -552,7 +552,7 @@ export const performanceCommand = {
|
|
|
552
552
|
],
|
|
553
553
|
action: async () => {
|
|
554
554
|
output.writeln();
|
|
555
|
-
output.writeln(output.bold('
|
|
555
|
+
output.writeln(output.bold('MoFlo Performance Suite'));
|
|
556
556
|
output.writeln(output.dim('Advanced performance profiling and optimization'));
|
|
557
557
|
output.writeln();
|
|
558
558
|
output.writeln('Subcommands:');
|
|
@@ -777,7 +777,7 @@ export const pluginsCommand = {
|
|
|
777
777
|
],
|
|
778
778
|
action: async () => {
|
|
779
779
|
output.writeln();
|
|
780
|
-
output.writeln(output.bold('
|
|
780
|
+
output.writeln(output.bold('MoFlo Plugin System'));
|
|
781
781
|
output.writeln(output.dim('Decentralized plugin marketplace via IPFS'));
|
|
782
782
|
output.writeln();
|
|
783
783
|
output.writeln('Subcommands:');
|
|
@@ -204,7 +204,7 @@ export const providersCommand = {
|
|
|
204
204
|
],
|
|
205
205
|
action: async () => {
|
|
206
206
|
output.writeln();
|
|
207
|
-
output.writeln(output.bold('
|
|
207
|
+
output.writeln(output.bold('MoFlo Provider Management'));
|
|
208
208
|
output.writeln(output.dim('Multi-provider AI orchestration'));
|
|
209
209
|
output.writeln();
|
|
210
210
|
output.writeln('Subcommands:');
|
|
@@ -553,7 +553,7 @@ export const securityCommand = {
|
|
|
553
553
|
],
|
|
554
554
|
action: async () => {
|
|
555
555
|
output.writeln();
|
|
556
|
-
output.writeln(output.bold('
|
|
556
|
+
output.writeln(output.bold('MoFlo Security Suite'));
|
|
557
557
|
output.writeln(output.dim('Comprehensive security scanning and vulnerability management'));
|
|
558
558
|
output.writeln();
|
|
559
559
|
output.writeln('Subcommands:');
|
|
@@ -89,8 +89,8 @@ const startAction = async (ctx) => {
|
|
|
89
89
|
const cwd = ctx.cwd;
|
|
90
90
|
// Check initialization
|
|
91
91
|
if (!isInitialized(cwd)) {
|
|
92
|
-
output.printError('
|
|
93
|
-
output.printInfo('Run "
|
|
92
|
+
output.printError('MoFlo is not initialized in this directory');
|
|
93
|
+
output.printInfo('Run "flo init" first to initialize');
|
|
94
94
|
return { success: false, exitCode: 1 };
|
|
95
95
|
}
|
|
96
96
|
// Load configuration
|
|
@@ -102,7 +102,7 @@ const startAction = async (ctx) => {
|
|
|
102
102
|
const autoStartMcp = mcpConfig.autoStart !== false && !skipMcp;
|
|
103
103
|
const mcpPort = port || mcpConfig.serverPort || DEFAULT_PORT;
|
|
104
104
|
output.writeln();
|
|
105
|
-
output.writeln(output.bold('Starting
|
|
105
|
+
output.writeln(output.bold('Starting MoFlo V4'));
|
|
106
106
|
output.writeln();
|
|
107
107
|
const spinner = output.createSpinner({ text: 'Initializing system...' });
|
|
108
108
|
try {
|
|
@@ -151,7 +151,7 @@ const startAction = async (ctx) => {
|
|
|
151
151
|
}
|
|
152
152
|
// Success output
|
|
153
153
|
output.writeln();
|
|
154
|
-
output.printSuccess('
|
|
154
|
+
output.printSuccess('MoFlo V4 is running!');
|
|
155
155
|
output.writeln();
|
|
156
156
|
// Status display
|
|
157
157
|
output.printBox([
|
|
@@ -230,7 +230,7 @@ const startAction = async (ctx) => {
|
|
|
230
230
|
// Stop subcommand
|
|
231
231
|
const stopCommand = {
|
|
232
232
|
name: 'stop',
|
|
233
|
-
description: 'Stop the
|
|
233
|
+
description: 'Stop the MoFlo system',
|
|
234
234
|
options: [
|
|
235
235
|
{
|
|
236
236
|
name: 'force',
|
|
@@ -250,11 +250,11 @@ const stopCommand = {
|
|
|
250
250
|
const force = ctx.flags.force;
|
|
251
251
|
const timeout = ctx.flags.timeout;
|
|
252
252
|
output.writeln();
|
|
253
|
-
output.writeln(output.bold('Stopping
|
|
253
|
+
output.writeln(output.bold('Stopping MoFlo'));
|
|
254
254
|
output.writeln();
|
|
255
255
|
if (!force && ctx.interactive) {
|
|
256
256
|
const confirmed = await confirm({
|
|
257
|
-
message: 'Are you sure you want to stop
|
|
257
|
+
message: 'Are you sure you want to stop MoFlo?',
|
|
258
258
|
default: false
|
|
259
259
|
});
|
|
260
260
|
if (!confirmed) {
|
|
@@ -294,7 +294,7 @@ const stopCommand = {
|
|
|
294
294
|
fs.unlinkSync(daemonPidPath);
|
|
295
295
|
}
|
|
296
296
|
output.writeln();
|
|
297
|
-
output.printSuccess('
|
|
297
|
+
output.printSuccess('MoFlo stopped successfully');
|
|
298
298
|
return {
|
|
299
299
|
success: true,
|
|
300
300
|
data: { stopped: true, force, stoppedAt: new Date().toISOString() }
|
|
@@ -310,7 +310,7 @@ const stopCommand = {
|
|
|
310
310
|
// Restart subcommand
|
|
311
311
|
const restartCommand = {
|
|
312
312
|
name: 'restart',
|
|
313
|
-
description: 'Restart the
|
|
313
|
+
description: 'Restart the MoFlo system',
|
|
314
314
|
options: [
|
|
315
315
|
{
|
|
316
316
|
name: 'force',
|
|
@@ -322,7 +322,7 @@ const restartCommand = {
|
|
|
322
322
|
],
|
|
323
323
|
action: async (ctx) => {
|
|
324
324
|
output.writeln();
|
|
325
|
-
output.writeln(output.bold('Restarting
|
|
325
|
+
output.writeln(output.bold('Restarting MoFlo'));
|
|
326
326
|
output.writeln();
|
|
327
327
|
// Stop first
|
|
328
328
|
const stopCtx = { ...ctx, flags: { ...ctx.flags } };
|
|
@@ -372,7 +372,7 @@ const quickCommand = {
|
|
|
372
372
|
// Main start command
|
|
373
373
|
export const startCommand = {
|
|
374
374
|
name: 'start',
|
|
375
|
-
description: 'Start the
|
|
375
|
+
description: 'Start the MoFlo orchestration system',
|
|
376
376
|
subcommands: [stopCommand, restartCommand, quickCommand],
|
|
377
377
|
options: [
|
|
378
378
|
{
|
|
@@ -152,7 +152,7 @@ function displayStatus(status) {
|
|
|
152
152
|
const statusIcon = status.running
|
|
153
153
|
? output.success('[RUNNING]')
|
|
154
154
|
: output.warning('[STOPPED]');
|
|
155
|
-
output.writeln(`${output.bold('
|
|
155
|
+
output.writeln(`${output.bold('MoFlo V4')} ${statusIcon}`);
|
|
156
156
|
output.writeln();
|
|
157
157
|
// Swarm section
|
|
158
158
|
output.writeln(output.bold('Swarm'));
|
|
@@ -267,8 +267,8 @@ const statusAction = async (ctx) => {
|
|
|
267
267
|
const cwd = ctx.cwd;
|
|
268
268
|
// Check initialization
|
|
269
269
|
if (!isInitialized(cwd)) {
|
|
270
|
-
output.printError('
|
|
271
|
-
output.printInfo('Run "
|
|
270
|
+
output.printError('MoFlo is not initialized in this directory');
|
|
271
|
+
output.printInfo('Run "flo init" to initialize');
|
|
272
272
|
return { success: false, exitCode: 1 };
|
|
273
273
|
}
|
|
274
274
|
// Get status
|
|
@@ -405,7 +405,7 @@ export const storeCommand = {
|
|
|
405
405
|
],
|
|
406
406
|
action: async () => {
|
|
407
407
|
output.writeln();
|
|
408
|
-
output.writeln(output.bold('
|
|
408
|
+
output.writeln(output.bold('MoFlo Pattern Store'));
|
|
409
409
|
output.writeln(output.dim('Decentralized pattern marketplace via IPFS'));
|
|
410
410
|
output.writeln();
|
|
411
411
|
output.writeln('Subcommands:');
|