Member Junction
    Preparing search index...
    interface ICdpSessionBackend {
        GetLiveViewUrl(): Promise<string>;
        InvokeNativeAIControl(intent: string): Promise<RemoteBrowserActionResult>;
        Release(): Promise<void>;
        StartAudioCapture?(
            adapter: PlaywrightBrowserAdapter,
            onChunk: (chunk: RemoteBrowserAudioChunk) => void,
        ): Promise<ICdpAudioCaptureHandle>;
    }

    Implemented by

    Index

    Methods

    • 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 StartScreencast instead — must throw RemoteBrowserCapabilityNotSupportedError.

      Returns Promise<string>

      A promise resolving to the live-view URL.

      when the backend has no hosted live view.

    • 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.

      Parameters

      • intent: string

        The natural-language intent (e.g. 'log in with the test account').

      Returns Promise<RemoteBrowserActionResult>

      A promise resolving to the action result reported by the native harness.

      when the backend has no native AI control.

    • 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.

      Returns Promise<void>

      A promise that resolves once the backend has been released.