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

Function uninstall_agent_client_registry

src/cli/cli.c:10577–10638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10575}
10576
10577static void uninstall_agent_client_registry(const char *home, bool dry_run) {
10578 cbm_agent_registry_context_t registry;
10579 cbm_init_agent_registry_context(home, &registry);
10580 char binary_path[CLI_BUF_1K];
10581 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10582 for (size_t index = 0U; index < cbm_agent_client_count(); index++) {
10583 const cbm_agent_client_profile_t *profile = cbm_agent_client_at(index);
10584 if (!profile || !cbm_agent_client_cleanup_candidate(profile->id, &registry.options)) {
10585 continue;
10586 }
10587 printf("%s:\n", profile->display_name);
10588 char config_path[CLI_BUF_1K] = {0};
10589 bool config_resolved = false;
10590 if ((profile->capabilities & CBM_AGENT_CAP_MCP) != 0U) {
10591 int resolved = cbm_agent_client_resolve_path(profile->id, &registry.options,
10592 config_path, sizeof(config_path));
10593 if (resolved != 0 || !profile->remove_mcp) {
10594 record_agent_config_error(true, profile->display_name, "mcp_resolve",
10595 profile->stable_id);
10596 } else {
10597 config_resolved = true;
10598 int edit_result = dry_run
10599 ? CBM_AGENT_EDIT_OK
10600 : profile->remove_mcp(profile->id, config_path, binary_path);
10601 if (edit_result == CBM_AGENT_EDIT_FOREIGN) {
10602 printf(" mcp: preserved modified or foreign entry in %s\n", config_path);
10603 } else if (edit_result != CBM_AGENT_EDIT_OK) {
10604 record_agent_config_error(true, profile->display_name, "mcp_uninstall",
10605 config_path);
10606 } else {
10607 printf(" mcp: removed canonical entry from %s\n", config_path);
10608 }
10609 }
10610 }
10611
10612 if (profile->id == CBM_AGENT_CLIENT_QODER) {
10613 uninstall_qoder_durable_context(home, binary_path, config_path, config_resolved,
10614 dry_run);
10615 } else if (profile->id == CBM_AGENT_CLIENT_KIMI) {
10616 uninstall_kimi_durable_context(&registry, dry_run);
10617 } else if (profile->id == CBM_AGENT_CLIENT_GITLAB_DUO) {
10618 uninstall_gitlab_durable_context(&registry, binary_path, dry_run);
10619 } else if (profile->id == CBM_AGENT_CLIENT_ROVO_DEV) {
10620 uninstall_rovo_durable_context(home, dry_run);
10621 } else if (profile->id == CBM_AGENT_CLIENT_AMP) {
10622 uninstall_amp_durable_context(home, dry_run);
10623 } else if (profile->id == CBM_AGENT_CLIENT_DEVIN) {
10624 uninstall_devin_durable_context(&registry, binary_path, config_path, config_resolved,
10625 dry_run);
10626 } else if (profile->id == CBM_AGENT_CLIENT_CODEBUDDY) {
10627 uninstall_codebuddy_durable_context(home, dry_run);
10628 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_IDE) {
10629 uninstall_bob_durable_context(home, true, dry_run);
10630 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_SHELL) {
10631 uninstall_bob_durable_context(home, false, dry_run);
10632 } else if (profile->id == CBM_AGENT_CLIENT_POCHI) {
10633 uninstall_pochi_durable_context(home, dry_run);
10634 } else if (profile->id == CBM_AGENT_CLIENT_PI) {

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected