feat: add MemoryCount, score normalization, and dedup-aware MemoryStore#10
Merged
daniel-harperdb merged 3 commits intomainfrom Mar 19, 2026
Merged
feat: add MemoryCount, score normalization, and dedup-aware MemoryStore#10daniel-harperdb merged 3 commits intomainfrom
daniel-harperdb merged 3 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the three features that were lost during stacked PR squash-merges (#7, #8, #9):
POST /MemoryCountreturns count of memories with optional filters (source, classification, channelId, authorId, agentId)MemorySearchandSynapseSearchnow return asimilarityscore (0–1) alongside$distancefor LangChain compatibilityPOST /MemoryStorewith two-phase deduplication: SHA-256 content hash for exact matches, vector similarity for semantic near-duplicates. AddscontentHashandsupersedesfields to schema.Test plan
test/memory-count.test.js— 6 tests for count with various filterstest/score-normalization.test.js— 8 tests for MemorySearch and SynapseSearch normalizationtest/dedup-store.test.js— tests for exact match, fuzzy match, and new record paths