- Add typed MCP protocol surface in `codex-rs/mcp-server/src/mcp_protocol.rs` for `requests`, `responses`, and `notifications` - Requests: `NewConversation`, `Connect`, `SendUserMessage`, `GetConversations` - Message content parts: `Text`, `Image` (`ImageUrl`/`FileId`, optional `ImageDetail`), File (`Url`/`Id`/`inline Data`) - Responses: `ToolCallResponseEnvelope` with optional `isError` and `structuredContent` variants (`NewConversation`, `Connect`, `SendUserMessageAccepted`, `GetConversations`) - Notifications: `InitialState`, `ConnectionRevoked`, `CodexEvent`, `Cancelled` - Uniform `_meta` on `notifications` via `NotificationMeta` (`conversationId`, `requestId`) - Unit tests validate JSON wire shapes for key `requests`/`responses`/`notifications`
46 lines
957 B
TOML
46 lines
957 B
TOML
[package]
|
|
name = "codex-mcp-server"
|
|
version = { workspace = true }
|
|
edition = "2024"
|
|
|
|
[[bin]]
|
|
name = "codex-mcp-server"
|
|
path = "src/main.rs"
|
|
|
|
[lib]
|
|
name = "codex_mcp_server"
|
|
path = "src/lib.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
anyhow = "1"
|
|
codex-arg0 = { path = "../arg0" }
|
|
codex-core = { path = "../core" }
|
|
mcp-types = { path = "../mcp-types" }
|
|
schemars = "0.8.22"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
shlex = "1.3.0"
|
|
toml = "0.9"
|
|
tracing = { version = "0.1.41", features = ["log"] }
|
|
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
|
|
tokio = { version = "1", features = [
|
|
"io-std",
|
|
"macros",
|
|
"process",
|
|
"rt-multi-thread",
|
|
"signal",
|
|
] }
|
|
uuid = { version = "1", features = ["serde", "v4"] }
|
|
strum_macros = "0.27.2"
|
|
|
|
[dev-dependencies]
|
|
assert_cmd = "2"
|
|
mcp_test_support = { path = "tests/common" }
|
|
pretty_assertions = "1.4.1"
|
|
tempfile = "3"
|
|
tokio-test = "0.4"
|
|
wiremock = "0.6"
|