import type { Page } from "playwright"; import type { ListenerTriggerEvent, PageListener } from "./page-listener-types.js"; import { type BrowserPoolConfig, type SessionBrowser } from "./types.js"; export interface SessionSummary { agentId: string; browserId: string; title: string; pageCount: number; activePageIndex: number; launchedAt: number; lastActivityAt: number; currentUrl: string; currentTitle: string; } export declare class BrowserPool { private readonly config; private readonly sessions; private readonly closingKeys; private idleTimer; private readonly sessionCloseHandlers; onSessionClose(handler: (agentId: string, browserId: string) => void): void; getSsrfConfig(): BrowserPoolConfig["ssrfConfig"]; private readonly profileStore; private readonly listenerStore; private listenerTriggerHook; setListenerTriggerHook(hook: ((agentId: string, browserId: string, event: ListenerTriggerEvent, listener: PageListener) => void) | null): void; private resolveKey; constructor(config?: BrowserPoolConfig); launch(agentId: string, browserId?: string, title?: string, scopeKey?: string): Promise; private launchChromium; get(agentId: string, browserId?: string): SessionBrowser | undefined; getOrLaunch(agentId: string, browserId?: string, title?: string, scopeKey?: string): Promise; close(agentId: string, browserId?: string): Promise; private registerPageClose; closeByAgent(agentId: string): Promise; collectListenerEvents(agentId: string): Promise; getActivePage(agentId: string, browserId?: string): Page; setActivePage(agentId: string, index: number, browserId?: string): Promise; newPage(agentId: string, browserId?: string): Promise; closePage(agentId: string, index: number, browserId?: string): Promise; listSessions(agentId?: string): SessionSummary[]; touchActivity(agentId: string, browserId?: string): void; dispose(): Promise; private requireSession; private ensureIdleTimer; private stopIdleTimer; private checkIdleSessions; } export declare function getBrowserPool(config?: BrowserPoolConfig): BrowserPool; export declare function disposeBrowserPool(): Promise;