/** * Challenge Detector * * Detects and attempts to solve interactive challenges (CAPTCHAs, bot checks, etc.) * on blocked pages. When a challenge page is detected, this module: * * 1. Identifies interactive elements (checkboxes, buttons, iframes) * 2. Determines if they're clickable/solvable * 3. Optionally attempts to click them with human-like behavior * 4. Reports the result for LLM-assisted follow-up * * Supported challenge types: * - PerimeterX (#px-captcha) * - Cloudflare Turnstile * - hCaptcha * - reCAPTCHA * - DataDome * - Generic checkbox/button challenges */ import type { Page } from 'playwright'; import type { ChallengeElement, BotDetectionType } from '../types/index.js'; export interface ChallengeDetectionResult { /** Whether a challenge was detected */ detected: boolean; /** Type of bot detection system */ detectionType?: BotDetectionType; /** Interactive elements found */ elements: ChallengeElement[]; /** Whether we attempted to solve the challenge */ solveAttempted: boolean; /** Result of solve attempt */ solveResult?: 'success' | 'failed' | 'no_change' | 'requires_human'; /** Time spent on detection and solving */ duration: number; } export interface ChallengeDetectorOptions { /** Attempt to automatically solve simple challenges */ autoSolve?: boolean; /** Maximum time to wait for challenge resolution (ms) */ solveTimeout?: number; /** Type of detection if already known */ detectionType?: BotDetectionType; } /** * Detect challenge elements on a page */ export declare function detectChallengeElements(page: Page, options?: ChallengeDetectorOptions): Promise; /** * Wait for challenge to potentially resolve (after user interaction or timeout) */ export declare function waitForChallengeResolution(page: Page, timeout?: number): Promise<{ resolved: boolean; newUrl?: string; }>; //# sourceMappingURL=challenge-detector.d.ts.map