UNPKG

ai-debug-local-mcp

Version:

🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh

223 lines • 5.34 kB
/** * 🔄 AI-Debug Auto-Update System v4.1.0 * * Revolutionary auto-update mechanism for AI-Debug MCP Server * Ensures users always have the latest universal recording capabilities * * Features: * - Automatic version checking * - Background updates without interruption * - Rollback capability for safety * - Configurable update channels (stable, beta, nightly) * - Update notifications through MCP protocol */ import { EventEmitter } from 'events'; export interface UpdateConfig { enabled: boolean; checkInterval: number; channel: 'stable' | 'beta' | 'nightly'; autoDownload: boolean; autoInstall: boolean; notifyOnly: boolean; githubRepo: string; npmRegistry: string; preserveLocalChanges: boolean; backupBeforeUpdate: boolean; } export interface UpdateInfo { version: string; releaseNotes: string; publishedAt: Date; downloadUrl: string; size: number; sha256: string; breaking: boolean; features: string[]; fixes: string[]; securityPatches: boolean; } export interface UpdateStatus { checking: boolean; downloading: boolean; installing: boolean; available: boolean; current: string; latest: string; lastCheck: Date; error?: string; progress?: number; } export declare class AutoUpdater extends EventEmitter { private config; private status; private checkTimer?; private updateLock; private packageJsonPath; private currentVersion; constructor(config?: Partial<UpdateConfig>); /** * Get current installed version */ private getCurrentVersion; /** * Start automatic update checking */ private startAutoCheck; /** * Check for available updates */ checkForUpdates(): Promise<UpdateInfo | null>; /** * Fetch latest release information from GitHub */ private fetchLatestRelease; /** * Fallback to fetch from npm registry */ private fetchFromNpm; /** * Download update package */ private downloadUpdate; /** * Install downloaded update */ private installUpdate; /** * Check if running as global npm install */ private isGlobalInstall; /** * Update global npm package */ private updateGlobalPackage; /** * Update local npm package */ private updateLocalPackage; /** * Backup current installation */ private backupCurrentInstallation; /** * Rollback to previous version */ private rollbackUpdate; /** * Copy directory recursively */ private copyDirectory; /** * Extract features from release notes */ private extractFeatures; /** * Extract fixes from release notes */ private extractFixes; /** * Get current update status */ getStatus(): UpdateStatus; /** * Configure auto-updater */ configure(config: Partial<UpdateConfig>): void; /** * Manually trigger update check */ checkNow(): Promise<UpdateInfo | null>; /** * Install specific version */ installVersion(version: string): Promise<void>; /** * Clean up resources */ destroy(): void; } /** * Create MCP tool for update management */ export declare function createUpdateTools(): ({ name: string; description: string; inputSchema: { type: string; properties: { channel: { type: string; enum: string[]; description: string; }; version?: undefined; backup?: undefined; enabled?: undefined; autoInstall?: undefined; checkInterval?: undefined; }; }; } | { name: string; description: string; inputSchema: { type: string; properties: { version: { type: string; description: string; }; backup: { type: string; description: string; default: boolean; }; channel?: undefined; enabled?: undefined; autoInstall?: undefined; checkInterval?: undefined; }; }; } | { name: string; description: string; inputSchema: { type: string; properties: { enabled: { type: string; description: string; }; channel: { type: string; enum: string[]; description?: undefined; }; autoInstall: { type: string; description: string; }; checkInterval: { type: string; description: string; }; version?: undefined; backup?: undefined; }; }; } | { name: string; description: string; inputSchema: { type: string; properties: { channel?: undefined; version?: undefined; backup?: undefined; enabled?: undefined; autoInstall?: undefined; checkInterval?: undefined; }; }; })[]; //# sourceMappingURL=auto-updater.d.ts.map