Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 41 additions & 7 deletions codex-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion codex-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ ratatui-macros = "0.6.0"
regex = "1.12.2"
regex-lite = "0.1.7"
reqwest = "0.12"
rmcp = { version = "0.10.0", default-features = false }
rmcp = { version = "0.12.0", default-features = false }
schemars = "0.8.22"
seccompiler = "0.5.0"
sentry = "0.46.0"
Expand Down
4 changes: 2 additions & 2 deletions codex-rs/exec-server/src/posix/mcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ impl ServerHandler for ExecTool {

async fn on_custom_notification(
&self,
notification: rmcp::model::CustomClientNotification,
notification: rmcp::model::CustomNotification,
_context: rmcp::service::NotificationContext<rmcp::RoleServer>,
) {
let rmcp::model::CustomClientNotification { method, params, .. } = notification;
let rmcp::model::CustomNotification { method, params, .. } = notification;
if method == MCP_SANDBOX_STATE_NOTIFICATION
&& let Some(params) = params
{
Expand Down
4 changes: 2 additions & 2 deletions codex-rs/exec-server/tests/common/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use rmcp::model::ClientCapabilities;
use rmcp::model::ClientInfo;
use rmcp::model::CreateElicitationRequestParam;
use rmcp::model::CreateElicitationResult;
use rmcp::model::CustomClientNotification;
use rmcp::model::CustomNotification;
use rmcp::model::ElicitationAction;
use rmcp::service::RunningService;
use rmcp::transport::ConfigureCommandExt;
Expand Down Expand Up @@ -129,7 +129,7 @@ async fn send_sandbox_notification<S>(
where
S: Service<RoleClient> + ClientHandler,
{
let sandbox_state_notification = CustomClientNotification::new(
let sandbox_state_notification = CustomNotification::new(
MCP_SANDBOX_STATE_NOTIFICATION,
Some(serde_json::to_value(sandbox_state)?),
);
Expand Down
1 change: 1 addition & 0 deletions codex-rs/rmcp-client/src/bin/rmcp_test_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl ServerHandler for TestToolServer {
Ok(ListToolsResult {
tools: (*tools).clone(),
next_cursor: None,
meta: None,
})
}
}
Expand Down
4 changes: 4 additions & 0 deletions codex-rs/rmcp-client/src/bin/test_stdio_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl TestToolServer {
mime_type: Some("text/plain".to_string()),
size: None,
icons: None,
meta: None,
};
Resource::new(raw, None)
}
Expand Down Expand Up @@ -146,6 +147,7 @@ impl ServerHandler for TestToolServer {
Ok(ListToolsResult {
tools: (*tools).clone(),
next_cursor: None,
meta: None,
})
}
}
Expand All @@ -160,6 +162,7 @@ impl ServerHandler for TestToolServer {
Ok(ListResourcesResult {
resources: (*resources).clone(),
next_cursor: None,
meta: None,
})
}
}
Expand All @@ -172,6 +175,7 @@ impl ServerHandler for TestToolServer {
Ok(ListResourceTemplatesResult {
resource_templates: (*self.resource_templates).clone(),
next_cursor: None,
meta: None,
})
}

Expand Down
4 changes: 4 additions & 0 deletions codex-rs/rmcp-client/src/bin/test_streamable_http_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ impl TestToolServer {
mime_type: Some("text/plain".to_string()),
size: None,
icons: None,
meta: None,
};
Resource::new(raw, None)
}
Expand Down Expand Up @@ -143,6 +144,7 @@ impl ServerHandler for TestToolServer {
Ok(ListToolsResult {
tools: (*tools).clone(),
next_cursor: None,
meta: None,
})
}
}
Expand All @@ -157,6 +159,7 @@ impl ServerHandler for TestToolServer {
Ok(ListResourcesResult {
resources: (*resources).clone(),
next_cursor: None,
meta: None,
})
}
}
Expand All @@ -169,6 +172,7 @@ impl ServerHandler for TestToolServer {
Ok(ListResourceTemplatesResult {
resource_templates: (*self.resource_templates).clone(),
next_cursor: None,
meta: None,
})
}

Expand Down
14 changes: 6 additions & 8 deletions codex-rs/rmcp-client/src/rmcp_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use rmcp::model::CallToolRequestParam;
use rmcp::model::ClientNotification;
use rmcp::model::CreateElicitationRequestParam;
use rmcp::model::CreateElicitationResult;
use rmcp::model::CustomClientNotification;
use rmcp::model::CustomNotification;
use rmcp::model::Extensions;
use rmcp::model::InitializeRequestParam;
use rmcp::model::PaginatedRequestParam;
Expand Down Expand Up @@ -372,13 +372,11 @@ impl RmcpClient {
let service: Arc<RunningService<RoleClient, LoggingClientHandler>> = self.service().await?;
service.service();
service
.send_notification(ClientNotification::CustomClientNotification(
CustomClientNotification {
method: method.to_string(),
params,
extensions: Extensions::new(),
},
))
.send_notification(ClientNotification::CustomNotification(CustomNotification {
method: method.to_string(),
params,
extensions: Extensions::new(),
}))
.await?;
Ok(())
}
Expand Down
Loading