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

Function install_additional_agent_configs

src/cli/cli.c:8684–8953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8682}
8683
8684static void install_additional_agent_configs(const cbm_detected_agents_t *agents, const char *home,
8685 const char *binary_path, bool force, bool dry_run) {
8686 if (agents->hermes) {
8687 char hermes_home[CLI_BUF_1K];
8688 char cp[CLI_BUF_1K];
8689 char skills_dir[CLI_BUF_1K];
8690 cbm_hermes_home_dir(home, hermes_home, sizeof(hermes_home));
8691 snprintf(cp, sizeof(cp), "%s/config.yaml", hermes_home);
8692 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", hermes_home);
8693 install_generic_agent_config("Hermes", binary_path, cp, NULL, dry_run,
8694 cbm_upsert_hermes_mcp);
8695 install_agent_skill("Hermes", skills_dir, force, dry_run);
8696 if (g_install_plan) {
8697 plan_record("Hermes", "hook", cp);
8698 } else {
8699 int hook_result = CBM_YAML_IDENTITY_EDIT_OK;
8700 if (!dry_run) {
8701 hook_result = prepare_config_parent(cp)
8702 ? cbm_upsert_hermes_context_hook(cp, binary_path)
8703 : CBM_YAML_IDENTITY_EDIT_ERROR;
8704 }
8705 if (hook_result == CBM_YAML_IDENTITY_EDIT_FOREIGN) {
8706 record_agent_config_error(false, "Hermes", "pre_llm_hook_foreign", cp);
8707 } else if (hook_result != CBM_YAML_IDENTITY_EDIT_OK) {
8708 record_agent_config_error(false, "Hermes", "pre_llm_hook_install", cp);
8709 } else {
8710 printf(" hook: %s (pre_llm_call)\n", cp);
8711 }
8712 }
8713 }
8714 if (agents->openhands) {
8715 char cp[CLI_BUF_1K];
8716 char skills_dir[CLI_BUF_1K];
8717 snprintf(cp, sizeof(cp), "%s/.openhands/mcp.json", home);
8718 snprintf(skills_dir, sizeof(skills_dir), "%s/.agents/skills", home);
8719 install_generic_agent_config("OpenHands", binary_path, cp, NULL, dry_run,
8720 cbm_install_editor_mcp);
8721 install_agent_skill("OpenHands", skills_dir, force, dry_run);
8722 }
8723 if (agents->augment) {
8724 char cp[CLI_BUF_1K];
8725 char ip[CLI_BUF_1K];
8726 char ap[CLI_BUF_1K];
8727 char session_hp[CLI_BUF_1K];
8728 char coverage_hp[CLI_BUF_1K];
8729 snprintf(cp, sizeof(cp), "%s/.augment/settings.json", home);
8730 snprintf(ip, sizeof(ip), "%s/.augment/rules/codebase-memory.md", home);
8731 snprintf(ap, sizeof(ap), "%s/.augment/agents/codebase-memory.md", home);
8732 snprintf(session_hp, sizeof(session_hp), "%s/.augment/hooks/%s", home,
8733 AUGMENT_SESSION_SCRIPT);
8734 snprintf(coverage_hp, sizeof(coverage_hp), "%s/.augment/hooks/%s", home,
8735 AUGMENT_COVERAGE_SCRIPT);
8736 install_generic_agent_config("Augment/Auggie", binary_path, cp, ip, dry_run,
8737 cbm_install_editor_mcp);
8738 install_tiered_agent_profiles(
8739 (cbm_tiered_profile_set_t){
8740 .label = "Augment/Auggie",
8741 .verify_path = ap,

Callers 1

Tested by

no test coverage detected