mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Allow hosted Apps MCP contributions to override the protocol mode (#46019)
## What changed Add an optional `protocol_mode` to `McpServerContribution::HostedApps` and apply it when registering the server. Preserve the hosted Apps default when no override is provided. ## Testing Add an integration test that selects MCP `2026-07-28` with the global feature disabled and completes a native user verification flow, including resuming the tool call with the verification response. Extend capability tests to confirm that the override preserves hosted Apps user verification without granting it to ordinary extension registrations. GitOrigin-RevId: e8662c45f964c00b0bb4503bbcfd8432d7e2fa70
This commit is contained in:
1 parent
fc2ea82e7e
commit
6d75b525ea
10 files changed
+224
-29
No files matched your search
@@ -197,14 +197,19 @@ impl McpManager {
|
||||
.with_protocol_mode(protocol_mode),
|
||||
)));
|
||||
}
|
||||
McpServerContribution::HostedApps { config } => {
|
||||
overlays.push(OrderedMcpOverlay::Set(Box::new(
|
||||
McpServerRegistration::from_hosted_apps(
|
||||
contributor.id(),
|
||||
contribution_order,
|
||||
*config,
|
||||
),
|
||||
)));
|
||||
McpServerContribution::HostedApps {
|
||||
config,
|
||||
protocol_mode,
|
||||
} => {
|
||||
let mut registration = McpServerRegistration::from_hosted_apps(
|
||||
contributor.id(),
|
||||
contribution_order,
|
||||
*config,
|
||||
);
|
||||
if let Some(protocol_mode) = protocol_mode {
|
||||
registration = registration.with_protocol_mode(protocol_mode);
|
||||
}
|
||||
overlays.push(OrderedMcpOverlay::Set(Box::new(registration)));
|
||||
}
|
||||
McpServerContribution::SelectedPlugin { ref plugin_id, .. }
|
||||
if disabled_plugin_ids.contains(plugin_id) => {}
|
||||
|
||||
Reference in new issue
Block a user