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

Function uninstall_agent_client_registry

src/cli/cli.c:10804–10865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10802}
10803
10804static void uninstall_agent_client_registry(const char *home, bool dry_run) {
10805 cbm_agent_registry_context_t registry;
10806 cbm_init_agent_registry_context(home, &registry);
10807 char binary_path[CLI_BUF_1K];
10808 cbm_agent_installed_binary_path(home, binary_path, sizeof(binary_path));
10809 for (size_t index = 0U; index < cbm_agent_client_count(); index++) {
10810 const cbm_agent_client_profile_t *profile = cbm_agent_client_at(index);
10811 if (!profile || !cbm_agent_client_cleanup_candidate(profile->id, &registry.options)) {
10812 continue;
10813 }
10814 printf("%s:\n", profile->display_name);
10815 char config_path[CLI_BUF_1K] = {0};
10816 bool config_resolved = false;
10817 if ((profile->capabilities & CBM_AGENT_CAP_MCP) != 0U) {
10818 int resolved = cbm_agent_client_resolve_path(profile->id, &registry.options,
10819 config_path, sizeof(config_path));
10820 if (resolved != 0 || !profile->remove_mcp) {
10821 record_agent_config_error(true, profile->display_name, "mcp_resolve",
10822 profile->stable_id);
10823 } else {
10824 config_resolved = true;
10825 int edit_result = dry_run
10826 ? CBM_AGENT_EDIT_OK
10827 : profile->remove_mcp(profile->id, config_path, binary_path);
10828 if (edit_result == CBM_AGENT_EDIT_FOREIGN) {
10829 printf(" mcp: preserved modified or foreign entry in %s\n", config_path);
10830 } else if (edit_result != CBM_AGENT_EDIT_OK) {
10831 record_agent_config_error(true, profile->display_name, "mcp_uninstall",
10832 config_path);
10833 } else {
10834 printf(" mcp: removed canonical entry from %s\n", config_path);
10835 }
10836 }
10837 }
10838
10839 if (profile->id == CBM_AGENT_CLIENT_QODER) {
10840 uninstall_qoder_durable_context(home, binary_path, config_path, config_resolved,
10841 dry_run);
10842 } else if (profile->id == CBM_AGENT_CLIENT_KIMI) {
10843 uninstall_kimi_durable_context(&registry, dry_run);
10844 } else if (profile->id == CBM_AGENT_CLIENT_GITLAB_DUO) {
10845 uninstall_gitlab_durable_context(&registry, binary_path, dry_run);
10846 } else if (profile->id == CBM_AGENT_CLIENT_ROVO_DEV) {
10847 uninstall_rovo_durable_context(home, dry_run);
10848 } else if (profile->id == CBM_AGENT_CLIENT_AMP) {
10849 uninstall_amp_durable_context(home, dry_run);
10850 } else if (profile->id == CBM_AGENT_CLIENT_DEVIN) {
10851 uninstall_devin_durable_context(&registry, binary_path, config_path, config_resolved,
10852 dry_run);
10853 } else if (profile->id == CBM_AGENT_CLIENT_CODEBUDDY) {
10854 uninstall_codebuddy_durable_context(home, dry_run);
10855 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_IDE) {
10856 uninstall_bob_durable_context(home, true, dry_run);
10857 } else if (profile->id == CBM_AGENT_CLIENT_IBM_BOB_SHELL) {
10858 uninstall_bob_durable_context(home, false, dry_run);
10859 } else if (profile->id == CBM_AGENT_CLIENT_POCHI) {
10860 uninstall_pochi_durable_context(home, dry_run);
10861 } else if (profile->id == CBM_AGENT_CLIENT_PI) {

Callers 1

cli_uninstall_activateFunction · 0.85

Tested by

no test coverage detected