+
    „WÝjèu  ã                   óP  € R t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ]P4                  ! ]4      tR	tR
tRtRt Rt!Rt"]PF                  ! 4       t$R R lt%R R lt&R R lt']PP                  R 4       t)R`R R llt*R R lt+R R lt,Rt-Rt.R R lt/R  R! lt0R" R# lt1]"3R$ R% llt2R& R' lt3R( R) lt4RaR* R+ llt5RaR, R- llt6] ! R. R/4      4       t7R0 R1 lt8R2R3/t9R4 R5 lt:R6 R7 lt;R8 R9 lt<R: R; lt=R<]!R=R>/R? R@ llt>Rbt?Rct@RA RB ltAR=R>/RC RD lltBRdRE RF lltCRG^ÈRHRIRJR/RK RL lltDRMtEReRN RO lltFRdRP RQ lltG] ! RR RS4      4       tHRG^ÈRT^R=R>/RU RV lltIRW RX ltJRY tKRZtLR[ R\ ltMR] tNR^ tOR_tPR# )fz.``hermes debug`` debug tools for Hermes Agent.N)Ú	dataclass©ÚPath)ÚSimpleNamespace)ÚOptional©Úget_hermes_home)Úredact_debug_support_text)Úatomic_json_writez[[hermes debug share: log content redacted at upload time. run with --no-redact to disable]
úhttps://paste.rs/zhttps://dpaste.com/api/zhermes-agent/debug-sharei Ð i`T  c                ó$   € V ^8„  d   QhR\         /# ©é   Úreturnr   )Úformats   "ÚDC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\debug.pyÚ__annotate__r   *   s   € ÷ 9ñ 9”tñ 9ó    c                  ó2   € \        4       R ,          R,          # )Úpasteszpending.jsonr   © r   r   Ú_pending_filer   *   s   € ÜÓ˜xÕ'¨.Õ8Ð8r   c                ó:   € V ^8„  d   QhR\         \        ,          /# r   ©ÚlistÚdict)r   s   "r   r   r   .   s   € ÷ Yñ Y”tœD•zñ Yr   c                  óR  €  \         P                  ! \        4       P                  R R7      4      p \        T \        4      '       g   . # T  Uu. uF6  p\        T\        4      '       g   K  RR0TP                  4       8:  g   K4  TNK8  	  up#   \        \
        3 d    . u # i ; iu upi )z	utf-8-sig)ÚencodingÚurlÚ	expire_at)
