import { MLTask, MLModel } from './ml-models';
/**
 * Service for in-browser machine learning tasks using transformers.js in a Web Worker.
 * Keeps pipeline loading and inference off the main thread so the UI does not freeze.
 */
export declare class InBrowserMLService {
    private static instance;
    private worker;
    private pendingLoad;
    private runRequestId;
    private runPending;
    private constructor();
    static getInstance(): InBrowserMLService;
    private getWorker;
    /**
     * Set Hugging Face token for authenticated model access (forwarded to worker).
     */
    setAuthToken(token: string | null): void;
    private ensurePipelineLoaded;
    /**
     * Get a callable pipeline for a specific task and model. Pipeline runs in a Web Worker.
     */
    getPipeline(task: MLTask | string, modelName: MLModel | string, options?: Record<string, unknown>): Promise<(input: unknown, runOptions?: Record<string, unknown>) => Promise<unknown>>;
    clearPipeline(task: MLTask | string, modelName: MLModel | string): void;
    clearAllPipelines(): void;
}
export declare const inBrowserMLService: InBrowserMLService;
//# sourceMappingURL=in-browser-ml-service.d.ts.map