import { Command } from 'commander'; import { type CdpConnector } from './chrome-use-connection.js'; import { type RelaySessionSummary } from './types.js'; interface CommandOutput { ok: boolean; command: string; profile: string; mode: 'local' | 'remote' | 'devtools'; sessionId?: string; requestedSessionId?: string; sessions?: RelaySessionSummary[]; ignoredCompatibilityOptions?: string[]; [key: string]: unknown; } interface CommandContextInit { port: number; debug: boolean; devtools: boolean; remoteUuid?: string; sessionId?: string; profile: string; json: boolean; timeoutMs: number; target?: string; pageId?: number; /** Test-only: inject a fake CDP connector for the chrome-use (--devtools) backend. */ chromeUseConnector?: CdpConnector; } export declare function registerBrowserCommand(program: Command): void; export declare function registerStandaloneBrowserCli(program: Command): void; export declare class BrowserCliContext { private readonly connection; private readonly profile; private readonly json; private readonly timeoutMs; private readonly devtoolsOnly; private readonly remoteUuid?; private readonly requestedSessionId?; private readonly target?; private readonly pageId?; private toolsLoaded; private tools; private sessions; private readonly ignoredCompatibilityOptions; constructor(init: CommandContextInit); connect(): Promise; shutdown(): Promise; ensureExtensionConnected(): Promise; listSessions(): Promise; status(options?: { waitForExtension?: boolean; waitTimeoutMs?: number; pollIntervalMs?: number; failIfDisconnected?: boolean; }): Promise; listPages(): Promise; open(url?: string): Promise; navigate(url: string): Promise; close(id: string): Promise; focus(id: string): Promise; snapshot(options: { format: string; limit?: number; interactive: boolean; selector?: string; frame?: string; compact: boolean; depth?: number; efficient: boolean; labels: boolean; }): Promise; screenshot(options: { fullPage: boolean; ref?: string; outputPath?: string; detail?: string; grayscale: boolean; }): Promise; requests(options: { filter?: string; limit?: number; }): Promise; responseBody(options: { pattern?: string; maxChars?: number; }): Promise; click(ref: string, options: { double: boolean; }): Promise; type(ref: string, text: string, options: { submit: boolean; }): Promise; press(keys: string): Promise; hover(ref: string): Promise; drag(source: string, target: string): Promise; select(ref: string, values: string[]): Promise; fillForm(fieldsJson: string): Promise; wait(options: { text?: string[]; seconds?: number; timeoutMs: number; }): Promise; evaluate(options: { fn: string; ref?: string; argsJson?: string; }): Promise; resize(width: number, height: number): Promise; upload(ref: string, path: string): Promise; dialog(options: { accept: boolean; dismiss: boolean; promptText?: string; }): Promise; private callGenericCommand; private callTool; private ensureToolsLoaded; private outputFromInvocation; private ensurePageContentInOutput; private recoverPageContentAfterTimeout; private takeMarkdownSnapshotForTarget; private ensureNavigatePageId; private resolveActivePageId; private listPagesForRecovery; private takeMarkdownSnapshotForPage; private mode; private currentSessionId; private isBackendConnected; private getConnectionErrorMessage; outputMode(): 'local' | 'remote' | 'devtools'; redactErrorMessage(message: string): string; outputContext(): Pick; } export {}; //# sourceMappingURL=browser-cli.d.ts.map