+
    lHàj–
  ã                  ó¨   a € 0 t $ R t^ RIHt ^ RIHtHt ^ RIHt Rt	Rt
Rt/ tR]R&   R R	 ltR
 R ltR R ltR R ltR R ltR R ltR R ltR# )a‡  Configurable tool-output truncation limits (``tool_output`` in config.yaml):
``max_bytes`` (terminal output cap), ``max_lines`` (read_file pagination cap),
``max_line_length`` (per-line cap before '... [truncated]'). Defaults equal the
constants once hardcoded in terminal_tool / file_operations and the reader never
raises, so behaviour is unchanged when the section is absent or malformed.)Úannotations)ÚAnyÚDict)Úhermes_home_keyiPÃ  iÐ  zdict[str, dict[str, int]]Ú_cached_limitsc               ó(   € V ^8„  d   QhRRRRRRRR/# )é   Úvaluer   ÚdefaultÚintÚminimumÚreturn© )Úformats   "Ú=/home/ubuntu/.hermes/hermes-agent/tools/tool_output_limits.pyÚ__annotate__r      s(   € ÷ +ñ +�sð + Sð +°3ð +¸3ñ +ó    c                ó`   €  \        V 4      pY28  d   T# T#   \        \        3 d    Tu # i ; i)zGReturn ``value`` as an int >= ``minimum``, or ``default`` on any issue.)r   Ú	TypeErrorÚ
ValueError)r	   r
   r   Úivs   &&& r   Ú_coerce_intr      s<   € ðÜ�‹Zˆð ”lˆ7Ð*¨Ð*øô ”zÐ"ô ØŠðús   ‚ —-¬-c               ó$   € V ^8„  d   QhRRRRRR/# )r   r	   r   r
   r   r   r   )r   s   "r   r   r      s!   € ÷ *ñ * ð *¨cð *°cñ *r   c                ó   € \        W^4      # )é   )r   )r	   r
   s   &&r   Ú_coerce_positive_intr      s   € Ü�u qÓ)Ð)r   c               ó   € V ^8„  d   QhRR/# )r   r   zdict[str, int]r   )r   s   "r   r   r   "   s   € ÷ ñ  ñ r   c            
     óø  € \        4       p \        P                  V 4      pVe   V#  ^ RIHp V! 4       ;'       g    / p\        V\        4      '       d   VP                  R4      MRp\        V\        4      '       g   / pR\        VP                  R4      \        4      R\        VP                  R4      \        4      R\        VP                  R4      \        4      /;\        V &   pV#   \         d    Rp L‘i ; i)uª   Resolved ``{max_bytes, max_lines, max_line_length}``; never raises. Cached per profile
home for the process â€” ``_reset_tool_output_limits_cache()`` forces a fresh read.N)Úload_configÚtool_outputÚ	max_bytesÚ	max_linesÚmax_line_length)r   r   ÚgetÚhermes_cli.configr   Ú
isinstanceÚdictÚ	Exceptionr   ÚDEFAULT_MAX_BYTESÚDEFAULT_MAX_LINESÚDEFAULT_MAX_LINE_LENGTH)ÚkeyÚcachedr   ÚcfgÚsectionÚlimitss         r   Úget_tool_output_limitsr0   "   sê   € ô Ó
€CÜ×Ñ Ó$€FØÒØˆðÝ1Ù‹m×!Ð!˜rˆÜ,6°s¼D×,AÒ,A�#—'‘'˜-Ô(Àtˆô �gœt×$Ò$ØˆàÔ)¨'¯+©+°kÓ*BÔDUÓVØÔ)¨'¯+©+°kÓ*BÔDUÓVØÔ/Ø�K‰KÐ)Ó*Ô,CóEð$Fð F„N�3Ñ˜&ð
 €Møô ô ØŠðús   §C) »,C) Ã)C9Ã8C9c               ó   € V ^8„  d   QhRR/# )r   r   ÚNoner   )r   s   "r   r   r   9   s   € ÷ ñ ¨ñ r   c                 ó.   € \         P                  4        R# )uA   Reset the cached limits â€” for tests or after config hot-reload.N)r   Úclearr   r   r   Ú_reset_tool_output_limits_cacher5   9   s   € ä×ÑÖr   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   r   >   ó   € × HÑ H�sÑ Hr   c                 ó$   € \        4       R ,          # )r    ©r0   r   r   r   Úget_max_bytesr;   >   ó   € Ô#9Ó#;¸KÕ#HÐHr   c               ó   € V ^8„  d   QhRR/# r7   r   )r   s   "r   r   r   ?   r8   r   c                 ó$   € \        4       R ,          # )r!   r:   r   r   r   Úget_max_linesr?   ?   r<   r   c               ó   € V ^8„  d   QhRR/# r7   r   )r   s   "r   r   r   @   s   € × TÑ T˜SÑ Tr   c                 ó$   € \        4       R ,          # )r"   r:   r   r   r   Úget_max_line_lengthrB   @   s   € Ô)?Ó)AÐBSÕ)TÐ"Tr   N)Ú__conditional_annotations__Ú__doc__Ú
__future__r   Útypingr   r   Úhermes_constantsr   r(   r)   r*   r   Ú__annotations__r   r   r0   r5   r;   r?   rB   )rC   s   @r   Ú<module>rI      sV   øðôNõ #ç å ,àÐ ØÐ ØÐ ð -/€Ð)Ó .õ+õ*õõ.õ
 IÝ Hß Tr   