MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / install_additional_agent_configs

Function install_additional_agent_configs

src/cli/cli.c:9097–9366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9095}
9096
9097static void install_additional_agent_configs(const cbm_detected_agents_t *agents, const char *home,
9098 const char *binary_path, bool force, bool dry_run) {
9099 if (agents->hermes) {
9100 char hermes_home[CLI_BUF_1K];
9101 char cp[CLI_BUF_1K];
9102 char skills_dir[CLI_BUF_1K];
9103 cbm_hermes_home_dir(home, hermes_home, sizeof(hermes_home));
9104 snprintf(cp, sizeof(cp), "%s/config.yaml", hermes_home);
9105 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", hermes_home);
9106 install_generic_agent_config("Hermes", binary_path, cp, NULL, dry_run,
9107 cbm_upsert_hermes_mcp);
9108 install_agent_skill("Hermes", skills_dir, force, dry_run);
9109 if (g_install_plan) {
9110 plan_record("Hermes", "hook", cp);
9111 } else {
9112 int hook_result = CBM_YAML_IDENTITY_EDIT_OK;
9113 if (!dry_run) {
9114 hook_result = prepare_config_parent(cp)
9115 ? cbm_upsert_hermes_context_hook(cp, binary_path)
9116 : CBM_YAML_IDENTITY_EDIT_ERROR;
9117 }
9118 if (hook_result == CBM_YAML_IDENTITY_EDIT_FOREIGN) {
9119 record_agent_config_error(false, "Hermes", "pre_llm_hook_foreign", cp);
9120 } else if (hook_result != CBM_YAML_IDENTITY_EDIT_OK) {
9121 record_agent_config_error(false, "Hermes", "pre_llm_hook_install", cp);
9122 } else {
9123 printf(" hook: %s (pre_llm_call)\n", cp);
9124 }
9125 }
9126 }
9127 if (agents->openhands) {
9128 char cp[CLI_BUF_1K];
9129 char skills_dir[CLI_BUF_1K];
9130 snprintf(cp, sizeof(cp), "%s/.openhands/mcp.json", home);
9131 snprintf(skills_dir, sizeof(skills_dir), "%s/.agents/skills", home);
9132 install_generic_agent_config("OpenHands", binary_path, cp, NULL, dry_run,
9133 cbm_install_editor_mcp);
9134 install_agent_skill("OpenHands", skills_dir, force, dry_run);
9135 }
9136 if (agents->augment) {
9137 char cp[CLI_BUF_1K];
9138 char ip[CLI_BUF_1K];
9139 char ap[CLI_BUF_1K];
9140 char session_hp[CLI_BUF_1K];
9141 char coverage_hp[CLI_BUF_1K];
9142 snprintf(cp, sizeof(cp), "%s/.augment/settings.json", home);
9143 snprintf(ip, sizeof(ip), "%s/.augment/rules/codebase-memory.md", home);
9144 snprintf(ap, sizeof(ap), "%s/.augment/agents/codebase-memory.md", home);
9145 snprintf(session_hp, sizeof(session_hp), "%s/.augment/hooks/%s", home,
9146 AUGMENT_SESSION_SCRIPT);
9147 snprintf(coverage_hp, sizeof(coverage_hp), "%s/.augment/hooks/%s", home,
9148 AUGMENT_COVERAGE_SCRIPT);
9149 install_generic_agent_config("Augment/Auggie", binary_path, cp, ip, dry_run,
9150 cbm_install_editor_mcp);
9151 install_tiered_agent_profiles(
9152 (cbm_tiered_profile_set_t){
9153 .label = "Augment/Auggie",
9154 .verify_path = ap,

Callers 1

Tested by

no test coverage detected