From 16d80c0ce0ef8c5271a99dcdcccc0789b786559e Mon Sep 17 00:00:00 2001 From: rUv Date: Tue, 5 Aug 2025 02:58:43 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=96=20Checkpoint:=20Edit=20/workspaces?= =?UTF-8?q?/claude-code-flow/src/cli/simple-commands/automation-executor.j?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/checkpoints/1754362701.json | 1 + .claude/checkpoints/1754362702.json | 1 + .../simple-commands/automation-executor.js | 19 ++++++++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .claude/checkpoints/1754362701.json create mode 100644 .claude/checkpoints/1754362702.json diff --git a/.claude/checkpoints/1754362701.json b/.claude/checkpoints/1754362701.json new file mode 100644 index 0000000000..2370376e6d --- /dev/null +++ b/.claude/checkpoints/1754362701.json @@ -0,0 +1 @@ +{"branch": "checkpoint/pre-edit-20250805-025820", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/automation-executor.js", "timestamp": "2025-08-05T02:58:21Z", "type": "pre-edit", "original_branch": "alpha-85"} diff --git a/.claude/checkpoints/1754362702.json b/.claude/checkpoints/1754362702.json new file mode 100644 index 0000000000..95583aa5a7 --- /dev/null +++ b/.claude/checkpoints/1754362702.json @@ -0,0 +1 @@ +{"tag": "checkpoint-20250805-025822", "file": "/workspaces/claude-code-flow/src/cli/simple-commands/automation-executor.js", "timestamp": "2025-08-05T02:58:22Z", "type": "post-edit", "branch": "alpha-85", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 36 ++++++++++++++++++++++++++ .claude-flow/metrics/task-metrics.json | 6 ++--- .claude/checkpoints/1754362686.json | 1 + .claude/checkpoints/1754362687.json | 1 + claude-flow-wiki | 0 src/cli/simple-commands/automation-executor.js | 4 +++ 7 files changed, 46 insertions(+), 4 deletions(-) "} diff --git a/src/cli/simple-commands/automation-executor.js b/src/cli/simple-commands/automation-executor.js index c1a6f7029c..7dfe74121c 100644 --- a/src/cli/simple-commands/automation-executor.js +++ b/src/cli/simple-commands/automation-executor.js @@ -1122,8 +1122,25 @@ COORDINATION KEY POINTS: // Create task-specific prompt const taskPrompt = this.createTaskPrompt(task, agent, workflow); + // Check if we should chain from a previous task + let chainOptions = {}; + if (this.enableChaining && this.options.outputFormat === 'stream-json' && task.depends?.length > 0) { + // Get the output stream from the last dependency + const lastDependency = task.depends[task.depends.length - 1]; + const dependencyStream = this.taskOutputStreams.get(lastDependency); + if (dependencyStream) { + console.log(` 🔗 Enabling stream chaining from ${lastDependency} to ${task.id}`); + chainOptions.inputStream = dependencyStream; + } + } + // Spawn Claude instance for this specific task - const taskClaudeProcess = await this.spawnClaudeInstance(agent, taskPrompt); + const taskClaudeProcess = await this.spawnClaudeInstance(agent, taskPrompt, chainOptions); + + // Store the output stream for potential chaining + if (this.enableChaining && this.options.outputFormat === 'stream-json' && taskClaudeProcess.stdout) { + this.taskOutputStreams.set(task.id, taskClaudeProcess.stdout); + } // Store the instance this.claudeInstances.set(agent.id, {