/** * Antigravity / agy MCP injector. * * `agy` auto-loads MCP servers declared in `~/.gemini/config/mcp_config.json` * — the same shape Claude Code, Gemini CLI, and many other MCP hosts use: * * { * "mcpServers": { * "": { "command": "...", "args": [...], "env": {...} } * } * } * * On adapter init we read-modify-write this file so the `agim` entry * is always pointed at the current approval-bus socket (which rotates * every agim restart — see core/approval-bus.ts:defaultSocketPath). * Other entries the operator already had stay untouched. * * Why a single shared config file (vs claude-code's per-spawn tmpdir): * agy has no `--mcp-config ` flag; the only way to wire MCP is * the global file. Concurrency-wise that's fine because the file just * tells agy which sidecar to launch — the sidecar itself is stateless * across runs (each run gets its own AGIM_RUN_ID via process env). */ /** Resolves to `${HOME}/.gemini/config/mcp_config.json`. Exported for tests * that want to point this at a tmp dir instead of the real home. */ export declare function defaultMcpConfigPath(): string; export interface McpServerSpec { command: string; args?: string[]; env?: Record; } /** * Ensure `~/.gemini/config/mcp_config.json` has the agim MCP entry * pointing at the current approval-bus socket. Preserves any other * keys / mcpServers entries the operator already configured. * * Idempotent: safe to call on every adapter init or before every spawn. */ export declare function ensureAgimMcp(spec: McpServerSpec, opts?: { path?: string; }): Promise; /** * Remove the agim MCP entry. Used by tests / uninstall flows; the * normal adapter path just overwrites with a fresh socket. */ export declare function removeAgimMcp(opts?: { path?: string; }): Promise; //# sourceMappingURL=ensure-mcp-config.d.ts.map