mirror of
https://github.com/openai/codex.git
synced 2026-08-27 13:49:27 +00:00
## Why Clients need to know whether a `request_user_input` request must wait for an explicit response or may auto-resolve. Using `autoResolutionMs` as that signal conflated the blocking decision with timeout policy. ## What changed - Add required `isBlocking` fields to user input protocol and app-server request payloads. Plan-mode requests are blocking, while requests from other enabled modes are non-blocking. - Drive the TUI's auto-resolution behavior from `isBlocking` and remove `autoResolutionMs` from the model-facing tool schema. - Deprecate `autoResolutionMs` while retaining it for compatibility, and treat legacy payloads without `isBlocking` as blocking. ## Testing - Cover mode-derived blocking behavior, legacy deserialization, app-server forwarding, delegated requests, and TUI auto-resolution. GitOrigin-RevId: 29aade657ef743065ec264376ba567a9b353d7d7
98 lines
2.1 KiB
JSON
Generated
98 lines
2.1 KiB
JSON
Generated
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"ToolRequestUserInputOption": {
|
|
"description": "EXPERIMENTAL. Defines a single selectable option for request_user_input.",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"description",
|
|
"label"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"ToolRequestUserInputQuestion": {
|
|
"description": "EXPERIMENTAL. Represents one request_user_input question and its required options.",
|
|
"properties": {
|
|
"header": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"isOther": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"isSecret": {
|
|
"default": false,
|
|
"type": "boolean"
|
|
},
|
|
"options": {
|
|
"items": {
|
|
"$ref": "#/definitions/ToolRequestUserInputOption"
|
|
},
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
]
|
|
},
|
|
"question": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"header",
|
|
"id",
|
|
"question"
|
|
],
|
|
"type": "object"
|
|
}
|
|
},
|
|
"description": "EXPERIMENTAL. Params sent with a request_user_input event.",
|
|
"properties": {
|
|
"autoResolutionMs": {
|
|
"default": null,
|
|
"description": "@deprecated Use `isBlocking` to decide whether the request should block.",
|
|
"format": "uint64",
|
|
"minimum": 0.0,
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"isBlocking": {
|
|
"type": "boolean"
|
|
},
|
|
"itemId": {
|
|
"type": "string"
|
|
},
|
|
"questions": {
|
|
"items": {
|
|
"$ref": "#/definitions/ToolRequestUserInputQuestion"
|
|
},
|
|
"type": "array"
|
|
},
|
|
"threadId": {
|
|
"type": "string"
|
|
},
|
|
"turnId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"isBlocking",
|
|
"itemId",
|
|
"questions",
|
|
"threadId",
|
|
"turnId"
|
|
],
|
|
"title": "ToolRequestUserInputParams",
|
|
"type": "object"
|
|
} |