@softerist/heuristic-mcp 2.1.40 → 2.1.42
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/lifecycle.js +21 -0
- package/index.js +1 -2
- package/package.json +15 -15
package/features/lifecycle.js
CHANGED
|
@@ -4,6 +4,7 @@ import util from 'util';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import fs from 'fs/promises';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
7
8
|
|
|
8
9
|
const execPromise = util.promisify(exec);
|
|
9
10
|
|
|
@@ -86,6 +87,21 @@ function getGlobalCacheDir() {
|
|
|
86
87
|
return process.env.XDG_CACHE_HOME || path.join(os.homedir(), '.cache');
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
function quoteArg(value) {
|
|
91
|
+
const safe = value ? String(value).replace(/"/g, '\\"') : '';
|
|
92
|
+
return `"${safe}"`;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function buildConsoleCommand(workspaceDir = null) {
|
|
96
|
+
const nodeBin = process.execPath;
|
|
97
|
+
const scriptPath = fileURLToPath(new URL('../index.js', import.meta.url));
|
|
98
|
+
const workspace = workspaceDir || process.cwd();
|
|
99
|
+
const envPrefix = process.platform === 'win32'
|
|
100
|
+
? 'set SMART_CODING_VERBOSE=true &&'
|
|
101
|
+
: 'SMART_CODING_VERBOSE=true';
|
|
102
|
+
return `${envPrefix} ${quoteArg(nodeBin)} ${quoteArg(scriptPath)} --workspace ${quoteArg(workspace)}`;
|
|
103
|
+
}
|
|
104
|
+
|
|
89
105
|
export async function status() {
|
|
90
106
|
try {
|
|
91
107
|
const home = os.homedir();
|
|
@@ -258,3 +274,8 @@ export async function status() {
|
|
|
258
274
|
console.error(`[Lifecycle] Failed to check status: ${error.message}`);
|
|
259
275
|
}
|
|
260
276
|
}
|
|
277
|
+
|
|
278
|
+
export async function logs() {
|
|
279
|
+
console.log(`[Logs] Console logs: ${buildConsoleCommand()}`);
|
|
280
|
+
await status();
|
|
281
|
+
}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softerist/heuristic-mcp",
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
"version": "2.1.42",
|
|
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
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"heuristic-mcp": "index.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"start": "node index.js",
|
|
12
|
+
"dev": "node --watch index.js",
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"test:watch": "vitest",
|
|
15
|
+
"clean": "node scripts/clear-cache.js",
|
|
16
|
+
"postinstall": "node scripts/postinstall.js && node scripts/download-model.js"
|
|
17
|
+
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"mcp",
|
|
20
20
|
"semantic-search",
|