
    lKj^                    r    S r SSKJr  SSKrSSKJr   SSKJr  SSKJr  g! \	\
4 a    S	S jrS
S jr gf = f)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                     [         R                  R                  SS5      R                  5       n U (       a  [	        U 5      $ [        R
                  " 5       S-  $ )zgReturn the Hermes home directory (default: ~/.hermes).

Mirrors ``hermes_constants.get_hermes_home()``.HERMES_HOME z.hermes)osenvirongetstripr   home)vals    N/home/ice/.hermes/skills/productivity/google-workspace/scripts/_hermes_home.pyr   r      s=     jjnn]B/557tCy<TYY[9%<<    c                     [        5       n  S[        U R                  [        R                  " 5       5      5      -   $ ! [
         a    [        U 5      s $ f = f)zlReturn a user-friendly ``~/``-shortened display string.

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