+
    i2Q                        R t ^ RIHtHtHtHtHt . RNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'Nt/ R(R)R*R+RR.R,. /bR-R)R.R+R.R,. /bR/R)R0R+R
.R,. /bR1R)R2R+R.R,. /bRR)R3R+RR.R,. /bR4R)R5R+R.R,. /bR6R)R7R+. ROR,. /bR8R)R9R+. ROR,. /bR"R)R:R+R".R,. /bR;R)R<R+R#.R,. /bR=R)R>R+. ROR,. /bR?R)R@R+. ROR,. /bRAR)RBR+R.R,. /bRR)RCR+R.R,. /bRR)RDR+R.R,. /bRR)RER+R.R,. /bRR)RFR+R.R,. /b/ RGR)RHR+R .R,. /bRIR)RJR+R!.R,. /bRKR)RLR+. ROR,. /bRMR)RNR+RR.R,R(R?./bROR)RPR+R.R,. RO/bRQR)RRR+. ROR,. /bRSR)RTR+. RNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR$NR%NR&NR'NR,. /bRUR)RVR+]R,. /bRWR)RXR+]R,. /bRYR)RZR+]R,. /bR[R)R\R+]R,. /bR]R)R^R+]R,. /bR_R)R`R+]R,. /bRaR)RbR+]R,. /bRcR)RdR+]R,. /bReR)RfR+]R,. /bRgR)RhR+]R,. /bCRiR)RjR+]R,. /RkR)RlR+]R,. /RmR)RnR+]R,. /RoR)RpR+]R,. /RqR)RrR+]R,. /RsR)RtR+. R,. RO//CtRu Rv lt	RRx Ry llt
Rz R{ ltR| R} ltR~ R ltR R ltR R ltRR R lltR R lt]R8X  Ed   ]! R4       ]! R4       ]! R4       ]! R4       ]! 4       P)                  4        FS  w  tt]! ]4      t]R,          '       d   RMRt]! R] R]R R]R),           24       ]! R]! ]R,          4       R24       KU  	  ]! R4       ]! R4       R F@  t]
! ]4      t]! R] R24       ]! R]! ]4       RRP7                  ]! ]4      4       24       KB  	  ]! R4       ]! R4       ]! . RO4      t]! R4       ]! RRP7                  ]! ]4      4       24       ]! R4       ]! R4       ]! RRR.RR/.R7       ]! R4      t]! R4       ]! R]R),           24       ]! RRP7                  ]R,          4       24       Rw# Rw# )a  
Toolsets Module

This module provides a flexible system for defining and managing tool aliases/toolsets.
Toolsets allow you to group tools together for specific scenarios and can be composed
from individual tools or other toolsets.

Features:
- Define custom toolsets with specific tools
- Compose toolsets from other toolsets
- Built-in common toolsets for typical use cases
- Easy extension for new toolsets
- Support for dynamic toolset resolution

