cortex-mcp 2.7.3 → 2.7.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/cli/setup.js +1 -1
- package/dist/server/mcp-handler.js +10 -9
- package/package.json +1 -1
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({
|
|
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: [
|
|
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
|
-
|
|
162
|
+
content: { type: 'string', description: 'One sentence describing the decision, correction, convention, or bug fix' },
|
|
163
163
|
},
|
|
164
|
-
required: ['
|
|
164
|
+
required: ['content'],
|
|
165
165
|
},
|
|
166
166
|
},
|
|
167
167
|
{
|
|
@@ -1066,7 +1066,7 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
|
|
|
1066
1066
|
result: { content: [{ type: 'text', text: `[WARN] Rate limited: ${rateCheck.reason}` }], isError: true },
|
|
1067
1067
|
};
|
|
1068
1068
|
}
|
|
1069
|
-
const text = args.memory?.trim();
|
|
1069
|
+
const text = (args.content || args.memory)?.trim();
|
|
1070
1070
|
if (!text || text.length < 5) {
|
|
1071
1071
|
return {
|
|
1072
1072
|
jsonrpc: '2.0', id,
|
|
@@ -1132,8 +1132,9 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
|
|
|
1132
1132
|
// ─── BRAIN LAYER 0: End previous session + start new one ─────────
|
|
1133
1133
|
(0, session_tracker_1.endSession)(memoryStore); // Save previous session summary
|
|
1134
1134
|
(0, session_tracker_1.startSession)();
|
|
1135
|
-
|
|
1136
|
-
|
|
1135
|
+
const topic = args.topic || args.query || '';
|
|
1136
|
+
if (topic)
|
|
1137
|
+
(0, session_tracker_1.feedSession)({ topic });
|
|
1137
1138
|
// ─── BRAIN LAYER 1: Maintenance (runs in background) ─────────────
|
|
1138
1139
|
try {
|
|
1139
1140
|
// Decay old unused memories
|
|
@@ -1214,9 +1215,9 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
|
|
|
1214
1215
|
catch { /* git not available */ }
|
|
1215
1216
|
} // end isPro() for git memory
|
|
1216
1217
|
// ─── BRAIN LAYER 9: Topic-Specific Search ────────────────────────
|
|
1217
|
-
if (
|
|
1218
|
+
if (topic) {
|
|
1218
1219
|
try {
|
|
1219
|
-
let ftsResults = memoryStore.searchFTS(
|
|
1220
|
+
let ftsResults = memoryStore.searchFTS(topic, 15);
|
|
1220
1221
|
// Apply confidence decay + attention ranking
|
|
1221
1222
|
ftsResults = (0, confidence_decay_1.applyConfidenceDecay)(ftsResults);
|
|
1222
1223
|
ftsResults = (0, attention_ranker_1.rankByAttention)(ftsResults, actionContext);
|
|
@@ -1241,7 +1242,7 @@ function createMCPHandler(memoryStore, eventLog, workspaceRoot) {
|
|
|
1241
1242
|
catch { }
|
|
1242
1243
|
}
|
|
1243
1244
|
if (enriched.length > 0) {
|
|
1244
|
-
parts.push('\n## Topic: "' +
|
|
1245
|
+
parts.push('\n## Topic: "' + topic + '"');
|
|
1245
1246
|
for (const m of enriched.slice(0, 15)) {
|
|
1246
1247
|
parts.push(`- [${m.memory.type}] ${m.memory.intent}${m.memory.reason ? ` — ${m.memory.reason}` : ''}`);
|
|
1247
1248
|
}
|
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.
|
|
5
|
+
"version": "2.7.4",
|
|
6
6
|
"publisher": "cortex",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"engines": {
|