/**
 * Lazy dependency downloader with integrity verification.
 *
 * Downloads, verifies SHA-256 integrity, extracts archives, and caches
 * dependencies for offline use. Uses atomic rename to prevent partial
 * downloads from polluting the cache.
 */
import type { LazyDep } from './registry.js';
/**
 * Verify SHA-256 integrity of downloaded content.
 *
 * @param content - Downloaded file contents as a Buffer
 * @param expectedHash - Expected SHA-256 hex digest
 * @throws If the hash does not match
 */
export declare function verifyIntegrity(content: Buffer, expectedHash: string): void;
/**
 * Ensure a lazy dependency is available in the cache.
 *
 * Flow:
 * 1. Check if already cached -> return path immediately
 * 2. Download from URL to temp directory
 * 3. Verify SHA-256 integrity
 * 4. Extract archive
 * 5. Atomic rename to final cache location
 * 6. Return path to cached dependency
 *
 * @param dep - Dependency metadata from the registry
 * @param cacheDir - Base cache directory
 * @returns Path to the cached dependency
 */
export declare function ensureDep(dep: LazyDep, cacheDir: string): Promise<string>;
//# sourceMappingURL=downloader.d.ts.map