mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
🗃️ refactor: Simplify MCP Server Config to Two-Repository Pattern (#10705)
* refactor(mcp): simplify registry to two-repository architecture with explicit storage
* Chore: address AI Review comments
* Simplify MCP config cache architecture and remove legacy code:
Follow-up cleanup to commit d2bfdd033 which refactored MCP registry to two-repository architecture. This removes leftover legacy abstractions that were no longer used.
What changed:
- Simplified ServerConfigsCacheFactory.create() from 3 params to 2 (namespace, leaderOnly)
- Removed unused scope: 'Shared' | 'Private' parameter (only 'Shared' was ever used)
- Removed dead set() and getNamespace() methods from cache classes
- Updated JSDoc to reflect two-repository architecture (Cache + DB) instead of old three-tier system
- Fixed stale mocks and comments referencing removed sharedAppServers, sharedUserServers, privateServersCache
Files changed:
- ServerConfigsCacheFactory.ts - Simplified factory signature
- ServerConfigsCacheRedis.ts - Removed scope, renamed owner→namespace
- ServerConfigsCacheInMemory.ts - Removed unused methods
- MCPServersRegistry.ts - Updated JSDoc, simplified factory call
- RegistryStatusCache.ts - Removed stale JSDoc reference
- MCPManager.test.ts - Fixed legacy mock
- ServerConfigsCacheFactory.test.ts - Updated test assertions
* fix: Update error message in MCPServersRegistry for clarity
---------
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
67952372d0
commit
da473bf43a
31 changed files with 551 additions and 4714 deletions
|
|
@ -9,9 +9,6 @@ const INITIALIZED = 'INITIALIZED';
|
|||
* Uses Redis-backed storage to coordinate state between leader and follower nodes.
|
||||
* Tracks global initialization status for the registry.
|
||||
*
|
||||
* Note: Per-user private server loading status is tracked separately in PrivateServersLoadStatusCache
|
||||
* to enable TTL synchronization and distributed locking.
|
||||
*
|
||||
* Designed to be extended with additional global registry metadata as needed
|
||||
* (e.g., last update timestamps, version info, health status).
|
||||
* This cache is only meant to be used internally by registry management components.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue