import { Tool } from '@anthropic-ai/sdk/resources/messages.mjs';
import { BrowserConfig, BrowserTaskInput, BrowserTaskResult } from './tools/browser/types.js';

/**
 * Anthropic SDK adapter for browser automation tool
 */

/**
 * Anthropic tool definition for browser automation
 */
declare const browserTool: Tool;
/**
 * Create a configured browser tool with execute and formatResult methods
 *
 * @param config - Browser worker configuration
 * @returns Tool definition with execute and formatResult methods
 *
 * @example
 * ```typescript
 * import Anthropic from '@anthropic-ai/sdk';
 * import { createBrowserTool } from 'morphsdk/tools/browser/anthropic';
 *
 * const tool = createBrowserTool({
 *   apiKey: process.env.MORPH_API_KEY,
 *   timeout: 180000
 * });
 *
 * const client = new Anthropic();
 *
 * const response = await client.messages.create({
 *   model: 'claude-sonnet-4-5-20250929',
 *   tools: [tool], // tool itself is the Tool definition
 *   messages: [{
 *     role: 'user',
 *     content: 'Test the checkout flow at https://3000-abc.e2b.dev'
 *   }]
 * });
 *
 * // Execute and format
 * const result = await tool.execute(toolUseBlock.input);
 * const formatted = tool.formatResult(result);
 * ```
 */
declare function createBrowserTool(config?: BrowserConfig): Tool & {
    execute: (input: BrowserTaskInput) => Promise<BrowserTaskResult>;
    formatResult: (result: BrowserTaskResult) => string;
    getSystemPrompt: () => string;
};

declare const anthropic_browserTool: typeof browserTool;
declare const anthropic_createBrowserTool: typeof createBrowserTool;
declare namespace anthropic {
  export { anthropic_browserTool as browserTool, anthropic_createBrowserTool as createBrowserTool };
}

export { anthropic as a, browserTool as b, createBrowserTool as c };
