//#region extensions/crypto/src/services/browser-service.d.ts /** * Browser Automation Service — PinchTab HTTP API client. * * PinchTab is a 12MB Go binary providing browser control via HTTP. * Token-efficient: extracts structured content (~800 tokens/page) * instead of screenshots. Stealth mode for bot detection bypass. * * HTTP API endpoints: * POST /navigate — Navigate to URL, return page content * POST /click — Click an element by selector * POST /type — Type text into an input field * POST /extract — Extract structured data from current page * POST /screenshot — Take a screenshot (fallback for visual inspection) * GET /status — Check if PinchTab is running * * Default: http://localhost:9222 (configurable via PINCHTAB_URL env var) */ interface NavigateResult { url: string; title: string; content: string; links: PageLink[]; forms: PageForm[]; status: number; loadTimeMs: number; } interface PageLink { text: string; href: string; selector: string; } interface PageForm { action: string; method: string; inputs: Array<{ name: string; type: string; placeholder?: string; selector: string; }>; } interface ClickResult { clicked: boolean; selector: string; newUrl?: string; content?: string; } interface TypeResult { typed: boolean; selector: string; value: string; } interface ExtractResult { data: Record; tokens: number; } interface BrowserStatus { running: boolean; url?: string; version?: string; currentPage?: string; } declare class BrowserService { private baseUrl; constructor(baseUrl?: string); /** * Check if PinchTab is running and accessible. */ getStatus(): Promise; /** * Navigate to a URL and extract page content. */ navigate(url: string, options?: { waitFor?: string; stealth?: boolean; timeout?: number; }): Promise; /** * Click an element on the current page. */ click(selector: string, options?: { waitForNavigation?: boolean; }): Promise; /** * Type text into an input field. */ type(selector: string, text: string, options?: { clear?: boolean; pressEnter?: boolean; }): Promise; /** * Extract structured data from the current page. * PinchTab uses smart extraction to keep token count low. */ extract(options?: { selector?: string; format?: 'text' | 'json' | 'table'; }): Promise; /** * Take a screenshot of the current page. * Returns base64-encoded PNG. Use sparingly — not token-efficient. */ screenshot(options?: { fullPage?: boolean; selector?: string; }): Promise<{ base64: string; width: number; height: number; }>; } declare function getBrowserService(): BrowserService; declare function resetBrowserService(): void; //#endregion export { BrowserService, BrowserStatus, ClickResult, ExtractResult, NavigateResult, PageForm, PageLink, TypeResult, getBrowserService, resetBrowserService }; //# sourceMappingURL=browser-service.d.mts.map