mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why Plain stdio serves one JSON-RPC connection and shuts down when it closes, so clients cannot run concurrent sessions or reconnect to resume a detached session over the same stdin/stdout pair. ## What changed Add `--listen stdio-mux` to serve multiple independent newline-delimited JSON-RPC connections over one HTTP/2 connection on stdin and stdout. Each `CONNECT` stream to `rpc.local` carries one JSON-RPC connection. A client can half-close the request to detach, wait for response EOF, then open a fresh stream and initialize with `resumeSessionId` before the session expires. ## Testing Add tests for concurrent sessions, immediate resume after response EOF, session expiry, and recovery after a stream reset while another stream stays usable. Cover shutdown with a full input queue and verify that a failed stdio write unblocks response senders. GitOrigin-RevId: cdb9638f8b69671a50f44e3eca4dd9059f5bdcd1
119 lines
3.6 KiB
TOML
119 lines
3.6 KiB
TOML
[package]
|
|
name = "codex-exec-server"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lib]
|
|
doctest = false
|
|
|
|
# cargo-shear 1.11.2 misresolves these #[path] modules containing parent directories.
|
|
# Both modules are compiled and exercised by the exec-server unit test target.
|
|
[package.metadata.cargo-shear]
|
|
ignored-paths = [
|
|
"tests/unit/client_provisioning_tests.rs",
|
|
"src/discoverV2/tests/capability_watchers_tests.rs",
|
|
]
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
codex-utils-process = { workspace = true }
|
|
arc-swap = { workspace = true }
|
|
axum = { workspace = true, features = ["http1", "tokio", "ws"] }
|
|
base64 = { workspace = true }
|
|
bytes = { workspace = true }
|
|
clatter = { workspace = true }
|
|
codex-api = { workspace = true }
|
|
codex-build-info = { workspace = true }
|
|
codex-config = { workspace = true }
|
|
codex-core-plugin-common = { workspace = true }
|
|
codex-http-client = { workspace = true }
|
|
codex-exec-server-protocol = { workspace = true }
|
|
codex-file-system = { workspace = true }
|
|
codex-file-watcher = { workspace = true }
|
|
codex-network-proxy = { workspace = true }
|
|
codex-otel = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-sandboxing = { workspace = true }
|
|
codex-shell-command = { workspace = true }
|
|
codex-skills = { workspace = true }
|
|
codex-utils-absolute-path = { workspace = true }
|
|
codex-utils-home-dir = { workspace = true }
|
|
codex-utils-path-uri = { workspace = true }
|
|
codex-utils-pty = { workspace = true }
|
|
codex-utils-redacted-string = { workspace = true }
|
|
codex-utils-rustls-provider = { workspace = true }
|
|
codex-websocket-auth = { workspace = true }
|
|
codex-websocket-client = { workspace = true }
|
|
dirs = { workspace = true }
|
|
futures = { workspace = true }
|
|
http = { workspace = true }
|
|
hyper = { workspace = true }
|
|
hyper-util = { workspace = true }
|
|
notify = { workspace = true }
|
|
opentelemetry = { workspace = true }
|
|
prost = "0.14.3"
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
toml = { workspace = true }
|
|
tokio = { workspace = true, features = [
|
|
"fs",
|
|
"io-std",
|
|
"io-util",
|
|
"macros",
|
|
"net",
|
|
"process",
|
|
"rt-multi-thread",
|
|
"sync",
|
|
"time",
|
|
] }
|
|
tokio-util = { workspace = true, features = ["io", "rt"] }
|
|
tokio-tungstenite = { workspace = true }
|
|
tracing = { workspace = true }
|
|
url = { workspace = true }
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
codex-linux-sandbox = { workspace = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
codex-uds = { workspace = true }
|
|
libc = { workspace = true }
|
|
rustix = { workspace = true, features = ["fs", "process"] }
|
|
tempfile = { workspace = true }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
codex-mxc-sandbox = { workspace = true }
|
|
windows-sys = { workspace = true, features = [
|
|
"Win32_Foundation",
|
|
"Win32_Security",
|
|
"Win32_Storage_FileSystem",
|
|
"Win32_System_IO",
|
|
"Win32_System_Pipes",
|
|
"Win32_System_Threading",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
h2 = "0.4.19"
|
|
anyhow = { workspace = true }
|
|
codex-exec-server-test-support = { workspace = true }
|
|
codex-test-binary-support = { workspace = true }
|
|
codex-utils-cargo-bin = { workspace = true }
|
|
codex-windows-sandbox-test-support = { workspace = true }
|
|
ctor = { workspace = true }
|
|
http = { workspace = true }
|
|
opentelemetry_sdk = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
rcgen = { workspace = true }
|
|
rustls = { workspace = true }
|
|
serial_test = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
test-case = "3.3.1"
|
|
tokio = { workspace = true, features = ["test-util"] }
|
|
tracing-opentelemetry = { workspace = true }
|
|
tracing-subscriber = { workspace = true }
|
|
wiremock = { workspace = true }
|