+
    jHàjâ#  ã                  ól   € 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 R lt
R# )u‘  ``hermes vault`` â€” manage the local encrypted autofill vault.

Subcommands:
- ``hermes vault add``   interactive wizard; the password is read via
  getpass (never echoed, never accepted as argv). The login identifier is
  visible metadata and prompted normally.
- ``hermes vault list``  metadata â€” labels, kinds, identifiers, origins,
  handles. Passwords are never shown.
- ``hermes vault rm``    remove an item by handle/id.

The vault backs the password-blind browser autofill tools
(``browser_vault`` list / fill): the agent sees handles
and login identifiers, types the identifier itself, and fills the password
server-side without ever seeing it.
)ÚannotationsNc                 ó   € ^ RI Hp  V ! 4       # )é    ©ÚConsole)Úrich.consoler   r   s    Ú5/home/ubuntu/.hermes/hermes-agent/hermes_cli/vault.pyÚ_consoler	      s   € Ý$á‹9Ðó    c               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNone© )Úformats   "r   Ú__annotate__r      s   € ÷ Qiñ Qi�dñ Qir
   c           	     ó  € ^ RI HpHpHpHp \        4       pVP                  R4       V P                  ;'       g    RP                  4       P                  4       pWb9  dg   \        RRP                  V4       R24      P                  4       P                  4       ;'       g    RpWb9  g   KR  VP                  RV: R	24       RpKl  RpV'       g   \        R
