| 126 | export { TabSession }; |
| 127 | |
| 128 | export interface BrowserState { |
| 129 | cookies: Cookie[]; |
| 130 | pages: Array<{ |
| 131 | url: string; |
| 132 | isActive: boolean; |
| 133 | storage: { localStorage: Record<string, string>; sessionStorage: Record<string, string> } | null; |
| 134 | /** |
| 135 | * HTML content loaded via load-html (setContent), replayed after context recreation. |
| 136 | * In-memory only — never persisted to disk (HTML may contain secrets or customer data). |
| 137 | */ |
| 138 | loadedHtml?: string; |
| 139 | loadedHtmlWaitUntil?: 'load' | 'domcontentloaded' | 'networkidle'; |
| 140 | /** |
| 141 | * Tab owner clientId for multi-agent isolation. Survives context recreation so |
| 142 | * scoped agents don't get locked out of their own tabs after viewport --scale. |
| 143 | * In-memory only. |
| 144 | */ |
| 145 | owner?: string; |
| 146 | }>; |
| 147 | } |
| 148 | |
| 149 | export class BrowserManager { |
| 150 | private browser: Browser | null = null; |
nothing calls this directly
no outgoing calls
no test coverage detected