feat(app-server): transport permission preset requests

Add the v2 `item/permissionPreset/requestApproval` server request and
thread it through app-server delivery for clients that opt into the
matching `supportedServerRequests` capability.

Keep the flow backward compatible by failing closed when a connection
does not advertise support, reject it explicitly in `codex exec`, and
update the docs, schemas, and request transport tests.
This commit is contained in:
Felipe Coury
2026-04-13 14:45:50 -03:00
parent bbf656dcf3
commit 88e46f7459
19 changed files with 1187 additions and 9 deletions
+12
View File
@@ -1510,6 +1510,18 @@ async fn handle_server_request(
)
.await
}
ServerRequest::PermissionPresetRequestApproval { request_id, params } => {
reject_server_request(
client,
request_id,
&method,
format!(
"permission preset approval is not supported in exec mode for thread `{}`",
params.thread_id
),
)
.await
}
};
if let Err(err) = handle_result {