mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## What changed Update `mxc-sdk` and use its V1 API to launch commands in a `ProcessContainer` with inherited stdio. Build the V1 request from Codex's filesystem, network, UI, and environment settings. Cache the SDK's ProcessContainer availability probe and surface failures to create the security environment at launch. Let the SDK reject deny paths the host cannot enforce and drop Codex's direct `flatbuffers` dependency. ## Testing Update the request-building tests to check the V1 filesystem and network policies, including loopback access for proxied commands. GitOrigin-RevId: 0fb9955b5df847595c142f5fd1da7a0cc83e1c28
12 lines
365 B
Rust
12 lines
365 B
Rust
//! Cache the public SDK's ProcessContainer availability probe.
|
|
|
|
use std::sync::OnceLock;
|
|
|
|
pub(super) fn is_available() -> bool {
|
|
static USABLE: OnceLock<bool> = OnceLock::new();
|
|
*USABLE.get_or_init(|| {
|
|
mxc_sdk::v1::probe(/* request */ None)
|
|
.is_ok_and(|probe| probe.error.is_none() && probe.probes.base_container_api_present)
|
|
})
|
|
}
|