@softerist/heuristic-mcp 2.1.45 → 2.1.47

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.
Files changed (3) hide show
  1. package/config.json +0 -1
  2. package/index.js +20 -4
  3. package/package.json +1 -1
package/config.json CHANGED
@@ -56,7 +56,6 @@
56
56
  "maxFileSize": 1048576,
57
57
  "maxResults": 5,
58
58
  "enableCache": true,
59
- "cacheDirectory": "./.smart-coding-cache",
60
59
  "watchFiles": false,
61
60
  "verbose": false,
62
61
  "embeddingModel": "Xenova/all-MiniLM-L6-v2",
package/index.js CHANGED
@@ -248,9 +248,17 @@ process.on('SIGINT', async () => {
248
248
  console.error("[Server] File watcher stopped");
249
249
  }
250
250
 
251
- // Terminate workers to avoid native crashes on exit
251
+ // Give workers time to finish current batch (prevents core dump)
252
252
  if (indexer && indexer.terminateWorkers) {
253
- await indexer.terminateWorkers();
253
+ try {
254
+ console.error("[Server] Waiting for workers to finish...");
255
+ await new Promise(resolve => setTimeout(resolve, 500));
256
+ await indexer.terminateWorkers();
257
+ console.error("[Server] Workers terminated");
258
+ } catch (err) {
259
+ // Suppress native module errors during shutdown
260
+ console.error("[Server] Workers shutdown (with warnings)");
261
+ }
254
262
  }
255
263
 
256
264
  // Save cache
@@ -272,9 +280,17 @@ process.on('SIGTERM', async () => {
272
280
  console.error("[Server] File watcher stopped");
273
281
  }
274
282
 
275
- // Terminate workers to avoid native crashes on exit
283
+ // Give workers time to finish current batch (prevents core dump)
276
284
  if (indexer && indexer.terminateWorkers) {
277
- await indexer.terminateWorkers();
285
+ try {
286
+ console.error("[Server] Waiting for workers to finish...");
287
+ await new Promise(resolve => setTimeout(resolve, 500));
288
+ await indexer.terminateWorkers();
289
+ console.error("[Server] Workers terminated");
290
+ } catch (err) {
291
+ // Suppress native module errors during shutdown
292
+ console.error("[Server] Workers shutdown (with warnings)");
293
+ }
278
294
  }
279
295
 
280
296
  // Save cache
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softerist/heuristic-mcp",
3
- "version": "2.1.45",
3
+ "version": "2.1.47",
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",