/** * npm registry freshness for the running CLI (npx cache often sticks on old builds). */ export declare function compareSemver(a: string, b: string): number; /** True when `candidate` is strictly newer than `current`. */ export declare function isSemverNewer(candidate: string, current: string): boolean; /** * Fetch `latest` from the npm registry. Returns null on timeout/network/parse errors. */ export declare function fetchNpmLatestVersion(packageName: string, timeoutMs?: number): Promise; export interface CliFreshness { running: string; latest: string | null; stale: boolean; } export declare function checkCliFreshness(runningVersion: string, packageName?: string): Promise; /** * `npx pkg@latest` keeps the extracted tree under `~/.npm/_npx` keyed by the * spec string, so a later publish still runs the old binary. Re-run the * registry version (a new cache key) with prefer-online. Do not wipe the * whole npm cache. `SVS_REEXEC=1` stops a loop. */ export declare function reexecIfRegistryIsNewer(running: string, argv: string[]): Promise;