waygraph / EngineConfig
Interface: EngineConfig
Defined in: src/engine/config.ts:32
Configures how an Engine launches its own browser - only used by Flow.run(mem) (no context given); ignored by Flow.run(context, mem), since that context is already launched.
Properties
api?
optionalapi?:PageApi
Defined in: src/engine/config.ts:69
The app's API, for what a page's read asks it (ctx.page.api(path, pick)): where it is and how a request is signed from the page's own session.
Example
new Engine({ api: { baseUrl: "http://localhost:3091", headers: async (page) => ({ authorization: `Bearer ${await page.evaluate(() => localStorage.getItem("accessToken"))}` }) } })baseUrl?
optionalbaseUrl?:string
Defined in: src/engine/config.ts:71
Resolves relative urls in Nav Blocks when the Engine launches its own browser. Default WAYGRAPH_BASE_URL.
browserName?
optionalbrowserName?:"chromium"|"firefox"|"webkit"
Defined in: src/engine/config.ts:36
Default "chromium".
browsers?
optionalbrowsers?:Partial<Record<"chromium"|"firefox"|"webkit",BrowserType<{ }>>>
Defined in: src/engine/config.ts:50
Overrides which BrowserType actually launches, per browser name - default is the real @playwright/test export for whichever one browserName picks. Accepts anything shaped like Playwright's own chromium/firefox/webkit (same .launch() signature) - a stealth-patched or otherwise customized launcher (e.g. playwright-extra plus a stealth plugin) drops in here unmodified. Puppeteer is a different Page/BrowserContext shape entirely and isn't supported by this seam.
Example
new Engine({ browsers: { chromium: stealthChromium } })extensions?
optionalextensions?: readonlyExtensionSpec[]
Defined in: src/engine/config.ts:58
Chromium extensions to load: names, store ids or paths (see extensions in waygraph.config.ts). Default WAYGRAPH_EXTENSIONS.
headless?
optionalheadless?:boolean
Defined in: src/engine/config.ts:34
Default true, matching Playwright's own default.
memStub?
optionalmemStub?:boolean
Defined in: src/engine/config.ts:63
Every flow from this Engine fills missing keys from mem stubs, as map({ memStub: true }) does for one flow.
Example
new Engine({ memStub: true })recordVideo?
optionalrecordVideo?:object
Defined in: src/engine/config.ts:56
Playwright recordVideo - saves a .webm when the context closes. Works headless. Lighter than a full clip-engine pipeline (no overlay/ffmpeg).
dir
dir:
string
size?
optionalsize?:object
size.height
height:
number
size.width
width:
number
Example
new Engine({ recordVideo: { dir: "./videos" } })slowMo?
optionalslowMo?:number
Defined in: src/engine/config.ts:38
Milliseconds Playwright pauses before each operation - for watching a non-headless run with your own eyes, not for real runs. Default 0.