import fs from "fs"; import { type AsrExecutionProfile, type AsrDevicePreference, type AsrFailureCategory, type AsrModelKey, type AsrModelSpec, type AsrPaths } from "./state.js"; export declare const PYTHON_MIN_MAJOR = 3; export declare const PYTHON_MIN_MINOR = 9; export declare const COMPUTE_TYPE: "int8"; export declare const DEVICE: "cpu"; export interface PythonCommand { executable: string; prefixArgs: string[]; } export declare class AsrReadinessError extends Error { readonly category: AsrFailureCategory; readonly device?: AsrExecutionProfile["device"] | undefined; readonly gpuFailureCategory?: AsrFailureCategory | undefined; readonly allowFallback: boolean; constructor(category: AsrFailureCategory, device?: AsrExecutionProfile["device"] | undefined, gpuFailureCategory?: AsrFailureCategory | undefined, allowFallback?: boolean); } export declare function buildAsrChildEnv(source: Record): Record; declare function execFile(file: string, args: string[], signal?: AbortSignal): Promise<{ code: number | null; stdout: string; stderr: string; }>; export declare function discoverPython(spawnFn?: typeof execFile, envOverride?: string, candidates?: PythonCommand[]): Promise; export declare function createVenv(python: PythonCommand, venvPath: string, spawnFn?: typeof execFile, mkdirSyncFn?: typeof fs.mkdirSync): Promise; export declare function installRuntime(venvPython: PythonCommand, spawnFn?: typeof execFile): Promise; export declare function modelInstallBudgetBytes(modelSpec: AsrModelSpec): number; export declare function validateModelInstallTree(modelPath: string, maxBytes: number, maxFiles?: number): { bytes: number; files: number; }; export declare function downloadModel(venvPython: PythonCommand, modelPath: string, modelId: string, revision: string, spawnFn?: typeof execFile, mkdirSyncFn?: typeof fs.mkdirSync, maxBytes?: number): Promise; export declare function verifyModel(venvPython: PythonCommand, modelPath: string, executionProfile?: AsrExecutionProfile, spawnFn?: typeof execFile): Promise; export interface InstallResult { success: boolean; error?: string; pythonPath?: string; executionProfile?: AsrExecutionProfile; failureCategory?: AsrFailureCategory; failureDevice?: AsrExecutionProfile["device"]; gpuFailureCategory?: AsrFailureCategory; asrPaths: AsrPaths; } export declare function verifyInstalledDeviceReadiness(paths: Pick, preference?: AsrDevicePreference, signal?: AbortSignal, spawnFn?: typeof execFile): Promise<{ executionProfile: AsrExecutionProfile; failureCategory?: AsrFailureCategory; }>; export declare function runAsrInstallation(options?: { fsMkdirSync?: typeof fs.mkdirSync; fsLstatSync?: typeof fs.lstatSync; fsUnlinkSync?: typeof fs.unlinkSync; asrBase?: string; pythonOverride?: string; modelKey?: AsrModelKey; devicePreference?: AsrDevicePreference; spawnFn?: typeof execFile; onStage?: (stage: string) => void; }): Promise; export {}; //# sourceMappingURL=installer.d.ts.map