feat: introduce ExternalSandbox policy (#8290)

## Description

Introduced `ExternalSandbox` policy to cover use case when sandbox
defined by outside environment, effectively it translates to
`SandboxMode#DangerFullAccess` for file system (since sandbox configured
on container level) and configurable `network_access` (either Restricted
or Enabled by outside environment).

as example you can configure `ExternalSandbox` policy as part of
`sendUserTurn` v1 app_server API:

```
 {
            "conversationId": <id>,
            "cwd": <cwd>,
            "approvalPolicy": "never",
            "sandboxPolicy": {
                  "type": ""external-sandbox",
                  "network_access": "enabled"/"restricted"
            },
            "model": <model>,
            "effort": <effort>,
            ....
        }
```
This commit is contained in:
Anton Panasenko authored and GitHub committed 2025-12-18 17:02:03 -08:00
1 parent 3d4ced3ff5
commit 3429de21b3
26 files changed
+435 -39

No files matched your search

+3 -1
View File
@@ -1244,6 +1244,8 @@ dependencies = [
"codex-lmstudio",
"codex-ollama",
"codex-protocol",
"codex-utils-absolute-path",
"pretty_assertions",
"serde",
"toml 0.9.5",
]
@@ -1316,7 +1318,6 @@ dependencies = [
"sha2",
"shlex",
"similar",
"strum_macros 0.27.2",
"tempfile",
"test-case",
"test-log",
@@ -1913,6 +1914,7 @@ dependencies = [
"codex-utils-absolute-path",
"dirs-next",
"dunce",
"pretty_assertions",
"rand 0.8.5",
"serde",
"serde_json",