pub enum ClientMsg {
Answer {
req_id: String,
value: Value,
},
HookAck {
req_id: String,
ok: bool,
reason: Option<String>,
},
SpawnAck {
req_id: String,
value: Value,
ok: bool,
error: Option<String>,
},
}Expand description
Client → server reply messages on WS /v1/operators/:sid/ws. Each variant
resolves the pending oneshot registered under its req_id
(see super::session::WSOperatorSession::resolve_pending).
Variants§
Answer
Reply to ServerMsg::Ask (SeniorBridge.ask result).
Fields
HookAck
Ack for SpawnHook.before. ok=false rejects the spawn
(= MainAIMiddleware converts it into SpawnError::RejectedByMiddleware).
reason propagates as Err(reason).
Fields
SpawnAck
Ack for Operator.execute (Spawn). value = WorkerResult.value,
ok = WorkerResult.ok. When error is Some, the Operator returns
it as WorkerError.
After the thin-path switch (= the thin-control axis): if the MainAI returns this ack
after the SubAgent has hit HTTP /v1/worker/result, the server-side
dispatch path can complete with both the Final in output_tail and
this ack’s value aligned. Sending an empty JSON {} for value makes
the task.last_result written by the HTTP path (= post_result)
canonical (= the ack-side value is duplicate / informational).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ClientMsg
impl<'de> Deserialize<'de> for ClientMsg
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>,
Auto Trait Implementations§
impl Freeze for ClientMsg
impl RefUnwindSafe for ClientMsg
impl Send for ClientMsg
impl Sync for ClientMsg
impl Unpin for ClientMsg
impl UnsafeUnpin for ClientMsg
impl UnwindSafe for ClientMsg
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more