@softerist/heuristic-mcp 2.1.29 → 2.1.31
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 -3
- package/package.json +1 -1
- package/scripts/postinstall.js +7 -4
package/features/register.js
CHANGED
|
@@ -107,7 +107,7 @@ export async function register(filter = null) {
|
|
|
107
107
|
|
|
108
108
|
const serverConfig = {
|
|
109
109
|
command: binaryPath,
|
|
110
|
-
args: [scriptPath, "--workspace", "
|
|
110
|
+
args: [scriptPath, "--workspace", "."], // Use . (CWD) to avoid variable expansion issues
|
|
111
111
|
disabled: false,
|
|
112
112
|
autoRegistered: true // Marker to know we did this
|
|
113
113
|
};
|
|
@@ -166,8 +166,8 @@ export async function register(filter = null) {
|
|
|
166
166
|
// Inject configuration
|
|
167
167
|
config.mcpServers['heuristic-mcp'] = serverConfig;
|
|
168
168
|
|
|
169
|
-
// Write back
|
|
170
|
-
|
|
169
|
+
// Write back synchronously to avoid race conditions
|
|
170
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
171
171
|
forceLog(`\x1b[32m[Auto-Register] ✅ Successfully registered with ${name}\x1b[0m`);
|
|
172
172
|
registeredCount++;
|
|
173
173
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softerist/heuristic-mcp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.31",
|
|
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",
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { register } from '../features/register.js';
|
|
2
2
|
|
|
3
|
-
// Run the registration process
|
|
3
|
+
// Run the registration process - MUST await to ensure file writes complete
|
|
4
4
|
console.log('[PostInstall] Running Heuristic MCP registration...');
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
await register();
|
|
8
|
+
console.log('[PostInstall] Registration complete.');
|
|
9
|
+
} catch (err) {
|
|
6
10
|
console.error('[PostInstall] Registration failed:', err.message);
|
|
7
11
|
// Don't fail the install if registration fails, just warn
|
|
8
|
-
|
|
9
|
-
});
|
|
12
|
+
}
|