NAVIGATION
ELOWEN DOCUMENTATION

Last updated: 10 October 2026

Browse documentation · browser implementation
Developer reference

browser implementation

Developer reference

The provider implements the host's BrowserCaptureRequest, BrowserCaptureResult and BrowserCaptureControl types. Its local dispose() stops active captures on plugin shutdown. The account launcher and capture launcher share only Puppeteer loading and common network/background arguments in src/puppeteer.ts. Account sessions stay headed with a persistent profile and private display; captures stay headless with an isolated disposable profile and an origin-pinned proxy. Both retain Chrome's sandbox defaults. Without a registered capture provider, Sites reports capture unavailable; registration allocates no Chrome process and the asynchronous availability probe only loads dependencies.

Browser host waits use withTimeout from elowen-plugin-shared/withTimeout; src/deadline.ts only defines BrowserDeadlineError. Call withTimeout(work, milliseconds, new BrowserDeadlineError(message)) with an existing promise or a callback. A callback runs once after the timer is armed; synchronous throws retain their original identity. The helper clears and unreferences its timer on settlement and rejects on expiry with the exact supplied error. It bounds the wait without cancelling the browser command. Favicon lookup is one consumer: it waits at most five seconds and publishes no icon on failure. BrowserSession, tab reads and tracing use their existing per-command budgets; the operation safety handler recycles Chrome only for its own 45-second deadline, and tracing recycles Chrome when its state becomes unknown. Site capture keeps its separate resolve-on-expiry and abort races. Importing the helper allocates no timer or browser; each call allocates one timer and requires a core package that actually ships this shared export. Closing aborts waiting agent work once with the actual close reason, then abandons tracing, removes listeners, detaches CDP and releases the page.

BrowserStore migration 5 removes the unused project_id and primary_target_id columns in the host's migration transaction. Historical steps 1–4 remain unchanged; session data, ownership indexes and process/display records remain. Missing and foreign live-session ids both raise BrowserAccessError with status 404 at the registry boundary, which the HTTP API forwards independently of message wording.

Browser UI requires host UI API 55 in both its manifest and registration. Its runtime uses the published ElowenUiRuntime['api'] and ElowenUiRuntime['utils']['interpolate'] types without a local fallback. BrowserAccount uses host interpolation for the running-session count. Without an installed host runtime, the plugin throws instead of rendering a substitute; an unsupported host is rejected by the UI compatibility gate. These runtime declarations do not allocate requests or browser sessions. JSON request serialization belongs to the host API boundary; BrowserChatDock sends navigation as { method: 'POST', json: { leaseId, action } } and close as { method: 'POST' }.

Next: Scheduling Plugin