+
    iHàjv  ã                  ó  € R t ^ RIHt ^ RItRt]R,           tRt]P                  ! ]P                  ! ]P                  R^4      ^ ,          R,           4      P                  ]P                  ! R4      ]4      P                  ]P                  ! R	4      ]4      4      t]P                  ! ]P                  ! ]4      R
,           ],           4      t]P                  R^4      ^ ,          R,           tR R lt]! ]! RRR7      4      tR R ltR R ltR# )a»  The model-visible compression/elision marker and its matcher.

Tool-call arguments are no longer rewritten by the compressor, but legacy sessions may still
carry this marker inside replayed tool-call arguments. Dependency-free leaf shared by the
elision renderers (``agent.context_compressor``) and the dispatch-boundary detector
(``agent.tool_dispatch_helpers``), so the matcher is derived from the template instead of
re-typing its wording.
)ÚannotationsNu   âŸªHERMES-CONTEXT-COMPRESSION:uÑ    {omitted:,} of {total:,} chars omitted here by Hermes's context compressor. This is NOT part of the original tool call and must never be reproduced in new output â€” always write full, untruncated content.âŸ«z\d[\d,]*z. Ú.z{omitted:,}z	{total:,}z\s+u   .âŸ«c               ó$   € V ^8„  d   QhRRRRRR/# )é   ÚomittedÚintÚtotalÚreturnÚstr© )Úformats   "Ú=/home/ubuntu/.hermes/hermes-agent/agent/compression_marker.pyÚ__annotate__r   4   s&   € ÷ Iñ I˜Sð I¨ð I°ñ Ió    c                ó.   € \         P                  WR7      # )zERender the non-imitable elision marker with per-instance byte counts.©r   r   )Ú_ELISION_MARKER_TEMPLATEr   r   s   &&r   Ú_elision_markerr   4   s   € ä#×*Ñ*°7Ð*ÓHÐHr   r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Útextr
   Úlimitr   r	   r   )r   s   "r   r   r   >   s&   € ÷ Jñ J�ð J˜Cð J Cñ Jr   c                ó  € \        V 4      V8:  d   V # \        V 4      pV\        \        W"R7      4      ,
          pV^ 8:  d   \        W"R7      # V RV P                  4       pV\        V\        V4      ,
          VR7      ,           # )aÇ  Cap ``text`` at ``limit`` chars, marking the elision with ``_elision_marker``.

Every model-visible renderer must truncate through here (#121548). ``text`` is
returned unchanged when it already fits. Otherwise the result is ``head + marker``
with accurate omitted/total counts and never exceeds ``limit`` (sized against the
widest rendering the counts can take), unless ``limit`` cannot hold the marker at
all, in which case the marker alone is returned.
r   N)Úlenr   Úrstrip)r   r   r   Úhead_lenÚkepts   &&   r   Úelider   >   ss   € ô ˆ4ƒy�EÔØˆÜ�‹I€EØ”sœ?°5ÔFÓGÕG€HØ�1„}Ü uÔ:Ð:Ø�	�ˆ?×!Ñ!Ó#€DØ”/¨%´#°d³)Õ*;À5ÔIÕIÐIr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   r   r
   Úheadr   Útailr	   r   )r   s   "r   r   r   Q   s(   € ÷ :ñ :�sð : #ð :¨Sð :°Sñ :r   c                óØ   € \        V 4      W,           8:  d   V # \        \        V 4      V,
          V,
          \        V 4      R7      pV RV V,           V \        V 4      V,
          R ,           # )zQKeep ``head`` chars from the start and ``tail`` from the end, eliding the middle.r   N)r   r   )r   r   r   Úmarkers   &&& r   Úelide_middler"   Q   sZ   € ä
ˆ4ƒy�D•KÔØˆÜ¤S¨£Y°Õ%5¸Õ%<ÄCÈÃIÔN€FØ��ˆ;˜Õ $¤s¨4£y°4Õ'7Ð'8Ð"9Õ9Ð9r   l   ÿJ)£)Ú__doc__Ú
__future__r   ÚreÚ_COMPRESSION_MARKER_PREFIXÚ_COMPRESSION_MARKER_TEMPLATEÚ_MARKER_COUNT_REÚcompileÚescapeÚsplitÚreplaceÚ_COMPRESSION_MARKER_REÚ_COMPRESSION_MARKER_ARTIFACT_REr   r   r   ÚELISION_MARKER_MAX_LENr   r"   r   r   r   Ú<module>r0      s  ðñõ #ã 	ð >Ð àð<õ<ð ð Ð ð ŸšØ‡I‚IÐ*×0Ñ0°°qÓ9¸!Õ<¸sÕBÓCß�WˆR�YŠY�}Ó%Ð'7Ó8ß�WˆR�YŠY�{Ó#Ð%5Ó6óÐ ð #%§*¢*Ø‡I‚IÐ(Ó)¨FÕ2Ð5EÕEó#Ð ð 8×=Ñ=¸dÀAÓFÀqÕIÈFÕRÐ õIñ ™_°ZÀzÔRÓSÐ õJ÷&:r   