/** * Bounded live-region inspector for what this session has consumed. * * `/usage` used to be a settings picker and nothing else, which put a * three-choice menu in front of the one question the command's name asks. It is * now an inspector: bare `/usage` reports the session's cumulative tokens and * cost, and offers the status-line preference as one key inside it. Naming the * preference outright — `/usage cost`, `/usage tokens`, `/usage off` — still * changes it immediately without opening anything. * * Every figure here is a fact from an authority: the four token buckets are * Harness's `tokenUsage` projection, and the money is dshline's own pricing * fold, which is the only part of this that dshline owns. * * The report has two sections, answering two different questions. **Usage** is * what the session consumed; **Performance** is how it ran, from Harness's * `sessionStats` projection. Those two projections are read from ONE snapshot * cut, so the projection-backed halves cannot describe two different moments; * the money is the exception and comes from the separate pricing fold. The * stats unit is an optional row: without it the section says so in one line, * or — with no projection registry at all — is omitted, because the first * section has already said that. dshline never folds the figures itself. * @module dshline/usage-overlay */ import type { TuiOverlay } from './slots.ts'; import type { UsageInspection, UsageMode } from './usage.ts'; /** Inputs the usage inspector needs from its owner. */ export interface UsageOverlaySpec { /** The current reading, read fresh on every paint. */ readonly inspection: () => UsageInspection; /** What the status line currently reports. */ readonly mode: () => UsageMode; /** Open the existing status-display picker; the overlay closes first. */ readonly chooseDisplay: () => void; /** Remove this temporary overlay. */ readonly close: () => void; } /** * Create the bounded usage inspector. * @param spec - the reading, the preference, and overlay controls. * @returns a live-region overlay that never writes the transcript. */ export declare function createUsageOverlay(spec: UsageOverlaySpec): TuiOverlay; //# sourceMappingURL=usage-overlay.d.ts.map