ÚjsonÚloadsr   Ú	read_textÚOSErrorÚ
ValueErrorÚ
isinstancer   r   Úkeys)ÚdataÚes     r   Ú_load_pendingr)   .   s�   € ðÜ�zŠzœ-›/×3Ñ3¸[Ð3ÓIÓJˆô �dœD×!Ò!Øˆ	ÙÓX‘t�!œz¨!¬T×2ŒA¸¸{Ð7KÈqÏvÉvËxÑ7W�AˆA‘tÑXÐXøô	 ”ZÐ ô ØŠ	ðüò Ys#   ‚.B ÁB$Á)B$ÂB$ÂB!Â B!c                ó>   € V ^8„  d   QhR\         \        ,          RR/# )r   Úentriesr   Nr   )r   s   "r   r   r   8   s   € ÷ ñ œ4¤�:ð ¨$ñ r   c                 óT   €  \        \        4       V 4       R #   \         d     R # i ; i©N)r
   r   r#   )r+   s   &r   Ú_save_pendingr.   8   s%   € ðÜœ-›/¨7Ö3øÜô Úðús   ‚ ˜'¦'c               #  óæ   "  € ^ RI Hp  \        4       pV ! VP                  VP                  R,           4      \
        RRV R24      ;_uu_ 4        Rx € RRR4       R#   + '       g   i     R# ; i5i)z[Cross-process lock for pending.json read-modify-write (gateway sweep vs CLI/gateway share).)Ú
_file_lockz.lockg      $@z3Timed out waiting for the pending paste list lock (Ú)N)Úhermes_cli.authr0   r   Ú	with_nameÚnameÚ_PENDING_LOCK_HOLDER)r0   Úpaths     r   Ú_pending_lockr7   ?   s`   é € õ +Ü‹?€DÙ	�D—N‘N 4§9¡9¨wÕ#6Ó7Ô9MÈtØIÈ$ÈÈqÐQ÷
Sõ 
Sã÷
S÷ 
S÷ 
Sò 
Süs   ‚AA1ÁAÁ
A1ÁA.	Á(	A1c                óh   € V ^8„  d   QhR\         \        ,          R\        \        \        3,          /# )r   Únowr   )r   ÚfloatÚtupleÚint)r   s   "r   r   r   I   s&   € ÷ )ñ )œx¬�ð )¼%ÄÄSÀ½/ñ )r   c           
     ó  € \        4       pV'       g   R# V f   \        P                  ! 4       MT p\        4       pV F|  p \        VP	                  R^ 4      4      pYR8”  d   K'   \        TP	                  RR4      4      pT'       g   TR,           T8:  g   K[  TP                  TP	                  RR4      4       K~  	  \        4       ;_uu_ 4        \        4       pV Uu. uF  p\        WƒV4      '       g   K  VNK  	  p	p\        V	4      \        V4      8w  d   \        V	4       RRR4       \        V4      \        X	4      3#   \
        \        3 d     EK  i ; i  \         d    Rp Léi ; iu upi   + '       g   i     LW; i)uà   Synchronously DELETE pending pastes whose ``expire_at`` has passed â†’ (deleted, remaining).

Best-effort and silent: failed deletes stay pending for the next sweep, up to 24h past
expiration (paste.rs GCs them eventually).
Nr   r   Ú Fi€Q )é    r?   )r)   ÚtimeÚsetr:   ÚgetÚ	TypeErrorr$   Údelete_pasteÚ	ExceptionÚaddr7   Ú_keep_after_sweepÚlenr.   )
r9   r+   ÚcurrentÚreapedÚentryr   ÚgoneÚlatestr(   Ú	remainings
   &         r   Ú_sweep_expired_pastesrO   I   s9  € ô ‹o€GßØˆØ š[Œd�iŠiŒk¨c€GÜ“u€FÛˆð	Ü˜eŸi™i¨°QÓ7Ó8ˆIð ÔÙð	Ü §	¡	¨%°Ó 4Ó5ˆD÷ �9˜uÕ$¨Ö/Ø�J‰J�u—y‘y ¨Ó+Ö,ñ ô 
��Ü“ˆÙ &ÓP¡˜1Ô*;¸AÀw×*O—Q�Q¡ˆ	ÐPÜˆy‹>œS ›[Ô(Ü˜)Ô$÷	 
ô
 �‹Kœ˜Y›Ð(Ð(øô# œ:Ð&ô 	Ûð	ûô ô 	ØŠDð	üò Q÷ 
�úsH   Á E Á$EÃE1ÃE,Ã6E,Ã<&E1Å EÅEÅE)Å(E)Å,E1Å1F	c                ó^   € V ^8„  d   QhR\         R\        \        ,          R\        R\        /# )r   rK   rJ   rI   r   )r   rA   Ústrr:   Úbool)r   s   "r   r   r   k   s2   € ÷ Iñ IœTð I¬3¬s­8ð I¼eð IÌñ Ir   c                 ó¶   €  \        V P                  R ^ 4      4      pT P                  RR4      T9   ;'       d    Y28*  '       * #   \        \        3 d     R# i ; i)r   Fr   r>   )r:   rB   rC   r$   )rK   rJ   rI   r   s   &&& r   rG   rG   k   s[   € ðÜ˜%Ÿ)™) K°Ó3Ó4ˆ	ð —	‘	˜% Ó$¨Ñ.×GÐG°9Ñ3GÔHÐHøô ”zÐ"ô Úðús   ‚A ÁAÁAc                ó   € V ^8„  d   QhRR/# )r   r   Nr   )r   s   "r   r   r   t   s   € ÷  ñ  ¨4ñ  r   c                 ó˜   € \         P                  ! \        4      ;_uu_ 4        \        4        RRR4       R#   + '       g   i     R# ; i)z:Pending-paste cleanup that never lets /debug fail offline.N)Ú
contextlibÚsuppressrE   rO   r   r   r   Ú!_best_effort_sweep_expired_pastesrX   t   s(   € ä	×	Ò	œY×	'Õ	'ÜÔ÷ 
(×	'×	'Ò	'ús	   £8¸A		u   âš ï¸�  This will upload system info + logs to a PUBLIC paste service.

Cryptographic secrets (API keys, tokens, passwords) are redacted before
upload, but the following personal data is NOT redacted and will be public:
  â€¢ Your display name and persistent platform user ID
  â€¢ Verbatim content of your recent messages (prompts, responses, tool output)
  â€¢ Local filesystem paths
  â€¢ Any other PII present in the logs

The resulting URL is public to anyone who has the link. Pastes auto-delete
after 6 hours, but may be archived by third parties in the meantime.

If paste.rs is unreachable, uploads fall back to dpaste.com: those pastes
stay public for the --expire window (default: 1 day) and CANNOT be deleted
with `hermes debug delete`.

Use --local to view the report without uploading.
uT  âš ï¸� **Privacy notice:** This uploads system info + recent log tails (may contain conversation fragments) to a public paste service. Full logs are NOT included from the gateway â€” use `hermes debug share` from the CLI for full log uploads.
Pastes auto-delete after 6 hours (dpaste.com fallback pastes: kept for 1 day, cannot be deleted).c                óF   € V ^8„  d   QhR\         R\        \         ,          /# ©r   r   r   )rQ   r   )r   s   "r   r   r   —   s   € ÷ ñ œ3ð ¤8¬C¥=ñ r   c                ó¤   € V P                  4       P                  R4      p R F*  pV P                  V4      '       g   K  V \        V4      R u # 	  R# )zFPaste ID from a paste.rs URL (dpaste.com pastes have no deletable ID).Ú/N)r   zhttp://paste.rs/)ÚstripÚrstripÚ
startswithrH   )r   Úprefixs   & r   Ú_extract_paste_idra   —   sG   € à
�)‰)‹+×
Ñ
˜SÓ
!€CÛ;ˆØ�>‰>˜&×!Ô!Ø”s˜6“{�|Ð$Ò$ñ <ñ r   c                ó0   € V ^8„  d   QhR\         R\        /# rZ   ©rQ   rR   )r   s   "r   r   r       s   € ÷ Qñ Qœð Q¤ñ Qr   c                ó@   € V P                  4       P                  R4      # )zQWhether *url* is a dpaste.com paste (no unauthenticated delete exists for those).)zhttps://dpaste.com/zhttp://dpaste.com/)r]   r_   )r   s   &r   Ú_is_dpaste_urlre       s   € à�9‰9‹;×!Ñ!Ð"OÓPÐPr   c                ó0   € V ^8„  d   QhR\         R\        /# rZ   rc   )r   s   "r   r   r   ¥   s   € ÷ (ñ (”cð (œdñ (r   c                óº  € \        V 4      pV'       g2   \        V 4      '       d   \        RV ,           4      h\        RV  24      h\        P                  P                  \         V 2RR\        /R7      p\        P                  P                  V^R7      ;_uu_ 4       p^ÈVP                  u;8*  ;'       d    R8  Mu uuRRR4       #   + '       g   i     R# ; i)	zXDelete a paste.rs paste (the only service with unauthenticated DELETE). True on success.z|Cannot delete: dpaste.com pastes cannot be deleted (anonymous uploads have no owner token); they expire on their own.  Got: z7Cannot delete: only paste.rs URLs are supported.  Got: ÚDELETEú
User-Agent)ÚmethodÚheaders©Útimeouti,  N)
ra   re   r$   ÚurllibÚrequestÚRequestÚ_PASTE_RS_URLÚ_USER_AGENTÚurlopenÚstatus)r   Úpaste_idÚreqÚresps   &   r   rD   rD   ¥   s½   € ä  Ó%€HßÜ˜#×ÒÜðQØSVõWóXð Xô ÐRÐSVÐRWÐXÓYÐYÜ
�.‰.×
 Ñ
 ¤M ?°8°*Ð!=ÀhØ*6¼Ð)Dð !ó F€Cä	�‰×	Ñ	 ¨RÐ	×	0Ô	0°DØ�d—k‘k×'Ô' CÔ'÷ 
1×	0×	0Ó	0ús   Â C	Ã	C	c                óF   € V ^8„  d   QhR\         \        ,          R\        /# )r   ÚurlsÚdelay_seconds)r   rQ   r<   )r   s   "r   r   r   ´   s"   € ÷ \ñ \¤¤S¥	ð \¼#ñ \r   c                óˆ  € V  Uu. uF  p\        V4      '       g   K  VNK  	  ppV'       g   R#  \        4       ;_uu_ 4        \        4        Uu/ uF  qDR,          \        VR,          4      bK  	  pp\        P                  ! 4       V,           pV F   p\        WeP                  VR4      4      WR&   K"  	  \        VP                  4        UUu. uF  w  r'RVRV/NK  	  upp4       RRR4       R# u upi u upi u uppi   + '       g   i     R# ; i  \        \        3 d    \        P                  RTRR7        R# i ; i)zZRecord paste.rs *urls* for deletion ``delay_seconds`` from now (merged into pending.json).Nr   r   g        z%could not schedule auto-delete for %sT)Úexc_info)ra   r7   r)   r:   r@   ÚmaxrB   r.   Úitemsr#   ÚTimeoutErrorÚloggerÚdebug)ry   rz   ÚuÚpaste_rs_urlsr(   Úby_urlr   Útss   &&      r   Ú_schedule_auto_deleter†   ´   s  € á $Ó=¡˜1Ô(9¸!×(<—Q�Q¡€MÐ=ßÙð
\Ü�_�_äQ^ÔQ`Ó'aÑQ`ÈA¨%­´%¸¸+½Ó2GÒ(GÑQ`ˆFÐ'aÜŸ	š	› mÕ3ˆIÛ"�Ü 	¯:©:°a¸Ó+=Ó>�“	ñ #äÀFÇLÁLÄNÔSÁN¹5¸1˜E 1 k°2Ó6ÁNÒSÔT÷ ‰_ùò	 >ùò (bùó T÷ �_ˆ_ûô ”\Ð"ô \ä�‰Ð<¸mÐVZˆ×[ð\úsX   …C0�C0°D ÁD Á"C5Á1AD ÃC:ÃD Ã&D Ã5D Ä D	ÄD ÄD Ä)EÅ Ec          
      óT   € V ^8„  d   QhR\         R\         R\        R\         R\         /# )r   ÚserviceÚendpointÚbodyÚcontent_typer   )rQ   Úbytes)r   s   "r   r   r   Æ   s0   € ÷ 	ñ 	œð 	¬ð 	´5ð 	Ìð 	ÔPSñ 	r   c           	     ó¨  € \         P                  P                  WRRVR\        /R7      p\         P                  P	                  V^R7      ;_uu_ 4       pVP                  4       P                  R4      P                  4       pRRR4       XP                  R4      '       g   \        V^ÈR	7      p\        R
V  RV 24      hV#   + '       g   i     LG; i)zGPOST *body* to a paste service and return the paste URL it echoes back.ÚPOSTzContent-Typeri   )r'   rj   rk   rl   úutf-8NÚhttp)Ú	max_charszUnexpected response from ú: )rn   ro   rp   rr   rs   ÚreadÚdecoder]   r_   r	   r$   )rˆ   r‰   rŠ   r‹   rv   rw   r   Úsafe_responses   &&&&    r   Ú_post_paster–   Æ   s¯   € ä
�.‰.×
 Ñ
  ¸VØ*8¸,ÈÔVaÐ)bð !ó d€Cä	�‰×	Ñ	 ¨RÐ	×	0Ô	0°DØ�i‰i‹k× Ñ  Ó)×/Ñ/Ó1ˆ÷ 
