import type { Usage, Window } from "./usage.js"; /** Total length of each sliding window, in seconds. */ export declare const WINDOW_SEC: { readonly fiveHour: number; readonly sevenDay: number; }; /** * Added to the ideal pace in the denominator. Without it the pace is near zero * right after a reset, and the smallest message would blow the ratio up. */ export declare const PACE_EPSILON = 2; export interface Pace { /** 0–100: fraction of the window already elapsed. null when not computable. */ idealPacePct: number | null; /** Usage relative to the ideal pace, in %. 100 = exactly on schedule. */ ratioPct: number | null; } export interface PaceVerdict { blocked: boolean; reason: string | null; } /** * Relates a window's usage to the time already spent in it. Returns nulls when * the window is missing or its reset unknown — no data does not mean overrun. */ export declare function computePace(w: Window | null, durationSec: number, nowMs: number): Pace; /** * Blocks as soon as ONE of the two windows burns faster than time passes. The * reason names the window with the highest ratio. With no data it does not * block: an unavailable API must not lock the tool. */ export declare function paceBlock(u: Usage | null, nowMs: number): PaceVerdict;