@softerist/heuristic-mcp 2.1.31 → 2.1.33
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/features/register.js +3 -13
- package/package.json +1 -1
package/features/register.js
CHANGED
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
import fs from 'fs/promises';
|
|
2
|
+
import { writeFileSync } from 'fs';
|
|
2
3
|
import path from 'path';
|
|
3
4
|
import os from 'os';
|
|
4
5
|
import { fileURLToPath } from 'url';
|
|
5
6
|
|
|
6
|
-
// Helper to expand ~ and %vars%
|
|
7
|
-
function expandPath(p) {
|
|
8
|
-
if (p.startsWith('~/')) {
|
|
9
|
-
return path.join(os.homedir(), p.slice(2));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
if (process.platform === 'win32') {
|
|
13
|
-
return p.replace(/%([^%]+)%/g, (_, n) => process.env[n] || '%' + n + '%');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return p;
|
|
17
|
-
}
|
|
18
7
|
|
|
19
8
|
// Detect which IDE is running the install
|
|
20
9
|
function detectCurrentIDE() {
|
|
@@ -167,7 +156,8 @@ export async function register(filter = null) {
|
|
|
167
156
|
config.mcpServers['heuristic-mcp'] = serverConfig;
|
|
168
157
|
|
|
169
158
|
// Write back synchronously to avoid race conditions
|
|
170
|
-
|
|
159
|
+
writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
160
|
+
|
|
171
161
|
forceLog(`\x1b[32m[Auto-Register] ✅ Successfully registered with ${name}\x1b[0m`);
|
|
172
162
|
registeredCount++;
|
|
173
163
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softerist/heuristic-mcp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.33",
|
|
4
4
|
"description": "An enhanced MCP server providing intelligent semantic code search with find-similar-code, recency ranking, and improved chunking. Fork of smart-coding-mcp.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|