+
    iHàj=™  ã                  óª  € R t ^ RIH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HtHtHtHtHt ^ RIHt ^ RIHtHtHt ^ RIHt ^ RIHtHtHtHtHtH t H!t! ^ RI"H#t#H$t$H%t%H&t& ]PN                  ! R	4      t(R
t)Rt*^t+],]-]-3,          t.]/]0]-]3,          ,          t1R R lt2R R lt3R R lt4R R lt5R R lt6 ! R R4      t7 ! R R4      t8R.t9R# )u  Service-level orchestration for LSP clients.

:class:`LSPService` bridges the synchronous file_operations layer and the async
:class:`agent.lsp.client.LSPClient`: one asyncio loop in a background thread, one lazily
spawned client per ``(server_id, workspace_root)`` â€” servers flagged ``multi_root`` (pyright) get ONE
client per ``server_id`` and further roots (typically sibling git worktrees) are attached to the running
process via ``workspace/didChangeWorkspaceFolders`` â€” a **broken-set** of pairs that failed
to spawn/initialize (retried only after ``lsp.broken_retry_seconds``; never, by default), and a **delta baseline**
per file (``snapshot_baseline()`` runs BEFORE a write; the next ``get_diagnostics_sync()``
returns only diagnostics not in it).  Off unless config enables it.
)ÚannotationsN)ÚAnyÚCallableÚDictÚListÚOptionalÚTuple)Úeventlog)ÚDIAGNOSTICS_DOCUMENT_WAITÚ	LSPClientÚ_diagnostic_key)Ú
EditChecks)ÚSERVERSÚUNTRUSTED_SAFE_SERVERSÚServerContextÚ	ServerDefÚcustom_serversÚfind_server_for_fileÚlanguage_id_for)Úclear_cacheÚis_trusted_workspaceÚoperator_workspace_rootsÚresolve_workspace_for_filezagent.lsp.manageriX  é   c               ó$   € V ^8„  d   QhRRRRRR/# )é   Úvaluer   ÚdefaultÚfloatÚreturn© )Úformats   "Ú6/home/ubuntu/.hermes/hermes-agent/agent/lsp/manager.pyÚ__annotate__r#   )   s!   € ÷ ñ �Sð  5ð ¨Uñ ó    c                óX   €  V e   \        V 4      # T#   \        \        3 d    Tu # i ; i©N)r   Ú	TypeErrorÚ
ValueError)r   r   s   &&r"   Ú	_float_orr)   )   s4   € ðØ$Ò0Œu�U‹|Ð=°gÐ=øÜ”zÐ"ô ØŠðús   ‚ ‘ “)¨)c               ó    € V ^8„  d   QhRRRR/# ©r   r   r   r   úOptional[list[str]]r    )r!   s   "r"   r#   r#   0   s   € ÷ 7ñ 7�cð 7Ð1ñ 7r$   c                ó,  € V f   . # \        V \        4      '       d;   \        ;QJ d    R V  4       F  '       d   K   RM	  RM! R V  4       4      '       g   R# V  Uu. uF+  q'       g   K  \        P                  P                  V4      NK-  	  up# u upi )zYA config list of paths, ``~``-expanded; ``None`` when the value is not a list of strings.Nc              3  óB   "  € T F  p\        V\        4      x € K  	  R # 5ir&   )Ú
isinstanceÚstr)Ú.0Úps   & r"   Ú	<genexpr>Ú_path_list.<locals>.<genexpr>4   s   é € Ð-PÉ%ÀQ¬j¸¼C×.@Ð.@Ë%ùs   ‚FT)r/   ÚlistÚallÚosÚpathÚ
expanduser)r   r2   s   & r"   Ú
_path_listr:   0   sh   € à‚}Øˆ	Ü�eœT×"Ò"¯#«#Ñ-PÉ%Ó-P¯#¯#ª#Ñ-PÉ%Ó-P×*PÒ*PÙÙ+0Ó6©5 a³AÔ!ŒB�G‰G×Ñ˜qÖ!©5Ñ6Ð6ùÒ6s   Á	BÁ+#Bc               ó    € V ^8„  d   QhRRRR/# r+   r    )r!   s   "r"   r#   r#   9   s   € ÷ ñ  ð Ð(;ñ r$   c                óŠ   € \        V 4      ;pf4   \        P                  P                  R\	        V 4      P
                  4       V# )zY``lsp.exclude_roots``; ``None`` (fail closed: every root excluded) for a malformed value.zŸlsp.exclude_roots must be a list of glob patterns, e.g. ['~/big-monorepo', '/srv/*/vendor'] (got %s); LSP is skipped for every workspace until the key is fixed©r:   r	   Ú	event_logÚwarningÚtypeÚ__name__©r   Úrootss   & r"   Ú_parse_exclude_rootsrD   9   sC   € ä˜EÓ"Ð"ˆÒ+Ü×Ñ×"Ñ"ðRÜSWÐX]ÓS^×SgÑSgô	ið €Lr$   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r   z	list[str]r    )r!   s   "r"   r#   r#   B   s   € ÷ ñ  Cð ¨Iñ r$   c                óž   € \        V 4      ;pf4   \        P                  P                  R\	        V 4      P
                  4       T;'       g    . # )zC``lsp.trusted_workspaces``; a malformed value trusts nothing extra.z¸lsp.trusted_workspaces must be a list of directories, e.g. ['~/code/my-app'] (got %s); only the workspaces you launched Hermes or opened a session in are trusted until the key is fixedr=   rB   s   & r"   Úparse_trusted_workspacesrG   B   sG   € ä˜EÓ"Ð"ˆÒ+Ü×Ñ×"Ñ"ðgä�‹K× Ñ ô	"ð �;ˆ;�BÐr$   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   Úsrvr   Úrootr0   ÚtrustedÚboolr   Ú_Keyr    )r!   s   "r"   r#   r#   L   s.   € ÷ Gñ G�Yð G cð G°Dð G¸Tñ Gr$   c                óX   € V P                   V P                  '       d   V'       d   R3# T3# )a  Cache key for the client serving ``root``: multi-root servers share one process per
``server_id`` across trusted roots; everything else, untrusted roots included, is keyed per
resolved project root (a shared process keeps the trust its first root spawned it with).Ú )Ú	server_idÚ
multi_root)rI   rJ   rK   s   &&&r"   Ú_client_keyrR   L   s%   € ð �M‰M §§ ·G˜2ÐFÐFÀÐFÐFr$   c                  ó^   € ] tR t^StRtR R ltR R ltR R ltRR	/R
 R lltR R lt	Rt
R	# )Ú_BackgroundLoopzKA daemon thread owning one asyncio loop; :meth:`run` blocks on a coroutine.c               ó   € V ^8„  d   QhRR/# ©r   r   ÚNoner    )r!   s   "r"   r#   Ú_BackgroundLoop.__annotate__V   s   € ÷ (ñ (˜$ñ (r$   c                	óV   € R V n         R V n        \        P                  ! 4       V n        R # r&   )Ú_loopÚ_threadÚ	threadingÚEventÚ_ready©Úselfs   &r"   Ú__init__Ú_BackgroundLoop.__init__V   s   € Ø:>ˆŒ
Ø37ˆŒÜ—o’oÓ'ˆŽr$   c               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   rX   [   s   € ÷ &ñ &�tñ &r$   c                	óâ   € V P                   e   R # \        P                  ! V P                  RRR7      V n         V P                   P	                  4        V P
                  P                  RR7       R # )Nzhermes-lsp-loopT)ÚtargetÚnameÚdaemong      @©Útimeout)r[   r\   ÚThreadÚ_run_foreverÚstartr^   Úwaitr_   s   &r"   rl   Ú_BackgroundLoop.start[   sR   € Ø�<‰<Ò#ÙÜ ×'Ò'¨t×/@Ñ/@ÐGXÐaeÔfˆŒØ�‰×ÑÔØ�‰×Ñ ÐÖ%r$   c               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   rX   b   s   € ÷ 
