pub struct SubAgentHandle {
pub id: String,
pub def: SubAgentDef,
pub task_id: String,
pub state: SubAgentState,
pub join_handle: Option<JoinHandle<Result<String, SubAgentError>>>,
pub cancel: CancellationToken,
pub status_rx: Receiver<SubAgentStatus>,
pub grants: PermissionGrants,
pub pending_secret_rx: Receiver<SecretRequest>,
pub secret_tx: Sender<Option<String>>,
pub started_at_str: String,
pub transcript_dir: Option<PathBuf>,
}Expand description
Handle to a spawned sub-agent task.
Fields are public to allow test harnesses in downstream crates to construct handles. audit trail by mutating grants or cancellation state directly.
Fields§
§id: String§def: SubAgentDef§task_id: StringTask ID (UUID). Currently the same as id; separated for future use.
state: SubAgentState§join_handle: Option<JoinHandle<Result<String, SubAgentError>>>§cancel: CancellationToken§status_rx: Receiver<SubAgentStatus>§grants: PermissionGrants§pending_secret_rx: Receiver<SecretRequest>Receives secret requests from the sub-agent loop.
secret_tx: Sender<Option<String>>Delivers approval outcome to the sub-agent loop: None = denied, Some(_) = approved.
started_at_str: StringISO 8601 UTC timestamp recorded when the agent was spawned or resumed.
transcript_dir: Option<PathBuf>Resolved transcript directory at spawn time; None if transcripts were disabled.
Trait Implementations§
Source§impl Debug for SubAgentHandle
impl Debug for SubAgentHandle
Auto Trait Implementations§
impl Freeze for SubAgentHandle
impl !RefUnwindSafe for SubAgentHandle
impl Send for SubAgentHandle
impl Sync for SubAgentHandle
impl Unpin for SubAgentHandle
impl UnsafeUnpin for SubAgentHandle
impl !UnwindSafe for SubAgentHandle
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request