/** * Intent resolution system for interaction tools * Classifies targets and determines optimal interaction strategies before dispatch */ import CDP from "chrome-remote-interface"; export interface TargetClassification { /** Element type (button, input, link, etc.) */ type: string; /** What interaction is semantically expected */ interactionExpected: 'click' | 'type' | 'select' | 'check' | 'upload' | 'scroll'; /** Likely success condition */ successCondition: string; /** Fallback strategies if primary fails */ fallbackStrategies: string[]; /** Whether this is a React/Vue controlled component */ isControlled: boolean; /** Estimated complexity (simple/complex) */ complexity: 'simple' | 'complex'; } /** * Classify a target element to determine optimal interaction strategy * Cheap (1 CDP call) classification that caches results per element */ export declare function classifyTarget(session: CDP.Client, selector: string): Promise; /** * Clear classification cache for a specific target or all targets */ export declare function clearClassificationCache(selector?: string): void; /** * Get optimal strategy based on classification * Returns the best strategy to try first */ export declare function getOptimalStrategy(classification: TargetClassification): string;