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§impl Debug for SubagentContext
impl Debug for SubagentContext
Source§impl Default for SubagentContext
impl Default for SubagentContext
Source§impl<'de> Deserialize<'de> for SubagentContext
impl<'de> Deserialize<'de> for SubagentContext
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
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