/**
 * Read a cached tarball by SRI integrity. Returns the raw tarball bytes if
 * the cache has a HIT, `null` otherwise. A read failure (e.g. partial
 * write from an interrupted previous run) is treated as a MISS — the file
 * is left untouched so we don't trip a follow-up writer's atomic rename.
 */
export declare function getCachedTarball(integrity: string | undefined): Uint8Array | null;
/**
 * Persist a tarball to the cache. Writes to a `<path>.tmp.<pid>` sibling
 * then atomically renames into place so concurrent installs can never
 * observe a half-written entry. No-op when:
 *   - `integrity` is missing / malformed (no cache key)
 *   - the destination already exists (idempotent — content-addressed)
 *   - the write fails (e.g. cache root is read-only) — silently degrade
 *     so a cache-volume issue doesn't break the install itself.
 */
export declare function putCachedTarball(integrity: string | undefined, bytes: Uint8Array): void;
/**
 * Best-effort cache stats for diagnostics. Returns `null` when the cache
 * root doesn't exist yet (first run).
 */
export declare function cacheRootForLogging(): string;
export declare function isCacheHit(integrity: string | undefined): boolean;
/**
 * Read a tarball from npm's cacache content store by SRI integrity. Returns
 * the raw `.tgz` bytes on a HIT, `null` on a MISS / disabled interop / read
 * failure. Like {@link getCachedTarball}, this trusts the content-addressed
 * path rather than re-hashing — the extractor surfaces any genuinely corrupt
 * tarball loudly, and cacache verified the bytes on write.
 */
export declare function getForeignCachedTarball(integrity: string | undefined): Uint8Array | null;
