pub enum StructuredMessage {
TaskAssignment {
task_id: String,
subject: String,
description: Option<String>,
assigned_by: Option<String>,
timestamp: Option<String>,
},
ShutdownRequest {
request_id: Option<String>,
reason: Option<String>,
},
ShutdownApproved {
request_id: Option<String>,
},
IdleNotification {
agent: String,
last_task_id: Option<String>,
idle_reason: Option<String>,
timestamp: Option<String>,
},
PlanApprovalRequest {
request_id: Option<String>,
plan: String,
},
PlanApprovalResponse {
request_id: Option<String>,
approved: bool,
feedback: Option<String>,
},
}Expand description
Structured message types used by the agent teams protocol.
Serialized with #[serde(tag = "type", rename_all = "snake_case")].
Variants§
TaskAssignment
Assign a task to a teammate.
Native format uses camelCase (taskId, assignedBy).
Fields
ShutdownRequest
Request a teammate to shut down.
ShutdownApproved
Acknowledge a shutdown request.
IdleNotification
Teammate idle notification.
Native format may use "from" instead of "agent", and includes
"idleReason" with values like "available", "working", "blocked".
Fields
PlanApprovalRequest
Request plan approval from lead.
PlanApprovalResponse
Response to a plan approval request.
Implementations§
Trait Implementations§
Source§impl Clone for StructuredMessage
impl Clone for StructuredMessage
Source§fn clone(&self) -> StructuredMessage
fn clone(&self) -> StructuredMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StructuredMessage
impl Debug for StructuredMessage
Source§impl<'de> Deserialize<'de> for StructuredMessage
impl<'de> Deserialize<'de> for StructuredMessage
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StructuredMessage
impl RefUnwindSafe for StructuredMessage
impl Send for StructuredMessage
impl Sync for StructuredMessage
impl Unpin for StructuredMessage
impl UnwindSafe for StructuredMessage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more