import { Tool } from '@anthropic-ai/sdk/resources/messages';
export { formatResult } from './client.js';
import { d as WarpGrepToolConfig, b as WarpGrepResult, g as GitHubSearchToolConfig, h as GitHubReadFileToolConfig, e as GitHubReadFileInput, f as GitHubReadFileResult } from '../../types-CtkD4o1_.js';
import './agent/types.js';
import '../utils/resilience.js';
import './providers/types.js';

/**
 * Anthropic SDK adapter for morph-warp-grep tool
 */

/**
 * Anthropic-native warp grep tool definition
 *
 * @example
 * ```typescript
 * import Anthropic from '@anthropic-ai/sdk';
 * import { warpGrepTool, execute } from '@morphllm/morphsdk/tools/warp-grep/anthropic';
 *
 * const client = new Anthropic();
 * const response = await client.messages.create({
 *   model: 'claude-sonnet-4-5-20250929',
 *   tools: [warpGrepTool],
 *   messages: [{ role: 'user', content: 'Find authentication middleware' }]
 * });
 *
 * // Execute the tool call
 * const result = await execute({ search_term: '...' }, { repoRoot: '.' });
 * ```
 */
declare const warpGrepTool: Tool;
/**
 * Execute warp grep search
 *
 * @param input - Tool input with search_term
 * @param config - Configuration with repoRoot and optional provider
 * @returns Search results
 */
declare function execute(input: {
    search_term: string;
} | string, config: WarpGrepToolConfig): Promise<WarpGrepResult>;

/**
 * Create a custom warp grep tool with configuration and methods
 *
 * @param config - Configuration options
 * @returns Tool definition with execute and formatResult methods
 *
 * @example Local usage
 * ```typescript
 * import Anthropic from '@anthropic-ai/sdk';
 * import { createWarpGrepTool } from '@morphllm/morphsdk/tools/warp-grep/anthropic';
 *
 * const tool = createWarpGrepTool({ repoRoot: '.' });
 *
 * const client = new Anthropic();
 * const response = await client.messages.create({
 *   model: 'claude-sonnet-4-5-20250929',
 *   tools: [tool],
 *   messages: [{ role: 'user', content: 'Find authentication middleware' }]
 * });
 * ```
 *
 * @example Remote sandbox (E2B, Modal, etc.)
 * ```typescript
 * const tool = createMorphWarpGrepTool({
 *   repoRoot: '/home/repo',
 *   remoteCommands: {
 *     grep: async (pattern, path) => (await sandbox.run(`rg '${pattern}' '${path}'`)).stdout,
 *     read: async (path, start, end) => (await sandbox.run(`sed -n '${start},${end}p' '${path}'`)).stdout,
 *     listDir: async (path, maxDepth) => (await sandbox.run(`find '${path}' -maxdepth ${maxDepth}`)).stdout,
 *   },
 * });
 * ```
 */
declare function createWarpGrepTool(config: WarpGrepToolConfig): Tool & {
    execute: (input: unknown) => Promise<WarpGrepResult>;
    formatResult: (result: WarpGrepResult) => string;
};
/**
 * Create a GitHub search tool for Anthropic SDK
 *
 * @param config - Configuration options (morphApiKey, morphApiUrl, codeSearchUrl, timeout)
 * @returns Anthropic Tool with execute and formatResult methods
 *
 * @example
 * ```typescript
 * import Anthropic from '@anthropic-ai/sdk';
 * import { createGitHubSearchTool } from '@morphllm/morphsdk/tools/warp-grep/anthropic';
 *
 * const tool = createGitHubSearchTool({ morphApiKey: process.env.MORPH_API_KEY });
 *
 * const response = await client.messages.create({
 *   model: 'claude-sonnet-4-5-20250929',
 *   tools: [tool],
 *   messages: [{ role: 'user', content: 'How does auth work in vercel/next.js?' }]
 * });
 *
 * // Execute
 * const result = await tool.execute({ search_term: 'auth middleware', github_url: 'https://github.com/vercel/next.js' });
 * console.log(tool.formatResult(result));
 * ```
 */
declare function createGitHubSearchTool(config: GitHubSearchToolConfig): Tool & {
    execute: (input: {
        search_term: string;
        github_url?: string;
        owner_repo?: string;
        branch?: string;
    }) => Promise<WarpGrepResult>;
    formatResult: (result: WarpGrepResult) => string;
};
/**
 * Create a GitHub read file tool for Anthropic SDK
 *
 * @param config - Optional configuration (timeout)
 * @returns Anthropic Tool with execute and formatResult methods
 *
 * @example
 * ```typescript
 * import Anthropic from '@anthropic-ai/sdk';
 * import { createGitHubReadFileTool } from '@morphllm/morphsdk/tools/warp-grep/anthropic';
 *
 * const tool = createGitHubReadFileTool();
 *
 * const response = await client.messages.create({
 *   model: 'claude-sonnet-4-5-20250929',
 *   tools: [tool],
 *   messages: [{ role: 'user', content: 'Read the package.json from vercel/next.js' }]
 * });
 *
 * const result = await tool.execute({ github: 'vercel/next.js', path: 'package.json' });
 * console.log(tool.formatResult(result));
 * ```
 */
declare function createGitHubReadFileTool(config?: GitHubReadFileToolConfig): Tool & {
    execute: (input: GitHubReadFileInput) => Promise<GitHubReadFileResult>;
    formatResult: (result: GitHubReadFileResult) => string;
};

export { createGitHubReadFileTool, createGitHubSearchTool, createWarpGrepTool, execute, warpGrepTool };
