- electrobun.config.ts: AGOR_CEF=1 enables bundleCEF + chromiumFlags (remote-debugging-port=9222). Production stays on WebKitGTK. - wdio.electrobun.conf.js: rewritten for CDP via devtools protocol. Spawns app, waits for CDP port, kills on complete. - helpers/actions.ts: waitForPort() polls CDP /json endpoint - docs/testing.md: CEF mode docs, CI setup, troubleshooting - npm script: test:e2e:electrobun prepends AGOR_CEF=1 CEF also enables: WebGL xterm.js addon (unlimited terminals), WebGPU, full Chrome DevTools — all for dev/test only.
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import type { ElectrobunConfig } from "electrobun";
|
|
|
|
// CEF mode: opt-in via AGOR_CEF=1. Used for dev/test (E2E automation via CDP,
|
|
// WebGL support, unlimited xterm instances). Production uses WebKitGTK (lighter,
|
|
// no Chromium dependency, system-native).
|
|
const useCEF = process.env.AGOR_CEF === "1";
|
|
|
|
// When CEF is active, enable remote debugging for CDP-based E2E automation.
|
|
const cefFlags: Record<string, string | boolean> | undefined = useCEF
|
|
? { "remote-debugging-port": "9222", "remote-allow-origins": "*" }
|
|
: undefined;
|
|
|
|
export default {
|
|
app: {
|
|
name: "Agent Orchestrator",
|
|
identifier: "dev.agor.orchestrator",
|
|
version: "0.0.1",
|
|
},
|
|
build: {
|
|
bun: {
|
|
entrypoint: "src/bun/index.ts",
|
|
},
|
|
copy: {
|
|
"dist/index.html": "views/mainview/index.html",
|
|
"dist/assets": "views/mainview/assets",
|
|
},
|
|
watchIgnore: ["dist/**"],
|
|
mac: {
|
|
bundleCEF: useCEF,
|
|
bundleWGPU: true,
|
|
...(useCEF && { defaultRenderer: "cef" as const }),
|
|
...(cefFlags && { chromiumFlags: cefFlags }),
|
|
},
|
|
linux: {
|
|
bundleCEF: useCEF,
|
|
bundleWGPU: true,
|
|
...(useCEF && { defaultRenderer: "cef" as const }),
|
|
...(cefFlags && { chromiumFlags: cefFlags }),
|
|
},
|
|
win: {
|
|
bundleCEF: useCEF,
|
|
bundleWGPU: true,
|
|
...(useCEF && { defaultRenderer: "cef" as const }),
|
|
...(cefFlags && { chromiumFlags: cefFlags }),
|
|
},
|
|
},
|
|
} satisfies ElectrobunConfig;
|