| 9003 | } |
| 9004 | |
| 9005 | int cbm_install_agent_configs(const char *home, const char *binary_path, bool force, bool dry_run) { |
| 9006 | g_agent_install_errors = 0; |
| 9007 | cbm_detected_agents_t agents = cbm_detect_agents(home); |
| 9008 | if (!g_install_plan) { |
| 9009 | print_detected_agents(&agents, home); |
| 9010 | } |
| 9011 | |
| 9012 | if (agents.claude_code) { |
| 9013 | install_claude_code_config(home, binary_path, force, dry_run); |
| 9014 | } |
| 9015 | install_cli_agent_configs(&agents, home, binary_path, force, dry_run); |
| 9016 | install_editor_agent_configs(&agents, home, binary_path, force, dry_run); |
| 9017 | install_additional_agent_configs(&agents, home, binary_path, force, dry_run); |
| 9018 | bool inherit_claude_session = |
| 9019 | agents.claude_code && !dry_run && cbm_has_complete_claude_session_hooks(home); |
| 9020 | install_agent_client_registry(home, binary_path, inherit_claude_session, force, dry_run); |
| 9021 | return g_agent_install_errors == 0 ? CLI_OK : CLI_ERR; |
| 9022 | } |
| 9023 | |
| 9024 | static int cbm_install_agent_configs_with_previous(const char *home, const char *binary_path, |
| 9025 | const char *previous_managed_binary_path, |
no test coverage detected