1à�>‰>˜&×!Ò!Ü1°#ÀÔEˆÜÐ4°W°I¸RÀ¸ÐOÓPÐPØ€J÷ 
1×	0ús   Á.CÃC	c                ó0   € V ^8„  d   QhR\         R\         /# )r   Úcontentr   ©rQ   )r   s   "r   r   r   Ò   s   € ÷ hñ hœcð h¤cñ hr   c                 óD   € \        R \        V P                  R4      R4      # )úpaste.rsr�   ztext/plain; charset=utf-8)r–   rq   Úencode©r˜   s   &r   Ú_upload_paste_rsrž   Ò   s   € Ü�z¤=°'·.±.ÀÓ2IÐKfÓgÐgr   c                ó<   € V ^8„  d   QhR\         R\        R\         /# ©r   r˜   Úexpiry_daysr   ©rQ   r<   )r   s   "r   r   r   Ö   s&   € ÷ Dñ D¤ð D´#ð D¼cñ Dr   c                 óÀ   a€ R oRV 3R
R\        V4      33pRP                  V3R lV 4       4      RS R2,           P                  R4      p\        R\        VR	S 24      # )z----HermesDebugBoundary9f3cr˜   r¡   r>   c              3   ó@   <"  € T F  w  rR S RV RV R2x € K  	  R# 5i)ú--z(
Content-Disposition: form-data; name="z"

z
Nr   )Ú.0ÚnÚvÚboundarys   &  €r   Ú	<genexpr>Ú%_upload_dpaste_com.<locals>.<genexpr>Ù   s3   øé € ð (Ù &™˜ð ˜˜
Ð"LÈQÈCÈyÐYZÐX[Ð[_Õ`Û &ùs   ƒr¥   z--
r�   ú
dpaste.comzmultipart/form-data; boundary=)ÚsyntaxÚtext)rQ   Újoinrœ   r–   Ú_DPASTE_COM_URL)r˜   r¡   ÚfieldsrŠ   r©   s   &&  @r   Ú_upload_dpaste_comr²   Ö   s|   ø€ Ø,€HØ˜'Ð"Ð$6¸ÌÈKÓHXÐ8YÐZ€FØ�G‰Gô (Ù &ó(ó (Ø,.¨x¨j¸Ð*?õ@ßAGÁÈÃð 	ä�|¤_°dØ7¸°zÐBóDð Dr   c                ó<   € V ^8„  d   QhR\         R\        R\         /# r    r¢   )r   s   "r   r   r   ß   s&   € ÷ [ñ [¤ð [´#ð [¼cñ [r   c                óî   a a€ . pRV 3R l3RV V3R l33 F  w  r4 V! 4       u # 	  \        RRP                  V4      ,           4      h  \          d"   pTP                  T RT 24        Rp?KY  Rp?ii ; i)	a'  Upload *content* to a paste service, trying paste.rs then dpaste.com.

``expiry_days`` applies only to the dpaste.com fallback (paste.rs pastes are
swept after 6h); dpaste.com's minimum is 1 day and anonymous pastes cannot
be deleted afterwards, so callers must not promise a shorter retention.
r›   c                  ó   <€ \        S 4      # r-   )rž   r�   s   €r   Ú<lambda>Ú$upload_to_pastebin.<locals>.<lambda>è   s   ø€ Ô-¨gÔ6r   r¬   c                  ó   <€ \        S SR 7      # )©r¡   )r²   )r˜   r¡   s   €€r   r¶   r·   é   s   ø€ Ô1°'À{ÕSr   r’   Nz)Failed to upload to any paste service:
  z
  )rE   ÚappendÚRuntimeErrorr¯   )r˜   r¡   Úerrorsrˆ   ÚuploadÚexcs   ff    r   Úupload_to_pastebinr¿   ß   s�   ù€ ð €Fà	Ô6Ð7Ø	ÕSÐTóV‰ˆð	/Ù“8ŠOñ	Vô ÐCÀfÇkÁkÐRXÓFYÕYÓ
