from __future__ import annotations from app.executors.log_executor import GrepLogExecutor from app.executors.http_executor import HttpHealthCheckExecutor from app.executors.port_executor import PortCheckExecutor from app.executors.process_executor import ProcessCheckExecutor from app.executors.tcp_probe_executor import TcpProbeExecutor from app.executors.linux_service_executor import LinuxServiceExecutor from app.executors.windows_service_executor import WindowsServiceExecutor class ToolRegistry: def __init__(self) -> None: self._executors = { "http_health_check": HttpHealthCheckExecutor(), "tcp_probe": TcpProbeExecutor(), "check_port": PortCheckExecutor(), "check_process": ProcessCheckExecutor(), "grep_log": GrepLogExecutor(), "linux_service_control": LinuxServiceExecutor(), "windows_service_control": WindowsServiceExecutor(), } def capabilities(self) -> list[str]: return sorted(self._executors.keys()) def get(self, tool_name: str): return self._executors.get(tool_name)