export interface CoreTool { name: string; description: string; category: 'core' | 'execution' | 'web'; inputSchema: any; } export interface ToolResult { success: boolean; output?: string; error?: string; exitCode?: number; } export declare class CoreTools { private static instance; private backgroundProcesses; private fileReadHistory; private constructor(); static getInstance(): CoreTools; /** * Get all available tools organized by category */ getTools(): CoreTool[]; /** * Execute a tool by name */ executeTool(toolName: string, args: any): Promise; /** * Read - Read files with line numbers (cat -n format) * Defaults to 2000 lines, supports offset/limit * Tracks read history for Edit validation */ private toolRead; /** * Write - Create or overwrite files * MUST have read file first if it exists (checked via read history) * Prefer Edit for existing files */ private toolWrite; /** * Edit - Exact string replacement * MUST have read file first * Validates uniqueness unless replace_all is true */ private toolEdit; /** * Glob - Find files by pattern * Returns paths sorted by modification time (newest first) */ private toolGlob; /** * Grep - Search file contents using ripgrep * Supports multiple output modes, context lines, filters */ private toolGrep; /** * Bash - Execute shell commands * Supports background execution with process tracking * Default timeout: 2 minutes, max: 10 minutes * On Windows: Uses PowerShell * On Unix: Uses default shell (bash/sh) */ private toolBash; /** * BashOutput - Monitor background processes * Returns only NEW output since last check */ private toolBashOutput; /** * KillShell - Terminate background process */ private toolKillShell; /** * Format tools for AI system prompt - organized by category */ formatToolsForPrompt(): string; /** * Convert tools to OpenAI tools array format * Used when sending tools parameter in chat completion requests */ toOpenAITools(): any[]; /** * Parse tool call from AI response * Supports multiple formats: * 1. JSON: {"tool": "exec_bash", "args": {...}} * 2. Function tags: */ parseToolCall(response: string): { tool: string; args: any; } | null; /** * List background processes */ listBackgroundProcesses(): string[]; } //# sourceMappingURL=core-tools.d.ts.map