mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +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
@@ -25,6 +25,8 @@ mod world_state;
|
||||
pub use context::TurnContextContributionInput;
|
||||
pub use mcp::McpServerContribution;
|
||||
pub use mcp::McpServerContributionContext;
|
||||
pub use mcp::SelectedPluginIdentity;
|
||||
pub use mcp::SelectedPluginSnapshot;
|
||||
pub use prompt::PromptFragment;
|
||||
pub use prompt::PromptSlot;
|
||||
pub use skill_invocation::SkillInvocationInput;
|
||||
|
||||
@@ -112,6 +112,19 @@ impl<'a, C> McpServerContributionContext<'a, C> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Validated plugin identities projected for the current set of selected roots.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct SelectedPluginSnapshot {
|
||||
pub plugins: Vec<SelectedPluginIdentity>,
|
||||
}
|
||||
|
||||
/// The configured identity of a plugin resolved from one selected root.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct SelectedPluginIdentity {
|
||||
pub selected_root_id: String,
|
||||
pub plugin_id: String,
|
||||
}
|
||||
|
||||
/// One extension-owned overlay for the runtime MCP server configuration.
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum McpServerContribution {
|
||||
@@ -130,6 +143,7 @@ pub enum McpServerContribution {
|
||||
},
|
||||
/// Records a plugin selected for this thread and any connector IDs it declares.
|
||||
SelectedPluginPackage {
|
||||
selected_root_id: String,
|
||||
plugin_id: String,
|
||||
plugin_display_name: String,
|
||||
connector_ids: Vec<String>,
|
||||
|
||||
@@ -46,6 +46,8 @@ pub use contributors::PreviousWorldStateSection;
|
||||
pub use contributors::PromptFragment;
|
||||
pub use contributors::PromptSlot;
|
||||
pub use contributors::RenderedWorldStateFragment;
|
||||
pub use contributors::SelectedPluginIdentity;
|
||||
pub use contributors::SelectedPluginSnapshot;
|
||||
pub use contributors::SkillInvocationContributor;
|
||||
pub use contributors::SkillInvocationInput;
|
||||
pub use contributors::SkillInvocationKind;
|
||||
|
||||
Reference in New Issue
Block a user