Extract shared network policy types from the proxy crate (#63986)

## Why

The protocol and feature configuration crates depend on the network proxy
crate for data types. Give them a smaller dependency that contains the
shared definitions.

## What changed

Move environment network policies, domain and Unix socket permissions,
policy decisions and their sources, and credential provider definitions
into `codex-network-policy-types`. Use the new crate directly from
`codex-protocol` and `codex-features`.

Re-export the moved types from `codex-network-proxy` and keep environment
policy conversion and application, along with credential provider
validation, in the proxy crate.

GitOrigin-RevId: 8af684da746830bce45ac00135aed8052dba3824
This commit is contained in:
jif
2026-11-25 16:09:51 +00:00
committed by copyberry
parent 06f334aa4b
commit c6bbf8a413
28 changed files with 392 additions and 335 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ codex-async-utils = { workspace = true }
codex-execpolicy-rules = { workspace = true }
codex-extension-items = { workspace = true }
codex-http-client = { workspace = true }
codex-network-proxy = { workspace = true }
codex-network-policy-types = { workspace = true }
codex-utils-absolute-path = { workspace = true }
codex-utils-cached-str = { workspace = true }
codex-utils-image = { workspace = true }
+1 -1
View File
@@ -11,7 +11,7 @@ use crate::models::PermissionProfileSnapshot;
use crate::protocol::AskForApproval;
use crate::sandbox::SandboxType;
use codex_execpolicy_rules::RequirementsExecPolicy;
use codex_network_proxy::EnvironmentNetworkPolicy;
use codex_network_policy_types::EnvironmentNetworkPolicy;
use codex_utils_absolute_path::AbsolutePathBuf;
use codex_utils_path_uri::PathUri;
+2 -2
View File
@@ -1,6 +1,6 @@
use crate::approvals::NetworkApprovalProtocol;
use codex_network_proxy::NetworkDecisionSource;
use codex_network_proxy::NetworkPolicyDecision;
use codex_network_policy_types::NetworkDecisionSource;
use codex_network_policy_types::NetworkPolicyDecision;
use serde::Deserialize;
#[derive(Debug, Clone, Deserialize, PartialEq, Eq)]