export declare const MAX_MATCHES = 20; export interface DomMatch { tag: string; attributes: Record; text?: string; /** Which attribute names (or 'text') the regex hit — regex mode only. */ matchedOn?: string[]; /** Root→parent chain, each entry a compact "tag[identifying-attr]" descriptor. */ ancestry: string[]; suggestedSelector?: string; } export interface DomQueryResult { ok: boolean; error?: string; /** Total matches found (may exceed matches.length when truncated). */ total: number; truncated: boolean; matches: DomMatch[]; /** Primitive XPath results (count(), string(), boolean()) land here instead of matches. */ value?: string; } /** * Suggested selector, in healix's mobile priority order (accessibility id first, * XPath last), falling back to web conventions for HTML caches. */ export declare function suggestSelector(tag: string, a: Record, isHtml: boolean): string | undefined; export declare function queryDom(source: string, mode: 'xpath' | 'regex', query: string, isHtml: boolean): DomQueryResult; /** Render a DomQueryResult as compact display lines for the tool response. */ export declare function renderDomQueryResult(r: DomQueryResult): string[];