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

rUvda0f51e27915
diff --git a/.claude/checkpoints/1755024418.json b/.claude/checkpoints/1755024418.json
new file mode 100644
index 0000000000..5a6be3ae99
--- /dev/null
+++ b/.claude/checkpoints/1755024418.json
@@ -0,0 +1 @@
+{"branch": "checkpoint/pre-edit-20250812-184658", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T18:46:58Z", "type": "pre-edit", "original_branch": "alpha-89"}
diff --git a/.claude/checkpoints/1755024419.json b/.claude/checkpoints/1755024419.json
new file mode 100644
index 0000000000..6c060a1387
--- /dev/null
+++ b/.claude/checkpoints/1755024419.json
@@ -0,0 +1 @@
+{"tag": "checkpoint-20250812-184659", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/stream-chain.js", "timestamp": "2025-08-12T18:46:59Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 12 ++++++++++++ .claude-flow/metrics/task-metrics.json | 6 +++--- claude-flow-wiki | 0 src/cli/simple-commands/stream-chain.js | 4 ++-- 5 files changed, 18 insertions(+), 6 deletions(-) "}
diff --git a/src/cli/simple-commands/stream-chain.js b/src/cli/simple-commands/stream-chain.js
index 35eb4380ae..b3c7ce3d45 100644
--- a/src/cli/simple-commands/stream-chain.js
+++ b/src/cli/simple-commands/stream-chain.js
@@ -398,6 +398,7 @@ async function executeStreamStep(prompt, inputStream, isLast, flags = {}) {
let output = '';
let streamOutput = '';
let errorOutput = '';
+ let receivedResult = false;
// Note: Input stream chaining disabled for now due to format complexity
// Each step runs independently with just the prompt
@@ -410,6 +411,24 @@ async function executeStreamStep(prompt, inputStream, isLast, flags = {}) {
streamOutput += chunk;
}
+ // Check if we received a complete result in stream-json format
+ if (output.includes('"type":"result"') && !receivedResult) {
+ receivedResult = true;
+ // Give a short delay for any remaining output, then resolve
+ setTimeout(() => {
+ if (!resolved) {
+ clearTimeout(timeoutId);
+ safeResolve({
+ success: true,
+ duration: Date.now() - startTime,
+ output,
+ stream: streamOutput,
+ error: errorOutput
+ });
+ }
+ }, 1000);
+ }
+
// Show progress for verbose mode
if (flags.verbose) {
process.stdout.write('.');