Add exec-server network policy callback types (#34620)

## What changed

- Define the `network/policyRequest` RPC payloads for associating a network request with a process and returning an `allow`, `deny`, or `ask` decision.
- Cover HTTP, HTTPS CONNECT, and SOCKS5 TCP/UDP requests, with shared size limits for callback fields.
- Add the backward-compatible `requestPolicyDecisions` remote proxy option so executors can opt in to sending policy decisions to clients.
- Re-export the new protocol types from `codex-exec-server`.

## Testing

- Verify the request and decision JSON shapes.
- Verify that the proxy opt-in is omitted and defaults to `false` for legacy configurations, while an enabled value round-trips.

GitOrigin-RevId: 65b0a0723d1abb6e4f504a41d3a0dd41f5f21bf7
This commit is contained in:
viyatb-oai authored and copyberry committed 2026-07-21 21:54:31 +00:00
1 parent ad020f29ae
commit d838ea0f64
6 files changed
+160

No files matched your search

@@ -66,6 +66,9 @@ pub struct RemoteNetworkProxyConfig {
pub domains: Option<NetworkDomainPermissions>,
pub unix_sockets: Option<NetworkUnixSocketPermissions>,
pub allow_local_binding: bool,
/// Whether the executor sends domain policy decisions back to the client.
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
pub request_policy_decisions: bool,
}
impl RemoteNetworkProxyConfig {
@@ -88,6 +91,7 @@ impl RemoteNetworkProxyConfig {
domains: config.domains.clone(),
unix_sockets: config.unix_sockets.clone(),
allow_local_binding: config.allow_local_binding,
request_policy_decisions: false,
})
}