Use batch metadata for plugin app summaries (#34851)

## What changed

- Load app metadata for plugin read and install responses through the authenticated batch API, splitting requests into batches of 100 and retaining cached metadata if a batch fails.
- Preserve every declared app in plugin responses, using its ID as the fallback name and retaining categories from the plugin declaration when metadata is unavailable.
- Add `isEnabled`, `disabledReason`, and `isReadOnly` to `AppToolSummary`, with defaults that keep legacy responses compatible.

## Testing

- Cover plugin reads with more than 100 apps, partial batch failures, install-time authentication results, tool-state propagation, and legacy tool summaries.

GitOrigin-RevId: 14000df9c5c94dde781358e292a8bef741c5dd23
This commit is contained in:
stevenlee-oai
2026-07-23 01:00:35 +00:00
committed by copyberry
parent 0a0a9b6c8f
commit b72079a2cf
15 changed files with 549 additions and 239 deletions
@@ -6853,6 +6853,20 @@
"description": {
"type": "string"
},
"disabledReason": {
"type": [
"string",
"null"
]
},
"isEnabled": {
"default": true,
"type": "boolean"
},
"isReadOnly": {
"default": false,
"type": "boolean"
},
"name": {
"type": "string"
},
@@ -869,6 +869,20 @@
"description": {
"type": "string"
},
"disabledReason": {
"type": [
"string",
"null"
]
},
"isEnabled": {
"default": true,
"type": "boolean"
},
"isReadOnly": {
"default": false,
"type": "boolean"
},
"name": {
"type": "string"
},
@@ -7,6 +7,20 @@
"description": {
"type": "string"
},
"disabledReason": {
"type": [
"string",
"null"
]
},
"isEnabled": {
"default": true,
"type": "boolean"
},
"isReadOnly": {
"default": false,
"type": "boolean"
},
"name": {
"type": "string"
},
@@ -5,4 +5,4 @@
/**
* EXPERIMENTAL - metadata returned by app/read.
*/
export type AppToolSummary = { name: string, title: string | null, description: string, };
export type AppToolSummary = { name: string, title: string | null, description: string, isEnabled: boolean, disabledReason: string | null, isReadOnly: boolean, };
@@ -190,6 +190,11 @@ pub struct AppToolSummary {
pub name: String,
pub title: Option<String>,
pub description: String,
#[serde(default = "default_enabled")]
pub is_enabled: bool,
pub disabled_reason: Option<String>,
#[serde(default)]
pub is_read_only: bool,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]