Skip to content

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? ​

optional api?: 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 ​

ts
new Engine({ api: { baseUrl: "http://localhost:3091", headers: async (page) => ({ authorization: `Bearer ${await page.evaluate(() => localStorage.getItem("accessToken"))}` }) } })

baseUrl? ​

optional baseUrl?: 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? ​

optional browserName?: "chromium" | "firefox" | "webkit"

Defined in: src/engine/config.ts:36

Default "chromium".


browsers? ​

optional browsers?: 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 ​

ts
new Engine({ browsers: { chromium: stealthChromium } })

extensions? ​

optional extensions?: readonly ExtensionSpec[]

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? ​

optional headless?: boolean

Defined in: src/engine/config.ts:34

Default true, matching Playwright's own default.


memStub? ​

optional memStub?: 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 ​

ts
new Engine({ memStub: true })

recordVideo? ​

optional recordVideo?: 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? ​

optional size?: object

size.height ​

height: number

size.width ​

width: number

Example ​

ts
new Engine({ recordVideo: { dir: "./videos" } })

slowMo? ​

optional slowMo?: 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.

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed