From 9d30bb3f04199857578e25e4a1f50a744a52ef05 Mon Sep 17 00:00:00 2001 From: John Watson Date: Fri, 27 Mar 2026 23:46:00 +0000 Subject: [PATCH] fix: forward driver onLog output as method_output events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Out-of-process execution drivers emit log lines via callbacks.onLog, but these were only sent to the logger — not through the onEvent stream. This meant WebSocket clients (swamp serve) never received method_output events from drivers like Tensorlake. Now onLog also emits MethodExecutionEvent { type: "output" } so the output appears in the event stream alongside in-process output. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/domain/models/method_execution_service.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/domain/models/method_execution_service.ts b/src/domain/models/method_execution_service.ts index 182c86d3..06b6be94 100644 --- a/src/domain/models/method_execution_service.ts +++ b/src/domain/models/method_execution_service.ts @@ -650,7 +650,14 @@ export class DefaultMethodExecutionService implements MethodExecutionService { "model.type": context.modelType.normalized, }, () => driver.execute(executionRequest, { - onLog: (line) => context.logger?.info(line), + onLog: (line) => { + context.logger?.info(line); + context.onEvent?.({ + type: "output", + stream: "stdout", + line, + }); + }, })); if (driverResult.status === "error") {