
    sj.                        d Z ddlmZ ddlmZ ddlmZmZmZm	Z	  e
dh          Z e	deeef                   Zdd	ddZdd	ddZdS )z<Internal metadata attached to durable conversation messages.    )annotations)time)AnyMutableMappingOptionalTypeVar	timestamp_Message)boundNr	   messageOptional[float]returnc               Z    |                      d          |t                      n|| d<   | S )a2  Attach a creation timestamp without replacing source-provided time.

    Gateway adapters can supply the platform event time. All other callers use
    the local wall clock at the point the message enters the live transcript.
    Returning the same mapping keeps the helper convenient at append sites.
    r	   )get	wall_time)r   r	   s     :/home/agent/.hermes/hermes-agent/agent/message_metadata.pystamp_message_timestampr      s2     {{;'.7.?y{{{YN    messages	list[Any]c               R    t          ||           |                     |           |S )z-Stamp and append one live transcript message.r   )r   append)r   r   r	   s      r   append_messager       s.     Gy9999OOGNr   )r   r
   r	   r   r   r
   )r   r   r   r
   r	   r   r   r
   )__doc__
__future__r   r   r   typingr   r   r   r   	frozensetPERSISTENCE_ONLY_MESSAGE_FIELDSstrr
   r   r    r   r   <module>r"      s    B B " " " " " " " " " " " " 9 9 9 9 9 9 9 9 9 9 9 9
 #,)[M":": 7:^CH%=>>> "&     ( "&		 	 	 	 	 	 	 	r   