ZÐZøô ô 	/Ø�M‰M˜W˜I R¨ uÐ-×.Ò.ûð	/ús   œAÁA4ÁA/Á/A4c                   ó0   a € ] tR t^ñt o RtV 3R ltRtV tR# )ÚLogSnapshotz7Single-read snapshot of a log file used by debug-share.c                ó^   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[;R&   S[ S[,          ;R&   # )r   r6   Ú	tail_textÚ	full_text)r   r   rQ   )r   Ú__classdict__s   "€r   r   ÚLogSnapshot.__annotate__ñ   s3   ø‡ ‚ ñ ‘4�.Ññ ñ �Nñ	 ñ
 ™�}Ñò r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__©rÅ   s   @r   rÁ   rÁ   ñ   s   ø‡ € áA÷ ƒ r   rÁ   c                óF   € V ^8„  d   QhR\         R\        \        ,          /# ©r   Úlog_namer   ©rQ   r   r   )r   s   "r   r   r   ù   s   € ÷ #ñ #¤ð #¬´­ñ #r   c                ó   € ^ RI Hp V! V 4      # )z@Where *log_name* would live if present. Doesn't check existence.)Úlog_file_path)Úhermes_cli.logsrÕ   )rÒ   rÕ   s   & r   Ú_primary_log_pathr×   ù   s   € å-Ù˜Ó"Ð"r   Údesktopz¨written by Hermes Desktop on the machine running the app, not by this backend. If the desktop connects to a remote/docker/SSH backend, collect it on that client machinec                ó0   € V ^8„  d   QhR\         R\         /# rÑ   r™   )r   s   "r   r   r     s   € ÷ ]ñ ]¤ð ]¬ñ ]r   c                ó~   € \         P                  V 4      pVf   R# \        V 4      pRT V'       d	   RV 2 R2# R R2# )z8Explain a missing log instead of stating a bare absence.z(file not found)z(not on this host: u    â€” expected at r>   r1   )Ú_CLIENT_SIDE_LOGSrB   r×   )rÒ   ÚreasonÚprimarys   &  r   Ú_missing_log_noterÞ     sR   € ä×"Ñ" 8Ó,€FØ‚~Ù!Ü Ó)€GØ   Ï'Ð+<¸W¸IÐ)FÐ(ZÐZ[Ð\Ð\ÐWYÐ(ZÐZ[Ð\Ð\r   c                óF   € V ^8„  d   QhR\         R\        \        ,          /# rÑ   rÓ   )r   s   "r   r   r     s   € ÷ ñ ¤ð ¬´­ñ r   c                óî   € \        V 4      pVf   R# WP                  VP                   R2,          3 F>  pVP                  4       '       g   K  VP	                  4       P
                  ^ 8”  g   K<  Vu # 	  R# )zRFirst non-empty candidate for *log_name* (primary, then the .1 rotation), or None.Nz.1)r×   Úparentr4   ÚexistsÚstatÚst_size)rÒ   rÝ   Ú	candidates   &  r   Ú_resolve_log_pathræ     sd   € ä Ó)€GØ‚ÙØŸ~™~°7·<±<°.ÀÐ0CÕCÓDˆ	Ø×Ñ×Ô )§.¡.Ó"2×":Ñ":¸QÖ">ØÒñ Eñ r   c                ó€   € V ^8„  d   QhR\         R\        R\        R\        R\        \        \        \        3,          /# )r   Úlog_pathÚsizeÚ	max_bytesÚ
tail_linesr   )r   r<   r;   rŒ   rR   )r   s   "r   r   r     s@   € ÷ 9ñ 9Üð9Üð9Ü*-ð9Ü;>ð9ä
Œ5”#”tÐÕñ9r   c                óª  € \        V R4      ;_uu_ 4       pW8:  d   VP                  4       ^ R3uuRRR4       # RpTp. p^ p^ p	V^ 8”  d¦   W‚^,          8  d™   W‚8  g   W“^,           8:  d†   \        WV4      p
Wj,          pVP                  V4       VP                  V
4      pVP	                  ^ V4       V\        V4      ,          pW›P                  R4      ,          p	\        V^,          R4      pK¬  RpV^ 8”  d-   VP                  V^,
          4       VP                  ^4      R8H  pRP                  V4      Wl3uuRRR4       #   + '       g   i     R# ; i)zQReturn a bounded tail, its file offset, and whether it starts on a line boundary.ÚrbTNi    ó   
i   r   )Úopenr“   ÚminÚseekÚinsertrH   Úcountr¯   )rè   ré   rê   rë   ÚfÚ
chunk_sizeÚposÚchunksÚtotalÚnewline_countÚ	read_sizeÚchunkÚstarts_on_boundarys   &&&&         r   Ú_read_tail_bytesrý     s"  € ô 
ˆh˜×	Ô	 ØÔØ—6‘6“8˜Q Ð$÷ 
Ò	ð ˆ
ØˆØ ˆØˆØˆØ�QŒw˜5¨q¥=Ô0ØÔ%¨Àq½.Ô)HÜ˜JÓ,ˆIØÕˆCØ�F‰F�3ŒKØ—F‘F˜9Ó%ˆEØ�M‰M˜!˜UÔ#Ø”S˜“ZÕˆEØŸ[™[¨Ó/Õ/ˆMÜ˜Z¨!�^¨UÓ3ŠJØ!ÐØ�Œ7Ø�F‰F�3˜•7ŒOØ!"§¡¨£¨eÑ!3ÐØ�x‰x˜Ó Ð8÷- 
×	×	Ó	ús   •E¹C=EÅE	c                ó^   € V ^8„  d   QhR\         R\        R\        \         \        3,          /# )r   r®   rê   r   )rQ   r<   r;   rR   )r   s   "r   r   r   9  s*   € ÷ 
8ñ 
8¤3ð 
8´3ð 
8¼5ÄÄdÀÕ;Kñ 
8r   c                ó  € V P                  R4      p\        V4      V8:  d   V R3# \        V4      V,
          pW#^,
          V R8H  pW#R pV'       g#   RV9   d   VP                  R^4      ^,          MRpVP                  RRR7      R3# )	zLKeep at most the last ``max_bytes`` without publishing a partial first line.r�   Frî   Nr   Úreplace©r¼   T)rœ   rH   Úsplitr”   )r®   rê   ÚrawÚcutÚon_boundaryÚkepts   &&    r   Ú_truncate_complete_linesr  9  sˆ   € à
�+‰+�gÓ
€CÜ
ˆ3ƒx�9ÔØ�Uˆ{ÐÜ
ˆc‹(�YÕ
€CØ˜A•g˜cÐ" eÑ+€KØˆtˆ9€DßØ*/°4¬-ˆt�z‰z˜% Ó# AÖ&¸SˆØ�;‰;�w yˆ;Ó1°4Ð7Ð7r   rê   ÚredactTc          
      óT   € V ^8„  d   QhR\         R\        R\        R\        R\        /# )r   rÒ   rë   rê   r  r   )rQ   r<   rR   rÁ   )r   s   "r   r   r   F  s;   € ÷ !añ !aÜð!aÜ"%ð!aÜ25ð!aÜPTð!aäñ!ar   c               ó&  € \        V 4      pVfE   \        V 4      pV'       d   VP                  4       '       d   RM
\        V 4      p\	        RVRR7      #  VP                  4       P                  pV^ 8X  d   \	        VRRR7      # \        WGW!4      w  r‰p
VP                  RRR7      pV'       d   \        V4      pV	'       d+   V
'       g#   RV9   d   VP                  R^4      ^,          MRpRP                  VP                  R	R
7      V) R 4      P                  R4      p\        W²4      w  rÞT;'       g    Wr8„  pV'       d   RVR,           RV 2p\	        WLVR7      #   \         d(   p\        T4      p\	        TRT R2RR7      u Rp?# Rp?ii ; i)z®Capture a log once and derive the summary tail and full-log views from that single read
(a rotation between two reads would make the report look newer than the uploaded log).Nz(file empty))r6   rÃ   rÄ   r�   r   r  Ú
r>   T)Úkeependsu!   [... truncated â€” showing last ~i   zKB ...]
z(error reading: r1   )ræ   r×   râ   rÞ   rÁ   rã   rä   rý   r”   r	   r  r¯   Ú
splitlinesr^   r  rE   )rÒ   rë   rê   r  rè   rÝ   Útailré   r  Ústart_offsetrü   Úall_textrÃ   rÄ   ÚcappedÚ	truncatedr¾   Úerrors   &$$$              r   Ú_capture_log_snapshotr  F  s�  € ô
 ! Ó*€HØÒÜ# HÓ-ˆß!(¨W¯^©^×-=Ò-=‰~ÔCTÐU]ÓC^ˆÜ °ÀÔEÐEðaØ�}‰}‹×&Ñ&ˆØ�1Œ9Ü H¸ÐRVÔWÐWÜ0@Ø˜Ió1