ñ 
˜dñ 
r$   c                	óR  € \         P                  ! 4       ;qn        \         P                  ! V4       V P                  P                  4         VP                  4         VP                  4        R #   \         d     R # i ; i   TP                  4        i   \         d     i i ; i; ir&   )	ÚasyncioÚnew_event_looprZ   Úset_event_loopr^   ÚsetÚrun_foreverÚcloseÚ	Exception)r`   Úloops   & r"   rk   Ú_BackgroundLoop._run_foreverb   s‚   € Ü#×2Ò2Ó4Ð4ˆŒzÜ×Ò˜tÔ$Ø�‰�‰Ôð	Ø×ÑÔðØ—
‘
–øÜô ÚðûðØ—
‘
•øÜô ÙðýsB   ÁB ÁA0 Á0A?Á>A?ÂB&ÂBÂB&ÂB#Â B&Â"B#Â#B&ri   Nc               ó    € V ^8„  d   QhRRRR/# )r   ri   úOptional[float]r   r   r    )r!   s   "r"   r#   rX   n   s   € ÷ ñ  Oð ¸sñ r$   c               ó@  € ^ RI Hp V P                  f8   \        P                  ! V4      '       d   VP                  4        \        R4      hV! WP                  4      ;pf   \        R4      h VP                  VR7      #   \         d    TP                  4        h i ; i)zCSubmit a coroutine to the loop and block for its result (or raise).)Úsafe_schedule_threadsafezbackground loop not startedzbackground loop not runningrh   )
Úagent.async_utilsr}   rZ   rq   Úiscoroutinerv   ÚRuntimeErrorÚresultrw   Úcancel)r`   Úcorori   r}   Úfuts   &&$  r"   ÚrunÚ_BackgroundLoop.runn   s†   € å>Ø�:‰:ÒÜ×"Ò" 4×(Ò(Ø—
‘
”ÜÐ<Ó=Ð=Ù+¨D·*±*Ó=Ð=ˆCÒFÜÐ<Ó=Ð=ð	Ø—:‘: g�:Ó.Ð.øÜô 	Ø�J‰JŒLØð	ús   Á.B  Â Bc               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   rX   }   s   € ÷ 
%ñ 
%�dñ 
%r$   c                	óè   € V P                   R uqn         V P                  R uq n        Vf   R #  VP                  VP                  4       Ve   VP                  RR7       R # R #   \         d     L'i ; i)Nç       @rh   )rZ   r[   Úcall_soon_threadsafeÚstopr€   Újoin)r`   rx   Úthreads   &  r"   r‹   Ú_BackgroundLoop.stop}   sp   € ØŸ:™: tÐˆŒjØ#Ÿ|™|¨TÐˆ”ØŠ<Ùð	Ø×%Ñ% d§i¡iÔ0ð ÒØ�K‰K ˆKÖ$ñ øô ô 	Ùð	ús   ®A# Á#A1Á0A1)rZ   r^   r[   )rA   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ra   rl   rk   r…   r‹   Ú__static_attributes__r    r$   r"   rT   rT   S   s*   † ÙUõ(õ
&õ
ð°d÷ ÷
%ñ 
%r$   rT   c                  ój  € ] tR t^ŠtRtRRRRRRRRR]RRR	R
RR
RRRR/
R R llt]R R l4       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 R l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, R- ltR. R/ ltR0RR1RR2Ri/R3 R4 lltR5 R6 ltR7R8R9RR:R/R; R< lltR= R> ltR? R@ ltRA RB ltRC RD ltRE RF ltRG RH lt RjRI RJ llt!RKRLRMR/RN RO llt"RP RQ lt#RR RS lt$]%RT RU l4       t&RV RW lt'RX RY lt(RZ R[ lt)R\ R] lt*R^ R_ lt+R` Ra lt,Rb Rc lt-Rd Re lt.Rf Rg lt/Rht0R# )kÚ
LSPServicezbThe process-wide LSP service; use :func:`agent.lsp.get_service` rather than constructing directly.Úbinary_overridesNÚenv_overridesÚinit_overridesÚdisabled_serversÚidle_timeoutÚextra_serversÚbroken_retry_secondsç        Úwarmup_timeoutÚexclude_rootsÚtrusted_workspacesc               óT   € V ^8„  d   QhRRRRRRRRRR	R
RRRRRRRRRRRRRRRRRRR/# )r   ÚenabledrL   Ú	wait_moder0   Úwait_timeoutr   Úinstall_strategyr–   zOptional[dict[str, list[str]]]r—   z#Optional[dict[str, dict[str, str]]]r˜   z#Optional[dict[str, dict[str, Any]]]r™   r,   rš   r›   zOptional[list[ServerDef]]rœ   rž   rŸ   r   r    r   rW   r    )r!   s   "r"   r#   ÚLSPService.__annotate__�   s©   € ÷ 2Cñ 2CØð2CØ+.ð2CØ>Cð2CØWZð2Cà8ð2Cð ;ð2Cð <ð	2Cð
 .ð2Cð ð2Cð 1ð2Cð $ð2Cð ð2Cð ð2Cð  ð2Cð 
