
    
Bj                     H   U d Z ddlmZ ddlmZ  G d de      Z ed edd	      fd
 edd	      fd edd	      fd edd	      fd edd	      fd edd	      fd edd	      fd edd	      fd ed d!	      fd" ed#d$	      fd% ed&d'	      fd( ed)d*	      fd+ ed,d-	      fd. ed/d0	      fd1 ed2d3	      fd4 ed5d6	      fd7 ed8d9	      fd: ed;d<	      fd= ed>d?	      fd@ edAdB	      fdC edDdE	      fg      Zeeef   edF<   dMdGedHedIefdJZ	dNdKZ
yL)Oa  
Shared platform registry for Hermes Agent.

Single source of truth for platform metadata consumed by both
skills_config (label display) and tools_config (default toolset
resolution).  Import ``PLATFORMS`` from here instead of maintaining
duplicate dicts in each module.
    )OrderedDict)
NamedTuplec                   &    e Zd ZU dZeed<   eed<   y)PlatformInfoz%Metadata for a single platform entry.labeldefault_toolsetN)__name__
__module____qualname____doc__str__annotations__     9/home/ubuntu/.hermes/hermes-agent/hermes_cli/platforms.pyr   r      s    /Jr   r   cliu   🖥️  CLIz
hermes-clir   r   telegramu   📱 Telegramzhermes-telegramdiscordu   💬 Discordzhermes-discordslacku
   💼 Slackzhermes-slackwhatsappu   📱 WhatsAppzhermes-whatsappsignalu   📡 Signalzhermes-signalbluebubblesu   💙 BlueBubbleszhermes-bluebubblesemailu
   📧 Emailzhermes-emailhomeassistantu   🏠 Home Assistantzhermes-homeassistant
mattermostu   💬 Mattermostzhermes-mattermostmatrixu   💬 Matrixzhermes-matrixdingtalku   💬 DingTalkzhermes-dingtalkfeishuu   🪽 Feishuzhermes-feishuwecomu
   💬 WeComzhermes-wecomwecom_callbacku   💬 WeCom Callbackzhermes-wecom-callbackweixinu   💬 Weixinzhermes-weixinqqbotu
   💬 QQBotzhermes-qqbotyuanbaou   🤖 Yuanbaozhermes-yuanbaowebhooku   🔗 Webhookzhermes-webhook
api_serveru   🌐 API Serverzhermes-api-servercronu   ⏰ Cronzhermes-cron	PLATFORMSkeydefaultreturnc                    t         j                  |       }||j                  S 	 ddlm} |j                  |       }|r3|j
                  r|j
                   d|j                   S |j                  S 	 |S # t        $ r Y |S w xY w)zReturn the display label for a platform key, or *default*.

    Checks the static PLATFORMS dict first, then the plugin platform
    registry for dynamically registered platforms.
    r   platform_registry  )r(   getr   gateway.platform_registryr.   emoji	Exception)r)   r*   infor.   entrys        r   platform_labelr6   .   s     ==Dzz?!%%c*6;kkekk]"U[[M2Ru{{R  N  Ns   ?A4 %A4 4	B Bc                  L   t        t              } 	 ddlm} |j	                         D ]i  }|j
                  | vst        |j                  r|j                   d|j                   n|j                  d|j
                         | |j
                  <   k 	 | S # t        $ r Y | S w xY w)zReturn PLATFORMS merged with any plugin-registered platforms.

    Plugin platforms are appended after builtins.  This is the function
    that tools_config and skills_config should use for platform menus.
    r   r-   r/   zhermes-r   )
r   r(   r1   r.   plugin_entriesnamer   r2   r   r3   )mergedr.   r5   s      r   get_all_platformsr;   B   s     #F	?&557 	Ezz'%1=B[[U[[MEKK=9ekk&-ejj\$:&uzz"	 M  Ms   'B AB 	B#"B#N) )r+   zOrderedDict[str, PlatformInfo])r   collectionsr   typingr   r   r(   r   r   r6   r;   r   r   r   <module>r?      s   $ :  -8
|.Uabc|/Rcde|.Rbcd|,R`ab|/Rcde|-Rabc|*<Rfgh|,R`ab|*?Rhij|*;Refg|-Rabc|/Rcde|-Rabc|,R`ab|*?Rijk|-Rabc|,R`ab|.Rbcd|.Rbcd|*;Refg|*Q^_`+9 -	;sL() 2 c 3 (r   