mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Track resource-backed skill invocations (#38066)
## What changed - Emit skill invocation analytics when a resource-backed skill is explicitly selected or its main resource is successfully read from the first page. - Preserve provider-supplied skill IDs and user scope when available, and derive a stable ID from the main resource otherwise. - Deduplicate repeated implicit reads of the same main resource within a turn. ## Testing - Extend the orchestrator skill integration test to cover explicit and implicit invocation events, stable fallback IDs, failed reads, and repeated-read deduplication. GitOrigin-RevId: 7d8453b31b5a2205847e65cda2c46183d6c97b45
This commit is contained in:
1 parent
104e25ac5a
commit
c8f673fddc
14 files changed
+311
-71
No files matched your search
@@ -81,6 +81,7 @@ use crate::facts::PluginState;
|
||||
use crate::facts::PluginStateChangedInput;
|
||||
use crate::facts::PluginUsedInput;
|
||||
use crate::facts::SkillInvocation;
|
||||
use crate::facts::SkillInvocationLocation;
|
||||
use crate::facts::SkillInvokedInput;
|
||||
use crate::facts::SubAgentThreadStartedInput;
|
||||
use crate::facts::ThreadInitializationMode;
|
||||
@@ -3824,8 +3825,10 @@ async fn reducer_ingests_skill_invoked_fact() {
|
||||
tracking,
|
||||
invocations: vec![SkillInvocation {
|
||||
skill_name: "doc".to_string(),
|
||||
skill_scope: codex_protocol::protocol::SkillScope::User,
|
||||
skill_path,
|
||||
location: SkillInvocationLocation::Host {
|
||||
path: skill_path,
|
||||
scope: codex_protocol::protocol::SkillScope::User,
|
||||
},
|
||||
plugin_id: None,
|
||||
remote_plugin_id: None,
|
||||
invocation_type: InvocationType::Explicit,
|
||||
@@ -3871,8 +3874,10 @@ async fn reducer_includes_plugin_ids_for_plugin_skill_invocations() {
|
||||
tracking,
|
||||
invocations: vec![SkillInvocation {
|
||||
skill_name: "sample:doc".to_string(),
|
||||
skill_scope: codex_protocol::protocol::SkillScope::User,
|
||||
skill_path,
|
||||
location: SkillInvocationLocation::Host {
|
||||
path: skill_path,
|
||||
scope: codex_protocol::protocol::SkillScope::User,
|
||||
},
|
||||
plugin_id: Some("sample@test".to_string()),
|
||||
remote_plugin_id: Some("plugins~Plugin_sample".to_string()),
|
||||
invocation_type: InvocationType::Explicit,
|
||||
|
||||
Reference in new issue
Block a user