Usage:
    from toolsets import get_toolset, resolve_toolset, get_all_toolsets
    
    # Get tools for a specific toolset
    tools = get_toolset("research")
    
    # Resolve a toolset to get all tool names (including from composed toolsets)
    all_tools = resolve_toolset("full_stack")
)ListDictAnySetOptional
web_searchweb_extractterminalprocess	read_file
write_filepatchsearch_filesvision_analyzeimage_generatemixture_of_agentsskills_list
skill_viewskill_managebrowser_navigatebrowser_snapshotbrowser_clickbrowser_typebrowser_scrollbrowser_backbrowser_pressbrowser_closebrowser_get_imagesbrowser_visionbrowser_consoletext_to_speechtodomemorysession_searchclarifyexecute_codedelegate_taskcronjobsend_messageha_list_entitiesha_get_stateha_list_servicesha_call_servicewebdescriptionz)Web research and content extraction toolstoolsincludessearchz0Web search only (no content extraction/scraping)visionzImage analysis and vision tools	image_genz"Creative generation tools (images)z7Terminal/command execution and process management toolsmoaz,Advanced reasoning and problem-solving toolsskillsz\Access, create, edit, and manage skill documents with specialized instructions and knowledgebrowserz|Browser automation for web interaction (navigate, click, type, scroll, iframes, hold-click) with web search for finding URLszbCronjob management tool - create, list, update, pause, resume, remove, and trigger scheduled tasks	messagingzNCross-platform messaging: send messages to Telegram, Discord, Slack, SMS, etc.rlzFRL training tools for running reinforcement learning on Tinker-Atroposfilez_File manipulation tools: read, write, patch (with fuzzy matching), and search (content + files)ttszQText-to-speech: convert text to audio with Edge TTS (free), ElevenLabs, or OpenAIz.Task planning and tracking for multi-step workzAPersistent memory across sessions (personal notes + user profile)z7Search and recall past conversations with summarizationzAAsk the user clarifying questions (multiple-choice or open-ended)code_executionzMRun Python scripts that call tools programmatically (reduces LLM round trips)
delegationz:Spawn subagents with isolated context for complex subtaskshomeassistantz0Home Assistant smart home control and monitoring	debuggingz%Debugging and troubleshooting toolkitsafez$Safe toolkit without terminal accessz
hermes-acpum   Editor integration (VS Code, Zed, JetBrains) — coding-focused tools without messaging, audio, or clarify UIzhermes-api-serveru|   OpenAI-compatible API server — full agent tools accessible via HTTP (no interactive UI tools like clarify or send_message)z
hermes-clizHFull interactive CLI toolset - all default tools plus cronjob managementhermes-telegramzPTelegram bot toolset - full access for personal use (terminal has safety checks)hermes-discordz]Discord bot toolset - full access (terminal has safety checks via dangerous command approval)hermes-whatsappzMWhatsApp bot toolset - similar to Telegram (personal messaging, more trusted)hermes-slackzNSlack bot toolset - full access for workspace use (terminal has safety checks)hermes-signalz?Signal bot toolset - encrypted messaging platform (full access)hermes-homeassistantzDHome Assistant bot toolset - smart home event monitoring and controlhermes-emailz>Email bot toolset - interact with Hermes via email (IMAP/SMTP)hermes-mattermostzAMattermost bot toolset - self-hosted team messaging (full access)hermes-matrixzDMatrix bot toolset - decentralized encrypted messaging (full access)hermes-dingtalkzBDingTalk bot toolset - enterprise messaging platform (full access)hermes-feishuzLFeishu/Lark bot toolset - enterprise messaging via Feishu/Lark (full access)hermes-wecomz=WeCom bot toolset - enterprise WeChat messaging (full access)
hermes-smsz7SMS bot toolset - interact with Hermes via SMS (Twilio)hermes-webhookz=Webhook toolset - receive and process external webhook eventszhermes-gatewayz7Gateway toolset - union of all messaging platform toolsc                h    V ^8  d   QhR\         R\        \        \         \        3,          ,          /#    namereturn)strr   r   r   )formats   "%/home/ubuntu/hermes-agent/toolsets.py__annotate__rV   }  s'      c htCH~6     c                ,    \         P                  V 4      # )z
Get a toolset definition by name.

Args:
    name (str): Name of the toolset
    
Returns:
    Dict: Toolset definition with description, tools, and includes
    None: If toolset not found
)TOOLSETSgetrQ   s   &rU   get_toolsetr\   }  s     <<rW   Nc                h    V ^8  d   QhR\         R\        \         ,          R\        \         ,          /# )rP   rQ   visitedrR   )rS   r   r   )rT   s   "rU   rV   rV     s)     9 9# 9C 9DI 9rW   c                   Vf   \        4       pV R9   dQ   \        4       p\        4        F-  p\        W1P                  4       4      pVP	                  V4       K/  	  \        V4      # W9   d   . # VP                  V 4       \        P                  V 4      pV'       g_   V \        4       9   dN    ^ RI
Hp VP                  P                  4        Uu. uF!  qwP                  V 8X  g   K  VP                  NK#  	  up# . # \        VP                  R. 4      4      pVP                  R. 4       F  p	\        W4      p
VP	                  V
4       K!  	  \        V4      # u upi   \          d     . # i ; i)al  
Recursively resolve a toolset to get all tool names.

This function handles toolset composition by recursively resolving
included toolsets and combining all tools.

Args:
    name (str): Name of the toolset to resolve
    visited (Set[str]): Set of already visited toolsets (for cycle detection)
    
