@softerist/heuristic-mcp 2.1.30 → 2.1.32

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.
@@ -1,4 +1,5 @@
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';
@@ -7,6 +8,7 @@ import { fileURLToPath } from 'url';
7
8
  function expandPath(p) {
8
9
  if (p.startsWith('~/')) {
9
10
  return path.join(os.homedir(), p.slice(2));
11
+
10
12
  }
11
13
 
12
14
  if (process.platform === 'win32') {
@@ -107,7 +109,7 @@ export async function register(filter = null) {
107
109
 
108
110
  const serverConfig = {
109
111
  command: binaryPath,
110
- args: [scriptPath, "--workspace", "${workspaceFolder}"],
112
+ args: [scriptPath, "--workspace", "."], // Use . (CWD) to avoid variable expansion issues
111
113
  disabled: false,
112
114
  autoRegistered: true // Marker to know we did this
113
115
  };
@@ -166,8 +168,9 @@ export async function register(filter = null) {
166
168
  // Inject configuration
167
169
  config.mcpServers['heuristic-mcp'] = serverConfig;
168
170
 
169
- // Write back
170
- await fs.writeFile(configPath, JSON.stringify(config, null, 2));
171
+ // Write back synchronously to avoid race conditions
172
+ writeFileSync(configPath, JSON.stringify(config, null, 2));
173
+
171
174
  forceLog(`\x1b[32m[Auto-Register] ✅ Successfully registered with ${name}\x1b[0m`);
172
175
  registeredCount++;
173
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softerist/heuristic-mcp",
3
- "version": "2.1.30",
3
+ "version": "2.1.32",
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",