You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jcode's MemoryManager is a concrete struct (~1800 lines) used at ~12 call sites across 7 crates. To integrate mempalace as a backend, we need an adapter that maps MemoryManager API → mempalace MemoryProvider trait, without changing all call sites at once.
There is currently no trait separating storage from logic — MemoryManager directly loads/saves MemoryGraph JSON files.
Scope
Files: New crate crates/jcode-mempalace-adapter/ (or new module in crates/jcode-base/src/memory/)
Problem
jcode's
MemoryManageris a concrete struct (~1800 lines) used at ~12 call sites across 7 crates. To integrate mempalace as a backend, we need an adapter that maps MemoryManager API → mempalaceMemoryProvidertrait, without changing all call sites at once.There is currently no trait separating storage from logic —
MemoryManagerdirectly loads/savesMemoryGraphJSON files.Scope
Files: New crate
crates/jcode-mempalace-adapter/(or new module incrates/jcode-base/src/memory/)Create
MempalaceAdapter:Implement all
MemoryManagerpublic methods by delegating to Palace:remember_project(entry)add_drawer(entry.into_drawer())with scope=Localremember_global(entry)add_drawer(entry.into_drawer())with scope=Globalfind_similar(query, threshold, max)search_with_embedding(query_vec, scope)find_similar_with_cascade(...)search_scoped(query, scope)search(query, scope.into())tag_memory(id, tag)tag(id, tag)link_memories(from, to, w)link(from, to, w)forget(id)forget(id)get_prompt_memories_scoped(limit, scope)recent(limit, scope.into())get_related(id, depth)related(id, depth)graph_stats()graph_stats_legacy()→ (memories, tags, edges, clusters)list_all_scoped(scope)get_drawers(Some(scope.into()), None)backfill_embeddings()get_drawers(), embed, upsertType conversions:
MemoryEntry → Drawer(and back): map category→kind, scope, confidence, strength, timestamps, embeddingsMemoryCategory → DrawerKind: Fact→Fact, Preference→Preference, Entity→Entity, Correction→Correction, Custom(s)→Custom(s)MemoryScope → mempalace::MemoryScope: Project→Local, Global→Global, All→AllConstructor:
Uses
PalaceBuilderto construct a Palace pointing at the given path.Feature flag:
#[cfg(feature = "mempalace-backend")]gates the adapter crate.Acceptance Criteria
cargo test -p jcode-mempalace-adapterpassesDependencies
mempalace issues (must be resolved first):
/share: upload exported session HTML as a private GitHub gist and copy the link #25 (timestamps)/scoped-models+Ctrl+P/Shift+Ctrl+P: cycle models within a user-defined allowlist #26 (confidence/strength)Reference
jcode MemoryManager:
crates/jcode-base/src/memory.rslines 148-1846jcode MemoryEntry:
crates/jcode-memory-types/src/lib.rslines 233-266mempalace MemoryProvider trait:
crates/core/src/palace.rslines 702+mempalace Palace struct:
crates/core/src/palace.rsline 1225+