ñ2Cr$   c               	ó¶  € Wn         VR9   d   TMR V n        W0n        W@n        T;'       g    / V n        T;'       g    / V n        T;'       g    / V n        \        T;'       g    . 4      V n        W�n	        \        T
;'       g    . 4      V n        \        RV4      V n        \        RV4      V n        \        V4      V n        \#        V4      V n        \        4       V n        \)        \+        4       4      V n        \/        4       V n        V P                   '       d   V P0                  P3                  4        / V n        / V n        / V n        / V n        \<        P>                  ! 4       V n         RV n!        / V n"        \G        4       V n$        V P                   '       dA   V P                  ^ 8”  d.   V P0                  PK                  V PM                  4       RR7       R# R# R# )Údocumentr�   Nr‰   rh   >   Úfullr¨   )'Ú_enabledÚ
_wait_modeÚ_wait_timeoutÚ_install_strategyÚ_binary_overridesÚ_env_overridesÚ_init_overridesrt   Ú_disabled_serversÚ_idle_timeoutr5   Ú_extra_serversÚmaxÚ_broken_retryÚ_warmup_timeoutrD   Ú_exclude_rootsrG   Ú_trusted_workspacesÚ_untrusted_skippedÚ	frozensetr   Ú_operator_rootsrT   rZ   rl   Ú_clientsÚ_brokenÚ	_spawningÚ
_last_usedr\   ÚLockÚ_state_lockÚ_idle_reaper_taskÚ_delta_baseliner   Ú_edit_checksr…   Ú_start_idle_reaper)r`   r¢   r£   r¤   r¥   r–   r—   r˜   r™   rš   r›   rœ   rž   rŸ   r    s   &$$$$$$$$$$$$$$r"   ra   ÚLSPService.__init__�   sƒ  € ð  ŒØ'0Ð4HÔ'H™)ÈjˆŒØ)ÔØ!1ÔØ!1×!7Ð!7°RˆÔØ+×1Ð1¨rˆÔØ-×3Ð3°ˆÔÜ!$Ð%5×%;Ð%;¸Ó!<ˆÔØ)ÔÜ/3°M×4GÐ4GÀRÓ/HˆÔÜ  Ð&:Ó;ˆÔÜ" 3¨Ó7ˆÔô 4HÈÓ3VˆÔÜ.FÐGYÓ.ZˆÔ Ü'*£uˆÔÜ(Ô)AÓ)CÓDˆÔä$Ó&ˆŒ
Ø�=�=ˆ=Ø�J‰J×ÑÔð 02ˆŒà*,ˆŒØ57ˆŒØ-/ˆŒÜ$Ÿ>š>Ó+ˆÔØ9=ˆÔà24ˆÔÜ&›LˆÔà�=�=ˆ=˜T×/Ñ/°!Ô3Ø�J‰J�N‰N˜4×2Ñ2Ó4¸cˆNÖBñ 4‰=r$   c               ó   € V ^8„  d   QhRR/# )r   r   zOptional[LSPService]r    )r!   s   "r"   r#   r¦   Â   s   € ÷ &
ñ &
Ð#7ñ &
r$   c                óB  €  ^ RI Hp V! 4       p\        T\        4      '       d   TP                  R4      MRp\        T\        4      '       d   TM/ p \        TP                  R\        4      4      p^ Tu;8  d   \        8  d
   M M\        pTP                  R4      ;'       g    / p\        T\        4      '       d=   TP                  4        UUu/ uF  w  rx\        T\        4      '       g   K  YxbK!  	  uppM/ p	T ! \        TP                  RR4      4      TP                  R	R
4      \        TP                  R\        4      4      TP                  RR4      T	P                  4        UUu/ uFF  w  rx\        TP                  R4      \         4      '       g   K,  TR,          '       g   K=  YxR,          bKH  	  uppT	P                  4        UUU
Uu/ uFa  w  rx\        TP                  R4      \        4      '       g   K,  YxR,          P                  4        U
Uu/ uF  w  r«T
\#        T4      bK  	  upp
bKc  	  upp
ppT	P                  4        UUu/ uF5  w  rx\        TP                  R4      \        4      '       g   K,  YxR,          bK7  	  uppT	P                  4        UUu. uF   w  rxTP                  R4      '       g   K  TNK"  	  uppT\%        T	4      \'        TP                  R4      R4      \'        TP                  R4      R4      TP                  R4      TP                  R4      R7      #   \         d"   p\        P	                  RT4        Rp?R# Rp?ii ; i  \        \        3 d    \        p ELi ; iu uppi u uppi u upp
i u upp
ppi u uppi u uppi )zJBuild a service from ``hermes_cli.config``; ``None`` if config can't load.)Úload_config_readonlyzLSP config load failed: %sNÚlsprš   Úserversr¢   Tr£   r¨   r¤   r¥   ÚautoÚcommandÚenvÚinitialization_optionsÚdisabledrœ   r�   rž   rŸ   r    )r¢   r£   r¤   r¥   r–   r—   r˜   r™   rš   r›   rœ   rž   rŸ   r    )Úhermes_cli.configrÉ   rw   ÚloggerÚdebugr/   ÚdictÚgetr   ÚDEFAULT_IDLE_TIMEOUTr'   r(   ÚMIN_IDLE_TIMEOUTÚitemsrL   r
   r5   r0   r   r)   )ÚclsrÉ   ÚcfgÚeÚlsp_cfgrš   Úservers_cfgÚnÚcrË   ÚkÚvs   &           r"   Úcreate_from_configÚLSPService.create_from_configÁ   sÚ  € ð	Ý>Ù&Ó(ˆCô %/¨s´D×$9Ò$9�#—'‘'˜%”.¸tˆÜ'¨´×6Ò6‘'¸Bˆð	0Ü  §¡¨^Ô=QÓ!RÓSˆLð ˆ|Ö.Ô.×.ô ,ˆLØ—k‘k )Ó,×2Ð2°ˆÜS]Ð^iÔko×SpÒSp K×$5Ñ$5Ô$7ÔOÑ$7™D˜A¼:ÀaÌ×;N”4�1’4Ñ$7ÓOÐvxˆÙÜ˜Ÿ™ Y°Ó5Ó6Ø—k‘k +¨zÓ:Ü˜wŸ{™{¨>Ô;TÓUÓVØ$Ÿ[™[Ð);¸VÓDØ:A¿-¹-¼/ô V¹/±$°!Ü!+¨A¯E©E°)Ó,<¼d×!Cô .ØHIÈ)ÏÉô .˜a 9¥šo¹/ò VàSZ×S`ÑS`ÔSbö >ÑSbÉ4È1Ü(¨¯©¨u«´t×<ô G˜1°uµX·^±^Ô5EÔFÑ5E©T¨Q˜q¤# a£&šyÑ5EÒFÒFÑSbô >àGNÇ}Á}Äô RÁ¹t¸qÜ)¨!¯%©%Ð0HÓ*IÌ4×Pô ;˜AÐ!9Õ:Ò:Áò Rà,3¯M©M¬OÔQ©O¡D A¸q¿u¹uÀZ×?PŸa˜a©OÒQØ%Ü(¨Ó1Ü!*¨7¯;©;Ð7MÓ+NÐPSÓ!TÜ$ W§[¡[Ð1AÓ%BÀCÓHØ!Ÿ+™+ oÓ6Ø&Ÿ{™{Ð+?Ó@ô#
ð 	
øô ô 	Ü�L‰LÐ5°qÔ9Ýûð	ûô œ:Ð&ô 	0Ü/‹Lð	0üó PùóVùãFùõ >ùóRùãQs}   ‚L. ÁM ÃM;Ã1M;Å,)NÆNÆ+NÇ)NÇ>NÈN"È/NÉ)NÉ=NÊ NË NÌ.MÌ9MÍMÍM8Í7M8ÎNc               ó    € V ^8„  d   QhRRRR/# )r   Ú	file_pathr0   r   zOptional[ServerDef]r    )r!   s   "r"   r#   r¦   ê   s   € ÷ 8ñ 8 Sð 8Ð-@ñ 8r$   c                ó~   € V P                   '       d   \        WP                   4      MRpT;'       g    \        V4      # )zcConfig-declared servers first (they may claim an extension ahead of a built-in), then the registry.N)r³   r   )r`   rå   Úextras   && r"   Ú_server_forÚLSPService._server_forê   s5   € àHL×H[×H[ÐH[Ô$ Y×0CÑ0CÔDÐaeˆØ×7Ð7Ô,¨YÓ7Ð7r$   c               ó    € V ^8„  d   QhRRRR/# )r   Úextr0   r   rL   r    )r!   s   "r"   r#   r¦   ï   s   € ÷ Zñ Z Sð Z¨Tñ Zr$   c                óÀ   a€ \         ;QJ d1    V3R l. V P                  O\        O 4       F  '       g   K   R# 	  R# ! V3R l. V P                  O\        O 4       4      # )zZTrue iff a config-declared or built-in server claims ``ext`` (pre-write capture decision).c              3  ó^   <"  € T F"  pSP                  4       VP                  9   x € K$  	  R # 5ir&   )ÚlowerÚ
extensions)r1   Úsrë   s   & €r"   r3   Ú/LSPService.handles_extension.<locals>.<genexpr>ñ   s"   øé € ÐYÑ8X°1�3—9‘9“; !§,¡,Ö.Ó8Xùs   ƒ*-TF)Úanyr³   r   )r`   rë   s   &fr"   Úhandles_extensionÚLSPService.handles_extensionï   sP   ø€ ç‹sÔYÐ8X¸$×:MÑ:MÐ8XÔPWÑ8XÓY�sŒsÐYŠsÐYˆsÔYÐ8X¸$×:MÑ:MÐ8XÔPWÑ8XÓYÓYÐYr$   c               ó   € V ^8„  d   QhRR/# )r   r   rL   r    )r!   s   "r"   r#   r¦   õ   s   € ÷ ñ ˜4ñ r$   c                ó   € V P                   # )z8Return True iff this service should be consulted at all.)rª   r_   s   &r"   Ú	is_activeÚLSPService.is_activeõ   s   € à�}‰}Ðr$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rI   r   rå   r0   r   zOptional[_Key]r    )r!   s   "r"   r#   r¦   ù   s!   € ÷ ,ñ ,˜yð ,°Sð ,¸^ñ ,r$   c                óÎ   € \        V4      w  r4V'       d	   V'       g   R#  VP                  VP                  W#4      ;'       g    T3#   \         d    TP                  T3u # i ; i)uã   ``(server_id, per-server root)`` broken-set key, or ``None`` when the file isn't gated in.

Falls back to the workspace root when the per-server resolver fails â€”
the same key ``_get_or_spawn`` would have used when it failed.
N)r   rP   Úresolve_rootrw   )r`   rI   rå   Úws_rootÚgateds   &&&  r"   Ú_broken_keyÚLSPService._broken_keyù   s]   € ô 4°IÓ>‰ˆßŸEÙð	,Ø—M‘M 3×#3Ñ#3°IÓ#G×#RÐ#RÈ7ÐSÐSøÜô 	,Ø—M‘M 7Ð+Ò+ð	,ús   ¡"A ÁA ÁA$Á#A$c               ó    € V ^8„  d   QhRRRR/# )r   rå   r0   r   rL   r    )r!   s   "r"   r#   r¦     s   € ÷ ñ  Sð ¨Tñ r$   c           	     óž  € V P                   '       d   V P                  V4      MRpVe   VP                  V P                  9   d   R# V P	                  W!4      pVf   R# V P                  V^,          4      '       d9   \        P                  ! VP                  V^,          WP                  RJ R7       R# V P                  4        V P                  W#^,          WP                  V^,          4      4      '       d   R# V P                  V4      '       d<   \        P                  ! VP                  V^,          WP                  V4      R7       R# R# )z®True iff LSP should run for this file: registered non-disabled server, git workspace,
and pair not broken (a failed server costs nothing until ``hermes lsp restart`` / exit).NF)Úinvalid)Úretry_inT)rª   rè   rP   r±   rþ   Ú_root_excludedr	   Úlog_root_excludedr·   Ú_note_operator_rootsÚ_untrusted_deniedÚ_trustedÚ
_is_brokenÚlog_skipped_brokenÚ_broken_retry_in)r`   rå   rI   Úkeys   &&  r"   Úenabled_forÚLSPService.enabled_for  sû   € ð .2¯]¯]¨]ˆd×Ñ˜yÔ)ÀˆØŠ;˜#Ÿ-™-¨4×+AÑ+AÔAÙØ×Ñ˜sÓ.ˆØŠ;ÙØ×Ñ˜s 1�v×&Ò&Ü×&Ò& s§}¡}°c¸!µf¸i×QdÑQdÐhlÐQlÕmÙØ×!Ñ!Ô#Ø×!Ñ! #¨1¥v¨y¿-¹-ÈÈAÍÓ:O×PÒPÙØ�?‰?˜3×ÒÜ×'Ò'¨¯©°s¸1µv¸y×ShÑShÐilÓSmÕnÙÙr$   c               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   r¦     s   € ÷ Dñ D dñ Dr$   c                óÐ   € \        4       ;qP                  8:  g8   V P                  ;_uu_ 4        V P                  V,          V n        RRR4       R# R#   + '       g   i     R# ; i)zÿRemember this thread's ``operator_workspace_roots``.  Called where a tool thread enters (it sees
the session's cwd; the loop thread that spawns servers does not), so trust is per process: a
workspace any session was opened in stays trusted until shutdown.N)r   r»   rÁ   )r`   rC   s   & r"   r  ÚLSPService._note_operator_roots  sO   € ô 2Ó3Ð3�×8LÑ8LÔLØ×!×!Ó!Ø'+×';Ñ';¸eÕ'C�Ô$÷ "Ñ!ñ Mß!×!Ð!ús   ¯AÁA%	c               ó    € V ^8„  d   QhRRRR/# ©r   rJ   r0   r   rL   r    )r!   s   "r"   r#   r¦   #  s   € ÷ Zñ Z˜Sð Z Tñ Zr$   c                	óB   € \        WP                  V P                  4      # r&   )r   r¸   r»   ©r`   rJ   s   &&r"   r  ÚLSPService._trusted#  s   € Ü# D×*BÑ*BÀD×DXÑDXÓYÐYr$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rI   r   rJ   r0   r   rM   r    )r!   s   "r"   r#   r¦   &  s&   € ÷ uñ u˜Yð u¨cð u°dñ ur$   c                ó˜   € VP                   V3pW0P                  9   g   W0P                  9   d   V# \        WV P	                  V4      4      # )zÔThe client key for ``root`` (under ``_state_lock``): a multi-root server started while
``root`` was untrusted keeps its own client after ``root`` becomes trusted, so it is found and
released rather than orphaned.)rP   r¼   r¾   rR   r  )r`   rI   rJ   Úowns   &&& r"   Ú	_live_keyÚLSPService._live_key&  sD   € ð �}‰}˜dÐ#ˆØŸ]™]Ô*¨c·^±^Ô.CˆsÐtÌÐUXÐ`d×`mÑ`mÐnrÓ`sÓItÐtr$   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   rI   r   rJ   r0   rå   rK   rL   r   r    )r!   s   "r"   r#   r¦   -  s1   € ÷ ñ  Yð °cð Àcð ÐTXð Ð]añ r$   c                ó4  € V'       g   VP                   \        9   d   R# V P                  ;_uu_ 4        V P                  P	                  VP                   V34       RRR4       \
        P                  ! VP                   W#4       R#   + '       g   i     L3; i)z²True iff ``srv`` may run project code and ``root`` is not a trusted workspace (deny by default:
only ``UNTRUSTED_SAFE_SERVERS`` start in a checkout the operator has not trusted).FNT)rP   r   rÁ   r¹   Úaddr	   Úlog_untrusted_skipped)r`   rI   rJ   rå   rK   s   &&&&&r"   r  ÚLSPService._untrusted_denied-  sd   € ÷ �c—m‘mÔ'=Ô=ÙØ××ÓØ×#Ñ#×'Ñ'¨¯©¸Ð(=Ô>÷ ä×&Ò& s§}¡}°dÔFÙ÷ ×ús   ´(BÂB	c               ó    € V ^8„  d   QhRRRR/# r  r    )r!   s   "r"   r#   r¦   7  s   € ÷ 3ñ 3 3ð 3¨4ñ 3r$   c                óÀ   a€ V P                   f   R# \        ;QJ d)    V3R lV P                    4       F  '       g   K   R# 	  R# ! V3R lV P                    4       4      # )zVTrue iff ``root`` matches an ``lsp.exclude_roots`` glob (or the key is misconfigured).Tc              3  ó  <"  € T Ft  p\         P                  ! SV4      ;'       gQ    \         P                  ! SVP                  \        P                  4      \        P                  ,           R ,           4      x € Kv  	  R# 5i)Ú*N)ÚfnmatchÚfnmatchcaseÚrstripr7   Úsep)r1   ÚpatrJ   s   & €r"   r3   Ú,LSPService._root_excluded.<locals>.<genexpr>;  s_   øé € ð 3Ù1�sô ×&Ò& t¨SÓ1×qÐq´W×5HÒ5HÈÈsÏzÉzÔZ\×Z`ÑZ`ÓOaÔdf×djÑdjÕOjÐmpÕOpÓ5qÔqÛ1ùs   ƒ"A?¦AA?F)r·   rò   r  s   &fr"   r  ÚLSPService._root_excluded7  sY   ø€ à×ÑÒ&Ùß‹sô 3Ø"×1Ò1ó3�sŒsð 	3Šsð 	3ˆsô 3Ø"×1Ò1ó3ó 3ð 	3r$   c               ó    € V ^8„  d   QhRRRR/# )r   r  rM   r   rL   r    )r!   s   "r"   r#   r¦   >  s   € ÷ ñ ˜dð  tñ r$   c                ó¸   € V P                   P                  V4      pVf   R# \        P                  ! 4       V8¼  d   V P                   P	                  VR4       R# R# )zeBroken-set membership; an entry whose retry deadline passed is dropped so the pair gets one more try.NFT)r½   rÕ   ÚtimeÚ	monotonicÚpop©r`   r  Údeadlines   && r"   r	  ÚLSPService._is_broken>  sH   € à—<‘<×#Ñ# CÓ(ˆØÒÙÜ�>Š>Ó˜xÔ'Ø�L‰L×Ñ˜S $Ô'ÙÙr$   c               ó    € V ^8„  d   QhRRRR/# )r   r  rM   r   r{   r    )r!   s   "r"   r#   r¦   H  s   € ÷ Wñ W Dð W¨_ñ Wr$   c                	óÞ   € V P                   P                  V\        P                  4      p\        P                  ! V4      '       d   R # \        RV\        P                  ! 4       ,
          4      # )Nr�   )r½   rÕ   ÚmathÚinfÚisinfr´   r.  r/  r1  s   && r"   r  ÚLSPService._broken_retry_inH  sH   € Ø—<‘<×#Ñ# C¬¯©Ó2ˆÜ—z’z (×+Ò+ˆtÐV´°S¸(ÄTÇ^Â^ÓEUÕ:UÓ1VÐVr$   c               ó    € V ^8„  d   QhRRRR/# )r   r  rM   r   rW   r    )r!   s   "r"   r#   r¦   L  s   € ÷ jñ j ð j¨ñ jr$   c                	ó®   € V P                   ^ 8”  d'   \        P                  ! 4       V P                   ,           M\        P                  V P
                  V&   R# )é    N)rµ   r.  r/  r6  r7  r½   )r`   r  s   &&r"   Ú_mark_brokenÚLSPService._mark_brokenL  s9   € ØEI×EWÑEWÐZ[ÔE[œDŸNšNÓ,¨t×/AÑ/AÖAÔae×aiÑaiˆ�‰�SÓr$   c               ó    € V ^8„  d   QhRRRR/# )r   rå   r0   r   r   r    )r!   s   "r"   r#   r¦   O  s   € ÷ hñ h cð h¨eñ hr$   c           	     óÞ  € V P                   V P                  8:  d   V P                  # V P                  V4      pVe   V P                  W!4      MRpVf   V P                  # V P                  ;_uu_ 4        V P
                  P                  V P                  W#^,          4      4      pRRR4       Xe   VP                  '       d   V P                  # V P                   #   + '       g   i     L>; i)zÄ``wait_timeout`` for a root with a running client; ``max(wait_timeout, warmup_timeout)`` for a
