Skip to main content

claude_rust_coordinator/domain/
team.rs

1use serde::{Deserialize, Serialize};
2
3use super::agent::AgentId;
4
5#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
6pub struct TeamId(pub String);
7
8impl TeamId {
9    pub fn new(id: impl Into<String>) -> Self {
10        Self(id.into())
11    }
12}
13
14impl std::fmt::Display for TeamId {
15    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16        write!(f, "{}", self.0)
17    }
18}
19
20#[derive(Debug, Clone, Serialize, Deserialize)]
21pub struct Team {
22    pub id: TeamId,
23    pub name: String,
24    pub members: Vec<AgentId>,
25    pub description: String,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct TeamMessage {
30    pub from: AgentId,
31    pub to: AgentId,
32    pub content: String,
33    pub timestamp: u64,
34}