+
    iHàj«  ã                  ó¼   € R t ^ RIHt ^ RIt^ RIHtHt ^ RIHtH	t	 ]P                  ! R4      tR^R^R^R	^/t]! R
04      tRtRtR R ltR R ltR R ltRR.tR# )aÖ  Synchronous diagnostics requests, for servers that answer "what is wrong with this file now" directly.

typescript-language-server publishes diagnostics asynchronously and stays silent when a file's
diagnostics are unchanged, so waiting for a push costs the push latency (hundreds of ms after an edit)
or the whole wait budget (a clean edit never publishes).  It also forwards raw tsserver requests through
``workspace/executeCommand typescript.tsserverRequest``: ``syntacticDiagnosticsSync`` +
``semanticDiagnosticsSync`` answer for the text last synced, in about 10ms on a warm project.  The edit
check (``agent.lsp.edit_check``) asks this module first and falls back to the push/pull wait when the
server has no synchronous request or the request fails.

Returned diagnostics use the shape typescript-language-server pushes (0-based range, numeric severity,
``source`` "typescript"), so a sync verdict and a pushed baseline compare equal by
``agent.lsp.client._diagnostic_key``.
)ÚannotationsN)ÚAnyÚOptional)ÚLSPProtocolErrorÚLSPRequestErrorzagent.lsp.sync_diagnosticsÚerrorÚwarningÚmessageÚ
suggestionÚ
typescriptÚ$_hermes_sync_diagnostics_unsupportedc               ó    € V ^8„  d   QhRRRR/# )é   Úclientr   ÚreturnÚbool© )Úformats   "Ú?/home/ubuntu/.hermes/hermes-agent/agent/lsp/sync_diagnostics.pyÚ__annotate__r      s   € ÷ Xñ X�cð X˜dñ Xó    c                ód   € V P                   \        9   ;'       d    \        V \        R 4      '       * # )F)Ú	server_idÚ_TS_SERVERSÚgetattrÚ_UNSUPPORTED)r   s   &r   Ú	supportedr      s(   € Ø×Ñœ{Ñ*×WÐW´7¸6Ä<ÐQVÓ3WÔ/WÐWr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r   r   Úabs_pathÚstrÚtimeoutÚfloatr   zOptional[list[dict[str, Any]]]r   )r   s   "r   r   r   #   s)   € ÷ ñ ˜#ð ¨ð ¸%ð ÐDbñ r   c             ƒ  ó
  "  € \        V 4      '       d   V^ 8:  d   R# . p\         F·  p V P                  RRRRVRVRR/R	^ /./VR
7      G Rj  x€L
 p\        T\        4      '       d*   TP                  RR4      '       d   TP                  R4      MRp\        T\        4      '       g   \        T \        R4        R# TP                  R R T 4        4       4       K¹  	  V#  L”  \         d    \        T RTR R24      Rh\         d?   p\
        P                  RT P                  YF4       \        T \        R4        Rp? R# Rp?i\         d.   p\
        P                  RT P                  YF4        Rp? R# Rp?ii ; i5i)ap  Diagnostics for the text last synced to ``client`` for ``abs_path``, or None when the server has
no synchronous request (it failed): wait for a push then.  Raises ``TimeoutError`` when the server
did not answer within ``timeout`` (a cold project still loading): there is no verdict in budget,
and a push wait after it would only hold the next check of the file longer.Nzworkspace/executeCommandÚcommandztypescript.tsserverRequestÚ	argumentsÚfileÚincludeLinePositionTÚexecutionTarget)r    z did not answer in z.1fÚsz[%s] %s rejected: %sz[%s] %s failed: %sÚsuccessÚbodyc              3  ó0   "  € T F  qf   K  Vx € K  	  R # 5i©Nr   )Ú.0Úds   & r   Ú	<genexpr>Úrequest.<locals>.<genexpr>>   s   é € ÐWÑE˜—1’1ÓEùs   ‚Œ
c              3  ó8   "  € T F  p\        V4      x € K  	  R # 5ir,   )Ú_from_tsserver)r-   Úitems   & r   r/   r0   >   s   é € ÐEÁ¸œ~¨d×3Ð3Ãùs   ‚)r   Ú_TS_COMMANDSÚ_send_request_with_retryÚTimeoutErrorr   ÚloggerÚdebugr   Úsetattrr   r   Ú
isinstanceÚdictÚgetÚlistÚextend)r   r   r    Úoutr#   ÚreplyÚer*   s   &&$     r   ÚrequestrB   #   sl  é € ô
 �V×Ò ¨1¤ÙØ "€Cßˆð	Ø ×9Ñ9Ð:TØÐ7Ø˜g¨°Ð:OÐQUÐ'VÐYjÐlmÐXnÐoðWð ð :ó  ÷  ˆEô %/¨u´d×$;Ò$;ÀÇ	Á	È)ÐUY×@ZÒ@Zˆu�y‰y˜Ô Ð`dˆÜ˜$¤×%Ò%Ü�FœL¨$Ô/ÚØ�
