/**
 * UpgradeCliUseCase
 *
 * Executes a self-upgrade of @shepai/cli to the latest published version.
 * Mirrors the CLI upgrade command logic but designed for use from the web layer.
 *
 * Flow:
 *   1. Check latest version from npm registry (fail-open)
 *   2. Compare with current version — return early if up to date
 *   3. Run `npm i -g @shepai/cli@latest` with streamed output
 *   4. Return result with old/new version info
 */
import type { IVersionService } from '../../ports/output/services/version-service.interface.js';
import type { IDaemonService } from '../../ports/output/services/daemon-service.interface.js';
export interface UpgradeResult {
    status: 'up-to-date' | 'upgraded' | 'error';
    currentVersion: string;
    latestVersion: string | null;
    errorMessage?: string;
}
export declare class UpgradeCliUseCase {
    private readonly versionService;
    private readonly daemonService;
    constructor(versionService: IVersionService, daemonService: IDaemonService);
    execute(onOutput?: (data: string) => void): Promise<UpgradeResult>;
    private getLatestVersion;
    private preDownloadPackage;
    /**
     * Schedule a daemon self-restart after upgrade.
     * Reads the current daemon port, spawns a new daemon process with the
     * upgraded code, then exits the current process after a brief delay.
     */
    scheduleDaemonRestart(): Promise<void>;
    private runNpmInstall;
}
//# sourceMappingURL=upgrade-cli.use-case.d.ts.map