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

Function uninstall_agent_client_registry

src/cli/cli.c:10183–10244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected