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: Edit /workspaces/claude-code-flow/src/cli/simple-commands/swarm.js

rUv05f7c9f65d58
diff --git a/.claude/checkpoints/task-1754486645.json b/.claude/checkpoints/task-1754486645.json
new file mode 100644
index 0000000000..d23d8c388e
--- /dev/null
+++ b/.claude/checkpoints/task-1754486645.json
@@ -0,0 +1 @@
+{"checkpoint": "task-20250806-132404", "task": "You are orchestrating a Claude Flow Swarm with advanced MCP tool coordination. 🎯 OBJECTIVE: test", "timestamp": "2025-08-06T13:24:05Z", "commit": "ec86e654c7a507c9d609be00154471a24ab947f4", "github_release": "true"}
diff --git a/src/cli/simple-commands/swarm.js b/src/cli/simple-commands/swarm.js
index 6785a4df7a..9149f72bc5 100644
--- a/src/cli/simple-commands/swarm.js
+++ b/src/cli/simple-commands/swarm.js
@@ -768,14 +768,24 @@ The swarm should be self-documenting - use memory_store to save all important in
// If --claude flag is used, force Claude Code even if CLI not available
if (flags && flags.claude) {
- console.log('🐝 Launching Claude Flow Swarm System...');
- console.log(`πŸ“‹ Objective: ${objective}`);
- console.log(`🎯 Strategy: ${strategy}`);
- console.log(`πŸ—οΈ Mode: ${mode}`);
- console.log(`πŸ€– Max Agents: ${maxAgents}\n`);
+ // Check if we're in non-interactive mode FIRST
+ const isNonInteractive = flags['no-interactive'] ||
+ flags['non-interactive'] ||
+ flags['output-format'] === 'stream-json' ||
+ isHeadlessEnvironment();
- console.log('πŸš€ Launching Claude Code with Swarm Coordination');
- console.log('─'.repeat(60));
+ if (!isNonInteractive) {
+ console.log('🐝 Launching Claude Flow Swarm System...');
+ console.log(`πŸ“‹ Objective: ${objective}`);
+ console.log(`🎯 Strategy: ${strategy}`);
+ console.log(`πŸ—οΈ Mode: ${mode}`);
+ console.log(`πŸ€– Max Agents: ${maxAgents}\n`);
+
+ console.log('πŸš€ Launching Claude Code with Swarm Coordination');
+ console.log('─'.repeat(60));
+ } else {
+ console.log('πŸ€– Running in non-interactive mode with Claude');
+ }
// Pass the prompt directly as an argument to claude
const claudeArgs = [swarmPrompt];
@@ -783,7 +793,16 @@ The swarm should be self-documenting - use memory_store to save all important in
// Add auto-permission flag by default for swarm mode (unless explicitly disabled)
if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {
claudeArgs.push('--dangerously-skip-permissions');
- console.log('πŸ”“ Using --dangerously-skip-permissions by default for seamless swarm execution');
+ if (!isNonInteractive) {
+ console.log('πŸ”“ Using --dangerously-skip-permissions by default for seamless swarm execution');
+ }
+ }
+
+ // Add non-interactive flags if needed
+ if (isNonInteractive) {
+ claudeArgs.push('-p'); // Print mode
+ claudeArgs.push('--output-format', 'stream-json'); // JSON streaming
+ claudeArgs.push('--verbose'); // Verbose output
}
// Spawn claude with the prompt as the first argument (exactly like hive-mind does)