/** * Context-window denominator resolution for the widget's health bar * (agent-frames capability, design D9). * * The health bar shows context headroom: `1 - contextTokens / window`. * The numerator comes from session-file usage (`SessionAnalysis.contextTokens`); * the denominator is resolved here from a small per-model pattern table with a * conservative default. The percentage is advisory presentation state, never a * lifecycle input — when the table is stale we prefer UNDER-reporting headroom * (a smaller assumed window), and the displayed value is clamped to 0–100%. */ /** * Conservative default context window (tokens) for unknown models. * Deliberately small-ish: an unknown model's health bar should exhaust * early (alarming) rather than late (falsely reassuring). */ export declare const DEFAULT_CONTEXT_WINDOW = 128000; /** * Resolve the context window (tokens) for a model id. * Unknown or missing model ids fall back to the conservative default. */ export declare function resolveContextWindow(model?: string): number; /** * Compute the context-headroom percentage (0–100, integer) for a usage * reading against the model's resolved window. Clamped so stale table * entries can never render a negative or >100% bar. * * A positive `windowOverride` — a REAL per-session window reported by the * harness's session format (codex `model_context_window`) — is preferred * over the static table lookup. */ export declare function contextHeadroomPercent(contextTokens: number, model?: string, windowOverride?: number): number; //# sourceMappingURL=context-window.d.ts.map