§
    *1þi^  ã                  óp   — d Z ddlmZ ddlZddlmZ 	 ddlmZ ddlmZ dS # e	e
f$ r dd	„Zdd„ZY dS w xY w)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_homeÚreturnr   c                 ó´   — t           j                             dd¦  «                             ¦   «         } | rt	          | ¦  «        nt	          j        ¦   «         dz  S )zoReturn the Hermes home directory (default: ~/.hermes).

        Mirrors ``hermes_constants.get_hermes_home()``.ÚHERMES_HOMEÚ z.hermes)ÚosÚenvironÚgetÚstripr   Úhome)Úvals    úQ/home/spazio/.hermes/skills/productivity/google-workspace/scripts/_hermes_home.pyr   r      sE   € õ Œj�nŠn˜]¨BÑ/Ô/×5Ò5Ñ7Ô7ˆØÐ<�t�C‰yŒyˆy¥T¤Y¡[¤[°9Ñ%<Ð<ó    Ústrc                 óÊ   — t          ¦   «         } 	 dt          |                      t          j        ¦   «         ¦  «        ¦  «        z   S # t
          $ r t          | ¦  «        cY S w xY w)ztReturn a user-friendly ``~/``-shortened display string.

        Mirrors ``hermes_constants.display_hermes_home()``.z~/)r   r   Úrelative_tor   r   Ú
ValueError)r   s    r   r   r   "   sh   € õ Ñ Ô ˆð	Ø�#˜d×.Ò.­t¬y©{¬{Ñ;Ô;Ñ<Ô<Ñ<Ð<øÝð 	ð 	ð 	Ý�t‘9”9ÐÐÐð	øøøs   �5A ÁA"Á!A")r   r   )r   r   )Ú__doc__Ú
__future__r   r   Úpathlibr   Úhermes_constantsr   r   ÚModuleNotFoundErrorÚImportError© r   r   ú<module>r      sÄ   ððð ð  #Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø Ð Ð Ð Ð Ð ðØKÐKÐKÐKÐKÐKØCÐCÐCÐCÐCÐCÐCÐCøØ˜[Ð)ð ð ð ð=ð =ð =ð =ðð ð ð ð ð ð ðøøøs   ”" ¢5´5