[codex] Support object-valued plugin MCP manifests#28580
Conversation
dc89f9d to
c65423b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc89f9dc18
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c65423b to
36acfc8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36acfc8d0d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
36acfc8 to
24dadcf
Compare
Summary
This fixes plugin manifest parsing for MCP servers declared as an object directly in
plugin.json.Before this change, Codex modeled
mcpServersas only a string path, for example:{ "name": "counter-sample", "version": "1.1.1", "mcpServers": "./.mcp.json" }Some migrated plugins instead provide the server map directly in the manifest:
{ "name": "counter-sample", "version": "1.1.1", "description": "Plugin that declares MCP servers in the manifest", "mcpServers": { "counter": { "type": "http", "url": "https://sample.example/counter/mcp" } } }That object form previously failed during install/load with an error like:
What changed
mcpServersas eitherPath(Resource)orObject(map).plugin.jsonmcpServersas either a string path or an object..mcp.jsonfilesystem read.plugin-json-spec.mdso generated-plugin validation accepts the same object-valued shape.Compatibility
Existing plugin manifests that use
"mcpServers": "./.mcp.json"continue to work. Plugins can now also use the object shape shown above.Tests
Added coverage for the new manifest attribute shape at the install, normal load, telemetry, and executor-provider layers:
install_accepts_manifest_mcp_server_objectsload_plugins_loads_manifest_mcp_server_objectsplugin_telemetry_metadata_uses_manifest_mcp_server_objectsreads_manifest_object_config_without_executor_file_system_accessAlso smoke-tested the plugin-creator validator against both supported forms:
mcpServersas a direct object inplugin.jsonmcpServersas"./.mcp.json"with a companion.mcp.jsonValidation
just test -p codex-pluginjust test -p codex-core-pluginsjust test -p codex-mcp-extensionjust bazel-lock-updatejust bazel-lock-checkjust fmtgit diff --checkjust test -p codex-core-plugins manager::tests::load_plugins_loads_manifest_mcp_server_objects manager::tests::plugin_telemetry_metadata_uses_manifest_mcp_server_objects store::tests::install_accepts_manifest_mcp_server_objectsjust test -p codex-mcp-extension executor_plugin::provider::tests::reads_manifest_object_config_without_executor_file_system_accesspython3 codex-rs/skills/src/assets/samples/plugin-creator/scripts/validate_plugin.py /private/tmp/codex-validator-objectpython3 codex-rs/skills/src/assets/samples/plugin-creator/scripts/validate_plugin.py /private/tmp/codex-validator-path