import { f as Tool, A as APIToolDefinition, u as ToolUseBlock, r as ToolContext, i as ToolVerifier } from '../types-BJqLgf36.cjs'; export { s as ToolExecuteOptions, V as VerificationCheck, v as VerificationContext, w as VerificationResult, x as VerificationRule, z as defineTool, E as defineToolFromClass } from '../types-BJqLgf36.cjs'; import { D as DualPathVerifier } from '../router-w_4lkJaq.cjs'; export { FuzzyEditError, fuzzyContains, fuzzyReplace } from './fuzzy-edit.cjs'; import 'zod'; /** Registry for managing tool lookup and deduplication. */ declare class ToolRegistry { private readonly tools; constructor(tools?: Tool[]); /** Add a tool to the registry. Duplicate names are ignored (first one wins). */ add(tool: Tool): void; /** Get a tool by name. */ get(name: string): Tool | undefined; /** Check if a tool exists by name. */ has(name: string): boolean; /** Find tool by case-insensitive name. Returns undefined if not found. */ findCaseInsensitive(name: string): string | undefined; /** List all registered tool names. */ listNames(): string[]; /** Get all registered tools. */ getAll(): Tool[]; /** Get all tools in API format, sorted by name for cache stability. */ getAPI(): APIToolDefinition[]; /** Number of registered tools. */ get size(): number; } /** Result of a single tool execution. */ interface ToolExecutionResult { id: string; name: string; output: string; isError: boolean; durationMs: number; } interface OrchestrateOptions { verifier?: ToolVerifier; dualPathVerifier?: DualPathVerifier; previousToolCalls?: Array<{ name: string; input: Record; }>; turnCount?: number; } /** * Orchestrate execution of multiple tool calls with partition-based concurrency. * * Read-only, concurrency-safe tools are grouped into concurrent batches (max 10 parallel). * Non-safe tools are executed serially in their own batches. * Results are returned in the original call order. * * If a verifier is provided, each tool call is verified before execution. */ declare function orchestrateTools(tools: ToolRegistry, toolCalls: ToolUseBlock[], context: ToolContext, permissionCheck?: (name: string, input: Record) => Promise, abortSignal?: AbortSignal, options?: OrchestrateOptions): Promise; declare const BashTool: Tool<{ command: string; timeout?: number | undefined; workdir?: string | undefined; }>; declare const FileReadTool: Tool<{ path: string; offset?: number | undefined; limit?: number | undefined; }>; declare const FileWriteTool: Tool<{ path: string; content: string; }>; declare const FileEditTool: Tool<{ path: string; oldString: string; newString: string; replaceAll?: boolean | undefined; }>; declare const GlobTool: Tool<{ pattern: string; path?: string | undefined; include?: string | undefined; }>; declare const GrepTool: Tool<{ pattern: string; path?: string | undefined; include?: string | undefined; }>; declare const WebFetchTool: Tool<{ url: string; method?: "GET" | "POST" | "PUT" | "DELETE" | undefined; headers?: Record | undefined; body?: string | undefined; }>; export { APIToolDefinition, BashTool, FileEditTool, FileReadTool, FileWriteTool, GlobTool, GrepTool, type OrchestrateOptions, Tool, type ToolExecutionResult, ToolRegistry, ToolVerifier, WebFetchTool, orchestrateTools };