/**
 * Updater Service
 *
 * Handles checking for updates and providing update instructions.
 * Similar to Claude Code's self-update mechanism.
 */
import { type InstallMethod } from './install-method.js';
/**
 * GitHub release information
 */
export interface GitHubRelease {
    tag_name: string;
    name: string;
    body: string;
    html_url: string;
    published_at: string;
    prerelease: boolean;
    draft: boolean;
    assets: Array<{
        name: string;
        browser_download_url: string;
        size: number;
        content_type: string;
    }>;
}
/**
 * Update information returned by the update check
 */
export interface UpdateInfo {
    currentVersion: string;
    latestVersion: string;
    updateAvailable: boolean;
    releaseUrl: string;
    releaseNotes: string;
    publishedAt: string;
    installMethod: InstallMethod;
    updateCommand: string | null;
    isPrerelease: boolean;
}
/**
 * Cached update check result
 */
export interface UpdateCheckCache {
    lastCheck: string;
    latestVersion: string;
    releaseUrl: string;
    releaseNotes: string;
    publishedAt: string;
    isPrerelease: boolean;
}
/**
 * Updater Service - handles self-update functionality
 */
export declare class UpdaterService {
    private currentVersion;
    private githubRepo;
    constructor(githubRepo?: string);
    /**
     * Read the current version from package.json
     */
    private readCurrentVersion;
    /**
     * Get the current installed version
     */
    getCurrentVersion(): string;
    /**
     * Check if enough time has passed since the last check
     */
    private shouldCheck;
    /**
     * Save the update check result to cache
     */
    private saveCheckCache;
    /**
     * Load cached update info
     */
    private loadCache;
    /**
     * Fetch the latest release from GitHub
     */
    fetchLatestRelease(): Promise<GitHubRelease | null>;
    /**
     * Check for available updates
     * @param force - Force check even if recently checked
     * @returns Update info or null if check failed/skipped
     */
    checkForUpdates(force?: boolean): Promise<UpdateInfo | null>;
    /**
     * Get update instructions
     * @returns Object with success status and message
     */
    getUpdateInstructions(): Promise<{
        success: boolean;
        message: string;
    }>;
    /**
     * Get a brief update notification message (for startup)
     */
    getUpdateNotification(): Promise<string | null>;
    /**
     * Clear the update cache (for testing)
     */
    clearCache(): void;
}
/**
 * Get the singleton updater service
 */
export declare function getUpdaterService(): UpdaterService;
/**
 * Create a new updater service (for testing)
 */
export declare function createUpdaterService(githubRepo?: string): UpdaterService;
/**
 * Reset the singleton (for testing)
 */
export declare function resetUpdaterService(): void;
//# sourceMappingURL=updater-service.d.ts.map