| 8953 | } |
| 8954 | |
| 8955 | int cbm_install_agent_configs(const char *home, const char *binary_path, bool force, bool dry_run) { |
| 8956 | g_agent_install_errors = 0; |
| 8957 | cbm_detected_agents_t agents = cbm_detect_agents(home); |
| 8958 | if (!g_install_plan) { |
| 8959 | print_detected_agents(&agents, home); |
| 8960 | } |
| 8961 | |
| 8962 | if (agents.claude_code) { |
| 8963 | install_claude_code_config(home, binary_path, force, dry_run); |
| 8964 | } |
| 8965 | install_cli_agent_configs(&agents, home, binary_path, force, dry_run); |
| 8966 | install_editor_agent_configs(&agents, home, binary_path, force, dry_run); |
| 8967 | install_additional_agent_configs(&agents, home, binary_path, force, dry_run); |
| 8968 | bool inherit_claude_session = |
| 8969 | agents.claude_code && !dry_run && cbm_has_complete_claude_session_hooks(home); |
| 8970 | install_agent_client_registry(home, binary_path, inherit_claude_session, force, dry_run); |
| 8971 | return g_agent_install_errors == 0 ? CLI_OK : CLI_ERR; |
| 8972 | } |
| 8973 | |
| 8974 | static int cbm_install_agent_configs_with_previous(const char *home, const char *binary_path, |
| 8975 | const char *previous_managed_binary_path, |
no test coverage detected