mirror of
https://github.com/openai/codex.git
synced 2026-04-25 15:15:15 +00:00
Thread `suggestedScope` through the app-server permission approval request and use it when constructing TUI approval requests. This keeps the protocol backward compatible by defaulting the field to `turn` when older clients omit it. Add focused app-server and TUI coverage, plus a snapshot for the session-suggested approval overlay so reviewers can see the preselected session row.
112 lines
2.5 KiB
JSON
112 lines
2.5 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"definitions": {
|
|
"AbsolutePathBuf": {
|
|
"description": "A path that is guaranteed to be absolute and normalized (though it is not guaranteed to be canonicalized or exist on the filesystem).\n\nIMPORTANT: When deserializing an `AbsolutePathBuf`, a base path must be set using [AbsolutePathBufGuard::new]. If no base path is set, the deserialization will fail unless the path being deserialized is already absolute.",
|
|
"type": "string"
|
|
},
|
|
"AdditionalFileSystemPermissions": {
|
|
"properties": {
|
|
"read": {
|
|
"items": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
]
|
|
},
|
|
"write": {
|
|
"items": {
|
|
"$ref": "#/definitions/AbsolutePathBuf"
|
|
},
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"AdditionalNetworkPermissions": {
|
|
"properties": {
|
|
"enabled": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"PermissionGrantScope": {
|
|
"enum": [
|
|
"turn",
|
|
"session"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"RequestPermissionProfile": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"fileSystem": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/AdditionalFileSystemPermissions"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"network": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/AdditionalNetworkPermissions"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
},
|
|
"properties": {
|
|
"itemId": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/RequestPermissionProfile"
|
|
},
|
|
"reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"suggestedScope": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/PermissionGrantScope"
|
|
}
|
|
],
|
|
"default": "turn"
|
|
},
|
|
"threadId": {
|
|
"type": "string"
|
|
},
|
|
"turnId": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"itemId",
|
|
"permissions",
|
|
"threadId",
|
|
"turnId"
|
|
],
|
|
"title": "PermissionsRequestApprovalParams",
|
|
"type": "object"
|
|
} |