from __future__ import annotations import logging logger = logging.getLogger(__name__) async def check_admin_key_valid(admin_key: str) -> bool: from yuxi.channel.extensions.kakaotalk.bot import KakaoTalkBotClient try: client = KakaoTalkBotClient(admin_key=admin_key) return await client.probe() except Exception: return False async def check_skill_server_connectivity(skill_server_url: str) -> bool: import httpx try: async with httpx.AsyncClient(timeout=httpx.Timeout(5.0)) as client: resp = await client.post( skill_server_url, json={"dummy": True}, headers={"Content-Type": "application/json"}, ) return resp.status_code < 500 except Exception: return False