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

Function uninstall_agent_client_registry

src/cli/cli.c:12098–12161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12096}
12097
12098static void uninstall_agent_client_registry(const char *home, bool dry_run) {
12099 cbm_agent_registry_context_t registry;
12100 cbm_init_agent_registry_context(home, &registry);
12101 char binary_path[CLI_BUF_1K];
12102 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
12103 for (size_t index = 0U; index < cbm_agent_client_count(); index++) {
12104 const cbm_agent_client_profile_t *profile = cbm_agent_client_at(index);
12105 if (!profile || !cbm_agent_client_cleanup_candidate(profile->id, &registry.options)) {
12106 continue;
12107 }
12108 printf("%s:\n", profile->display_name);
12109 char config_path[CLI_BUF_1K] = {0};
12110 bool config_resolved = false;
12111 if ((profile->capabilities & CBM_AGENT_CAP_MCP) != 0U) {
12112 int resolved = cbm_agent_client_resolve_path(profile->id, &registry.options,
12113 config_path, sizeof(config_path));
12114 if (resolved != 0 || !profile->remove_mcp) {
12115 record_agent_config_error(true, profile->display_name, "mcp_resolve",
12116 profile->stable_id);
12117 } else {
12118 config_resolved = true;
12119 int edit_result = dry_run
12120 ? CBM_AGENT_EDIT_OK
12121 : profile->remove_mcp(profile->id, config_path, binary_path);
12122 if (edit_result == CBM_AGENT_EDIT_FOREIGN) {
12123 printf(" mcp: preserved modified or foreign entry in %s\n", config_path);
12124 } else if (edit_result != CBM_AGENT_EDIT_OK) {
12125 record_agent_config_error(true, profile->display_name, "mcp_uninstall",
12126 config_path);
12127 } else {
12128 printf(" mcp: removed canonical entry from %s\n", config_path);
12129 }
12130 }
12131 }
12132
12133 if (profile->id == CBM_AGENT_CLIENT_QODER) {
12134 uninstall_qoder_durable_context(home, binary_path, config_path, config_resolved,
12135 dry_run);
12136 } else if (profile->id == CBM_AGENT_CLIENT_KIMI) {
12137 uninstall_kimi_durable_context(&registry, dry_run);
12138 } else if (profile->id == CBM_AGENT_CLIENT_GITLAB_DUO) {
12139 uninstall_gitlab_durable_context(&registry, binary_path, dry_run);
12140 } else if (profile->id == CBM_AGENT_CLIENT_ROVO_DEV) {
12141 uninstall_rovo_durable_context(home, dry_run);
12142 } else if (profile->id == CBM_AGENT_CLIENT_AMP) {
12143 uninstall_amp_durable_context(home, dry_run);
12144 } else if (profile->id == CBM_AGENT_CLIENT_DEVIN) {
12145 uninstall_devin_durable_context(&registry, binary_path, config_path, config_resolved,
12146 dry_run);
12147 } else if (profile->id == CBM_AGENT_CLIENT_CODEBUDDY) {
12148 uninstall_codebuddy_durable_context(home, dry_run);
12149 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_IDE) {
12150 uninstall_bob_durable_context(home, true, dry_run);
12151 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_SHELL) {
12152 uninstall_bob_durable_context(home, false, dry_run);
12153 } else if (profile->id == CBM_AGENT_CLIENT_POCHI) {
12154 uninstall_pochi_durable_context(home, dry_run);
12155 } else if (profile->id == CBM_AGENT_CLIENT_PI) {

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected