@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
23 lines • 832 B
TypeScript
/** What a cache entry holds. Mirrors Python's `Holds`. */
export declare enum Holds {
BYTES = "bytes",
BYTES_AND_VERSION = "bytes_and_version",
VERSION = "version"
}
export declare class CacheEntry {
readonly size: number;
readonly cachedAt: number;
readonly fingerprint: string | null;
readonly ttl: number | null;
readonly holds: Holds;
constructor(init: Pick<CacheEntry, 'size' | 'cachedAt'> & Partial<Pick<CacheEntry, 'fingerprint' | 'ttl' | 'holds'>>);
/** Whether the entry holds the file's bytes, not only its version. */
get hasBytes(): boolean;
/**
* Whether the entry has outlived its TTL at `now`.
*
* @param now whole seconds since the unix epoch, as `cachedAt` records it.
*/
isExpired(now: number): boolean;
}
//# sourceMappingURL=entry.d.ts.map