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

Function uninstall_additional_agents

src/cli/cli.c:10579–10829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10577}
10578
10579static void uninstall_additional_agents(const cbm_detected_agents_t *agents, const char *home,
10580 bool dry_run) {
10581 char installed_binary[CLI_BUF_1K];
10582 cbm_agent_installed_binary_path(home, installed_binary, sizeof(installed_binary));
10583 if (agents->hermes) {
10584 char hermes_home[CLI_BUF_1K];
10585 char cp[CLI_BUF_1K];
10586 char skills_dir[CLI_BUF_1K];
10587 char binary_path[CLI_BUF_1K];
10588 cbm_hermes_home_dir(home, hermes_home, sizeof(hermes_home));
10589 snprintf(cp, sizeof(cp), "%s/config.yaml", hermes_home);
10590 snprintf(skills_dir, sizeof(skills_dir), "%s/skills", hermes_home);
10591 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10592 int hook_result =
10593 dry_run ? CBM_YAML_IDENTITY_EDIT_OK : cbm_remove_hermes_context_hook(cp, binary_path);
10594 if (hook_result == CBM_YAML_IDENTITY_EDIT_FOREIGN) {
10595 printf(" hook: preserved modified pre_llm_call entry\n");
10596 } else if (hook_result != CBM_YAML_IDENTITY_EDIT_OK) {
10597 record_agent_config_error(true, "Hermes", "pre_llm_hook_uninstall", cp);
10598 } else {
10599 printf(" hook: removed canonical pre_llm_call entry\n");
10600 }
10601 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Hermes", cp, NULL}, dry_run,
10602 cbm_remove_hermes_mcp_owned);
10603 uninstall_agent_skill("Hermes", skills_dir, dry_run);
10604 }
10605 if (agents->openhands) {
10606 char cp[CLI_BUF_1K];
10607 char skills_dir[CLI_BUF_1K];
10608 snprintf(cp, sizeof(cp), "%s/.openhands/mcp.json", home);
10609 snprintf(skills_dir, sizeof(skills_dir), "%s/.agents/skills", home);
10610 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"OpenHands", cp, NULL}, dry_run,
10611 cbm_remove_editor_mcp_owned);
10612 printf(" removed %d skill(s)\n", cbm_remove_skills(skills_dir, dry_run));
10613 }
10614 if (agents->augment) {
10615 char cp[CLI_BUF_1K];
10616 char ip[CLI_BUF_1K];
10617 char ap[CLI_BUF_1K];
10618 char session_hp[CLI_BUF_1K];
10619 char coverage_hp[CLI_BUF_1K];
10620 char binary_path[CLI_BUF_1K];
10621 snprintf(cp, sizeof(cp), "%s/.augment/settings.json", home);
10622 snprintf(ip, sizeof(ip), "%s/.augment/rules/codebase-memory.md", home);
10623 snprintf(ap, sizeof(ap), "%s/.augment/agents/codebase-memory.md", home);
10624 snprintf(session_hp, sizeof(session_hp), "%s/.augment/hooks/%s", home,
10625 AUGMENT_SESSION_SCRIPT);
10626 snprintf(coverage_hp, sizeof(coverage_hp), "%s/.augment/hooks/%s", home,
10627 AUGMENT_COVERAGE_SCRIPT);
10628 /* The owned-document match must rebuild the scripts with the exact
10629 * binary path the install embedded — the managed canonical plain form
10630 * on Windows, not a hand-assembled default. */
10631 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10632 uninstall_agent_mcp_instr((mcp_uninstall_args_t){"Augment/Auggie", cp, ip}, dry_run,
10633 cbm_remove_editor_mcp_owned);
10634 uninstall_tiered_agent_profiles(
10635 (cbm_tiered_profile_set_t){
10636 .label = "Augment/Auggie",

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected