import type { PromptCacheColdReason, PromptCacheStatus } from "@oh-my-pi/pi-tui/status-line/host"; import type { CacheWarmingStatus, ConfirmedPromptCacheEntry } from "./cache-warmer.js"; /** * A cache entry the session knows of: confirmed by a response this process saw, or inferred from the transcript. * A replaced transcript is read off its own branch instead, so no `history` change reaches here. */ export interface ObservedPromptCacheEntry extends Omit { change?: Exclude; inferred: boolean; } export interface PromptCacheStatusInputs { nowMs: number; /** The warmer's state for a confirmed entry; absent for an inferred one. */ warming?: CacheWarmingStatus; /** Estimated prompt tokens of the next request. */ nextTokens: number; } /** * Status of `entry` at `nowMs`; undefined when its model declares no lifetime * for the tier and the provider does not keep entries forever. A lapsed * lifetime is the reason whenever it holds: it is certain, and a change in the * next request only matters while the entry would otherwise still be live. A * refresh in flight that the provider sent before the entry lapsed holds expiry * off: it moves the touch once it hits. One sent after it cannot revive it. */ export declare function promptCacheStatus(entry: ObservedPromptCacheEntry, inputs: PromptCacheStatusInputs): PromptCacheStatus | undefined;