/** * RLM REPL Executor * Executes Python-like code in a sandboxed JavaScript environment * with support for sub-LLM calls */ import type { ExecutorResult } from './types.js'; /** * REPL Executor with sandboxed execution */ export declare class RLMExecutor { private variables; private output; private subCallCount; private maxSubCalls; private finalAnswer; private subLLMCallback; private onSubLLMCall; constructor(maxSubCalls?: number); /** * Set callback for when a sub-LLM call is made (for progress tracking) */ setOnSubLLMCall(callback: (count: number) => void): void; /** * Initialize the execution context with files */ initialize(files: Record): void; /** * Set the sub-LLM callback */ setSubLLMCallback(callback: (query: string) => Promise): void; /** * Execute code and return result */ execute(code: string): Promise; /** * Extract code from markdown code blocks */ private extractCode; /** * Validate code for security issues */ private validateSecurity; /** * Convert Python-like syntax to JavaScript and execute */ private executeInSandbox; /** * Convert Python indentation to JavaScript blocks */ private convertIndentationToBlocks; /** * Check if final answer was set */ hasFinalAnswer(): boolean; /** * Get the final answer */ getFinalAnswer(): string | null; /** * Get all output */ getOutput(): string; /** * Get sub-call count */ getSubCallCount(): number; /** * Reset state for new execution */ reset(): void; /** * Clear just the final answer (used when rejecting insufficient analysis) */ clearFinalAnswer(): void; } //# sourceMappingURL=executor.d.ts.map