cold root, whose first request also pays the spawn/initialize and the server's initial program build.N)	r¶   r¬   rè   rþ   rÁ   r¼   rÕ   r  Ú
is_running)r`   rå   rI   r  Úclients   &&   r"   Ú_wait_budgetÚLSPService._wait_budgetO  s¾   € ð ×Ñ 4×#5Ñ#5Ô5Ø×%Ñ%Ð%Ø×Ñ˜yÓ)ˆØ25²/ˆd×Ñ˜sÔ.ÀtˆØŠ;Ø×%Ñ%Ð%Ø××ÓØ—]‘]×&Ñ& t§~¡~°c¸q½6Ó'BÓCˆF÷ à%+Ò%7¸F×<M×<MÐ<Mˆt×!Ñ!ÐgÐSW×SgÑSgÐg÷ ×ús   Á42CÃC,	c               ó    € V ^8„  d   QhRRRR/# )r   rå   r0   r   rW   r    )r!   s   "r"   r#   r¦   \  s   € ÷ Jñ J¨3ð J°4ñ Jr$   c                óä  € V P                  V4      '       g   R#  V P                  V4      p\        \        R,           VR,           4      pV P                  P                  V P                  W4      VR7      pT P                  \        P                  P                  V4      T;'       g    . 4       R#   \         d4   p\        P                  RY4       T P                  Y4       . p Rp?LtRp?ii ; i)zÅSnapshot current diagnostics for ``file_path`` as the delta baseline (call BEFORE a write).
Best-effort: failures are swallowed so a flaky server can't break a write, but they mark the pair broken.Ng      @rh   z#baseline snapshot failed for %s: %s)r  rC  r´   r
   rZ   r…   Ú_snapshot_asyncrw   rÒ   rÓ   Ú_mark_broken_for_fileÚ_set_delta_baseliner7   r8   Úabspath)r`   rå   ÚbudgetÚtÚdiagsrÛ   s   &&    r"   Úsnapshot_baselineÚLSPService.snapshot_baseline\  sÀ   € ð ×Ñ 	×*Ò*Ùð		ð ×&Ñ& yÓ1ˆFÜÔ-°Õ3°V¸cµ\ÓBˆAØ—J‘J—N‘N 4×#7Ñ#7¸	Ó#JÐTU�NÓVˆEð
 	× Ñ ¤§¡§¡°Ó!;¸U¿[¸[ÀbÖIøô	 ô 	Ü�L‰LÐ>À	ÔMØ×&Ñ& yÔ4Ø�Eûð	ús   ›AB1 Â1C/Â<)C*Ã*C/Ú	post_textÚownerÚcarryc          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   rå   r0   Úpre_textzOptional[str]rP  rQ  rR  Útupler    )r!   s   "r"   r#   r¦   m  s2   € ÷ -ñ -¨#ð -¸Mð -ÐVcð -Ø -ð-Ø=Bñ-r$   c          	     ój   € V P                  V4      '       g   R# ^ RIHp VP                  WW#VVR7      # )a  Non-blocking post-write check (``agent.lsp.edit_check``): a Future of the diagnostics the edit
introduced, or None when LSP doesn't handle the file.  Replaces snapshot_baseline +
get_diagnostics_sync on the write path, which blocked the write on both waits.  ``owner`` = the
editing session; ``carry`` = its undelivered notes for the file this check takes over.
``pre_text`` / ``post_text`` = the edit's own before/after content: the check diagnoses these
snapshots, never whatever another session has written to the file since.N)Ú
edit_check)rT  rP  rQ  rR  )r  Ú	agent.lsprW  rl   )r`   rå   rT  rP  rQ  rR  rW  s   &&$$$$ r"   Ústart_edit_checkÚLSPService.start_edit_checkm  s=   € ð ×Ñ 	×*Ò*ÙÝ(Ø×Ñ ¸(Ð_dØ&+ð  ó -ð 	-r$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úabs_pathr0   rM  Ú_Diagsr   rW   r    )r!   s   "r"   r#   r¦   {  s&   € ÷ Kñ K¨Cð K¸ð KÀ4ñ Kr$   c                óP  € V P                   ;_uu_ 4        V P                  P                  VR4       W P                  V&   \        V P                  4      \        8”  d,   V P                  \        \        V P                  4      4       KI   RRR4       R#   + '       g   i     R# ; i)z·Store a baseline, refreshing recency (pop + reinsert) so eviction tracks write order.
Callers run on arbitrary threads; the multi-step mutation needs the lock (callers don't hold it).N)rÁ   rÃ   r0  ÚlenÚ_DELTA_BASELINE_CAPÚnextÚiter)r`   r\  rM  s   &&&r"   rI  ÚLSPService._set_delta_baseline{  s{   € ð ××ÓØ× Ñ ×$Ñ$ X¨tÔ4Ø-2× Ñ  Ñ*Ü�d×*Ñ*Ó+Ô.AÔAØ×(Ñ(¬¬d°4×3GÑ3GÓ.HÓ)IÒJð B÷ ××Òús   •A4BÂB%	ÚdeltaTri   Ú
line_shiftc          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r   rå   r0   rd  rL   ri   r{   re  ú(Optional[Callable[[int], Optional[int]]]r   r]  r    )r!   s   "r"   r#   r¦   „  s6   € ÷ 'ñ 'Øð'Ø(,ð'Ø>Mð'à<ð'ð 
ñ'r$   c               óD  € V P                  V4      '       g   . # V P                  V4      P                  p V P                  V4      pVe   TMVR,           pV P                  P                  V P                  WR7      VR7      pTf   \        P                  ! YQRR7       . # T'       d   T P#                  YT4      pT'       d#   \        P$                  ! YQ\'        T4      4       T# \        P(                  ! YQ4       T#   \         d˜   p	\        T	\        P                  4      '       d.   \        P                  ! YQ4       \        P                  RY4       M-\        P                  ! YQT	4       \        P                  RY4       T P!                  Y4       . u Rp	?	# Rp	?	ii ; i)	a½  Synchronously open ``file_path``, wait for diagnostics, return them.  Never raises.

With ``delta`` (default) the result excludes the :meth:`snapshot_baseline`; ``line_shift`` (from
:func:`agent.lsp.range_shift.build_line_shift`) remaps that baseline into post-edit coordinates
first, so pre-existing diagnostics that merely moved don't look introduced by this edit.
``[]`` when LSP is disabled, nothing matches, or the server can't be spawned.
Nr‰   )rK  rh   z"LSP diagnostics timeout for %s: %sz'LSP diagnostics fetch failed for %s: %szfresh diagnostics)Úkind)r  rè   rP   rC  rZ   r…   Ú_open_and_wait_asyncrw   r/   rq   ÚTimeoutErrorr	   Úlog_timeoutrÒ   rÓ   Úlog_server_errorrH  Ú_apply_deltaÚlog_diagnosticsr_  Ú	log_clean)
r`   rå   rd  ri   re  rP   rK  rL  rM  rÛ   s
   &&$$$     r"   Úget_diagnostics_syncÚLSPService.get_diagnostics_sync„  sU  € ð ×Ñ 	×*Ò*ØˆIØ×$Ñ$ YÓ/×9Ñ9ˆ	ð	Ø×&Ñ& yÓ1ˆFØ"Ò.‘°F¸SµLˆAØ—J‘J—N‘N 4×#<Ñ#<¸YÐ#<Ó#VÐ`a�NÓbˆEð Š=ô × Ò  Ð<OÕPØˆIßØ×%Ñ% i¸
