/** * Dry Run Tool Simulator Service * * Simulates tool execution in dry-run mode without making actual changes. * Read-only tools execute normally; write operations return simulated results. */ import type { LLMToolCall, LLMToolResult } from '../../types/llm.types.js'; import { type DiffResult } from '../../utils/diff-generator.js'; /** Type of simulated operation */ export type SimulatedOperationType = 'command' | 'delete' | 'external' | 'read' | 'search' | 'write'; /** * A simulated operation that would be performed */ export interface SimulatedOperation { /** Tool arguments */ args: Record; /** Diff result for file operations */ diff?: DiffResult; /** Human-readable description */ description: string; /** Simulated result message */ simulatedResult: string; /** Tool name */ tool: string; /** Operation type */ type: SimulatedOperationType; } /** * Result of simulating a tool call */ export interface SimulatedToolResult { /** The operation that was simulated */ operation: SimulatedOperation; /** The LLM tool result to return */ result: LLMToolResult; } /** * Service for simulating tool execution in dry-run mode */ export declare class DryRunToolSimulator { private readonly logger; private readonly operations; private readonly workingDir; constructor(workingDir?: string); /** * Check if a tool is read-only and can execute normally */ isReadOnlyTool(toolName: string): boolean; /** * Simulate a tool call without making actual changes */ simulateTool(toolCall: LLMToolCall): Promise; /** * Get all simulated operations collected so far */ getSimulatedOperations(): SimulatedOperation[]; /** * Get operations grouped by type */ getOperationsByType(): Record; /** * Get file operations (write, delete) with diffs */ getFileOperations(): SimulatedOperation[]; /** * Get terminal commands that would be executed */ getTerminalCommands(): SimulatedOperation[]; /** * Clear all collected operations */ clear(): void; /** * Simulate write tool */ private simulateWrite; /** * Simulate search_replace tool */ private simulateSearchReplace; /** * Simulate delete_file tool */ private simulateDeleteFile; /** * Simulate run_terminal_cmd tool */ private simulateTerminalCmd; /** * Simulate web_search tool */ private simulateWebSearch; /** * Simulate mcp_tool_call tool */ private simulateMcpToolCall; /** * Resolve a path relative to the working directory */ private resolvePath; } export declare function getDryRunSimulator(workingDir?: string): DryRunToolSimulator; /** * Reset the singleton (for testing or new sessions) */ export declare function resetDryRunSimulator(): void; //# sourceMappingURL=dry-run-simulator.service.d.ts.map