- 新增 app_metadata 模型、仓储与服务 - 将默认 edge 验证步骤改为由 app_metadata 驱动生成 - 新增 chat_session / chat_message 会话层模型与 chat service - 新增 demo chat API,支持会话创建、消息发送、任务确认 - 新增最小 Web Demo 页面,形成聊天式演示入口 - 增强任务报告,补充 audit_summary 与更细粒度 task_metrics - 增强 edge-agent 执行器:tcp_probe、日志时间范围过滤、进程指标与更灵活健康检查 - 更新 README 与当前进度总结,MVP 进度推进到约 94%
29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
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)
|