+
    „WÝja
  ã                   óŒ   € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ]P                  ! R4      t	RR/R R llt
]R R	 l4       tR# )
zHKeep Windows console backpressure off the packaged desktop startup path.N)Úcontextmanagerzhermes_cli.desktopÚsource_modeFc                ó4   € V ^8„  d   QhR\         R\        RR/# )é   Úmessager   ÚreturnN)ÚstrÚbool)Úformats   "ÚNC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\desktop_console.pyÚ__annotate__r      s!   € ÷ ñ ¤3ð ¼ð Èñ ó    c                ó„   € \         P                  R 8X  d    V'       g   \        P                  V 4       R# \	        V 4       R# )Úwin32N)ÚsysÚplatformÚloggerÚinfoÚprint)r   r   s   &$r   Údesktop_launch_noticer      s#   € Ü
‡|�|�wÔ§{ä�‰�GÖäˆgŽr   c                ó$   € V ^8„  d   QhR\         /# )r   r   )r	   )r
   s   "r   r   r      s   € ÷ 0Eñ 0E¬4ñ 0Er   c              #  óò  "  € \         P                  R8w  g	   V '       d   / x € R# R p/ p. p R\        P                  3R\        P                  33 F`  w  rE\
        P                  ! 4       w  rgWrV&   \        P                  ! WV3RV 2RR7      p VP                  4        TP                  T4       Kb  	  Vx € VP                  4        F  p\
        P                  ! V4       K  	  \        P                  ! 4       ^,           p	V F9  pVP!                  \#        ^ V	\        P                  ! 4       ,
          4      R	7       K;  	  R#   \         d    \
        P                  ! T4       h i ; i  TP                  4        F  p\
        P                  ! T4       K  	  \        P                  ! 4       ^,           p	T F9  pTP!                  \#        ^ T	\        P                  ! 4       ,
          4      R	7       K;  	  i ; i5i)
a±  Drain packaged Windows stdout/stderr into the existing rotating logs.

Inheriting the console lets an unresponsive console host/profiler block
Electron's synchronous startup messages before it can create a window.
Keep source launches interactive and preserve subprocess.run's lifecycle
and exit-code handling. Read bounded lines so output cannot grow a buffer
without limit, and never wait indefinitely on a descendant's open pipe.
r   Nc                 óè  € \         P                  ! V R 4      ;_uu_ 4       pR	pVP                  V^,           4      ;p'       d“   \        V4      V8”  dK   V'       d+   VP	                  R4      '       g   VP                  R4      pK2  \
        P                  VR4       Kz  \
        P                  VRVP                  RRR7      P                  4       4       K²   RRR4       R#   + '       g   i     R# ; i)
Úrbó   
i    z"[desktop] [oversized line omitted]z[desktop] %szutf-8Úreplace)ÚerrorsNi   )	ÚosÚfdopenÚreadlineÚlenÚendswithr   ÚlogÚdecodeÚrstrip)Úread_fdÚlevelÚstreamÚlimitÚdatas   &&   r   ÚdrainÚ%desktop_console_output.<locals>.drain#   s©   € Ü�YŠY�w ×%Ô%¨ð ˆEØ Ÿ/™/¨%°!­)Ó4Ð4�$Ö4Ü�t“9˜uÔ$ß t§}¡}°U×';Ò';Ø%Ÿ™¨tÓ4šÜ—J‘J˜uÐ&JÖKä—J‘J˜u n°d·k±kÀ'ÐR[°kÓ6\×6cÑ6cÓ6eÖfð 5÷	 &×%×%Ò%ús    "C ÁC ÁC Á2A#C Ã C1	ÚstdoutÚstderrzdesktop-console-T)ÚtargetÚargsÚnameÚdaemon)Útimeout)r   r   ÚloggingÚINFOÚERRORr   ÚpipeÚ	threadingÚThreadÚstartÚBaseExceptionÚcloseÚappendÚvaluesÚtimeÚ	monotonicÚjoinÚmax)
r   r*   ÚstreamsÚreadersr0   r&   r%   Úwrite_fdÚreaderÚdeadlines
   $         r   Údesktop_console_outputrG      sŠ  é € ô ‡|�|�wÔ§+ØŠÙògð €GØ€GðEà%¤w§|¡|Ð4°xÄÇÁÐ6OÓP‰KˆDÜ "§¢£	ÑˆGØ$�D‰MÜ×%Ò%Ø¨UÐ#3Ð<LÈTÈFÐ:SÐ\`ôˆFðØ—‘”ð �N‰N˜6Ö"ñ Qð ŠàŸ™Ö(ˆHÜ�HŠH�XÖñ )ä—>’>Ó# aÕ'ˆÛˆFØ�K‰K¤ A x´$·.².Ó2BÕ'BÓ CˆKÖDó øô !ô Ü—’˜Ô!Øðûð  Ÿ™Ö(ˆHÜ�HŠH�XÖñ )ä—>’>Ó# aÕ'ˆÛˆFØ�K‰K¤ A x´$·.².Ó2BÕ'BÓ CˆKÖDò üs<   ‚G7 G7®A"E* ÂEÂ!E* Â:B
G7Å#E'Å'E* Å*B
G4Ç4G7)Ú__doc__r3   r   r   r7   r>   Ú
contextlibr   Ú	getLoggerr   r   rG   © r   r   Ú<module>rL      sM   ðÙ Nã Û 	Û 
Û Û Ý %à	×	Ò	Ð/Ó	0€ð¸u÷ ð ô0Eó ò0Er   