mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +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:
@@ -3770,6 +3770,7 @@ pub struct McpStartupFailure {
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[ts(rename_all = "snake_case")]
|
||||
pub enum McpAuthStatus {
|
||||
Unknown,
|
||||
Unsupported,
|
||||
NotLoggedIn,
|
||||
BearerToken,
|
||||
@@ -3779,6 +3780,7 @@ pub enum McpAuthStatus {
|
||||
impl fmt::Display for McpAuthStatus {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
let text = match self {
|
||||
McpAuthStatus::Unknown => "Unknown",
|
||||
McpAuthStatus::Unsupported => "Unsupported",
|
||||
McpAuthStatus::NotLoggedIn => "Not logged in",
|
||||
McpAuthStatus::BearerToken => "Bearer token",
|
||||
|
||||
Reference in New Issue
Block a user