namespace ControlCenter.Api.Dtos; /// /// Data transfer object for broadcasting agent status updates /// to all connected SignalR clients. /// public class AgentStatusUpdateDto { /// /// Agent identifier, e.g. "otto", "dex", "rex". /// Not null — every update must identify the agent it refers to. /// public string AgentId { get; set; } = string.Empty; /// /// Human-readable display name, e.g. "Otto", "Dex". /// Not null — used by clients to render agent cards. /// public string DisplayName { get; set; } = string.Empty; /// /// Role description, e.g. "Orchestrator Agent", "Backend Specialist". /// Not null — provides context for the agent's function. /// public string Role { get; set; } = string.Empty; /// /// Current operational status of the agent. /// Maps to values as lowercase strings: /// "active", "idle", "thinking", "error". /// public string Status { get; set; } = string.Empty; /// /// Description of the agent's current task, if any. /// Null when the agent is idle with no active task. /// public string? CurrentTask { get; set; } /// /// Task progress percentage (0–100). /// Null when progress is not trackable for the current task. /// public int? TaskProgress { get; set; } /// /// Elapsed time string for the current task, e.g. "04m 12s". /// Null when no task is active. /// public string? TaskElapsed { get; set; } /// /// Full session key, e.g. "agent:otto:telegram:direct:8787451565". /// Not null — uniquely identifies the agent session. /// public string SessionKey { get; set; } = string.Empty; /// /// Communication channel the agent is operating on, e.g. "telegram", "discord", "slack". /// Not null — every agent session operates on exactly one channel. /// public string Channel { get; set; } = string.Empty; /// /// ISO 8601 timestamp of the agent's last activity. /// Not null — used by clients to detect stale connections. /// public string LastActivity { get; set; } = string.Empty; /// /// Error message when the agent status is "error". /// Null when the agent is not in an error state. /// public string? ErrorMessage { get; set; } }