Install MCP configs for CLI-based agents (Codex, Gemini, OpenCode, Antigravity, Aider). */ Install Gemini CLI config with hooks. */
| 8236 | /* Install MCP configs for CLI-based agents (Codex, Gemini, OpenCode, Antigravity, Aider). */ |
| 8237 | /* Install Gemini CLI config with hooks. */ |
| 8238 | static void install_gemini_config(const char *home, const char *binary_path, bool dry_run) { |
| 8239 | char cp[CLI_BUF_1K]; |
| 8240 | char ip[CLI_BUF_1K]; |
| 8241 | char ap[CLI_BUF_1K]; |
| 8242 | snprintf(cp, sizeof(cp), "%s/.gemini/settings.json", home); |
| 8243 | snprintf(ip, sizeof(ip), "%s/.gemini/GEMINI.md", home); |
| 8244 | snprintf(ap, sizeof(ap), "%s/.gemini/agents/codebase-memory.md", home); |
| 8245 | install_generic_agent_config("Gemini CLI", binary_path, cp, ip, dry_run, |
| 8246 | cbm_install_editor_mcp); |
| 8247 | install_tiered_agent_profiles( |
| 8248 | (cbm_tiered_profile_set_t){ |
| 8249 | .label = "Gemini CLI", |
| 8250 | .verify_path = ap, |
| 8251 | .binary_path = binary_path, |
| 8252 | .legacy_verify_content = legacy_gemini_verify_agent_content, |
| 8253 | .dialect = CBM_GRAPH_DIALECT_GEMINI, |
| 8254 | }, |
| 8255 | dry_run); |
| 8256 | if (g_install_plan) { |
| 8257 | plan_record("Gemini CLI", "hook", cp); /* BeforeTool + SessionStart in settings.json */ |
| 8258 | return; |
| 8259 | } |
| 8260 | if (!dry_run) { |
| 8261 | if (cbm_upsert_gemini_hooks(cp) != CLI_OK) { |
| 8262 | record_agent_config_error(false, "Gemini CLI", "before_tool_hook_install", cp); |
| 8263 | } |
| 8264 | #ifndef _WIN32 |
| 8265 | if (cbm_upsert_gemini_coverage_hook(cp, binary_path) != CLI_OK) { |
| 8266 | record_agent_config_error(false, "Gemini CLI", "after_tool_hook_install", cp); |
| 8267 | } |
| 8268 | #endif |
| 8269 | if (cbm_upsert_gemini_session_hooks(cp) != CLI_OK) { |
| 8270 | record_agent_config_error(false, "Gemini CLI", "session_hook_install", cp); |
| 8271 | } |
| 8272 | } |
| 8273 | #ifdef _WIN32 |
| 8274 | printf(" hooks: BeforeTool + SessionStart; AfterTool coverage withheld (executor unknown)\n"); |
| 8275 | #else |
| 8276 | printf(" hooks: BeforeTool + AfterTool read_file + SessionStart\n"); |
| 8277 | #endif |
| 8278 | printf(" subagents: Scout + Verify + Auditor\n"); |
| 8279 | } |
| 8280 | |
| 8281 | static void install_cli_agent_configs(const cbm_detected_agents_t *agents, const char *home, |
| 8282 | const char *binary_path, bool force, bool dry_run) { |
no test coverage detected