UNPKG

memory-engineering-mcp

Version:

🧠 AI Memory System powered by MongoDB Atlas & Voyage AI - Autonomous memory management with zero manual work

66 lines • 1.82 kB
/** * Backup Service for 7 Core Memories * PROOF: Production-critical data protection * * Pattern: Automatic hourly backups, point-in-time recovery */ import type { Db } from 'mongodb'; import type { MemoryDocument } from '../types/memory-v5.js'; export interface MemoryBackup { _id?: string; memories: MemoryDocument[]; timestamp: Date; version: string; projectId: string; metadata: { totalMemories: number; backupReason: 'scheduled' | 'manual' | 'pre-update'; }; } /** * Automatic backup service for 7 core memories * PROOF: Critical data protection pattern */ export declare class BackupService { private db; private packageVersion; private backupsCollection; private memoriesCollection; private backupInterval?; constructor(db: Db, packageVersion: string); private ensureIndexes; /** * Backup all 7 memories for a project */ backupMemories(projectId: string, reason?: 'scheduled' | 'manual' | 'pre-update'): Promise<string>; /** * Restore memories from a backup */ restoreMemories(backupId: string): Promise<number>; /** * List available backups */ listBackups(projectId?: string, limit?: number): Promise<MemoryBackup[]>; /** * Clean old backups (keep last N) */ private cleanOldBackups; /** * Schedule automatic backups */ scheduleAutoBackups(projectId: string, intervalHours?: number): void; /** * Stop automatic backups */ stopAutoBackups(): void; /** * Get backup statistics */ getBackupStats(projectId?: string): Promise<{ totalBackups: number; oldestBackup: Date | null; newestBackup: Date | null; totalSizeBytes: number; }>; } //# sourceMappingURL=backup-service.d.ts.map