mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Distinguish unknown MCP authentication status (#36045)
## Why OAuth discovery failures do not establish that an MCP server lacks OAuth support. Reporting those failures as `unsupported` conflates an inconclusive check with a confirmed result. ## What changed - Add an `unknown` MCP authentication status across the protocol, app server, CLI, and TUI. - Preserve OAuth discovery errors so callers can report `unknown`, while retaining `unsupported` for servers known not to support OAuth. - Document the distinction in the app server API. ## Testing - Verify transient HTTP discovery errors are preserved. - Verify `codex mcp list --json` reports `unknown` when discovery is rate limited. GitOrigin-RevId: e4562985971606740538e542ec7eeee502111964
This commit is contained in:
1 parent
6493417150
commit
7ec480dda5
16 files changed
+58
-12
No files matched your search
@@ -16,6 +16,7 @@ impl HistoryCell for McpImageOutputCell {
|
||||
}
|
||||
fn mcp_auth_status_label(status: McpAuthStatus) -> &'static str {
|
||||
match status {
|
||||
McpAuthStatus::Unknown => "Unknown",
|
||||
McpAuthStatus::Unsupported => "Unsupported",
|
||||
McpAuthStatus::NotLoggedIn => "Not logged in",
|
||||
McpAuthStatus::BearerToken => "Bearer token",
|
||||
@@ -545,6 +546,7 @@ pub(crate) fn new_mcp_tools_output_from_statuses(
|
||||
|
||||
lines.push(header.into());
|
||||
let auth_status = match status.auth_status {
|
||||
codex_app_server_protocol::McpAuthStatus::Unknown => McpAuthStatus::Unknown,
|
||||
codex_app_server_protocol::McpAuthStatus::Unsupported => McpAuthStatus::Unsupported,
|
||||
codex_app_server_protocol::McpAuthStatus::NotLoggedIn => McpAuthStatus::NotLoggedIn,
|
||||
codex_app_server_protocol::McpAuthStatus::BearerToken => McpAuthStatus::BearerToken,
|
||||
|
||||
+1
-1
@@ -7,5 +7,5 @@ expression: rendered
|
||||
🔌 MCP Tools
|
||||
|
||||
• plugin_docs
|
||||
• Auth: Unsupported
|
||||
• Auth: Unknown
|
||||
• Tools: lookup
|
||||
@@ -980,7 +980,7 @@ fn mcp_tools_output_from_statuses_renders_status_only_servers() {
|
||||
)]),
|
||||
resources: Vec::new(),
|
||||
resource_templates: Vec::new(),
|
||||
auth_status: codex_app_server_protocol::McpAuthStatus::Unsupported,
|
||||
auth_status: codex_app_server_protocol::McpAuthStatus::Unknown,
|
||||
}];
|
||||
|
||||
let cell =
|
||||
|
||||
Reference in new issue
Block a user