@exaudeus/memory-mcp 1.5.0 → 1.5.2
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.
- package/dist/ephemeral.js +9 -2
- package/dist/formatters.d.ts +3 -1
- package/dist/formatters.js +11 -2
- package/dist/index.js +9 -11
- package/package.json +1 -1
package/dist/ephemeral.js
CHANGED
|
@@ -163,7 +163,7 @@ const SIGNALS = [
|
|
|
163
163
|
id: 'temporal',
|
|
164
164
|
label: 'Temporal language',
|
|
165
165
|
confidence: 'high',
|
|
166
|
-
test: (_title, content) => {
|
|
166
|
+
test: (_title, content, raw) => {
|
|
167
167
|
const patterns = [
|
|
168
168
|
/\bcurrently\b/, /\bright now\b/, /\bat the moment\b/,
|
|
169
169
|
/\bas of today\b/, /\bas of now\b/, /\btoday\b/,
|
|
@@ -175,6 +175,9 @@ const SIGNALS = [
|
|
|
175
175
|
/\bas things stand\b/, /\bgiven the current state\b/,
|
|
176
176
|
/\bstill (pending|waiting|blocked)\b/,
|
|
177
177
|
/\blast time (i|we) (ran|checked|tested)\b/,
|
|
178
|
+
// Explicit dates — "created (2026-03-08)", "as of 2024-11-15", "(written 2023-05-22)"
|
|
179
|
+
/\b(created|written|updated|generated|completed|done|finished)\s*\(?\s*\d{4}-\d{2}-\d{2}\b/,
|
|
180
|
+
/\bas of \d{4}-\d{2}-\d{2}\b/,
|
|
178
181
|
];
|
|
179
182
|
const m = firstMatch(content, patterns);
|
|
180
183
|
return m ? `contains "${m[0]}"` : undefined;
|
|
@@ -247,7 +250,7 @@ const SIGNALS = [
|
|
|
247
250
|
test: (title, content) => {
|
|
248
251
|
const titlePatterns = [
|
|
249
252
|
// "Documentation updates complete", "migration done", "task finished"
|
|
250
|
-
/\b(update|migration|refactor|implementation|task|feature|docs?|documentation|sync|work|changes?|setup)\s+(complete[d]?|done|finished?)\b/,
|
|
253
|
+
/\b(update|migration|refactor|implementation|task|feature|docs?|documentation|sync|work|changes?|setup|design|plan|spec|proposal)\s+(complete[d]?|done|finished?)\b/,
|
|
251
254
|
// "Complete: X" or "Done - X" as a status prefix in the title
|
|
252
255
|
/^(complete[d]?|done|finished?)\s*[-–—:]/,
|
|
253
256
|
];
|
|
@@ -284,6 +287,10 @@ const SIGNALS = [
|
|
|
284
287
|
/\b\d+\s+additions?,\s*\d+\s+deletions?\b/,
|
|
285
288
|
// Work quantity: "14 docs modified", "5 files changed"
|
|
286
289
|
/\b\d+\s+(docs?|files?|tests?|endpoints?|functions?|modules?|classes?|pages?)\s+(modified|changed|updated|added|created|deleted)\b/,
|
|
290
|
+
// Summary stats: "Total 3200 lines", "12-15 new files", "13 edited"
|
|
291
|
+
/\btotal\s+\d+(-\d+)?\s+(lines?|files?|docs?|tests?|functions?)\b/,
|
|
292
|
+
/\b\d+(-\d+)?\s+new\s+(files?|docs?|tests?)\b/,
|
|
293
|
+
/\b\d+\s+edited\b/,
|
|
287
294
|
];
|
|
288
295
|
const m = firstMatch(content, patterns);
|
|
289
296
|
return m ? `"${m[0]}" — quantitative work metrics are session activity, not lasting knowledge` : undefined;
|
package/dist/formatters.d.ts
CHANGED
|
@@ -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
|
|
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[];
|
package/dist/formatters.js
CHANGED
|
@@ -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
|
-
|
|
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,
|
|
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:
|
|
890
|
-
const
|
|
891
|
-
|
|
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
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
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'}.`);
|