/** * Background Sync * * Non-blocking background synchronization for: * - Memory persistence * - Pattern learning * - Context files */ export interface SyncConfig { enabled: boolean; interval: number; items: SyncItem[]; onSync?: (item: SyncItem, success: boolean) => void; } export type SyncItem = 'memory' | 'patterns' | 'context'; export interface SyncStats { lastSync: string | null; itemsSynced: number; totalSyncs: number; errors: number; } export declare class BackgroundSync { private config; private timer; private stats; private running; constructor(config?: Partial); /** * Start background sync */ start(): void; /** * Stop background sync */ stop(): void; /** * Run sync now (blocking) */ syncNow(): Promise; /** * Get sync statistics */ getStats(): SyncStats & { running: boolean; }; /** * Update configuration */ updateConfig(config: Partial): void; /** * Add item to sync list */ addItem(item: SyncItem): void; /** * Remove item from sync list */ removeItem(item: SyncItem): void; private syncItem; } export declare function getBackgroundSync(config?: Partial): BackgroundSync;