+
    „WÝjz  ã                  ó~   € R t ^ RIHt ^ RIt^ RIt^ RItR R ltR R ltR R ltR	 R
 lt	R]R]R]R]	/t
R R ltR# )u  ``hermes computer-use screen`` â€” the Bot Desktop screen a profile's ``computer_use`` drives on a
headless Linux gateway host, viewable from Hermes Desktop. ``status`` / ``start`` / ``stop`` /
``install`` mirror the Desktop pane's controls for ops shells and cloud images.)ÚannotationsNc               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚint© )Úformats   "Ú^C:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\subcommands\computer_use_screen.pyÚ__annotate__r      s   € ÷ ñ ˜Cñ ó    c           
     ój  € ^ RI HpHp VP                  4       p\	        \        V RR4      4      '       dj   \        \        P                  ! / VP                  4       CRVP                  VP                  4       4      /C^RR7      4       VP                  '       d   ^ # ^# VP                  '       g   \        R4       ^# VP                  '       gT   \        RR	P                  VP                   4      ,           4       \        R
VP"                  ;'       g    R,           4       ^# VP                  '       d®   VP                  VP                  4       4      pVR,          VP$                  8X  d   RVR,           R2MRp\        RVP&                   RVP(                   RVP*                   RVP,                   24       \        RV RVP.                   24       \        R4       ^ # VP0                  '       d(   \        RVP&                   RVP0                   24       ^# \        RVP&                   R24       ^# )é    )ÚleaseÚruntimeÚjsonFr   T)ÚindentÚ	sort_keyszWBot Desktop screens run on Linux gateway hosts only (this host keeps its real display).u"   Bot Desktop: packages missing â†’ ú, z  Install: z"hermes computer-use screen installÚholderzhuman (viewer Úviewer_hashÚ)ÚagentúBot Desktop [ú]: running on DISPLAY ú (z), pid z  control: z   rfb socket: u:     View it: Hermes Desktop â†’ Bots â†’ this bot â†’ Screenz]: installed, not running. zB]: installed, not running. Start: hermes computer-use screen start)Útools.bot_desktopr   r   ÚstatusÚboolÚgetattrÚprintr   ÚdumpsÚas_dictÚpublic_viewÚgetÚrunningÚ	supportedÚ	installedÚjoinÚmissingÚinstall_commandÚHUMANÚprofileÚdisplayÚgeometryÚpidÚsocketÚblocker)Úargsr   r   Ústr   Úwhos   &     r
   Ú_screen_statusr5      s°  € ß0Ø	�‰Ó	€BÜŒG�D˜& %Ó(×)Ò)ÜŒd�jŠjÐR˜BŸJ™J›LÐR¨'°5×3DÑ3DÀUÇYÁYÃ[Ó3QÑRÐ[\ÐhlÔmÔnØ—J—J�JˆqÐ% AÐ%Ø�<�<ˆ<ÜÐgÔhÙØ�<�<ˆ<ÜÐ2°T·Y±Y¸r¿z¹zÓ5JÕJÔKÜˆm˜r×1Ñ1×YÐYÐ5YÕZÔ[ÙØ	‡z‡z€zØ×"Ñ" 5§9¡9£;Ó/ˆØ;AÀ(Õ;KÈuÏ{É{Ô;Z�˜v mÕ4Ð5°QÑ7Ð`gˆÜ�˜bŸj™j˜\Ð)?ÀÇ
Á
¸|È2ÈbÏkÉkÈ]ÐZaÐbd×bhÑbhÐaiÐjÔkÜ�˜C˜5 °·	±	¨{Ð;Ô<ÜÐJÔKÙØ	‡z‡z€zÜ�˜bŸj™j˜\Ð)DÀRÇZÁZÀLÐQÔRÙÜ	ˆM˜"Ÿ*™*˜Ð%gÐ
hÔiÙr   c               ó   € V ^8„  d   QhRR/# r   r   )r	   s   "r
   r   r   '   s   € ÷ ñ ˜3ñ r   c           	     óè   € ^ RI Hp  VP                  4       p\	        RTP
                   RTP                   RTP                   R24       ^ #   \         d   p\	        RT 24        Rp?^# Rp?ii ; i)r   ©r   úBot Desktop: Nr   r   r   r   )r   r   ÚstartÚRuntimeErrorr    r,   r-   r.   )r2   r   r3   Úexcs   &   r
   Ú_screen_startr=   '   si   € Ý)ðØ�]‰]‹_ˆô 
