mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
## 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
27 lines
936 B
Rust
27 lines
936 B
Rust
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,
|
|
}
|