evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A utility that reports whether cached content exists for given Subresource Integrity digests without reading stored data.
export interface PresenceResult {
/** Integrity string provided by the caller. */
integrity: string;
/** Whether cached content exists for the integrity. */
found: boolean;
/** Size in bytes when present; null when missing. */
size: number | null;
/** Canonical integrity string from the cache when present; otherwise null. */
actualIntegrity: string | null;
}
/**
* Reports presence and metadata for each integrity without reading cached payloads.
*/
export async function checkContentPresence(
cachePath: string,
integrities: string[]
): Promise<PresenceResult[]>;
/**
* Summarizes presence checks without touching stored data.
* Returns { total, found, missing, foundSize } where foundSize sums byte sizes of present entries.
*/
export async function summarizePresence(
cachePath: string,
integrities: string[]
): Promise<{
total: number;
found: number;
missing: number;
foundSize: number;
}>;Provides integrity-level cache presence checks and integrity metadata without reading content bytes.