Skip to content

feat: add MemoryCount, score normalization, and dedup-aware MemoryStore#10

Merged
daniel-harperdb merged 3 commits intomainfrom
feat/memory-count-score-dedup
Mar 19, 2026
Merged

feat: add MemoryCount, score normalization, and dedup-aware MemoryStore#10
daniel-harperdb merged 3 commits intomainfrom
feat/memory-count-score-dedup

Conversation

@daniel-harperdb
Copy link
Collaborator

Summary

Adds the three features that were lost during stacked PR squash-merges (#7, #8, #9):

  • MemoryCountPOST /MemoryCount returns count of memories with optional filters (source, classification, channelId, authorId, agentId)
  • Score normalizationMemorySearch and SynapseSearch now return a similarity score (0–1) alongside $distance for LangChain compatibility
  • MemoryStore with dedupPOST /MemoryStore with two-phase deduplication: SHA-256 content hash for exact matches, vector similarity for semantic near-duplicates. Adds contentHash and supersedes fields to schema.

Test plan

  • test/memory-count.test.js — 6 tests for count with various filters
  • test/score-normalization.test.js — 8 tests for MemorySearch and SynapseSearch normalization
  • test/dedup-store.test.js — tests for exact match, fuzzy match, and new record paths

@daniel-harperdb daniel-harperdb merged commit 2e60aee into main Mar 19, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant