@mrxkun/mcfast-mcp 4.0.11 → 4.0.12
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/package.json +1 -1
- package/src/index.js +25 -2
- package/src/memory/memory-engine.js +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrxkun/mcfast-mcp",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.12",
|
|
4
4
|
"description": "Ultra-fast code editing with WASM acceleration, fuzzy patching, multi-layer caching, and 8 unified tools. Optimized for AI code assistants with 80-98% latency reduction. Phase 4: ML Intelligence Layer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/index.js
CHANGED
|
@@ -282,6 +282,28 @@ const TOOL_ALIASES = {
|
|
|
282
282
|
'list_files_fast': 'list_files',
|
|
283
283
|
'read_file': 'read',
|
|
284
284
|
'goto_definition': 'search', // redirected
|
|
285
|
+
// VSCode MCP client adds prefixes
|
|
286
|
+
'mcp--mcfast--edit': 'edit',
|
|
287
|
+
'mcp--mcfast--search': 'search',
|
|
288
|
+
'mcp--mcfast--read': 'read',
|
|
289
|
+
'mcp--mcfast--list_files': 'list_files',
|
|
290
|
+
'mcp--mcfast--reapply': 'reapply',
|
|
291
|
+
'mcp--mcfast--memory_search': 'memory_search',
|
|
292
|
+
'mcp--mcfast--memory_get': 'memory_get',
|
|
293
|
+
'mcp--mcfast--detect_patterns': 'detect_patterns',
|
|
294
|
+
'mcp--mcfast--get_suggestions': 'get_suggestions',
|
|
295
|
+
'mcp--mcfast--select_strategy': 'select_strategy',
|
|
296
|
+
// Alternative format with double dashes
|
|
297
|
+
'mcfast_edit': 'edit',
|
|
298
|
+
'mcfast_search': 'search',
|
|
299
|
+
'mcfast_read': 'read',
|
|
300
|
+
'mcfast_list_files': 'list_files',
|
|
301
|
+
'mcfast_reapply': 'reapply',
|
|
302
|
+
'mcfast_memory_search': 'memory_search',
|
|
303
|
+
'mcfast_memory_get': 'memory_get',
|
|
304
|
+
'mcfast_detect_patterns': 'detect_patterns',
|
|
305
|
+
'mcfast_get_suggestions': 'get_suggestions',
|
|
306
|
+
'mcfast_select_strategy': 'select_strategy',
|
|
285
307
|
};
|
|
286
308
|
|
|
287
309
|
/**
|
|
@@ -1107,7 +1129,8 @@ async function handleSearchFilesystem({ query, path: searchPath, isRegex = false
|
|
|
1107
1129
|
lines.forEach((line, idx) => {
|
|
1108
1130
|
if (line.includes(query)) {
|
|
1109
1131
|
matches.push({
|
|
1110
|
-
|
|
1132
|
+
file,
|
|
1133
|
+
lineNumber: idx + 1,
|
|
1111
1134
|
content: line.trim()
|
|
1112
1135
|
});
|
|
1113
1136
|
}
|
|
@@ -1152,7 +1175,7 @@ async function handleSearchFilesystem({ query, path: searchPath, isRegex = false
|
|
|
1152
1175
|
contentMatches.slice(0, 10).forEach(({ file, matches }) => {
|
|
1153
1176
|
output += `\n${colors.yellow}${file}${colors.reset}\n`;
|
|
1154
1177
|
matches.forEach(match => {
|
|
1155
|
-
output += ` ${colors.dim}${match.
|
|
1178
|
+
output += ` ${colors.dim}${match.lineNumber}:${colors.reset} ${match.content}\n`;
|
|
1156
1179
|
});
|
|
1157
1180
|
});
|
|
1158
1181
|
}
|
|
@@ -104,6 +104,20 @@ export class MemoryEngine {
|
|
|
104
104
|
console.log(`[MemoryEngine] Smart Routing: ${this.smartRoutingEnabled ? 'ENABLED' : 'DISABLED'}`);
|
|
105
105
|
console.log(`[MemoryEngine] Intelligence Layer: ${this.intelligenceEnabled ? 'ENABLED' : 'DISABLED'}`);
|
|
106
106
|
|
|
107
|
+
// Initialize intelligence engines if enabled
|
|
108
|
+
if (this.intelligenceEnabled) {
|
|
109
|
+
try {
|
|
110
|
+
const { PatternDetector, SuggestionEngine, StrategySelector } = await import('../intelligence/index.js');
|
|
111
|
+
this.patternDetector = new PatternDetector({ memoryEngine: this });
|
|
112
|
+
this.suggestionEngine = new SuggestionEngine({ memoryEngine: this });
|
|
113
|
+
this.strategySelector = new StrategySelector({ memoryEngine: this });
|
|
114
|
+
console.log('[MemoryEngine] Intelligence engines initialized');
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.warn('[MemoryEngine] Failed to initialize intelligence engines:', error.message);
|
|
117
|
+
this.intelligenceEnabled = false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
107
121
|
// Load intelligence models
|
|
108
122
|
if (this.intelligenceEnabled) {
|
|
109
123
|
await this.patternDetector.loadModel?.();
|