UNPKG

mira-consciousness

Version:

Memory & Intelligence Retention Archive - Preserving The Spark

69 lines 1.99 kB
/** * Intelligent Conversation Memory Extractor * * This module extracts meaningful memories from conversations using * pattern recognition, emotional analysis, and contextual understanding. */ export interface ExtractedMemory { type: 'milestone' | 'emotion' | 'learning' | 'decision' | 'insight' | 'relationship'; content: string; context: string; timestamp: string; significance: number; keywords: string[]; emotion?: string; } export interface ConversationContext { projectName?: string; technologies: Set<string>; goals: Set<string>; challenges: Set<string>; achievements: Set<string>; relationships: Map<string, string>; } export declare class ConversationMemoryExtractor { private context; private patterns; private emotionKeywords; /** * Extract memories from a conversation message */ extractMemories(message: string, role: 'user' | 'assistant', timestamp: string): Promise<ExtractedMemory[]>; /** * Create a memory object with emotional and contextual analysis */ private createMemory; /** * Calculate the significance of a message (0-1) */ private calculateSignificance; /** * Detect the primary emotion in a message */ private detectEmotion; /** * Extract key terms from a message */ private extractKeywords; /** * Extract technologies mentioned in the message */ private extractTechnologies; /** * Extract goals and challenges from the message */ private extractGoalsAndChallenges; /** * Summarize a long message into a brief memory */ private summarizeMessage; /** * Get the accumulated context */ getContext(): ConversationContext; /** * Generate a relationship summary based on extracted memories */ generateRelationshipSummary(memories: ExtractedMemory[]): string; } //# sourceMappingURL=ConversationMemoryExtractor.d.ts.map