4      P                  4       pK#   VR8X  Ed!   RpV'       g   \        R4      P                  4       pK#  Rp	W‘9  dG   \        RRP                  V4       R24      P                  4       P                  4       ;'       g    Rp	KL  Rp
V
'       g-   \        V	P                  4        R24      P                  4       p
K4  RpV'       g   \        P                  ! R4      pK   \        P                  ! R4      pRV	RV
RV/VP                  4       '       d   RV/M/ CpV! 4       P                  RW}VR7      pEM
^ RI HpHpHp VR8X  d   TMTpRpV'       g   \        R4      P                  4       pK#  VP                  RV R24       / pV Fš  pVVV,          9   pVP%                  RR4       V'       d   RMR R2pVR8X  d   \        P                  M\        pV! V4      P                  4       pV'       d!   V'       g   V! V4      P                  4       pK(  V'       g   K•  VVV&   Kœ  	  V! 4       P                  WgWØR7      p TP                  R!VP&                   R"VP                   R#VP(                  ;'       g    R$ 24       R #   T d    pTP                  RT 24        R p?R # R p?ii ; i)%r   )ÚLOGIN_IDENTIFIER_TYPESÚVAULT_KINDSÚ
VaultErrorÚget_vault_storez—[bold]Add a vault item[/] (the password is encrypted at rest and the agent never sees it; the identifier is visible metadata the agent can type itself)Ú zKind (Ú/z) [login]: Úloginz[red]Unknown kind ú[/]z$Label (e.g. 'GitHub work account'): z'Site origin (e.g. https://github.com): zIdentifier type (z) [email]: Úemailz: zPassword (hidden): u`   Authenticator key (optional, hidden; the 2FA "setup key" or otpauth:// link â€” Enter to skip): Úidentifier_typeÚ
identifierÚpasswordÚ
otp_secret)ÚkindÚlabelÚsecretÚorigin)ÚADDRESS_FIELDSÚPAYMENT_FIELDSÚREQUIRED_FIELDSÚpaymentzGSite origin the item may be filled on (e.g. https://shop.example.com): z[dim]zG fields are filled only on that origin; card values are read hidden.[/]Ú_Ú z (optional)ú[red]Error:[/] Nz[green]Stored.[/] handle=[bold]z	[/] kind=z origin=Ú-)Úagent.vault_storer   r   r   r   r	   Úprintr!   ÚstripÚlowerÚinputÚjoinÚ
capitalizeÚgetpassÚadd_itemr%   r&   r'   ÚreplaceÚidr$   )Úargsr   r   r   r   Úcr!   r"   r$   Úid_typer   r   r    r#   Úmetar%   r&   r'   ÚfieldsÚfieldÚrequiredÚpromptÚreadÚvalueÚexcs   &                        r   Ú_cmd_addrC      s4  € ÷ó ô 	‹
€AØ‡G�Gð	ôð �I‰I�OˆO˜×"Ñ"Ó$×*Ñ*Ó,€DØ
Ô
!Ü�v˜cŸh™h {Ó3Ð4°KÐ@ÓA×GÑGÓI×OÑOÓQ×\Ð\ÐU\ˆØÖ"Ø�G‰GÐ(¨©°Ð4Ô5ØŠDà€EßÜÐ<Ó=×CÑCÓEŠð5Ø�7�?ØˆFßÜÐHÓI×OÑOÓQ’ØˆGØÔ7äÐ-¨c¯h©hÐ7MÓ.NÐ-OÈ{Ð[Ó\ß‘U“Wß‘U“W÷ð ð ò	 ð ˆJß Ü" g×&8Ñ&8Ó&:Ð%;¸2Ð#>Ó?×EÑEÓG’
ØˆHßÜ"Ÿ?š?Ð+@ÓA’Ü ŸšØtóvˆJð
 " 7Ø˜jØ˜Hðð 2<×1AÑ1A×1CÒ1C�L *Ñ-Èð	ˆFñ #Ó$×-Ñ-Ø EÀð .ó ŠD÷ ZÑYà'+¨yÔ'8‘^¸nˆFØˆFßÜÐhÓi×oÑoÓq’Ø�G‰G�e˜D˜6Ð!hÐiÔjØˆFÛ�Ø  O°DÕ$9Ñ9�Ø!ŸM™M¨#¨sÓ3Ð4¿8±RÈÐ4WÐWYÐZ�Ø*.°)Ô*;”w—’Ä�Ù˜V›×*Ñ*Ó,�ß§uÙ  ›L×.Ñ.Ó0’Eß‘5Ø$)�F˜5“Mñ  ñ #Ó$×-Ñ-°4ÈVÐ-Óc‰Dð
 ‡G�GÐ-¨d¯g©g¨Y°iÀÇ	Á	¸{È(ÐSW×S^ÑS^×SeÐSeÐbeÐRfÐgÖhøð	 ô Ø	�‰�/ # Ð'Ô(ÝûðúsW   Ã,M" Ã>A#M" Å"M" Å15M" Æ'A
M" Ç2 M" ÈM" È3BM" ËM" ËM" Ë<!M" Í"NÍ)NÎNc               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   p   s   € ÷ {ñ {�tñ {r
   c           
     óH  a€ ^ RI Hp \        4       p. . rCV! 4        Fq  oSP                  '       d4   SP	                  4       '       g   VP                  SP                  4       KH  VP                  V3R lSP                  4        4       4       Ks  	  V'       g   V'       g   VP                  R4       R# V'       dÉ   ^ RI
Hp V! R\        V4       R2R7      pR F  pTP                  YwR	8X  d   R
MRR7       K   	  V F`  w  r‰TP                  V	P                  Y‰P                   V	P"                  V	P$                  ;'       g    RV	P&                  ;'       g    R4       Kb  	  VP                  V4       VP                  R4       V F  p
VP                  RV
 R24       K  	  R# )u®   Local items always; external managers only for the lifetime of this CLI process (a
`hermes vault list` unlock does not carry into a chat session â€” unlock there when asked).©Úenabled_backendsc              3  ó@   <"  € T F  pSP                   V3x € K  	  R # 5i)N)Údisplay_name)Ú.0r;   Úbackends   & €r   Ú	<genexpr>Ú_cmd_list.<locals>.<genexpr>{   s   øé € ÐRÑ=Q°T�W×)Ñ)¨4Õ0Ó=Qùs   ƒz<[dim]Vault is empty. Add an item with `hermes vault add`.[/]N)ÚTablezVault items (Ú))ÚtitleÚHandleÚbold)Ústyler,   zT[dim]Passwords are never shown; the agent fills them server-side from the handle.[/]z[yellow]uX   [/] is enabled but locked â€” the agent will ask you to unlock it when it needs a login.)rQ   ÚSourceÚKindÚLabelÚ
IdentifierÚOrigin)Úagent.vault_backendsrG   r	   Úneeds_unlockÚis_unlockedÚappendrI   ÚextendÚ
list_itemsr.   Ú
rich.tablerN   ÚlenÚ
add_columnÚadd_rowr7   r!   r"   r   r$   )r8   rG   r9   ÚrowsÚlockedrN   ÚtableÚcolÚsourcer;   ÚnamerK   s   &          @r   Ú	_cmd_listri   p   sF  ø€ õ 6ä‹
€AØ�rˆ&Ù#Ö%ˆØ××Ð¨×(;Ñ(;×(=Ò(=Ø�M‰M˜'×.Ñ.Ô/ÙØ�‰ÔR¸W×=OÑ=OÔ=QÓRÖRñ	 &÷
 ŸØ	�‰ÐNÔOÙßÝ$á˜m¬C°«I¨;°aÐ8Ô9ˆÛPˆCØ×Ñ˜S¸´/©ÀtÐÖLñ Qã ‰LˆFØ�M‰M˜$Ÿ'™' 6¯9©9°d·j±jÀ$Ç/Á/×BXÐBXÐUXÐZ^×ZeÑZe×ZlÐZlÐilÖmñ !à	�‰�ŒØ	�‰ÐfÔgÛˆØ	�‰�(˜4˜&Ð xÐyÖzó r
   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   �   s   € ÷ gñ g˜$ñ gr
   c                óª  € ^ RI Hp ^ RIHpHp ^ RIHpHpHp \        4       pV! 4        Uu/ uF  qˆP                  VbK  	  p	pV P                  '       g   V P                  '       dØ   V P                  ;'       g    V P                  p
W©9  d+   VP                  RV
: RRP                  V	4       R24       R# V! 4       pV! V! VR	4      V
4      pV P                  '       d   VP                  R
R4       MRVR
&   V! V4       TP                  RWš,          P                    RV P                  '       d   RMR R24       R# V! 4        Uu0 uF  qÝP                  kK  	  ppV	P#                  4        FG  w  r¨W®9   d   RpMV! V
4      '       d   RV
 R2pMRpVP                  RVP                   R RV 24       KI  	  VP                  R4       R# u upi u upi )zfShow the detected password managers; `--disable`/`--enable` flip the opt-out (`vault.<name>.enabled`).rF   )Úexternal_backend_classesÚis_installed)Ú_ensure_dictÚload_configÚsave_configz[red]Unknown password manager z[/] (expected one of z, rO   NÚvaultÚenabledFz[green]r*   ÚonÚoffz[/] for browser logins.uK   [green]detected[/] Â· the agent asks you to unlock it when it needs a loginz3[dim]turned off[/] (`hermes vault sources --enable z` to use it)z[dim]not installed[/]z  z<10zW[dim]Managers are picked up automatically when their CLI is installed and signed in.[/])rY   rG   Úagent.vault_backends.baserl   rm   Úhermes_cli.configrn   ro   rp   r	   rh   ÚenableÚdisabler.   r2   ÚpoprI   Úitems)r8   rG   rl   rm   rn   ro   rp   r9   ÚclsÚclassesrh   ÚcfgÚsectionÚbrr   Ústatuss   &               r   Ú_cmd_sourcesr�   �   s˜  € å5ßPßHÑHä‹
€AÙ(@Ô(BÓCÑ(B �x‰x˜Š}Ñ(B€GÐCØ‡{‡{€{�d—l—l�lØ�{‰{×*Ð*˜dŸl™lˆØÔØ�G‰GÐ4°T±HÐ<QÐRV×R[ÑR[Ð\cÓRdÐQeÐefÐgÔhÙÙ‹mˆÙ™|¨C°Ó9¸4Ó@ˆØ�;�;ˆ;Ø�K‰K˜	 4Õ(à!&ˆG�IÑÙ�CÔØ	�‰�'˜'�-×4Ñ4Ð5°Q¸t¿{¿{¸{±tÐPUÐ6VÐVmÐnÔoÙÙ/Ô1Ó2Ñ1˜!�vŒvÑ1€GÐ2Ø—]‘]–_‰	ˆØŒ?Øb‰FÙ˜$×ÒØJÈ4È&ÐP\Ð]‰Fà,ˆFØ	�‰�"�S×%Ñ% cÐ*¨!¨F¨8Ð4Ö5ñ %ð ‡G�GÐeÖfùò1 Dùò 3s   ¬GÅGc               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   ¯   s   € ÷ Fñ F�Tñ Fr
   c                óò   € ^ RI Hp \        4       pV! 4       P                  V P                  4      '       d!   VP                  RV P                   24       R# VP                  RV P                  : R24       R# )r   )r   z[green]Removed[/] z[red]No vault item with handle r   N)r-   r   r	   Úremove_itemÚhandler.   )r8   r   r9   s   &  r   Ú_cmd_rmr†   ¯   sV   € Ý1ä‹
€AÙÓ×$Ñ$ T§[¡[×1Ò1Ø	�‰Ð$ T§[¡[ MÐ2Ö3à	�‰Ð1°$·+±+±ÀÐDÖEr
   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   ¹   s   € ÷ 4ñ 4˜tñ 4r
   c                ó6  € V P                  RR7      pVP                  RRR7      pVP                  R. RORRR	7       VP                  \        R
7       VP                  RRR7      pVP                  \
        R
7       VP                  RRR7      pVP                  RRR7       VP                  \        R
7       VP                  RRR7      pVP                  4       pVP                  RRRR7       VP                  RRRR7       VP                  \        R
7       R# )z?Build the ``hermes vault`` argparse tree (called from main.py).Úvault_action)ÚdestÚaddzhSave a login, card or address ahead of time (optional: the agent asks you on the page when it needs one))Úhelpz--kindNz+Item kind (interactive prompt when omitted))ÚchoicesÚdefaultrŒ   )Ú_vault_handlerÚlistz.List vault items (metadata only, never values)ÚrmzRemove a vault item by handler…   z%Item handle (see `hermes vault list`)ÚsourceszQShow detected password managers (1Password, Bitwarden); they are on automaticallyz	--disableÚNAMEz6Stop using a detected manager: onepassword | bitwarden)ÚmetavarrŒ   z--enablezUndo --disable)r   r(   Úaddress)	Úadd_subparsersÚ
add_parserÚadd_argumentÚset_defaultsrC   ri   r†   Úadd_mutually_exclusive_groupr�   )Ú	subparserÚsubsÚp_addÚp_listÚp_rmÚp_srcÚgroups   &      r   Úregister_clir¢   ¹   s  € à×#Ñ#¨Ð#Ó8€Dà�O‰OØØwð ó €Eð 
×ÑØÒ9À4Ø:ð ô ð 
×Ñ¤hÐÔ/à�_‰_˜VÐ*Zˆ_Ó[€FØ
×Ñ¤yÐÔ1à�?‰?˜4Ð&Eˆ?ÓF€DØ×Ñ�hÐ%LÐÔMØ×Ñ¤WÐÔ-à�O‰O˜IÐ,ˆOó  A€EØ×.Ñ.Ó0€EØ	×Ñ�{¨FÐ9qÐÔrØ	×Ñ�z¨6Ð8HÐÔIØ	×Ñ¤lÐÖ3r
   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   Õ   s   € ÷ 
2ñ 
2˜4ñ 
2r
   c                óÂ   € ^ RI Hp \        V RR4      p Vf   \        V 4       R# V! V 4       R#   T d(   p\	        4       P                  RT 24        Rp?R# Rp?ii ; i)r   )r   r�   Nr+   )r-   r   Úgetattrri   r	   r.   )r8   r   ÚhandlerrB   s   &   r   Úvault_commandr§   Õ   sY   € Ý,ä�dÐ,¨dÓ3€Gð2ØŠ?Ü�dŒOÙÙ�ŽøØô 2Ü‹
×Ñ˜?¨3¨%Ð0×1Ò1ûð2ús   •0 ¦0 °A·AÁA)Ú__doc__Ú
__future__r   r4   r	   rC   ri   r�   r†   r¢   r§   r   r
   r   Ú<module>rª      s<   ðñõ  #ã òõQiõh{õ:gõDFõ4÷8
2r
   