/**
 * Optional vision-model integration.
 *
 * Takes a screenshot via the upstream take_screenshot tool, sends it to a
 * vision model, and returns the analysis as text. This lets the LLM identify
 * elements by visual attributes (color, layout, coordinates) when the
 * accessibility tree is insufficient.
 *
 * Both extension mode and CLI mode resolve credentials from Pi's model registry.
 */
import type { VisionModelConfig } from './config.js';
import type { DevToolsClient } from './index.js';
/** System prompt for the vision analysis model. */
export declare const VISUAL_SYSTEM_PROMPT = "You are a Visual Analysis Agent. You receive a screenshot of a browser page and an instruction.\n\nYour job is to ANALYZE the screenshot and provide precise information that a browser automation agent can act on.\n\nCOORDINATE SYSTEM:\n- Coordinates are pixel-based relative to the viewport\n- (0,0) is top-left of the visible area\n- Estimate element positions from the screenshot\n\nRESPONSE FORMAT:\n- For coordinate identification: provide exact (x, y) pixel coordinates\n- For element identification: describe the element's visual location and appearance\n- For layout analysis: describe the spatial relationships between elements\n- Be concise and actionable\n\nIMPORTANT:\n- You are NOT performing actions \u2014 you are only providing visual analysis\n- Include coordinates when possible so the caller can use click_at(x, y)\n- If the element is not visible in the screenshot, say so explicitly";
/**
 * Abstraction for calling a vision model.
 * Extension mode and CLI mode each provide their own implementation.
 */
export type VisionCaller = (instruction: string, imageBase64: string, mimeType: string) => Promise<string>;
/** Create a VisionCaller that resolves credentials from Pi's model registry. Used in CLI standalone mode. */
export declare function createFetchVisionCaller(visionConfig: VisionModelConfig): VisionCaller;
/**
 * Capture a screenshot via the upstream tool and analyze it with the provided vision caller.
 * The caller abstraction allows extension mode (pi-ai) and CLI mode (raw fetch) to share logic.
 */
export declare function handleAnalyzeScreenshot(client: DevToolsClient, callVision: VisionCaller, args: Record<string, unknown>): Promise<{
    content: Array<{
        type: string;
        text: string;
    }>;
    isError?: boolean;
}>;
//# sourceMappingURL=analyze-screenshot.d.ts.map