ÓCˆEßÜ×$Ò$ Y¼3¸u»:ÔFð ˆô ×Ò˜yÔ4Øˆøô+ ô 	Ü˜!œW×1Ñ1×2Ò2Ü×$Ò$ YÔ:Ü—‘ÐAÀ9ÕPä×)Ò)¨)ÀÔBÜ—‘ÐFÈ	ÔUØ×&Ñ& yÔ4Ø�Iûð	ús   ¶AC= Ã=FÄBFÆFÆFc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   rå   r0   rM  r]  re  rg  r   r    )r!   s   "r"   r#   r¦   ­  s*   € ÷ ñ  cð °&ð ÐFnð Ðsyñ r$   c                ó  € \         P                  P                  V4      pV P                  P	                  V4      ;'       g    . pV'       dP   Ve   ^ RIHp V! WS4      pV Uu0 uF  p\        V4      kK  	  ppV Uu. uF  p\        V4      V9  g   K  VNK  	  pp V P                  P                  V P                  V4      RR7      ;'       g    . p	V	'       d   V P                  WI4       V# u upi u upi   \         d    . p	 L4i ; i)zSDrop diagnostics present in the pre-write baseline, then roll the baseline forward.)Úshift_baseliner‰   rh   )r7   r8   rJ  rÃ   rÕ   Úagent.lsp.range_shiftru  Ú	_diag_keyrZ   r…   Ú_current_diags_asyncrw   rI  )
r`   rå   rM  re  r\  Úbaselineru  ÚdÚseenÚfreshs
   &&&&      r"   rn  ÚLSPService._apply_delta­  sç   € ä—7‘7—?‘? 9Ó-ˆØ×'Ñ'×+Ñ+¨HÓ5×;Ð;¸ˆßØÒ%å@Ù)¨(Ó?�Ù*2Ó3©( Q”I˜a–L©(ˆDÐ3Ù %ÓB¡˜1¬°1«¸TÑ)A—Q�Q¡ˆEÐBð	Ø—J‘J—N‘N 4×#<Ñ#<¸YÓ#GÐQT�NÓU×[Ð[ÐY[ˆE÷ Ø×$Ñ$ XÔ5Øˆùò 4ùÚBøô ô 	ØŠEð	ús*   Á#C.Á=C3ÂC3Â2C8 ÃC8 Ã8DÄDc               ó$   € V ^8„  d   QhRRRRRR/# )r   rå   r0   ÚexcÚBaseExceptionr   úOptional[LSPClient]r    )r!   s   "r"   r#   r¦   Á  s"   € ÷ ñ ¨ð °-ð ÐDWñ r$   c                ó  € V P                  V4      pVe   V P                  W14      MRpVf   R# V P                  V4      pV P                  V4       V P                  ;_uu_ 4        V P                  W4^,          4      pV P                  P                  VR4      pV P                  P                  VR4       RRR4       V'       g'   \        P                  ! V^ ,          V^,          V4       X#   + '       g   i     L@; i)a  Mark the file's ``(server_id, root)`` pair broken after an outer timeout/error, drop its
client from the live maps and log the failure once; returns the dropped client for the caller
to shut down.  The outer timeout cancels the in-flight spawn before ``_get_or_spawn`` could
record the failure; without this every later write would re-pay the full timeout.  The one
owner of this cleanup: ``_mark_broken_for_file`` (tool threads) and
``_mark_broken_for_file_async`` (the loop) only differ in how they await the shutdown.N)rè   rþ   r	  r=  rÁ   r  r¼   r0  r¿   r	   Úlog_spawn_failed)r`   rå   r  rI   r  Úalready_brokenÚckeyrB  s   &&&     r"   Ú_detach_brokenÚLSPService._detach_brokenÁ  sÈ   € ð ×Ñ˜yÓ)ˆØ25²/ˆd×Ñ˜sÔ.ÀtˆØŠ;ÙØŸ™¨Ó-ˆØ×Ñ˜#ÔØ××ÓØ—>‘> #¨1¥vÓ.ˆDØ—]‘]×&Ñ& t¨TÓ2ˆFØ�O‰O×Ñ  dÔ+÷ ÷ Ü×%Ò% c¨!¥f¨c°!­f°cÔ:Øˆ÷ ×ús   Á%AC.Ã.C>	c               ó$   € V ^8„  d   QhRRRRRR/# ©r   rå   r0   r  r€  r   rW   r    )r!   s   "r"   r#   r¦   Ö  s!   € ÷ ñ ¨sð ¸ð È4ñ r$   c                ó°   € V P                  W4      pVe/    V P                  P                  VP                  4       RR7       R# R#   \         d     R# i ; i)zUTool-thread bridge of :meth:`_detach_broken`: shuts the client down through the loop.Nç      ð?rh   )r†  rZ   r…   Úshutdownrw   ©r`   rå   r  rB  s   &&& r"   rH  Ú LSPService._mark_broken_for_fileÖ  sQ   € à×$Ñ$ YÓ4ˆØÒðà—
‘
—‘˜vŸ™Ó0¸#�Ö>ñ øô ô Úðús   —+A ÁAÁAc               ó$   € V ^8„  d   QhRRRRRR/# r‰  r    )r!   s   "r"   r#   r¦   à  s'   € ÷ Tñ T¸3ð TÀ]ð TÐW[ñ Tr$   c              ƒ  óð   "  € V P                  W4      pVe2    \        P                  ! VP                  4       RR7      G Rj  x€L
  R# R#  L  \         d    \
        P                  RRR7        R# i ; i5i)z`Loop-side :meth:`_detach_broken` (``_mark_broken_for_file`` would block on the loop it runs on).Nr‹  rh   z$shutdown of broken LSP client failedT)Úexc_info)r†  rq   Úwait_forrŒ  rw   rÒ   rÓ   r�  s   &&& r"   Ú_mark_broken_for_file_asyncÚ&LSPService._mark_broken_for_file_asyncà  sg   é € à×$Ñ$ YÓ4ˆØÒðTÜ×&Ò& v§¡Ó'8À#ÔF×FÒFñ áFøÜô TÜ—‘ÐCÈd�×SðTüs:   ‚A6™)A ÁAÁA ÁA6ÁA Á"A3Á/A6Á2A3Á3A6c               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   r¦   é  s   € ÷ 	ñ 	˜$ñ 	r$   c                ó*  € V P                   '       g   R#  V P                  P                  V P                  4       RR7       V P                  P                  4        \        4        R#   \         d!   p\
        P                  RT4        Rp?LLRp?ii ; i)z3Tear down all clients and stop the background loop.Nç      $@rh   zLSP shutdown error: %s)	rª   rZ   r…   Ú_shutdown_asyncrw   rÒ   rÓ   r‹   r   )r`   rÛ   s   & r"   rŒ  ÚLSPService.shutdowné  si   € à�}�}ˆ}Ùð	6Ø�J‰J�N‰N˜4×/Ñ/Ó1¸4ˆNÔ@ð 	�
‰
�‰ÔÜŽøô ô 	6Ü�L‰LÐ1°1×5Ñ5ûð	6ús   –+A' Á'BÁ2BÂBc               ó   € V ^8„  d   QhRR/# )r   r   zdict[str, Any]r    )r!   s   "r"   r#   r¦   ô  s   € ÷ 
ñ 
˜Nñ 
r$   c                ód  a € S P                   ;_uu_ 4        S P                  P                  4        Uu. uFJ  pRVP                  RVP                  R\        VP                  4      RVP                  RVP                  /NKL  	  ppS P                  P                  4        UUu. uF#  w  r4\        P                  ! 4       V8  g   K!  VNK%  	  ppp\        V 3R lS P                   4       4      pRRR4       RS P                  R	S P                   R
S P"                  RS P$                  RXRXR\        S P&                  4      RS P(                  RS P*                  RS P,                  e   \        S P,                  4      MRR\        S P.                  4      RX/# u upi u uppi   + '       g   i     Lº; i)z;Return a snapshot of the service for ``hermes lsp status``.rP   Úworkspace_rootÚworkspace_foldersÚstateÚrunningc              3  óh   <"  € T F'  pSP                  V^,          4      '       d   K#  Vx € K)  	  R# 5i)é   N)r  )r1   Úpairr`   s   & €r"   r3   Ú(LSPService.get_status.<locals>.<genexpr>ý  s'   øé € ÐfÑ0G¨ÈtÏ}É}Ð]aÐbcÕ]d×OeŸtštÓ0Gùs   ƒ 2¨
2Nr¢   r£   r¤   r¥   ÚclientsÚbrokenr™   rœ   rž   rŸ   ÚINVALIDr    Úuntrusted_skipped)rÁ   r¼   ÚvaluesrP   rœ  r5   r�  rž  rA  r½   rØ   r.  r/  Úsortedr¹   rª   r«   r¬   r­   r±   rµ   r¶   r·   r¸   )r`   rß   r¤  r  r2  r¥  Ú	untrusteds   f      r"   Ú
get_statusÚLSPService.get_statusô  sx  ø€ à××Óð Ÿ™×-Ñ-Ô/óñ 0�Að ˜aŸk™kÐ+;¸Q×=MÑ=MØ$¤d¨1×+>Ñ+>Ó&?ÀÈ!Ï'É'ÐS\Ð^_×^jÑ^jólá/ð ð ð
 04¯|©|×/AÑ/AÔ/CÔcÑ/C™m˜cÄtÇ~Â~ÓGWÐZbÑGb—c�cÑ/CˆFÑcÜÔf°×0GÒ0GÓfÓfˆI÷ ð �t—}‘} k°4·?±?ÀNÐTX×TfÑTfØ × 6Ñ 6¸	À7ÈHÐV\Ø¤ t×'=Ñ'=Ó >Ø" D×$6Ñ$6Ð8HÈ$×J^ÑJ^Ø¸$×:MÑ:MÒ:YœT $×"5Ñ"5Ô6Ð_hØ ¤$ t×'?Ñ'?Ó"@ÐBUÐW`ð
