Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv652a81039398
diff --git a/v3/@claude-flow/cli/src/index.ts b/v3/@claude-flow/cli/src/index.ts
index daa70ee10c..fc2802f2d4 100644
--- a/v3/@claude-flow/cli/src/index.ts
+++ b/v3/@claude-flow/cli/src/index.ts
@@ -118,13 +118,18 @@ export class CLI {
// Find and execute command
const commandName = commandPath[0];
// First check the parser's registry (for dynamically registered commands)
- // Then fall back to the static registry
- const command = this.parser.getCommand(commandName) || getCommand(commandName);
+ // Then fall back to the static registry, then try lazy loading
+ let command = this.parser.getCommand(commandName) || getCommand(commandName);
+
+ // If not found in sync registry, try lazy loading
+ if (!command && hasCommand(commandName)) {
+ command = await getCommandAsync(commandName);
+ }
if (!command) {
this.output.printError(`Unknown command: ${commandName}`);
- // Smart suggestions
- const availableCommands = Array.from(new Set(commands.map(c => c.name)));
+ // Smart suggestions - include lazy-loadable commands in suggestions
+ const availableCommands = Array.from(new Set([...commands.map(c => c.name), ...getCommandNames()]));
const { message } = suggestCommand(commandName, availableCommands);
this.output.writeln(this.output.dim(` ${message}`));
process.exit(1);