export declare class WriteBlockedError extends Error { constructor(); } export declare class ShellBlockedError extends Error { constructor(); } export declare function assertWriteAllowed(): void; export declare function assertShellAllowed(): void; /** * Escape a string for safe use inside single-quoted Android shell arguments. * Handles all shell metacharacters: backticks, $(), semicolons, pipes, etc. */ export declare function shellEscape(s: string): string; /** Validate Android setting key (alphanumeric, underscores, dots, hyphens). */ export declare function validateSettingKey(key: string): void; /** Validate Android setting value (no shell metacharacters). */ export declare function validateSettingValue(value: string): void; /** Validate positive integer values used in Android shell commands. */ export declare function validatePositiveInteger(value: number, name: string): void; /** Validate an Android activity class name (e.g. .MainActivity or com.example.MainActivity). */ export declare function validateActivityName(activity: string): void; /** Validate Android keycode format (e.g. KEYCODE_BACK, KEYCODE_VOLUME_UP). */ export declare function validateKeycode(keycode: string): void; /** Validate Android package name (e.g. com.example.app). */ export declare function validatePackageName(name: string): void; /** Validate Android permission string (e.g. android.permission.CAMERA). */ export declare function validatePermission(perm: string): void; /** Validate Android component name (e.g. com.example.app/.MainActivity). */ export declare function validateComponent(component: string): void; /** Validate Android broadcast action (e.g. android.intent.action.VIEW). */ export declare function validateAction(action: string): void; /** Validate broadcast extras format (--es key val, --ei key val, etc.). */ export declare function validateExtras(extras: string): void; /** Validate and escape Android broadcast extras for safe adb shell interpolation. */ export declare function formatBroadcastExtras(extras: string): string; /** Validate device file path (must be absolute, no traversal). */ export declare function validateDevicePath(path: string): void; /** * Text-response tool wrapper — delegates to the shared toolkit factory. * Handles WriteBlockedError / ShellBlockedError (passthrough) and ADB-style * errors with `code` (numeric exit code) / `stderr` (string). */ export declare const wrapToolHandler: (fn: (params: T) => Promise) => (params: T) => Promise; export declare function wrapImageToolHandler(fn: (params: T) => Promise<{ base64: string; mimeType: string; metadata?: unknown; }>): (params: T) => Promise<{ content: ({ type: "text"; text: string; } | { type: "image"; data: string; mimeType: string; })[]; isError?: undefined; } | { content: { type: "text"; text: string; }[]; isError: boolean; }>; //# sourceMappingURL=utils.d.ts.map