| 8930 | } |
| 8931 | |
| 8932 | static void install_additional_agent_configs(const cbm_detected_agents_t *agents, const char *home, |
| 8933 | const char *binary_path, bool force, bool dry_run) { |
| 8934 | if (agents->hermes) { |
| 8935 | char hermes_home[CLI_BUF_1K]; |
| 8936 | char cp[CLI_BUF_1K]; |
| 8937 | char skills_dir[CLI_BUF_1K]; |
| 8938 | cbm_hermes_home_dir(home, hermes_home, sizeof(hermes_home)); |
| 8939 | snprintf(cp, sizeof(cp), "%s/config.yaml", hermes_home); |
| 8940 | snprintf(skills_dir, sizeof(skills_dir), "%s/skills", hermes_home); |
| 8941 | install_generic_agent_config("Hermes", binary_path, cp, NULL, dry_run, |
| 8942 | cbm_upsert_hermes_mcp); |
| 8943 | install_agent_skill("Hermes", skills_dir, force, dry_run); |
| 8944 | if (g_install_plan) { |
| 8945 | plan_record("Hermes", "hook", cp); |
| 8946 | } else { |
| 8947 | int hook_result = CBM_YAML_IDENTITY_EDIT_OK; |
| 8948 | if (!dry_run) { |
| 8949 | hook_result = prepare_config_parent(cp) |
| 8950 | ? cbm_upsert_hermes_context_hook(cp, binary_path) |
| 8951 | : CBM_YAML_IDENTITY_EDIT_ERROR; |
| 8952 | } |
| 8953 | if (hook_result == CBM_YAML_IDENTITY_EDIT_FOREIGN) { |
| 8954 | record_agent_config_error(false, "Hermes", "pre_llm_hook_foreign", cp); |
| 8955 | } else if (hook_result != CBM_YAML_IDENTITY_EDIT_OK) { |
| 8956 | record_agent_config_error(false, "Hermes", "pre_llm_hook_install", cp); |
| 8957 | } else { |
| 8958 | printf(" hook: %s (pre_llm_call)\n", cp); |
| 8959 | } |
| 8960 | } |
| 8961 | } |
| 8962 | if (agents->openhands) { |
| 8963 | char cp[CLI_BUF_1K]; |
| 8964 | char skills_dir[CLI_BUF_1K]; |
| 8965 | snprintf(cp, sizeof(cp), "%s/.openhands/mcp.json", home); |
| 8966 | snprintf(skills_dir, sizeof(skills_dir), "%s/.agents/skills", home); |
| 8967 | install_generic_agent_config("OpenHands", binary_path, cp, NULL, dry_run, |
| 8968 | cbm_install_editor_mcp); |
| 8969 | install_agent_skill("OpenHands", skills_dir, force, dry_run); |
| 8970 | } |
| 8971 | if (agents->augment) { |
| 8972 | char cp[CLI_BUF_1K]; |
| 8973 | char ip[CLI_BUF_1K]; |
| 8974 | char ap[CLI_BUF_1K]; |
| 8975 | char session_hp[CLI_BUF_1K]; |
| 8976 | char coverage_hp[CLI_BUF_1K]; |
| 8977 | snprintf(cp, sizeof(cp), "%s/.augment/settings.json", home); |
| 8978 | snprintf(ip, sizeof(ip), "%s/.augment/rules/codebase-memory.md", home); |
| 8979 | snprintf(ap, sizeof(ap), "%s/.augment/agents/codebase-memory.md", home); |
| 8980 | snprintf(session_hp, sizeof(session_hp), "%s/.augment/hooks/%s", home, |
| 8981 | AUGMENT_SESSION_SCRIPT); |
| 8982 | snprintf(coverage_hp, sizeof(coverage_hp), "%s/.augment/hooks/%s", home, |
| 8983 | AUGMENT_COVERAGE_SCRIPT); |
| 8984 | install_generic_agent_config("Augment/Auggie", binary_path, cp, ip, dry_run, |
| 8985 | cbm_install_editor_mcp); |
| 8986 | install_tiered_agent_profiles( |
| 8987 | (cbm_tiered_profile_set_t){ |
| 8988 | .label = "Augment/Auggie", |
| 8989 | .verify_path = ap, |
no test coverage detected