mirror of
https://github.com/openai/codex.git
synced 2026-05-15 08:42:34 +00:00
## Summary This PR adds the first `codex-rs` milestone for remote-exec e2e: a local `codex exec-server` can now register itself with `codex-cloud-environments` and attach to the returned rendezvous websocket. At a high level, `codex exec-server --cloud ...` now: - loads ChatGPT auth from normal Codex config - registers an executor with `codex-cloud-environments` - receives a signed rendezvous websocket URL - serves the existing exec-server JSON-RPC protocol over that websocket ## What Changed - Added `--cloud`, `--cloud-base-url`, `--cloud-environment-id`, and `--cloud-name` to `codex exec-server` - Added a new `exec-server/src/cloud.rs` module that handles: - registration requests - auth/header setup - bounded auth retry on `401/403` - reconnect/backoff after websocket disconnects - Reused the existing `ConnectionProcessor` / `ExecServerHandler` path so cloud mode serves the same exec/filesystem RPC surface as local websocket mode - Added cloud-specific error variants and minimal docs for the new mode ## Testing Manual e2e test that fully goes through exec server flow with our codex cloud agent as orchestrator
22 lines
554 B
Rust
22 lines
554 B
Rust
mod file_system_handler;
|
|
mod handler;
|
|
mod process_handler;
|
|
mod processor;
|
|
mod registry;
|
|
mod session_registry;
|
|
mod transport;
|
|
|
|
pub(crate) use handler::ExecServerHandler;
|
|
pub(crate) use processor::ConnectionProcessor;
|
|
pub use transport::DEFAULT_LISTEN_URL;
|
|
pub use transport::ExecServerListenUrlParseError;
|
|
|
|
use crate::ExecServerRuntimePaths;
|
|
|
|
pub async fn run_main(
|
|
listen_url: &str,
|
|
runtime_paths: ExecServerRuntimePaths,
|
|
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|
transport::run_transport(listen_url, runtime_paths).await
|
|
}
|