@exaudeus/memory-mcp 1.9.2 → 1.9.4
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/index.js +20 -18
- package/dist/normalize.js +12 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -215,7 +215,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
215
215
|
// --- Retrieval ---
|
|
216
216
|
{
|
|
217
217
|
name: 'brief',
|
|
218
|
-
description: `
|
|
218
|
+
description: `Start of conversation — call once to load context for a project. Returns stored preferences, gotchas overview, stale entries needing review, and entry counts. Example: {"lobe": "${currentLobeNames[0] ?? 'my-project'}"} Surfaces everything previously saved via learn/gotcha/convention/prefer. Call once at session start. Results stay valid for the entire conversation — no need to re-call.`,
|
|
219
219
|
inputSchema: {
|
|
220
220
|
type: 'object',
|
|
221
221
|
properties: {
|
|
@@ -226,7 +226,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
228
|
name: 'recall',
|
|
229
|
-
description: `
|
|
229
|
+
description: `Before starting a task, surface prior knowledge you haven't loaded yet. Searches stored memory using semantic + keyword matching. Example: {"context": "auth token refresh", "lobe": "${currentLobeNames[0] ?? 'my-project'}"} Searches YOUR memory entries (from learn/gotcha/convention/prefer). Does NOT search the codebase or the internet. Call once per area. Skip if you already recalled this topic or received it from brief(). Knowledge stays in your context. Required param: "context" — the area you need knowledge about.`,
|
|
230
230
|
inputSchema: {
|
|
231
231
|
type: 'object',
|
|
232
232
|
properties: {
|
|
@@ -246,7 +246,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
name: 'gotchas',
|
|
249
|
-
description: `
|
|
249
|
+
description: `Before making changes to an area, check for known pitfalls. Retrieves stored gotchas, optionally filtered. Example: {"lobe": "${currentLobeNames[0] ?? 'my-project'}", "area": "auth"} or {"lobe": "${currentLobeNames[0] ?? 'my-project'}"} for all. brief() already includes a gotchas overview. Use this when you need gotchas for a specific area not covered in the briefing.`,
|
|
250
250
|
inputSchema: {
|
|
251
251
|
type: 'object',
|
|
252
252
|
properties: {
|
|
@@ -261,7 +261,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
name: 'conventions',
|
|
264
|
-
description: `
|
|
264
|
+
description: `Before writing new code, check how this codebase does things. Retrieves stored conventions, optionally filtered. Example: {"lobe": "${currentLobeNames[0] ?? 'my-project'}", "area": "testing"} or {"lobe": "${currentLobeNames[0] ?? 'my-project'}"} for all. recall() also surfaces conventions. Use this for focused convention lookup, recall() for broader cross-topic search.`,
|
|
265
265
|
inputSchema: {
|
|
266
266
|
type: 'object',
|
|
267
267
|
properties: {
|
|
@@ -277,7 +277,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
277
277
|
// --- Storage ---
|
|
278
278
|
{
|
|
279
279
|
name: 'gotcha',
|
|
280
|
-
description: `
|
|
280
|
+
description: `When something surprises you or doesn't work as expected, flag it here. Example: {"lobe": "${currentLobeNames[0] ?? 'my-project'}", "observation": "Gradle cache must be cleaned after Tuist changes or builds silently use stale artifacts"} Store facts that help future sessions, not notes about this one. Wrong: "Build failed because of stale cache." Right: "Gradle cache must be cleaned after Tuist changes." One insight per call. Persists across sessions, gets priority in brief() and recall(). Returns related knowledge. Required params: "lobe", "observation".`,
|
|
281
281
|
inputSchema: {
|
|
282
282
|
type: 'object',
|
|
283
283
|
properties: {
|
|
@@ -298,7 +298,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
298
298
|
},
|
|
299
299
|
{
|
|
300
300
|
name: 'convention',
|
|
301
|
-
description: `
|
|
301
|
+
description: `When you notice a pattern the codebase follows, record it here. For personal style rules, use prefer() instead. Example: {"lobe": "${currentLobeNames[0] ?? 'my-project'}", "observation": "All ViewModels use StateFlow for UI state. LiveData is banned."} Store facts that help future sessions, not notes about this one. Wrong: "Migrated to StateFlow." Right: "All ViewModels use StateFlow." One insight per call. Persists across sessions, surfaces in brief() and recall(). Returns related knowledge. Required params: "lobe", "observation".`,
|
|
302
302
|
inputSchema: {
|
|
303
303
|
type: 'object',
|
|
304
304
|
properties: {
|
|
@@ -319,7 +319,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
name: 'learn',
|
|
322
|
-
description: `
|
|
322
|
+
description: `When you understand how something works — architecture, dependencies, module boundaries — store it here. Catch-all for knowledge not covered by gotcha/convention. Example: {"lobe": "${currentLobeNames[0] ?? 'my-project'}", "observation": "Payments module depends on auth for tokens only, no other cross-module dependency"} Store facts that help future sessions, not actions you took or bugs you fixed. Wrong: "Fixed the null pointer in UserService." Right: "UserService.getUser() returns null when session expires — callers must handle this." One insight per call. Persists across sessions. Returns related knowledge. Required params: "lobe", "observation".`,
|
|
323
323
|
inputSchema: {
|
|
324
324
|
type: 'object',
|
|
325
325
|
properties: {
|
|
@@ -340,7 +340,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
name: 'prefer',
|
|
343
|
-
description: `
|
|
343
|
+
description: `When the user corrects you or states how they want things done, record it here. Example: {"rule": "Never use !! operator"} or {"rule": "Use Anvil for DI", "lobe": "${currentLobeNames[0] ?? 'my-project'}"} Highest trust level. Persists across sessions, surfaced in every brief(). Omit lobe for global preferences; add lobe to scope to one project. Required param: "rule".`,
|
|
344
344
|
inputSchema: {
|
|
345
345
|
type: 'object',
|
|
346
346
|
properties: {
|
|
@@ -359,7 +359,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
359
359
|
// --- Maintenance ---
|
|
360
360
|
{
|
|
361
361
|
name: 'fix',
|
|
362
|
-
description: `
|
|
362
|
+
description: `When a stored entry is wrong or outdated, correct or delete it. IDs appear in brief/recall/gotchas/conventions results. Example: {"id": "gotcha-3f7a", "correction": "Updated text"} to replace, or {"id": "gotcha-3f7a"} to delete. Required param: "id". Pass "correction" to update; omit to delete.`,
|
|
363
363
|
inputSchema: {
|
|
364
364
|
type: 'object',
|
|
365
365
|
properties: {
|
|
@@ -384,7 +384,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
384
384
|
// but are hidden from tool discovery. Agents use the new v2 tools above.
|
|
385
385
|
{
|
|
386
386
|
name: 'memory_bootstrap',
|
|
387
|
-
description: 'First
|
|
387
|
+
description: 'First time with a new codebase — scans repo structure, README, and build system to seed initial memory. Run once per project. Example: {"lobe": "my-project"} or {"lobe": "new-project", "root": "/path/to/repo"} to auto-create lobe.',
|
|
388
388
|
inputSchema: {
|
|
389
389
|
type: 'object',
|
|
390
390
|
properties: {
|
|
@@ -1566,16 +1566,18 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
// Tool-specific hints based on which field failed
|
|
1568
1568
|
let hint = '';
|
|
1569
|
+
const exampleLobe = lobeNames[0] ?? '<your-lobe>';
|
|
1570
|
+
const lobeHint = lobeNames.length > 0 ? `Available lobes: ${lobeList}` : 'No lobes configured — run memory_bootstrap with a "root" path to create one.';
|
|
1569
1571
|
const v2ToolHints = {
|
|
1570
|
-
brief: `brief takes an optional lobe. Example: {"lobe": "${
|
|
1571
|
-
recall: `recall requires "context" (
|
|
1572
|
-
gotcha: `gotcha requires "lobe" and "observation". Example: {"lobe": "${
|
|
1573
|
-
convention: `convention requires "lobe" and "observation". Example: {"lobe": "${
|
|
1574
|
-
learn: `learn requires "lobe" and "observation". Example: {"lobe": "${
|
|
1575
|
-
prefer: `prefer requires "rule". Example: {"rule": "Always suggest the simplest solution first"}
|
|
1572
|
+
brief: `brief takes an optional lobe. Example: {"lobe": "${exampleLobe}"}. ${lobeHint}`,
|
|
1573
|
+
recall: `recall requires "context" (the area you need knowledge about). Example: {"context": "auth token refresh", "lobe": "${exampleLobe}"}. ${lobeHint}`,
|
|
1574
|
+
gotcha: `gotcha requires "lobe" and "observation". Example: {"lobe": "${exampleLobe}", "observation": "Gradle cache breaks after Tuist changes"}. ${lobeHint}`,
|
|
1575
|
+
convention: `convention requires "lobe" and "observation". Example: {"lobe": "${exampleLobe}", "observation": "All ViewModels use StateFlow"}. ${lobeHint}`,
|
|
1576
|
+
learn: `learn requires "lobe" and "observation". Example: {"lobe": "${exampleLobe}", "observation": "Messaging uses MVVM with FlowCoordinator"}. ${lobeHint}`,
|
|
1577
|
+
prefer: `prefer requires "rule". Example: {"rule": "Always suggest the simplest solution first"}. Omit lobe for global; add "lobe" to scope to a project.`,
|
|
1576
1578
|
fix: `fix requires "id". Optional: "correction" (new text; omit to delete). Example: {"id": "gotcha-3f7a", "correction": "updated text"}`,
|
|
1577
|
-
gotchas: `gotchas takes optional "lobe" and "area". Example: {"lobe": "${
|
|
1578
|
-
conventions: `conventions takes optional "lobe" and "area". Example: {"lobe": "${
|
|
1579
|
+
gotchas: `gotchas takes optional "lobe" and "area". Example: {"lobe": "${exampleLobe}", "area": "auth"}. ${lobeHint}`,
|
|
1580
|
+
conventions: `conventions takes optional "lobe" and "area". Example: {"lobe": "${exampleLobe}", "area": "testing"}. ${lobeHint}`,
|
|
1579
1581
|
};
|
|
1580
1582
|
if (name in v2ToolHints) {
|
|
1581
1583
|
hint = `\n\nUsage: ${v2ToolHints[name]}`;
|
package/dist/normalize.js
CHANGED
|
@@ -23,16 +23,18 @@ const TOOL_ALIASES = {
|
|
|
23
23
|
memory_store: { scope: 'topic' },
|
|
24
24
|
// Legacy tools: "description"/"task" mean "context"
|
|
25
25
|
memory_context: { description: 'context', task: 'context' },
|
|
26
|
-
// v2 retrieval tools:
|
|
27
|
-
recall: { query: 'context', search: 'context', description: 'context', task: 'context' },
|
|
28
|
-
// v2
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// v2
|
|
35
|
-
|
|
26
|
+
// v2 retrieval tools: tool-name-as-param + common guesses map to "context"
|
|
27
|
+
recall: { recall: 'context', query: 'context', search: 'context', description: 'context', task: 'context', topic: 'context', area: 'context' },
|
|
28
|
+
// v2 brief: common guesses map to "lobe"
|
|
29
|
+
brief: { project: 'lobe' },
|
|
30
|
+
// v2 storage tools: tool-name-as-param + common guesses all map to "observation"
|
|
31
|
+
gotcha: { gotcha: 'observation', content: 'observation', note: 'observation', fact: 'observation', message: 'observation', pitfall: 'observation', trap: 'observation' },
|
|
32
|
+
convention: { convention: 'observation', content: 'observation', note: 'observation', fact: 'observation', message: 'observation', pattern: 'observation', rule: 'observation' },
|
|
33
|
+
learn: { learn: 'observation', knowledge: 'observation', insight: 'observation', content: 'observation', note: 'observation', fact: 'observation', message: 'observation' },
|
|
34
|
+
// v2 prefer: tool-name-as-param + common guesses map to "rule"
|
|
35
|
+
prefer: { prefer: 'rule', preference: 'rule', pref: 'rule', observation: 'rule', content: 'rule' },
|
|
36
|
+
// v2 fix: tool-name-as-param + common guesses map to "correction"
|
|
37
|
+
fix: { fix: 'correction', text: 'correction', content: 'correction', replacement: 'correction', update: 'correction' },
|
|
36
38
|
// v2 retrieval: "filter"/"keyword" mean "area"
|
|
37
39
|
gotchas: { filter: 'area', keyword: 'area', query: 'area', search: 'area' },
|
|
38
40
|
conventions: { filter: 'area', keyword: 'area', query: 'area', search: 'area' },
|