pub mod server;
pub use server::{IpcServer, IpcState, start_ipc_server};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TaskSubmitRequest {
pub description: String,
#[serde(default = "default_priority")]
pub priority: String,
#[serde(default = "default_task_type")]
pub task_type: String,
pub details: Option<String>,
}
fn default_priority() -> String {
"medium".to_string()
}
fn default_task_type() -> String {
"development".to_string()
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TaskSubmitResponse {
pub success: bool,
pub task_id: Option<String>,
pub error: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct HealthResponse {
pub status: String,
pub uptime_secs: u64,
pub version: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct StatusResponse {
pub master_id: String,
pub active_agents: usize,
pub pending_tasks: usize,
pub running_tasks: usize,
pub completed_tasks: usize,
pub phase: String,
pub uptime_secs: u64,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ShutdownRequest {
pub reason: Option<String>,
#[serde(default)]
pub force: bool,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ShutdownResponse {
pub success: bool,
pub message: String,
}
pub const DEFAULT_IPC_PORT: u16 = 8080;
pub const DEFAULT_IPC_HOST: &str = "127.0.0.1";