@softerist/heuristic-mcp 2.1.25 → 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.
@@ -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.25",
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",