Lightweight coding agent that runs in your terminal
Rust
Add a managed gate for in-app local automation (#40436)
Shijie Rao7781f0a5a80c
diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.jsonindex f8a17fe6d4..8e278bdcae 100644--- a/codex-rs/core/config.schema.json+++ b/codex-rs/core/config.schema.json@@ -751,6 +751,9 @@"in_app_dictation": {"type": "boolean"},+ "in_app_local_automation": {+ "type": "boolean"+ },"in_app_updates": {"type": "boolean"},@@ -5724,6 +5727,9 @@"in_app_dictation": {"type": "boolean"},+ "in_app_local_automation": {+ "type": "boolean"+ },"in_app_updates": {"type": "boolean"},diff --git a/codex-rs/core/src/config/config_tests.rs b/codex-rs/core/src/config/config_tests.rsindex b02140c861..cb5ce33086 100644--- a/codex-rs/core/src/config/config_tests.rs+++ b/codex-rs/core/src/config/config_tests.rs@@ -11160,6 +11160,28 @@ in_app_dictation = falseOk(())}+#[tokio::test]+async fn in_app_local_automation_feature_requirements_are_valid() -> std::io::Result<()> {+ let codex_home = TempDir::new()?;++ let config = ConfigBuilder::without_managed_config_for_tests()+ .codex_home(codex_home.path().to_path_buf())+ .cloud_config_bundle(+ CloudConfigBundleFixture::loader_with_enterprise_requirement(+ r#"+[features]+in_app_local_automation = false+"#,+ ),+ )+ .build()+ .await?;++ assert!(!config.features.enabled(Feature::InAppLocalAutomation));++ Ok(())+}+#[tokio::test]async fn explicit_feature_config_is_normalized_by_requirements() -> std::io::Result<()> {let codex_home = TempDir::new()?;diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rsindex af37ac20ad..50a8921ad8 100644--- a/codex-rs/features/src/lib.rs+++ b/codex-rs/features/src/lib.rs@@ -219,6 +219,10 @@ pub enum Feature {////// Requirements-only gate: this should be set from requirements, not user config.InAppDictation,+ /// Allow desktop apps to run local automations.+ ///+ /// Requirements-only gate: this should be set from requirements, not user config.+ InAppLocalAutomation,/// Allow desktop apps to perform in-app updates.////// Requirements-only gate: this should be set from requirements, not user config.@@ -1253,6 +1257,12 @@ pub const FEATURES: &[FeatureSpec] = &[stage: Stage::Stable,default_enabled: true,},+ FeatureSpec {+ id: Feature::InAppLocalAutomation,+ key: "in_app_local_automation",+ stage: Stage::Stable,+ default_enabled: true,+ },FeatureSpec {id: Feature::InAppUpdates,key: "in_app_updates",