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

Function uninstall_agent_client_registry

src/cli/cli.c:10177–10238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10175}
10176
10177static void uninstall_agent_client_registry(const char *home, bool dry_run) {
10178 cbm_agent_registry_context_t registry;
10179 cbm_init_agent_registry_context(home, &registry);
10180 char binary_path[CLI_BUF_1K];
10181 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10182 for (size_t index = 0U; index < cbm_agent_client_count(); index++) {
10183 const cbm_agent_client_profile_t *profile = cbm_agent_client_at(index);
10184 if (!profile || !cbm_agent_client_cleanup_candidate(profile->id, &registry.options)) {
10185 continue;
10186 }
10187 printf("%s:\n", profile->display_name);
10188 char config_path[CLI_BUF_1K] = {0};
10189 bool config_resolved = false;
10190 if ((profile->capabilities & CBM_AGENT_CAP_MCP) != 0U) {
10191 int resolved = cbm_agent_client_resolve_path(profile->id, &registry.options,
10192 config_path, sizeof(config_path));
10193 if (resolved != 0 || !profile->remove_mcp) {
10194 record_agent_config_error(true, profile->display_name, "mcp_resolve",
10195 profile->stable_id);
10196 } else {
10197 config_resolved = true;
10198 int edit_result = dry_run
10199 ? CBM_AGENT_EDIT_OK
10200 : profile->remove_mcp(profile->id, config_path, binary_path);
10201 if (edit_result == CBM_AGENT_EDIT_FOREIGN) {
10202 printf(" mcp: preserved modified or foreign entry in %s\n", config_path);
10203 } else if (edit_result != CBM_AGENT_EDIT_OK) {
10204 record_agent_config_error(true, profile->display_name, "mcp_uninstall",
10205 config_path);
10206 } else {
10207 printf(" mcp: removed canonical entry from %s\n", config_path);
10208 }
10209 }
10210 }
10211
10212 if (profile->id == CBM_AGENT_CLIENT_QODER) {
10213 uninstall_qoder_durable_context(home, binary_path, config_path, config_resolved,
10214 dry_run);
10215 } else if (profile->id == CBM_AGENT_CLIENT_KIMI) {
10216 uninstall_kimi_durable_context(&registry, dry_run);
10217 } else if (profile->id == CBM_AGENT_CLIENT_GITLAB_DUO) {
10218 uninstall_gitlab_durable_context(&registry, binary_path, dry_run);
10219 } else if (profile->id == CBM_AGENT_CLIENT_ROVO_DEV) {
10220 uninstall_rovo_durable_context(home, dry_run);
10221 } else if (profile->id == CBM_AGENT_CLIENT_AMP) {
10222 uninstall_amp_durable_context(home, dry_run);
10223 } else if (profile->id == CBM_AGENT_CLIENT_DEVIN) {
10224 uninstall_devin_durable_context(&registry, binary_path, config_path, config_resolved,
10225 dry_run);
10226 } else if (profile->id == CBM_AGENT_CLIENT_CODEBUDDY) {
10227 uninstall_codebuddy_durable_context(home, dry_run);
10228 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_IDE) {
10229 uninstall_bob_durable_context(home, true, dry_run);
10230 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_SHELL) {
10231 uninstall_bob_durable_context(home, false, dry_run);
10232 } else if (profile->id == CBM_AGENT_CLIENT_POCHI) {
10233 uninstall_pochi_durable_context(home, dry_run);
10234 } else if (profile->id == CBM_AGENT_CLIENT_PI) {

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected