import { z } from 'zod'; /** * Ensures the MCP server is fully initialized and ready to use. * This is called automatically by all tool functions. * * Initialization includes: * - Verifying an active session exists (via driver_session) * - Connecting to the plugin WebSocket using session config * - Console capture is already initialized by bridge.js in the Tauri app * * This function is idempotent - calling it multiple times is safe. * * @throws Error if no session is active (driver_session must be called first) */ export declare function ensureReady(windowId?: string, appIdentifier?: string | number): Promise; /** * Reset initialization state (useful for testing or reconnecting). */ export declare function resetInitialization(): void; export interface ExecuteInWebviewResult { result: string; windowLabel: string; warning?: string; } /** * Execute JavaScript in the Tauri webview using native IPC via WebSocket. * * @param script - JavaScript code to execute in the webview context * @param windowId - Optional window label to target (defaults to "main") * @param appIdentifier - Optional app identifier to target specific app * @returns Result of the script execution with window context */ export declare function executeInWebview(script: string, windowId?: string, appIdentifier?: string | number): Promise; /** * Execute JavaScript in the Tauri webview and return window context. * * @param script - JavaScript code to execute in the webview context * @param windowId - Optional window label to target (defaults to "main") * @param appIdentifier - Optional app identifier to target specific app * @returns Result of the script execution with window context */ export declare function executeInWebviewWithContext(script: string, windowId?: string, appIdentifier?: string | number): Promise; /** * Execute async JavaScript in the webview with timeout support. * * @param script - JavaScript code to execute (can use await) * @param windowId - Optional window label to target (defaults to "main") * @param timeout - Timeout in milliseconds (default: 5000) * @returns Result of the script execution */ export declare function executeAsyncInWebview(script: string, windowId?: string, timeout?: number, appIdentifier?: string | number): Promise; /** * Initialize console log capture in the webview. * This intercepts console methods and stores logs in memory. * * NOTE: Console capture is now automatically initialized by bridge.js when the * Tauri app starts. This function is kept for backwards compatibility and will * simply return early if capture is already initialized. */ export declare function initializeConsoleCapture(): Promise; /** * Retrieve captured console logs with optional filtering. * * @param filter - Optional regex pattern to filter log messages * @param since - Optional ISO timestamp to filter logs after this time * @param windowId - Optional window label to target (defaults to "main") * @param appIdentifier - Optional app identifier to target specific app * @returns Formatted console logs as string */ export declare function getConsoleLogs(filter?: string, since?: string, windowId?: string, appIdentifier?: string | number): Promise; /** * Clear all captured console logs. */ export declare function clearConsoleLogs(): Promise; import type { ToolContent } from '../tools-registry.js'; /** * Result of a screenshot capture, containing both image data and optional context. */ export interface ScreenshotResult { content: ToolContent[]; } export interface CaptureScreenshotOptions { format?: 'png' | 'jpeg'; quality?: number; windowId?: string; appIdentifier?: string | number; maxWidth?: number; } /** * Capture a screenshot of the entire webview. * * @param options - Screenshot options (format, quality, windowId, appIdentifier, etc.) * @returns Screenshot result with image content */ export declare function captureScreenshot(options?: CaptureScreenshotOptions): Promise; export declare const ExecuteScriptSchema: z.ZodObject<{ script: z.ZodString; }, "strip", z.ZodTypeAny, { script: string; }, { script: string; }>; export declare const GetConsoleLogsSchema: z.ZodObject<{ filter: z.ZodOptional; since: z.ZodOptional; }, "strip", z.ZodTypeAny, { filter?: string | undefined; since?: string | undefined; }, { filter?: string | undefined; since?: string | undefined; }>; export declare const CaptureScreenshotSchema: z.ZodObject<{ format: z.ZodDefault>>; quality: z.ZodOptional; }, "strip", z.ZodTypeAny, { format: "png" | "jpeg"; quality?: number | undefined; }, { format?: "png" | "jpeg" | undefined; quality?: number | undefined; }>;