fix: connect L1 Workbench to AgentRun v0.2

This commit is contained in:
root
2026-07-18 04:41:49 +02:00
parent 3bb7b67a4e
commit 3d9c69adaa
10 changed files with 404 additions and 31 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { createWorkbenchHttpApp } from "../../internal/workbench/http.ts";
import { workbenchRuntime } from "../../internal/workbench/runtime.ts";
const runtime = workbenchRuntime();
const app = createWorkbenchHttpApp({ dispatch: runtime.dispatch, snapshot: runtime.application.snapshot?.bind(runtime.application), authorization: process.env.WORKBENCH_API_AUTHORIZATION, close: runtime.close });
const app = createWorkbenchHttpApp({ dispatch: runtime.dispatch, snapshot: runtime.application.snapshot?.bind(runtime.application), authorization: process.env.WORKBENCH_API_AUTHORIZATION, mode: runtime.mode, close: runtime.close });
const host = process.env.WORKBENCH_API_HOST || "0.0.0.0";
const port = positivePort(process.env.WORKBENCH_API_PORT || process.env.PORT, 6677);
const server = Bun.serve({ hostname: host, port, fetch: (request) => app.fetch(request) });
+1 -1
View File
@@ -6,7 +6,7 @@ import { createWorkbenchActivities } from "../../internal/workbench/activities.t
import { workbenchRuntime } from "../../internal/workbench/runtime.ts";
const runtime = workbenchRuntime();
if (runtime.mode !== "temporal") throw Object.assign(new Error("hwlab-workbench-worker requires WORKBENCH_MODE=temporal"), { code: "workbench_worker_temporal_mode_required" });
if (runtime.mode === "native-test") throw Object.assign(new Error("hwlab-workbench-worker requires WORKBENCH_MODE=agentrun-native or temporal"), { code: "workbench_worker_temporal_mode_required" });
const connection = await NativeConnection.connect({ address: runtime.temporalAddress });
const worker = await Worker.create({
connection,