ð 	
ùòùó
 d÷ ×ús/   –F³AFÂFÂ"F
ÃF
Ã"FÆFÆF/	c               ó$   € V ^8„  d   QhRRRRRR/# )r   rå   r0   rK  r{   r   r]  r    )r!   s   "r"   r#   r¦   	  s'   € ÷ ^ñ ^¨sð ^¸Oð ^ÐW]ñ ^r$   c              ƒ  	óZ   "  € V P                  VR VR7      G Rj  x€L
 ;'       g    . #  L5i)T)ÚsnapshotrK  N)rj  )r`   rå   rK  s   &&&r"   rG  ÚLSPService._snapshot_async	  s/   é € ð ×.Ñ.¨yÀ4ÐPVÐ.ÓW×W×]Ð]Ð[]Ð]ÑWùs   ‚+š)›
+¦+r¯  FrK  c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   rå   r0   r¯  rL   rK  r{   r   zOptional[_Diags]r    )r!   s   "r"   r#   r¦     s2   € ÷ [ñ [Øð[Ø+/ð[ØAPð[à	ñ[r$   c             ƒ  ó|  "  € V P                  V4      G Rj  x€L
 pVf   R#  V P                  V4      pVP                  V\        W4      R7      G Rj  x€L
 pV'       g   VP	                  V4      G Rj  x€L
  TP                  YV P                  Ve   TMV P                  R7      G Rj  x€L
 pT P                  T4       T'       d   \        TP                  TRR7      4      # R#  LÎ L” Lu LA  \         dA   pT'       d   \        P                  RT4       M\        P                  RY4        Rp?R# Rp?ii ; i5i)aQ  Open + wait for FRESH diagnostics: ``[]`` = checked clean, ``None`` = no verdict in budget.

Callers must not substitute stale data for either.  ``snapshot`` mode (pre-write baseline)
skips didSave; both modes wait at most ``budget`` (``lsp.wait_timeout`` unless the caller
computed a cold-root warm-up budget via :meth:`_wait_budget`).
N)Úlanguage_id)Úmoderi   zsnapshot open/wait failed: %szopen/wait failed for %s: %sT©Ú
fresh_only)Ú_get_or_spawnrè   Ú	open_filer   Ú	save_fileÚwait_for_diagnosticsr«   r¬   rw   rÒ   rÓ   Ú_touchr5   Údiagnostics_for)	r`   rå   r¯  rK  rB  rI   Úversionr|  rÛ   s	   &&$$     r"   rj  ÚLSPService._open_and_wait_async  s  é € ð ×)Ñ)¨)Ó4×4ˆØŠ>Ùð	Ø×"Ñ" 9Ó-ˆCØ"×,Ñ,¨YÄOÐT]ÓDcÐ,Ód×dˆGßØ×&Ñ& yÓ1×1Ð1Ø ×5Ñ5Ø¨¯©Ø"(Ò"4™¸$×:LÑ:Lð 6ó ÷ ˆEð 	�‰�FÔßKPŒt�F×*Ñ*¨9ÀÐ*ÓFÓGÐZÐVZÐZñ' 5ñ
 eá1ñøô ô 	ßÜ—‘Ð<¸aÕ@ä—‘Ð:¸IÔIÝûð	üsz   ‚D<—C&˜
D<£0C. ÁC(ÁC. Á C. Á4C*Á55C. Â*C,Â+C. Â/D<ÃD<Ã(C. Ã*C. Ã,C. Ã.D9Ã95D4Ä.D<Ä4D9Ä9D<c               ó    € V ^8„  d   QhRRRR/# )r   rå   r0   r   r]  r    )r!   s   "r"   r#   r¦   ,  s   € ÷ Zñ Z°Cð Z¸Fñ Zr$   c              ƒ  	ó¨  "  € \        V4      w  r#V P                  V4      pV'       d   V'       d	   V'       g   . # VP                  W4      pVf   . # V P                  ;_uu_ 4        V P                  P                  V P                  WE4      4      pR R R 4       X'       d   \        VP                  VRR7      4      # . #   + '       g   i     L6; i5i)NTrµ  )	r   rè   rû   rÁ   r¼   rÕ   r  r5   r¼  )r`   rå   Úwsrý   rI   rJ   rB  s   &&     r"   rx  ÚLSPService._current_diags_async,  s¢   é € Ü.¨yÓ9‰	ˆØ×Ñ˜yÓ)ˆß—u§ØˆIð ×Ñ 	Ó.ˆØŠ<ØˆIØ××ÓØ—]‘]×&Ñ& t§~¡~°cÓ'@ÓAˆF÷ çKQŒt�F×*Ñ*¨9ÀÐ*ÓFÓGÐYÐWYÐY÷ ×üs-   ‚.C±C¹-CÁ&+B?ÂCÂ!CÂ?C	Ã
Cc               ó    € V ^8„  d   QhRRRR/# )r   rå   r0   r   r�  r    )r!   s   "r"   r#   r¦   :  s   € ÷ ?"ñ ?"¨Sð ?"Ð5Hñ ?"r$   c           	   ƒ  	óŽ	  "  € V P                  V4      pVf   R # VP                  V P                  9   d%   \        P                  ! VP                  VR4       R # \        V4      w  r4V'       d	   V'       g$   \        P                  ! VP                  V4       R # VP                  W4      pVf%   \        P                  ! VP                  VR4       R # V P                  W%WP                  V4      4      '       d   R # V P                  VP                  V34      '       d   R # V P                  ;_uu_ 4        V P                  W%4      pV^,          R8H  ;'       g    V P                  V4      pV P                  P                  V4      pVe6   VP                  '       d$   \         P                   ! 4       V P"                  V&   MZR pV P$                  P                  V4      p	V	R J p
V
'       d2   \&        P(                  ! 4       P+                  4       ;q�P$                  V&   R R R 4       Xe<   \        P,                  ! VP                  V4       V P/                  W(V4      G R j  x€L
 # X
'       g@    \&        P0                  ! X	4      G R j  x€L
 pTe   T P/                  Y(T4      G R j  x€L
 # R #  V P9                  W%X4      G R j  x€L
 pVf   V P;                  VP                  V34       MnV P                  ;_uu_ 4        W€P                  X&   \         P                   ! 4       V P"                  V&   R R R 4       \        P,                  ! VP                  V4       X	P=                  V4       TV P                  ;_uu_ 4        V P$                  P?                  XR 4       R R R 4       V	PA                  4       '       g   V	PC                  4        # #   + '       g   i     ELµ; i EL~ ELZ  \&        P2                   d    X	P5                  4       '       d    R # h \6         d     R # i ; i EL ELe  + '       g   i     EL; i  + '       g   i     L¬; i  T P                  ;_uu_ 4        T P$                  P?                  XR 4       R R R 4       M  + '       g   i     M; iX	PA                  4       '       g   T	PC                  4        i i ; i5i)Nzdisabled in configz%exclude marker hit (server gated off)rO   )"rè   rP   r±   r	   Úlog_disabledr   Úlog_no_project_rootrû   r  r  r	  rÁ   r  r¼   rÕ   rA  r.  r¿   r¾   rq   Úget_running_loopÚcreate_futureÚ
log_activeÚ_attach_rootÚshieldÚCancelledErrorÚ	cancelledrw   Ú_spawn_clientr=  Ú
set_resultr0  Údoner‚   )r`   rå   rI   rü   rý   rJ   r  rK   rB  ÚspawningrQ  s   &&         r"   r·  ÚLSPService._get_or_spawn:  s‰  é € Ø×Ñ˜yÓ)ˆØŠ;ÙØ�=‰=˜D×2Ñ2Ô2Ü×!Ò! #§-¡-°Ð<PÔQÙÜ3°IÓ>‰ˆßŸEÜ×(Ò(¨¯©¸	ÔBÙØ×Ñ 	Ó3ˆØŠ<Ü×!Ò! #§-¡-°Ð<cÔdÙØ×!Ñ! #¨Y¿¹ÀdÓ8K×LÒLÙØ�?‰?˜CŸM™M¨4Ð0×1Ò1ÙØ××ÓØ—.‘. Ó+ˆCð ˜!•f ‘l×9Ð9 d§m¡m°DÓ&9ˆGØ—]‘]×&Ñ& sÓ+ˆFØÒ! f×&7×&7Ð&7Ü'+§y¢y£{�—‘ Ò$à�ØŸ>™>×-Ñ-¨cÓ2�Ø  DÐ(�ßÜ5<×5MÒ5MÓ5O×5]Ñ5]Ó5_Ð_�HŸ~™~¨cÑ2÷ ð ÒÜ×Ò §¡¨tÔ4Ø×*Ñ*¨3¸Ó=×=Ð=ßð	ô  'Ÿ~š~¨hÓ7×7�ð BHÒAS˜×*Ñ*¨3¸Ó=×=Ð]ÐY]Ð]ð	"Ø×-Ñ-¨c¸ÓA×AˆFØŠ~Ø×!Ñ! 3§=¡=°$Ð"7Õ8à×%×%Ó%Ø)/—M‘M #Ñ&Ü+/¯9ª9«;�D—O‘O CÑ(÷ &ô ×#Ò# C§M¡M°4Ô8Ø×Ñ Ô'Øà×!×!Ó!Ø—‘×"Ñ" 3¨Ô-÷ "à—=‘=—?’?Ø—‘Õ!ð #÷W ×Ðúò  >ò
 8øÜ×)Ñ)ô Ø×%Ñ%×'Ò'ÚØÜô Úðúâ=âA÷ &×%Ð%ú÷ "×!û�×!×!Ó!Ø—‘×"Ñ" 3¨Ô-÷ "×!×!Ð!úà—=‘=—?’?Ø—‘Õ!ð #üs  ‚A3SÁ6B'SÄSÄ4A'OÆAOÇ(1OÈASÉOÉSÉ)O ÊOÊO ÊSÊ PÊ!SÊ(Q Ê=P"Ê>:Q Ë81P%Ì);Q Í$SÍ8P9ÎSÎ3SÏO	Ï
SÏO Ï*PÐ
SÐ	PÐPÐSÐPÐSÐ"Q Ð%P6	Ð0	Q Ð9Q	ÑSÑSÑ!R	Ñ>	SÒRÒSÒ0SÓSc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   rI   r   rB  r   rJ   r0   r   r    )r!   s   "r"   r#   r¦   |  s(   € ÷ ñ  	ð °9ð ÀCð ÈIñ r$   c              ƒ  óh   "  € V P                   '       d   VP                  V4      G Rj  x€L
  V#  L5i)zXMulti-root servers: announce ``root`` to the shared process instead of spawning another.N)rQ   Úadd_workspace_folder)rI   rB  rJ   s   &&&r"   rÊ  ÚLSPService._attach_root{  s.   é € ð �>�>ˆ>Ø×-Ñ-¨dÓ3×3Ð3Øˆñ 4ùs   ‚'2©0ª2c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   rI   r   rJ   r0   rK   rL   r   r�  r    )r!   s   "r"   r#   r¦   ‚  s)   € ÷ ñ  yð ¸ð Àdð ÐObñ r$   c           
   ƒ  ó„  "  € \        W P                  V P                  V P                  V P                  VR7      pVP                  W$4      pVf.   \        P                  ! VP                  VP                  4       R# \        VP                  VP                  VP                  VP                  VP                  VP                  VP                  ;'       g    VP                   R7      p VP#                  4       G Rj  x€L
  V#  L  \$         d-   p\        P&                  ! TP                  Y'4        Rp?R# Rp?ii ; i5i)zRResolve the binary and start a client; ``None`` (after logging) when either fails.)rœ  r¥   r–   r—   r˜   rK   N)rP   rœ  rÍ   rÎ   ÚcwdrÏ   Úseed_diagnostics_on_first_push)r   r­   r®   r¯   r°   Úbuild_spawnr	   Úlog_server_unavailablerP   r   rœ  rÍ   rÎ   rÙ  rÏ   rÚ  Úseed_first_pushrl   rw   rƒ  )r`   rI   rJ   rK   ÚctxÚspecrB  rÛ   s   &&&&    r"   rÎ  ÚLSPService._spawn_client‚  sý   é € äØ×2HÑ2HÐ[_×[qÑ[qØ×-Ñ-¸d×>RÑ>RØô
