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

Function uninstall_additional_agents

src/cli/cli.c:10641–10891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10639}
10640
10641static void uninstall_additional_agents(const cbm_detected_agents_t *agents, const char *home,
10642 bool dry_run) {
10643 char installed_binary[CLI_BUF_1K];
10644 cbm_agent_installed_binary_path(home, installed_binary, sizeof(installed_binary));
10645 if (agents->hermes) {
10646 char hermes_home[CLI_BUF_1K];
10647 char cp[CLI_BUF_1K];
10648 char skills_dir[CLI_BUF_1K];
10649 char binary_path[CLI_BUF_1K];
10650 cbm_hermes_home_dir(home, hermes_home, sizeof(hermes_home));
10651 snprintf(cp, sizeof(cp), "%s/config.yaml", hermes_home);
10652 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", hermes_home);
10653 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10654 int hook_result =
10655 dry_run ? CBM_YAML_IDENTITY_EDIT_OK : cbm_remove_hermes_context_hook(cp, binary_path);
10656 if (hook_result == CBM_YAML_IDENTITY_EDIT_FOREIGN) {
10657 printf(" hook: preserved modified pre_llm_call entry\n");
10658 } else if (hook_result != CBM_YAML_IDENTITY_EDIT_OK) {
10659 record_agent_config_error(true, "Hermes", "pre_llm_hook_uninstall", cp);
10660 } else {
10661 printf(" hook: removed canonical pre_llm_call entry\n");
10662 }
10663 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Hermes", cp, NULL}, dry_run,
10664 cbm_remove_hermes_mcp_owned);
10665 uninstall_agent_skill("Hermes", skills_dir, dry_run);
10666 }
10667 if (agents->openhands) {
10668 char cp[CLI_BUF_1K];
10669 char skills_dir[CLI_BUF_1K];
10670 snprintf(cp, sizeof(cp), "%s/.openhands/mcp.json", home);
10671 snprintf(skills_dir, sizeof(skills_dir), "%s/.agents/skills", home);
10672 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"OpenHands", cp, NULL}, dry_run,
10673 cbm_remove_editor_mcp_owned);
10674 printf(" removed %d skill(s)\n", cbm_remove_skills(skills_dir, dry_run));
10675 }
10676 if (agents->augment) {
10677 char cp[CLI_BUF_1K];
10678 char ip[CLI_BUF_1K];
10679 char ap[CLI_BUF_1K];
10680 char session_hp[CLI_BUF_1K];
10681 char coverage_hp[CLI_BUF_1K];
10682 char binary_path[CLI_BUF_1K];
10683 snprintf(cp, sizeof(cp), "%s/.augment/settings.json", home);
10684 snprintf(ip, sizeof(ip), "%s/.augment/rules/codebase-memory.md", home);
10685 snprintf(ap, sizeof(ap), "%s/.augment/agents/codebase-memory.md", home);
10686 snprintf(session_hp, sizeof(session_hp), "%s/.augment/hooks/%s", home,
10687 AUGMENT_SESSION_SCRIPT);
10688 snprintf(coverage_hp, sizeof(coverage_hp), "%s/.augment/hooks/%s", home,
10689 AUGMENT_COVERAGE_SCRIPT);
10690 /* The owned-document match must rebuild the scripts with the exact
10691 * binary path the install embedded — the managed canonical plain form
10692 * on Windows, not a hand-assembled default. */
10693 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10694 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Augment/Auggie", cp, ip}, dry_run,
10695 cbm_remove_editor_mcp_owned);
10696 uninstall_tiered_agent_profiles(
10697 (cbm_tiered_profile_set_t){
10698 .label = "Augment/Auggie",

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected