import { type DecisionLifecycleHold, type DecisionLifecyclePolicy, type DecisionLifecycleReference, type DecisionLifecycleRule, type DecisionLifecycleTombstone } from '../lifecycle.js'; import type { CompileCacheEntry, CompileCacheIdentity, CompileCacheReadContext, CompileCacheTombstoneRecord, Sha256 } from './types.js'; export declare class CompileCacheRejectedError extends Error { constructor(); } /** The D10 `cache` surface rule that governs retention, backup and hold handling. */ export declare function compileCacheLifecycleRule(policy: DecisionLifecyclePolicy): DecisionLifecycleRule; export declare function compileCacheReference(key: Sha256): DecisionLifecycleReference; /** * Scope and authorization are decided on the requested identity before any * storage lookup, so a denied caller cannot tell a present entry from an absent one. */ export declare function compileCacheScopeAllowed(identity: CompileCacheIdentity, context: CompileCacheReadContext): boolean; export declare function activeCompileCacheHold(entry: CompileCacheEntry, nowEpochMs: number): boolean; export declare function validateCompileCacheHold(hold: DecisionLifecycleHold, nowEpochMs: number): DecisionLifecycleHold; export declare function compileCacheTombstoneRecord(key: Sha256, nowEpochMs: number): CompileCacheTombstoneRecord; export declare function isCompileCacheTombstone(record: unknown, key: Sha256): record is CompileCacheTombstoneRecord; export declare function buildCompileCacheEntry(identity: CompileCacheIdentity, key: Sha256, context: CompileCacheReadContext, ttlMs: number, rule: DecisionLifecycleRule, compile: () => Promise): Promise>; /** Revalidate integrity, identity, scope, authorization and (unless allowed) expiry. */ export declare function revalidateCompileCacheEntry(entry: CompileCacheEntry, identity: CompileCacheIdentity, context: CompileCacheReadContext, allowExpired?: boolean): CompileCacheEntry; /** D10 restore gate: any tombstone for the key, or elapsed retention, refuses the backup. */ export declare function mayRestoreCompileCacheEntry(entry: CompileCacheEntry, nowEpochMs: number, policy: DecisionLifecyclePolicy, tombstones: ReadonlyArray): boolean; //# sourceMappingURL=records.d.ts.map