+
    Ki4                    j    R t ^ RIHt ^ RIt^ RIHt ^ RIHtHt ^ RI	H
t
 RtRtR R	 ltRR
 R lltR# )aR  Hermes-managed Camofox state helpers.

Provides profile-scoped identity and state directory paths for Camofox
persistent browser profiles.  When managed persistence is enabled, Hermes
sends a deterministic userId derived from the active profile so that
Camofox can map it to the same persistent browser profile directory
across restarts.
)annotationsN)Path)DictOptional)get_hermes_homebrowser_authcamofoxc                   V ^8  d   QhRR/# )   returnr    )formats   "8/home/ubuntu/hermes-agent/tools/browser_camofox_state.py__annotate__r      s     M Mt M    c                 B    \        4       \        ,          \        ,          # )zAReturn the profile-scoped root directory for Camofox persistence.)r   CAMOFOX_STATE_DIR_NAMECAMOFOX_STATE_SUBDIRr   r   r   get_camofox_state_dirr      s    558LLLr   c                    V ^8  d   QhRRRR/# )r
   task_idzOptional[str]r   zDict[str, str]r   )r   s   "r   r   r      s      - > r   c                B   \        \        4       4      pT ;'       g    Rp\        P                  ! \        P                  RV 24      P
                  R,          p\        P                  ! \        P                  RV RV 24      P
                  R,          pRRV 2R	R
V 2/# )a  Return the stable Hermes-managed Camofox identity for this profile.

The user identity is profile-scoped (same Hermes profile = same userId).
The session key is scoped to the logical browser task so newly created
tabs within the same profile reuse the same identity contract.
defaultzcamofox-user::N
   Nzcamofox-session:::N   Nuser_idhermes_session_keytask_)strr   uuiduuid5NAMESPACE_URLhex)r   
scope_rootlogical_scopeuser_digestsession_digests   &    r   get_camofox_identityr)      s     *,-J((yM**

|$ 
c#K ZZ
:,a7 
c#N
 	W[M*~./ r   )N)__doc__
__future__r   r!   pathlibr   typingr   r   hermes_constantsr   r   r   r   r)   r   r   r   <module>r/      s7    #   ! ,'   M
 r   