/** Running version and, once a registry check has succeeded, the latest published version. */ export interface UpdateStatus { current: string; latest?: string; updateAvailable?: boolean; } export interface UpdateCheckOptions { packageName: string; currentVersion: string; /** Where the last registry result is kept between sessions. No file disables the check. */ cacheFile?: string; env?: NodeJS.ProcessEnv; fetch?: typeof fetch; now?: () => number; } /** The check makes a network call, so it honors the telemetry opt-outs and skips CI. */ export declare function isUpdateCheckDisabled(env: NodeJS.ProcessEnv): boolean; /** True when `latest` is a newer release than `current`. Prerelease versions never compare. */ export declare function isNewerVersion(latest: string, current: string): boolean; /** * Advisory update check. Startup reads only the cached registry result, so the * notice never delays `initialize`; `refresh()` updates the cache in the * background for this session's `config_inspect` and the next session's * instructions. */ export declare class UpdateCheck { private readonly options; readonly disabled: boolean; private attemptedAt?; private cache?; private readonly env; private inflight?; private readonly now; constructor(options: UpdateCheckOptions); /** One instructions line when a newer version is known, otherwise undefined. */ note(): string | undefined; /** Fetch the latest version when the cached result is a day old. Never rejects. */ refresh(): Promise; status(): UpdateStatus; private fetchLatest; }