mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
Promote auth elicitation
This commit is contained in:
@@ -5499,13 +5499,6 @@ async fn to_mcp_config_preserves_auth_elicitation_feature_from_config() -> std::
|
||||
.await?;
|
||||
let plugins_manager = PluginsManager::new(codex_home.path().to_path_buf());
|
||||
|
||||
let mcp_config = config.to_mcp_config(&plugins_manager).await;
|
||||
assert_eq!(
|
||||
mcp_config.client_elicitation_capability,
|
||||
ElicitationCapability::default()
|
||||
);
|
||||
|
||||
let _ = config.features.enable(Feature::AuthElicitation);
|
||||
let mcp_config = config.to_mcp_config(&plugins_manager).await;
|
||||
assert_eq!(
|
||||
mcp_config.client_elicitation_capability,
|
||||
@@ -5515,6 +5508,13 @@ async fn to_mcp_config_preserves_auth_elicitation_feature_from_config() -> std::
|
||||
}
|
||||
);
|
||||
|
||||
let _ = config.features.disable(Feature::AuthElicitation);
|
||||
let mcp_config = config.to_mcp_config(&plugins_manager).await;
|
||||
assert_eq!(
|
||||
mcp_config.client_elicitation_capability,
|
||||
ElicitationCapability::default()
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
@@ -1283,7 +1283,12 @@ async fn install_host_owned_codex_apps_manager(session: &Session, turn_context:
|
||||
|
||||
#[tokio::test]
|
||||
async fn codex_apps_auth_elicitation_feature_disabled_returns_original_result() {
|
||||
let (session, turn_context, rx_event) = make_session_and_context_with_rx().await;
|
||||
let (session, mut turn_context, rx_event) = make_session_and_context_with_rx().await;
|
||||
let mut features = Features::with_defaults();
|
||||
features.disable(Feature::AuthElicitation);
|
||||
Arc::get_mut(&mut turn_context)
|
||||
.expect("single turn context ref")
|
||||
.features = ManagedFeatures::from(features);
|
||||
install_host_owned_codex_apps_manager(&session, &turn_context).await;
|
||||
let result = codex_apps_auth_failure_result();
|
||||
let metadata = codex_apps_auth_failure_metadata();
|
||||
|
||||
@@ -1138,8 +1138,8 @@ pub const FEATURES: &[FeatureSpec] = &[
|
||||
FeatureSpec {
|
||||
id: Feature::AuthElicitation,
|
||||
key: "auth_elicitation",
|
||||
stage: Stage::UnderDevelopment,
|
||||
default_enabled: false,
|
||||
stage: Stage::Stable,
|
||||
default_enabled: true,
|
||||
},
|
||||
FeatureSpec {
|
||||
id: Feature::Personality,
|
||||
|
||||
@@ -302,9 +302,9 @@ fn tool_call_mcp_elicitation_is_stable_and_enabled_by_default() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn auth_elicitation_is_under_development() {
|
||||
assert_eq!(Feature::AuthElicitation.stage(), Stage::UnderDevelopment);
|
||||
assert_eq!(Feature::AuthElicitation.default_enabled(), false);
|
||||
fn auth_elicitation_is_stable_and_enabled_by_default() {
|
||||
assert_eq!(Feature::AuthElicitation.stage(), Stage::Stable);
|
||||
assert_eq!(Feature::AuthElicitation.default_enabled(), true);
|
||||
assert_eq!(
|
||||
feature_for_key("auth_elicitation"),
|
||||
Some(Feature::AuthElicitation)
|
||||
|
||||
Reference in New Issue
Block a user