Member Junction
    Preparing search index...

    A live handle to a single remote-browser session, returned by import('./base-remote-browser-provider').BaseRemoteBrowserProvider.Connect.

    The core methods (GetCdpEndpoint, Navigate, ExecuteAction, CaptureScreenshot, GetCurrentUrl, Close) rest on the universal CDP substrate every backend provides and are always available. The remaining methods are capability-gated (feature-gated, documented per-method): the engine checks the provider's SupportedFeatures flag before calling them, and a backend that cannot satisfy a feature should reject/throw import('./capability-errors').RemoteBrowserCapabilityNotSupportedError.

    This is a pure interface — the concrete implementation lives in the server package / drivers (which own the Playwright + CDP machinery).

    interface IRemoteBrowserSession {
        CaptureScreenshot(): Promise<string>;
        Close(): Promise<void>;
        ExecuteAction(
            action: RemoteBrowserAction,
        ): Promise<RemoteBrowserActionResult>;
        GetCdpEndpoint(): string;
        GetCurrentUrl(): string;
        GetLiveViewUrl(): Promise<string>;
        GetSelectionText(): Promise<string>;
        InvokeNativeAIControl(intent: string): Promise<RemoteBrowserActionResult>;
        Navigate(url: string): Promise<RemoteBrowserActionResult>;
        RouteHumanInput(input: RemoteBrowserHumanInput): void;
        RunComputerUseGoal(
            goal: string,
            options?: RunComputerUseGoalOptions,
        ): Promise<RemoteBrowserGoalResult>;
        StartAudioStream(
            onChunk: (chunk: RemoteBrowserAudioChunk) => void,
        ): Promise<void>;
        StartScreencast(
            onFrame: (frame: RemoteBrowserScreencastFrame) => void,
        ): Promise<void>;
        StopAudioStream(): Promise<void>;
        StopScreencast(): Promise<void>;
    }

    Implemented by

    Index

    Methods

    • Returns an embeddable live-view URL so humans can watch the browser without MJ encoding frames.

      Capability-gated by LiveView. Backends without it reject with import('./capability-errors').RemoteBrowserCapabilityNotSupportedError.

      Returns Promise<string>

      The live-view URL.

    • Reads the remote page's CURRENT text selection — the copy-out half of human clipboard support. The viewer captures a local copy / Cmd+C, calls this to read what the human has selected on the remote page, and writes the returned text to the LOCAL clipboard (again sidestepping the isolated remote clipboard, the mirror of the RemoteBrowserTextInput paste path).

      Capability-gated by HumanTakeover (copy-out belongs to the human-control path). Degrades gracefully: backends that cannot read the selection — or a page with nothing selected — resolve to '' rather than throwing, so a best-effort copy never breaks the live view.

      Returns Promise<string>

      The selected text, or '' when nothing is selected / the selection can't be read.

    • Begins streaming the remote browser's tab audio to onChunk (the source for the channel's client-side audio player) — so a co-agent demoing a video/audio site is HEARD, not just seen.

      Capability-gated by BACKEND IMPLEMENTATION (v1): a backend without an audio-capture mechanism rejects with import('./capability-errors').RemoteBrowserCapabilityNotSupportedError, exactly like a non-streaming backend rejects IRemoteBrowserSession.StartScreencast. (A future metadata AudioStreaming feature flag is a documented fast-follow; v1 gates by whether the backend provides capture.)

      Parameters

      Returns Promise<void>

      A promise that resolves once the audio stream has started.