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/benchmark/src/swarm_benchmark/core/claude_flow_real_executor.py

rUva4179c5039e7
diff --git a/.claude/checkpoints/1754482639.json b/.claude/checkpoints/1754482639.json
new file mode 100644
index 0000000000..d1e233d163
--- /dev/null
+++ b/.claude/checkpoints/1754482639.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250806-121719", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/core/claude_flow_real_executor.py", "timestamp": "2025-08-06T12:17:19Z", "type": "pre-edit", "original_branch": "alpha-88"}
diff --git a/.claude/checkpoints/1754482640.json b/.claude/checkpoints/1754482640.json
new file mode 100644
index 0000000000..bccd3a52a8
--- /dev/null
+++ b/.claude/checkpoints/1754482640.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250806-121720", "file": "/workspaces/claude-code-flow/benchmark/src/swarm_benchmark/core/claude_flow_real_executor.py", "timestamp": "2025-08-06T12:17:20Z", "type": "post-edit", "branch": "alpha-88", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 24 +++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +++--- .claude/checkpoints/task-1754482584.json | 1 + .../core/claude_flow_real_executor.py | 25 ++++++++++++++-------- claude-flow-wiki | 0 6 files changed, 45 insertions(+), 13 deletions(-) "}
diff --git a/benchmark/src/swarm_benchmark/core/claude_flow_real_executor.py b/benchmark/src/swarm_benchmark/core/claude_flow_real_executor.py
index 7a39825624..07042a5b66 100644
--- a/benchmark/src/swarm_benchmark/core/claude_flow_real_executor.py
+++ b/benchmark/src/swarm_benchmark/core/claude_flow_real_executor.py
@@ -305,81 +305,6 @@ class RealClaudeFlowExecutor:
timeout = min(config.timeout * 60, 300)
return self._execute_streaming_command(command, timeout)
-
- # Simulate task based on strategy
- if config.strategy == "development":
- # Create a simple implementation
- if "calculator" in config.objective.lower():
- calc_file = output_dir / "calculator.mjs"
- calc_content = """// Simple Calculator
-export class Calculator {
- add(a, b) { return a + b; }
- subtract(a, b) { return a - b; }
- multiply(a, b) { return a * b; }
- divide(a, b) {
- if (b === 0) throw new Error("Division by zero");
- return a / b;
- }
-}
-
-// Test the calculator
-const calc = new Calculator();
-console.log("2 + 3 =", calc.add(2, 3));
-console.log("10 - 4 =", calc.subtract(10, 4));
-console.log("3 * 7 =", calc.multiply(3, 7));
-console.log("15 / 3 =", calc.divide(15, 3));
-"""
- calc_file.write_text(calc_content)
- output_files = [str(calc_file)]
- else:
- # Generic implementation
- impl_file = output_dir / "implementation.mjs"
- impl_content = f"""// Implementation for: {config.objective}
-// Strategy: {config.strategy}
-// Generated by swarm benchmark
-
-export function main() {{
- console.log("Executing: {config.objective}");
- return {{ status: "success", strategy: "{config.strategy}" }};
-}}
-
-main();
-"""
- impl_file.write_text(impl_content)
- output_files = [str(impl_file)]
- else:
- # For other strategies, create appropriate output
- output_file = output_dir / f"{config.strategy}_output.md"
- output_content = f"""# {config.objective}
-
-## Strategy: {config.strategy.upper()}
-
-### Summary
-Successfully completed {config.strategy} for: {config.objective}
-
-### Details
-- Mode: {config.mode}
-- Max Agents: {config.max_agents}
-- Timeout: {config.timeout}s
-
-### Results
-✅ Task completed successfully
-"""
- output_file.write_text(output_content)
- output_files = [str(output_file)]
-
- duration = time.time() - start_time
-
- return RealExecutionResult(
- success=True,
- command=["swarm", config.objective, "--strategy", config.strategy],
- exit_code=0,
- duration=duration,
- stdout_lines=[f"✅ Created {f}" for f in output_files],
- stderr_lines=[],
- tasks_completed=1,
- agents_spawned=config.max_agents
- )
def execute_hive_mind(self, config: HiveMindCommand) -> RealExecutionResult:
"""Execute a real hive-mind command."""