import type { CacheBackend } from "./types.js"; /** Deterministic overflow from an exact bounded cache read. */ export declare class CacheValueTooLargeError extends RangeError { readonly maximumBytes: number; constructor(maximumBytes: number); } /** Validate one caller-supplied cache payload byte ceiling. */ export declare function assertCacheReadMaximumBytes(maximumBytes: number): number; /** Verify a string payload without allocating an encoded copy. */ export declare function assertCacheValueWithinLimit(value: string, maximumBytes: number): number; export interface CapturedBoundedCacheRead { readonly getWithinLimit: NonNullable; } /** Capture an optional bounded-read capability without invoking accessors. */ export declare function captureBoundedCacheRead(backend: unknown): CapturedBoundedCacheRead | null; /** Invoke and post-verify one exact bounded cache read. */ export declare function readCacheValueWithinLimit(backend: CacheBackend, key: string, maximumBytes: number): Promise; //# sourceMappingURL=bounded-read.d.ts.map