Expose managed WebMCP policy through the app server (#42823)

## What changed

- Parse the optional `[browser_use].allow_webmcp` boolean from managed requirements and preserve requirement-layer precedence.
- Return the policy as `browserUse.allowWebmcp` from `configRequirements/read`, including explicit `true`, explicit `false`, and `null` when omitted.
- Update the generated JSON and TypeScript protocol schemas.

## Testing

- Cover parsing, invalid values, layered overrides, and app-server response serialization.

GitOrigin-RevId: a3fd7d1a6f838bb3ab0ac2a644409101a2338ca6
This commit is contained in:
nmccormack-oai authored and copyberry committed 2026-09-04 18:30:26 +00:00
1 parent 387bc6ba59
commit 0f64d70808
17 files changed
+183 -3

No files matched your search

@@ -561,6 +561,7 @@ fn map_browser_use_requirements_to_api(
browser_use: codex_config::BrowserUseRequirementsToml,
) -> BrowserUseRequirements {
BrowserUseRequirements {
allow_webmcp: browser_use.allow_webmcp,
allow_history_access: browser_use.allow_history_access,
disable_auto_review: browser_use.disable_auto_review,
allow_global_persistent_approval: browser_use.allow_global_persistent_approval,
@@ -940,6 +941,7 @@ mod tests {
let mapped = map_requirements_toml_to_api(ConfigRequirementsToml {
allow_browser_and_computer_use: Some(false),
browser_use: Some(BrowserUseRequirementsToml {
allow_webmcp: Some(true),
allow_history_access: Some(false),
disable_auto_review: Some(true),
allow_global_persistent_approval: Some(false),
@@ -997,6 +999,7 @@ mod tests {
assert_eq!(
mapped.browser_use,
Some(BrowserUseRequirements {
allow_webmcp: Some(true),
allow_history_access: Some(false),
disable_auto_review: Some(true),
allow_global_persistent_approval: Some(false),