Delegates a natural-language intent to the backend's first-party AI-control harness instead of MJ's own computer-use loop.
Implement this only for backends with a native AI-control harness (e.g. Browserbase Stagehand, Hyperbrowser agent). Backends without one must throw RemoteBrowserCapabilityNotSupportedError.
The natural-language intent (e.g. 'log in with the test account').
A promise resolving to the action result reported by the native harness.
Releases the backend resources behind this CDP endpoint — ends the browser-as-a-service session,
or stops/tears down the self-hosted container. Called by the session on Close() and by the
provider on Disconnect().
Should be idempotent and non-throwing for an already-released backend, so teardown is safe to run more than once.
A promise that resolves once the backend has been released.
OptionalStartOPTIONAL — begins capturing the browser's tab audio for streaming to the user, invoking onChunk
for each encoded RemoteBrowserAudioChunk, and returns a handle whose ICdpAudioCaptureHandle.Stop
tears the capture down.
Implement this ONLY for backends that can capture tab audio (Self-Hosted Chrome delegates to the
shared adapter's in-page MediaRecorder mechanism). Backends that OMIT this method advertise no
audio capability, and import('./cdp-remote-browser-session').CdpRemoteBrowserSession.StartAudioStream
throws RemoteBrowserCapabilityNotSupportedError for them — exactly the "gate by backend
implementation" model the v1 plan specifies (no metadata flag yet).
The capture mechanism is per-backend (the "each backend its own way" requirement): the shared session hands the backend the connected PlaywrightBrowserAdapter so a CDP-based backend can reuse the adapter's generic capture, while a different backend could tap a service-side stream.
The connected Playwright/CDP adapter driving this session.
Callback invoked with each captured audio chunk.
A promise resolving to the capture handle.
Returns the backend's hosted, embeddable live-view URL so humans can watch the browser without MJ encoding frames.
Implement this only for backends that expose a hosted live view (most browser-as-a-service providers do). Backends without one — notably Self-Hosted Chrome, which streams frames via
StartScreencastinstead — must throw RemoteBrowserCapabilityNotSupportedError.