export interface UpdateState { enabled: boolean; current: string; latest?: string; updateAvailable: boolean; status: 'idle' | 'disabled' | 'current' | 'available' | 'ready' | 'failed'; lastCheckedAt?: string; nextCheckAt?: string; lastError?: 'check_failed' | 'invalid_metadata' | 'install_failed' | 'update_busy'; packageRoot?: string; restartRequired: boolean; } export interface UpdateProcessOptions { cwd: string; env: NodeJS.ProcessEnv; timeout: number; maxBuffer: number; shell: false; } export interface UpdateOptions { force?: boolean; now?: () => number; fetch?: (url: string, init: RequestInit) => Promise; execute?: (file: string, args: readonly string[], options: UpdateProcessOptions) => Promise<{ stdout: string; }>; timeoutMs?: number; lockTimeoutMs?: number; } /** Only allowlisted state is exposed; credentials and raw process errors never enter this file. */ export declare function updateStatus(home: string): UpdateState; export declare function setAutoUpdate(home: string, enabled: boolean): UpdateState; export declare function checkForUpdate(home: string, options?: UpdateOptions): Promise; export declare function installUpdate(home: string, options?: UpdateOptions): Promise;