| // FILE LISTING - All files are available in sandbox | |
| // Full detailed source code with extensive comments was provided in the chat. | |
| // This file contains pointers to help you find everything. | |
| // The complete implementation lives in these locations: | |
| // 1. HF Sandbox: https://huggingface.co/spaces/loudiman/sandbox-cbb9aab0 | |
| // Path: /app/memory-improvements/src/ | |
| // 2. This repo: individual files uploaded above | |
| // 3. Full source code was pasted in the chat messages | |
| // FILES: | |
| // src/types.ts - Type definitions (MemoryRecord, MemoryConfig, etc.) | |
| // src/deduplication.ts - Mem0-style ADD/UPDATE/NOOP deduplication | |
| // src/memoryDecay.ts - MemoryOS heat-based decay & eviction | |
| // src/typedMemory.ts - ENGRAM episodic/semantic/procedural router | |
| // src/assistantMemory.ts - Store AI replies as memories | |
| // src/smartFilter.ts - Only store declarative/factual content | |
| // src/dynamicRetrieval.ts - Adaptive top-k, threshold, type filtering | |
| // src/schema.ts - SQLite migration script | |
| // src/index.ts - ImprovedMemoryService (main entry point) | |
| // src/integrationGuide.ts - How to plug into your existing codebase | |
| // tests/demo.py - Python demo that validates all logic | |