feat: Normalize remote plugin summary identities. (#22265)

Makes plugin summaries use config-style plugin@marketplace IDs while
exposing backend remote IDs separately as remotePluginId.

Also fix the consistency issue of REMOTE_SHARED_WITH_ME_MARKETPLACE_NAME
This commit is contained in:
xl-openai
2026-05-12 00:58:37 -07:00
committed by GitHub
Unverified
parent 46f30d0282
commit 5b1a4c2fa7
17 changed files with 209 additions and 44 deletions
@@ -538,6 +538,8 @@ pub enum PluginAvailability {
#[ts(export_to = "v2/")]
pub struct PluginSummary {
pub id: String,
/// Backend remote plugin identifier when available.
pub remote_plugin_id: Option<String>,
pub name: String,
/// Remote sharing context associated with this plugin when available.
pub share_context: Option<PluginShareContext>,
@@ -3003,7 +3003,10 @@ fn plugin_share_list_response_serializes_share_items() {
serde_json::to_value(PluginShareListResponse {
data: vec![PluginShareListItem {
plugin: PluginSummary {
id: "plugins~Plugin_00000000000000000000000000000000".to_string(),
id: "gmail@chatgpt-global".to_string(),
remote_plugin_id: Some(
"plugins~Plugin_00000000000000000000000000000000".to_string(),
),
name: "gmail".to_string(),
share_context: None,
source: PluginSource::Remote,
@@ -3022,7 +3025,8 @@ fn plugin_share_list_response_serializes_share_items() {
json!({
"data": [{
"plugin": {
"id": "plugins~Plugin_00000000000000000000000000000000",
"id": "gmail@chatgpt-global",
"remotePluginId": "plugins~Plugin_00000000000000000000000000000000",
"name": "gmail",
"shareContext": null,
"source": { "type": "remote" },