/** * ZeTa Native App Crawler — Appium-based crawler for Android APK and iOS IPA. * * Architecture: * Appium Server (running at APPIUM_SERVER_URL) → WebDriverIO session * → UiAutomator2 (Android) / XCUITest (iOS) * → accessibility tree XML → ZeTa Element records * * TODO: requires Appium server running at APPIUM_SERVER_URL env var * TODO: requires `webdriverio` package — add "webdriverio": "^9.x" to package.json * * Device farm support: * - local_emulator: Appium server + local emulator/simulator * - aws_device_farm: presigned S3 URL uploaded to Device Farm, session via WDIO * - browserstack: BrowserStack Automate Appium endpoint */ export interface NativeCrawlerOptions { tenantId: string; projectId: string; jobId: string; platform: 'android' | 'ios' | 'windows' | 'macos'; appS3Path: string; packageName?: string; deviceModel?: string; osVersion?: string; appActivity?: string; appWaitActivity?: string; deviceFarm: 'local_emulator' | 'aws_device_farm' | 'browserstack'; appiumServerUrl?: string; browserstackUsername?: string; browserstackAccessKey?: string; awsAccessKeyId?: string; awsSecretAccessKey?: string; awsRegion?: string; awsDeviceFarmProjectArn?: string; credentials?: { username?: string; password?: string; usernameFieldLabel?: string; passwordFieldLabel?: string; loginButtonLabel?: string; }; visionLlmConfig?: { provider: string; model: string; apiKey?: string; baseUrl?: string; } | null; gestureConfig?: { enableSwipe?: boolean; enableLongPress?: boolean; }; mitmProxyPort?: number; } /** * Run a native app crawl session via Appium. * * Flow: * 1. Download APK/IPA from S3 to local temp dir * 2. Build Appium WebDriverIO capabilities for the target platform * 3. Create WebDriverIO remote session (Appium server at APPIUM_SERVER_URL) * 4. For each discovered screen: * a. Get page source XML → parse elements * b. Take screenshot → save to screenshotDir → persist via AppBrain * c. Save screen + elements to DB * d. Tap nav elements to discover next screens * 5. Update PlatformJob as DONE (or FAILED on error) */ export declare function runNativeCrawl(opts: NativeCrawlerOptions): Promise;