UNPKG

agent-device

Version:

Open source device layer for AI coding agents: a CLI, MCP server, and typed Node.js API to control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud.

45 lines • 1.11 kB
import { B as SnapshotNode } from "./sdk-contracts.js"; //#region packages/selectors/src/internal/find.d.ts declare const FIND_LOCATORS: readonly ['any', 'text', 'label', 'value', 'role', 'id']; type FindLocator = (typeof FIND_LOCATORS)[number]; type FindAction = { kind: 'click'; } | { kind: 'focus'; } | { kind: 'fill'; value: string; } | { kind: 'type'; value: string; } | { kind: 'get_text'; } | { kind: 'get_attrs'; } | { kind: 'exists'; } | { kind: 'wait'; timeoutMs?: number; } | { kind: 'list'; }; type ParsedFindArgs = { locator: FindLocator; query: string; action: FindAction['kind']; value?: string; timeoutMs?: number; }; declare function parseFindArgs(args: string[]): ParsedFindArgs; //#endregion //#region src/finders.d.ts type FindMatchOptions = { requireRect?: boolean; }; declare function findBestMatchesByLocator(nodes: SnapshotNode[], locator: FindLocator, query: string, options?: boolean | FindMatchOptions): { matches: SnapshotNode[]; score: number; }; //#endregion export { findBestMatchesByLocator as n, parseFindArgs as r, FindMatchOptions as t };