pub struct TeamMessage {Show 18 fields
pub id: String,
pub run_id: String,
pub task_id: Option<String>,
pub kind: TeamMessageKind,
pub sender_agent_id: Option<String>,
pub recipient_agent_id: Option<String>,
pub content: String,
pub thread_id: Option<String>,
pub reply_to_message_id: Option<String>,
pub action_request: Option<TeamActionRequest>,
pub escalation: Option<TeamEscalation>,
pub result_reference: Option<TeamResultReference>,
pub artifact_references: Vec<TeamArtifactReference>,
pub unread_by_agent_ids: Vec<String>,
pub archived_at: Option<DateTime<Utc>>,
pub archived_by_agent_id: Option<String>,
pub archive_note: Option<String>,
pub created_at: DateTime<Utc>,
}Expand description
Message exchanged within a supervisor run.
Fields§
§id: StringMessage identifier.
run_id: StringRun identifier.
task_id: Option<String>Optional task identifier this message refers to.
kind: TeamMessageKindMessage kind.
sender_agent_id: Option<String>Sender agent identifier.
recipient_agent_id: Option<String>Recipient agent identifier.
content: StringHuman-readable content.
thread_id: Option<String>Stable thread identifier.
reply_to_message_id: Option<String>Parent message identifier for replies.
action_request: Option<TeamActionRequest>Actionable request metadata.
escalation: Option<TeamEscalation>Escalation metadata.
result_reference: Option<TeamResultReference>Optional result reference.
artifact_references: Vec<TeamArtifactReference>Linked artifacts.
unread_by_agent_ids: Vec<String>Agents that have not yet read the message.
archived_at: Option<DateTime<Utc>>When this message/thread was archived.
archived_by_agent_id: Option<String>Who archived this message/thread.
archive_note: Option<String>Optional archive note.
created_at: DateTime<Utc>Creation timestamp.
Implementations§
Source§impl TeamMessage
impl TeamMessage
Sourcepub fn new(
run_id: impl Into<String>,
task_id: Option<String>,
kind: TeamMessageKind,
sender_agent_id: Option<String>,
recipient_agent_id: Option<String>,
content: impl Into<String>,
) -> Self
pub fn new( run_id: impl Into<String>, task_id: Option<String>, kind: TeamMessageKind, sender_agent_id: Option<String>, recipient_agent_id: Option<String>, content: impl Into<String>, ) -> Self
Build a new team message.
Sourcepub fn with_thread(
self,
thread_id: String,
reply_to_message_id: Option<String>,
) -> Self
pub fn with_thread( self, thread_id: String, reply_to_message_id: Option<String>, ) -> Self
Attach thread metadata.
Sourcepub fn with_action_request(self, action_request: TeamActionRequest) -> Self
pub fn with_action_request(self, action_request: TeamActionRequest) -> Self
Attach an action request to the message.
Sourcepub fn with_result_reference(
self,
result_reference: TeamResultReference,
) -> Self
pub fn with_result_reference( self, result_reference: TeamResultReference, ) -> Self
Attach a result reference to the message.
Sourcepub fn with_artifact_references(
self,
artifact_references: Vec<TeamArtifactReference>,
) -> Self
pub fn with_artifact_references( self, artifact_references: Vec<TeamArtifactReference>, ) -> Self
Attach artifact references to the message.
Sourcepub fn with_escalation(self, escalation: TeamEscalation) -> Self
pub fn with_escalation(self, escalation: TeamEscalation) -> Self
Attach escalation metadata to the message.
Sourcepub fn with_unread_by_agent_ids(self, unread_by_agent_ids: Vec<String>) -> Self
pub fn with_unread_by_agent_ids(self, unread_by_agent_ids: Vec<String>) -> Self
Attach unread markers to the message.
Sourcepub fn archive(
&mut self,
archived_by_agent_id: Option<String>,
archive_note: Option<String>,
)
pub fn archive( &mut self, archived_by_agent_id: Option<String>, archive_note: Option<String>, )
Mark the message as archived.
Sourcepub fn is_archived(&self) -> bool
pub fn is_archived(&self) -> bool
Whether this message is archived.
Sourcepub fn effective_thread_id(&self) -> &str
pub fn effective_thread_id(&self) -> &str
Return the stable thread id for grouping.
Trait Implementations§
Source§impl Clone for TeamMessage
impl Clone for TeamMessage
Source§fn clone(&self) -> TeamMessage
fn clone(&self) -> TeamMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TeamMessage
impl Debug for TeamMessage
Source§impl<'de> Deserialize<'de> for TeamMessage
impl<'de> Deserialize<'de> for TeamMessage
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 TeamMessage
impl RefUnwindSafe for TeamMessage
impl Send for TeamMessage
impl Sync for TeamMessage
impl Unpin for TeamMessage
impl UnwindSafe for TeamMessage
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].