Add remote plugin uninstall API (#19456)

## Summary
- Adds the remote `plugin/uninstall` request form using required
`pluginId` plus optional `remoteMarketplaceName`, while preserving local
`pluginId` uninstall.
- Adds `codex_core_plugins::remote::uninstall_remote_plugin` for the
deployed ChatGPT plugin backend uninstall path and validates the backend
returns the same id with `enabled: false`.
- Routes app-server remote uninstall through feature checks, remote
plugin id validation, backend mutation, local downloaded cache deletion,
cache clearing, docs, and regenerated protocol schemas.

## Tests
- `just write-app-server-schema`
- `just fmt`
- `cargo test -p codex-app-server-protocol
plugin_uninstall_params_serialization_omits_force_remote_sync`
- `cargo test -p codex-app-server plugin_uninstall --test all`
- `cargo test -p codex-app-server plugin_uninstall`
- `cargo build -p codex-cli`
- `CODEX_BIN=/Users/xli/code/codex/codex-rs/target/debug/codex python3
/Users/xli/.codex/skills/xli-test-marketplace-api/scripts/run_marketplace_api_matrix.py`
(44 pass / 0 fail)
- `just fix -p codex-app-server-protocol -p codex-app-server -p
codex-tui`
- `just fix -p codex-app-server`
This commit is contained in:
xli-oai
2026-04-28 03:27:53 -07:00
committed by GitHub
parent 7d72fc8f53
commit 803705f795
5 changed files with 701 additions and 12 deletions

View File

@@ -10305,6 +10305,27 @@ mod tests {
plugin_id: "gmail@openai-curated".to_string(),
},
);
assert_eq!(
serde_json::to_value(PluginUninstallParams {
plugin_id: "plugins~Plugin_gmail".to_string(),
})
.unwrap(),
json!({
"pluginId": "plugins~Plugin_gmail",
}),
);
assert_eq!(
serde_json::from_value::<PluginUninstallParams>(json!({
"pluginId": "plugins~Plugin_gmail",
"forceRemoteSync": true,
}))
.unwrap(),
PluginUninstallParams {
plugin_id: "plugins~Plugin_gmail".to_string(),
},
);
}
#[test]