/** * Auto-update functionality for mirra-cc-bridge * * Handles: * - Checking npm registry for latest version * - Comparing versions * - Running update process * - Post-update tasks (hooks refresh, resource update) */ /** * Update configuration stored in BridgeConfig */ export interface UpdateConfig { /** Enable auto-update without prompting */ autoUpdate?: boolean; /** ISO timestamp of last update check */ lastUpdateCheck?: string; /** Version to skip prompting for */ skipVersion?: string; /** Hours between update checks (default: 24) */ checkIntervalHours?: number; } /** * Result of an update check */ export interface UpdateCheckResult { updateAvailable: boolean; currentVersion: string; latestVersion: string | null; updated: boolean; skipped: boolean; error?: string; } /** * Get the currently installed version from package.json */ export declare function getCurrentVersion(): string; /** * Check npm registry for latest version * Returns null if check fails (network error, etc.) */ export declare function getLatestVersion(): Promise; /** * Compare semantic versions * Returns true if latest > current */ export declare function isNewerVersion(current: string, latest: string): boolean; /** * Check if hooks are actually present in Claude Code settings * This checks the actual file, not just the config flag */ export declare function areHooksActuallyConfigured(): boolean; /** * Run the npm update process * Uses npm to install the latest version globally */ export declare function performUpdate(): Promise; /** * Run post-update tasks * - Refresh hooks (in case they were removed during uninstall or need updating) * - Update resource methods if registered */ export declare function runPostUpdateTasks(): Promise; /** * Check for updates and handle accordingly * Called on startup before starting the server * * @param options.autoUpdate - If true, update without prompting (for headless/remote mode) * @param options.silent - If true, don't print "up to date" message * @param options.force - If true, check even if recently checked */ export declare function checkForUpdates(options?: { autoUpdate?: boolean; silent?: boolean; force?: boolean; }): Promise; /** * Verify hooks are properly configured * Called on startup to ensure hooks match config state * * This handles the case where: * - User uninstalls (hooks removed) * - User reinstalls (config says hooksConfigured=true, but hooks are gone) */ export declare function verifyAndRefreshHooks(): Promise; //# sourceMappingURL=updater.d.ts.map