mirror of
https://github.com/openai/codex.git
synced 2026-11-28 07:32:19 +00:00
Add a skill invocation extension contributor (#32200)
## What changed - Add `SkillInvocationContributor` and registration support to the extension API. - Provide invocation callbacks with session-, thread-, and turn-scoped extension data, the turn ID, skill resource, and explicit or implicit invocation kind. - Notify registered contributors when Codex observes a deduplicated implicit skill invocation. ## Testing - Extend the extension registry round-trip test to cover skill invocation contributors. GitOrigin-RevId: f428336728889d9bf4fba41a7dd8d3a6f9b9728c
This commit is contained in:
1 parent
601b61a83f
commit
2b9c050460
6 files changed
+87
No files matched your search
@@ -0,0 +1,26 @@
|
||||
use crate::ExtensionData;
|
||||
|
||||
/// Input supplied when the host or an extension observes one skill invocation.
|
||||
pub struct SkillInvocationInput<'a> {
|
||||
/// Store scoped to the host session runtime.
|
||||
pub session_store: &'a ExtensionData,
|
||||
/// Store scoped to this thread runtime.
|
||||
pub thread_store: &'a ExtensionData,
|
||||
/// Store scoped to this turn runtime.
|
||||
pub turn_store: &'a ExtensionData,
|
||||
/// Current turn submission id.
|
||||
pub turn_id: &'a str,
|
||||
/// Main prompt path or opaque resource id for the invoked skill.
|
||||
pub skill_resource: &'a str,
|
||||
/// How the skill invocation was initiated.
|
||||
pub kind: SkillInvocationKind,
|
||||
}
|
||||
|
||||
/// How an observed skill invocation was initiated.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum SkillInvocationKind {
|
||||
/// The user explicitly mentioned the skill.
|
||||
Explicit,
|
||||
/// The model read the skill instructions or ran one of its scripts.
|
||||
Implicit,
|
||||
}
|
||||
Reference in new issue
Block a user