ˆð
 �‰˜tÓ)ˆØŠ<ä×+Ò+¨C¯M©M¸3¿=¹=ÔIÙÜØ—m‘m°D×4GÑ4GÐQU×Q]ÑQ]Ðcg×ckÑckØ—‘°×1LÑ1LØ+/×+NÑ+N×+eÐ+eÐRU×ReÑReô
ˆð
	Ø—,‘,“.× Ð ð ˆñ	 !øÜô 	Ü×%Ò% c§m¡m°TÔ=Ýûð	üsH   ‚CE ÃE Ã*D Ã=DÃ>D ÄE ÄD ÄD=Ä!D8Ä2E Ä8D=Ä=E c               ó    € V ^8„  d   QhRRRR/# )r   rB  r   r   rW   r    )r!   s   "r"   r#   r¦   š  s   € ÷ 7ñ 7˜Yð 7¨4ñ 7r$   c                ó   € V P                   ;_uu_ 4        V P                  P                  4        F.  w  r#W1J g   K  \        P                  ! 4       V P                  V&   K0  	  RRR4       R#   + '       g   i     R# ; i)zdRefresh last-used; guarded on membership so a client reaped mid-operation can't resurrect its entry.N)rÁ   r¼   rØ   r.  r¿   )r`   rB  r  rß   s   &&  r"   r»  ÚLSPService._touchš  sO   € à××ÓØŸ-™-×-Ñ-Ö/‘�Ø•;Ü+/¯9ª9«;�D—O‘O CÓ(ñ 0÷ ××Òús   •"A,¼&A,Á,A=	c               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   r¦   ¡  s   € ÷ Oñ O¨$ñ Or$   c              ƒ  	ó`   "  € \         P                  ! V P                  4       4      V n        R # 5ir&   )rq   Úcreate_taskÚ_idle_reaper_looprÂ   r_   s   &r"   rÅ   ÚLSPService._start_idle_reaper¡  s!   é € Ü!(×!4Ò!4°T×5KÑ5KÓ5MÓ!NˆÖùs   ‚,.c               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   r¦   ¤  s   € ÷ 
Cñ 
C¨ñ 
Cr$   c              ƒ  	ó:  "  € \        R V P                  4      p \        P                  ! V4      G Rj  x€L
   V P	                  4       G Rj  x€L
  K:   L L  \        P
                   d    h \         d"   p\        P                  RT4        Rp?Kz  Rp?ii ; i5i)g      N@NzLSP idle reaper sweep error: %s)	Úminr²   rq   ÚsleepÚ_reap_idle_oncerÌ  rw   rÒ   rÓ   )r`   ÚintervalrÛ   s   &  r"   rç  ÚLSPService._idle_reaper_loop¤  s€   é € Ü�t˜T×/Ñ/Ó0ˆØÜ—-’- Ó)×)Ð)ðCØ×*Ñ*Ó,×,Ò,ñ *á,øÜ×)Ñ)ô ØÜô Cä—‘Ð>À×BÒBûðCüsP   ‚1B³A´B¹A ÁAÁA ÁBÁA ÁBÁ6BÁ7BÂBÂBÂBc               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   r¦   °  s   € ÷ lñ l tñ lr$   c           	   ƒ  	ó  "  € \         P                   ! 4       V P                  ,
          pV P                  ;_uu_ 4        V P                   Uu. uF'  q P                  P                  V^ 4      V8  g   K%  VNK)  	  ppV Uu. uF  q P                  P                  V4      NK  	  ppV F  pV P                  P                  VR4       K!  	  RRR4       X'       dl   \        P                  ! V Uu. uF  qUP                  VP                  3NK  	  upV P                  4       \        P                  ! R V 4       RR/ G Rj  x€L
  V P                  R RR7      G Rj  x€L
  R# u upi u upi   + '       g   i     L«; iu upi  LD L*5i)r<  Nc              3  ó@   "  € T F  qP                  4       x € K  	  R # 5ir&   ©rŒ  ©r1   rB  s   & r"   r3   Ú-LSPService._reap_idle_once.<locals>.<genexpr>¹  ó   é € Ð"KÁ7¸§?¡?×#4Ð#4Ã7ùó   ‚Úreturn_exceptionsTc                óJ   € \         P                  P                  V 4      '       * # r&   )r7   r8   Úisdir)Úfolders   &r"   Ú<lambda>Ú,LSPService._reap_idle_once.<locals>.<lambda>¼  s   € ´B·G±G·M±MÀ&Ó4IÕ0Ir$   zworkspace root deleted©Úreason)r.  r²   rÁ   r¼   r¿   rÕ   r0  r	   Ú
log_reapedrP   rœ  rq   ÚgatherÚ_detach_roots)r`   Úcutoffr  Ú	idle_keysr¤  rß   s   &     r"   rí  ÚLSPService._reap_idle_once°  s0  é € Ü—’“˜t×1Ñ1Õ1ˆØ××ÓØ(,¯ªÓ^© ¿¹×9LÑ9LÈSÐRSÓ9TÐW]Ñ9]Ÿ˜©ˆIÐ^Ù9BÓC¹°#—}‘}×(Ñ(¨Ö-¹ˆGÐCÛ �Ø—‘×#Ñ# C¨Ö.ñ !÷ ÷
 Ü×ÒÉ'Ó RÉ'ÀQ§+¡+¨q×/?Ñ/?Ó!@É'Ñ RÐTX×TfÑTfÔgÜ—.’.Ñ"KÁ7Ó"KÐdÐ_cÑd×dÐdð × Ñ Ñ!IÐRjÐ Ók×kÒkùò _ùÚC÷ ×üò !SÙdñ 	lùsp   ‚;F½E,Á"E"Á3E"Á9E,Á?#E'Â"'E,Ã	FÃFÃ- E?Ä2FÄ?FÅ FÅFÅFÅ"
E,Å,E<	Å7FÆFc               ó    € V ^8„  d   QhRRRR/# )r   rœ  r0   r   Úintr    )r!   s   "r"   r#   r¦   ¾  s   € ÷ ñ °ð ¸ñ r$   c                ó   € V P                   '       g   ^ # \        P                  P                  V4      p V P                  P                  V P                  V4      RR7      #   \         d"   p\        P                  RY#4        Rp?^ # Rp?ii ; i)u„  Shut down the clients serving ``workspace_root`` or any root beneath it; returns how many.

Called by the worktree cleanup paths BEFORE ``git worktree remove`` so a gateway that outlives the
session does not keep the language server (and its stdio pipes) alive for a tree that no longer
exists.  Multi-root servers only drop the folder.  Idempotent; best-effort â€” never blocks removal.
g      .@rh   zLSP release of %s failed: %sN)
rª   r7   r8   rJ  rZ   r…   Ú_release_asyncrw   rÒ   rÓ   )r`   rœ  rJ   rÛ   s   &&  r"   Úrelease_workspaceÚLSPService.release_workspace¾  sk   € ð �}�}ˆ}ÙÜ�w‰w�‰˜~Ó.ˆð	Ø—:‘:—>‘> $×"5Ñ"5°dÓ";ÀT�>ÓJÐJøÜô 	Ü�L‰LÐ7¸ÔAÝûð	ús   µ+A! Á!BÁ,BÂBc               ó    € V ^8„  d   QhRRRR/# )r   rJ   r0   r   r  r    )r!   s   "r"   r#   r¦   Î  s   € ÷ ñ ¨ð °ñ r$   c           
   ƒ  	óÖ  a"  € R  V3R llpV P                   ;_uu_ 4        V P                  P                  4        Uu. uF  q3P                  4       '       d   K  VNK  	  ppV P                  P                  4        UUu/ uF  w  rVV! V^,          4      '       d   K  WVbK   	  uppV n        V P                   Uu. uF  qr! V4      '       g   K  VNK  	  up F  pV P                  V K  	  RRR4       X'       d!   \        P                  ! VRR7      G Rj  x€L
  V P                  VRR7      G Rj  x€L
 p	\        4        V	# u upi u uppi u upi   + '       g   i     Lo; i LN L55i)c               ó    € V ^8„  d   QhRRRR/# )r   r8   r0   r   rL   r    )r!   s   "r"   r#   Ú/LSPService._release_async.<locals>.__annotate__Ï  s   € ÷ 	Bñ 	B˜ð 	B ñ 	Br$   c                ój   <€ V S8H  ;'       g'    V P                  S\        P                  ,           4      # r&   )Ú
