@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.
@@ -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
- return;
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:');
@@ -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
- // forceLog(`[Auto-Register] Skipped ${name}: Config file not found at ${configPath}`);
108
- continue;
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
- const content = await fs.readFile(configPath, 'utf-8');
113
- let config = {};
114
- try {
115
- config = JSON.parse(content);
116
- } catch (e) {
117
- forceLog(`[Auto-Register] Error parsing ${name} config: ${e.message}`);
118
- continue;
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.24",
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",