‰
ÑWÑEÁÔEÓWÖWñ'  ð( €Jñ% øô ô 	XÜ ' Ð*=¸gÀc¸]È!ÐLÓMÐSWÐWÜô 	Ü�L‰LÐ/°×1AÑ1AÀ7ÔNÜ�FœL¨$Ô/ÞûÜô 	Ü�L‰LÐ-¨v×/?Ñ/?ÀÔLÞûð	üse   ‚&F©$C$ÁC"ÁC$Á-FÂ A"FÃ"C$Ã$&F ÄF Ä2EÄ>FÅF ÅF Å!E;Å4FÅ;F Æ Fc               ó    € V ^8„  d   QhRRRR/# )r   r3   r   r   zOptional[dict[str, Any]]r   )r   s   "r   r   r   B   s   € ÷ ñ ˜ð Ð!9ñ r   c                óØ  € \        V \        4      '       g   R # V P                  R4      V P                  R4      r!\        V\        4      '       d   \        V\        4      '       g   R # RRRVP                  R^4      ^,
          RVP                  R^4      ^,
          /RRVP                  R^4      ^,
          RVP                  R^4      ^,
          //R	\        V P                  R	4      ;'       g    R
4      R\        P                  \        V P                  R4      ;'       g    R4      ^4      RV P                  R4      ;'       g    R/pV P                  R4      e   V R,          VR&   V# )NÚstartLocationÚendLocationÚrangeÚstartÚlineÚ	characterÚoffsetÚendr	   Ú ÚseverityÚcategoryr   Úsourcer   Úcode)r:   r;   r<   r   Ú_TS_SEVERITY)r3   rH   rL   Údiags   &   r   r2   r2   B   s3  € Ü�dœD×!Ò!ÙØ—‘˜/Ó*¨D¯H©H°]Ó,Cˆ3Ü�eœT×"Ò"¬*°S¼$×*?Ò*?Ùà�'˜F E§I¡I¨f°aÓ$8¸1Õ$<¸kÈ5Ï9É9ÐU]Ð_`ÓKaÐdeÕKeÐfØ˜& #§'¡'¨&°!Ó"4°qÕ"8¸+ÀsÇwÁwÈxÐYZÓG[Ð^_ÕG_Ð`ðbà”3�t—x‘x 	Ó*×0Ð0¨bÓ1Ø”L×$Ñ$¤S¨¯©°*Ó)=×)HÐ)HÀÓ%IÈ1ÓMØ�$—(‘(˜8Ó$×4Ð4¨ð€Dð ‡x�x�ÓÒ#Ø˜F•|ˆˆV‰Ø€Kr   rB   r   )ÚsyntacticDiagnosticsSyncÚsemanticDiagnosticsSync)Ú__doc__Ú
__future__r   ÚloggingÚtypingr   r   Úagent.lsp.protocolr   r   Ú	getLoggerr7   rR   Ú	frozensetr   r4   r   r   rB   r2   Ú__all__r   r   r   Ú<module>r^      ss   ðñõ #ã ß  ç @à	×	Ò	Ð7Ó	8€ð ˜˜I q¨)°Q¸ÀaÐH€Ù˜˜Ó'€ØF€Ø5€õXõõ>ð$ �kÐ
"‚r   