import { type ShellResult } from "./shell.js";
export interface UpdateStatus {
    omk: PackageUpdateStatus;
    kimi: KimiUpdateStatus;
    checkedAt: string;
    cacheHit: boolean;
}
export interface PackageUpdateStatus {
    current: string;
    latest: string | null;
    outdated: boolean;
    error: string | null;
    installCmd: string;
}
export interface KimiUpdateStatus {
    installed: string | null;
    latest: string | null;
    outdated: boolean;
    error: string | null;
    installCmd: string;
    fallbackInstallCmd: string;
    installScript: string;
}
export declare const OMK_NPM_PACKAGE_NAME = "open-multi-agent-kit";
type UpdatePromptEnv = Record<string, string | undefined>;
export type OmkUpdatePromptChoice = "update-now" | "skip-version" | "remind-later";
/**
 * Returns true when `env.OMK_AUTO_UPDATE` is one of 1/true/yes/on/always
 * (case-insensitive), indicating the user wants non-interactive auto-updates.
 */
export declare function resolveAutoUpdateMode(env: UpdatePromptEnv): boolean;
export type OmkUpdatePromptDecisionReason = "disabled" | "ci" | "non-tty" | "not-outdated" | "missing-latest" | "skipped-version" | "remind-active" | "prompt";
export type OmkUpdatePromptAction = Exclude<OmkUpdatePromptDecisionReason, "prompt"> | "suppressed" | "prompted-skip" | "prompted-remind" | "updated" | "update-failed" | "cancelled" | "timeout";
export interface OmkUpdatePromptState {
    skippedVersion?: string;
    remindAfter?: string;
    updatedAt?: string;
}
export interface OmkUpdatePromptDecision {
    shouldPrompt: boolean;
    reason: OmkUpdatePromptDecisionReason;
    latestVersion?: string;
    remindAfter?: string;
}
export interface OmkUpdatePromptResult {
    action: OmkUpdatePromptAction;
    shouldExit: boolean;
    exitCode?: number;
    version?: string;
    message?: string;
}
interface OmkUpdatePromptChoiceItem {
    name: string;
    value: OmkUpdatePromptChoice;
    description?: string;
}
interface OmkUpdatePromptSelectConfig {
    message: string;
    choices: OmkUpdatePromptChoiceItem[];
}
export interface OmkUpdatePromptOptions {
    status?: UpdateStatus | null;
    checkUpdatesFn?: () => Promise<UpdateStatus>;
    env?: UpdatePromptEnv;
    isTTY?: boolean;
    isCI?: boolean;
    now?: Date;
    statePath?: string;
    source?: "chat" | "root" | "test";
    promptTimeoutMs?: number;
    selectPrompt?: (config: OmkUpdatePromptSelectConfig, options?: {
        signal?: AbortSignal;
    }) => Promise<OmkUpdatePromptChoice>;
    runUpdate?: () => Promise<ShellResult>;
    onLog?: (message: string) => void;
}
export declare function getOmkUpdatePromptStatePath(): string;
export declare function readOmkUpdatePromptState(statePath?: string): Promise<OmkUpdatePromptState | null>;
export declare function writeOmkUpdatePromptState(state: OmkUpdatePromptState, statePath?: string): Promise<void>;
export declare function resolveOmkUpdatePromptState(options: {
    status: UpdateStatus | null;
    state?: OmkUpdatePromptState | null;
    env?: UpdatePromptEnv;
    isTTY?: boolean;
    isCI?: boolean;
    now?: Date;
}): OmkUpdatePromptDecision;
export declare function formatStartupUpdateBanner(updateStatus: UpdateStatus): string;
export declare function maybePromptForOmkUpdate(options?: OmkUpdatePromptOptions): Promise<OmkUpdatePromptResult>;
export declare function parseSemverParts(v: string): [number, number, number] | null;
export declare function compareVersions(a: string, b: string): number;
export declare function isOutdated(current: string, latest: string): boolean;
export declare function checkUpdates(forceRefresh?: boolean): Promise<UpdateStatus>;
export {};
