import { Tool } from '@anthropic-ai/sdk/resources/messages';
import { EditFileResult, EditFileConfig, EditFileInput } from './tools/fastapply/types.js';

/**
 * Anthropic SDK adapter for edit_file tool
 */

/**
 * Anthropic-native tool definition for edit_file
 *
 * @example
 * ```ts
 * import Anthropic from '@anthropic-ai/sdk';
 * import { editFileTool } from 'morphsdk/tools/anthropic';
 *
 * const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
 *
 * const response = await client.messages.create({
 *   model: "claude-sonnet-4-5-20250929",
 *   tools: [editFileTool],
 *   messages: [{ role: "user", content: "Fix the bug in app.ts" }]
 * });
 * ```
 */
declare const editFileTool: Tool;
/**
 * Format the result for passing back to Claude
 *
 * @param result - The edit result
 * @returns Formatted string for tool_result
 */
declare function formatResult(result: EditFileResult): string;
/**
 * Create a custom edit_file tool with configuration
 *
 * @param config - Configuration options
 * @returns Tool definition with execute and formatResult methods
 *
 * @example
 * ```ts
 * const tool = createEditFileTool({
 *   baseDir: './src',
 *   generateUdiff: true,
 *   morphApiKey: 'sk-...',
 *   description: 'Custom tool description for your use case'
 * });
 *
 * // Use as Anthropic tool
 * const response = await client.messages.create({
 *   tools: [tool], // tool itself is the Tool definition
 *   ...
 * });
 *
 * // Execute and format
 * const result = await tool.execute(toolUseBlock.input);
 * const formatted = tool.formatResult(result);
 * ```
 */
declare function createEditFileTool(config?: EditFileConfig): Tool & {
    execute: (input: EditFileInput) => Promise<EditFileResult>;
    formatResult: (result: EditFileResult) => string;
    getSystemPrompt: () => string;
};
/**
 * Execute the edit_file tool with raw input
 *
 * @param input - Tool input from Claude's tool_use
 * @param config - Configuration for Fast Apply
 * @returns Tool result to send back to Claude
 */
declare function execute(input: EditFileInput, config?: EditFileConfig): Promise<EditFileResult>;
/**
 * Get the system prompt for the edit_file tool
 *
 * @returns System prompt string
 */
declare function getSystemPrompt(): string;

declare const anthropic_createEditFileTool: typeof createEditFileTool;
declare const anthropic_editFileTool: typeof editFileTool;
declare const anthropic_execute: typeof execute;
declare const anthropic_formatResult: typeof formatResult;
declare const anthropic_getSystemPrompt: typeof getSystemPrompt;
declare namespace anthropic {
  export { anthropic_createEditFileTool as createEditFileTool, anthropic_editFileTool as editFileTool, anthropic_execute as execute, anthropic_formatResult as formatResult, anthropic_getSystemPrompt as getSystemPrompt };
}

export { anthropic as a, execute as b, createEditFileTool as c, editFileTool as e, formatResult as f, getSystemPrompt as g };
