import { z } from 'zod'; /** * WIP has neither `Page.javascriptDialogOpening` events nor * `Page.handleJavaScriptDialog` method — verified `-32601` for both. The iOS * WebView surfaces `window.alert/confirm/prompt` as native UI handled by the * host app's WKUIDelegate, completely outside WIP's reach. * * This tool overrides `window.alert/confirm/prompt` from JS land: * - `install` mode: monkey-patches the three globals to record each call in * `window.__wdm_dialogs` and short-circuit return preset responses * - `list` mode: returns the captured queue * - `set_response` mode: updates the preset response for subsequent confirm/prompt * - `uninstall` mode: restores the natives * * Because the override returns synchronously, no native iOS dialog UI appears. * Pages that depend on the actual dialog blocking (e.g. "wait for user to dismiss * the alert") may behave differently than in a real user session. */ export declare const handleDialogTool: { name: string; description: string; inputSchema: { mode: z.ZodEnum<["install", "list", "set_response", "uninstall"]>; confirmResponse: z.ZodOptional; promptResponse: z.ZodOptional; clearQueue: z.ZodOptional; }; handler: ({ mode, confirmResponse, promptResponse, clearQueue, }: { mode: "install" | "list" | "set_response" | "uninstall"; confirmResponse?: boolean; promptResponse?: string; clearQueue?: boolean; }) => Promise<{ content: { type: "text"; text: string; }[]; }>; };