pub enum ControlRequest {
Show 13 variants
Authenticate {
token: String,
},
Spawn {
args: Box<SpawnArgs>,
},
Status {
run_id: String,
},
Pause {
run_id: String,
},
Resume {
run_id: String,
},
Cancel {
run_id: String,
},
List,
Message {
agent_id: String,
content: String,
target_region: Option<String>,
},
ListInteractions,
AnswerInteraction {
response: InteractionResponse,
},
CancelInteraction {
request_id: String,
},
Shutdown,
Subscribe,
}Expand description
A control request over the wire. Agents are addressed by run id (the stable
id), except Message, which targets an agent id.
Variants§
Authenticate
Prove the caller is this user, by quoting the daemon’s control token.
Must be the first request on a connection. Until it succeeds the daemon
answers nothing else - see ControlToken for why.
Spawn
Spawn a new agent.
Fields
Status
Query a run’s status.
Pause
Pause a run.
Resume
Resume a paused run.
Cancel
Cancel a run.
List
List every known live run and its status.
Message
Deliver a message to a running agent.
Fields
ListInteractions
List open interactions awaiting an answer.
AnswerInteraction
Answer an open interaction.
Fields
response: InteractionResponseThe answer (its request_id selects the interaction).
CancelInteraction
Cancel an open interaction.
Shutdown
Shut the daemon down.
Subscribe
Switch this connection to an event stream: the daemon writes newline-JSON
WorldEvents until the client disconnects. No per-request reply.
Trait Implementations§
Source§impl Clone for ControlRequest
impl Clone for ControlRequest
Source§fn clone(&self) -> ControlRequest
fn clone(&self) -> ControlRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ControlRequest
impl Debug for ControlRequest
Source§impl<'de> Deserialize<'de> for ControlRequest
impl<'de> Deserialize<'de> for ControlRequest
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>,
Source§impl PartialEq for ControlRequest
impl PartialEq for ControlRequest
Source§impl Serialize for ControlRequest
impl Serialize for ControlRequest
impl StructuralPartialEq for ControlRequest
Auto Trait Implementations§
impl Freeze for ControlRequest
impl RefUnwindSafe for ControlRequest
impl Send for ControlRequest
impl Sync for ControlRequest
impl Unpin for ControlRequest
impl UnsafeUnpin for ControlRequest
impl UnwindSafe for ControlRequest
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,
impl<T> ConditionalSend for Twhere
T: Send,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§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.Source§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.