startswithr7   r(  )r8   rJ   s   &€r"   Ú_underÚ)LSPService._release_async.<locals>._underÏ  s&   ø€ Ø˜4‘<×AÐA 4§?¡?°4¼"¿&¹&µ=Ó#AÐAr$   Nr—  rh   zworkspace releasedrþ  )rÁ   r¾   r¨  rÐ  r½   rØ   rÃ   rq   rm   r  r   )
r`   rJ   r  r„   Úpendingr  r2  r2   r8   Úreleaseds
   &f        r"   r	  ÚLSPService._release_asyncÎ  s  øé € ÷	Bð 	Bð
 ××ÓØ&*§n¡n×&;Ñ&;Ô&=ÓPÑ&=˜sÇXÁXÇZ—s�sÑ&=ˆGÐPØ?C¿|¹|×?QÑ?QÔ?SÔjÑ?S©m¨cÑ[aÐbeÐfgÕbh×[iœM˜CšMÑ?SÒjˆDŒLØ$(×$8Ò$8ÓFÑ$8˜q¸FÀ1¿IŸ˜Ñ$8ÔF�Ø×(Ñ(¨Ò.ñ G÷ ÷
 Ü—,’,˜w°Ô5×5Ð5Ø×+Ñ+¨FÐ;OÐ+ÓP×PˆÜŒØˆùò QùÛjùÚF÷ ×úñ 6ÙPùs{   ƒE)¡E¾EÁEÁ EÁ?E
ÂE
Â#EÂ:EÃEÃEÃ+E)Ã;E)ÄE%ÄE)Ä1E'Ä2E)ÅEÅE"	Å	E)Å'E)c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úis_gonezCallable[[str], bool]rÿ  r0   r   r  r    )r!   s   "r"   r#   r¦   ß  s#   € ÷ ñ Ð+@ð ÈSð ÐUXñ r$   c             ƒ  ó6  "  € V P                   ;_uu_ 4        V P                  P                  4        UUu. uF-  w  r4\        \	        WP
                  4      4      '       g   K+  VNK/  	  pppV Uu. uF  q0P                  P                  V4      NK  	  ppV F  pV P                  P                  VR4       K!  	  V P                  P                  4        UUu. uF/  qDVP
                   Uu. uF  qq! V4      '       g   K  VNK  	  up3NK1  	  pppRRR4       X F(  w  ršV
 F  p V	P                  V4      G Rj  x€L
  K  	  K*  	  X'       db   \        P                  ! V Uu. uF  qDP                  VP                   3NK  	  upV4       \"        P$                  ! R V 4       RR/ G Rj  x€L
  \'        V4      # u uppi u upi u upi u uppi   + '       g   i     LÈ; i L©  \         d"   p\        P                  RY¼4        Rp?Kë  Rp?ii ; iu upi  Ln5i)a!  Shared teardown primitive for :meth:`release_workspace` and the reaper.

Clients whose every workspace folder ``is_gone`` are detached under ``_state_lock`` and shut down;
multi-root clients that still serve other folders only drop the gone ones.  Returns the number of
clients shut down.
Nz$LSP folder removal for %s failed: %sc              3  ó@   "  € T F  qP                  4       x € K  	  R # 5ir&   ró  rô  s   & r"   r3   Ú+LSPService._detach_roots.<locals>.<genexpr>ô  rö  r÷  rø  T)rÁ   r¼   rØ   r6   Úmapr�  r0  r¿   r¨  Úremove_workspace_folderrw   rÒ   rÓ   r	   Úlog_releasedrP   rœ  rq   r  r_  )r`   r  rÿ  r  rß   Ú	dead_keysr¤  ÚfÚtrimsrB  Úfoldersrû  rÛ   s   &&$          r"   r  ÚLSPService._detach_rootsß  s°  é € ð ××ÓØ+/¯=©=×+>Ñ+>Ô+@ÔkÑ+@¡ ÄCÌÈG×UhÑUhÓHi×DjŸ˜Ñ+@ˆIÑkÙ9BÓC¹°#—}‘}×(Ñ(¨Ö-¹ˆGÐCÛ �Ø—‘×#Ñ# C¨Ö.ñ !àRV×R_ÑR_×RfÑRfÔRhÔiÑRhÈQ Q×%8Ò%8ÓGÑ%8 ¸GÀA¿JŸ!˜!Ñ%8ÑGÓHÑRhˆEÑi÷ ó  %‰OˆFÛ!�ðTØ ×8Ñ8¸Ó@×@Ò@ó "ñ  %÷ Ü×!Ò!ÉGÓ"TÉGÀq§K¡K°×1AÑ1AÓ#BÉGÑ"TÐV\Ô]Ü—.’.Ñ"KÁ7Ó"KÐdÐ_cÑd×dÐdÜ�7‹|Ðùó lùÚCùò HùÓi÷ ×úñ AøÜ ô TÜ—L‘LÐ!GÈ×SÒSûðTüò #UÙdùsÄ   ‚H—Gµ(F8
Á"F8
Á(GÁ/#F>ÂAGÃG
Ã)GÃ=GÄG
ÄGÄHÄ#G#Ä7G!Ä8G#Ä<HÅHÅ  HÆ (HÆ(HÆ)HÆ8GÇG
ÇGÇG	ÇHÇ!G#Ç#HÇ.H
ÈHÈ
HÈ	Hc               ó   € V ^8„  d   QhRR/# rV   r    )r!   s   "r"   r#   r¦   ÷  s   € ÷ 
Wñ 
W tñ 
Wr$   c              ƒ  	ó0  "  € V P                   ;pe8   R V n         VP                  4        \        P                  ! VRR7      G R j  x€L
  V P                  ;_uu_ 4        \        V P                  P                  4       4      pV P                  P                  4        V P                  P                  4        V P                  P                  4        R R R 4       \        P                  ! R X 4       RR/ G R j  x€L
  R #  L¹  + '       g   i     L9; i L5i)NT)rø  c              3  ó@   "  € T F  qP                  4       x € K  	  R # 5ir&   ró  )r1   rß   s   & r"   r3   Ú-LSPService._shutdown_async.<locals>.<genexpr>  s   é € Ð=±W°Ÿz™zŸ|˜|³Wùr÷  rø  )rÂ   r‚   rq   r  rÁ   r5   r¼   r¨  Úclearr½   r¿   )r`   Úreaperr¤  s   &  r"   r˜  ÚLSPService._shutdown_async÷  sÆ   é € Ø×,Ñ,Ð,ˆFÒ9Ø%)ˆDÔ"Ø�M‰MŒOÜ—.’. ¸4Ô@×@Ð@Ø××ÓÜ˜4Ÿ=™=×/Ñ/Ó1Ó2ˆGØ�M‰M×ÑÔ!Ø�L‰L×ÑÔ Ø�O‰O×!Ñ!Ô#÷	 ô
 �nŠnÑ=±WÓ=ÐVÐQUÑV×VÒVñ Aß×úñ
 	Wùs7   ‚ADÁC?ÁDÁA2DÃ(DÃ8DÃ9DÄD	Ä	D)r®   r½   rµ   r¼   rÃ   r±   rÄ   rª   r¯   r·   r³   rÂ   r²   r°   r­   r¿   rZ   r»   r¾   rÁ   r¸   r¹   r«   r¬   r¶   r    r&   )1rA   r�   r�   r‘   r’   rÖ   ra   Úclassmethodrâ   rè   ró   r÷   rþ   r  r  r  r  r  r  r	  r  r=  rC  rN  rY  rI  rq  rn  r†  rH  r“  rŒ  r«  rG  rj  rx  r·  ÚstaticmethodrÊ  rÎ  r»  rÅ   rç  rí  r
  r	  r  r˜  r“   r    r$   r"   r•   r•   Š   s·  † Ùlð2Cà;?ð2Cð >Bð2Cð ?Cð	2Cð
 15ð2Cð 3ð2Cð 48ð2Cð '*ð2Cð !$ð2Cð "ð2Cð #'÷2Cðh ô&
ó ð&
õP8õ
Zõõ,õõ(DõZõuõõ3õõWõjõhõJð"-Ðfjð -Ø04ð-ØEG÷-õKð'Ø/3ð'ØPTð'à?C÷'õRõ(õ*õTõ	õ
÷*^ð
[Ø27ð[ØSW÷[õ<Zõ?"ðB ôó ðõõ07õOõ
Cõlõõ õ"÷0
Wñ 
Wr$   r•   ):r’   Ú
__future__r   rq   r%  Úloggingr6  r7   r\   r.  Útypingr   r   r   r   r   r   rX  r	   Úagent.lsp.clientr
   r   r   rw  Úagent.lsp.edit_checkr   Úagent.lsp.serversr   r   r   r   r   r   r   Úagent.lsp.workspacer   r   r   r   Ú	getLoggerrÒ   rÖ   r`  r×   rU  r0   rM   r5   rÔ   r]  r)   r:   rD   rG   rR   rT   r•   Ú__all__r    r$   r"   Ú<module>r6     sÍ   ðñ
õ #ã Û Û Û Û 	Û Û ß =× =å ß _Ñ _Ý +÷÷ ñ ÷ xÓ wà	×	Ò	Ð.Ó	/€àÐ ØÐ ØÐ àˆS�#ˆX…€Ø	ˆd�3˜�8�nÕ	€õõ7õõõG÷4%ñ 4%÷nw	Wñ w	Wðt ˆ.‚r$   