/** * Bounded read-only inspector for this session's cache behaviour. * * Two sections, two authorities, and the overlay never joins them. **Cache * accounting** is Harness's cumulative `tokenUsage` buckets, over the whole * session and every route it used. **Request header** is `Session.requestHeader()` * and `Session.requestContext()` — the LATEST records Harness kept, which are not * a promise about the next request: a step may reassemble the tools before a new * header is logged. Neither section is presented as evidence about the other. * * The header section reports no system prompt. Under Session format V3 the * prompt is a `system/message` surface node rather than a header field, so * `/cache` names the one prompt fact the request head still holds: how the * recorded route takes a prompt that changes mid-conversation. See * `./model.ts`. * * There is no preference to set and nothing to mutate: `/cache` observes, and * every optimization gesture a cache inspector invites — warning on `/model`, * guarding a route, rewriting a request — is control, which belongs to a seam * that defines authorization and lifecycle for it rather than to this overlay. * @module dshline/cache/overlay */ import type { TuiOverlay } from '../slots.ts'; import type { CacheInspection } from './model.ts'; /** Inputs the cache inspector needs from its owner. */ export interface CacheOverlaySpec { /** The current reading, read fresh on every paint. */ readonly inspection: () => CacheInspection; /** Remove this temporary overlay. */ readonly close: () => void; } /** * Create the bounded cache inspector. * @param spec - the reading and overlay controls. * @returns a live-region overlay that never writes the transcript. */ export declare function createCacheOverlay(spec: CacheOverlaySpec): TuiOverlay; //# sourceMappingURL=overlay.d.ts.map