/** * Stealth launch utilities for anti-detection browser automation. * * Provides argument deduplication, fingerprint seed generation, and * macOS quarantine attribute removal. Shared by CloakBrowser provider * and enhanced local launch paths. */ export interface StealthOptions { /** Timezone to emulate (e.g. "America/New_York"). */ timezone?: string; /** Locale to emulate (e.g. "en-US"). */ locale?: string; /** Public IP for WebRTC leak prevention. */ webrtcIp?: string; /** Platform to emulate in fingerprint (e.g. "windows", "macos"). */ fingerprintPlatform?: string; } /** Strip sandbox flags before passing user extraArgs to CloakBrowser. */ export declare function filterCloakBrowserExtraArgs(extraArgs?: string[]): string[]; /** * Build stealth launch args with deduplication. * User `extraArgs` override any default args with the same `--key=` prefix. */ export declare function buildStealthArgs(extraArgs?: string[], options?: StealthOptions): string[]; /** * Basic stealth args for the local Playwright launcher (less aggressive than CloakBrowser). * Does not include fingerprint or geo args — just reduces automation signals. */ export declare function buildLocalStealthArgs(extraArgs?: string[]): string[]; /** Generate a timestamp-based fingerprint seed for CloakBrowser. */ export declare function generateFingerprintSeed(): number; /** * Remove the `com.apple.quarantine` extended attribute from a file or app bundle on macOS. * Files downloaded from the internet are tagged with this attribute, causing Gatekeeper * to block unsigned binaries. Without this, CloakBrowser silently fails to launch. * * Non-fatal — logs and returns on any error. */ export declare function removeQuarantineAttr(path: string): Promise; /** * JavaScript snippet to inject into every new page to hide automation signals. * Removes `navigator.webdriver` and patches other detectable properties. */ export declare const WEBDRIVER_OVERRIDE_SCRIPT = "\nObject.defineProperty(navigator, 'webdriver', { get: () => undefined });\nif (navigator.plugins.length === 0) {\n Object.defineProperty(navigator, 'plugins', {\n get: () => [1, 2, 3, 4, 5],\n });\n}\nObject.defineProperty(navigator, 'languages', {\n get: () => ['en-US', 'en'],\n});\nwindow.chrome = window.chrome || {};\nwindow.chrome.runtime = window.chrome.runtime || {};\n"; /** Ensure a binary file has executable permissions (Unix only, no-op on Windows). */ export declare function makeExecutable(path: string): Promise;