/** * Consolidated element coordinate resolution for interaction tools. * * Handles the common pattern shared by input_tap, input_double_tap, * and input_long_press: resolving an element by label, index, text, * or resourceId into (x, y) coordinates ready for device input. */ import type { ToolContext } from "../context.js"; import type { Platform } from "../../device-manager.js"; export interface ResolvedCoordinates { x: number; y: number; /** What was matched, for logging (e.g. "label 'Submit'", "index 3") */ description: string; /** True when coordinates came from raw x/y args (need scale correction) */ fromRawArgs: boolean; /** If iOS element-based tap was performed directly (no coordinates needed) */ iosTapDone?: boolean; /** WDA element ID — available when rect lookup failed but element was found */ elementId?: string; } /** * Apply screenshot scale to raw coordinates from Claude (image space -> device space). */ export declare function applyScale(x: number, y: number, platform: string | undefined, ctx: ToolContext): { x: number; y: number; }; /** * Resolve element coordinates from tool arguments. * * Resolution priority: * 1. iOS label/text -> WDA element tap (returns iosTapDone) * 2. Android index -> cached/fresh element lookup * 3. Android text/resourceId -> fresh element lookup * 4. Raw x/y coordinates (need scale correction) * * Returns null if no coordinates could be resolved (caller should throw). */ export declare function resolveElementCoordinates(args: Record, ctx: ToolContext, currentPlatform: Platform | string | undefined, deviceId?: string): Promise; //# sourceMappingURL=resolve-element.d.ts.map