pub struct SubagentContext {
pub agent_id: Option<String>,
pub agent_type: Option<String>,
}Expand description
Optional sub-agent attribution present on tool-lifecycle hook
inputs (PreToolUse, PostToolUse, PostToolUseFailure,
PermissionRequest). Fields are populated when the hook fires
inside a Task-spawned sub-agent so tool events can be
attributed back to the right agent when multiple sub-agents
interleave over the same control channel.
Fields§
§agent_id: Option<String>Sub-agent identifier. Matches the agent_id emitted by that
sub-agent’s SubagentStart / SubagentStop hooks.
agent_type: Option<String>Agent type name (e.g. "general-purpose", "code-reviewer").
Trait Implementations§
Source§impl Clone for SubagentContext
impl Clone for SubagentContext
Source§fn clone(&self) -> SubagentContext
fn clone(&self) -> SubagentContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SubagentContext
impl Debug for SubagentContext
Source§impl Default for SubagentContext
impl Default for SubagentContext
Source§fn default() -> SubagentContext
fn default() -> SubagentContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SubagentContext
impl<'de> Deserialize<'de> for SubagentContext
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubagentContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubagentContext, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SubagentContext
impl Serialize for SubagentContext
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SubagentContext
impl RefUnwindSafe for SubagentContext
impl Send for SubagentContext
impl Sync for SubagentContext
impl Unpin for SubagentContext
impl UnsafeUnpin for SubagentContext
impl UnwindSafe for SubagentContext
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