/**
 * Dependency-specific cache layer wrapping CacheStorage.
 *
 * Stores and retrieves dependency tarballs keyed by lockfileHash + platform + arch.
 * Shared CacheStorage backend with SourceCache (same S3 bucket).
 * Refreshes TTL on reads (touch-on-read).
 *
 * Cache key format: deps/{platform}-{arch}/{lockfileHash}.tar.gz
 */
import type { CacheStorage } from '../storage/types.js';
export declare class DepCache {
    private readonly storage;
    private readonly maxTarballBytes;
    constructor(options: {
        storage: CacheStorage;
        maxTarballBytes?: number;
    });
    /** Check if a dep tarball exists in cache. */
    has(lockfileHash: string, platform: string, arch: string): Promise<boolean>;
    /**
     * Get a pre-signed download URL for the dep tarball (for agent delivery).
     * Refreshes TTL on hit.
     */
    getUrl(lockfileHash: string, platform: string, arch: string): Promise<string | null>;
    /**
     * Get a pre-signed download URL and the tarball content hash (if available).
     * Returns null on cache miss. Hash may be undefined for old entries stored
     * before integrity tracking was added.
     */
    getUrlAndHash(lockfileHash: string, platform: string, arch: string): Promise<{
        url: string;
        hash?: string;
    } | null>;
    /**
     * Get a pre-signed upload URL for direct agent-to-S3 upload.
     */
    getUploadUrl(lockfileHash: string, platform: string, arch: string): Promise<string>;
    /**
     * Store a dep tarball in cache.
     * Throws if tarball exceeds max size (per user decision).
     */
    store(lockfileHash: string, platform: string, arch: string, tarballData: Buffer): Promise<void>;
    /**
     * Compute SHA-256 hash of a tarball buffer.
     * Used by build agents to compute the hash for depsHash protocol field.
     */
    static computeHash(data: Buffer): string;
    /** Remove a dep tarball from cache. */
    remove(lockfileHash: string, platform: string, arch: string): Promise<boolean>;
}
//# sourceMappingURL=dep-cache.d.ts.map