UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

38 lines • 1.82 kB
/** * Runtime-only selector suppression. A SelectorCooldowns instance belongs to one * AgentSession and is deliberately never persisted to settings or session files. * Keys are canonical base selectors (`provider/id`), or a rung (`provider/id:level`) for a * hard error that parks only the level that failed (senpi#3311). */ export declare class SelectorCooldowns { private readonly expiresAtBySelector; /** * The same deadline on the wall clock. The monotonic clock stops while the machine sleeps, so a limit that * reset during a sleep would stay held for its whole length again after waking (senpi#4085). */ private readonly wallExpiresAtBySelector; /** Wall-clock end of a suppression whose length the provider stated (a reset or retry-after), not a default. */ private readonly statedResetAtBySelector; private readonly now; private readonly random; private readonly wallNow; constructor(now: () => number, random?: () => number, wallNow?: () => number); note(baseSelector: string, failure: { retryAfterMs?: number; errorMessage?: string; }): void; isSuppressed(baseSelector: string): boolean; /** When a live suppression ends, if the provider stated it; undefined for a guessed default or no suppression. */ statedResetAt(baseSelector: string): number | undefined; clear(baseSelector: string): void; /** Clears `baseSelector` and every rung of it (`baseSelector:<thinking level>`), never another model. */ clearModel(baseSelector: string): void; /** The wall clock the stated resets are read on. */ wallClock(): number; clearAll(): void; private durationFor; private statedDurationMs; private defaultDurationMs; private capacityJitterMs; } //# sourceMappingURL=cooldown.d.ts.map