vexp-cli 2.1.5 → 2.1.6
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/dist/agent-config.js +66 -5
- package/package.json +6 -6
package/dist/agent-config.js
CHANGED
|
@@ -168,10 +168,31 @@ const AGENT_DETECTORS = [
|
|
|
168
168
|
mcpConfigFile: ".kiro/settings/mcp.json",
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
|
-
agent: "
|
|
172
|
-
detectPath: ".
|
|
173
|
-
configFile: ".
|
|
171
|
+
agent: "Trae",
|
|
172
|
+
detectPath: ".trae",
|
|
173
|
+
configFile: ".trae/rules/project_rules.md",
|
|
174
|
+
templateName: "generic",
|
|
175
|
+
mcpConfigFile: ".trae/mcp.json",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
agent: "Firebase Studio",
|
|
179
|
+
detectPath: ".idx",
|
|
180
|
+
configFile: ".idx/airules.md",
|
|
174
181
|
templateName: "generic",
|
|
182
|
+
mcpConfigFile: ".idx/mcp.json",
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
agent: "Antigravity",
|
|
186
|
+
// Antigravity keeps NO workspace marker dir of its own: it reads the
|
|
187
|
+
// cross-tool AGENTS.md (v1.20.3+), GEMINI.md, and .agent/rules/ from
|
|
188
|
+
// the workspace, and stores its global state under ~/.gemini/antigravity.
|
|
189
|
+
detectPath: "GEMINI.md",
|
|
190
|
+
detectPaths: [".agent"],
|
|
191
|
+
detectHome: ".gemini/antigravity",
|
|
192
|
+
configFile: "AGENTS.md",
|
|
193
|
+
templateName: "agents-md",
|
|
194
|
+
// MCP is machine-global (~/.gemini/antigravity/mcp_config.json) — handled
|
|
195
|
+
// by configureAntigravityGlobal(), not via mcpConfigFile.
|
|
175
196
|
},
|
|
176
197
|
];
|
|
177
198
|
// ---------------------------------------------------------------------------
|
|
@@ -182,8 +203,16 @@ const AGENT_DETECTORS = [
|
|
|
182
203
|
*/
|
|
183
204
|
export function detectAgents(workspaceRoot) {
|
|
184
205
|
return AGENT_DETECTORS.filter((d) => {
|
|
185
|
-
const
|
|
186
|
-
|
|
206
|
+
const markers = [d.detectPath, ...(d.detectPaths ?? [])];
|
|
207
|
+
if (markers.some((m) => fs.existsSync(path.join(workspaceRoot, m)))) {
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
// Home-level marker: the IDE is installed on this machine even though
|
|
211
|
+
// the workspace carries no footprint (e.g. Antigravity).
|
|
212
|
+
if (d.detectHome && fs.existsSync(path.join(os.homedir(), d.detectHome))) {
|
|
213
|
+
return true;
|
|
214
|
+
}
|
|
215
|
+
return false;
|
|
187
216
|
});
|
|
188
217
|
}
|
|
189
218
|
/**
|
|
@@ -274,6 +303,12 @@ export function configureAgents(workspaceRoot, binaryPath, version, agentFilter,
|
|
|
274
303
|
if (wrote)
|
|
275
304
|
mcpConfigs.push("~/.codex/config.toml");
|
|
276
305
|
}
|
|
306
|
+
// Antigravity: machine-global MCP config (~/.gemini/antigravity/mcp_config.json)
|
|
307
|
+
if (detector.agent === "Antigravity") {
|
|
308
|
+
const wrote = configureAntigravityGlobal(binaryPath, mcpServerPath);
|
|
309
|
+
if (wrote)
|
|
310
|
+
mcpConfigs.push("~/.gemini/antigravity/mcp_config.json");
|
|
311
|
+
}
|
|
277
312
|
// GitHub Copilot: VS Code format (.vscode/mcp.json with "servers" key)
|
|
278
313
|
if (detector.agent === "GitHub Copilot") {
|
|
279
314
|
const mcpPath = path.join(workspaceRoot, ".vscode/mcp.json");
|
|
@@ -381,6 +416,11 @@ export function configureSelectedAgents(workspaceRoot, binaryPath, version, sele
|
|
|
381
416
|
if (wrote)
|
|
382
417
|
mcpConfigs.push("~/.codex/config.toml");
|
|
383
418
|
}
|
|
419
|
+
if (detector.agent === "Antigravity") {
|
|
420
|
+
const wrote = configureAntigravityGlobal(binaryPath, mcpServerPath);
|
|
421
|
+
if (wrote)
|
|
422
|
+
mcpConfigs.push("~/.gemini/antigravity/mcp_config.json");
|
|
423
|
+
}
|
|
384
424
|
if (detector.agent === "GitHub Copilot") {
|
|
385
425
|
const mcpPath = path.join(workspaceRoot, ".vscode/mcp.json");
|
|
386
426
|
if (writeVsCodeMcpConfig(mcpPath, binaryPath, mcpServerPath, workspaceRoot))
|
|
@@ -594,6 +634,27 @@ export function mergeJsonConfig(filePath, mergePayload, version) {
|
|
|
594
634
|
* Write MCP config JSON for agents that use mcpServers format (Cursor, Windsurf).
|
|
595
635
|
* Returns true if a new entry was written.
|
|
596
636
|
*/
|
|
637
|
+
/**
|
|
638
|
+
* Antigravity reads MCP servers from a MACHINE-GLOBAL file:
|
|
639
|
+
* `~/.gemini/antigravity/mcp_config.json` (same schema as the workspace
|
|
640
|
+
* mcp.json files: top-level `mcpServers`, stdio `command`/`args`/`env`;
|
|
641
|
+
* note Antigravity uses `serverUrl` — not `url` — for HTTP servers, which
|
|
642
|
+
* is why we register the stdio transport here).
|
|
643
|
+
*
|
|
644
|
+
* Deliberately NO `VEXP_WORKSPACE` env pin: the file is global, and pinning
|
|
645
|
+
* one workspace breaks every other project (the 2.0.32 multi-session
|
|
646
|
+
* lesson). `vexp-core mcp` resolves the workspace from its spawn cwd.
|
|
647
|
+
*/
|
|
648
|
+
export function configureAntigravityGlobal(binaryPath, mcpServerPath) {
|
|
649
|
+
const cfgDir = path.join(os.homedir(), ".gemini", "antigravity");
|
|
650
|
+
try {
|
|
651
|
+
fs.mkdirSync(cfgDir, { recursive: true });
|
|
652
|
+
}
|
|
653
|
+
catch {
|
|
654
|
+
return false;
|
|
655
|
+
}
|
|
656
|
+
return writeMcpConfig(path.join(cfgDir, "mcp_config.json"), binaryPath, undefined, mcpServerPath, undefined);
|
|
657
|
+
}
|
|
597
658
|
export function writeMcpConfig(mcpConfigPath, binaryPath, alwaysAllow, mcpServerPath, workspaceRoot) {
|
|
598
659
|
const read = readJsonConfigSafe(mcpConfigPath);
|
|
599
660
|
if (!read.ok) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vexp-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"description": "Vexp — Context Engine for AI Coding Agents. Pre-indexes your codebase into a dependency graph and delivers ranked context to any MCP-compatible agent. 58% lower cost per task, 90% fewer tool calls (SWE-bench Verified). Works with Claude Code, Cursor, Copilot, Windsurf, Codex, Cline, Aider, and 12+ agents. Local-first. Your code never leaves your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"node": ">=20.0.0"
|
|
101
101
|
},
|
|
102
102
|
"optionalDependencies": {
|
|
103
|
-
"@vexp/core-linux-x64": "2.1.
|
|
104
|
-
"@vexp/core-linux-arm64": "2.1.
|
|
105
|
-
"@vexp/core-darwin-x64": "2.1.
|
|
106
|
-
"@vexp/core-darwin-arm64": "2.1.
|
|
107
|
-
"@vexp/core-win32-x64": "2.1.
|
|
103
|
+
"@vexp/core-linux-x64": "2.1.6",
|
|
104
|
+
"@vexp/core-linux-arm64": "2.1.6",
|
|
105
|
+
"@vexp/core-darwin-x64": "2.1.6",
|
|
106
|
+
"@vexp/core-darwin-arm64": "2.1.6",
|
|
107
|
+
"@vexp/core-win32-x64": "2.1.6"
|
|
108
108
|
}
|
|
109
109
|
}
|