mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:50:52 +00:00
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:
@@ -33,12 +33,12 @@ use codex_execpolicy::Policy;
|
||||
use codex_execpolicy::RuleMatch;
|
||||
use codex_features::Feature;
|
||||
use codex_model_provider::create_model_provider;
|
||||
use codex_network_proxy::EnvironmentNetworkPolicy;
|
||||
use codex_network_proxy::NetworkDecision;
|
||||
use codex_network_proxy::NetworkDecisionSource;
|
||||
use codex_network_proxy::NetworkPolicyDecision;
|
||||
use codex_network_proxy::NetworkPolicyRequest;
|
||||
use codex_network_proxy::NetworkProtocol;
|
||||
use codex_network_proxy::environment_policy_from_config;
|
||||
use codex_protocol::config_types::ApprovalsReviewer;
|
||||
use codex_protocol::error::SandboxErr;
|
||||
use codex_protocol::models::AdditionalPermissionProfile as PermissionProfile;
|
||||
@@ -1082,7 +1082,7 @@ async fn sandbox_denied_retry_uses_the_action_policy_and_reviewer() {
|
||||
.primary()
|
||||
.expect("primary environment")
|
||||
.clone();
|
||||
environment.config_mut().network_policy = Some(EnvironmentNetworkPolicy::from_config(
|
||||
environment.config_mut().network_policy = Some(environment_policy_from_config(
|
||||
&NetworkProxyConfig {
|
||||
enabled: true,
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user