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

Function uninstall_additional_agents

src/cli/cli.c:10585–10835  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected