+
    lHàj×P  ã            
       óŠ  a € R' t"0 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtH	t	H
t
 ^ RIHtHt ]P                  ! ]4      tRRRRRR	R
RRR/tRR(RR)/t]! 0 R*m4      t]! RR04      tRR+RR,RR-/tR R ltR R ltR R ltR R ltR R ltR]R]R]R]R]/t] ^ k ]! 0 R.m4      t ! R R 4      tR! R" ltR# R$ lt R% R& lt!R# )/zÍSyntax-lint and LSP-diagnostics tier for ``tools.file_operations``.

``ShellFileOperations`` inherits ``LintMixin``; module constants and in-process
linters are pure functions importable from this module.
N)ÚCallableÚDictÚOptional)ÚExecuteResultÚ
LintResultz.pyz python -m py_compile {file} 2>&1z.jsznode --check {file} 2>&1ú.tsznpx tsc --noEmit {file} 2>&1ú.gozgo vet {file} 2>&1ú.rszrustfmt --check {file} 2>&1ÚnpxÚrustfmtÚgoc                ó<   € V ^8„  d   QhR\         R\         R\        /# )é   Úbase_cmdÚoutputÚreturn©ÚstrÚbool)Úformats   "Ú?/home/ubuntu/.hermes/hermes-agent/tools/file_operations_lint.pyÚ__annotate__r   ?   s!   € ÷ -ñ -¬#ð -´sð -¼tñ -ó    c                óÖ   a€ \         P                  V 4      pV'       g   R# VP                  4       o\        ;QJ d    V3R lV 4       F  '       g   K   R# 	  R# ! V3R lV 4       4      # )zgTrue iff ``output`` from ``base_cmd`` (first word of the linter cmd) says the tool itself couldn't run.Fc              3   ó,   <"  € T F	  qS9   x € K  	  R # 5i©N© )Ú.0ÚpÚlowers   & €r   Ú	<genexpr>Ú._looks_like_linter_unusable.<locals>.<genexpr>E   s   øé € Ð,¡8˜a�EŽz£8ùs   ƒT)Ú_LINTER_UNUSABLE_PATTERNSÚgetr   Úany)r   r   Úpatternsr   s   && @r   Ú_looks_like_linter_unusabler&   ?   sM   ø€ ä(×,Ñ,¨XÓ6€HßÙØ�L‰L‹N€Eß‹3Ô,¡8Ó,�3Œ3Ð,Š3Ð,ˆ3Ô,¡8Ó,Ó,Ð,r   c                óR   € V ^8„  d   QhR\         R\        \        \         3,          /# ©r   Úcontentr   ©r   Útupler   )r   s   "r   r   r   H   s#   € ÷ 1ñ 1œsð 1¤u¬T´3¨YÕ'7ñ 1r   c           	     ó.  €  \         P                  ! V 4       R#   \         P                   d7   pRRTP                   RTP                   RTP
                   R23u Rp?# Rp?i\         d'   pR\        T4      P                   RT 23u Rp?# Rp?ii ; i)	z:In-process JSON syntax check. Returns (ok, error_message).FzJSONDecodeError: ú (line ú	, column Ú)Nú: ©TÚ )	ÚjsonÚloadsÚJSONDecodeErrorÚmsgÚlinenoÚcolnoÚ	ExceptionÚtypeÚ__name__©r)   Úes   & r   Ú_lint_json_inprocr>   H   s‡   € ð1Ü�
Š
�7ÔØˆøÜ×Ñô VØÐ)¨!¯%©%¨°¸¿¹°zÀÈ1Ï7É7È)ÐSTÐUÐUÕUûÜô 1Øœ˜a›×)Ñ)Ð*¨"¨Q¨CÐ0Ð0Õ0ûð1ús2   ‚ šB¯+A ÁBÁ BÁ-BÁ.BÂ	BÂBc                óR   € V ^8„  d   QhR\         R\        \        \         3,          /# r(   r*   )r   s   "r   r   r   S   s#   € ÷ 1ñ 1œsð 1¤u¬T´3¨YÕ'7ñ 1r   c                ó  €  ^ RI Hp ^ RIHp  T! RR7      P                  T 4       F  pK  	  R
#   \         d    R	u # i ; i  T d   pRRT 23u Rp?# Rp?i\         d'   pR\        T4      P                   RT 23u Rp?# Rp?ii ; i)zëIn-process YAML syntax check; ``__SKIP__`` when ruamel.yaml is missing. Syntax-only
(``YAML.parse``), NOT ``safe_load``: loading rejects valid multi-doc streams and
app tags (``!Sub``, ``!vault``), and this is a fail-closed WRITE gate.)ÚYAML)Ú	YAMLErrorÚsafe)ÚtypFzYAMLError: Nr0   )TÚ__SKIP__r1   )	Úruamel.yamlrA   Úruamel.yaml.errorrB   ÚImportErrorÚparser9   r:   r;   )r)   rA   rB   Ú_eventr=   s   &    r   Ú_lint_yaml_inprocrK   S   s˜   € ð Ý$Ý/ð1Ù˜vÔ&×,Ñ,¨WÖ5ˆFÙñ 6àˆøô ô  ØÒð ûð ô (Ø˜ A 3Ð'Ð'Õ'ûÜô 1Øœ˜a›×)Ñ)Ð*¨"¨Q¨CÐ0Ð0Õ0ûð1úsC   ‚0 � A °A ¿A ÁB
Á
AÁB
ÁB
Á#B
Á$BÁ?B
ÂB
c                óR   € V ^8„  d   QhR\         R\        \        \         3,          /# r(   r*   )r   s   "r   r   r   f   s#   € ÷ 1ñ 1œsð 1¤u¬T´3¨YÕ'7ñ 1r   c                óœ   €  \         P                  ! V 4       R#   \         d'   pR\        T4      P                   RT 23u Rp?# Rp?ii ; i)z.In-process TOML syntax check (stdlib tomllib).Fr0   Nr1   )Útomllibr4   r9   r:   r;   r<   s   & r   Ú_lint_toml_inprocrO   f   sI   € ð1Ü�Š�gÔØˆøÜô 1Øœ˜a›×)Ñ)Ð*¨"¨Q¨CÐ0Ð0Õ0ûð1ús   ‚ šA¥AÁ AÁAc                óR   € V ^8„  d   QhR\         R\        \        \         3,          /# r(   r*   )r   s   "r   r   r   o   s#   € ÷ 1ñ 1¤ð 1¬¬t´S¨yÕ)9ñ 1r   c                ó”  €  \         P                  ! V P                  RR4      4       R
#   \         dd   pTP                  '       d   RTP                   RTP
                   R2MRpR\        T4      P                   RTP                   T 23u R	p?# R	p?i\         d'   pR\        T4      P                   RT 23u R	p?# R	p?ii ; i)z×In-process Python syntax check via ast.parse (py_compile's scope, no subprocess). Parses the
bytes, as py_compile does, so a legacy ``coding:`` cookie is honoured for a file the edit paths
read with surrogateescape.úutf-8Úsurrogateescaper2   r-   r.   r/   Fr0   Nr1   )
ÚastrI   ÚencodeÚSyntaxErrorr7   Úoffsetr:   r;   r6   r9   )r)   r=   Úlocs   &  r   Ú_lint_python_inprocrY   o   s­   € ð1Ü�	Š	�'—.‘. Ð*;Ó<Ô=ØˆøÜô :Ø:;¿(¿(¸(�˜Ÿ™�z ¨1¯8©8¨*°AÑ6ÈˆØœ˜a›×)Ñ)Ð*¨"¨Q¯U©U¨G°C°5Ð9Ð9Õ9ûÜô 1Øœ˜a›×)Ñ)Ð*¨"¨Q¨CÐ0Ð0Õ0ûð1ús3   ‚'* ªCµABÂCÂCÂ CÂ!CÂ<CÃCú.jsonú.yamlú.ymlú.tomlc                   óö   a € ] tR t^�t o RtRV 3R lR lltV 3R lR ltRV 3R lR lltV 3R	 lR
 ltV 3R lR lt	R t
V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltRRRRRR/V 3R lR lltRtV tR# )Ú	LintMixinz£Post-write syntax lint + LSP diagnostics. Requires ``_exec``,
``_has_command``, ``_escape_shell_arg``, ``_escape_native_tool_arg`` and
``env`` from the host class.Nc                ó<   <€ V ^8„  d   QhRS[ RS[S[ ,          RS[/# )r   Úpathr)   r   ©r   r   r   )r   Ú__classdict__s   "€r   r   ÚLintMixin.__annotate__’   s+   ø€ ÷ 1Wñ 1W¡ð 1W©h±s­mð 1WÁzñ 1Wr   c                ó˜  € \         P                  P                  V4      ^,          P                  4       p\        P                  V4      pVe”   VfS   V P                  RV P                  V4       R24      pVP                  ^ 8w  d   \        RRV R2R7      # VP                  pV! V4      w  rgVR8X  d   \        RRV R	2R7      # \        Yf'       d   R
R7      # TR7      # V\        9  d   \        RRV R2R7      # VR8X  d%   V P                  V4      '       d   \        RRR7      # V\        9   d)   V P                  V4      '       d   \        RRV R2R7      # V\        9   dJ   V P!                  4       '       d4   \        R\        V,          P#                  4       ^ ,           RV R2R7      # V\$        9   dQ   V P'                  4       '       d;   \$        V,          ^ ,          pV P)                  W14      p	V	f   \        RV R2R7      # M}\        V,          p
V
P#                  4       ^ ,          pV P+                  V4      '       g   \        RV R2R7      # V P                  V
P-                  RV P/                  V4      4      ^R7      p	V	P                  ^ 8w  dƒ   \1        W‰P                  4      '       dh   ^ RIHp V! V	P                  4      P7                  4       p\9        R VP;                  4        4       VR,          4      p\        RV RVR,           2R7      # \        V	P                  ^ 8H  V	P                  P7                  4       R7      # )z„Syntax-check ``path``: in-process linter when one matches the
extension (``content`` avoids a re-read), else the shell linter table.zcat z 2>/dev/nullTzFailed to read z	 for lint)ÚskippedÚmessagerE   zNo linter available for z (missing dependency)r2   ©Úsuccessr   zNo linter for z filesr   u±   Project tsconfig.json detected â€” per-file tsc skipped (single-file tsc can't resolve project aliases/globals; use the LSP tier or `tsc -p tsconfig.json` for real diagnostics).zLSP server handles u    â€” shell linter skippedzH skipped: untrusted workspace (add it to lsp.trusted_workspaces to lint z here)z2 not available (Hermes-managed Node not installed)z not availablez{file}©Útimeout)Ú
strip_ansic              3   óp   "  € T F,  qP                  4       '       g   K  VP                  4       x € K.  	  R # 5ir   )Ústrip)r   Úlns   & r   r    Ú(LintMixin._check_lint.<locals>.<genexpr>Á   s"   é € ÐWÑ4H¨bÏHÉHÏJœz˜rŸx™xŸz˜zÓ4Hùs   ‚6ž6:Néx   Nz not usable: :NéÈ   N)Úosra   Úsplitextr   ÚLINTERS_INPROCr#   Ú_execÚ_escape_shell_argÚ	exit_coder   ÚstdoutÚLINTERSÚ_has_ancestor_tsconfigÚ_SHELL_LINTER_LSP_REDUNDANTÚ_lsp_will_handleÚ$_SHELL_LINTER_RUNS_PROJECT_TOOLCHAINÚ_local_workspace_untrustedÚsplitÚ_MANAGED_NODE_LINTERSÚ_lsp_local_onlyÚ_run_managed_node_linterÚ_has_commandÚreplaceÚ_escape_native_tool_argr&   Útools.ansi_striprl   rn   ÚnextÚ
splitlines)Úselfra   r)   ÚextÚinprocÚread_resultÚokÚerrr   ÚresultÚ
linter_cmdrl   ÚcleanedÚ
first_lines   &&&           r   Ú_check_lintÚLintMixin._check_lint’   s  € ô �g‰g×Ñ˜tÓ$ QÕ'×-Ñ-Ó/ˆÜ×#Ñ# CÓ(ˆØÒØŠØ"Ÿj™j¨4°×0FÑ0FÀtÓ0LÐ/MÈ\Ð)ZÓ[�Ø×(Ñ(¨AÔ-Ü%¨d¸oÈdÈVÐS\Ð<]Ô^Ð^Ø%×,Ñ,�Ù˜W“o‰GˆBØ�jÔ Ü!¨$Ð:RÐSVÐRWÐWlÐ8mÔnÐnÜ b¶r°ÔCÐC¸sÔCÐCØ”gÔÜ d°nÀSÀEÈÐ4PÔQÐQð �%Œ<˜D×7Ñ7¸×=Ò=Ü dð ôð ð Ô-Ô-°$×2GÑ2GÈ×2MÒ2MÜ dÐ6IÈ#ÈÐNgÐ4hÔiÐiØÔ6Ô6¸4×;ZÑ;Z×;\Ò;\Ü dÜ˜3•<×%Ñ%Ó'¨Õ*Ð+Ð+sÐtwÐsxÐx~ÐôBð BàÔ'Ô'¨D×,@Ñ,@×,BÒ,BÜ,¨SÕ1°!Õ4ˆHØ×2Ñ2°3Ó=ˆFØŠ~Ü!¨$¸8¸*ÐDvÐ8wÔxÐxð ô ! �ˆJØ!×'Ñ'Ó)¨!Õ,ˆHØ×$Ñ$ X×.Ò.Ü!¨$¸8¸*ÀNÐ8SÔTÐTà—Z‘Z 
× 2Ñ 2°8¸T×=YÑ=YÐZ^Ó=_Ó `Ðjl�ZÓmˆFØ×Ñ˜qÔ Ô%@ÀÏ=É=×%YÒ%YÝ3Ù  §¡Ó/×5Ñ5Ó7ˆGäÑW°G×4FÑ4FÔ4HÓWÐY`ÐaeÕYfÓgˆJÜ d°x°jÀÈjÐY]ÕN^ÐM_Ð4`ÔaÐaÜ &×"2Ñ"2°aÑ"7ÀÇÁ×@SÑ@SÓ@UÔVÐVr   c                ó<   <€ V ^8„  d   QhRS[ RS[ RS[S[,          /# )r   r‹   ra   r   )r   r   r   )r   rc   s   "€r   r   rd   Å   s,   ø€ ÷ Rñ R©Cð R±sð R¹xÉÕ?Vñ Rr   c                óš  € ^ RI p^ RIp^ RIHp ^ RIHp ^ RIHpHpH	p	 \        V,          vr«VP                  W¦! RR/4      R,          R7      pVf   R# \        V P                  RR4      ;'       g    V P                  pV'       d   V! V4      T;'       d	    V! V4      rÒ TP                  V.VOVNT;'       g    RV! V	! 4       4      VP                   VP"                  VP$                  R	R
R^V! 4       RR7      p\)        TP*                  ;'       g    RTP,                  R7      #   TP&                   d    \)        T
 R2^|R7      u # i ; i)zORun the ``ext`` Node linter on the host under PM's Node; None when PM has none.N)Úwindows_hide_flags)Úwith_hermes_node_path)Ú_IS_WINDOWSÚ_msys_to_windows_pathÚhermes_subprocess_envÚPATHr2   )ra   ÚcwdTrR   r…   F)rž   ÚenvÚstdinry   ÚstderrÚtextÚencodingÚerrorsrk   ÚcreationflagsÚcheckz timed out after 30s)ry   rx   )ÚshutilÚ
subprocessÚhermes_cli._subprocess_compatr˜   Úhermes_constantsr™   Útools.environments.localrš   r›   rœ   r�   ÚwhichÚgetattrrŸ   rž   ÚrunÚDEVNULLÚPIPEÚSTDOUTÚTimeoutExpiredr   ry   Ú
returncode)rŠ   r‹   ra   r§   r¨   r˜   r™   rš   r›   rœ   ÚtoolÚargsÚ
executablerž   Úprocs   &&&            r   rƒ   Ú"LintMixin._run_managed_node_linterÅ   s<  € ãÛåDÝ:ßfÑfä+¨CÕ0ˆˆØ—\‘\ $Ð-BÀFÈBÀ<Ó-PÐQWÕ-X�\ÓYˆ
ØÒÙÜ�d—h‘h  tÓ,×8Ð8°·±ˆßÙ-¨dÓ3°S×5WÐ5WÑ=RÐSVÓ=W�#ð	VØ—>‘>ØÐ)˜dÐ) DÐ)¨s¯{¨{°dÑ@UÑVkÓVmÓ@nØ ×(Ñ(°·±È×IZÑIZØ G°IÀrÑYkÓYmÐuzð "ó |ˆDô  D§K¡K×$5Ð$5°2ÀÇÁÔQÐQøð ×(Ñ(ô 	VÜ ¨4¨&Ð0DÐ(EÐQTÔUÒUð	Vús   Â!D& Â;A D& Ä&!E
Å	E
c                óR   <€ V ^8„  d   QhRS[ RS[S[ ,          RS[S[ ,          RS[/# )r   ra   Úpre_contentÚpost_contentr   rb   )r   rc   s   "€r   r   rd   Þ   s3   ø€ ÷ ñ ¡cð ¹Á½ð Ù(0±­ðÙAKñr   c                óò  € V P                  WR7      pVP                  '       g   VP                  '       g   Vf   V# V P                  WR7      pVP                  '       g%   VP                  '       g   VP                  '       g   V# VP                  P	                  4        Uu0 uF*  qfP                  4       '       g   K  VP                  4       kK,  	  ppVP                  P	                  4        Uu. uF3  qfP                  4       '       g   K  VP                  4       V9  g   K1  VNK5  	  ppV'       g   \        RVP                  RR7      # \        RRRP                  V4      ,           R7      # u upi u upi )uÝ   Post-write lint; when it fails and ``pre_content`` is known, report only
errors this edit introduced (pre-existing lines filtered out). Semantic
(LSP) diagnostics are a separate channel â€” see ``_maybe_lsp_diagnostics``.)r)   Fu^   Pre-existing lint errors â€” this edit didn't introduce new ones but the file is still broken.)ri   r   rg   zLNew lint errors introduced by this edit (pre-existing errors filtered out):
Ú
rh   )r”   ri   rf   r   r‰   rn   r   Újoin)	rŠ   ra   rº   r»   ÚpostÚprero   Ú	pre_linesÚ
post_liness	   &&&&     r   Ú_check_lint_deltaÚLintMixin._check_lint_deltaÞ   s  € ð
 ×Ñ ÐÓ;ˆØ�<�<ˆ<˜4Ÿ<Ÿ<˜<¨;Ò+>ØˆKØ×Ñ˜tÐÓ9ˆØ�;�;ˆ;˜#Ÿ+Ÿ+˜+¨S¯Z¯Z¨ZØˆKð +.¯*©*×*?Ñ*?Ô*AÓPÑ*A BÇXÁXÇZ”Z�R—X‘X–ZÑ*Aˆ	ÐPØ#'§;¡;×#9Ñ#9Ô#;ÓjÑ#;˜R¿x¹x¿z”bÈbÏhÉhËjÐ`iÑNi—b�bÑ#;ˆ
