//! AgentRequest / AgentResponse — serialization boundary with Python agent.

use serde::{Deserialize, Serialize};

use crate::types::Task;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AgentRequest {
    pub task: Task,
    #[serde(default)]
    pub memory_context: String,
    #[serde(default)]
    pub tools: Vec<String>,
    #[serde(default)]
    pub model: String,
    #[serde(default)]
    pub system_prompt: String,
    #[serde(default)]
    pub prefetch_used: bool,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AgentResponse {
    pub task_id: String,
    #[serde(default)]
    pub result: String,
    #[serde(default)]
    pub tools_called: Vec<String>,
    #[serde(default)]
    pub broadcasts: Vec<String>,
    pub tokens_used: Option<u64>,
    #[serde(default)]
    pub duration_seconds: f64,
    pub error: Option<String>,
    #[serde(default)]
    pub success: bool,
}
