/** * Verification helper functions for DOM state confirmation * Provides utilities to verify element state, detect visible feedback, and infer next actions */ import CDP from "chrome-remote-interface"; export interface ElementState { exists: boolean; tagName?: string; value?: string; textContent?: string; checked?: boolean; disabled?: boolean; visible?: boolean; attributes?: Record; className?: string; } export interface VisibleFeedback { type: 'error' | 'warning' | 'success' | 'info'; text: string; selector?: string; } /** * Read full element state for verification * Returns comprehensive state snapshot for before/after comparison */ export declare function verifyElementState(session: CDP.Client, selector: string): Promise; /** * Detect visible feedback messages (toasts, errors, validation messages) * Scans common selectors for feedback elements */ export declare function detectVisibleFeedback(session: CDP.Client): Promise; /** * Infer likely next action based on page context * Analyzes page state to suggest what the agent should do next */ export declare function inferNextAction(session: CDP.Client, lastAction: string, context?: { filledFields?: string[]; clickedElement?: string; }): Promise;