/** * SELF-UPDATE SYSTEM FOR UNIVERSAL CAPABILITY FRAMEWORK * * Implements automatic self-update capabilities as per AGI Code rules. * Provides version checking, state persistence, and seamless updates. */ import { UniversalCapabilityModule } from './universalCapabilityFramework.js'; import { UniversalCapabilityFramework } from './universalCapabilityFramework.js'; export interface UpdateManifest { version: string; timestamp: string; changes: string[]; dependencies: Record; breakingChanges: boolean; rollbackSupported: boolean; } export interface UpdateState { currentVersion: string; updateInProgress: boolean; lastUpdateAttempt: string | null; lastSuccessfulUpdate: string | null; pendingUpdate: UpdateManifest | null; errorHistory: Array<{ timestamp: string; error: string; }>; } export interface SelfUpdateOptions { /** Enable automatic update checking */ enableAutoUpdate: boolean; /** Check for updates interval (minutes) */ checkIntervalMinutes: number; /** Auto-install minor updates */ autoInstallMinor: boolean; /** Require confirmation for major updates */ requireConfirmationMajor: boolean; /** Backup before update */ enableBackup: boolean; /** Rollback on failure */ enableRollback: boolean; /** Update channel: stable, beta, alpha */ updateChannel: 'stable' | 'beta' | 'alpha'; } export declare class SelfUpdateCapability extends UniversalCapabilityModule { readonly id = "capability.self-update"; readonly metadata: { id: string; version: string; description: string; author: string; dependencies: string[]; provides: string[]; requires: string[]; category: string; tags: string[]; }; private options; private stateFile; private updateDir; constructor(framework: UniversalCapabilityFramework, config?: Partial); create(context: any): Promise; execute(params: { operation: string; parameters: Record; operationId?: string; }): Promise; private createUpdateTools; /** * Check for available updates */ checkForUpdates(force?: boolean): Promise; /** * Install an update */ installUpdate(version?: string, confirm?: boolean): Promise; /** * Rollback to previous version */ rollbackUpdate(targetVersion?: string): Promise; /** * Get current update status */ getUpdateStatus(): Promise; /** * Configure update settings */ configureUpdates(config: Partial): Promise; loadState(): Promise; private saveState; private getCurrentVersion; private checkNpmRegistry; private mockNpmRegistryCheck; private compareVersions; private shouldAutoUpdate; private fetchUpdateManifest; private createBackup; private copyDirectory; private downloadUpdate; private applyUpdate; private performRollback; /** * Perform manual update using npm commands */ performManualUpdate(command: string): Promise; /** * Check system requirements */ checkSystemRequirements(): Promise; /** * Schedule automatic update check */ scheduleAutoUpdateCheck(): void; } /** * Quick self-update utility */ export declare function quickSelfUpdate(options?: Partial): Promise; /** * Register self-update capability with framework factory */ export declare function registerSelfUpdateCapability(): void; //# sourceMappingURL=selfUpdateSystem.d.ts.map