import { LiveSessionOptions, IframeOptions } from './types.js'; import '../utils/resilience.js'; /** * Live session utilities for Morph browser sessions * * Provides helpers for embedding and sharing live browser sessions with WebRTC streaming. */ /** * Preset configurations for common use cases */ declare const LIVE_PRESETS: { /** Read-only monitoring (no interaction) */ readonly readonly: LiveSessionOptions; /** Interactive control (human-in-the-loop) */ readonly interactive: LiveSessionOptions; /** Watch-only without controls */ readonly monitoring: LiveSessionOptions; }; /** * Build a live session URL with query parameters * * @param debugUrl - Live session debug URL (e.g., from task.debugUrl) * @param options - Live session configuration options * @returns URL with query parameters for iframe embedding * * @example * ```typescript * const url = buildLiveUrl(task.debugUrl, { interactive: true }); * // Returns: https://example.com/sessions/abc?interactive=true * ``` */ declare function buildLiveUrl(debugUrl: string, options?: LiveSessionOptions): string; /** * Build iframe HTML for embedding a live session * * @param debugUrl - Live session debug URL * @param options - Iframe configuration including dimensions and session options * @returns HTML iframe element as string * * @example * ```typescript * const iframe = buildLiveIframe(task.debugUrl, { * interactive: true, * width: '100%', * height: '600px' * }); * ``` */ declare function buildLiveIframe(debugUrl: string, options?: IframeOptions): string; /** * Build complete embed code with HTML snippet * * @param debugUrl - Live session debug URL * @param options - Iframe configuration * @returns Multi-line HTML snippet ready to copy-paste * * @example * ```typescript * const code = buildEmbedCode(task.debugUrl, { interactive: false }); * console.log(code); * // * // * ``` */ declare function buildEmbedCode(debugUrl: string, options?: IframeOptions): string; /** * Get live session options from preset name or custom config * * @internal */ declare function resolvePreset(optionsOrPreset?: string | IframeOptions): IframeOptions; export { LIVE_PRESETS, buildEmbedCode, buildLiveIframe, buildLiveUrl, resolvePreset };