mirror of
https://github.com/openai/codex.git
synced 2026-04-27 08:05:51 +00:00
Separate the transport-neutral JSON-RPC connection and server processor from local process spawning, add websocket support, and document the new API shape. Co-authored-by: Codex <noreply@openai.com>
16 lines
451 B
Rust
16 lines
451 B
Rust
mod processor;
|
|
mod transport;
|
|
|
|
pub use transport::ExecServerTransport;
|
|
pub use transport::ExecServerTransportParseError;
|
|
|
|
pub async fn run_main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|
run_main_with_transport(ExecServerTransport::Stdio).await
|
|
}
|
|
|
|
pub async fn run_main_with_transport(
|
|
transport: ExecServerTransport,
|
|
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
|
transport::run_transport(transport).await
|
|
}
|