import type { Logger } from "../../util/logger.js";
import type { InteractiveElement } from "../agent/subagents/testing/types.js";
import type { FileArtifact } from "../types.js";
import type { BootstrapData, InitData } from "@superblocksteam/library-shared/types";
export type { InteractiveElement } from "../agent/subagents/testing/types.js";
export interface EmbeddedPlaywrightMcpServer {
    url: string;
    close: () => Promise<void>;
    /** Save the current action log and reset for a new session */
    flushLog: () => Promise<void>;
    /** Capture interactive elements from the current page for DOM context */
    captureInteractiveElements: () => Promise<InteractiveElement[]>;
}
export interface EmbeddedPlaywrightMcpServerOptions {
    /**
     * Optional path to a Playwright storage state file for authentication.
     */
    storageStatePath?: string;
    /**
     * Optional JWT to send as Authorization headers with each request.
     */
    jwt?: string;
    /**
     * Optional websocket endpoint for connecting to an existing Playwright browser.
     * When provided, the MCP server reuses that browser instead of launching a new one.
     */
    connectWsEndpoint?: string;
    /**
     * Optional raw storage state data to seed the context directly.
     */
    storageStateData?: any;
    /**
     * App URL (used to derive cookie domain when setting JWT cookie).
     */
    appUrl?: string;
    /**
     * Init data from sb-init message - required for socket connection setup.
     */
    initData?: InitData;
    /**
     * Bootstrap data for initializing the vite dev server app directly.
     * When provided, the app will be initialized without needing a parent iframe.
     */
    bootstrapData?: BootstrapData;
    /**
     * Optional session storage items to seed for the app origin.
     */
    sessionStorageData?: {
        origin: string;
        items: Array<{
            name: string;
            value: string;
        }>;
    };
    /**
     * Additional origins storage to seed (e.g., auth domain).
     */
    extraOrigins?: Array<{
        origin: string;
        localStorage: Array<{
            name: string;
            value: string;
        }>;
        sessionStorage?: Array<{
            name: string;
            value: string;
        }>;
    }>;
    /**
     * Logger to use for logging messages.
     */
    logger: Logger;
    /**
     * Optional function to save log artifacts.
     * When provided, Playwright action logs will be saved as .log files.
     */
    saveArtifact?: (artifact: FileArtifact, stepId: string, runTimestamp: string) => Promise<void>;
    /**
     * Optional run timestamp for log file organization.
     * Defaults to current ISO timestamp.
     */
    runTimestamp?: string;
}
export declare function startEmbeddedPlaywrightMcpServer(options: EmbeddedPlaywrightMcpServerOptions): Promise<EmbeddedPlaywrightMcpServer>;
//# sourceMappingURL=embedded-playwright-mcp-server.d.ts.map