import { z } from 'zod';
export { WarpGrepClient, executeToolCall, executeWarpGrep, formatResult } from './client.js';
export { R as RemoteCommands, W as WarpGrepClientConfig, c as WarpGrepContext, a as WarpGrepInput, b as WarpGrepResult, d as WarpGrepToolConfig } from '../../types-BMowL9iZ.js';
export { GrepResult, ListDirectoryEntry, ReadResult, WarpGrepProvider } from './providers/types.js';
export { LocalRipgrepProvider } from './providers/local.js';
export { RemoteCommandsProvider } from './providers/remote.js';
export { fixPathRepetition } from './utils/paths.js';
export { runWarpGrep, runWarpGrepStreaming } from './agent/runner.js';
export { AgentRunResult, ChatMessage, SessionConfig, WarpGrepStep } from './agent/types.js';
export { SYSTEM_PROMPT as WARP_GREP_SYSTEM_PROMPT, getSystemPrompt } from './agent/prompt.js';
export { n as normalizeFinishFiles, r as readFinishFiles, t as toolGrep, b as toolListDirectory, a as toolRead } from '../../finish-pPJfB0uO.js';
import '../utils/resilience.js';

/**
 * Prompts and descriptions for warpgrep_codebase_search
 */
/**
 * Default tool name for the warp grep tool
 */
declare const WARP_GREP_TOOL_NAME = "warpgrep_codebase_search";
/**
 * Default tool description for the warp grep tool
 */
declare const WARP_GREP_DESCRIPTION: string;

/**
 * Morph Warp Grep SDK
 *
 * Fast and accurate code search tool for AI agents.
 * Uses ripgrep locally, or use `remoteCommands` for sandbox environments.
 *
 * @example Local usage
 * ```typescript
 * // With MorphClient (recommended)
 * import { MorphClient } from '@morphllm/morphsdk';
 *
 * const morph = new MorphClient({ morphApiKey: process.env.MORPH_API_KEY });
 * const result = await morph.warpGrep.execute({
 *   query: 'Find authentication middleware',
 *   repoRoot: '.'
 * });
 * ```
 *
 * @example
 * ```typescript
 * // Standalone client
 * import { WarpGrepClient } from '@morphllm/morphsdk/tools/warp-grep';
 *
 * const client = new WarpGrepClient({ morphApiKey: process.env.MORPH_API_KEY });
 * const result = await client.execute({
 *   query: 'Find authentication middleware',
 *   repoRoot: '.'
 * });
 * ```
 *
 * @example
 * ```typescript
 * // As a tool for AI agents
 * import { createWarpGrepTool } from '@morphllm/morphsdk/tools/warp-grep/anthropic';
 *
 * const tool = createWarpGrepTool({ repoRoot: '.' });
 * // Pass to Claude, GPT, Gemini, etc.
 * ```
 *
 * @example Remote sandbox (E2B, Modal, Daytona, etc.)
 * ```typescript
 * import { createMorphWarpGrepTool } from '@morphllm/morphsdk/tools/warp-grep/anthropic';
 *
 * 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,
 *   },
 * });
 * ```
 *
 * @example Provider-agnostic usage (bring your own tool abstraction)
 * ```typescript
 * import {
 *   warpGrepInputSchema,
 *   executeToolCall,
 *   WARP_GREP_TOOL_NAME,
 *   WARP_GREP_DESCRIPTION,
 * } from '@morphllm/morphsdk/tools/warp-grep';
 *
 * // Use with your own tool definition abstraction
 * const toolDef = createToolDef({
 *   name: WARP_GREP_TOOL_NAME,
 *   description: WARP_GREP_DESCRIPTION,
 *   schema: warpGrepInputSchema,
 * });
 *
 * // Execute
 * const result = await executeToolCall(
 *   { query: 'Find auth middleware' },
 *   { repoRoot: '.', morphApiKey: process.env.MORPH_API_KEY }
 * );
 * ```
 */

/** Provider-agnostic Zod schema for warp grep input */
declare const warpGrepInputSchema: z.ZodObject<{
    query: z.ZodString;
}, "strip", z.ZodTypeAny, {
    query: string;
}, {
    query: string;
}>;
type WarpGrepInputSchema = z.infer<typeof warpGrepInputSchema>;

export { WARP_GREP_DESCRIPTION, WARP_GREP_TOOL_NAME, type WarpGrepInputSchema, warpGrepInputSchema };
