§
    øžyj
  ã            	       ó°   — d Z ddlmZmZ ddlmZ deddfd„Zdeddfd„Zdeddfd	„Z	deddfd
„Z
deddfd„Z	 	 ddededz  dedefd„Zddededefd„ZdS )zæShared CLI output helpers for Hermes CLI modules.

Extracts the identical ``print_info/success/warning/error`` and ``prompt()``
functions previously duplicated across setup.py, tools_config.py,
mcp_config.py, and memory_setup.py.
é    )ÚColorsÚcolor)Úmasked_secret_promptÚtextÚreturnNc                 óZ   — t          t          d| › �t          j        ¦  «        ¦  «         dS )z"Print a dim informational message.ú  N)Úprintr   r   ÚDIM©r   s    ú;/home/ragecks/.hermes/hermes-agent/hermes_cli/cli_output.pyÚ
print_infor      s(   € å	�%��T���VœZÑ
(Ô
(Ñ)Ô)Ð)Ð)Ð)ó    c                 óZ   — t          t          d| › �t          j        ¦  «        ¦  «         dS )u.   Print a green success message with âœ“ prefix.u   âœ“ N)r
   r   r   ÚGREENr   s    r   Úprint_successr      s(   € å	�%��t���vœ|Ñ
,Ô
,Ñ-Ô-Ð-Ð-Ð-r   c                 óZ   — t          t          d| › �t          j        ¦  «        ¦  «         dS )u/   Print a yellow warning message with âš  prefix.u   âš  N©r
   r   r   ÚYELLOWr   s    r   Úprint_warningr      ó(   € å	�%��t���vœ}Ñ
-Ô
-Ñ.Ô.Ð.Ð.Ð.r   c                 óZ   — t          t          d| › �t          j        ¦  «        ¦  «         dS )u*   Print a red error message with âœ— prefix.u   âœ— N)r
   r   r   ÚREDr   s    r   Úprint_errorr      s(   € å	�%��t���vœzÑ
*Ô
*Ñ+Ô+Ð+Ð+Ð+r   c                 óZ   — t          t          d| › �t          j        ¦  «        ¦  «         dS )zPrint a bold yellow header.z
  Nr   r   s    r   Úprint_headerr   #   r   r   FÚquestionÚdefaultÚpasswordc                 ó  — |rd|› d�nd}t          d| › |› d�t          j        ¦  «        }	 |rt          |¦  «        }nt	          |¦  «        }|                     ¦   «         }|r|n|pdS # t          t          f$ r t          ¦   «          Y dS w xY w)a]  Prompt the user for input with optional default and password masking.

    Replaces the four independent ``_prompt()`` / ``prompt()`` implementations
    in setup.py, tools_config.py, mcp_config.py, and memory_setup.py.

    Returns the user's input (stripped), or *default* if the user presses Enter.
    Returns empty string on Ctrl-C or EOF.
    z [Ú]Ú r	   z: )	r   r   r   r   ÚinputÚstripÚKeyboardInterruptÚEOFErrorr
   )r   r   r   ÚsuffixÚdisplayÚvalues         r   Úpromptr*   +   s³   € ð !(Ð/ˆ_�'ˆ_ˆ_ˆ_ˆ_¨R€FÝÐ-˜Ð- 6Ð-Ð-Ð-­v¬}Ñ=Ô=€Gð	Øð 	#Ý(¨Ñ1Ô1ˆEˆEå˜'‘N”NˆEØ—’‘”ˆØÐ2ˆuˆu G M¨rÐ2øÝ�xÐ(ð ð ð Ý‰ŒˆØˆrˆrðøøøs   ¬<A) Á)BÂBTc                 óŽ   — |rdnd}t          | › d|› d�¦  «        }|s|S |                     ¦   «                              d¦  «        S )z)Prompt for a yes/no answer. Returns bool.zY/nzy/Nz (ú)Úy)r*   ÚlowerÚ
startswith)r   r   ÚhintÚanswers       r   Úprompt_yes_nor2   G   sW   € àÐ&ˆ5ˆ5 €DÝ�xÐ*Ð* 4Ð*Ð*Ð*Ñ+Ô+€FØð ØˆØ�<Š<‰>Œ>×$Ò$ SÑ)Ô)Ð)r   )NF)T)Ú__doc__Úhermes_cli.colorsr   r   Úhermes_cli.secret_promptr   Ústrr   r   r   r   r   Úboolr*   r2   © r   r   ú<module>r9      sf  ððð ð ,Ð +Ð +Ð +Ð +Ð +Ð +Ð +Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9ð*�Sð *˜Tð *ð *ð *ð *ð
.˜ð . ð .ð .ð .ð .ð
/˜ð / ð /ð /ð /ð /ð
,�cð ,˜dð ,ð ,ð ,ð ,ð
/�sð /˜tð /ð /ð /ð /ð Øðð Øðà�4‰Zðð ðð 	ð	ð ð ð ð8*ð *˜Cð *¨$ð *¸$ð *ð *ð *ð *ð *ð *r   