fix: keep workbench Kafka publisher worker-owned

This commit is contained in:
root
2026-07-20 22:55:15 +02:00
parent 4806b9b3cd
commit a032015cba
3 changed files with 25 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { createWorkbenchHttpApp } from "../../internal/workbench/http.ts";
import { workbenchRuntime } from "../../internal/workbench/runtime.ts";
import { startHwlabKafkaEventBridge } from "../../internal/cloud/kafka-event-bridge.ts";
const runtime = workbenchRuntime();
const runtime = workbenchRuntime(process.env, { eventPublisher: null });
const kafkaEventBridge = runtime.mode === "agentrun-native" ? startHwlabKafkaEventBridge({ env: process.env }) : null;
const app = createWorkbenchHttpApp({ dispatch: runtime.dispatch, snapshot: runtime.application.snapshot?.bind(runtime.application), authorization: process.env.WORKBENCH_API_AUTHORIZATION, mode: runtime.mode, kafkaEventBridge, close: async () => { await kafkaEventBridge?.stop?.(); await runtime.close(); } });
const host = process.env.WORKBENCH_API_HOST || "0.0.0.0";