chore: move mcp-server/src/wire_format.rs to protocol/src/mcp_protocol.rs (#2423)

The existing `wire_format.rs` should share more types with the
`codex-protocol` crate (like `AskForApproval` instead of maintaining a
parallel `CodexToolCallApprovalPolicy` enum), so this PR moves
`wire_format.rs` into `codex-protocol`, renaming it as
`mcp-protocol.rs`. We also de-dupe types, where appropriate.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/2423).
* #2424
* __->__ #2423
This commit is contained in:
Michael Bolin
2025-08-18 09:36:57 -07:00
committed by GitHub
parent da69d50c60
commit 712bfa04ac
26 changed files with 121 additions and 109 deletions

View File

@@ -9,6 +9,7 @@ workspace = true
[dependencies]
clap = { version = "4", features = ["derive", "wrap_help"], optional = true }
codex-core = { path = "../core" }
codex-protocol = { path = "../protocol" }
serde = { version = "1", optional = true }
toml = { version = "0.9", optional = true }

View File

@@ -7,7 +7,7 @@
//! `config.toml`.
use clap::ValueEnum;
use codex_core::config_types::SandboxMode;
use codex_protocol::config_types::SandboxMode;
#[derive(Clone, Copy, Debug, ValueEnum)]
#[value(rename_all = "kebab-case")]