mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Annotate MCP UI capability arguments
This commit is contained in:
@@ -862,7 +862,7 @@ impl TurnRequestProcessor {
|
||||
.set_app_server_client_info(
|
||||
app_server_client_name,
|
||||
app_server_client_version,
|
||||
None,
|
||||
/*supports_mcp_app_ui_webview*/ None,
|
||||
mcp_elicitations_auto_deny,
|
||||
)
|
||||
.await
|
||||
|
||||
@@ -103,7 +103,7 @@ mod tests {
|
||||
MCP_CLIENT_CAPABILITIES_META_KEY: {"spoofed": true},
|
||||
"caller": "preserved",
|
||||
})),
|
||||
true,
|
||||
/*supports_mcp_app_ui_webview*/ true,
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
@@ -131,7 +131,7 @@ mod tests {
|
||||
MCP_CLIENT_CAPABILITIES_META_KEY: {"spoofed": true},
|
||||
"caller": "preserved",
|
||||
})),
|
||||
false,
|
||||
/*supports_mcp_app_ui_webview*/ false,
|
||||
),
|
||||
Some(json!({"caller": "preserved"}))
|
||||
);
|
||||
@@ -140,7 +140,10 @@ mod tests {
|
||||
#[test]
|
||||
fn invalid_caller_metadata_does_not_suppress_trusted_capabilities() {
|
||||
assert_eq!(
|
||||
with_client_capabilities_meta(Some(json!("invalid")), true),
|
||||
with_client_capabilities_meta(
|
||||
Some(json!("invalid")),
|
||||
/*supports_mcp_app_ui_webview*/ true,
|
||||
),
|
||||
Some(json!({
|
||||
MCP_CLIENT_CAPABILITIES_META_KEY: {
|
||||
"extensions": {
|
||||
|
||||
@@ -7854,7 +7854,7 @@ async fn request_scoped_host_mcp_app_ui_capability_survives_later_session_update
|
||||
let (session, _) = make_session_and_context().await;
|
||||
let session = Arc::new(session);
|
||||
let widget_turn_context = session
|
||||
.new_default_turn_with_mcp_app_ui_webview_support(true)
|
||||
.new_default_turn_with_mcp_app_ui_webview_support(/*supports_mcp_app_ui_webview*/ true)
|
||||
.await
|
||||
.expect("capture widget client turn context");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user