pub enum SpawnOrigin {
Explicit,
Autonomous,
}Expand description
Classifies what triggered a given spawn attempt, for DelegationMode enforcement
(spec 042-subagent-delegation-mode-parity, issue #5857).
§Fail-closed default
SpawnOrigin::default is SpawnOrigin::Autonomous — the restrictive value, not the
permissive one. An untagged or forgotten SpawnContext therefore reads as Autonomous
and is denied under DelegationMode::ExplicitRequestOnly/DelegationMode::Disabled,
never silently allowed. Only a caller that explicitly sets origin = SpawnOrigin::Explicit
(after auditing that the trigger really is a direct, attributable user action) can bypass
the explicit_request_only restriction. A mistagged legitimate spawn fails visibly (a
tracing::warn! plus a denied spawn); a mistagged illegitimate one can never be silently
let through.
Variants§
Explicit
A direct, attributable user action in the current turn (e.g. /agent spawn,
/agent resume) — always permitted except under delegation_mode = "disabled".
Autonomous
Autonomous planner/scheduler decision-making with no corresponding explicit user
request in the current turn (e.g. the orchestration scheduler’s DAG dispatch). Denied
under delegation_mode = "explicit_request_only" and "disabled".
Trait Implementations§
Source§impl Clone for SpawnOrigin
impl Clone for SpawnOrigin
Source§fn clone(&self) -> SpawnOrigin
fn clone(&self) -> SpawnOrigin
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SpawnOrigin
Source§impl Debug for SpawnOrigin
impl Debug for SpawnOrigin
Source§impl Default for SpawnOrigin
impl Default for SpawnOrigin
impl Eq for SpawnOrigin
Source§impl PartialEq for SpawnOrigin
impl PartialEq for SpawnOrigin
impl StructuralPartialEq for SpawnOrigin
Auto Trait Implementations§
impl Freeze for SpawnOrigin
impl RefUnwindSafe for SpawnOrigin
impl Send for SpawnOrigin
impl Sync for SpawnOrigin
impl Unpin for SpawnOrigin
impl UnsafeUnpin for SpawnOrigin
impl UnwindSafe for SpawnOrigin
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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>
T in a tonic::Request