mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
## 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
24 lines
580 B
Rust
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
|
|
}
|