import { ToolResult } from '../types.js'; import { WorkspaceService } from './WorkspaceService.js'; export interface PythonExecutionArgs { code?: string; script_path?: string; args?: string[]; venv?: string; } export interface JavaScriptExecutionArgs { code?: string; script_path?: string; args?: string[]; } export interface CommandExecutionArgs { command: string; cwd?: string; env?: Record; timeout?: number; stream?: boolean; } export interface TestExecutionArgs { language: string; framework?: string; path?: string; pattern?: string; } export interface PackageInstallArgs { packages?: string[]; requirements_file?: string; venv?: string; } export interface NpmCommandArgs { command: string; args?: string[]; cwd?: string; } export declare class CodeExecutionService { private workspaceService; private defaultTimeout; private installTimeout; constructor(workspaceService: WorkspaceService); /** * Get current workspace path */ private getCurrentWorkspace; /** * Quote path if it contains spaces */ private quotePath; /** * Execute command with streaming support for long-running processes */ private executeWithStreaming; /** * Execute Python code or script */ runPython(args: PythonExecutionArgs): Promise; /** * Execute JavaScript code or script */ runJavaScript(args: JavaScriptExecutionArgs): Promise; /** * Execute shell command with improved timeout handling */ runCommand(args: CommandExecutionArgs): Promise; /** * Install Python packages using pip with extended timeout */ pipInstall(args: PackageInstallArgs): Promise; /** * Run npm commands with extended timeout */ npmCommand(args: NpmCommandArgs): Promise; /** * Run tests using various frameworks */ runTests(args: TestExecutionArgs): Promise; /** * Get Python command (python3, python, or py) */ private getPythonCommand; /** * Get pip command */ private getPipCommand; /** * Get appropriate timeout for command type */ private getTimeoutForCommand; /** * Build Python test command */ private _buildPythonTestCommand; /** * Build JavaScript test command */ private _buildJavaScriptTestCommand; } //# sourceMappingURL=CodeExecutionService.d.ts.map