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

Function uninstall_agent_client_registry

src/cli/cli.c:10133–10194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10131}
10132
10133static void uninstall_agent_client_registry(const char *home, bool dry_run) {
10134 cbm_agent_registry_context_t registry;
10135 cbm_init_agent_registry_context(home, &registry);
10136 char binary_path[CLI_BUF_1K];
10137 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10138 for (size_t index = 0U; index < cbm_agent_client_count(); index++) {
10139 const cbm_agent_client_profile_t *profile = cbm_agent_client_at(index);
10140 if (!profile || !cbm_agent_client_cleanup_candidate(profile->id, &registry.options)) {
10141 continue;
10142 }
10143 printf("%s:\n", profile->display_name);
10144 char config_path[CLI_BUF_1K] = {0};
10145 bool config_resolved = false;
10146 if ((profile->capabilities & CBM_AGENT_CAP_MCP) != 0U) {
10147 int resolved = cbm_agent_client_resolve_path(profile->id, &registry.options,
10148 config_path, sizeof(config_path));
10149 if (resolved != 0 || !profile->remove_mcp) {
10150 record_agent_config_error(true, profile->display_name, "mcp_resolve",
10151 profile->stable_id);
10152 } else {
10153 config_resolved = true;
10154 int edit_result = dry_run
10155 ? CBM_AGENT_EDIT_OK
10156 : profile->remove_mcp(profile->id, config_path, binary_path);
10157 if (edit_result == CBM_AGENT_EDIT_FOREIGN) {
10158 printf(" mcp: preserved modified or foreign entry in %s\n", config_path);
10159 } else if (edit_result != CBM_AGENT_EDIT_OK) {
10160 record_agent_config_error(true, profile->display_name, "mcp_uninstall",
10161 config_path);
10162 } else {
10163 printf(" mcp: removed canonical entry from %s\n", config_path);
10164 }
10165 }
10166 }
10167
10168 if (profile->id == CBM_AGENT_CLIENT_QODER) {
10169 uninstall_qoder_durable_context(home, binary_path, config_path, config_resolved,
10170 dry_run);
10171 } else if (profile->id == CBM_AGENT_CLIENT_KIMI) {
10172 uninstall_kimi_durable_context(&registry, dry_run);
10173 } else if (profile->id == CBM_AGENT_CLIENT_GITLAB_DUO) {
10174 uninstall_gitlab_durable_context(&registry, binary_path, dry_run);
10175 } else if (profile->id == CBM_AGENT_CLIENT_ROVO_DEV) {
10176 uninstall_rovo_durable_context(home, dry_run);
10177 } else if (profile->id == CBM_AGENT_CLIENT_AMP) {
10178 uninstall_amp_durable_context(home, dry_run);
10179 } else if (profile->id == CBM_AGENT_CLIENT_DEVIN) {
10180 uninstall_devin_durable_context(&registry, binary_path, config_path, config_resolved,
10181 dry_run);
10182 } else if (profile->id == CBM_AGENT_CLIENT_CODEBUDDY) {
10183 uninstall_codebuddy_durable_context(home, dry_run);
10184 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_IDE) {
10185 uninstall_bob_durable_context(home, true, dry_run);
10186 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_SHELL) {
10187 uninstall_bob_durable_context(home, false, dry_run);
10188 } else if (profile->id == CBM_AGENT_CLIENT_POCHI) {
10189 uninstall_pochi_durable_context(home, dry_run);
10190 } else if (profile->id == CBM_AGENT_CLIENT_PI) {

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected