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/stream-chain.js

rUv233be9432a03
diff --git a/.claude/checkpoints/1755023445.json b/.claude/checkpoints/1755023445.json
new file mode 100644
index 0000000000..9d25c53f73
--- /dev/null
+++ b/.claude/checkpoints/1755023445.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250812-183045", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T18:30:45Z", "type": "pre-edit", "original_branch": "alpha-89"}
diff --git a/.claude/checkpoints/1755023447.json b/.claude/checkpoints/1755023447.json
new file mode 100644
index 0000000000..3ec8e953b6
--- /dev/null
+++ b/.claude/checkpoints/1755023447.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250812-183047", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T18:30:47Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 6 +- .claude-flow/metrics/system-metrics.json | 6098 +----------------------------- .claude-flow/metrics/task-metrics.json | 14 +- .claude/checkpoints/1755023408.json | 1 + .claude/checkpoints/1755023410.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/stream-chain.js | 4 +- 7 files changed, 29 insertions(+), 6095 deletions(-) "}
diff --git a/src/cli/simple-commands/stream-chain.js b/src/cli/simple-commands/stream-chain.js
index 2c6965bddb..a6bf4363b2 100644
--- a/src/cli/simple-commands/stream-chain.js
+++ b/src/cli/simple-commands/stream-chain.js
@@ -331,13 +331,21 @@ async function runStreamChain(prompts, flags) {
async function executeStreamStep(prompt, inputStream, isLast, flags = {}) {
return new Promise((resolve) => {
const startTime = Date.now();
+ let resolved = false; // Prevent double resolution
+
+ const safeResolve = (result) => {
+ if (!resolved) {
+ resolved = true;
+ resolve(result);
+ }
+ };
// Check if we should use mock mode
const useMock = flags.mock || !checkClaudeAvailable();
if (useMock) {
// Mock implementation when claude CLI isn't available or mock flag is set
- return mockStreamStep(prompt, inputStream, isLast, flags, resolve, startTime);
+ return mockStreamStep(prompt, inputStream, isLast, flags, safeResolve, startTime);
}
// Set a reasonable timeout for demo purposes (10 seconds per step)