""" Status and Health Command Classes This module implements commands for system status and health monitoring. """ from typing import Optional, Dict, Any from dataclasses import dataclass, field from .base import TrixyCommand, CommandResponse, ValidationError @dataclass class StatusRequestCommand(TrixyCommand): """Command to request system status.""" status_type: str = field(default="general") target_component: str = field(default="all") def validate(self) -> bool: return True def get_command_name(self) -> str: return "StatusRequestCommand" @dataclass class HealthCheckCommand(TrixyCommand): """Command to perform health check.""" check_type: str = field(default="basic") def validate(self) -> bool: return True def get_command_name(self) -> str: return "HealthCheckCommand" @dataclass class SystemInfoCommand(TrixyCommand): """Command to request system information.""" info_type: str = field(default="general") def validate(self) -> bool: return True def get_command_name(self) -> str: return "SystemInfoCommand" @dataclass class StatusRequestResponse(CommandResponse): """Response to status request command.""" status_data: Dict[str, Any] = field(default_factory=dict) def validate(self) -> bool: return True def get_response_name(self) -> str: return "StatusRequestResponse" @dataclass class HealthCheckResponse(CommandResponse): """Response to health check command.""" health_status: str = field(default="unknown") health_data: Dict[str, Any] = field(default_factory=dict) def validate(self) -> bool: return True def get_response_name(self) -> str: return "HealthCheckResponse" @dataclass class SystemInfoResponse(CommandResponse): """Response to system info command.""" system_info: Dict[str, Any] = field(default_factory=dict) def validate(self) -> bool: return True def get_response_name(self) -> str: return "SystemInfoResponse" __all__ = [ "StatusRequestCommand", "HealthCheckCommand", "SystemInfoCommand", "StatusRequestResponse", "HealthCheckResponse", "SystemInfoResponse" ]