import type { Logger } from '../types.js'; export interface SelfUpdateOptions { /** Target version — 'latest' or a semver like '2.6.1'. Default 'latest'. */ version?: string; /** npm package to install. Default 'infinicode' (override via INFINICODE_UPDATE_PKG). */ pkg?: string; channel?: 'npm' | 'git' | 'manual'; /** The version currently running, for the from→to report. */ currentVersion?: string; /** Node runs under a supervisor → safe to exit-for-restart. Falls back to * INFINICODE_SUPERVISED=1. */ supervised?: boolean; /** Schedule a restart after a successful install. Defaults to `supervised`. */ restart?: boolean; /** Delay before exiting so the command reply flushes back over the mesh. */ restartDelayMs?: number; logger?: Logger; } export interface SelfUpdateResult { ok: boolean; from?: string; to: string; restarting: boolean; message: string; } export declare function performSelfUpdate(opts?: SelfUpdateOptions): Promise;