import { Logger } from '@agent-infra/logger'; import { BaseBrowser } from '@agent-infra/browser'; import type { ScreenshotOutput, ExecuteParams, ExecuteOutput, SupportedActionType } from '@gui-agent/shared/types'; import { Operator, ScreenContext } from '@gui-agent/shared/base'; import { BrowserOperatorOptions } from './types'; /** * BrowserOperator class that extends the base Operator * Provides functionality to control a browser instance for UI automation */ export declare class BrowserOperator extends Operator { private options; protected logger: Logger; protected browser: BaseBrowser; private uiHelper; private showActionInfo; private showWaterFlowEffect; private highlightClickableElements; private deviceScaleFactor?; private currentScreenContext?; private currentPage; private hotkeyExecutor?; /** * Creates a new BrowserOperator instance * @param options Configuration options for the browser operator */ constructor(options: BrowserOperatorOptions); /** * Sets whether to show action information overlay on the screen * @param enable Whether to enable showing action information */ setShowActionInfo(enable: boolean): void; /** * Sets whether to show the water flow effect during screenshots * @param enable Whether to enable the water flow effect */ setShowWaterFlow(enable: boolean): void; /** * Sets whether to highlight clickable elements on the screen * @param enable Whether to enable highlighting clickable elements */ setHighlightClickableElements(enable: boolean): void; /** * Cleans up resources used by the BrowserOperator * Closes the current page and performs cleanup operations */ cleanup(): Promise; destroyInstance(): Promise; protected initialize(): Promise; protected supportedActions(): Array; protected screenContext(): ScreenContext; /** * Takes a screenshot of the current browser viewport * @returns Promise resolving to screenshot data */ protected screenshot(): Promise; protected execute(params: ExecuteParams): Promise; /** * Executes a specified action based on the parsed prediction * @param action Parameters containing action details * @returns Promise resolving to execution output */ private singleActionExecutor; private handleClick; private handleDoubleClick; private handleRightClick; private handleType; private handleHotkey; private handlePress; private handleRelease; private handleScroll; private handleNavigate; private handleDrag; private handleNavigateBack; /** * A helper function to wait for possible navigation to complete. * @param page */ private waitForPossibleNavigation; private getScreenRect; private getDeviceScaleFactor; /** * Gets the currently active browser page * @returns Promise resolving to the active Page object * @throws Error if no active page is found */ private getActivePage; private getHotkeyExecutor; private getMeta; private calculateRealCoords; } //# sourceMappingURL=browser-operator.d.ts.map