diff --git a/codex-rs/core/src/config/schema.rs b/codex-rs/core/src/config/schema.rs index 86513d0b6d..dad2cd8951 100644 --- a/codex-rs/core/src/config/schema.rs +++ b/codex-rs/core/src/config/schema.rs @@ -34,7 +34,7 @@ pub(crate) fn write_config_schema(out_path: &Path) -> anyhow::Result<()> { Ok(()) } -/// Schema for the `[features]` map with known keys only. +/// Schema for the `[features]` map with known + legacy keys only. pub(crate) fn features_schema(schema_gen: &mut SchemaGenerator) -> Schema { let mut object = SchemaObject { instance_type: Some(InstanceType::Object.into()), @@ -47,6 +47,11 @@ pub(crate) fn features_schema(schema_gen: &mut SchemaGenerator) -> Schema { .properties .insert(feature.key.to_string(), schema_gen.subschema_for::()); } + for legacy_key in crate::features::legacy_feature_keys() { + validation + .properties + .insert(legacy_key.to_string(), schema_gen.subschema_for::()); + } validation.additional_properties = Some(Box::new(Schema::Bool(false))); object.object = Some(Box::new(validation)); diff --git a/codex-rs/core/src/features.rs b/codex-rs/core/src/features.rs index bff8338511..2f843d224b 100644 --- a/codex-rs/core/src/features.rs +++ b/codex-rs/core/src/features.rs @@ -16,6 +16,7 @@ use std::collections::BTreeSet; mod legacy; pub(crate) use legacy::LegacyFeatureToggles; +pub(crate) use legacy::legacy_feature_keys; /// High-level lifecycle stage for a feature. #[derive(Debug, Clone, Copy, PartialEq, Eq)] diff --git a/codex-rs/core/src/features/legacy.rs b/codex-rs/core/src/features/legacy.rs index ed508ffb5a..2b5a9e7fe0 100644 --- a/codex-rs/core/src/features/legacy.rs +++ b/codex-rs/core/src/features/legacy.rs @@ -31,6 +31,10 @@ const ALIASES: &[Alias] = &[ }, ]; +pub(crate) fn legacy_feature_keys() -> impl Iterator { + ALIASES.iter().map(|alias| alias.legacy_key) +} + pub(crate) fn feature_for_key(key: &str) -> Option { ALIASES .iter() diff --git a/docs/config.schema.json b/docs/config.schema.json index bb8083939f..e8372f0990 100644 --- a/docs/config.schema.json +++ b/docs/config.schema.json @@ -78,15 +78,27 @@ "elevated_windows_sandbox": { "type": "boolean" }, + "enable_experimental_windows_sandbox": { + "type": "boolean" + }, "enable_request_compression": { "type": "boolean" }, "exec_policy": { "type": "boolean" }, + "experimental_use_freeform_apply_patch": { + "type": "boolean" + }, + "experimental_use_unified_exec_tool": { + "type": "boolean" + }, "experimental_windows_sandbox": { "type": "boolean" }, + "include_apply_patch_tool": { + "type": "boolean" + }, "powershell_utf8": { "type": "boolean" }, @@ -111,6 +123,9 @@ "unified_exec": { "type": "boolean" }, + "web_search": { + "type": "boolean" + }, "web_search_cached": { "type": "boolean" }, @@ -474,15 +489,27 @@ "elevated_windows_sandbox": { "type": "boolean" }, + "enable_experimental_windows_sandbox": { + "type": "boolean" + }, "enable_request_compression": { "type": "boolean" }, "exec_policy": { "type": "boolean" }, + "experimental_use_freeform_apply_patch": { + "type": "boolean" + }, + "experimental_use_unified_exec_tool": { + "type": "boolean" + }, "experimental_windows_sandbox": { "type": "boolean" }, + "include_apply_patch_tool": { + "type": "boolean" + }, "powershell_utf8": { "type": "boolean" }, @@ -507,6 +534,9 @@ "unified_exec": { "type": "boolean" }, + "web_search": { + "type": "boolean" + }, "web_search_cached": { "type": "boolean" },