Add shared plugin catalog discovery APIs (#46558)

## What changed

- Add `PluginCatalog` types for discovery snapshots, warnings, plugin metadata, stable identities, and cloud or executor source locations. Keep MCP server declaration values out of debug output.
- Extend `PluginProvider` with a generic list query, asynchronous catalog listing, and shared error and future types. Provide empty defaults for listing and root resolution so providers can implement their supported operation.
- Add `PluginListQuery` in the MCP extension with thread and turn identifiers and an optional MCP resource client.

GitOrigin-RevId: 0bf2a1713c25d912c41daab788b88729d4871fcf
This commit is contained in:
Anthony Tafoya
2026-09-19 01:28:19 +00:00
committed by copyberry
parent cd2f9ca692
commit 46d87f3b1c
5 changed files with 131 additions and 9 deletions
+5
View File
@@ -11,8 +11,13 @@ use codex_mcp::hosted_plugin_runtime_mcp_server_config;
#[path = "event_stream_tests.rs"]
mod event_stream_tests;
mod executor_plugin;
mod provider;
mod stream_manager;
pub use provider::PluginListQuery;
pub use provider::PluginProvider;
pub use provider::PluginProviderError;
pub use provider::PluginProviderFuture;
pub use stream_manager::McpEventStreamManager;
pub use stream_manager::McpEventStreamUpdate;
+16
View File
@@ -0,0 +1,16 @@
//! MCP context passed to plugin catalog providers.
use codex_mcp::McpResourceClient;
use std::sync::Arc;
pub use codex_plugin::PluginProvider;
pub use codex_plugin::PluginProviderError;
pub use codex_plugin::PluginProviderFuture;
/// Turn identifiers and MCP client used to request one catalog snapshot.
#[derive(Clone, Debug)]
pub struct PluginListQuery {
pub thread_id: String,
pub turn_id: String,
pub mcp_resources: Option<Arc<McpResourceClient>>,
}