ÐjßÜ e°D·K±KØpôsð sä %ð4Ø6:·i±iÀ
Ó6KõLôð 	ùò QùÚjs   Â#E/Â?E/Ã1E4ÄE4Ä$E4c                ó    <€ V ^8„  d   QhRS[ /# ©r   r   ©r   )r   rc   s   "€r   r   rd   õ   s   ø€ ÷ 
1ñ 
1¡ñ 
1r   c                óp   € \        V RR4      pVf   R#  ^ RIHp \	        Y4      #   \         d     R# i ; i)z}True iff wired to a local backend. LSP servers run on the host and
can't see files inside Docker/Modal/SSH/Daytona sandboxes.rŸ   NF)ÚLocalEnvironment)r­   r«   rÉ   r9   Ú
isinstance)rŠ   rŸ   rÉ   s   &  r   r‚   ÚLintMixin._lsp_local_onlyõ   sC   € ô �d˜E 4Ó(ˆØŠ;Ùð	ÝAô ˜#Ó0Ð0øô ô 	Úð	ús   •& ¦5´5c                ó    <€ V ^8„  d   QhRS[ /# rÆ   rÇ   )r   rc   s   "€r   r   rd     s   ø€ ÷ yñ y©Dñ yr   c                ó\  € V P                  4       '       g   R# ^ RIHp ^ RIHpHp ^ RIHp V! 4       P                  R4      pT! \        V\        4      '       d   VP                  R4      MR4      pT! \        V P                  RR4      ;'       g    V P                  Wc! 4       4      '       * # )	a  True iff on a local backend the linter's cwd lies outside every trusted workspace
(``workspace.is_trusted_workspace``): ``npx`` and rustup resolve the toolchain from there, not
from the linted file's directory.  Sandboxed backends answer False: their toolchain is not the host's.F)Úparse_trusted_workspaces)Úis_trusted_workspaceÚoperator_workspace_roots)Úload_config_readonlyÚlspÚtrusted_workspacesNrž   )r‚   Úagent.lsp.managerrÎ   Úagent.lsp.workspacerÏ   rÐ   Úhermes_cli.configrÑ   r#   rÊ   Údictr­   rŸ   rž   )rŠ   rÎ   rÏ   rÐ   rÑ   Úlsp_cfgÚtrusteds   &      r   r   Ú$LintMixin._local_workspace_untrusted  sˆ   € ð ×#Ñ#×%Ò%ÙÝ>ßVÝ:Ù&Ó(×,Ñ,¨UÓ3ˆÙ*ÔPZÐ[bÔdh×PiÒPi¨7¯;©;Ð7KÔ+LÐosÓtˆÙ'¬°·±¸%ÀÓ(F×(RÐ(RÈ$Ï(É(ÐT[Ð]uÓ]wÓxÔxÐxr   c                ór   € V P                  4       '       g   R#  ^ RIHp V! 4       #   \         d     R# i ; i)z}The active LSPService, or None on a non-local backend / any failure.
LSP is an enrichment layer and must never break a write.N)Úget_service)r‚   Ú	agent.lsprÜ   r9   )rŠ   rÜ   s   & r   Ú_lsp_serviceÚLintMixin._lsp_service  s8   € ð ×#Ñ#×%Ò%Ùð	Ý-Ù“=Ð øÜô 	Úð	ús   š' §6µ6c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   r‹   r   r   )r   rc   s   "€r   r   rd     s   ø€ ÷ Eñ E©#ð E±$ñ Er   c                ó  a€ S'       g   R#  V P                  4       pVe   VP                  S4      # ^ RIHp \
        ;QJ d    T3R lT 4       F  '       g   K   R# 	  R# ! T3R lT 4       4      #   \         d     R# i ; i)zÀTrue iff the active service (config-declared servers included) or, without one,
