@massa-ai/mcp-client 1.17.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13114,6 +13114,16 @@ var init_index_manager = __esm(() => {
13114
13114
  globAsync = glob;
13115
13115
  });
13116
13116
 
13117
+ // ../../packages/core/dist/services/cache/lru-evict.js
13118
+ function evictOldest(cache, maxRetained) {
13119
+ while (cache.size > maxRetained) {
13120
+ const oldest = cache.keys().next().value;
13121
+ if (oldest === undefined)
13122
+ break;
13123
+ cache.delete(oldest);
13124
+ }
13125
+ }
13126
+
13117
13127
  // ../../packages/core/dist/services/search/file-filter-cache.js
13118
13128
  class FileFilterCache {
13119
13129
  cache = new Map;
@@ -13182,18 +13192,7 @@ class FileFilterCache {
13182
13192
  return parts.join("|");
13183
13193
  }
13184
13194
  evictOldest() {
13185
- let oldestKey = null;
13186
- let oldestTime = Infinity;
13187
- for (const [key, entry] of this.cache.entries()) {
13188
- if (entry.createdAt < oldestTime) {
13189
- oldestTime = entry.createdAt;
13190
- oldestKey = key;
13191
- }
13192
- }
13193
- if (oldestKey) {
13194
- this.cache.delete(oldestKey);
13195
- logger.debug("Evicted oldest filter cache entry", { key: oldestKey });
13196
- }
13195
+ evictOldest(this.cache, this.MAX_CACHE_SIZE);
13197
13196
  }
13198
13197
  invalidateProject(projectId) {
13199
13198
  let removed = 0;
@@ -111981,7 +111980,7 @@ var init_memory_repository_factory = __esm(() => {
111981
111980
  init_memory_repository_pg();
111982
111981
  });
111983
111982
 
111984
- // ../../packages/core/dist/services/graph/graph-store-pg.js
111983
+ // ../../packages/core/dist/services/memory-graph/graph-store-pg.js
111985
111984
  function metadataForEdge(edge) {
111986
111985
  return {
111987
111986
  autoExtracted: edge.autoExtracted ?? false,
@@ -112297,7 +112296,7 @@ var init_graph_store_pg = __esm(() => {
112297
112296
  graphStorePg = GraphStorePg.getInstance();
112298
112297
  });
112299
112298
 
112300
- // ../../packages/core/dist/services/graph/graph-store-factory.js
112299
+ // ../../packages/core/dist/services/memory-graph/graph-store-factory.js
112301
112300
  function getGraphStore() {
112302
112301
  if (cachedStore2)
112303
112302
  return cachedStore2;
@@ -116891,7 +116890,7 @@ var init_memory_service = __esm(() => {
116891
116890
  init_decay();
116892
116891
  });
116893
116892
 
116894
- // ../../packages/core/dist/services/graph/relation-extractor.js
116893
+ // ../../packages/core/dist/services/memory-graph/relation-extractor.js
116895
116894
  class RelationExtractor {
116896
116895
  graphStore;
116897
116896
  constructor(graphStore) {
@@ -117129,7 +117128,7 @@ var init_relation_extractor = __esm(() => {
117129
117128
  ];
117130
117129
  });
117131
117130
 
117132
- // ../../packages/core/dist/services/graph/graph-queries.js
117131
+ // ../../packages/core/dist/services/memory-graph/graph-queries.js
117133
117132
  class GraphQueries {
117134
117133
  graphStore;
117135
117134
  constructor(graphStore) {
@@ -117349,7 +117348,7 @@ var init_graph_queries = __esm(() => {
117349
117348
  };
117350
117349
  });
117351
117350
 
117352
- // ../../packages/core/dist/services/graph/memory-graph.service.js
117351
+ // ../../packages/core/dist/services/memory-graph/memory-graph.service.js
117353
117352
  class MemoryGraphService {
117354
117353
  static instance = null;
117355
117354
  store;
@@ -120385,12 +120384,7 @@ class SymbolGraphService {
120385
120384
  return null;
120386
120385
  }
120387
120386
  evictOldestProjectRoot() {
120388
- while (this.projectRootCache.size >= this.PROJECT_ROOT_CACHE_MAX_ENTRIES) {
120389
- const oldest = this.projectRootCache.keys().next().value;
120390
- if (oldest === undefined)
120391
- break;
120392
- this.projectRootCache.delete(oldest);
120393
- }
120387
+ evictOldest(this.projectRootCache, this.PROJECT_ROOT_CACHE_MAX_ENTRIES - 1);
120394
120388
  }
120395
120389
  clearProjectRoot(projectId) {
120396
120390
  this.projectRootCache.delete(projectId);
@@ -151334,12 +151328,7 @@ class WebController {
151334
151328
  markIndexed: (key, ts) => {
151335
151329
  this.cache.delete(key);
151336
151330
  this.cache.set(key, ts);
151337
- while (this.cache.size > WEB_CACHE_MAX_ENTRIES) {
151338
- const oldest = this.cache.keys().next().value;
151339
- if (oldest === undefined)
151340
- break;
151341
- this.cache.delete(oldest);
151342
- }
151331
+ evictOldest(this.cache, WEB_CACHE_MAX_ENTRIES);
151343
151332
  }
151344
151333
  };
151345
151334
  }