pub struct InvocationContext {
pub tool_name: String,
pub session_id: Option<String>,
pub actor: Option<String>,
pub source: Option<String>,
pub execution_scope: ExecutionScope,
}Expand description
Stable runtime metadata exposed to plugin tools during execution.
This intentionally exposes the execution surface, not Cortex internals.
Fields§
§tool_name: StringTool name being invoked.
session_id: Option<String>Active session id when available.
actor: Option<String>Canonical actor identity when available.
source: Option<String>Transport or invocation source (http, rpc, telegram, heartbeat, …).
execution_scope: ExecutionScopeWhether this invocation belongs to a foreground or background execution.
Implementations§
Source§impl InvocationContext
impl InvocationContext
pub fn is_background(&self) -> bool
pub fn is_foreground(&self) -> bool
Trait Implementations§
Source§impl Clone for InvocationContext
impl Clone for InvocationContext
Source§fn clone(&self) -> InvocationContext
fn clone(&self) -> InvocationContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InvocationContext
impl Debug for InvocationContext
Source§impl<'de> Deserialize<'de> for InvocationContext
impl<'de> Deserialize<'de> for InvocationContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InvocationContext
impl PartialEq for InvocationContext
Source§impl Serialize for InvocationContext
impl Serialize for InvocationContext
impl Eq for InvocationContext
impl StructuralPartialEq for InvocationContext
Auto Trait Implementations§
impl Freeze for InvocationContext
impl RefUnwindSafe for InvocationContext
impl Send for InvocationContext
impl Sync for InvocationContext
impl Unpin for InvocationContext
impl UnsafeUnpin for InvocationContext
impl UnwindSafe for InvocationContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more