import { type Locator, type Page } from "playwright"; import type { AgentConfig, BrowserCookie, CookiesResponse, EvalResponse, GetKind, ProxyConfig, ProxySummary, RefDescriptor, ScrollDirection, SemanticFindAction, SemanticLocatorQuery, SessionRecord, StorageScope, StorageState, TabSummary, WaitLoadState } from "../lib/types"; export interface RemoteProfileInfo { profileId: string; name: string; notes?: string; proxy?: ProxySummary; os?: string; userAgent?: string; } export declare function normalizeProxySummary(proxy: unknown, fallback?: ProxyConfig): ProxySummary | undefined; export declare function buildHeadlessExtraParams(headless: boolean): string[]; export declare function extractProfileId(payload: unknown): string | undefined; export declare function applyProfileProxy(config: AgentConfig, token: string, profileId: string, proxy?: ProxyConfig): Promise; export declare function createManagedProfile(config: AgentConfig, token: string, sessionId: string, proxy?: ProxyConfig): Promise<{ profileId: string; proxy?: ProxySummary; }>; export declare function deleteProfile(token: string, profileId: string): Promise; export declare function getProfileProxy(config: AgentConfig, token: string, profileId: string): Promise; export declare function mapRemoteProfile(profile: unknown, fallbackProfileId?: string): RemoteProfileInfo | undefined; export declare function mapRemoteProfiles(payload: unknown): RemoteProfileInfo[]; export declare function createRemoteProfile(config: AgentConfig, token: string, options: { name: string; notes?: string; }): Promise; export declare function getRemoteProfileInfo(config: AgentConfig, token: string, profileId: string): Promise; export declare function listRemoteProfiles(config: AgentConfig, token: string): Promise; export declare function updateRemoteProfile(config: AgentConfig, token: string, profileId: string, updates: { name?: string; notes?: string; }): Promise; export declare function connectToBrowser(config: AgentConfig, token: string, profileId?: string, headless?: boolean): Promise>; export declare function navigatePage(page: Page, url: string, timeoutMs: number): Promise; export declare function resolveDescriptorLocator(page: Page, descriptor: RefDescriptor): Promise; export declare function resolveSelectorLocator(page: Page, selector: string, timeoutMs: number): Promise; export declare function resolveSemanticLocator(page: Page, query: SemanticLocatorQuery, timeoutMs: number): Promise; export declare function performLocatorAction(page: Page, locator: Locator, action: SemanticFindAction | "focus" | "dblclick" | "select" | "check" | "uncheck", timeoutMs: number, value?: string): Promise; export declare function actionMutatesSnapshot(action: SemanticFindAction): boolean; export declare function pressKey(page: Page, key: string, timeoutMs: number): Promise; export declare function waitForTarget(locator: Locator, timeoutMs: number): Promise; export declare function waitForPageText(page: Page, text: string, timeoutMs: number, exact?: boolean): Promise; export declare function waitForPageUrl(page: Page, urlPattern: string, timeoutMs: number): Promise; export declare function waitForPageLoad(page: Page, state: WaitLoadState, timeoutMs: number): Promise; export declare function readLocatorValue(locator: Locator, kind: GetKind, timeoutMs: number): Promise; export declare function scrollPage(page: Page, direction: ScrollDirection, pixels: number): Promise; export declare function scrollElement(locator: Locator, direction: ScrollDirection, pixels: number): Promise; export declare function scrollLocatorIntoView(locator: Locator, timeoutMs: number): Promise; export declare function uploadFiles(locator: Locator, files: string[], timeoutMs: number): Promise; export declare function savePdf(page: Page, targetPath: string): Promise; export declare function captureScreenshot(page: Page, targetPath: string, timeoutMs: number): Promise; export declare function listTabs(session: SessionRecord): Promise; export declare function openTab(session: SessionRecord, url: string | undefined, timeoutMs: number): Promise<{ page: Page; tabIndex: number; }>; export declare function focusTab(session: SessionRecord, index: number): Promise<{ page: Page; tabIndex: number; }>; export declare function closeTab(session: SessionRecord, index?: number): Promise<{ page: Page; closedTabIndex: number; activeTabIndex: number; }>; export declare function readCookies(session: SessionRecord): Promise; export declare function importCookies(session: SessionRecord, cookies: BrowserCookie[]): Promise; export declare function clearCookies(session: SessionRecord): Promise; export declare function exportStorageState(page: Page, scope?: StorageScope): Promise; export declare function importStorageState(page: Page, state: StorageState, scope?: StorageScope, clear?: boolean): Promise<{ origin: string; localKeys: number; sessionKeys: number; }>; export declare function clearStorageState(page: Page, scope?: StorageScope): Promise<{ origin: string; scope: StorageScope; }>; export declare function evaluateExpression(page: Page, expression: string): Promise; export declare function annotatePageWithRefs(page: Page, refs: Array<{ ref: string; x: number; y: number; }>): Promise; export declare function clearPageAnnotations(page: Page): Promise; export declare function closeSessionHandles(session: SessionRecord): Promise;