mirror of
https://github.com/openai/codex.git
synced 2026-11-16 22:00:36 +00:00
Attribute executor skill invocations to plugins (#39309)
## What changed - Carry selected plugin identities from MCP discovery into per-turn extension data, limited to capability roots that are ready for the turn. - Annotate executor skill catalog entries with the matching plugin ID and `user` scope. - Include that attribution in `skill_invocation` analytics for both explicit and implicit executor skill invocations. ## Testing - Extend the executor skills app-server test to verify plugin ID, skill scope, and invocation type for explicit and implicit analytics events. GitOrigin-RevId: 9345600ae29bcb8eb894fffd2d6f7b05f22ebf74
This commit is contained in:
committed by
copyberry
parent
c97bd2dcb5
commit
280d56b1d8
@@ -183,6 +183,7 @@ impl McpServerContributor<Config> for SelectedExecutorPluginMcpContributor {
|
||||
context.config(),
|
||||
plugin_policies.get(&plugin.plugin_id),
|
||||
selection_order,
|
||||
&root.selected_root.id,
|
||||
plugin,
|
||||
));
|
||||
}
|
||||
@@ -196,6 +197,7 @@ impl McpServerContributor<Config> for SelectedExecutorPluginMcpContributor {
|
||||
context.config(),
|
||||
plugin_policies.get(&plugin.plugin_id),
|
||||
selection_order,
|
||||
&selected_root.id,
|
||||
plugin,
|
||||
));
|
||||
}
|
||||
@@ -210,6 +212,7 @@ fn project_metadata(
|
||||
config: &Config,
|
||||
plugin_policy: Option<&HashMap<String, PluginMcpServerConfig>>,
|
||||
selection_order: usize,
|
||||
selected_root_id: &str,
|
||||
plugin: SelectedPluginMetadata,
|
||||
) -> Vec<McpServerContribution> {
|
||||
let mut servers = plugin.servers.iter().cloned().collect::<HashMap<_, _>>();
|
||||
@@ -231,6 +234,7 @@ fn project_metadata(
|
||||
.collect::<Vec<_>>();
|
||||
// Keep the package visible even when it contributes only skills.
|
||||
contributions.push(McpServerContribution::SelectedPluginPackage {
|
||||
selected_root_id: selected_root_id.to_owned(),
|
||||
plugin_id: plugin.plugin_id,
|
||||
plugin_display_name: plugin.plugin_display_name,
|
||||
connector_ids: plugin.connector_ids,
|
||||
|
||||
Reference in New Issue
Block a user