pub enum TurnRegistration {
Register,
Skip,
}Expand description
Start one agent turn for block_id with message.
This is the whole of what AgentInputCommand does, verbatim: re-read the
spawn config from block meta, inject identity/muxbus/bashwrap env (failing
closed on the oauth spawn gate), then dispatch to the persistent controller,
the host subprocess path, or the container docker exec path as the block’s
agentMode and controller type require — and finally re-register the agent
for reactive delivery.
Extracted from the agentinput handler body with no behavior change so a
second, non-RPC caller can reach it; see AgentTurnDeps.
Whether starting a turn should also (re-)register the agent for reactive
delivery.
Variants§
Register
The RPC / UI path. Registers, exactly as AgentInputCommand always has.
Skip
The reactive-delivery path (bootstrap::install_agent_turn_delivery).
Skipping is required, for two independent reasons:
- Redundant. That caller resolved this block by looking the agent
up in the reactive handler’s own registry (
uid_to_block/name_to_blocks), so the agent is registered by construction. There is nothing to re-register. - Deadlock.
ReactiveHandler::inject_messageholds the globalMutex<Handler>across the message-sender call, and that sender drives this function to completion on the same thread. The registration below callsget_global_handler().register_agent(...), which locks that samestd::sync::Mutex— which is NOT reentrant. Registering here would block the thread on a lock it already holds, wedging the reactive handler process-wide, on essentially every successful delivery to a subprocess agent (reagent P0 on PR #2930).
Trait Implementations§
Source§impl Clone for TurnRegistration
impl Clone for TurnRegistration
Source§fn clone(&self) -> TurnRegistration
fn clone(&self) -> TurnRegistration
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 TurnRegistration
Source§impl Debug for TurnRegistration
impl Debug for TurnRegistration
impl Eq for TurnRegistration
Source§impl PartialEq for TurnRegistration
impl PartialEq for TurnRegistration
impl StructuralPartialEq for TurnRegistration
Auto Trait Implementations§
impl Freeze for TurnRegistration
impl RefUnwindSafe for TurnRegistration
impl Send for TurnRegistration
impl Sync for TurnRegistration
impl Unpin for TurnRegistration
impl UnsafeUnpin for TurnRegistration
impl UnwindSafe for TurnRegistration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more