packages/cua-driver/docs/browser-engine-support-plan.md
This is an architecture explanation and implementation roadmap. It records why the typed browser surface supports an engine only after it can preserve exact targeting, approval, and background-delivery guarantees. It is not a support matrix; the public support contract remains the source of truth for accepted browser and platform combinations.
The current browser engine is CDP-native. Core owns a CdpConnection, binds a
native window to an exact Chromium target, and re-proves process, window,
endpoint, generation, and tab identity before mutation. BrowserPlatform
abstracts operating-system identity and endpoint ownership, not the browser
wire protocol.
This boundary is appropriate for Chromium but cannot truthfully represent
Firefox or Safari by renaming CDP concepts. Unsupported engines therefore
return browser_route_unavailable with bounded engine_family, product,
required_protocol, and limitation detail before native-window or endpoint
probing.
Firefox's Remote Agent implements WebDriver BiDi. Mozilla documents that it is
started with --remote-debugging-port, accepts loopback connections, and has no
other enablement mechanism. An ordinary Firefox process that was not launched
with the flag cannot become attachable without a restart. See Mozilla's
Remote Agent security model.
Consequences:
Safari automation uses safaridriver and WebDriver. Apple requires the host to
enable remote automation and describes additional isolation between automation
sessions and normal browsing data. See Enable WebDriver on macOS
and About WebDriver for Safari.
Consequences:
A future multi-engine implementation should introduce a protocol boundary
above CDP rather than expand BrowserPlatform:
BrowserTransport owns connection, generation, and reconnect behavior.BrowserContextId replaces CDP target and session identifiers in the public
capability store.No adapter may silently emulate a missing engine action with foreground desktop input. It either meets the typed action contract or returns a stable refusal.
An engine becomes supported only when representative real-browser rows prove: