import { JsRuntime } from './base.ts';
import { EVALUATOR, type Evaluator } from '../mixin.ts';
import type { EvalResult, EvalValue, RunArgs, RunResult, RuntimeOptions } from '../types.ts';
import { type MountResolver } from '../resolver.ts';
import type { BridgeDispatchFn } from '../types.ts';
export declare class QuickJsRuntime extends JsRuntime implements Evaluator {
    readonly name = "quickjs";
    readonly reach = "vfs";
    readonly [EVALUATOR]: true;
    private newAsyncModule;
    private workspaceBridge;
    private resolver;
    constructor(options?: RuntimeOptions);
    attach(dispatch: BridgeDispatchFn, resolver: MountResolver): void;
    run(args: RunArgs): Promise<RunResult>;
    /**
     * Evaluate one JS program; the completion value is the value.
     *
     * Inputs bind as globals and the source runs at global scope, so the
     * LAST EXPRESSION is the value (what the policy engine consumes for
     * JS policy scripts). Each eval is a fresh engine, mirroring the
     * python wasi runtime, so console sessions are not supported.
     */
    eval(code: string, opts?: {
        inputs?: Record<string, EvalValue>;
        session?: string;
    }): Promise<EvalResult>;
    close(): Promise<void>;
    /**
     * Arm the VM's interrupt hook: the only cancellation that works when
     * the guest blocks the event loop. Trips on the limit deadline
     * (recorded in the returned cell) or on an aborted signal.
     */
    private installInterrupt;
    private installGlobals;
    private drainJobs;
    private formatError;
    private loadModule;
}
//# sourceMappingURL=quickjs.d.ts.map