Add cloud executor registration to exec-server

This commit is contained in:
Michael Zeng
2026-04-25 09:29:02 -07:00
parent a3350de855
commit 07182cdc04
8 changed files with 466 additions and 2 deletions

View File

@@ -22,6 +22,12 @@ the wire.
The CLI entrypoint supports:
- `ws://IP:PORT` (default)
- `--cloud --cloud-base-url URL [--cloud-environment-id ID] [--cloud-name NAME]`
Cloud mode registers the local exec-server with the cloud environments service,
then reconnects to the service-provided rendezvous websocket as the executor.
It requires ChatGPT auth, and `CODEX_CLOUD_ENVIRONMENTS_BASE_URL` can be used
instead of `--cloud-base-url`.
Wire framing:
@@ -308,6 +314,8 @@ The crate exports:
- `DEFAULT_LISTEN_URL` and `ExecServerListenUrlParseError`
- `ExecServerRuntimePaths`
- `run_main()` for embedding the websocket server
- `CloudExecutorConfig` and `run_cloud_executor()` for embedding cloud
registration mode
Callers must pass `ExecServerRuntimePaths` to `run_main()`. The top-level
`codex exec-server` command builds these paths from the `codex` arg0 dispatch