mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Rename the MCP connection manager to McpConnectionSet (#34708)
## What changed - Use `McpConnectionSet` as the primary name for the collection of active MCP server connections throughout `codex-mcp` and its callers. - Keep `McpConnectionManager` as a backward-compatible type alias. GitOrigin-RevId: 9753838b4fd0a0b6429a9c4af0c077137616f388
This commit is contained in:
1 parent
6e5a2d6b8d
commit
516f1e2aff
21 files changed
+86
-85
No files matched your search
@@ -1,6 +1,6 @@
|
||||
//! Aggregates MCP server connections for Codex.
|
||||
//!
|
||||
//! [`McpConnectionManager`] owns the set of running async RMCP clients keyed by
|
||||
//! [`McpConnectionSet`] owns the set of running async RMCP clients keyed by
|
||||
//! MCP server name. It coordinates startup status events, keeps server origin
|
||||
//! metadata, aggregates tools/resources/templates across servers, routes tool
|
||||
//! calls to the right client, and exposes the public manager API used by
|
||||
@@ -107,7 +107,7 @@ pub fn tool_is_model_visible(tool: &ToolInfo) -> bool {
|
||||
}
|
||||
|
||||
/// A thin wrapper around a set of running [`RmcpClient`] instances.
|
||||
pub struct McpConnectionManager {
|
||||
pub struct McpConnectionSet {
|
||||
clients: HashMap<String, AsyncManagedClient>,
|
||||
server_metadata: HashMap<String, McpServerMetadata>,
|
||||
required_servers: Vec<String>,
|
||||
@@ -120,7 +120,7 @@ pub struct McpConnectionManager {
|
||||
startup_cancellation_token: CancellationToken,
|
||||
}
|
||||
|
||||
impl McpConnectionManager {
|
||||
impl McpConnectionSet {
|
||||
/// Creates an MCP connection manager. Threadless callers can pass no `tx_event`; startup
|
||||
/// notifications are then skipped and interactive elicitations are declined.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
@@ -725,7 +725,7 @@ impl McpConnectionManager {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for McpConnectionManager {
|
||||
impl Drop for McpConnectionSet {
|
||||
fn drop(&mut self) {
|
||||
self.startup_cancellation_token.cancel();
|
||||
self.clients.clear();
|
||||
|
||||
Reference in new issue
Block a user