Ñ-ˆÐ-ð —:‘:˜g¨i�:Ó8ˆßô 1°Ó:ˆHß× 2Ø59¸XÔ5E�x—~‘~ d¨AÓ.¨qÖ1È2ˆHØ—G‘G˜H×/Ñ/¸Ð/Ó>À
¸{¸|ÐLÓM×TÑTÐUYÓZˆ	Ü4°XÓIÑˆ	Ø×.Ð.˜dÑ.ˆ	ßØ;¸IÈÕ<MÐ;NÈiÐXaÐWbÐcˆIÜ ÈÔSÐSøÜô aÜ)¨#Ó.ˆÜ Ð6FÀuÀgÈQÐ4OÐ[_Ô`Õ`ûðaús7   Á.E Â<E ÃE Ã	A8E ÅE ÅFÅ)FÆFÆFc                ó<   € V ^8„  d   QhR\         R\        R\        /# )r   r4   Ú	log_linesr   r¢   )r   s   "r   r   r   p  s&   € ÷ Añ A”sð A¤sð A¬sñ Ar   c                 ó,   € V R 8X  d   V# \        V^d4      # )Úagent)rð   )r4   r  s   &&r   Ú_tail_budgetr  p  s   € Ø œˆ9Ð@¬S°¸CÓ-@Ð@r   c                ó^   € V ^8„  d   QhR\         R\        R\        \        \        3,          /# ©r   r  r  r   )r<   rR   r   rQ   rÁ   )r   s   "r   r   r   t  s.   € ÷ "ñ "Üð"Ü#ð"Ü/3´C¼Ð4DÕ/Eñ"r   c               ód   € \          Uu/ uF  pV\        V\        W 4      VR7      bK  	  up# u upi )z2Capture all logs used by debug-share exactly once.)rë   r  )Ú_REPORT_LOGSr  r  )r  r  r4   s   &$ r   Ú_capture_default_log_snapshotsr  t  s>   € õ
 !ó"á ˆDð 	Ô# D´\À$Ó5RÐ[aÔbÒbÙ ñ"ð "ùò "s   ‰!-c                ó0   € V ^8„  d   QhR\         R\        /# )r   r  r   )rR   rQ   )r   s   "r   r   r   |  s   € ÷ 	?ñ 	?œ$ð 	?¬#ñ 	?r   c           
     ó–  € ^ RI Hp \        P                  ! 4       p\        P
                  ! V4      ;_uu_ 4        \        P                  ! \        4      ;_uu_ 4        V! \        RR7      4       RRR4       RRR4       VP                  4       pV '       d   \        V4      # T#   + '       g   i     L=; i  + '       g   i     LH; i)zâRun ``hermes dump`` and return its stdout, force-redacted unless *redact* is False: the dump
is upload-bound and quotes config values (e.g. ``fallback_providers``), so URL credentials are
redacted too, as in the uploaded logs.)Úrun_dumpF)Ú	show_keysN)Úhermes_cli.dumpr!  ÚioÚStringIOrV   Úredirect_stdoutrW   Ú
SystemExitr   Úgetvaluer	   )r  r!  Úcapturer®   s   &   r   Ú_capture_dumpr*  |  s{   € õ )Ü�kŠk‹m€GÜ	×	#Ò	# G×	,Õ	,¬j×.AÒ.AÄ*×.MÕ.MÙ”¨5Ô1Ô2÷ /N×	,à×ÑÓ€Dß.4Ô$ TÓ*Ð>¸$Ð>÷ /N×.Mú×	,×	,ús#   º#B8ÁB%	Á0B8Â%B5Â0B8Â8C	r  Ú	dump_textr>   Úlog_snapshotsc          	      ó€   € V ^8„  d   QhR\         R\        R\        \        \        \        3,          ,          R\        /# )r   r  r+  r,  r   )r<   rQ   r   r   rÁ   )r   s   "r   r   r   ˆ  s;   € ÷ ñ ÜðÜ(+ðäœD¤¤kÐ!1Õ2Õ3ðä?Bñr   c                ó  € \         P                  ! 4       pTP                  T;'       g    \        4       4       Vf   \	        V 4      p\
        P                  ! \        4      ;_uu_ 4        ^ RIH	p V! 4       pV'       dg   VP                  R4       \        VP                  4       4       F8  w  rgVP                  RV RVR,           RVR,           R	VR
,           R2	4       K:  	  RRR4       TP                  R4       ^ RIHp \         F\  p	VP                  V	4      p
V
f   K  VP                  W™ R24      pVP                  RV R\!        W�4       RV
P"                   R24       K^  	  VP%                  4       #   + '       g   i     L�; i)zªBuild the summary debug report (system dump + log tails) as upload-ready text.

``dump_text`` is pre-captured dump output; when empty, ``hermes dump`` is run internally.
N)Úget_sanitizer_heal_statsz-

