-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Description
Suggested Improvement:
Create a new singleton service, CognitiveMemoryManager.ts, which will be responsible for all interactions with a local SQLite database. This service will encapsulate the logic for database initialization, semantic flag detection, valence calculation, and CRUD (Create, Read, Update, Delete) operations for memory records, following the LMM (Living Memory Model) architecture.
This will establish a persistent, client-side memory ledger, forming the foundation for a more intelligent, efficient, and context-aware AI assistant.
Acceptance Criteria:
[ ] Integrate a library for SQLite via WASM (e.g., sql.js).
[ ] The CognitiveMemoryManager must initialize the database and create the memories table with the schema defined in the LMM blueprint.
[ ] Implement the method addInteraction(content: string): Promise<MemoryRecord> which:
[ ] Analyzes the content to extract semantic flags and emotional valence.
[ ] Calculates the activation_score for the new memory.
[ ] Inserts a new record into the memories table.
[ ] Implement the method semanticSearch(flags: string[], limit: number): Promise<MemoryRecord[]> that searches for memories based on a given set of flags and orders them by activation_score.
[ ] The service should be designed to run within a Service Worker to avoid impacting the main UI thread's performance.
Metadata
Metadata
Assignees
Labels
No labels