/** * Version check module — checks npm registry for newer published versions. * Non-blocking, never throws. Caches results for 1 hour. */ export interface VersionInfo { current: string; latest: string; updateAvailable: boolean; releaseNotes?: string; } export interface UpdateState { previousVersion: string; updatedAt: string; updatedFrom: string; updatedTo: string; } /** Get the current installed version from package.json */ export declare function getCurrentVersion(): string; /** Simple semver compare: returns true if latest > current */ export declare function isNewer(latest: string, current: string): boolean; /** Count minor version gap (e.g., 0.28.7 → 0.30.0 = 2) */ export declare function minorVersionGap(latest: string, current: string): number; /** * Check for available updates. Caches result for 1 hour. * Never throws — returns { updateAvailable: false } on any error. */ export declare function checkForUpdate(skipCache?: boolean): Promise; /** Clear the cache (useful after an update) */ export declare function clearVersionCache(): void; export interface ChangelogEntry { version: string; notes: string; } /** Read and parse the full CHANGELOG.md into entries (newest first). */ export declare function readChangelog(): ChangelogEntry[]; /** Save the current version before updating (for rollback) */ export declare function saveUpdateState(from: string, to: string): void; /** Read the saved update state (for rollback) */ export declare function readUpdateState(): UpdateState | null; /** Check if sudo is needed for global npm install */ export declare function needsSudo(): Promise; /** Run the npm install to update to a specific version */ export declare function performUpdate(version: string): Promise<{ success: boolean; error?: string; }>; //# sourceMappingURL=version-check.d.ts.map