import { z } from "zod";
type PnpmSource = "path" | "pnpm_home" | "home_pnpm" | "homebrew_bin" | "homebrew_cellar";
export interface ResolvedPnpm {
    command: string;
    version: string;
    source: PnpmSource;
}
export declare function resolvePnpmCommand(): Promise<ResolvedPnpm>;
export interface UpgradeResult {
    /** Human-readable message describing what happened */
    message: string;
    /** Whether the upgrade was successful (includes "already up-to-date") */
    ok: boolean;
}
export interface UpgradeOptions {
    /** When true, pull from the "beta" dist-tag instead of "latest". */
    beta?: boolean;
    /** Custom npm dist-tag to install from (e.g. "dev-feat-rdp"). Overrides beta. */
    tag?: string;
    /** When true, install the resolved tag version even if semver says the current version is newer. */
    force?: boolean;
}
/**
 * Core upgrade logic shared by the MCP upgrade tool and the remote command handler.
 *
 * Checks npm for the latest version, installs it, writes the pending-upgrade
 * marker, and schedules a restart when a process manager is available.
 *
 * Throws on unexpected errors (callers should catch).
 */
export declare function performUpgrade(options?: UpgradeOptions): Promise<UpgradeResult>;
export declare const upgradeTool: import("@anthropic-ai/claude-agent-sdk").SdkMcpToolDefinition<{
    check_only: z.ZodOptional<z.ZodBoolean>;
    restart_only: z.ZodOptional<z.ZodBoolean>;
    tag: z.ZodOptional<z.ZodString>;
}>;
export {};
//# sourceMappingURL=upgrade.d.ts.map