Ë
    ãß²j]  ã                   óz  — U d Z ddlZ ej                  dd¬«      Zej                  e   ed<   dZded	ej                  e   fd
„Zdej                  e   d	dfd„Z	d	efd„Z
d	efd„Z ej                  dd¬«      Zej                  e   ed<   ded	ej                  e   fd„Zdej                  e   d	dfd„Zd	efd„Zy)a¢  Skill write-origin provenance: a ContextVar separating background-review skill writes from foreground
user-directed writes (the curator only curates skills the self-improvement review fork created; skills a user
asked for belong to the user). run_agent.py binds the origin before each tool loop, mirroring
AIAgent._memory_write_origin: ``token = set_current_write_origin(...)`` / ``reset_current_write_origin(token)``.é    NÚskill_write_originÚ
foreground)ÚdefaultÚ_write_originÚbackground_reviewÚoriginÚreturnc                 ó4   — t         j                  | xs d«      S )Nr   )r   Úset)r   s    ú;/home/ubuntu/.hermes/hermes-agent/tools/skill_provenance.pyÚset_current_write_originr      s   € Ü×Ñ˜VÒ3 |Ó4Ð4ó    Útokenc                 ó.   — t         j                  | «       y ©N)r   Úreset©r   s    r   Úreset_current_write_originr      s   € Ü×Ñ˜Õr   c                  ó*   — t         j                  «       S )zk"foreground" for any regular agent (CLI, gateway, cron, subagent); "background_review" for the review fork.)r   Úget© r   r   Úget_current_write_originr      s   € ä×ÑÓÐr   c                  ó$   — t        «       t        k(  S r   )r   ÚBACKGROUND_REVIEWr   r   r   Úis_background_reviewr      s   € Ü#Ó%Ô):Ñ:Ð:r   Úreview_attendedFÚ_review_attendedÚattendedc                 ó>   — t         j                  t        | «      «      S r   )r   r   Úbool)r   s    r   Úset_review_attendedr!   #   s   € Ü×Ñ¤ X£Ó/Ð/r   c                 ó.   — t         j                  | «       y r   )r   r   r   s    r   Úreset_review_attendedr#   '   s   € Ü×Ñ˜5Õ!r   c                  óD   — t        «       xr t        j                  «        S r   )r   r   r   r   r   r   Úis_unattended_reviewr%   +   s   € ÜÓ!Ò@Ô*:×*>Ñ*>Ó*@Ð&@Ð@r   )Ú__doc__ÚcontextvarsÚ
ContextVarr   ÚstrÚ__annotations__r   ÚTokenr   r   r   r    r   r   r!   r#   r%   r   r   r   ú<module>r,      s  ðòtó
 à-C¨[×-CÑ-CÐDXÐbnÔ-o€ˆ{×%Ñ% cÑ*Ó oØ'Ð ð5 Sð 5¨[×->Ñ->¸sÑ-Có 5ð k×&7Ñ&7¸Ñ&<ð Àó ð #ó ð
;˜dó ;ð 2H°×1GÑ1GÐHYÐchÔ1iÐ �+×(Ñ(¨Ñ.Ó ið0 $ð 0¨;×+<Ñ+<¸TÑ+Bó 0ð" ×!2Ñ!2°4Ñ!8ð "¸Tó "ðA˜dô Ar   