/**
 * Update Check Module
 *
 * Handles background version checking with caching, package manager detection,
 * and dismissed version tracking. Never blocks startup with network calls —
 * uses cached values for display and checks in the background.
 *
 * Cache file: ~/.proletariat/version-check.json
 * Schema:
 * {
 *   "latest_version": "0.3.53",
 *   "last_checked_at": "2024-01-01T00:00:00.000Z",
 *   "dismissed_version": "0.3.53" | null
 * }
 */
export interface VersionCheckCache {
    latest_version: string | null;
    last_checked_at: string | null;
    dismissed_version: string | null;
}
export type PackageManager = 'brew' | 'npm';
export declare function readCache(): VersionCheckCache;
export declare function writeCache(cache: VersionCheckCache): void;
/**
 * Returns true if enough time has elapsed since the last check.
 */
export declare function shouldCheck(cache: VersionCheckCache): boolean;
/**
 * Detect how prlt was installed.
 *
 * Priority:
 * 1. PRLT_MANAGED_BY env var (explicit override)
 * 2. Binary path heuristic (Homebrew prefixes → brew, otherwise npm)
 */
export declare function detectPackageManager(): PackageManager;
/**
 * Get the update command string for the detected package manager.
 */
export declare function getUpdateCommand(pm: PackageManager): string;
/**
 * Fetch the latest version using the appropriate source for the package manager.
 * For brew installs, uses the Homebrew API (avoids false positives from npm).
 * Falls back to npm registry if brew API fails.
 */
export declare function fetchLatestVersion(pm: PackageManager): Promise<string | null>;
/**
 * Compare two semver-like version strings.
 * Returns true if `latest` is newer than `current`.
 */
export declare function isNewerVersion(current: string, latest: string): boolean;
export interface UpdateInfo {
    /** Whether an update is available (and not dismissed) */
    updateAvailable: boolean;
    /** The current CLI version */
    currentVersion: string;
    /** The latest available version (from cache) */
    latestVersion: string | null;
    /** Detected package manager */
    packageManager: PackageManager;
    /** The command to run the update */
    updateCommand: string;
}
/**
 * Check if an update is available using cached data only (synchronous, never blocks).
 * Returns update info if an update is available and not dismissed.
 */
export declare function getCachedUpdateInfo(currentVersion: string): UpdateInfo;
/**
 * Perform a background version check and update the cache.
 * This is fire-and-forget — errors are silently ignored.
 * Does not block the calling process.
 */
export declare function triggerBackgroundCheck(pm: PackageManager): void;
/**
 * Dismiss updates for a specific version. The prompt won't show again
 * until a newer version is available.
 */
export declare function dismissVersion(version: string): void;
/**
 * Dismiss updates for the current session only (no persistence).
 * This is the default "Skip" behavior — just don't persist anything.
 */
export declare function dismissSession(): void;
