@softerist/heuristic-mcp 2.1.24 → 2.1.26
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 +4 -2
- package/features/register.js +24 -11
- package/package.json +1 -1
package/features/lifecycle.js
CHANGED
|
@@ -143,8 +143,9 @@ export async function logs() {
|
|
|
143
143
|
if (cacheDirs.length === 0) {
|
|
144
144
|
console.log('[Logs] No cache directories found.');
|
|
145
145
|
console.log(`[Logs] Expected location: ${globalCacheRoot}`);
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
console.log('');
|
|
147
|
+
// Don't return - fall through to show paths section
|
|
148
|
+
} else {
|
|
148
149
|
|
|
149
150
|
console.log(`[Logs] Found ${cacheDirs.length} cache director${cacheDirs.length === 1 ? 'y' : 'ies'} in ${globalCacheRoot}\n`);
|
|
150
151
|
|
|
@@ -203,6 +204,7 @@ export async function logs() {
|
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
console.log(`${'─'.repeat(60)}\n`);
|
|
207
|
+
}
|
|
206
208
|
|
|
207
209
|
// Show important paths
|
|
208
210
|
console.log('[Paths] Important locations:');
|
package/features/register.js
CHANGED
|
@@ -100,22 +100,35 @@ export async function register(filter = null) {
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
try {
|
|
103
|
-
// Check if file exists
|
|
103
|
+
// Check if file exists - for Antigravity, create it if it doesn't
|
|
104
|
+
let config = {};
|
|
105
|
+
let fileExists = true;
|
|
106
|
+
|
|
104
107
|
try {
|
|
105
108
|
await fs.access(configPath);
|
|
106
109
|
} catch {
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
fileExists = false;
|
|
111
|
+
|
|
112
|
+
// Create config file for all supported IDEs
|
|
113
|
+
try {
|
|
114
|
+
// Create parent directory
|
|
115
|
+
await fs.mkdir(path.dirname(configPath), { recursive: true });
|
|
116
|
+
forceLog(`[Auto-Register] Creating ${name} config at ${configPath}`);
|
|
117
|
+
} catch (mkdirErr) {
|
|
118
|
+
forceLog(`[Auto-Register] Skipped ${name}: Cannot create config directory: ${mkdirErr.message}`);
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
109
121
|
}
|
|
110
122
|
|
|
111
|
-
// Read config
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
// Read existing config if file exists
|
|
124
|
+
if (fileExists) {
|
|
125
|
+
const content = await fs.readFile(configPath, 'utf-8');
|
|
126
|
+
try {
|
|
127
|
+
config = JSON.parse(content);
|
|
128
|
+
} catch (e) {
|
|
129
|
+
forceLog(`[Auto-Register] Error parsing ${name} config: ${e.message}`);
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
119
132
|
}
|
|
120
133
|
|
|
121
134
|
// Init mcpServers if missing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softerist/heuristic-mcp",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.26",
|
|
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",
|