@exaudeus/memory-mcp 1.5.0 → 1.5.1

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.
@@ -22,4 +22,6 @@ export declare function buildQueryFooter(opts: {
22
22
  readonly scope: string;
23
23
  }): string;
24
24
  /** Build tag primer section for session briefing — pure function */
25
- export declare function buildTagPrimerSection(tagFreq: ReadonlyMap<string, number>): string;
25
+ export declare function buildTagPrimerSection(tagFreq: ReadonlyMap<string, number>, lobeName?: string): string;
26
+ /** Build briefing tag primer sections without merging vocabularies across lobes. */
27
+ export declare function buildBriefingTagPrimerSections(lobeTagFrequencies: Iterable<readonly [string, ReadonlyMap<string, number>]>): readonly string[];
@@ -173,7 +173,7 @@ export function buildQueryFooter(opts) {
173
173
  return lines.join('\n');
174
174
  }
175
175
  /** Build tag primer section for session briefing — pure function */
176
- export function buildTagPrimerSection(tagFreq) {
176
+ export function buildTagPrimerSection(tagFreq, lobeName) {
177
177
  if (tagFreq.size === 0)
178
178
  return '';
179
179
  const allTags = [...tagFreq.entries()]
@@ -181,7 +181,9 @@ export function buildTagPrimerSection(tagFreq) {
181
181
  .map(([tag, count]) => `${tag}(${count})`)
182
182
  .join(', ');
183
183
  return [
184
- `### Tag Vocabulary (${tagFreq.size} tags)`,
184
+ lobeName
185
+ ? `### Tag Vocabulary — ${lobeName} (${tagFreq.size} tags)`
186
+ : `### Tag Vocabulary (${tagFreq.size} tags)`,
185
187
  allTags,
186
188
  ``,
187
189
  `Filter by tags: memory_query(filter: "#auth") — exact match`,
@@ -189,3 +191,10 @@ export function buildTagPrimerSection(tagFreq) {
189
191
  `Multiple: memory_query(filter: "#auth|#security") — OR logic`,
190
192
  ].join('\n');
191
193
  }
194
+ /** Build briefing tag primer sections without merging vocabularies across lobes. */
195
+ export function buildBriefingTagPrimerSections(lobeTagFrequencies) {
196
+ const nonEmpty = Array.from(lobeTagFrequencies)
197
+ .filter(([, tagFreq]) => tagFreq.size > 0);
198
+ const includeLobeNames = nonEmpty.length > 1;
199
+ return nonEmpty.map(([lobeName, tagFreq]) => buildTagPrimerSection(tagFreq, includeLobeNames ? lobeName : undefined));
200
+ }
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import { getLobeConfigs } from './config.js';
14
14
  import { ConfigManager } from './config-manager.js';
15
15
  import { normalizeArgs } from './normalize.js';
16
16
  import { buildCrashReport, writeCrashReport, writeCrashReportSync, readLatestCrash, readCrashHistory, clearLatestCrash, formatCrashReport, formatCrashSummary, markServerStarted, } from './crash-journal.js';
17
- import { formatStaleSection, formatConflictWarning, formatStats, formatBehaviorConfigSection, mergeTagFrequencies, buildQueryFooter, buildTagPrimerSection } from './formatters.js';
17
+ import { formatStaleSection, formatConflictWarning, formatStats, formatBehaviorConfigSection, mergeTagFrequencies, buildQueryFooter, buildBriefingTagPrimerSections } from './formatters.js';
18
18
  import { parseFilter } from './text-analyzer.js';
19
19
  import { VOCABULARY_ECHO_LIMIT, WARN_SEPARATOR } from './thresholds.js';
20
20
  import { matchRootsToLobeNames, buildLobeResolution } from './lobe-resolution.js';
@@ -886,17 +886,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
886
886
  if (sections.length === 0) {
887
887
  sections.push('No knowledge stored yet. As you work, store observations with memory_store. Try memory_bootstrap to seed initial knowledge from the repo.');
888
888
  }
889
- // Tag primer: show tag vocabulary if tags exist across any lobe
890
- const briefingStores = [];
891
- for (const lobeName of allBriefingLobeNames) {
889
+ // Tag primer: keep vocabularies lobe-local instead of merging them across lobes.
890
+ const briefingTagPrimers = buildBriefingTagPrimerSections(allBriefingLobeNames
891
+ .filter(lobeName => configManager.getLobeHealth(lobeName)?.status !== 'degraded')
892
+ .map((lobeName) => {
892
893
  const store = configManager.getStore(lobeName);
893
- if (store)
894
- briefingStores.push(store);
895
- }
896
- const briefingTagFreq = mergeTagFrequencies(briefingStores);
897
- const tagPrimer = buildTagPrimerSection(briefingTagFreq);
898
- if (tagPrimer) {
899
- sections.push(tagPrimer);
894
+ return [lobeName, store?.getTagFrequency() ?? new Map()];
895
+ }));
896
+ if (briefingTagPrimers.length > 0) {
897
+ sections.push(...briefingTagPrimers);
900
898
  }
901
899
  const briefingHints = [];
902
900
  briefingHints.push(`${totalEntries} entries${totalStale > 0 ? ` (${totalStale} stale)` : ''} across ${allBriefingLobeNames.length} ${allBriefingLobeNames.length === 1 ? 'lobe' : 'lobes'}.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exaudeus/memory-mcp",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Codebase memory MCP server - persistent, evolving knowledge for AI coding agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",