Returns:
    List[str]: List of all tool names in the toolset
registryr/   r0   >   *all)setget_toolset_namesresolve_toolsetcopyupdatelistaddrY   rZ   _get_plugin_toolset_namestools.registryra   _toolsvaluestoolsetrQ   	Exception)rQ   r^   	all_toolstoolset_nameresolvedro   ra   er/   included_nameincluded_toolss   &&         rU   rf   rf     s?    % |!e	-/L&|\\^DHX& 0 I
 	KK ll4 G,..3(0(>(>(@V(@1IIQUDU(@VV 	 GR()E
 !Z4(@^$ 5 ; W 	s*   ,"E E%E5E E E)(E)c                \    V ^8  d   QhR\         \        ,          R\         \        ,          /# )rP   toolset_namesrR   r   rS   )rT   s   "rU   rV   rV     s"      T#Y 49 rW   c                v    \        4       pV  F  p\        V4      pVP                  V4       K!  	  \        V4      # )z
Resolve multiple toolsets and combine their tools.

Args:
    toolset_names (List[str]): List of toolset names to resolve
    
Returns:
    List[str]: Combined list of all tool names (deduplicated)
)rd   rf   rh   ri   )rx   rq   rQ   r/   s   &   rU   resolve_multiple_toolsetsr{     s9     I%  	?rW   c                :    V ^8  d   QhR\         \        ,          /# rP   rR   )r   rS   )rT   s   "rU   rV   rV     s      3s8 rW   c                      ^ RI Hp  V P                  P                  4        Uu0 uF&  pVP                  \
        9  g   K  VP                  kK(  	  up# u upi   \         d    \        4       u # i ; i)u   Return toolset names registered by plugins (from the tool registry).

These are toolsets that exist in the registry but not in the static
``TOOLSETS`` dict — i.e. they were added by plugins at load time.
r`   )rl   ra   rm   rn   ro   rY   rp   rd   )ra   entrys     rU   rk   rk     sh    + "//1
1}}H, EMM1
 	
 

  us(   "A A AA A A0/A0c                h    V ^8  d   QhR\         \        \         \        \        3,          3,          /# r}   )r   rS   r   )rT   s   "rU   rV   rV     s%      $sDcN23 rW   c                 <   \         P                  4       p \        4        Fb  pW9  g   K   ^ RIHp VP
                  P                  4        Uu. uF!  q3P                  V8X  g   K  VP                  NK#  	  ppRRV 2RV/W&   Kd  	  V # u upi   \         d     K{  i ; i)z
Get all available toolsets with their definitions.

Includes both statically-defined toolsets and plugin-registered ones.

Returns:
    Dict: All toolset definitions
r`   r.   zPlugin toolset: r/   )
rY   rg   rk   rl   ra   rm   rn   ro   rQ   rp   )resultts_namera   rt   r/   s        rU   get_all_toolsetsr     s     ]]_F,. 3)1)?)?)AZ)AAYYRYEY)AZ!%5gY#?U# / M [
  s)   "BB$B4BBBBc                :    V ^8  d   QhR\         \        ,          /# r}   ry   )rT   s   "rU   rV   rV     s      49 rW   c                 t    \        \        P                  4       4      p V \        4       ,          p \	        V 4      # )z
Get names of all available toolsets (excluding aliases).

Includes plugin-registered toolset names.

