import { type Program, type Statement, type Expression, type RuntimeValue, type RuntimeFunction, type AIRequest, type AIResponse } from './types'; import { SesiProfiler } from './profiler'; export declare class Interpreter { private globalEnv; private currentEnv; private prompts; private memory; private modelAliases; private customTools; modelUsageState: { lastModelUsage: RuntimeValue; }; private profiler; private deadlineAt?; private timeoutMs?; exports: Map; private scriptDir; safeMode: boolean; allowLocalFs: boolean; allowedPaths: string[]; encrypt: boolean; decrypt: boolean; password: string; raw: boolean; args: string[]; constructor(scriptDir?: string, options?: { safeMode?: boolean; allowLocalFs?: boolean; allowedPaths?: string[]; encrypt?: boolean; decrypt?: boolean; password?: string; raw?: boolean; args?: string[]; profile?: boolean; timeoutMs?: number; deadlineAt?: number; modelUsageState?: { lastModelUsage: RuntimeValue; }; }); recordModelUsage(model: string, usage?: { inputTokens?: number; outputTokens?: number; thinkingTokens?: number; }, cached?: boolean): void; getLastModelUsage(): RuntimeValue; getProfiler(): SesiProfiler; getDeadlineAt(): number | undefined; getTimeoutMs(): number | undefined; checkTimeout(line?: number): void; /** * Resolves a local module path by searching in priority order: * 1. Relative to the script's own directory (if known) * 2. Relative to the current working directory * 3. Each directory listed in the SESI_PATH environment variable (colon/semicolon separated) * 4. The global Sesi library directory: ~/.sesi/lib */ private resolveModulePath; interpret(program: Program): Promise; private rethrowWithContext; setModelAlias(alias: string, modelName: string): void; resolveModelName(name: string): string; defineCustomTool(name: string, fn: RuntimeFunction, description?: string): void; getCustomTool(name: string): RuntimeFunction | null; getCustomToolDefinition(name: string): { fn: RuntimeFunction; description?: string; } | null; listCustomToolNames(): string[]; private typeAnnotationToToolSchema; private customToolDeclaration; private modelToolName; private resolveModelTools; private assertAutomatedToolIsSafe; private executeAutomatedTool; private parseModelToolCall; private toolResultText; callModelWithOrchestration(request: AIRequest, configuredTools?: RuntimeValue, maxToolCalls?: number): Promise; executeStatement(statement: Statement): Promise; private executeLet; private executeFunction; private executeExpression; private executeBlock; private executeTry; private normalizeCaughtError; private executeIf; private executeWhile; private executeFor; private executeMemory; private compactMemoryBinding; evaluateExpression(expr: Expression): Promise; private evaluateBinaryOp; private evaluateUnaryOp; private evaluateLogicalOp; private evaluateAssignment; private evaluateCall; private evaluateMember; private evaluateIndex; private evaluateArray; private evaluateObject; private evaluatePrompt; private evaluateImageCall; private evaluateVideoCall; private evaluateModelCall; private evaluateStructuredOutput; private evaluateToolCall; callSesiFunction(fn: RuntimeFunction, args: RuntimeValue[]): Promise; private executeExport; private getModuleExports; private executeImport; private executeAllow; private evaluateConvert; private evaluateAwait; loadStdModule(source: string): Map | null; } //# sourceMappingURL=interpreter.d.ts.map