export interface BootstrapState {
    status: 'downloading' | 'ready' | 'failed' | 'no_runtime';
    searxngPath?: string;
    attempts?: number;
    lastAttemptAt?: string;
    nextRetryAt?: string;
    lastError?: {
        message: string;
        stderr: string;
        exitCode: number | null;
        command: string;
        timestamp: string;
    };
    /** @deprecated legacy field; read-only for back-compat. Never written by new code. */
    error?: string;
}
export declare function backoffSchedule(attempt: number): number | null;
export interface BootstrapErrorDetail {
    stderr: string;
    exitCode: number | null;
    command: string;
}
export declare class BootstrapError extends Error {
    readonly detail: BootstrapErrorDetail;
    constructor(detail: BootstrapErrorDetail);
}
export declare function runStep(command: string, args: string[], opts: {
    timeout: number;
}): void;
export declare function acquireBootstrapLock(dataDir: string): () => void;
export interface WaitForBootstrapOpts {
    timeoutMs: number;
    intervalMs: number;
}
export declare function waitForBootstrap(dataDir: string, opts: WaitForBootstrapOpts): Promise<'ready' | 'failed'>;
export interface BackendResolution {
    type: 'external' | 'native' | 'docker' | 'scraping';
    url?: string;
    searxngPath?: string;
}
export declare function checkPythonAvailable(): boolean;
export declare function checkDockerAvailable(): boolean;
export declare function getBootstrapState(dataDir: string): BootstrapState | null;
export declare function setBootstrapState(dataDir: string, state: BootstrapState): void;
export declare function generateSettings(port: number): string;
export declare function resolveSearchBackend(): Promise<BackendResolution>;
export declare function bootstrapNativeSearxng(dataDir: string): Promise<void>;
//# sourceMappingURL=bootstrap.d.ts.map