mirror of
https://github.com/openai/codex.git
synced 2026-04-25 07:05:38 +00:00
Add the `supportedServerRequests` initialize capability across the app-server protocol, clients, and connection session state. This lets surfaces explicitly advertise which conversational permission approval requests they know how to receive. Keep this branch limited to the opt-in contract and the bookkeeping needed to store that capability per connection. Delivery and UI handling stay in later stacked PRs so existing clients remain backward compatible and the review surface stays small.
85 lines
2.0 KiB
JSON
85 lines
2.0 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"ClientInfo": {
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"version"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"InitializeCapabilities": {
|
|
"description": "Client-declared capabilities negotiated during initialize.",
|
|
"properties": {
|
|
"experimentalApi": {
|
|
"default": false,
|
|
"description": "Opt into receiving experimental API methods and fields.",
|
|
"type": "boolean"
|
|
},
|
|
"optOutNotificationMethods": {
|
|
"description": "Exact notification method names that should be suppressed for this connection (for example `thread/started`).",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
]
|
|
},
|
|
"supportedServerRequests": {
|
|
"description": "Server request methods this connection knows how to render and answer.",
|
|
"items": {
|
|
"$ref": "#/definitions/SupportedServerRequestMethod"
|
|
},
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"SupportedServerRequestMethod": {
|
|
"description": "Server-initiated request methods a client can opt into during initialize.",
|
|
"enum": [
|
|
"item/permissions/requestApproval",
|
|
"item/permissionPreset/requestApproval"
|
|
],
|
|
"type": "string"
|
|
}
|
|
},
|
|
"properties": {
|
|
"capabilities": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/InitializeCapabilities"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"clientInfo": {
|
|
"$ref": "#/definitions/ClientInfo"
|
|
}
|
|
},
|
|
"required": [
|
|
"clientInfo"
|
|
],
|
|
"title": "InitializeParams",
|
|
"type": "object"
|
|
} |