import type { ToolSession } from "../../tools"; import type { JsDisplayOutput } from "./worker-protocol"; export { rewriteImports, wrapCode } from "./shared/rewrite-imports"; export type { JsDisplayOutput } from "./worker-protocol"; export interface VmRunState { signal?: AbortSignal; onText?: (chunk: string) => void; onDisplay?: (output: JsDisplayOutput) => void; } export declare function executeInVmContext(options: { sessionKey: string; sessionId: string; cwd: string; session: ToolSession; reset?: boolean; code: string; filename: string; timeoutMs?: number; runState: VmRunState; }): Promise<{ value: unknown; }>; export declare function resetVmContext(sessionKey: string): Promise; export declare function disposeAllVmContexts(): Promise;