use crate::session::Session;
use super::profile_defs::{AgentProfile, *};
#[allow(dead_code)]
pub struct SpawnedAgent {
pub name: String,
pub instructions: String,
pub session: Session,
pub is_processing: bool,
}
pub fn agent_profile(agent_name: &str) -> AgentProfile {
let normalized = agent_name.to_ascii_lowercase();
if normalized.contains("planner") {
return PROFILE_PLANNER;
}
if normalized.contains("research") {
return PROFILE_RESEARCH;
}
if normalized.contains("coder") || normalized.contains("implement") {
return PROFILE_CODER;
}
if normalized.contains("review") {
return PROFILE_REVIEW;
}
if normalized.contains("tester") || normalized.contains("test") {
return PROFILE_TESTER;
}
if normalized.contains("integrat") {
return PROFILE_INTEGRATOR;
}
if normalized.contains("skeptic") || normalized.contains("risk") {
return PROFILE_SKEPTIC;
}
if normalized.contains("summary") || normalized.contains("summarizer") {
return PROFILE_SUMMARIZER;
}
let mut hash: u64 = 2_166_136_261;
for byte in normalized.bytes() {
hash = (hash ^ u64::from(byte)).wrapping_mul(16_777_619);
}
FALLBACK_PROFILES[hash as usize % FALLBACK_PROFILES.len()]
}