evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Create helper functions that expose cache inventory and lookup capabilities for a content-addressable cache directory.
/**
* Represents a cache entry discovered in the cache directory.
*/
export type CacheEntry = {
key: string;
integrity: string;
size: number;
time: number;
metadata?: unknown;
};
/**
* Lists all cache entries for the provided cache directory.
* Entries must be sorted by key ascending and include integrity, size, metadata (when present), and time.
*/
export async function listEntries(cachePath: string): Promise<CacheEntry[]>;
/**
* Retrieves a single cache entry by key and returns its integrity, size, metadata, and time.
* Rejects when the key is not present.
*/
export async function getEntry(cachePath: string, key: string): Promise<CacheEntry>;
/**
* Aggregates listing data into summary totals (entry count and cumulative size).
*/
export async function summarize(cachePath: string): Promise<{ count: number; totalSize: number }>;Provides content-addressable cache indexing and entry lookups.