/** * browser_use — unified browser AgentTool. * * Modes: command | inspect | close. * Replaces the 14 fine-grained browser_* tools with a single entry point. */ import type { AgentTool } from '@earendil-works/pi-agent-core'; import type { Config } from '../../../../config/schema.js'; import type { BrowserManager } from '../../../../browser/manager.js'; import type { CdpSupervisor } from '../../../../browser/cdp-supervisor.js'; import type { Page } from 'playwright-core'; import type { BrowserNotReadyError } from '../../../../browser/readiness.js'; export interface CreateBrowserUseToolDeps { getManager: () => BrowserManager; getPageForTask: () => Promise; getTaskId: () => string; getConfig: () => Config | undefined; getSupervisor?: () => CdpSupervisor | undefined; notifyBrowserPageClosed?: (taskId: string) => void; /** * Preflight readiness check. Returns `null` when the configured backend is * usable, otherwise a structured hint the chat surface renders as a setup * card. Cache the result upstream (~30s) so back-to-back calls don't reprobe. */ getReadiness?: () => Promise; } export declare function createBrowserUseTool(deps: CreateBrowserUseToolDeps): AgentTool;