@mrxkun/mcfast-mcp 4.0.5 → 4.0.6
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrxkun/mcfast-mcp",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
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": {
|
|
@@ -431,6 +431,15 @@ export class MemoryEngine {
|
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
+
/**
|
|
435
|
+
* Get recent chunks from database
|
|
436
|
+
* @param {number} limit - Number of chunks to retrieve
|
|
437
|
+
* @returns {Array} Recent chunks
|
|
438
|
+
*/
|
|
439
|
+
getRecentChunks(limit = 100) {
|
|
440
|
+
return this.db.getRecentChunks(limit);
|
|
441
|
+
}
|
|
442
|
+
|
|
434
443
|
// ==================== SMART ROUTING CONTROLS ====================
|
|
435
444
|
|
|
436
445
|
/**
|
|
@@ -74,6 +74,10 @@ export class MemoryDatabase {
|
|
|
74
74
|
return this.db.prepare('INSERT INTO chunks VALUES ($id, $file_id, $content, $start_line, $end_line, $token_count)').run(chunk);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
getRecentChunks(limit = 100) {
|
|
78
|
+
return this.db.prepare('SELECT c.*, f.path as file_path FROM chunks c JOIN files f ON c.file_id = f.id ORDER BY c.id DESC LIMIT ?').all(limit);
|
|
79
|
+
}
|
|
80
|
+
|
|
77
81
|
insertEmbedding(embedding) {
|
|
78
82
|
return this.db.prepare('INSERT INTO embeddings VALUES ($chunk_id, $embedding, $model)').run(embedding);
|
|
79
83
|
}
|
|
@@ -90,6 +94,10 @@ export class MemoryDatabase {
|
|
|
90
94
|
return this.db.prepare('INSERT INTO edit_history VALUES ($id, $timestamp, $instruction, $files, $strategy, $success, $diff_size, $latency_ms)').run(edit);
|
|
91
95
|
}
|
|
92
96
|
|
|
97
|
+
getRecentEdits(limit = 100) {
|
|
98
|
+
return this.db.prepare('SELECT * FROM edit_history ORDER BY timestamp DESC LIMIT ?').all(limit);
|
|
99
|
+
}
|
|
100
|
+
|
|
93
101
|
getStats() {
|
|
94
102
|
const files = this.db.prepare('SELECT COUNT(*) as count FROM files').get();
|
|
95
103
|
const facts = this.db.prepare('SELECT COUNT(*) as count FROM facts').get();
|