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

Function install_additional_agent_configs

src/cli/cli.c:8728–8997  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8726}
8727
8728static void install_additional_agent_configs(const cbm_detected_agents_t *agents, const char *home,
8729 const char *binary_path, bool force, bool dry_run) {
8730 if (agents->hermes) {
8731 char hermes_home[CLI_BUF_1K];
8732 char cp[CLI_BUF_1K];
8733 char skills_dir[CLI_BUF_1K];
8734 cbm_hermes_home_dir(home, hermes_home, sizeof(hermes_home));
8735 snprintf(cp, sizeof(cp), "%s/config.yaml", hermes_home);
8736 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", hermes_home);
8737 install_generic_agent_config("Hermes", binary_path, cp, NULL, dry_run,
8738 cbm_upsert_hermes_mcp);
8739 install_agent_skill("Hermes", skills_dir, force, dry_run);
8740 if (g_install_plan) {
8741 plan_record("Hermes", "hook", cp);
8742 } else {
8743 int hook_result = CBM_YAML_IDENTITY_EDIT_OK;
8744 if (!dry_run) {
8745 hook_result = prepare_config_parent(cp)
8746 ? cbm_upsert_hermes_context_hook(cp, binary_path)
8747 : CBM_YAML_IDENTITY_EDIT_ERROR;
8748 }
8749 if (hook_result == CBM_YAML_IDENTITY_EDIT_FOREIGN) {
8750 record_agent_config_error(false, "Hermes", "pre_llm_hook_foreign", cp);
8751 } else if (hook_result != CBM_YAML_IDENTITY_EDIT_OK) {
8752 record_agent_config_error(false, "Hermes", "pre_llm_hook_install", cp);
8753 } else {
8754 printf(" hook: %s (pre_llm_call)\n", cp);
8755 }
8756 }
8757 }
8758 if (agents->openhands) {
8759 char cp[CLI_BUF_1K];
8760 char skills_dir[CLI_BUF_1K];
8761 snprintf(cp, sizeof(cp), "%s/.openhands/mcp.json", home);
8762 snprintf(skills_dir, sizeof(skills_dir), "%s/.agents/skills", home);
8763 install_generic_agent_config("OpenHands", binary_path, cp, NULL, dry_run,
8764 cbm_install_editor_mcp);
8765 install_agent_skill("OpenHands", skills_dir, force, dry_run);
8766 }
8767 if (agents->augment) {
8768 char cp[CLI_BUF_1K];
8769 char ip[CLI_BUF_1K];
8770 char ap[CLI_BUF_1K];
8771 char session_hp[CLI_BUF_1K];
8772 char coverage_hp[CLI_BUF_1K];
8773 snprintf(cp, sizeof(cp), "%s/.augment/settings.json", home);
8774 snprintf(ip, sizeof(ip), "%s/.augment/rules/codebase-memory.md", home);
8775 snprintf(ap, sizeof(ap), "%s/.augment/agents/codebase-memory.md", home);
8776 snprintf(session_hp, sizeof(session_hp), "%s/.augment/hooks/%s", home,
8777 AUGMENT_SESSION_SCRIPT);
8778 snprintf(coverage_hp, sizeof(coverage_hp), "%s/.augment/hooks/%s", home,
8779 AUGMENT_COVERAGE_SCRIPT);
8780 install_generic_agent_config("Augment/Auggie", binary_path, cp, ip, dry_run,
8781 cbm_install_editor_mcp);
8782 install_tiered_agent_profiles(
8783 (cbm_tiered_profile_set_t){
8784 .label = "Augment/Auggie",
8785 .verify_path = ap,

Callers 1

Tested by

no test coverage detected