the static registry claims ``ext``. Decides whether pre-write content is worth
capturing for the line-shift map.F)ÚSERVERSc              3   ó^   <"  € T F"  pSP                  4       VP                  9   x € K$  	  R # 5ir   )r   Ú
extensions)r   Úsrvr‹   s   & €r   r    Ú3LintMixin._lsp_handles_extension.<locals>.<genexpr>&  s    øé € ÐD¹G°S�3—9‘9“; #§.¡.Ö0»Gùs   ƒ*-T)rÞ   Úhandles_extensionÚagent.lsp.serversrâ   r9   r$   )rŠ   r‹   Úsvcrâ   s   &f  r   Ú_lsp_handles_extensionÚ LintMixin._lsp_handles_extension  sv   ø€ ÷ Ùð	Ø×#Ñ#Ó%ˆCØŠØ×,Ñ,¨SÓ1Ð1Ý1÷ ‹sÔD¹GÓD�sŒsÐDŠsÐDˆsÔD¹GÓDÓDÐDøô ô 	Úð	ús   �$A2 ²A2 Á2BÂ Bc                ó&   <€ V ^8„  d   QhRS[ RS[/# ©r   ra   r   r   )r   rc   s   "€r   r   rd   (  s   ø€ ÷ ñ ©3ð ±4ñ r   c                ó°  € V P                  4       '       g   R#  \        P                  P                  \        P                  P	                  V4      4      p\        P                  P                  \        P                  P                  VR4      4      '       g,   \        P                  P                  V4      pW28X  d   R# TpKn  R#   \         d     R# i ; i)uë   True iff a tsconfig.json exists in ``path``'s directory or any ancestor.
Host-side walk, local backend only: on a remote backend this answers False so
the shell linter still runs â€” never suppress lint on a probe that couldn't answer.Fztsconfig.jsonT)r‚   rs   ra   ÚdirnameÚabspathÚisfiler¾   r9   )rŠ   ra   ÚdÚparents   &&  r   r{   Ú LintMixin._has_ancestor_tsconfig(  s�   € ð ×#Ñ#×%Ò%Ùð		Ü—‘—‘¤§¡§¡°Ó 5Ó6ˆAÜ—g‘g—n‘n¤R§W¡W§\¡\°!°_Ó%E×FÒFÜŸ™Ÿ™¨Ó+�Ø”;Ù Ø’ÙøÜô 	Úð	ús   šA>C Â%C Ã C ÃCÃCc                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r   Úmethodra   ©r   )r   rc   s   "€r   r   rd   9  s   ø€ ÷ 	ñ 	¡ð 	©3ñ 	r   c                óx   € V P                  4       pVf   V#  \        WA4      ! V4      #   \         d    Tu # i ; i)z�``svc.<method>(path)`` on the active service; ``default`` when there is
no service or the call raises (LSP never breaks a write).)rÞ   r­   r9   )rŠ   rö   ra   Údefaultré   s   &&&& r   Ú	_lsp_callÚLintMixin._lsp_call9  sE   € ð ×ÑÓ!ˆØŠ;ØˆNð	Ü˜3Ô'¨Ó-Ð-øÜô 	ØŠNð	ús   ˜) ©9¸9c                ó&   <€ V ^8„  d   QhRS[ RS[/# rí   r   )r   rc   s   "€r   r   rd   D  s   ø€ ÷ @ñ @¡Sð @©Tñ @r   c                ó:   € \        V P                  RVR4      4      # )u¹   True iff the LSP service is active AND ``enabled_for(path)`` (workspace
detection, disabled-server set, broken-pair short-circuit). Any failure â†’
False so the shell linter still runs.Úenabled_forF)r   rú   )rŠ   ra   s   &&r   r}   ÚLintMixin._lsp_will_handleD  s   € ô �D—N‘N =°$¸Ó>Ó?Ð?r   rº   r»   Ústartedc          
      óh   <€ V ^8„  d   QhRS[ RS[S[ ,          RS[S[ ,          RS[S[,          RS[ /# )r   ra   rº   r»   r   r   )r   r   Úfloat)r   rc   s   "€r   r   rd   J  sG   ø€ ÷ -iñ -i©3ð -iÁÉÅð -iÙ-5±c­]ð-iÙLTÑUZÍOð-iÙgjñ-ir   c               ó�  aaaa€ V P                  4       pVe   V P                  V4      '       g   R#  ^ RIHp ^ RIHp \        P                  P                  V4      oVP                  4       oVP                  SS4      pVe   V3MRoVP                  WVSSR7      p	T	f   TP                  SSS4       R# ^ RIp
 T	P                  T! T4      R7      pTP,                  '       d   R# TP.                  f    TP                  SSTP0                  4       R# \3        YP.                  R4      #   \         d     R# i ; i  T
P                   P"                   d6    S'       d*   TP%                  S4      oT	P'                  TTTT3R l4        R# \         d0    \(        P+                  RTR	R
7       TP                  SSS4        R# i ; i)a½  Formatted LSP diagnostics this edit introduced, or "" when LSP is unavailable/disabled/clean
OR the verdict is not ready yet.  Never blocks the write on the language server: the check
(``agent.lsp.edit_check``) diagnoses ``post_content`` (the bytes this write produced) against
``pre_content`` (None = new file) on the LSP loop: those snapshots, not a later read of the
file, which another session may already have rewritten.  The write waits for the verdict only until ``inline_deadline(started)`` (what is
left of the write's latency budget; ``started`` = ``time.monotonic()`` at write entry); a slower
verdict reaches the model with a later tool result of the same session (``agent.lsp.deferred``).Nr2   ©Údeferred)Úinline_wait)Úpre_textÚ	post_textÚownerÚcarryrj   c                 ó"   <€ \        SSV SS4      # r   )Ú_post_deferred)ÚfÚabs_pathr
  r	  Útokens   &€€€€r   Ú<lambda>Ú2LintMixin._maybe_lsp_diagnostics.<locals>.<lambda>l  s   ø€ ´>À%ÈÐSTÐV[Ð]bÔ3cr   zLSP edit check failed for %sT©Úexc_infoz)LSP diagnostics introduced by this edit:
r   )rÞ   r}   rÝ   r  Úagent.lsp.edit_checkr  rs   ra   rð   Úcurrent_ownerÚtakeÚstart_edit_checkr9   ÚrestoreÚconcurrent.futuresr�   ÚfuturesÚTimeoutErrorÚtrack_pendingÚadd_done_callbackÚloggerÚdebugÚ
supersededÚdiagnosticsr
  Ú_format_lsp_block)rŠ   ra   rº   r»   r   ré   r  r  ÚolderÚfutureÚ
concurrentr�   r  r
  r	  r  s   &&$$$       @@@@r   Ú_maybe_lsp_diagnosticsÚ LintMixin._maybe_lsp_diagnosticsJ  sž  û€ ð ×ÑÓ!ˆØŠ;˜d×3Ñ3°D×9Ò9Ùð	Ý*Ý8Ü—w‘w—‘ tÓ,ˆHØ×*Ñ*Ó,ˆEð —M‘M %¨Ó2ˆEØ %Ò 1�U‘H°rˆEØ×)Ñ)¨$ÐP\ÐdiØ05ð *ó 7ˆFð Š>Ø×Ñ˜U H¨eÔ4ÙÛ!ð
	Ø—]‘]©;°wÓ+?�]Ó@ˆFð ××ÐÙØ×ÑÒ%Ø×Ñ˜U H¨f¯l©lÔ;ÙÜ  ×'9Ñ'9Ð;gÓhÐhøô- ô 	Úð	ûð ×!Ñ!×.Ñ.ô 	ßØ ×.Ñ.¨uÓ5�Ø×(Ñ(×)cÔdÚÜô 	Ü�L‰LÐ7¸ÈˆLÔMØ×Ñ˜U H¨eÔ4Úð	ús6   ³A+D+ Â<D= Ä+D:Ä9D:Ä="GÅ )GÆGÆ,GÇGr   r   )r;   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r”   rƒ   rÃ   r‚   r   rÞ   rê   r{   rú   r}   r&  Ú__static_attributes__Ú__classdictcell__)rc   s   @r   r_   r_   �   s¡   ø‡ € ñ$÷1Wò 1W÷fRð R÷2ò ÷.
1ð 
1÷yð yò	÷Eð E÷ð ÷"	ð 	÷@ð @ð-iÐPTð -iØ=Að-iØ^b÷-i÷ -ið -ir   r_   c                ó<   € V ^8„  d   QhR\         R\         R\         /# )r   ra   Úheaderr   r÷   )r   s   "r   r   r   z  s!   € ÷ 	ñ 	œCð 	´cð 	¼cñ 	r   c                 ó¼   € V'       g   R #  ^ RI HpHp V! W4      pV'       d   V! W%,           4      # R #   \         d    \        P                  RT RR7        R # i ; i)r2   )Úreport_for_fileÚtruncatez(formatting LSP diagnostics for %s failedTr  )Úagent.lsp.reporterr1  r2  r9   r  r  )ra   r!  r/  r1  r2  Úblocks   &&&   r   r"  r"  z  sT   € ßÙðß@Ù Ó2ˆß+0‰x˜�Ó'Ð8°bÐ8øÜô Ü�‰Ð?ÀÐPTˆÔUÚðús   Œ%4 ²4 ´#AÁAc                ó4   € V ^8„  d   QhR\         R\         RR/# ©r   r	  r  r   Nr÷   )r   s   "r   r   r   †  s!   € ÷ 'ñ 'œ#ð '¬ð 'Àtñ 'r   c                óz   € ^ RI Hp  \        WW#4       VP                  W4       R#   TP                  Y4       i ; i)zªDone-callback (LSP loop thread): queue a late verdict for the session that made the edit, then
release a turn end waiting on it (``agent.lsp.deferred.settle_for_agent``).r  N)rÝ   r  Ú_queue_late_verdictÚsettled)r	  r  r$  r
  r  r  s   &&&&& r   r  r  †  s3   € õ #ð'Ü˜E¨VÔ;à×Ñ˜Ö&øˆ×Ñ˜Õ&ús   ˆ' §:c                ó4   € V ^8„  d   QhR\         R\         RR/# r6  r÷   )r   s   "r   r   r   �  s&   € ÷ Cñ Cœsð C¬cð CÀTñ Cr   c                ó  € ^ RI Hp  VP                  4       '       d   RMVP                  4       pTf   TP                  YT4       R# TP                  '       d   R# TP                  f   TP                  YTP                  4       R# \        YP                  RT R24      pT'       d   TP                  YYeP                  4       R# R#   \         d/    \
        P                  RTRR7       TP                  YT4        R# i ; i)z¿A superseded check posts nothing: the newer check owns its verdict AND the notes it carried.
