Skip to content

Project-Level Memory Isolation (.2 boost) with merged global memories#171

Merged
nullure merged 3 commits intoCaviraOSS:mainfrom
whiterabb17:main
Apr 25, 2026
Merged

Project-Level Memory Isolation (.2 boost) with merged global memories#171
nullure merged 3 commits intoCaviraOSS:mainfrom
whiterabb17:main

Conversation

@whiterabb17
Copy link
Copy Markdown
Contributor

This PR implements Project-Level Memory Isolation across the OpenMemory system. It enables scoping memories, analytics, and queries to specific projects while maintaining access to a shared global knowledge base (system_global).
To help combat project-level architecture and design bleed.

Key technical updates:

MCP Tooling: Introduced openmemory_store_project for scoped storage and retained openmemory_store for global storage (with an internal proposal for future renaming to openmemory_store_global).
Type Safety: Resolved critical TypeScript compilation errors and variable shadowing issues in mcp.ts and hsg.ts.
Backend Scoping: Refactored dashboard API endpoints (/stats, /activity, /sectors/timeline) to respect the project_id query parameter.
Frontend UI: Integrated a new ProjectProvider and Navbar selector, allowing seamless switching between projects with real-time data filtering across all dashboard views.

🔄 Type of Change
🐛 Bug fix (non-breaking change which fixes an issue)
✨ New feature (non-breaking change which adds functionality)
💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
📚 Documentation update
🎨 Style/UI changes
♻️ Code refactoring

🧪 Testing
I have tested this change locally
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes (Verified via npx tsc --noEmit in both packages/openmemory-js and dashboard).

[Verification Results]
[Test] Project-Level Memory Isolation
-> Adding memory to project_alpha...
-> Adding memory to project_beta...
-> Adding global memory...
-> Querying from project_alpha...
[PASS] project_alpha is isolated from project_beta but sees global.
-> Querying from project_beta...
[PASS] project_beta is isolated from project_alpha.
-> Global query (no project filter)...
[PASS] Global query sees all.
[SUCCESS] Project isolation verified.

🔍 Code Review Checklist
Code follows the project's coding standards
Self-review of the code has been performed
Code is properly commented, particularly in hard-to-understand areas (e.g., variable shadowing fixes in mcp.ts)
Changes generate no new warnings

🚀 Deployment Notes
The database schema must support the project_id column (Migration 1.3.0) for full functionality.

📋 Additional Context
A architectural proposal was added as a comment to openmemory_store in mcp.ts to consider renaming it to openmemory_store_global in a future major version to align with the new project-scoping nomenclature.

…d original store for global memories. with project memories getting a .2 boost over global memories when fetch is used. Also implemented dashboard filter for the memories
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.

2 participants