Expose managed application network requirements (#42417)

## What changed

- Add `application.network` managed requirements with exact-domain allow/deny
  rules, default-enabled behavior, domain normalization, and normal managed TOML
  precedence.
- Return the policy separately from agent network requirements through the
  experimental `configRequirements/read` API. The endpoint reports the policy
  but does not enforce it.
- Export the new protocol types and schemas, and document the TOML format.

## Testing

- Cover parsing, validation, normalization, layered precedence, and cloud
  requirement composition.
- Verify app-server responses, defaults, separation from agent policy, and
  rejection of invalid domains.

GitOrigin-RevId: 563eeed296d9748430b819797204a44a8db92f3b
This commit is contained in:
acrognale-oai authored and copyberry committed 2026-09-03 02:09:10 +00:00
1 parent 88912c04cd
commit b27a6321fa
27 files changed
+658 -5

No files matched your search

@@ -381,6 +381,22 @@ fn map_requirements_toml_to_api(requirements: ConfigRequirementsToml) -> ConfigR
.and_then(|windows| windows.sandbox_private_desktop);
ConfigRequirements {
application: requirements.application.map(|application| {
codex_app_server_protocol::ApplicationRequirements {
network: application.network.map(|network| {
codex_app_server_protocol::ApplicationNetworkRequirements {
enabled: network.enabled,
domains: network
.domains
.into_iter()
.map(|(domain, permission)| {
(domain, map_network_domain_permission_to_api(permission))
})
.collect(),
}
}),
}
}),
cli_auth_credentials_store: requirements.cli_auth_credentials_store.map(
|mode| match mode {
codex_config::types::AuthCredentialsStoreMode::File => {