+
    „WÝjn  ã                  ó`   € R t ^ RIHt ^ RItR tR R ltR R ltR R	 ltR
 R ltR R lt	R# )aL  The session a plugin hook or tool is running for, read from the turn's task-local context.

Plugin hooks and tools run in the gateway process, whose own cwd is the install root and is shared
by every session (it is never ``os.chdir``-ed). These read the calling session's key, client surface
and recorded working directory instead.
)ÚannotationsNc                 ó   € ^ RI Hp  V ! 4       # )é    ©Úactive_policy)Úgateway.session_policyr   r   s    ÚMC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\plugin_session.pyÚ_active_policyr	      s   € Ý4Ù‹?Ðó    c               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚstr© )Úformats   "r   Ú__annotate__r      s   € ÷ 5ñ 5�Sñ 5r
   c                 ó    € ^ RI Hp  V ! RR4      # )zSRoute key of the session whose turn is running in this context, ``""`` outside one.©Úget_session_envÚHERMES_SESSION_KEYÚ )Úgateway.session_contextr   r   s    r   Úsession_keyr      s   € å7ÙÐ/°Ó4Ð4r
   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r      s   € ÷ :ñ :˜ñ :r
   c                 óT   € \        4       p V e   V P                  # ^ RIHp V! RR4      # )z¦``cli``/``tui``/``desktop``/``acp`` for a local session's turn, the messaging platform
(``telegram``, ``discord``, ...) for a chat's turn, ``""`` outside any session.r   ÚHERMES_SESSION_PLATFORMr   )r	   Úplatformr   r   )Úpolicyr   s     r   Úsession_surfacer      s-   € ô Ó€FØÒØ�‰ÐÝ7ÙÐ4°bÓ9Ð9r
   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   !   s   € ÷ nñ n�Sñ nr
   c                 ó¢   € ^ RI Hp Hp \        4       pV! 4       ;'       g0    Ve   VP                  MR;'       g    V ! 4       P                  4       # )aT  The calling session's recorded working directory (a local session's workspace, else the
profile's terminal cwd), ``""`` when it has none. Never the gateway process's own cwd.
In ingress hooks (``pre_gateway_dispatch``), which run before any session, it is the profile's
terminal cwd, not the workspace of the session the message will reach.)Úscope_terminal_cwdÚscoped_session_cwdr   )Úagent.runtime_cwdr"   r#   r	   ÚcwdÚstrip)r"   r#   r   s      r   Úsession_cwdr'   !   sA   € ÷
 IÜÓ€FÙÓ×mÐm°&Ò2D F§J¢JÈ"×mÐmÑQcÓQe×QkÑQkÓQmÐmr
   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   +   s   € ÷ Hñ H ñ Hr
   c                ó6   € V P                   e   R# \        4       # )zV``session_surface()`` for a plugin context: the classic CLI process itself is ``cli``.Úcli)Ú_cli_refr   ©Úmanagers   &r   Úcontext_surfacer.   +   s   € à×$Ñ$Ò0ˆ5ÐG´oÓ6GÐGr
   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   0   s   € ÷ Jñ J˜Cñ Jr
   c                ó\   € V P                   e   \        P                  ! 4       # \        4       # )z[``session_cwd()`` for a plugin context: the classic CLI process keeps its launch directory.)r+   ÚosÚgetcwdr'   r,   s   &r   Úcontext_cwdr3   0   s    € à!×*Ñ*Ò6Œ2�9Š9‹;ÐI¼K»MÐIr
   )
Ú__doc__Ú
__future__r   r1   r	   r   r   r'   r.   r3   r   r
   r   Ú<module>r6      s3   ðñõ #ã 	òõ
5õ:õnõH÷
Jr
   