+
    „WÝjÆ	  ã                  ó¢   € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
 ]P                  ! ]4      tRtRtRRRR	/R
 R lltRR/R R lltR# )z4Small shared time-formatting helpers for CLI output.)ÚannotationsN)Údatetime)ÚAnyÚOptionalg        g   @ÝJïAÚ
session_idÚfieldÚ	timestampc               ó(   € V ^8„  d   QhRRRRRRRR/# )	é   Úvaluer   r   úOptional[str]r   ÚstrÚreturnzOptional[float]© )Úformats   "ÚFC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\timefmt.pyÚ__annotate__r      s)   € ÷ ñ ˜ð ¨Mð Èð Ð_nñ ó    c               ób  € V e   V R8X  d   R#  \        V \        4      '       d   \        V P                  4       4      M
\        V 4      p\        Tu;8:  d   \        8:  g)   M \        P                  RY V'       d   RV 2MR4       R# V#   \        \
        3 d    \        P                  p Ldi ; i)a  A stored timestamp cell as float epoch seconds, or ``None`` when it cannot be trusted.

Numbers, numeric strings and ``datetime`` are accepted; anything else, non-finite values and
values outside ``EPOCH_MIN..EPOCH_MAX`` return ``None`` after a WARNING naming the session so
the corrupt row can be found. ``None``/``""`` mean "unset" and stay silent. Every reader that
renders a row timestamp goes through here (a bad row degrades to one ``?`` cell, never a dead
command) and every writer uses it to refuse persisting a new bad row.
NÚ zIgnoring corrupt %s %r%sz on session )Ú
isinstancer   Úfloatr   Ú	TypeErrorÚ
ValueErrorÚmathÚnanÚ	EPOCH_MINÚ	EPOCH_MAXÚloggerÚwarning)r   r   r   Útss   &$$ r   Úcoerce_epochr!      s�   € ð ‚}˜ œÙðÜ)3°E¼8×)DÒ)DŒU�5—?‘?Ó$Ô%Ì%ÐPUË,ˆô ˜Ö(œyÖ(Ü�‰Ð1°5×`jÀ<ÐPZÈ|ÑA\ÐprÔsÙØ€Iøô ”zÐ"ô Ü�X‰XŠðús   �:B
 Â
!B.Â-B.c               ó    € V ^8„  d   QhRRRR/# )r
   r   r   r   r   r   )r   s   "r   r   r   +   s   € ÷ ;ñ ; ]ð ;¸cñ ;r   c               ó†  € V '       d   \        WRR7      ;p f   R# \        P                  ! 4       V ,
          pV^<8  d   R# VR8  d   \        V^<,          4       R2# VR8  d   \        VR,          4       R2# VR	8  d   R
# VR8  d   \        VR,          4       R2# \        P
                  ! V 4      P                  R4      # )z_Format a timestamp as relative time (e.g., '2h ago', 'yesterday'); ``?`` when unset or corrupt.Úlast_active)r   r   Ú?zjust nowi  zm agoi€Q zh agoi £ Ú	yesterdayi€:	 zd agoz%Y-%m-%d)r!   Ú_timeÚtimeÚintr   ÚfromtimestampÚstrftime)r    r   Údeltas   &$ r   Úrelative_timer-   +   s²   € çœ RÀmÔTÐT�"Ò]ÙÜ�JŠJ‹L˜2Õ€EØˆr„zÙØˆt„|Ü�e˜b•j“/Ð" %Ð(Ð(Øˆu„}Ü�e˜d•lÓ#Ð$ EÐ*Ð*Øˆv„~ÙØˆv„~Ü�e˜e•mÓ$Ð% UÐ+Ð+Ü×!Ò! "Ó%×.Ñ.¨zÓ:Ð:r   )Ú__doc__Ú
__future__r   Úloggingr   r(   r'   r   Útypingr   r   Ú	getLoggerÚ__name__r   r   r   r!   r-   r   r   r   Ú<module>r4      sZ   ðÙ :å "ã Û Û Ý ß  à	×	Ò	˜8Ó	$€ð €	Ø€	ð¸Dð È{÷ ð*;°T÷ ;ñ ;r   