--- transcript sanitiser heal counters ---
zsession r’   Úheal_eventsz heal events, Úmessages_healedz messages healed, escalated=Ú	escalatedr  ©Ú	LOG_FILESú.logz
--- z (last z lines) ---
)r$  r%  Úwriter*  r  rV   rW   rE   Úagent.agent_runtime_helpersr/  Úsortedr~   rÖ   r4  r  rB   r  rÃ   r(  )r  r+  r,  Úbufr/  Ú
heal_statsÚsessÚstr4  r4   ÚsnapÚfilenames   $$$         r   Úcollect_debug_reportr?  ˆ  sU  € ô �+Š+‹-€CØ‡I�Iˆi×*Ð*œ=›?Ô+ØÒÜ6°yÓAˆô 
×	Ò	œY×	'Õ	'åHÙ-Ó/ˆ
ßØ�I‰IÐHÔIÜ" :×#3Ñ#3Ó#5Ö6‘�Ø—	‘	˜H T F¨"¨R°Õ->Ð,?¸~ØÐ 1Õ2Ð3Ð3OÐPRÐS^ÕP_ÐO`Ð`bðdö eñ 7÷ 
(ð ‡I�Iˆd„OÝ)ßˆØ× Ñ  Ó&ˆØŠ<ÙØ—=‘= ¨¨t }Ó5ˆØ�	‰	�F˜8˜* G¬L¸Ó,IÐ+JÈ-Ø—^‘^Ð$ Bð(ö 	)ñ ð �<‰<‹>Ð÷% 
(×	'ús   Á*A<E;Å;F	zhermes-debug-share/1c                ó^   € V ^8„  d   QhR\         R\        R\        \        \        3,          /# r  )r<   rR   r   rQ   )r   s   "r   r   r   ®  s*   € ÷ ñ ¤Cð ´tð ÄtÌCÔQTÈHÅ~ñ r   c                óB  € \        VR7      p\        WR7      p\        WVR7      pV'       d   \        MRpRWT,           /p^ RIHp \         FO  pW8,          P                  ;p	'       g   K  VP                  Wˆ R24      p
WR,           RV
 R2,           V	,           Wj&   KQ  	  V# )	uÏ   Collect the debug report + full logs as a labelâ†’text mapping.

The dump header is prepended to each full log so every file is self-contained, and the
redaction banner is prepended when ``redact`` is True.
©r  )r  r+  r,  r>   Úreportr3  r5  z

--- full z ---
)	r*  r  r?  Ú_REDACTION_BANNERrÖ   r4  Ú
_FULL_LOGSrÄ   rB   )r  r  r+  r,  rC  ÚbannerÚbundler4  r4   Úfullr>  s   &&         r   Úcollect_share_bundlerI  ®  s›   € ô  VÔ,€IÜ2°9ÔL€MÜ!¨IØ0=ô?€Fç"(Õ¨b€FØ&¨­Ð8€FÝ)ßˆØ Õ&×0Ñ0Ð0ˆ4×0Ð0Ø —}‘} T¨V°4¨=Ó9ˆHØ%Õ1°mÀHÀ:ÈVÐ4TÕTÐW[Õ[ˆFÓñ ð €Mr   c                ó^   € V ^8„  d   QhR\         \        \        3,          R\        R\        /# )r   rG  r  r   )r   rQ   rR   rŒ   )r   s   "r   r   r   Â  s)   € ÷ ?ñ ?œd¤3¬ 8�nð ?´dð ?Äeñ ?r   c                ó  € R\         R\        V4      R\        P                  P                  \        P                  4      P                  4       RV /p\        P                  ! \        P                  ! V4      P                  R4      4      # )uƒ   Gzip a :func:`collect_share_bundle` mapping into the Nous envelope (shape parsed by the
discord-support viewer â€” keep it stable).r   ÚredactedÚcreatedÚfilesr�   )Ú_NOUS_BUNDLE_FORMATrR   Údatetimer9   ÚUTCÚ	isoformatÚgzipÚcompressr    Údumpsrœ   )rG  r  Úenvelopes   && r   Úbuild_nous_bundlerW  Â  sf   € ð Ô-¨z¼4À»<Øœ8×,Ñ,×0Ñ0´·±Ó>×HÑHÓJØ˜ð!€Hô �=Š=œŸš HÓ-×4Ñ4°WÓ=Ó>Ð>r   c                   ó4   a € ] tR tRt o RtRtV 3R ltRtV tR# )ÚDebugShareResultiË  zNOutcome of a ``debug share`` upload, so non-CLI callers can render real links.r>   c                óV   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[;R&   S[;R&   S[;R&   # )r   ry   ÚfailuresrL  Úauto_delete_secondsrC  )r   r   rR   r<   rQ   )r   rÅ   s   "€r   r   ÚDebugShareResult.__annotate__Ë  sC   ø‡ ‚ ñ �Jñ ñ �Nñ	 ñ
 �Nñ ñ Ññ ñ Ñò r   r   N)	rÇ   rÈ   rÉ   rÊ   rË   rC  rÌ   rÍ   rÎ   rÏ   s   @r   rY  rY  Ë  s   ø‡ € áXð €F÷ ƒ r   rY  Úexpiryc                óH   € V ^8„  d   QhR\         R\         R\        R\        /# )r   r  r^  r  r   )r<   rR   rY  )r   s   "r   r   r   Ö  s2   € ÷ %Uñ %UÜð%UÜ),ð%UÜ:>ð%UÜJZñ%Ur   c           	     óÚ  € \        4        \        WR7      pV'       d   \        P                  R4       VR,          p. pR\	        WAR7      /pR	 F-  pVP                  V4      pV'       g   K   \	        W�R7      Wg&   K/  	  \        \        VP                  4       4      4       \        WeV\        VR7      #   \         d+   p	TP                  T R\        T	4       24        Rp	?	K–  Rp	?	ii ; i)
uí   Collect the debug report + full logs, upload each, return the URLs.

