+
    „WÝjQ  ã                   ó”   € R t ^ RIt^ RIt^ RItRtRt]P                  ! R4      tR tR t	R t
RR ltR	 tR
 R ltR tR R ltR tR# )aS  Pure identity derivations the canonical store and the gateway both need.

stdlib-only on purpose: ``hermes_state_*`` modules must not import ``gateway/`` to compute a
digest or parse a key (the gateway imports the store, so the reverse edge is a latent cycle).
The gateway modules that historically defined these re-export them from here.
Nz
cron-ownerzcron:z^cron_(.+)_\d{8}_\d{6}$c                ó   € \          V  RV 2# )zRThe admission request id of one cron fire (``execution_id`` is its ledger row id).Ú:)ÚCRON_REQUEST_PREFIX)Újob_idÚexecution_ids   &&ÚEC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_state_keys.pyÚcron_request_idr      s   € ä!Ð" 6 (¨!¨L¨>Ð:Ð:ó    c                ó\   € W RR \        \        V R,          4      ^,           4      ,           3# )z Half-open ``[prefix, hi)`` bounds of every key starting with *prefix*, for an index range
scan: bump the final character so the range covers exactly the prefix.Néÿÿÿÿ)ÚchrÚord)Úprefixs   &r   Úprefix_ranger      s*   € ð ˜#˜2�;¤¤S¨°­£_°qÕ%8Ó!9Õ9Ð9Ð9r	   c                ó,   € \        \        V R4      4      # )zVHalf-open ``[lo, hi)`` bounds of *job_id*'s cron request ids, for an index range scan.Ú )r   r   )r   s   &r   Úcron_request_ranger      s   € äœ¨°Ó3Ó4Ð4r	   c                ó~  € \        V \        4      '       d   V P                  \        4      '       g   R# Vf@   V \	        \        4      R pVP                  R4      ^8w  d   R# VP                  R4      w  rpM3\        VR4      pV P                  V4      '       d   V \	        V4      R MRpV'       d   V'       d   W3# R# )an  ``(job_id, execution_id)`` of a cron fire's request id, else None.

A fresh fire's execution id never holds ``:``, so a request id with exactly one after the
prefix splits there. More than one is ambiguous (a job id holding ``:``, or an execution id
admitted with one before that was refused): only the *job_id* its stored policy names splits
it, and must prefix it.Nr   r   )Ú
isinstanceÚstrÚ
startswithr   ÚlenÚcountÚ	partitionr   )Ú
request_idr   ÚrestÚ_r   r   s   &&    r   Úcron_run_from_requestr   $   s¤   € ô �j¤#×&Ò&¨j×.CÑ.CÔDW×.XÒ.XÙØ‚~Øœ#Ô1Ó2Ð3Ð4ˆØ�:‰:�c‹?˜aÔÙØ"&§.¡.°Ó"5Ñˆ‘<ä  ¨Ó,ˆØ3=×3HÑ3HÈ×3PÒ3P�z¤# f£+ ,Ñ/ÐVXˆß%+·ˆFÐ!ÐFÀ$ÐFr	   c                óˆ   € \         P                  \        T ;'       g    R4      4      pV'       d   VP                  ^4      # R# )zZThe job id a pre-unified ``cron_{job_id}_{YYYYmmdd_HHMMSS}`` run session names, else None.r   N)Ú_LEGACY_CRON_RUN_IDÚmatchr   Úgroup)Ú
session_idr    s   & r   Úlegacy_cron_run_jobr#   8   s4   € ä×%Ñ%¤c¨*×*:Ð*:¸Ó&;Ó<€Eß"ˆ5�;‰;�q‹>Ð,¨Ð,r	   c                ó<   € V ^8„  d   QhR\         R\        R\         /# )é   Úcanonical_targetÚpayloadÚreturn)r   Údict)Úformats   "r   Ú__annotate__r+   >   s!   € ÷ /ñ /¬sð /¼Tð /Äcñ /r	   c                óª   € \         P                  ! RV RV/RRR	RR7      P                  RRR7      p\        P                  ! V4      P                  4       # )
zKCanonical payload identity after authorization and immutable media capture.Útargetr'   FT)Úensure_asciiÚ	sort_keysÚ
separatorsÚ	allow_nanzutf-8Úsurrogatepass)Úerrors©Ú,r   )ÚjsonÚdumpsÚencodeÚhashlibÚsha256Ú	hexdigest)r&   r'   Úencodeds   $$ r   Úadmission_fingerprintr=   >   sS   € ä�jŠjØ	Ð# Y°Ð8ÀuØ :¸ô÷ �fˆW˜_€fÓ-ð ô �>Š>˜'Ó"×,Ñ,Ó.Ð.r	   c                ó¨   € \         P                  ! WV.RR7      pR\        P                  ! VP	                  4       4      P                  4       ,           # )z9The deterministic session id of a LOCAL creation receipt.)r0   zlocal-r4   )r6   r7   r9   r:   r8   r;   )Ú
profile_idÚprincipal_idr   Úidentitys   &&& r   Úlocal_identityrB   G   s;   € ä�zŠz˜:°ZÐ@ÈZÔX€HØ”g—n’n X§_¡_Ó%6Ó7×AÑAÓCÕCÐCr	   c                ó0   € V ^8„  d   QhR\         R\         /# )r%   Ú	namespacer(   )r   )r*   s   "r   r+   r+   M   s   € ÷ 9ñ 9´#ð 9¼#ñ 9r	   c                ó*   € V R8X  d   R# V R8X  d   R# T # )z·Inverse of ``gateway.session._session_key_namespace`` for the ``<ns>`` slot of a key:
``"default"`` for ``main``, ``"main"`` for the marked ``main~``, else the slot is the profile id.ÚmainÚdefaultzmain~© )rD   s   &r   Ú"profile_from_session_key_namespacerI   M   s!   € ð �FÔÙØ 'Ô)ˆ6Ð8¨yÐ8r	   c                óÂ   € V '       g   R# \        V 4      P                  R4      p\        V4      ^8  g   V^ ,          R8w  d   R# \        V^,          ;'       g    R4      # )zRProfile namespace encoded in an ``agent:<ns>:...`` gateway session key, else None.Nr   ÚagentrF   )r   Úsplitr   rI   )Úsession_keyÚpartss   & r   Úprofile_from_session_keyrO   U   sM   € çÙÜ�Ó×"Ñ" 3Ó'€EÜ
ˆ5ƒz�A„~˜˜q� WÔ,ÙÜ-¨e°A­h×.@Ð.@¸&ÓAÐAr	   )N)Ú__doc__r9   r6   ÚreÚCRON_PRINCIPAL_IDr   Úcompiler   r   r   r   r   r#   r=   rB   rI   rO   rH   r	   r   Ú<module>rT      sc   ðñó Û Û 	ð !Ð ØÐ Ø—j’jÐ!;Ó<Ð ò;ò
:ò5ô
Gò(-õ/òDõ9ôBr	   