import { JSBackendBase } from './JSBackendBase';
/**
 * Minimal type for the ORT WASM Emscripten module instance.
 * We use the module directly for synchronous access to the C API.
 */
export interface OrtWasmModule {
    _OrtInit(numThreads: number, loggingLevel: number): number;
    _OrtCreateSessionOptions(graphOptLevel: number, enableCpuMemArena: number, enableMemPattern: number, executionMode: number, enableProfiling: number, profileFilePrefix: number, logId: number, logSeverityLevel: number, logVerbosityLevel: number, optimizedModelFilePath: number): number;
    _OrtReleaseSessionOptions(handle: number): number;
    _OrtCreateSession(modelData: number, modelDataLength: number, sessionOptions: number): number;
    _OrtReleaseSession(handle: number): number;
    _OrtGetInputOutputCount(sessionHandle: number, inputCountOffset: number, outputCountOffset: number): number;
    _OrtGetInputOutputMetadata(sessionHandle: number, index: number, nameOffset: number, metadataOffset: number): number;
    _OrtCreateTensor(dataType: number, data: number, dataByteLength: number, dimsOffset: number, dimsLength: number, dataLocation: number): number;
    _OrtReleaseTensor(handle: number): number;
    _OrtRun(sessionHandle: number, inputNamesOffset: number, inputValuesOffset: number, inputCount: number, outputNamesOffset: number, outputCount: number, outputValuesOffset: number, runOptionsHandle: number): number;
    _OrtGetTensorData(tensorHandle: number, dataTypeOffset: number, dataOffset: number, dimsOffset: number, dimsLengthOffset: number): number;
    _OrtGetLastError(errorCodeOffset: number, errorMessageOffset: number): void;
    _OrtCreateRunOptions(logSeverityLevel: number, logVerbosityLevel: number, terminate: number, tag: number): number;
    _OrtReleaseRunOptions(handle: number): number;
    _OrtFree(ptr: number): number;
    _malloc(size: number): number;
    _free(ptr: number): void;
    stackSave(): number;
    stackRestore(ptr: number): void;
    stackAlloc(size: number): number;
    setValue(ptr: number, value: number, type: string): void;
    getValue(ptr: number, type: string): number;
    UTF8ToString(ptr: number): string;
    HEAPU8: Uint8Array;
    HEAP32: Int32Array;
    HEAPU32: Uint32Array;
    HEAPF32: Float32Array;
    PTR_SIZE: number;
}
/**
 * ONNX Runtime Web backend implementation.
 * Loads the ORT WASM module directly for synchronous inference in the
 * process() callback, mirroring the native OnnxRuntimeProcessor.
 */
export declare class ONNXRuntimeWebBackend extends JSBackendBase {
    private ort;
    private sessionHandle;
    private runOptionsHandle;
    private inputMeta;
    private outputMeta;
    /**
     * Async initialization: loads the ORT WASM module, creates an inference
     * session from the model binary stored in anira's shared WASM memory.
     * Called automatically by the worker handler after processor registration.
     */
    init(): Promise<void>;
    process(inputVecPtr: number, outputVecPtr: number): void;
    destroy(): void;
    /**
     * Replace any dynamic dims (-1) with concrete values inferred from the
     * total number of elements. Only a single dynamic dim is supported.
     */
    private resolveDynamicDims;
    private queryMetadata;
    private createZeroInputs;
    private runOrt;
}
//# sourceMappingURL=ONNXRuntimeWebBackend.d.ts.map