ˆM˜"Ÿ*™*˜Ð%;¸B¿J¹J¸<ÀrÈ"Ï+É+ÈÐVWÐ
XÔYÙøô	 ô Ü�˜c˜UÐ#Ô$Ýûðús   ˆA ÁA1ÁA,Á,A1c               ó   € V ^8„  d   QhRR/# r   r   )r	   s   "r
   r   r   2   s   € ÷ 
ñ 
˜#ñ 
r   c           	     ó2  € ^ RI Hp VP                  4       '       dX   ^ RI Hp VP	                  \        \        V RR4      4      '       * R7      P                  VP                  8X  d   \        R4       ^# \        VP                  4       '       d   RMR4       ^ # )	r   r8   )r   ÚforceF)Úunless_humanzSBot Desktop: a human holds this screen; re-run with --force to take it down anyway.zBot Desktop: stoppedzBot Desktop: was not running)r   r   Úis_supported_hostr   Úreleaser   r   r   r+   r    Ústop)r2   r   r   s   &  r
   Ú_screen_stoprE   2   so   € Ý)Ø× Ñ ×"Ò"õ 	,Ø�=‰=¬$¬w°t¸WÀeÓ/LÓ*MÔ&Mˆ=ÓN×UÑUÐY^×YdÑYdÔdÜÐgÔhÙÜ	 G§L¡L§N¢NÑ
 Ð8VÔWÙr   c               ó   € V ^8„  d   QhRR/# r   r   )r	   s   "r
   r   r   ?   s   € ÷ $ñ $˜Sñ $r   c                ó   € ^ RI HpHp VP                  4       '       g   \	        R4       ^# VP                  4       '       g   \	        R4       ^ # VP                  4       pVf   \	        R4       ^# \	        RV 24       \        \        V RR4      4      '       gU   \        P                  P                  4       '       d1   \        R	4      P                  4       P                  4       pVR9  d   ^#  VP                  R
 \        R7      pYQP"                  8X  d$   \	        RTP%                  R4      ,           4       ^# T^ 8w  d   \	        RT 24       T;'       g    ^# TP                  4       pT'       d$   \	        RRP'                  T4      ,           4       ^# \	        R4       ^ #   TP                    d   p\	        RT 24        Rp?^# Rp?ii ; i)r   )Úinstallr   z4Bot Desktop screens run on Linux gateway hosts only.z(Bot Desktop: packages already installed.Nz¤Bot Desktop: no supported package manager (apt/dnf/pacman) found. Install TigerVNC (Xvnc) and the Xfce core (xfwm4, xfce4-panel, xfdesktop, xfce4-settings) by hand.u   Bot Desktop: installing â†’ ÚyesFzProceed? [Y/n] c                 ó.   € \         P                   ! R 4      # )z[sudo] password: )Úgetpassr   r   r
   Ú<lambda>Ú!_screen_install.<locals>.<lambda>T   s   € ¼7¿?º?ÐK^Ô;_r   )Úask_passwordÚon_liner9   z?Bot Desktop: this host has no sudo. Run as root on the host:
  zsudo zBot Desktop: installer exited zBot Desktop: still missing r   zYBot Desktop: ready. Start with `hermes computer-use screen start` or from Hermes Desktop.)Ú ÚyrI   )r   rH   r   rB   r    Úmissing_binariesr*   r   r   ÚsysÚstdinÚisattyÚinputÚstripÚlowerÚinstall_packagesÚInstallBusyÚNO_SUDOÚremoveprefixr(   )r2   rH   r   ÚcmdÚanswerÚrcr<   r)   s   &       r
   Ú_screen_installr`   ?   sˆ  € ß2Ø×$Ñ$×&Ò&ÜÐDÔEÙØ×#Ñ#×%Ò%ÜÐ8Ô9ÙØ
×
!Ñ
!Ó
#€CØ
‚{Üð Wô 	XáÜ	Ð(¨¨Ð
.Ô/Ü”˜˜e UÓ+×,Ò,´·±×1AÑ1A×1CÒ1CÜÐ(Ó)×/Ñ/Ó1×7Ñ7Ó9ˆØÐ)Ô)ÙðØ×%Ñ%Ñ3_ÔinÐ%Óoˆð 
�_‰_ÔÜÐPÐSV×ScÑScÐdkÓSlÕlÔmÙØ	ˆQ„wÜÐ.¨r¨dÐ3Ô4Ø�wˆw�QˆØ×&Ñ&Ó(€GßÜÐ+¨d¯i©i¸Ó.@Õ@ÔAÙÜ	Ð
eÔfÙøð ×Ñô Ü�˜c˜UÐ#Ô$Ýûðús   Ã/F# Æ#GÆ4GÇGr   r:   rD   rH   c               ó   € V ^8„  d   QhRR/# )r   r   ÚNoner   )r	   s   "r
   r   r   i   s   € ÷ *ñ *¸Dñ *r   c                ó€  a€ V P                  R RRR7      oSP                  RR7      pVP                  RRR7      pV! VR	4       VP                  R
RR7       VP                  RRR7      pVP                  RRRR7       VP                  RRR7      pVP                  RRRRR7       V3R lpSP                  VR7       R# )ÚscreenzKBot Desktop: the headless screen this profile's computer_use drives (Linux)a²  On a headless Linux gateway host Hermes gives each profile its own Xfce screen
(TigerVNC Xvnc on a private Unix socket). The agent's computer_use and headed
browser act on it; Hermes Desktop shows it live and lets a human take over for
logins, 2FA or CAPTCHAs, then hand control back.

`install` adds the system packages (apt/dnf/pacman); `start`/`stop` manage this
profile's screen; `status` shows display, control holder and socket.)ÚhelpÚdescriptionÚcomputer_use_screen_action)Údestr   zMShow whether this profile's screen is installed/running and who holds control)re   z Emit the status payload as JSON.r:   zStart this profile's screenrD   zBStop this profile's screen (hands control back to the agent first)z--forceÚ
store_truez9Stop even while a human holds control from Hermes Desktop)Úactionre   rH   z9Install TigerVNC + Xfce core via the host package managerz-yz--yesz-Do not ask before running the package managerc           	     ó¦   <€ \         P                  \        \        V R R4      ;'       g    R4      4      pVe	   V! V 4      # SP	                  4        R# )rg   NrP   )ÚSCREEN_ACTIONSr$   Ústrr   Ú
print_help)r2   Úhandlerrd   s   & €r
   Ú_cmdÚ!build_screen_parser.<locals>._cmd{   sH   ø€ Ü ×$Ñ$¤S¬°Ð7SÐUYÓ)Z×)`Ð)`Ð^`Ó%aÓbˆØÒÙ˜4“=Ð Ø×ÑÖr   )Úscreen_funcN)Ú
add_parserÚadd_subparsersÚadd_argumentÚset_defaults)Úcomputer_use_subÚadd_json_flagÚsubr3   rD   Úinstrp   rd   s   &&     @r
   Úbuild_screen_parserr{   i   sÖ   ø€ Ø×(Ñ(ØÐdðSð )ó T€Fð ×
Ñ
Ð%AÐ
Ó
B€CØ	�‰˜Ð'vˆÓ	w€BÙ�"Ð8Ô9Ø‡N�N�7Ð!>€NÔ?Ø�>‰>˜&Ð'kˆ>Ól€DØ×Ñ�i¨Ð;vÐÔwØ�>‰>˜)Ð*eˆ>Óf€DØ×Ñ�d˜G¨LÐ?nÐÔoõð
 ×Ñ DÐÖ)r   )Ú__doc__Ú
__future__r   rK   r   rS   r5   r=   rE   r`   rl   r{   r   r   r
   Ú<module>r~      sM   ðñSõ #ã Û Û 
õõ6õ
õ$ðN ˜N¨G°]ÀFÈLÐZcÐetÐu€÷*r   