Shared by ``hermes debug share`` and the dashboard ``POST /api/ops/debug-share``. Blocking
network I/O â€” callers inside an event loop must run it in a worker thread.
©r  r  zOhermes debug share: applied force-mode redaction to log snapshots before uploadrC  ÚReportr¹   r’   N)ry   r[  rL  r\  rC  )ú	agent.logúgateway.logúgui.logúdesktop.logú
update.logúdesktop-update-handoff.log)rX   rI  r€   Úinfor¿   rB   rE   rº   r	   r†   r   ÚvaluesrY  Ú_AUTO_DELETE_SECONDS)
r  r^  r  rG  rC  r[  ry   Úlabelr˜   r¾   s
   $$$       r   Úbuild_debug_sharerm  Ö  sÜ   € ô &Ô'Ü!¨IÔE€FßÜ�‰Ø]ô	_à�HÕ€FØ€HàÔ(¨ÔDÐE€Dó	ˆð —*‘*˜UÓ#ˆßÙð	JÜ,¨WÔIˆD‹Kñ	ô" œ$˜tŸ{™{›}Ó-Ô.Ü À6Ü0DÈVôUð Uøô ô 	JØ�O‰O˜u˜g RÔ(AÀ#Ó(FÐ'GÐH×IÒIûð	Jús   Á.B5Â5C*Ã C%Ã%C*c                ó$   € V ^8„  d   QhR\         /# r   )rR   )r   s   "r   r   r   þ  s   € ÷ ñ œTñ r   c                ó–  € \        \        V RR4      4      '       d   R# \        P                  P	                  4       '       g2   \        R\        P                  R7       \        P                  ! ^4        \        R4      P                  4       P                  4       pVR	9   d   R# \        R4       R#   \        \        3 d    Rp L+i ; i)
zUGate the actual upload: ``--yes`` proceeds unprompted, else ask an interactive [y/N].ÚyesFTz±ERROR: Non-interactive mode requires --yes to confirm upload.
       This prevents accidental exposure of personal data.
       Use --local to view the report without uploading.©ÚfilezUpload debug report? [y/N] r>   zAborted.)Úyrp  )rR   ÚgetattrÚsysÚstdinÚisattyÚprintÚstderrÚexitÚinputr]   ÚlowerÚEOFErrorÚKeyboardInterrupt)ÚargsÚanswers   & r   Ú_confirm_uploadr�  þ  s¥   € äŒG�D˜% Ó'×(Ò(ÙÜ�9‰9×Ñ×ÒÜð IäORÏzÉzõ	[ô 	�Š�ŒðÜÐ4Ó5×;Ñ;Ó=×CÑCÓEˆð �ÔÙÜ	ˆ*ÔÙøô Ô'Ð(ô ØŠðús   Á5'B2 Â2CÃCc           	     óÀ  € \        V R^È4      p\        V R^4      p\        V RR4      '       * p\        V RR4      '       dŽ   \        4        \        R4       \        WR7      p\        VR,          4       R" FR  w  rVVP	                  V4      pV'       g   K   \        R	R# 24       \        V4       \        R# R
24       \        V4       KT  	  R# \        V RR4      '       d   \        WVR7      # \        \        4       \        V 4      '       g   R# \        R4        \        WVR7      p\        R XP                   4       4      p
\        R4       VP                  P!                  4        F  w  rk\        RVRV
 2 RV 24       K  	  VP"                  '       d)   \        RRP%                  VP"                  4       R24       VP                  P'                  4        Uu. uF  p\)        V4      '       g   K  VNK  	  ppV'       dT   \        RVP*                  R,           R24       \        R\-        V4       R\-        VP                  4       RV R24       R# \        R VP*                  R,           R!24       R#   \         dT   p	\        R\        T	4       2\        P                  R7       \        R4       \        P                  ! ^4        Rp	?	EL«Rp	?	ii ; iu upi )$z:Collect debug report + full logs, upload each, print URLs.ÚlinesÚexpireÚ	no_redactFÚlocalúCollecting debug report...ra  rC  ú

r  NÚnousz'Collecting debug report...
Uploading...)r  r^  r  z
Upload failed: rq  z?
Run `hermes debug share --local` to print the report instead.
c              3   ó8   "  € T F  p\        V4      x € K  	  R # 5ir-   )rH   )r¦   Úks   & r   rª   Ú"run_debug_share.<locals>.<genexpr>9  s   é € Ð2¡k ”c˜!—f�f£kùs   ‚z
Debug report uploaded:z  Ú<z
  (failed to upload: z, r1   u*   
â�±  paste.rs pastes will auto-delete in i  z hours.u   âš ï¸�  z of zA upload(s) fell back to dpaste.com: those pastes stay public for zn day(s) and CANNOT be deleted with `hermes debug delete`.

Share these links with the Hermes team for support.u!   
â�±  Pastes will auto-delete in zf hours.
To delete now:  hermes debug delete <url>

Share these links with the Hermes team for support.))zFULL agent.logrc  )zFULL gateway.logrd  )zFULL gui.logre  )zFULL desktop.logrf  )zFULL update.logrg  )zFULL desktop-update-handoff.logrh  z<============================================================)rt  rX   rx  rI  rB   Ú_run_debug_share_nousÚ_PRIVACY_NOTICEr�  rm  r»   r	   ru  ry  rz  r}   ry   r~   r[  r¯   rj  re   r\  rH   )r  r  r^  r  rG  Útitlerl  rŠ   Úresultr¾   Úlabel_widthr   r‚   Údpaste_urlss   &             r   Úrun_debug_sharer”    s‡  € ä˜˜g sÓ+€IÜ�T˜8 QÓ'€FÜ˜˜{¨EÓ2Ô2€Fäˆt�W˜e×$Ò$ä)Ô+ÜÐ*Ô+Ü%°	ÔIˆÜˆf�XÕÔó
‰LˆEð —:‘:˜eÓ$ˆDß‰tÜ˜˜X˜JÐ'Ô(Ü�e”Ü˜˜
 "�oÔ&Ü�d–ñ
ñ 	äˆt�V˜U×#Ò#Ü$ TÀvÔNÐNÜ	Œ/ÔÜ˜4× Ò ÙÜ	Ð
4Ô5ðÜ"¨YÈfÔUˆô
 Ñ2 f§k¢kÓ2Ó2€KÜ	Ð
