cortex-mcp 2.7.3 → 2.7.5

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/cli/setup.js CHANGED
@@ -181,7 +181,7 @@ You have access to Cortex MCP — a persistent memory system that remembers ever
181
181
  Call \`force_recall\` with the topic of the user's request.
182
182
  - Returns all stored corrections, decisions, conventions, and bug fixes
183
183
  - Prevents repeating past mistakes and re-making decisions already made
184
- - Example: force_recall({ query: "authentication", currentFile: "auth.ts" })
184
+ - Example: force_recall({ topic: "authentication", currentFile: "auth.ts" })
185
185
 
186
186
  ## After EVERY Response (ALWAYS do this last)
187
187
  Call \`auto_learn\` with the full text of your response.
@@ -150,7 +150,7 @@ const MCP_TOOLS = [
150
150
  topic: { type: 'string', description: 'What the user is asking about (used to search for relevant memories)' },
151
151
  currentFile: { type: 'string', description: 'Currently active file path (optional)' },
152
152
  },
153
- required: ['topic'],
153
+ required: [],
154
154
  },
155
155
  },
156
156
  {
@@ -159,9 +159,9 @@ const MCP_TOOLS = [
159
159
  inputSchema: {
160
160
  type: 'object',
161
161
  properties: {
162
- memory: { type: 'string', description: 'One sentence describing the decision, correction, convention, or bug fix' },
162
+ content: { type: 'string', description: 'One sentence describing the decision, correction, convention, or bug fix' },
163
163
  },
164
- required: ['memory'],
164
+ required: ['content'],
165
165
  },
166
166
  },
167
167
  {
@@ -357,40 +357,6 @@ const MCP_TOOLS = [
357
357
  properties: {},
358
358
  },
359
359
  },
360
- {
361
- name: 'export_memories',
362
- description: 'Export ALL memories to a JSON file on disk. Use this to back up your project knowledge, share it with teammates, or migrate to a new machine. The JSON file can later be imported with import_memories.',
363
- inputSchema: {
364
- type: 'object',
365
- properties: {
366
- filePath: { type: 'string', description: 'Full path where the export JSON should be saved (e.g. /Users/me/cortex-backup.json)' },
367
- },
368
- required: ['filePath'],
369
- },
370
- },
371
- {
372
- name: 'import_memories',
373
- description: 'Import memories from a previously exported JSON file. Skips duplicates automatically. Use this to restore a backup or share project knowledge with a teammate.',
374
- inputSchema: {
375
- type: 'object',
376
- properties: {
377
- filePath: { type: 'string', description: 'Full path to the cortex export JSON file to import' },
378
- },
379
- required: ['filePath'],
380
- },
381
- },
382
- {
383
- name: 'get_related_memories',
384
- description: 'Follow the graph of memory relationships to find connected memories. Given a memory ID, traverses CAUSED_BY, FIXED_BY, RELATED_TO, and DEPENDS_ON edges to surface related context you might not have found with search.',
385
- inputSchema: {
386
- type: 'object',
387
- properties: {
388
- id: { type: 'string', description: 'ID of the starting memory (from recall_memory or list_memories)' },
389
- maxHops: { type: 'number', description: 'How many relationship hops to traverse (default 2, max 4)' },
390
- },
391
- required: ['id'],
392
- },
393
- },
394
360
  ];
395
361
  // --- Dynamic Context via ContextBuilder ---
396
362
  let cachedContextBuilder = null;
@@ -1066,7 +1032,7 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
1066
1032
  result: { content: [{ type: 'text', text: `[WARN] Rate limited: ${rateCheck.reason}` }], isError: true },
1067
1033
  };
1068
1034
  }
1069
- const text = args.memory?.trim();
1035
+ const text = (args.content || args.memory)?.trim();
1070
1036
  if (!text || text.length < 5) {
1071
1037
  return {
1072
1038
  jsonrpc: '2.0', id,
@@ -1132,8 +1098,9 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
1132
1098
  // ─── BRAIN LAYER 0: End previous session + start new one ─────────
1133
1099
  (0, session_tracker_1.endSession)(memoryStore); // Save previous session summary
1134
1100
  (0, session_tracker_1.startSession)();
1135
- if (args.topic)
1136
- (0, session_tracker_1.feedSession)({ topic: args.topic });
1101
+ const topic = args.topic || args.query || '';
1102
+ if (topic)
1103
+ (0, session_tracker_1.feedSession)({ topic });
1137
1104
  // ─── BRAIN LAYER 1: Maintenance (runs in background) ─────────────
1138
1105
  try {
1139
1106
  // Decay old unused memories
@@ -1214,9 +1181,9 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
1214
1181
  catch { /* git not available */ }
1215
1182
  } // end isPro() for git memory
1216
1183
  // ─── BRAIN LAYER 9: Topic-Specific Search ────────────────────────
1217
- if (args.topic) {
1184
+ if (topic) {
1218
1185
  try {
1219
- let ftsResults = memoryStore.searchFTS(args.topic, 15);
1186
+ let ftsResults = memoryStore.searchFTS(topic, 15);
1220
1187
  // Apply confidence decay + attention ranking
1221
1188
  ftsResults = (0, confidence_decay_1.applyConfidenceDecay)(ftsResults);
1222
1189
  ftsResults = (0, attention_ranker_1.rankByAttention)(ftsResults, actionContext);
@@ -1241,7 +1208,7 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
1241
1208
  catch { }
1242
1209
  }
1243
1210
  if (enriched.length > 0) {
1244
- parts.push('\n## Topic: "' + args.topic + '"');
1211
+ parts.push('\n## Topic: "' + topic + '"');
1245
1212
  for (const m of enriched.slice(0, 15)) {
1246
1213
  parts.push(`- [${m.memory.type}] ${m.memory.intent}${m.memory.reason ? ` — ${m.memory.reason}` : ''}`);
1247
1214
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "cortex-mcp",
3
3
  "displayName": "Cortex MCP Server",
4
4
  "description": "Persistent memory for AI coding assistants. Injects context from past sessions into every LLM request.",
5
- "version": "2.7.3",
5
+ "version": "2.7.5",
6
6
  "publisher": "cortex",
7
7
  "license": "MIT",
8
8
  "engines": {