import CDP from "chrome-remote-interface"; import type { Config } from "../config/loader.js"; import type { WeaveError } from "./click.js"; export interface TypeResult { success: true; typed_into: string; ref: string; length: number; execution_ms: number; tab_id: string; url: string; title: string; /** Only present when include_map:true was passed or url_changed is true. */ page_map?: string; /** true if any DOM elements changed after typing. */ dom_changed: boolean; /** true if dom_changed is false — the page did not respond to this action. */ stuck_warning: boolean; /** Guidance when stuck_warning is true. */ stuck_hint?: string; /** Sniper warning if multiple matches were found. */ sniper_warning?: string; /** true if a high-confidence memory hit was used; false/absent if DOM was resolved normally. */ memory_hit?: boolean; /** Rich delta showing exactly what changed */ delta?: any; /** SEMANTIC RESPONSE CONTRACT FIELDS */ confirmed: boolean; strategy: string; elementState?: Record; visibleFeedback?: string[]; suggestedNext?: string; } /** * Detect the JavaScript framework used by the current page * This helps determine the best input event strategy */ export declare function detectFramework(session: CDP.Client): Promise<'react' | 'vue' | 'angular' | 'vanilla'>; /** * Framework-aware text injection. * React/Vue controlled inputs require the native prototype setter + InputEvent * to trigger synthetic event reconciliation. Firing a plain Event('input') AFTER * an insertText causes a second state update — the source of triplication. * * Returns true when the native-setter path was taken (caller skips redundant * post-type event dispatch). */ export declare function frameworkAwareType(session: CDP.Client, objectId: string, text: string, framework: 'react' | 'vue' | 'angular' | 'vanilla'): Promise; export declare function weaveType(session: CDP.Client, args: { id?: string; target?: string; selector?: string; label?: string; intent?: string; backendNodeId?: number; x?: number; y?: number; text: string; clearFirst?: boolean; paste?: boolean; /** Typing profile: 'normal' (default) | 'fast' | 'deliberate'. Auto-selected if omitted. */ profile?: "fast" | "normal" | "deliberate"; /** Set true to include the full updated page_map in the response. Default false. */ include_map?: boolean; fast?: boolean; noRetry?: boolean; }, config: Config): Promise;