/** * launch-browser.ts * * Implements the pwpilot_launch_browser MCP tool. * * This is the first step in the live-browser test generation flow. It opens * a visible (headed) Chromium browser window at the specified URL so the user * can see the automation in action and so the page is ready for DOM analysis. * * The browser session is kept alive in the MCP server's shared BrowserManager * instance, which the subsequent pwpilot_analyze_page and pwpilot_heal_test * tools reuse without relaunching. * * Role in the overall flow: * pwpilot_preview_generation → user confirms → * pwpilot_launch_browser → pwpilot_analyze_page → pwpilot_generate_test */ import { z } from 'zod'; import { BrowserManager } from '../../browser/browser-manager'; /** * Zod schema for validating the input to launch_browser. * Requires a valid URL to open. */ export declare const LaunchBrowserSchema: z.ZodObject<{ url: z.ZodString; }, "strip", z.ZodTypeAny, { url: string; }, { url: string; }>; /** Input type inferred from LaunchBrowserSchema. */ export type LaunchBrowserInput = z.infer; /** * Output returned to the MCP server after the browser has been launched. */ export interface LaunchBrowserOutput { /** Always true if the call succeeded (errors are thrown). */ success: boolean; /** The URL that was opened. */ url: string; /** The page title after navigation, confirming the page loaded. */ title: string; /** A human-readable confirmation message. */ message: string; } /** * Launch a headed Chromium browser and navigate to the given URL. * * The browser window is always visible (headless = false) so the user can * observe and confirm the automation. The page title is read after navigation * as a quick sanity check that the URL loaded successfully. * * @param input - Validated input containing the URL to open. * @param browserManager - The shared browser manager to launch and navigate through. * @returns A LaunchBrowserOutput confirming success and including the page title. */ export declare function launchBrowser(input: LaunchBrowserInput, browserManager: BrowserManager): Promise; //# sourceMappingURL=launch-browser.d.ts.map