Returns:
    List[str]: List of toolset names
)rd   rY   keysrk   sorted)namess    rU   re   re     s,      E	&((E%=rW   c                0    V ^8  d   QhR\         R\        /# rO   )rS   bool)rT   s   "rU   rV   rV     s     / /3 /4 /rW   c                H    V R9   d   R# V \         9   d   R# V \        4       9   # )z
Check if a toolset name is valid.

Args:
    name (str): Toolset name to validate
    
Returns:
    bool: True if valid, False otherwise
T>   rb   rc   )rY   rk   r[   s   &rU   validate_toolsetr     s)     |x,...rW   c          
      x    V ^8  d   QhR\         R\         R\        \         ,          R\        \         ,          RR/# )rP   rQ   r.   r/   r0   rR   N)rS   r   )rT   s   "rU   rV   rV   (  sB      
 9 3i	
 
rW   c                L    RTRT;'       g    . RT;'       g    . /\         V &   R# )z
Create a custom toolset at runtime.

Args:
    name (str): Name for the new toolset
    description (str): Description of the toolset
    tools (List[str]): Direct tools to include
    includes (List[str]): Other toolsets to include
r.   r/   r0   N)rY   rQ   r.   r/   r0   s   &&&&rU   create_custom_toolsetr   (  s*      	{"HNNHTNrW   c                R    V ^8  d   QhR\         R\        \         \        3,          /# rO   )rS   r   r   )rT   s   "rU   rV   rV   @  s"      3 4S> rW   c                    \        V 4      pV'       g   R# \        V 4      pRV RVR,          RVR,          RVR,          RVR\        V4      R	\        VR,          4      ^ 8  /# )
z
Get detailed information about a toolset including resolved tools.

Args:
    name (str): Toolset name
    
Returns:
    Dict: Detailed toolset information
NrQ   r.   direct_toolsr/   r0   resolved_tools
tool_countis_composite)r\   rf   len)rQ   ro   r   s   &  rU   get_toolset_infor   @  sp     $G$T*N 	w}-(GJ'.c.)GJ/014 rW   __main__zToolsets System Demoz
Available Toolsets:r   z[composite]z[leaf]z   20z - z     Tools: r   z totalz
Toolset Resolution Examples:z
  :z    Resolved to z tools: z, z
Multiple Toolset Resolution:z*  Combining ['web', 'vision', 'terminal']:z    Result: z
Custom Toolset Creation:	my_customz$My custom toolset for specific tasksr   z  Created 'my_custom' toolset:z    Description: z    Resolved tools: )r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   )
rl_list_environmentsrl_select_environmentrl_get_current_configrl_edit_configrl_start_trainingrl_check_statusrl_stop_trainingrl_get_resultsrl_list_runsrl_test_inference)r   r   r   r   )r)   r*   r+   r,   )r-   r2   r3   )r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r!   r"   r#   r%   r&   )r@   rA   rB   rC   rD   rE   rF   rL   rG   rH   rI   rJ   rK   rM   )N)NNz<============================================================z(----------------------------------------)r-   r	   r?   r>   )r-   r2   r	   )__doc__typingr   r   r   r   r   _HERMES_CORE_TOOLSrY   r\   rf   r{   rk   r   re   r   r   r   __name__printitemsrQ   ro   info	compositer   r/   joinr   combinedcustom_info rW   rU   <module>r      s~
  0 2 1
""" 	" 	" " "  '" )7" " '" " "  " "0" " +" -<" " %" '5"  !"  %!"  ';!"" #"" (#"& '"* +"* +". /"2 3"6 7"6 $7": ;"> ?"B C"B 'C"B );C"B =NC" Ns	B,.Bs I,Bs 8"#Bs( ;"#B)s4 P*i(B5s@ 
E%&BAsL u>BMsX   V 
 	B	Ysn {)Bosz g.!B{sF 	_ 
 	B
Gs^ xEB_sj 
j"#Bksv G&BwsB Z(BCsN P"#BOsZ Z)B[sf f.!Bgsr S/"BssD I\BEsV >*i(UFOWsb =%&2cs|   G 
 	B!}sb   V 

'
 	
 "	
 
 &
 (/
 1?
 
 /
  
 
 (
 *8
 
 !3
 5D
 
 -
 /=
  !
  -!
  /C!
" #
" 0#
& '
& '
* +
. /
. ,/
2 3
6 7
6 !/7
6 1C7
6 EV7
< 	BA!csh a#Bist i#Bus@ v#BAsL f#BMsX g#BYsd X#Besp ]#Bqs| W#B}sH Z#BIsT ]#BUs` [#B e#B V#B P#B V#B P  P]	sn	9x&"2 /&0: z	
 !	(O	
!"	(O)+113g%%).%9%9Mx	9+QtBis7=+A*BCDS&6!789@A	 4 

*+	(O8%TF!n UHTYYve}5M4NOP 9
 

*+	(O()FGH	
67	L6(#345
67	
&'	(O:nh'	 #;/K	
*+	k-89
:;	 ;7G+H!I J
KLI rW   