codetether_agent/agent/swarm/
actor_impl.rs1use crate::agent::Agent;
13use crate::swarm::{Actor, ActorStatus};
14use anyhow::Result;
15use async_trait::async_trait;
16
17#[async_trait]
18impl Actor for Agent {
19 fn actor_id(&self) -> &str {
20 &self.info.name
21 }
22 fn actor_status(&self) -> ActorStatus {
23 ActorStatus::Ready
24 }
25
26 async fn initialize(&mut self) -> Result<()> {
27 tracing::info!(agent = %self.info.name, "Agent initialized for swarm participation");
28 Ok(())
29 }
30
31 async fn shutdown(&mut self) -> Result<()> {
32 tracing::info!(agent = %self.info.name, "Agent shutting down");
33 Ok(())
34 }
35}