Commit 81a7d0d
authored
feat(memory): add FAISS semantic search and resonance engine (#24)
* feat(memory): add content chunker and config
Add memory system configuration with model settings (all-MiniLM-L6-v2,
384 dimensions), source type definitions, content path mappings, and
chunk size limits. Add content-type-aware chunker supporting thoughts,
dreams, essays, letters, scores, conversations, memory files, jar JSON,
and mailbox JSONL with deterministic SHA-256 chunk IDs.
* feat(memory): add FAISS indexer and semantic searcher
Add FAISS IndexFlatIP builder with SentenceTransformer embeddings
supporting full rebuild and incremental update via mtime-based change
detection. Add lazy-loading semantic searcher with cosine similarity
search, post-retrieval filtering by type/date/person, context mode
for adjacent chunks, and system-prompt output format for wake.sh
context injection.
* feat(memory): add cross-content resonance engine
Add resonance discovery engine that finds semantically similar chunks
across different content types using FAISS similarity search. Filters
structural boilerplate via regex, tracks known pairs across dated
resonance files for deduplication, and supports file-specific and
passage-based resonance queries.
* ci(quality): scope mypy to src/api for optional dependency compat
The memory subsystem uses optional dependencies (faiss-cpu, sentence-
transformers, numpy) not installed in CI. Scope mypy to src/api/ to
avoid false failures on unresolved imports in optional packages.1 parent 46d49ea commit 81a7d0d
7 files changed
Lines changed: 1555 additions & 1 deletion
File tree
- .github/workflows
- src/memory
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments