+
    #j^                    |    R t ^ RIHt ^ RIt^ RIHt  ^ RIHt ^ RIHt R#   ]	]
3 d    R R ltR R	 lt R# i ; i)
a  Resolve HERMES_HOME for standalone skill scripts.

Skill scripts may run outside the Hermes process (e.g. system Python,
nix env, CI) where ``hermes_constants`` is not importable.  This module
provides the same ``get_hermes_home()`` and ``display_hermes_home()``
contracts as ``hermes_constants`` without requiring it on ``sys.path``.

When ``hermes_constants`` IS available it is used directly so that any
future enhancements (profile resolution, Docker detection, etc.) are
picked up automatically.  The fallback path replicates the core logic
from ``hermes_constants.py`` using only the stdlib.

All scripts under ``google-workspace/scripts/`` should import from here
instead of duplicating the ``HERMES_HOME = Path(os.getenv(...))`` pattern.
)annotationsN)Path)display_hermes_home)get_hermes_homec                   V ^8  d   QhRR/# )   returnr    )formats   "s/opt/hermes-venv/lib/python3.14/site-packages/../../../skills/productivity/google-workspace/scripts/_hermes_home.py__annotate__r      s     = =T =    c                     \         P                  P                  RR4      P                  4       p V '       d   \	        V 4      # \        P
                  ! 4       R,          # )zgReturn the Hermes home directory (default: ~/.hermes).

Mirrors ``hermes_constants.get_hermes_home()``.HERMES_HOME z.hermes)osenvirongetstripr   home)vals    r   r   r      s=     jjnn]B/557tCy<TYY[9%<<r   c                   V ^8  d   QhRR/# )r   r   strr	   )r
   s   "r   r   r   "   s       r   c                     \        4       p  R\        V P                  \        P                  ! 4       4      4      ,           #   \
         d    \        T 4      u # i ; i)zlReturn a user-friendly ``~/``-shortened display string.

Mirrors ``hermes_constants.display_hermes_home()``.z~/)r   r   relative_tor   r   
ValueError)r   s    r   r   r   "   sK      	#d..tyy{;<<< 	t9	s   3A   AA)__doc__
__future__r   r   pathlibr   hermes_constantsr   r   ModuleNotFoundErrorImportErrorr	   r   r   <module>r"      sC     # 	 KC[) = s   " ;;