mirror of
https://github.com/openai/codex.git
synced 2026-11-13 22:47:20 +00:00
Add Agent Plugins MCP config parsing (#36796)
## What changed - Add `parse_agent_plugin_mcp_config` to translate Agent Plugins v1 `mcp.json` files into Codex MCP server configuration. - Normalize `stdio` and streamable HTTP transports, including `PLUGIN_ROOT` and `PLUGIN_DATA` expansion, contained plugin paths, secure endpoint validation, and filtering of client-owned HTTP headers. - Keep valid sibling servers when another server is invalid, while returning per-server parse errors. - Preserve UTF-8 HTTP header values when forwarding streamable HTTP protocol headers. ## Testing - Cover transport mapping, placeholder expansion, path containment, schema and field validation, per-server errors, platform-specific environment handling, and UTF-8 headers. GitOrigin-RevId: ed4ab0fcf495afbb381ce48beb93989629444c56
This commit is contained in:
1 parent
3149fa4b99
commit
bd12b3a9ec
6 files changed
+1052
-1
No files matched your search
@@ -10,6 +10,11 @@ use std::collections::BTreeMap;
|
||||
use std::path::Path;
|
||||
use tracing::warn;
|
||||
|
||||
#[path = "agent_plugin_config.rs"]
|
||||
mod agent_plugin_config;
|
||||
|
||||
pub use agent_plugin_config::parse_agent_plugin_mcp_config;
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
enum PluginMcpSource<'a> {
|
||||
Host {
|
||||
|
||||
Reference in new issue
Block a user