$Ô%Ø—k‘k×'Ñ'Ö)‰
ˆÜ��5˜˜;˜-˜Ð(¨¨3¨%Ð0Ö1ñ *à‡‡€ÜÐ'¨¯	©	°&·/±/Ó(BÐ'CÀ1ÐEÔFØ$Ÿk™k×0Ñ0Ô2ÓHÑ2˜´nÀQ×6G—1�1Ñ2€KÐHßÜÐ;Ø×+Ñ+¨tÕ3Ð4°Gð=ô 	>ä�œ˜[Ó)Ð*¨$¬s°6·;±;Ó/?Ð.@ð A:Ø:@¸ð BFðFö 	Gô
 	Ð2°6×3MÑ3MÐQUÕ3UÐ2Vð WFð Fö 	Gøô' ô ÜÐ!Ô";¸CÓ"@Ð!AÐBÌÏÉÕTÜÐQÔRÜ�Š��Šûðüò Is%   ÄI: ÇKÇ5KÉ:KÊAKËKuû  âš ï¸�  --nous: This uploads your debug bundle to Nous-INTERNAL storage (AWS S3),
    NOT a public paste service. The following is included:
  â€¢ System info (OS, Python/Hermes version, provider, which API keys are
    configured â€” NOT the actual keys)
  â€¢ Full agent.log, gateway.log, and desktop.log (up to 512 KB each â€” likely
    contains conversation content, tool outputs, and file paths), plus
    update.log and desktop-update-handoff.log when present (update/hand-off
    output â€” the root cause of update failures)

  â€¢ The bundle is viewable only by Nous staff (and allowlisted Discord mods)
    via a Google-login-gated viewer.
  â€¢ It is NOT a public paste â€” there is no public URL to the contents.
  â€¢ It auto-deletes after 14 days.
c                ó4   € V ^8„  d   QhR\         R\        RR/# )r   r  r  r   N)r<   rR   )r   s   "r   r   r   ^  s&   € ÷ %Dñ %D¬cð %D¼4ð %DÀDñ %Dr   c               óz  € ^ RI Hp \        \        4       \	        V 4      '       g   R# V'       g   \        R4       \        R4       \        4        \        WR7      pV'       d   \        P                  R4       \        R4        V! \        WBR7      4      pXP#                  R4      ;'       g    VP#                  R4      p
VP#                  R4      ;'       g    VP#                  R4      p\        R4       \        V
'       d   RV
 2MRVP#                  RR4       R24       \        V'       d   RV R2MR4       \        R4       R#   \         dg   p^ R	IHp \        T4      pT! T4      ;'       g    R
p	\        RT RT	 R2\        P                  R7       \        P                   ! ^4        Rp?ELRp?ii ; i)uW   ``hermes debug share --nous``: gzip the same bundle into the Nous envelope â†’ Nous-S3.)Úshare_to_nousNuU   âš ï¸�  --no-redact is set: secrets in your logs will NOT be redacted before upload.
r‡  ra  zEhermes debug share --nous: applied force-mode redaction before uploadz(Uploading to Nous diagnostics storage...rB  )Ú
edge_blockzFThe Nous diagnostics service may be unavailable or not yet provisionedz
Nous upload failed: rˆ  z}.
Run `hermes debug share --local` to print the report instead, or `hermes debug share` to upload to a public paste service.
rq  ÚviewUrlÚview_urlÚ	expiresAtÚ
expires_atz)
Debug bundle uploaded to Nous (private):z  View URL  z$  (no view URL returned; upload id: ÚidÚ?r1   u   
â�±  Auto-deletes at z (14-day retention).u!   
â�±  Auto-deletes after 14 days.u9  
Share this private link with the Nous team â€” only Nous staff (via Google login) can open it.

Pick up the discussion in:
  GitHub Issues        https://github.com/NousResearch/hermes-agent/issues
  Nous Portal Support  https://portal.nousresearch.com/help
  Discord              https://discord.gg/NousResearch)Úhermes_cli.diagnostics_uploadr—  rx  Ú_NOUS_PRIVACY_NOTICEr�  rX   rI  r€   ri  rW  rE   Ú
pm.networkr˜  r	   ru  ry  rz  rB   )r  r  r  r—  rG  Úresr¾   r˜  r  Úcauserš  rœ  s   &$$         r   rŽ  rŽ  ^  sx  € å;Ü	Ô
ÔÜ˜4× Ò ÙßÜÐfÔgÜ	Ð
&Ô'Ü%Ô'Ü!¨IÔE€FßÜ�‰Ð[Ô\Ü	Ð
4Ô5ð
ÙÔ-¨fÔDÓEˆð �w‰w�yÓ!×8Ð8 S§W¡W¨ZÓ%8€HØ—‘˜Ó%×>Ð>¨¯©°Ó)>€JÜ	Ð
6Ô7Ü	§xˆL˜˜
Ñ
#Ø5°c·g±g¸dÀCÓ6HÐ5IÈÐKôMä	Ï
Ð# J <Ð/CÑ
DØ3ô5ä	ð Cö Døô! ô Ý)ä)¨#Ó.ˆÙ˜3“×kÐkÐ#kˆÜÐ& u g¨T°%°ð 9Oð OäUX×U_ÑU_õ	aô 	�Š��Šûðús   ÂE	 Å	F:ÅAF5Æ5F:c           
     ó¢  € \        V R. 4      pV'       g   \        R4       R# V F=  p \        V4      '       d   \        RV 24       K%  \        R\        V4       R24       K?  	  R#   \         d#   p\        R\        T4       24        Rp?Kk  Rp?i\
         d1   p\        T4      p\        RT R	\        T4       24        Rp?K¤  Rp?ii ; i)
z1Delete one or more paste URLs uploaded by /debug.ry   zhUsage: hermes debug delete <url> [<url> ...]
  Deletes paste.rs pastes uploaded by 'hermes debug share'.Nu     âœ“ Deleted: u     âœ— Failed to delete: z (unexpected response)u     âœ— u     âœ— Could not delete r’   )rt  rx  rD   r	   r$   rE   )r  ry   r   r¾   Úsafe_urls   &    r   Úrun_debug_deleter¦  †  sÏ   € ä�4˜ Ó$€DßÜð Lô 	MáÛˆð	ZÜ˜C× Ò Ü˜¨ uÐ-Ö.äØ.Ü0°Ó5Ð6Ð6LðNöó øô ô 	=Ü�FÔ4°SÓ9Ð:Ð;×<Ò<ûÜô 	ZÜ0°Ó5ˆHÜÐ+¨H¨:°RÔ8QÐRUÓ8VÐ7WÐX×YÒYûð	Zús/   ©A(Á
A(Á(CÁ3BÂCÂCÂ%C	Ã	Cc                ó¤   € \        4        R\        R\        /P                  \	        V RR4      4      pVf   \        \        4       R# V! V 4       R# )zRRoute debug subcommands (sweeping expired pastes opportunistically on every call).ÚshareÚdeleteÚdebug_commandN)rX   r”  r¦  rB   rt  rx  Ú_DEBUG_USAGE)r  Úhandlers   & r   Ú	run_debugr­  �  sB   € ä%Ô'Øœ¨Ô3CÐD×HÑHÜ��o tÓ,ó.€Gà‚ÜŒlÖá�Žr   ap  Usage: hermes debug <command>

Commands:
  share    Upload debug report to a paste service and print URL
  delete   Delete a previously uploaded paste

Options (share):
  --lines N    Number of log lines to include (default: 200)
  --expire N   dpaste.com fallback retention in days (default: 1)
  --local      Print report locally instead of uploading
  --nous       Upload to Nous-internal storage (private, staff-only,
               auto-deletes in 14 days) instead of a public paste
  --no-redact  Disable upload-time secret redaction (default: redact)

Options (delete):
  <url> ...    One or more paste URLs to deleter-   )é   )r  r¼   ÚgatewayÚguirØ   ÚupdateÚhandoff)r  r¯  r°  rØ   r±  r²  )T)éÈ   T)QrË   rV   rP  rS  r$  r    Úloggingru  Ú	threadingr@   Úurllib.requestrn   Údataclassesr   Úpathlibr   Útypesr   Útypingr   Úhermes_constantsr   Úhermes_cli.debug_redactionr	   Úutilsr
   Ú	getLoggerrÇ   r€   rD  rq   r°   rr   Ú_MAX_LOG_BYTESrk  r†  r5   r   r)   r.   Úcontextmanagerr7   rO   rG   rX   r�  Ú_GATEWAY_PRIVACY_NOTICEra   re   rD   r†   r–   rž   r²   r¿   rÁ   r×   rÛ   rÞ   ræ   rý   r  r  r  rE  r  r  r*  r?  rO  rI  rW  rY  rm  r�  r”  r   rŽ  r¦  r­  r«  r   r   r   Ú<module>rÂ     s  ðÙ 4ã Û Û Û 	Û Û Û 
Û Û Û Ý !Ý Ý !Ý å ,Ý @Ý #à	×	Ò	˜8Ó	$€ð)ð ð $€Ø+€Ø(€Ø€ØÐ ð !—’Ó(Ð õ9õYõð ×Ññó ð÷)õDIõ ð€ð*!ð õõQõ
(ð AU÷ \õ$	õh÷D÷[ð$ ÷ð ó ðõ#ð ð	$ð&Ð õ]õõ9õ:
8ð!aØ8Fð!aØW[÷!aðL U€ØH€
õAð"Ø&*÷"÷	?ðØðØ.0ðà6:÷ðF -Ð ÷÷(?ð ÷ð ó ðð%UØð%UØ/0ð%UØAE÷%UõPò&9GðxÐ õ"%DòPZò.ð3‚r   