import type { ActionElement as _ActionElement } from "../cdp/walker.js"; export type ActionElement = _ActionElement; export interface RefEntry { id: string; role: string; label: string; type?: string; value?: string; href?: string; disabled?: boolean; fingerprint: string; } export interface SnapshotDiff { added: RefEntry[]; removed: string[]; changed: RefEntry[]; stable_count: number; _refs_truncated?: number; } export interface PropertyDiff { [propName: string]: { from: string; to: string; }; } export interface RichChangedRef { ref: string; role: string; label: string; changes: PropertyDiff; actionable?: boolean; recommended_action?: string; } export interface IframeChange { frameUrl: string; status: "added" | "removed" | "changed"; elementCount: number; } export interface RichDelta { added: RefEntry[]; removed: string[]; changed: RichChangedRef[]; stable_count: number; iframes?: IframeChange[]; } /** * Store a full snapshot for a tab target. */ export declare function storeSnapshot(targetId: string, urlOrRefs: string | RefEntry[], maybeRefs?: RefEntry[]): void; /** * Eagerly initialize the property snapshot cache for a tab. */ export declare function seedRichSnapshot(targetId: string, urlOrElements: string | ActionElement[], maybeElements?: ActionElement[]): void; /** * Compute basic delta. */ export declare function computeDelta(targetId: string, urlOrNewRefs: string | RefEntry[], maybeNewRefs?: RefEntry[]): SnapshotDiff | null; /** * Rich delta: wraps computeDelta with property-level change details. */ export declare function computeRichDelta(targetId: string, urlOrNewElements: string | ActionElement[], maybeNewElements?: ActionElement[]): Promise; /** * Clear snapshot for a tab (called on hard navigation). */ export declare function clearSnapshot(targetId: string): void; /** * Clear all snapshots (called on CDP disconnect). */ export declare function clearAllSnapshots(): void; /** * Get stored ref entry from snapshot for recovery of detached nodes. */ export declare function getStoredRef(targetId: string, refId: string): RefEntry | undefined; /** * Get stored element properties from rich snapshot for recovery. */ export declare function getStoredProps(targetId: string, refId: string): Record | undefined;