/** * Shared provision types for MCP Server * These types mirror the SDK's ProvisionAPI interface * * When adding new provision types to the SDK, add them here as well. * Reference: sdk.d.ts ProvisionAPI interface */ import { z } from "zod"; /** * All available provision types * Must match the SDK's ProvisionAPI methods */ export declare const ProvisionTypes: readonly ["chrome", "chromeExtension", "vscode", "installer", "electron"]; export type ProvisionType = typeof ProvisionTypes[number]; /** * Options for provision.chrome * Matches SDK: ProvisionChromeOptions */ export declare const ProvisionChromeOptionsSchema: z.ZodObject<{ /** URL to navigate to (default: 'https://example.com') */ url: z.ZodOptional; /** Start maximized (default: true) */ maximized: z.ZodOptional; /** Use guest mode (default: false) */ guest: z.ZodOptional; }, "strip", z.ZodTypeAny, { url?: string | undefined; maximized?: boolean | undefined; guest?: boolean | undefined; }, { url?: string | undefined; maximized?: boolean | undefined; guest?: boolean | undefined; }>; export type ProvisionChromeOptions = z.infer; /** * Options for provision.chromeExtension * Matches SDK: ProvisionChromeExtensionOptions */ export declare const ProvisionChromeExtensionOptionsSchema: z.ZodObject<{ /** Local filesystem path to the unpacked extension directory */ extensionPath: z.ZodOptional; /** Chrome Web Store extension ID */ extensionId: z.ZodOptional; /** Start maximized (default: true) */ maximized: z.ZodOptional; }, "strip", z.ZodTypeAny, { maximized?: boolean | undefined; extensionPath?: string | undefined; extensionId?: string | undefined; }, { maximized?: boolean | undefined; extensionPath?: string | undefined; extensionId?: string | undefined; }>; export type ProvisionChromeExtensionOptions = z.infer; /** * Options for provision.vscode * Matches SDK: ProvisionVSCodeOptions */ export declare const ProvisionVSCodeOptionsSchema: z.ZodObject<{ /** Path to workspace or folder to open */ workspace: z.ZodOptional; /** Array of extension IDs to install */ extensions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { workspace?: string | undefined; extensions?: string[] | undefined; }, { workspace?: string | undefined; extensions?: string[] | undefined; }>; export type ProvisionVSCodeOptions = z.infer; /** * Options for provision.installer * Matches SDK: ProvisionInstallerOptions */ export declare const ProvisionInstallerOptionsSchema: z.ZodObject<{ /** URL to download the installer from (required) */ url: z.ZodString; /** Filename to save as (auto-detected from URL if not provided) */ filename: z.ZodOptional; /** Application name to focus after install */ appName: z.ZodOptional; /** Whether to launch the app after installation (default: true) */ launch: z.ZodOptional; }, "strip", z.ZodTypeAny, { url: string; filename?: string | undefined; appName?: string | undefined; launch?: boolean | undefined; }, { url: string; filename?: string | undefined; appName?: string | undefined; launch?: boolean | undefined; }>; export type ProvisionInstallerOptions = z.infer; /** * Options for provision.electron * Matches SDK: ProvisionElectronOptions */ export declare const ProvisionElectronOptionsSchema: z.ZodObject<{ /** Path to Electron app (required) */ appPath: z.ZodString; /** Additional electron args */ args: z.ZodOptional>; }, "strip", z.ZodTypeAny, { appPath: string; args?: string[] | undefined; }, { appPath: string; args?: string[] | undefined; }>; export type ProvisionElectronOptions = z.infer; /** * Complete session_start input schema * Supports all provision types with their respective options */ export declare const SessionStartInputSchema: z.ZodObject<{ /** Provision type - determines which application to launch */ type: z.ZodDefault>; /** URL to navigate to (for chrome/chromeExtension) */ url: z.ZodOptional; /** Start maximized (for chrome/chromeExtension) */ maximized: z.ZodOptional; /** Use guest mode (for chrome) */ guest: z.ZodOptional; /** Local path to unpacked extension (for chromeExtension) */ extensionPath: z.ZodOptional; /** Chrome Web Store extension ID (for chromeExtension) */ extensionId: z.ZodOptional; /** Workspace path (for vscode) */ workspace: z.ZodOptional; /** Extension IDs to install (for vscode) */ extensions: z.ZodOptional>; /** URL to download installer from (for installer, required when type='installer') */ installerUrl: z.ZodOptional; /** Filename for installer (for installer) */ installerFilename: z.ZodOptional; /** App name to focus after install (for installer) */ appName: z.ZodOptional; /** Launch app after install (for installer) */ launch: z.ZodOptional; /** Path to Electron app (for electron, required when type='electron') */ appPath: z.ZodOptional; /** Electron args (for electron) */ electronArgs: z.ZodOptional>; /** Operating system for the sandbox */ os: z.ZodDefault>; /** Keep sandbox alive duration in ms (default: 5 minutes) */ keepAlive: z.ZodDefault; /** Path to test file - when provided, you MUST append generated code to this file after each action */ testFile: z.ZodOptional; /** Reconnect to last sandbox */ reconnect: z.ZodDefault; /** API endpoint URL */ apiRoot: z.ZodOptional; /** Direct IP address of self-hosted instance (bypasses cloud provisioning) */ ip: z.ZodOptional; /** Sandbox ID to connect to (for debug-on-failure mode). When provided, connects to an existing sandbox instead of creating a new one. Skip provisioning. */ sandboxId: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: "chrome" | "chromeExtension" | "vscode" | "installer" | "electron"; os: "linux" | "windows"; keepAlive: number; reconnect: boolean; url?: string | undefined; maximized?: boolean | undefined; guest?: boolean | undefined; extensionPath?: string | undefined; extensionId?: string | undefined; workspace?: string | undefined; extensions?: string[] | undefined; appName?: string | undefined; launch?: boolean | undefined; appPath?: string | undefined; installerUrl?: string | undefined; installerFilename?: string | undefined; electronArgs?: string[] | undefined; testFile?: string | undefined; apiRoot?: string | undefined; ip?: string | undefined; sandboxId?: string | undefined; }, { url?: string | undefined; maximized?: boolean | undefined; guest?: boolean | undefined; extensionPath?: string | undefined; extensionId?: string | undefined; workspace?: string | undefined; extensions?: string[] | undefined; appName?: string | undefined; launch?: boolean | undefined; appPath?: string | undefined; type?: "chrome" | "chromeExtension" | "vscode" | "installer" | "electron" | undefined; installerUrl?: string | undefined; installerFilename?: string | undefined; electronArgs?: string[] | undefined; os?: "linux" | "windows" | undefined; keepAlive?: number | undefined; testFile?: string | undefined; reconnect?: boolean | undefined; apiRoot?: string | undefined; ip?: string | undefined; sandboxId?: string | undefined; }>; export type SessionStartInput = z.infer; /** * Helper to extract provision-specific options from session start input */ export declare function getProvisionOptions(params: SessionStartInput): { url: string; maximized: boolean | undefined; guest: boolean | undefined; extensionPath?: undefined; extensionId?: undefined; workspace?: undefined; extensions?: undefined; filename?: undefined; appName?: undefined; launch?: undefined; appPath?: undefined; args?: undefined; } | { extensionPath: string | undefined; extensionId: string | undefined; maximized: boolean | undefined; url?: undefined; guest?: undefined; workspace?: undefined; extensions?: undefined; filename?: undefined; appName?: undefined; launch?: undefined; appPath?: undefined; args?: undefined; } | { workspace: string | undefined; extensions: string[] | undefined; url?: undefined; maximized?: undefined; guest?: undefined; extensionPath?: undefined; extensionId?: undefined; filename?: undefined; appName?: undefined; launch?: undefined; appPath?: undefined; args?: undefined; } | { url: string; filename: string | undefined; appName: string | undefined; launch: boolean | undefined; maximized?: undefined; guest?: undefined; extensionPath?: undefined; extensionId?: undefined; workspace?: undefined; extensions?: undefined; appPath?: undefined; args?: undefined; } | { appPath: string; args: string[] | undefined; url?: undefined; maximized?: undefined; guest?: undefined; extensionPath?: undefined; extensionId?: undefined; workspace?: undefined; extensions?: undefined; filename?: undefined; appName?: undefined; launch?: undefined; } | { url?: undefined; maximized?: undefined; guest?: undefined; extensionPath?: undefined; extensionId?: undefined; workspace?: undefined; extensions?: undefined; filename?: undefined; appName?: undefined; launch?: undefined; appPath?: undefined; args?: undefined; };