No verdict hands back only what the check still holds (``result.carry``), never the caller's copy.r  Nz%deferred LSP edit check failed for %sTr  z3LSP diagnostics introduced by your earlier edit of zA (the language server answered after that tool result returned):
)rÝ   r  Ú	cancelledr�   r9   r  r  r  r   r!  r
  r"  r¿   Úbaseline_text)r	  r  r$  r
  r  r�   r¢   s   &&&&   r   r8  r8  �  sð   € õ #ðØ×)Ñ)×+Ò+‘°·±³ˆð
 ‚~Ø×Ñ˜¨%Ô0ÙØ××ÐÙØ×ÑÒ!Ø×Ñ˜¨&¯,©,Ô7ÙÜ˜X×'9Ñ'9Ø
=¸h¸Zð HLð 	LóN€D÷ Ø�‰�e t×-AÑ-AÖBñ øô ô Ü�‰Ð<¸hÐQUˆÔVØ×Ñ˜¨%Ô0Úðús   ˆC
 žC
 Ã
5DÄDc                ó¨   € V ^8„  d   Qh/ ^ \         9   d>   \        \        \        \        .\        \
        \        3,          3,          3,          ;R&   # )r   ru   )Ú__conditional_annotations__r×   r   r   r+   r   )r   s   "r   r   r      sC   € ÷ ñ ÷|ò ””Sœ(¤C 5¬%´´c°	Õ*:Ð#:Õ;Ð;Õ<ñ ò}r   )Únodez--check)r
   Útscz--noEmit>   r   r	   r   )z/this is not the tsc command you are looking forz%could not determine executable to runznot found in npm registry)zno input filename givenzerror: not a workspace)zcannot find packagezgo: cannot find main module>   r\   rZ   r]   r[   )#r?  r+  rT   r3   Úloggingrs   rN   Útypingr   r   r   Útools.file_operations_commonr   r   Ú	getLoggerr;   r  rz   r�   Ú	frozensetr|   r~   r"   r&   r>   rK   rO   rY   ru   Ú_FAIL_CLOSED_INPROC_EXTSr_   r"  r  r8  r   )r?  s   @r   Ú<module>rH     s'  øðöó Û Û Û 	Û ß +Ñ +ç Bà	×	Ò	˜8Ó	$€ð
 
Ð-Ø	Ð%Ø	Ð)Ø	ÐØ	Ð(ð€ð Ð 3°UÐ<VÐWÐ ñ (Ò(=Ó>Ð ñ
 (1°%¸°Ó'@Ð $ð
 
ð ð
 ð ð 	ð ðÐ õ"-õ1õ1õ&1õ1ð" 
ÐØÐØÐØ
ÐØÐð@€ó ñ %Ò%HÓIÐ ÷jiñ jiõZ	õ'÷Cr   