export interface Device { id: string; name: string; platform: "aurora"; state: string; isSimulator: boolean; host?: string; } export interface LogOptions { lines?: number; priority?: string; unit?: string; grep?: string; since?: string; } export declare class AuroraClient { /** * SECURITY: All audb invocations route through this argv-form path (execFileSync — no /bin/sh -c). * Shell metacharacters in `args` are passed as literal argv slots, not parsed by the host shell. * This structurally prevents host-side OS Command Injection (CWE-78) — see issue #40. * * Mirrors the defense applied in src/adb/client.ts:75-97. */ private runAudbSync; checkAvailability(): Promise; /** * List all configured Aurora devices * @returns Array of Device objects */ listDevices(): Device[]; getActiveDevice(): string; /** * Performs a tap at the specified coordinates. * @param x - X coordinate in pixels * @param y - Y coordinate in pixels */ tap(x: number, y: number): void; /** * Performs a long press at the specified coordinates. * @param x - X coordinate in pixels * @param y - Y coordinate in pixels * @param duration - Duration of the press in milliseconds */ longPress(x: number, y: number, duration: number): void; /** * Performs a swipe in the specified direction. * @param direction - Direction to swipe: "up", "down", "left", or "right" */ swipeDirection(direction: "up" | "down" | "left" | "right"): void; /** * Performs a swipe from one coordinate to another. * @param x1 - Starting X coordinate in pixels * @param y1 - Starting Y coordinate in pixels * @param x2 - Ending X coordinate in pixels * @param y2 - Ending Y coordinate in pixels */ swipeCoords(x1: number, y1: number, x2: number, y2: number): void; /** * Performs a swipe from one coordinate to another. * Compatible with AdbClient signature. * @param x1 - Starting X coordinate * @param y1 - Starting Y coordinate * @param x2 - Ending X coordinate * @param y2 - Ending Y coordinate * @param durationMs - Duration in milliseconds (ignored by audb, kept for compatibility) */ swipe(x1: number, y1: number, x2: number, y2: number, durationMs?: number): void; /** * Input text on Aurora device. * @unimplemented - audb doesn't have direct text input support yet * @todo Implement via clipboard or D-Bus when available */ inputText(text: string): void; /** * Get UI hierarchy from Aurora device. * @unimplemented - UI scraping not available via audb yet * @todo Implement when audb adds UI dump support */ getUiHierarchy(): string; /** * Clear app data on Aurora device. * @unimplemented - audb doesn't have this command yet */ clearAppData(packageName: string): void; /** * Sends a keyboard key event to the device. * @param key - Key name to send (e.g., "Enter", "Back", "Home") */ pressKey(key: string): void; /** * Take screenshot and return raw PNG buffer (consistent with Android/iOS) * @returns Raw PNG buffer */ screenshotRaw(): Buffer; /** * Takes a screenshot of the Aurora device * @returns Base64 encoded PNG screenshot */ screenshot(): string; /** * Launch an application on the Aurora device * @param packageName - Application name (D-Bus format: ru.domain.AppName) * @returns Output message from audb */ launchApp(packageName: string): string; /** * Stop a running application * @param packageName - Application name (D-Bus format: ru.domain.AppName) */ stopApp(packageName: string): void; /** * Install an RPM package on the Aurora device * @param path - Local path to the RPM file * @returns Installation result message */ installApp(path: string): string; /** * Uninstall a package from the Aurora device * @param packageName - Package name (e.g., ru.domain.AppName) * @returns Uninstallation result message */ uninstallApp(packageName: string): string; /** * List installed packages on the Aurora device * @returns Array of package names */ listPackages(): string[]; /** * Execute a shell command on the Aurora device. * * SECURITY: `command` travels as a SINGLE argv slot (`audb shell `) — the host * shell never parses it, so host-side metacharacters (`;`, `&&`, backticks, `$()`) * cannot inject host-side commands. This structurally closes CWE-78 on the host (issue #40). * * NOTE on device-side semantics: `command` may still be parsed by the DEVICE shell once * audb hands it off. Call sites that accept untrusted input MUST validate via * `validateShellCommand` from src/utils/sanitize.ts (system_shell tool already does this). * * @param command - Shell command to execute (already validated at call site) * @returns Command output */ shell(command: string): string; /** * Get device logs with optional filters * @param options - Log filtering options * @param options.lines - Maximum number of log lines to retrieve * @param options.priority - Filter by log priority level * @param options.unit - Filter by systemd unit * @param options.grep - Filter by grep pattern * @param options.since - Show logs since timestamp * @returns Log output */ getLogs(options?: LogOptions): string; /** * Clear device logs * @returns Result message */ clearLogs(): string; /** * Get detailed system information * @returns System info output */ getSystemInfo(): string; /** * Upload a file to the Aurora device * @param localPath - Path to the local file * @param remotePath - Destination path on the device * @returns Upload result message */ pushFile(localPath: string, remotePath: string): string; /** * Download a file from the Aurora device * @param remotePath - Path to the remote file * @param localPath - Optional local destination path (defaults to remote filename) * @returns File contents as Buffer */ pullFile(remotePath: string, localPath?: string): Buffer; } export declare const auroraClient: AuroraClient; //# sourceMappingURL=client.d.ts.map