OpenProgram Docs

User browsers

type="browser" with app drives a browser the user already runs, with their tabs and sign-ins. Every browser takes the same actions and returns the same snapshot; three engines sit behind them.

EngineappTransportModule
Chromiumchrome, chrome-beta, chrome-dev, chrome-canary, edge, edge-beta, edge-dev, edge-canary, brave, vivaldi, opera, arc, chromiumPlaywright MCP in extension mode, relaying CDP through the Playwright Extensionextension.py
Safarisafari (macOS)osascript: JXA for tabs and doJavaScript, AppleScript for new tabssafari.py over script_page.py
FirefoxfirefoxWebDriver BiDi over the remote agent's WebSocketfirefox.py over script_page.py

All modules are in openprogram/programs/applications/browser/. catalog.py holds one row per browser (name, label, engine, Playwright channel, data directory, executables, bundle ids, process names); the registry, the tool's description and its argument check, the provider and the web labels (apps/web/lib/computer-use/browsers.ts) all read that order.

Decisions

DecisionReason
Every Chromium browser goes through the Playwright ExtensionThe extension is a Chrome Web Store extension, and Brave, Vivaldi, Opera, Arc and Chromium install from that store. One transport keeps one action mapping and one set of refs.
A browser without a Playwright channel is named by its executable, with PWTEST_EXTENSION_USER_DATA_DIRPlaywright MCP 0.0.79 knows only the Chrome and Edge channels. Given --executable-path, it finds the profile with the extension only through that variable, from which it adds --user-data-dir and --profile-directory; without it the connect page opens in a profile without the extension.
Safari through AppleScript, not WebKit or safaridriverPlaywright's WebKit is not the user's Safari and has none of their sign-ins. safaridriver drives a separate automation window that locks out the user and keeps no state. Apple Events reach the user's own tabs; do JavaScript runs the page layer in them.
Safari's async results are polled inside one osascript rundoJavaScript returns only a synchronous value. A kick script starts the work and stores its result on the page under a token; the same JXA run then reads it every 50 ms, so a step costs one process, not one per poll.
Safari tab keys are kept by a heuristicSafari tabs have no ids. A tab keeps its key while its window and index, or its URL and title, still match the last listing; a tab that matches neither gets a new key, so a stale key is refused instead of landing on another page.
Safari maps its errors to the fix-1743 is a missing Automation permission; "Allow JavaScript from Apple Events" in the error means the Develop setting is off; both answer PERMISSION_MISSING naming the switch. -600 and -1728 mean Safari or the tab is gone, and the call says which.
Safari screenshots are window capturesSafari has no page capture over Apple Events. The desktop driver's capture_window (ScreenCaptureKit) captures the window without raising it, cropped to the viewport; a tab that is not the one showing in its window is refused, since its pixels do not exist. create_tab opens a new window in the background so the new page can be captured without changing what the user sees.
Firefox through WebDriver BiDiFirefox has no extension mode for Playwright and its CDP support was removed. The remote agent built into Firefox speaks BiDi to the user's own profile, with every command the actions need: tree, navigate, evaluate, input, files, screenshots, console and network events.
Port 9222, started in the background9222 is Firefox's default for --remote-debugging-port. When Firefox is closed the first call starts it with the agent (open -g on macOS, so nothing comes to the front). A Firefox running without the agent cannot be attached to, so the call answers PERMISSION_MISSING asking the user to restart it.
One BiDi session per processFirefox allows one BiDi session. Conversations share the connection and each keeps its own selected context; the last conversation to end closes the session and leaves Firefox running.
A shared page layer for Safari and FirefoxNeither transport has Playwright's snapshot. script_page.py injects one script that writes the same outline Playwright writes (role, name, [ref=eN]) and acts on those refs, reusing the built-in browser's pointer, hover, scroll, insert and field scripts, so a guide and a model see one format everywhere.
Refs live in a WeakMap on the pageRefs must survive between calls without marking the DOM. window.__openprogram maps refs to WeakRefs and elements to refs, so a node the page removes is freed and its ref answers ELEMENT_GONE; a navigation starts fresh.
Real input only on the tab in frontBiDi input goes to the page as trusted events but needs the tab to be visible; Safari has no input over Apple Events. A tab in the background gets synthetic events from the page layer (typing, Enter submitting its form, Tab moving focus, Backspace and Delete), so choosing a tab never switches what the user sees.
App names match without regard to case, and browser short names are aliasesA model writes chrome or Safari as often as the bundle name. type="window" matching was already case-insensitive on every platform; macOS also maps the short names (chrome to Google Chrome, edge to Microsoft Edge, …) after an exact match fails.

What each engine lacks

EngineNot available
Chromiumfiltering console messages and requests
Safariupload_file, console and network reads, a screenshot of a tab that is not showing
Firefoxtrusted input on a tab in the background

Implementation status

StateScope
ImplementedThe catalog, every Chromium browser and channel, Safari, Firefox, the page layer, the window aliases, the guides, the settings help and the web labels. Unit tests cover them against fakes: a fake page, a fake osascript and a fake BiDi agent.
Not run liveAny of these browsers; the Safari JXA scripts were only compiled with osacompile.
Not implementedFirefox Developer Edition and Nightly, Safari Technology Preview. Arc on Windows is found by a glob of its package directory and is untested.
Last updated · 2026-11-25