import CDP from "chrome-remote-interface"; import type { Config } from "../config/loader.js"; export interface FillField { ref?: string; selector?: string; target?: string; name?: string; label?: string; placeholder?: string; value: string; } /** A single cell write for Google Sheets / Canvas grid filling. */ export interface GridCell { /** Cell address in A1 notation, e.g. "A1", "B3", "C12". */ cell: string; /** Value to type into the cell. */ value: string; } export interface FillOptions { fields?: FillField[]; submit?: string; scan_only?: boolean; scan?: boolean; inputs?: boolean; blast_mode?: boolean; /** Grid-fill mode for Google Sheets and other canvas-rendered spreadsheets. * Provide cell addresses in A1 notation with their values. * The tool uses the Chrome Accessibility Tree to locate each cell. */ grid_data?: GridCell[]; } export interface FillResult { success: boolean; total_fields: number; succeeded: number; failed: number; submitted: boolean; inputs?: Array<{ ref: string; tag: string; type: string; name?: string; label?: string; placeholder?: string; value: string; focused?: boolean; disabled?: boolean; visible?: boolean; }>; results: { ref: string; field_type: string; success: boolean; message: string; value?: string; }[]; execution_ms: number; /** Concrete next step for the agent when fill fails */ suggestedNext?: string; } export declare function browserFill(session: CDP.Client, options: FillOptions, config: Config): Promise;