feat: track plugins mcps/apps and add plugin info to user_instructions#13433
feat: track plugins mcps/apps and add plugin info to user_instructions#13433
Conversation
codex-rs/core/src/plugins/manager.rs
Outdated
| pub struct PluginCapabilityIndex { | ||
| plugins: Vec<PluginCapabilitySummary>, |
There was a problem hiding this comment.
I don't love these type names, open to suggestions for clearer ones.
| "## Plugins".to_string(), | ||
| "A plugin is a local bundle of skills, MCP servers, and apps. Below is the list of plugins that are enabled and available in this session.".to_string(), |
There was a problem hiding this comment.
Need to refine the prompt and eventually eval, but open to immediate suggestions as well. Roughly mimicked the content of the skills section injected into user_instructions.
|
Hi, sorry for interrupt. I'm following your updates on the plugin system and I love it! Thank you for delivery! I reviewed the implementation and as far I understand you didn't integrate agents (multi-agents) into plugins, isn't it? Will you add it later or it's not planned? I believe it would be great if we could distribute skills + mcp + agents as one plugin for codex. Thank you. |
|
@codex review this |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21a2a634ed
ℹ️ 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".
| let mut mcp_server_names: Vec<String> = plugin.mcp_servers.keys().cloned().collect(); | ||
| mcp_server_names.sort_unstable(); |
There was a problem hiding this comment.
Exclude shadowed MCP servers from capability summaries
PluginCapabilitySummary is built from each plugin’s raw mcp_servers keys, but duplicate server names are effectively dropped later (effective_mcp_servers keeps the first via entry(...).or_insert_with). A plugin whose only MCP is shadowed can still appear as having MCP capability and be listed as available in ## Plugins, which misrepresents callable capabilities.
Useful? React with 👍 / 👎.
161ab71 to
7c6f76f
Compare
first half of changes, followed by #13510
Track plugin capabilities as derived summaries on
PluginLoadOutcomefor enabled plugins with at least one skill/app/mcp.Also add
Pluginssection touser_instructionsinjected on session start. These introduce the plugins concept and list enabled plugins, but do NOT currently include paths to enabled plugins or details on what apps/mcps the plugins contain (current plan is to inject this on @-mention). that can be adjusted in a follow up and based on evals.tests
Added/updated tests, confirmed locally that new
Pluginssection + currently enabled plugins show up inuser_instructions.