mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:00:42 +00:00
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:
+14
@@ -6853,6 +6853,20 @@
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"disabledReason": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"isEnabled": {
|
||||
"default": true,
|
||||
"type": "boolean"
|
||||
},
|
||||
"isReadOnly": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
+14
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user