+
    jHàj4  ã            
      ó~  € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIHt ]P                  ! R4      t	]	]P                  ! R4      ]P                  ! R4      ]P                  ! R4      ]P                  ! R	4      ]P                  ! R
4      ]P                  ! R4      ]P                  ! R4      3t
R R lt^tRR]/R R llltR# )u1  Session-id minting: the ONE place that knows the ``YYYYMMDD_HHMMSS_<hex>`` shape.

stdlib-only on purpose: ``agent/``, ``cli.py``, ``gateway/`` and ``tui_gateway/`` all mint ids and
must not pull the SessionDB import graph in to do it. ``hermes_cli/session_lost_and_found.py``
classifies schema-less salvage rows by ``is_known_session_id``, so a shape change here is a
recovery-classification change â€” keep the prefix stable, and add any NEW derived-id shape to
``SESSION_ID_RECOGNIZERS`` or salvage will drop those sessions and mis-infer the table's layout.
)ÚannotationsN)Údatetime)ÚOptionalz^\d{8}_\d{6}_z-^cron_[A-Za-z0-9][A-Za-z0-9._-]*_\d{8}_\d{6}$z^bg_(?:\d{6}_)?[0-9a-f]{6}$z^room_[0-9a-f]{32}$z^api_\d{9,}_[0-9a-f]{8}$z^api-[0-9a-f]{16}$z^run_[0-9a-f]{32}$zE^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$c               ó    € V ^8„  d   QhRRRR/# )é   ÚvalueÚstrÚreturnÚbool© )Úformats   "Ú5/home/ubuntu/.hermes/hermes-agent/hermes_state_ids.pyÚ__annotate__r   *   s   € ÷ Kñ K˜sð K tñ Kó    c                óˆ   a € \         ;QJ d#    V 3R l\         4       F  '       g   K   R# 	  R# ! V 3R l\         4       4      # )zæTrue when ``value`` has the shape of an id one of this repo's surfaces really mints.

The recognition side of the minting contract. Salvage uses this (not
``SESSION_ID_PATTERN`` alone) to tell a session id from an arbitrary cell.
c              3  óD   <"  € T F  qP                  S4      x € K  	  R # 5i©N)Úmatch)Ú.0Úpatternr   s   & €r   Ú	<genexpr>Ú&is_known_session_id.<locals>.<genexpr>0   s   øé € ÐJÑ3I¨�}‰}˜U×#Ð#Ó3Iùs   ƒ TF)ÚanyÚSESSION_ID_RECOGNIZERS)r   s   fr   Úis_known_session_idr   *   s0   ø€ ÷ ‹3ÔJÕ3IÓJ�3Œ3ÐJŠ3ÐJˆ3ÔJÕ3IÓJÓJÐJr   Úhex_lenc               ó$   € V ^8„  d   QhRRRRRR/# )r   ÚnowzOptional[datetime]r   Úintr	   r   r   )r   s   "r   r   r   8   s#   € ÷ 3ñ 3Ð*ð 3¸sð 3ÐY\ñ 3r   c               ó¬   € T ;'       g    \         P                  ! 4       P                  R4      pV R\        P                  ! 4       P
                  RV  2# )z¸``<timestamp>_<random hex>`` for a fresh session; ``now`` pins the timestamp to a clock the
caller already captured (``agent.session_start``) so the id and the row agree to the second.z%Y%m%d_%H%M%SÚ_N)r   r   ÚstrftimeÚuuidÚuuid4Úhex)r   r   Ústamps   &$ r   Únew_session_idr&   8   sG   € ð ×"Ð"”H—L’L“N×,Ñ,¨_Ó=€EØˆW�A”d—j’j“l×&Ñ& x¨Ð0Ð1Ð2Ð2r   r   )Ú__doc__Ú
__future__r   Úrer"   r   Útypingr   ÚcompileÚSESSION_ID_PATTERNr   r   ÚDEFAULT_HEX_LENr&   r   r   r   Ú<module>r.      s·   ðñõ #ã 	Û Ý Ý à—Z’ZÐ 0Ó1Ð ð
 ð ‡J‚JÐ?Ó@ð ‡J‚JÐ-Ó.à‡J‚JÐ%Ó&ð ‡J‚JÐ*Ó+Ø‡J‚JÐ$Ó%à‡J‚JÐ$Ó%à‡J‚JÐWÓXð#Ð õ*Kð €ñ3À_÷ 3ò 3r   