import { type CdpTransport } from "../../core/cdp/protocol.js"; import { AgentSession, type AgentSessionOptions } from "../session.js"; import type { Point } from "../types.js"; import { type Frame, type Vendor } from "./frame.js"; import { type UrlPolicy } from "./url-policy.js"; export interface ComputerUseOptions { /** Browser Gateway connect address, e.g. wss://host/v1/connect?token=... */ endpoint?: string; /** Use this connection instead of opening one from `endpoint`. */ transport?: CdpTransport; /** Page size in CSS pixels. Default 1440x900. */ viewport?: { width: number; height: number; }; startUrl?: string; urls?: UrlPolicy; /** Default png. */ screenshotFormat?: "png" | "jpeg"; /** How long to wait for the page to settle after an action. Default 500 ms. */ settleMs?: number; /** Let downloads proceed, saved to this folder on the browser's machine. */ downloadPath?: string; session?: Pick; } export interface Observation { base64: string; mimeType: "image/png" | "image/jpeg"; width: number; height: number; url: string; } export declare const DEFAULT_VIEWPORT: { width: number; height: number; }; /** One browser driven by a model's computer-use actions. Owns the page size, * the screenshot frame the model sees, and the address policy. */ export declare class ComputerUseSession { readonly agent: AgentSession; private readonly cdp; readonly vendor: Vendor; private readonly opts; frame: Frame; private constructor(); static open(vendor: Vendor, opts: ComputerUseOptions): Promise; get urlPolicy(): ComputerUseOptions["urls"]; get settleMs(): number; /** Model frame point to page point. */ toPage(point: Point): Point; /** Gemini 0-999 grid point to page point. */ fromGrid(point: Point): Point; /** Opens an address after checking it, and checks again where redirects landed. */ navigate(url: string, tabId?: string): Promise; settle(tabId?: string): Promise; /** A screenshot of the visible page at the model's frame size. */ observe(tabId?: string): Promise; /** A region of the page, in frame pixels, enlarged to fill the frame. */ zoom(region: { x0: number; y0: number; x1: number; y1: number; }, tabId?: string): Promise; /** Releases held input, closes this session's tabs and the connection. Never closes the browser. */ close(): Promise; } //# sourceMappingURL=session.d.ts.map