#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""网络健康检查Skill"""

import sys
import os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))

from skills.base_skill import BaseSkill
from network_tools import run_network_health_check


class NetworkHealthSkill(BaseSkill):
    """网络健康检查Skill"""
    
    def get_metadata(self):
        return {
            "name": "network_health",
            "display_name": "网络健康检查",
            "description": "综合检查网络健康状况(网卡/网关/DNS/外网/延迟)",
            "category": "advanced",
            "keywords": ["健康", "检查", "诊断", "网络", "综合"],
            "parameters": [],
            "examples": [
                "网络健康检查",
                "检查网络",
                "诊断网络问题"
            ],
            "requires_admin": False,
            "requires_ui": False
        }
    
    def execute(self) -> str:
        """执行网络健康检查"""
        return run_network_health_check()
