Files
codex/codex-rs/code-mode-host/src/main.rs
T
Ruslan Nigmatullin 725b3a44f8 Remove WebSocket transport from code-mode hosts (#40692)
## What changed

- Accept only `http://` and `https://` gRPC endpoints for app server
  `--code-mode-host` connections.
- Limit the standalone code-mode host to stdio and gRPC listeners.
- Remove the WebSocket session provider, dual-WebSocket negotiation, transport
  lanes, and related dependencies and tests.
- Keep coverage for shared and prewarmed gRPC hosts and reject WebSocket host
  URLs in CLI parsing tests.

GitOrigin-RevId: 8792604e79ffd54ce776074a4dc3f7d55e63752a
2026-08-25 20:37:15 +00:00

24 lines
580 B
Rust

use clap::Parser;
#[derive(Debug, Parser)]
struct Cli {
/// Transport endpoint: `stdio`, `stdio://`, or `grpc://IP:PORT`.
#[arg(
long,
value_name = "URL",
default_value = codex_code_mode_host::DEFAULT_LISTEN_URL
)]
listen: String,
}
#[tokio::main(flavor = "current_thread")]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt()
.with_max_level(tracing::Level::INFO)
.with_writer(std::io::stderr)
.with_ansi(false)
.init();
codex_code_mode_host::run_main(&Cli::parse().listen).await
}