/**
 * Version Checker
 * Handles checking GitHub API for latest version and comparing semver.
 */
import { fetchJson } from './downloader';
import { UpdateCheckResult, VersionListResult } from './types';
import type { CLIProxyBackend } from '../types';
interface FetchLatestVersionDeps {
    fetchJsonFn?: typeof fetchJson;
}
interface CheckForUpdatesDeps {
    fetchLatestVersionFn?: (verbose: boolean, backend: CLIProxyBackend) => Promise<string>;
}
interface FetchAllVersionsDeps {
    fetchJsonFn?: typeof fetchJson;
}
/**
 * Compare semver versions (true if latest > current)
 * Handles CLIProxyAPIPlus versioning: strips -0 suffix before comparison
 */
export declare function isNewerVersion(latest: string, current: string): boolean;
/**
 * Check if version is within the faulty range (v81-85)
 * @returns true if version has known critical bugs
 */
export declare function isVersionFaulty(version: string): boolean;
/**
 * Fetch latest version from GitHub API
 * @param verbose Enable verbose logging
 * @param backend Backend to fetch version for (uses correct GitHub repo)
 */
export declare function fetchLatestVersion(verbose?: boolean, backend?: CLIProxyBackend, deps?: FetchLatestVersionDeps): Promise<string>;
/**
 * Check for updates by comparing installed version with latest release
 * Uses cache to avoid hitting GitHub API on every run
 * Cache is backend-specific to handle different repos for original vs plus
 */
export declare function checkForUpdates(binPath: string, configVersion: string, verbose?: boolean, backend?: CLIProxyBackend, deps?: CheckForUpdatesDeps): Promise<UpdateCheckResult>;
/**
 * Fetch all available versions from GitHub releases
 * Caches result for 1 hour to avoid rate limiting
 * @param verbose Enable verbose logging
 * @param backend Backend to fetch versions for (uses correct GitHub repo)
 */
export declare function fetchAllVersions(verbose?: boolean, backend?: CLIProxyBackend, deps?: FetchAllVersionsDeps): Promise<VersionListResult>;
export {};
//# sourceMappingURL=version-checker.d.ts.map