feat(memory): native short-term KV + dual-layer resolve_context - #46
Open
drQedwards wants to merge 13 commits into
Open
feat(memory): native short-term KV + dual-layer resolve_context#46drQedwards wants to merge 13 commits into
drQedwards wants to merge 13 commits into
Conversation
feat: add UTM tracking to PMLL backlink in README
Point Context+ docs at Python P0 durability (SQLite graph, hashing embeds, silo LRU, init reset) and the labeled retrieval-quality stub (P@k/R@k/MRR — not agent accuracy). No mcp/ dump; ranking fix still open.
pmll bbd2eb8 and PPM b60fd1e landed; depth0/1 metrics diverge.
docs: complementary pmll-memory-mcp P0 + retrieval harness links
|
@drQedwards is attempting to deploy a commit to the ForLoopCodes' projects Team on Vercel. A member of the Team first needs to authorize it. |
Port session silo (silo_size LRU), peek/set/flush/resolve, and solution engine tools from ppm/mcp into Context+ TypeScript. Add mergeRankHits for unified ranking in resolve_context (KV first, then graph). Docs cite PPM three-way speed numbers only; complementary pmll-memory-mcp remains optional for Q-promise / Python SQLite P0.
feat(memory): native short-term KV + dual-layer resolve_context
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 for @forloopcodes
Core upgrade (not docs-only): native short-term KV + dual-layer
resolve_contextnow ships inside Context+ TypeScript on this fork head (537b4db, via drQedwards/contextplus#7).This is the implementable slice of what #28 / #30 documented and what closed #29 pitched with benchmarks — where integrate-memory upgrades in core, for further retrieval accuracy (labeled hit-rate) and lower redundant token burn via peek-before-expensive-tool.
Fork twin (merged): drQedwards#7
Why this matters vs prior landings
pmll-memory-mcpagent-instructions.mdinit/peek/set/resolve/flush+resolve_context/promote_to_long_term/memory_statusin Context+ MCPAgents were already instructed to
peekbefore expensive calls and preferresolve_context. Until this merge, those tools were not registered on the Context+ server itself (JSON long-term graph only).What lands in core
New
src/core/short-term-kv.ts— session silo, LRU silo_size, peek/set/flush + pending map for resolvesrc/core/solution-engine.ts— KV-first resolve_context, promote_to_long_term, memory_statustest/main/short-term-kv.test.mjssrc/tools/memory-tools.ts+src/index.ts(MCP registration)Tools shipped (MCP)
initsilo_sizeLRU)peeksetresolveflushresolve_contextpromote_to_long_termmemory_statusAlso
mergeRankHitshelper insrc/core/memory-graph.ts— unified ranking for dual-layerresolve_context(and search merge of direct+neighbor hits). This is not asearchGraphbugfix. Traversal ranking work that made depth-0 vs depth-1 metrics diverge lived on the complementary Python side (pmll#14 / harness stub), not as a Context+ graph-search defect.Accuracy & speed claims (what we cite / what we do not)
PPM three-way only (avg test execution, illustrative of peek-before-expensive-tool):
Retrieval quality = labeled P@k / R@k / MRR only. No 99% / 99.99% product-accuracy claims.
Do not treat supermodeltools “40%” (or similar marketing %) as evidence for this PR.
Complementary
pmll-memory-mcp/ PPM remains optional for Q-promise / Python SQLite P0 durability. No Pythonmcp/dump into this repo.Scope hygiene (historical noise on this long-lived fork
main)Older grab-bag commits on the fork head (UTM tracking on README backlinks,
FUNDING.json, Obsidian-style tools hub under.contextplus/hubs/) are historical noise relative to the memory KV upgrade. Happy to split a focused PR (memory-only diff) if you prefer that over merging thismain → mainhead as-is.Tests
254 pass on
dbc1ba5(feat commit; merge tip537b4db).Test plan
init→set→peekhit; miss / pending paths behaveresolve_contextprefers KV, falls through to graph, ranks viamergeRankHitspromote_to_long_termwrites a durable graph node from a silo keyflush/ silo LRU eviction atsilo_sizeThanks for maintaining Context+.