import { ConversationState, WorkflowSession } from '@/types'; /** * Interface for persistent storage operations */ export interface IPersistentStorage { // Conversation management saveConversation(conversation: ConversationState): Promise; loadConversation(id: string): Promise; deleteConversation(id: string): Promise; listConversations(): Promise; // Workflow management saveWorkflow(workflow: WorkflowSession): Promise; loadWorkflow(id: string): Promise; deleteWorkflow(id: string): Promise; listWorkflows(): Promise; // Backup and recovery createBackup(): Promise; restoreFromBackup(backupPath: string): Promise; // Health and maintenance checkHealth(): Promise; cleanup(): Promise; } export interface PeristenceHealthStatus { status: 'healthy' | 'degraded' | 'failed'; lastBackup: Date | null; totalConversations: number; totalWorkflows: number; storageUsed: number; // bytes errors: string[]; } export interface BackupMetadata { timestamp: Date; version: string; conversationCount: number; workflowCount: number; checksum: string; }