pub struct AgentProcess {
pub agent_id: CompactString,
pub parent_session_id: CompactString,
pub role: AgentRole,
pub isolation: AgentIsolation,
pub context_inheritance: ContextInheritance,
pub state: ProcessState,
pub permitted_capability_ids: Vec<CompactString>,
pub result: Option<SubAgentResult>,
}Expand description
A sub-agent process registered by the kernel.
The kernel owns only declarative lifecycle state. Host execution, worktree/remote isolation, I/O, and concurrency remain SDK concerns.
Fields§
§agent_id: CompactString§parent_session_id: CompactString§role: AgentRole§isolation: AgentIsolation§context_inheritance: ContextInheritance§state: ProcessState§permitted_capability_ids: Vec<CompactString>§result: Option<SubAgentResult>Implementations§
Source§impl AgentProcess
impl AgentProcess
Sourcepub fn from_tcb(tcb: &Tcb) -> Option<Self>
pub fn from_tcb(tcb: &Tcb) -> Option<Self>
Reconstruct an AgentProcess from a child crate::scheduler::tcb::Tcb (M1 收口).
Returns None for the root task (no proc). This is the bridge that makes the
AgentProcess records a derived view over the kernel’s TaskTable: the sub-agent’s
declarative identity lives on the TCB, and the AgentProcess shape — the SDK ABI /
session-log contract — is rebuilt on demand without a second source of truth.
pub fn result_termination_label(&self) -> Option<&'static str>
Trait Implementations§
Source§impl Clone for AgentProcess
impl Clone for AgentProcess
Source§fn clone(&self) -> AgentProcess
fn clone(&self) -> AgentProcess
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 AgentProcess
impl Debug for AgentProcess
Source§impl<'de> Deserialize<'de> for AgentProcess
impl<'de> Deserialize<'de> for AgentProcess
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 AgentProcess
impl RefUnwindSafe for AgentProcess
impl Send for AgentProcess
impl Sync for AgentProcess
impl Unpin for AgentProcess
impl UnsafeUnpin for AgentProcess
impl UnwindSafe for AgentProcess
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