+
    lHàjQA  ã                   óæ  a € R0 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	 ^ RI
Ht ]P                  ! ]4      t]! 0 R1m4      t]! 0 R2m4      tR3tRt/ t] ^ k R R ltR4R R lltR4R	 R
 lltR4R R lltR R ltR R ltR R ltR4R R lltR4R R l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$R4R%R/R& R' lllt%R4R( R) llt&R4R* R+ llt'R4R, R- llt(R4R. R/ llt)R# )5a¦  Path resolution for the file tools: task-aware base dir, ``~`` expansion, workspace-divergence warning.

Core invariant: the base directory anchoring relative paths is ALWAYS absolute
and derived from the task's terminal cwd, never from the process cwd unless no
other anchor exists (a relative/sentinel ``TERMINAL_CWD`` would silently anchor
edits to the agent process cwd, e.g. the main repo during a worktree session).
N)ÚPathÚPurePosixPath)Úsplit_entryg      >@c                ó0   € V ^8„  d   QhR\         R\         /# ©é   ÚpathÚreturn©Ústr)Úformats   "Ú;/home/ubuntu/.hermes/hermes-agent/tools/file_tools_paths.pyÚ__annotate__r       s   € ÷ $ñ $œð $¤ñ $ó    c                óN  € V '       d   RV 9  d   V #  ^ RI Hp V! 4       pV'       dN   V R8X  g   V P                  R4      '       d0   V R8X  d   V# \        P
                  P                  W R,          4      # \        P
                  P                  V 4      #   \         d    Rp Lƒi ; i)a_  Expand ``~`` using the effective profile home (``get_subprocess_home``) so
gateway/cron runs, whose process HOME may differ, agree with interactive CLI sessions.

This mirrors ``hermes_constants.get_subprocess_home()`` so that ``~`` resolves consistently regardless
of whether the tool runs interactively or inside a gateway-driven cron job (#48552).
Ú~)Úget_subprocess_homeNú~/:r   NN)Úhermes_constantsr   Ú	ExceptionÚ
startswithÚosr   ÚjoinÚ
expanduser)r   r   Úhomes   &  r   Ú_expand_tilder       sˆ   € ÷ �3˜d”?ØˆðÝ8á"Ó$ˆ÷ �˜” §¡°× 5Ò 5Ø˜s”{ˆtÐD¬¯©¯©°TÀ½8Ó(DÐDÜ�7‰7×Ñ˜dÓ#Ð#øô	 ô ØŠðús   “B ÂB$Â#B$c                ó0   € V ^8„  d   QhR\         R\         /# ©r   Útask_idr	   r
   )r   s   "r   r   r   4   s   € ÷ Añ A¬ð A¼Sñ Ar   c                ó4  a	€  ^ RI HpHpHpHp  V! V 4      pT;_uu_ 4        VP                  V4      ;'       g    VP                  V 4      pRRR4       Xe~   VP                  P                  P                  4       o	\        V	3R l\         4       R4      p\        VRR4      pV'       g   \        V\        4      '       d   V'       d   T;'       g    T# \        V! 4       P                  R4      ;'       g!    \        P                   ! R4      ;'       g    R4      P                  4       #   \
         d    T p EL#i ; i  + '       g   i     Lú; i  \
         d;    \        \        P                   ! R4      ;'       g    R4      P                  4       u # i ; i)z@Best-effort terminal backend type for path-resolution decisions.)Ú_active_environmentsÚ	_env_lockÚ_get_env_configÚ_resolve_container_task_idNc              3   ó8   <"  € T F  qS9   g   K  Vx € K  	  R # 5i)N© )Ú.0ÚhÚnames   & €r   Ú	<genexpr>Ú._terminal_env_type_for_task.<locals>.<genexpr>B   s   øé € ÐGÑ$9˜qÀ$¹YŸšÓ$9ùs   ƒ�
Ú_hermes_backend_nameÚenv_typeÚTERMINAL_ENVÚlocal)Útools.terminal_toolr    r!   r"   r#   r   ÚgetÚ	__class__Ú__name__ÚlowerÚnextÚ_ENV_CLASS_NAME_HINTSÚgetattrÚ
isinstancer   r   Úgetenv)
r   r    r!   r"   r#   Úcontainer_keyÚenvÚhintÚstampedr(   s
   &        @r   Ú_terminal_env_type_for_taskr=   4   s@  ø€ ðA÷	Zó 	Zð	$Ù6°wÓ?ˆM÷ ŠYØ&×*Ñ*¨=Ó9×^Ð^Ð=Q×=UÑ=UÐV]Ó=^ˆC÷ àŠ?Ø—=‘=×)Ñ)×/Ñ/Ó1ˆDÜÔGÕ$9ÓGÈÓNˆDÜ˜cÐ#9¸4Ó@ˆGßœ
 7¬C×0Ò0·WØ—�˜wÐ&Ü‘?Ó$×(Ñ(¨Ó4×\Ð\¼¿	º	À.Ó8Q×\Ð\ÐU\Ó]×cÑcÓeÐeøô ô 	$Ø#‹Mð	$úç�Yûô ô AÜ”2—9’9˜^Ó,×7Ð7°Ó8×>Ñ>Ó@Ò@ðAúso   ƒE �D+ ˜
E ¢+D?ÁA<E Ã
E ÃE Ã!E Ã8E ÄE Ä+D<Ä8E Ä;D<Ä<E Ä?E	Å
E Å,FÅ?FÆFc                ó0   € V ^8„  d   QhR\         R\        /# r   ©r   Úbool)r   s   "r   r   r   K   s   € ÷ =ñ =¤3ð =´tñ =r   c                 ój   € \        V 4      p ^ RIHp V! V4      #   \         d    T\        9   u # i ; i)é    )Ú_is_container_backend)r=   r/   rC   r   Ú!_CONTAINER_PATH_BACKENDS_FALLBACK)r   r,   rC   s   &  r   Ú_uses_container_pathsrE   K   s:   € Ü*¨7Ó3€Hð=Ý=á$ XÓ.Ð.øÜô =ØÔ<Ñ<Ò<ð=ús   � ›2±2c                ó>   € V ^8„  d   QhR\         R\         R,          /# ©r   r   r	   Nr
   )r   s   "r   r   r   U   s"   € ÷ \ñ \¬ð \¼CÀ$½Jñ \r   c                ó>   € \        V 4      '       d   \        V 4      # R# )zMThe task's backend name when its file paths belong to a container, else None.N)rE   r=   )r   s   &r   Úcontainer_backend_for_taskrI   U   s   € ä3HÈ×3QÒ3QÔ& wÓ/Ð[ÐW[Ð[r   c                ó\   € V ^8„  d   QhR\         \        ,          \        ,          R\        /# r   ©r   r   r   )r   s   "r   r   r   Z   s#   € ÷ 8ñ 8¬¬d­
´]Õ(Bð 8Ä}ñ 8r   c                óR   € \        \        P                  ! \        V 4      4      4      # )z§Normalize path syntax without following host symlinks: container paths are
meaningful inside the sandbox, and a host-side ``/workspace`` symlink must not rewrite them.)r   Ú	posixpathÚnormpathr   )r   s   &r   Ú_normalize_without_host_derefrO   Z   s   € ô œ×+Ò+¬C°«IÓ6Ó7Ð7r   c                óL   € V ^8„  d   QhR\         R,          R\         R,          /# )r   ÚrawNr	   r
   )r   s   "r   r   r   `   s"   € ÷ 9ñ 9¤ d¥
ð 9¬s°T­zñ 9r   c                óæ   € \        T ;'       g    R4      P                  4       p V P                  4       \        9   d   R# \	        V 4      p\
        P                  P                  V4      '       d   V# R# )zšReturn *raw* expanded when it is a non-sentinel ABSOLUTE anchor, else ``None``
(a relative anchor is exactly the ambiguity that misroutes worktree edits).Ú N)r   Ústripr3   Ú_TERMINAL_CWD_SENTINELSr   r   r   Úisabs)rQ   Úexpandeds   & r   Ú_sentinel_free_abs_cwdrX   `   sU   € ô ˆc�iˆi�R‹.×
Ñ
Ó
 €CØ
‡y�yƒ{Ô-Ô-ÙÜ˜SÓ!€HÜ—w‘w—}‘} X×.Ò.ˆ8Ð8°DÐ8r   c                ó2   € V ^8„  d   QhR\         R,          /# )r   r	   Nr
   )r   s   "r   r   r   j   s   € ÷ @ñ @¤#¨¥*ñ @r   c                 óB   € ^ RI Hp  \        V ! 4       ;'       g    R4      # )z±Return ``$TERMINAL_CWD`` only when it names a real (absolute, non-sentinel) anchor.
Scope-aware: under gateway multiplexing the routed profile's cwd lives in the per-turn scope.©Úscope_terminal_cwdN)Úagent.runtime_cwdr\   rX   r[   s    r   Ú_configured_terminal_cwdr^   j   s   € õ 5ä!Ñ"4Ó"6×">Ð">¸$Ó?Ð?r   c                ó>   € V ^8„  d   QhR\         R\         R,          /# rG   r
   )r   s   "r   r   r   s   s   € ÷ 8ñ 8¬3ð 8¼sÀT½zñ 8r   c                óx   €  ^ RI Hp V! V 4      p\        TP	                  R4      4      #   \         d     R# i ; i)zÑReturn a registered cwd override keyed by the RAW task id, when available.

``terminal_tool`` collapses CWD-only overrides to the shared ``"default"``
env, but the cwd value stays keyed by the raw session id.
)Úresolve_task_overridesNÚcwd)r/   ra   r   rX   r0   )r   ra   Ú	overridess   &  r   Ú_registered_task_cwd_overriderd   s   s>   € ðÝ>á*¨7Ó3ˆ	ô " )§-¡-°Ó"6Ó7Ð7øô ô Úðús   ‚* ª9¸9c                ó>   € V ^8„  d   QhR\         R\         R,          /# rG   r
   )r   s   "r   r   r   ƒ   s"   € ÷ \ñ \¬3ð \¼sÀT½zñ \r   c                ó”   €  ^ RI Hp V! V 4      pT;'       g    \        V 4      ;'       g    \	        4       #   \         d    Rp L6i ; i)a&  Best-effort absolute workspace root, or ``None`` when no reliable anchor exists.

Order: (1) the session's own cwd record (per-session, so one session's
``cd`` never leaks into another); (2) a registered raw-keyed cwd override
(TUI/Desktop/ACP); (3) a sentinel-free absolute ``$TERMINAL_CWD``.
)Úget_session_cwdN)r/   rg   r   rd   r^   )r   rg   Úrecordeds   &  r   Ú_authoritative_workspace_rootri   ƒ   sL   € ðÝ7á" 7Ó+ˆð ×[Ð[Ô4°WÓ=×[Ð[ÔAYÓA[Ð[øô ô ØŠðús   ‚7 ·AÁAc                ó<   € V ^8„  d   QhR\         R\        R\         /# ©r   ÚtextÚcontainer_pathsr	   r?   )r   s   "r   r   r   “   s!   € ÷ ñ ”Sð ¬4ð ´Cñ r   c                óD   € V'       g   ^ RI Hp V! V 4      p \        V 4      # )z™Expand ``~``; on host backends also translate Git Bash ``/c/Users/...`` drive
paths before Path sees them. Container/WSL Linux paths are never rewritten.)Ú_msys_to_windows_path)Útools.environments.localro   r   )rl   rm   ro   s   && r   Ú
_host_textrq   “   s   € ÷ ÝBá$ TÓ*ˆÜ˜ÓÐr   c                óR   € V ^8„  d   QhR\         R\        R\        \        ,          /# rk   ©r   r@   r   r   )r   s   "r   r   r   �   s&   € ÷ ñ ”#ð ¬dð ´t¼mÕ7Kñ r   c                ó  € V'       dM   \         P                  ! V 4      '       g&   \         P                  ! \        V! 4       4      V 4      p \	        V 4      # \
        P                  R8X  dV   ^ RIpVP                  V 4      '       g!   VP                  \        V! 4       4      V 4      p \        VP                  V 4      4      # \        V 4      pVP                  4       '       g   \        V! 4       4      V,          pVP                  4       # )z¨Return *text* as an absolute, normalized path, joining it onto ``base()`` when
relative. Container: pure-posix, no host deref. Host: resolve() (win32: ntpath normpath).Úwin32N)rM   rV   r   r   rO   ÚsysÚplatformÚntpathr   rN   Úis_absoluteÚresolve)rl   Úbaserm   rx   Úps   &&&  r   Ú_anchorr}   �   s¯   € ÷ Ü�Š˜t×$Ò$Ü—>’>¤#¡d£f£+¨tÓ4ˆDÜ,¨TÓ2Ð2Ü
‡|�|�wÔÛà�|‰|˜D×!Ò!Ø—;‘;œs¡4£6›{¨DÓ1ˆDÜ�F—O‘O DÓ)Ó*Ð*ÜˆT‹
€AØ�=‰=�?Š?Ü‘“‹L˜1ÕˆØ�9‰9‹;Ðr   c                ó0   € V ^8„  d   QhR\         R\         /# r   r
   )r   s   "r   r   r   °   s   € ÷ ñ ¤ð ¬ñ r   c                ó~  € ^ RI Hp ^ RIHpHp ^ RIHp V! V 4      V! V 4      P                  R4      V! 4       3 F  p\        T;'       g    R4      P                  4       pVP                  4       \        9  g   KA  VP                  R4      '       g   \        P                  ! V4      '       g   Kv  V! VR4      u # 	  R# )aŸ  Working directory on the SSH target, read RAW: ``_authoritative_workspace_root``
expands ``~`` on the Hermes host, which names a directory the remote does not have.

Same precedence (session record, registered override, ``$TERMINAL_CWD``); a
value that is neither ``~``-prefixed nor POSIX-absolute (a Windows or relative
host path) is skipped. ``coerce_ssh_remote_cwd`` maps the host subprocess home back to ``~``.
r[   )rg   ra   )Úcoerce_ssh_remote_cwdrb   rS   r   Ússh)r]   r\   r/   rg   ra   Útools.terminal_tool_configr€   r0   r   rT   r3   rU   r   rM   rV   )r   r\   rg   ra   r€   rQ   rl   s   &      r   Ú_ssh_remote_anchorrƒ   °   s’   € õ 5ßKÝ@á Ó(Ñ*@ÀÓ*I×*MÑ*MÈeÓ*TÑVhÓVjÓkˆÜ�3—9�9˜"‹~×#Ñ#Ó%ˆØ�:‰:‹<Ô6Ö6¸D¿O¹OÈC×<PÒ<PÔT]×TcÒTcÐdh×TiÔTiÙ(¨¨uÓ5Ò5ñ lñ r   c                ó$   € V ^8„  d   QhR\         /# )r   r   r
   )r   s   "r   r   r   Ã   s   € ÷ ñ ¤#ñ r   c                óˆ  € ^ RI Hp ^ RIHp ^ RIHp V! V 4      pV! V 4      pVfX   \        P                  ! 4       \        P                  V\        R4      4      ,
          \        8  d   R#  V! V 4      P                  p\        P                  VR4       V#   \         d!    \        P                  ! 4       \        T&    R# i ; i)a  The task's live terminal environment, else one brought up through the file tools' own creator. A failed
bring-up is remembered briefly, so one tool call's several path resolutions don't each wait out the
backend's connect timeout; the tool's own backend call reports the error.)Ú_get_file_ops)r#   )Úget_active_envNz-inf)Útools.file_toolsr†   r/   r#   Útools.terminal_tool_lifecycler‡   ÚtimeÚ	monotonicÚ_ssh_home_failed_atr0   ÚfloatÚ_SSH_HOME_RETRY_AFTERr:   r   Úpop)r   r†   r#   r‡   Úkeyr:   s   &     r   Ú_live_or_started_envr‘   Ã   s¢   € õ /Ý>Ý<á
$ WÓ
-€CÙ
˜Ó
!€CØ
‚{Ü�>Š>ÓÔ1×5Ñ5°c¼5À»=ÓIÕIÔLaÔaÙð	Ù Ó(×,Ñ,ˆCô ×Ñ˜C Ô&Ø€Jøô	 ô 	Ü'+§~¢~Ó'7Ô Ñ$Úð	ús   Á,B Â'CÃ Cc                ó>   € V ^8„  d   QhR\         R\         R,          /# rG   r
   )r   s   "r   r   r   Ù   s"   € ÷ Mñ Mœcð M¤c¨D¥jñ Mr   c                óÔ   € \        V 4      pVf   R# \        VRR4      '       d   \        VRR4      MRp\        V\        4      '       d   \        P
                  ! V4      '       d   V# R# )a  The SSH user's home as detected at connect (``echo $HOME``), else None.

Brings the environment up through the file tools' own creator (same cwd
and cache as the call that follows) when none is live: they resolve before
touching the backend, and a first call keyed ``~/x`` while later ones key
``/home/u/x`` splits read tracking and staleness checks for one file. A
failed bring-up is remembered briefly so one tool call's several
resolutions don't each wait out the SSH connect timeout; the tool's own
backend call reports the error.
NÚ_remote_home_detectedFÚ_remote_home)r‘   r6   r7   r   rM   rV   )r   r:   r   s   &  r   Ú_ssh_remote_homer–   Ù   s\   € ô ˜wÓ
'€CØ
‚{Ùä18¸Ð>UÐW\×1]Ò1]Œ7�3˜¨Ô-Ðcg€DÜ˜d¤C×(Ò(¬Y¯_ª_¸T×-BÒ-Bˆ4ÐLÈÐLr   c                ó<   € V ^8„  d   QhR\         R\         R\        /# ©r   Úfilepathr   r	   )r   r   )r   s   "r   r   r   ì   s&   € ÷ Dñ D¤ð D¬cð D´mñ Dr   c                óX  € \        T ;'       g    R4      P                  4       pVP                  R4      '       g=   \        P                  ! V4      '       g!   \        P
                  ! \        V4      V4      pVR8X  g   VP                  R4      '       d%   \        V4      pV'       d   W2R,          ,           MTpVP                  R4      '       g   \        V4      # VP                  R4      w  rEpV'       d   \        P                  ! V4      MRp\        VR8X  d   V4      # V RV 24      # )az  Resolve *filepath* in the SSH target's namespace, never via the Hermes host
(``Path.resolve()`` and ``get_subprocess_home()`` both name host directories).

``~`` becomes the remote home once the live environment has detected it, so the
result is absolute and the write guards see the real target. Before that it stays
``~``-prefixed for the remote shell; ``~user`` always does.
rS   r   r   :é   NNÚ/Ú.)r   rT   r   rM   rV   r   rƒ   r–   rO   Ú	partitionrN   r   )r™   r   rl   r   ÚheadÚ_Útails   &&     r   Ú_resolve_ssh_pathr¢   ì   sâ   € ô ˆx�~ˆ~˜2Ó×$Ñ$Ó&€DØ�?‰?˜3×Ò¬	¯ª¸×(=Ò(=Ü�~Š~Ô0°Ó9¸4Ó@ˆØˆs„{�d—o‘o d×+Ò+Ü Ó(ˆß"&ˆt˜2•hŽ¨DˆØ�?‰?˜3×ÒÜ,¨TÓ2Ð2Ø—N‘N 3Ó'�M€DˆTß'+Œ9×Ò˜dÔ#°€DÜ ¨¤˜ÓCÐC°T°F¸!¸D¸6Ð2BÓCÐCr   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úresolvedr	   r?   )r   s   "r   r   r     s   € ÷ 2ñ 2¤Sð 2¬Tñ 2r   c                ó    € V P                  R4      '       d   V P                  R4      ^,          MRpVR8H  ;'       g    VP                  R4      # )zœTrue for a still-``~``-relative SSH path that climbs above ``~``: its absolute
target is unknown until the remote home is, so no path guard can classify it.r   rœ   rS   ú..z../)r   rž   )r¤   r¡   s   & r   Ú_ssh_path_escapes_homer§     sF   € ð *2×)<Ñ)<¸S×)AÒ)Aˆ8×Ñ˜cÓ" 1Ö%Àr€DØ�4‰<×1Ð1˜4Ÿ?™?¨5Ó1Ð1r   rm   c                ó`   € V ^8„  d   QhR\         R\        R,          R\        \        ,          /# )r   r   rm   Nr	   rs   )r   s   "r   r   r     s3   € ÷ añ aÜðaÜ26¸µ+ðaÜIMÔP]ÕI]ñar   c               ó,  € Vf(   \        V 4      R8X  d   \        RV 4      # \        V 4      p\        V 4      ;'       g    V'       d   \	        V 4      MRp\        \        T;'       g    \        P                  ! 4       V4      \        P                  V4      # )zñReturn the ABSOLUTE base directory for resolving relative paths:
``_authoritative_workspace_root``, else the process cwd as a last resort.

SSH resolves in the remote namespace (callers passing *container_paths* have
already ruled SSH out).
Nr�   r�   )	r=   r¢   rE   ri   Ú_container_default_cwdr}   rq   r   Úgetcwd)r   rm   Úroots   &$ r   Ú_resolve_base_dirr­     su   € ð ÒÜ& wÓ/°5Ô8Ü$ S¨'Ó2Ð2Ü/°Ó8ˆÜ(¨Ó1×sÐs×YhÔ6LÈWÔ6UÐnr€Dä”:˜d×1Ð1¤b§i¢i£k°?ÓCÄRÇYÁYÐP_Ó`Ð`r   c                ó>   € V ^8„  d   QhR\         R\         R,          /# rG   r
   )r   s   "r   r   r     s   € ÷ ñ ¤Cð ¼¸d½
ñ r   c                óH  €  ^ RI Hp V! 4       P                  R4      pVR8X  d    ^ RIHp \        V 4      pVe	   V! V4      MRp\        V\        4      '       d   \        P                  ! V4      '       d   V# R#   \         d    \        P                  RT RR7        R# i ; i)	a‹  A container backend's configured working directory (already sanitized to the backend default) when the
session recorded none: the cwd its terminal commands start in (``_resolve_command_cwd``'s default). The process
cwd is a host directory (``/opt/data`` in the Docker image) the sandbox does not have. The live env's cwd is NOT
used: a shared env's cwd is wherever ANOTHER session last ``cd``'d.)r"   rb   r   )Úplugin_sandbox_homeNz-container default cwd unavailable for task %sT)Úexc_info)r/   r"   r0   r‚   r°   r‘   r7   r   rM   rV   r   ÚloggerÚdebug)r   r"   rb   r°   r:   s   &    r   rª   rª     s•   € ð
^Ý7áÓ×#Ñ# EÓ*ˆØ�#Œ:õ
 Gä& wÓ/ˆCØ.1ªoÑ% cÔ*À4ˆCÜ�cœ3×Ò¤I§O¢O°C×$8Ò$8ØˆJñ øô ô ^ä�‰ÐDÀgÐX\ˆÕ]Ùð^ús   ‚A3A: Á6A: Á:#B!Â B!c                óR   € V ^8„  d   QhR\         R\         R\        \        ,          /# r˜   rK   )r   s   "r   r   r   3  s+   € ÷ iñ i¤Sð i´3ð iÄtÌmÕG[ñ ir   c                óŒ   aa€ \        S4      R8X  d   \        V S4      # \        S4      o\        \	        V S4      VV3R lS4      # )zuResolve *filepath* against the task's absolute base directory
(absolute inputs are returned resolved-but-unanchored).r�   c                  ó   <€ \        SS R 7      # ))rm   )r­   )rm   r   s   €€r   Ú<lambda>Ú(_resolve_path_for_task.<locals>.<lambda>:  s   ø€ Ô,¨WÀoÕVr   )r=   r¢   rE   r}   rq   )r™   r   rm   s   &f@r   Ú_resolve_path_for_taskr¹   3  sG   ù€ ô # 7Ó+¨uÔ4Ü  ¨7Ó3Ð3Ü+¨GÓ4€OÜ”:˜h¨Ó8ÝVÐXgóið ir   c                óR   € V ^8„  d   QhR\         R\         R\        \        ,          /# r˜   rK   )r   s   "r   r   r   =  s+   € ÷ Añ A¤cð A´Cð AÌÌ}ÕH\ñ Ar   c                ó¸   € \        V 4      w  r#VR9   g    V'       g#   VP                  R4      '       d   \        W4      # \        T;'       g    RV4      V,          # )zæ``_resolve_path_for_task`` for an operation on the directory entry itself (delete,
rename): the parent is resolved, but a symlink in the last component is kept, since
resolving it aims the operation at the file the link points to.r�   r   )rS   r�   r¦   )r   r   r¹   )r™   r   Úparentr(   s   &&  r   Ú_resolve_entry_for_taskr½   =  sK   € ô ˜xÓ(�L€FØˆÔ§v°$·/±/À#×2FÒ2FÜ% hÓ8Ð8Ü! &§- -¨C°Ó9¸DÕ@Ð@r   c          	      ól   € V ^8„  d   QhR\         R\        \        ,          R\         R\         R,          /# )r   r™   r¤   r   r	   NrK   )r   s   "r   r   r   H  s5   € ÷ ñ ¤sð ´d¼]Õ6Jð ÔUXð ÔilÐosÕisñ r   c                ó`  €  \        V4      R8X  dC   V P                  R4      '       g   \        P                  ! V 4      '       d   R# \	        RV4      pM�\        \        V 4      4      P                  4       '       d   R# \        V4      pV'       g   R# \        V4      '       d   \        \        \        V4      4      4      pM"\        \        V4      4      P                  4       pVP                  V4      '       d   R# RV : R\        V4      : R\        V4      : R2#   \         d     R# i ; i)	a*  Warn when a RELATIVE path resolved OUTSIDE the task's workspace root (the
edit is about to land in a different checkout than the terminal's cwd).
``None`` for absolute paths, an unknown root, or a path under the root.
SSH compares in the remote namespace, as ``_resolve_path_for_task`` resolved it.r�   r   Nr�   zRelative path z resolved to z), which is OUTSIDE the active workspace (zÐ). The edit will land in a different directory than the terminal's cwd. If this is not intended (e.g. a git-worktree session writing into the main checkout), pass an absolute path under the workspace instead.)r=   r   rM   rV   r¢   r   r   ry   ri   rE   rO   rz   Úis_relative_tor   r   )r™   r¤   r   r¬   Úworkspace_roots   &&&  r   Ú_path_resolution_warningrÂ   H  s   € ð
Ü& wÓ/°5Ô8Ø×"Ñ" 3×'Ò'¬9¯?ª?¸8×+DÒ+DÙÜ$ S¨'Ó2‰Dä”M (Ó+Ó,×8Ñ8×:Ò:ÙÜ:¸7ÓCˆNß!ÙÜ$ W×-Ò-Ü4´T¼-ÈÓ:WÓ5XÓY‘äœM¨.Ó9Ó:×BÑBÓD�Ø×"Ñ" 4×(Ò(Ùà˜X™L¨´c¸(³mÑ5Fð G-Ü-0°«Y©Mð :LðMð	Nøô ô Úðús/   ‚&D ©D Á5D Á>D ÂA'D Ã= D ÄD-Ä,D-c                ób   € V ^8„  d   Qh/ ^ \         9   d   \        \        \        3,          ;R&   # )r   rŒ   )Ú__conditional_annotations__Údictr   r�   )r   s   "r   r   r      s'   € ÷ ñ ÷8 +Ò *”Tœ#œu˜*Õ%Ñ *ò9r   >   rS   r�   rb   Úautoú./>   ÚmodalÚdockerÚdaytonaÚvercel_sandbox)r.   r�   rÉ   rÈ   rÊ   )Údefault)+rÄ   Ú__doc__Úloggingr   rM   rv   rŠ   Úpathlibr   r   Úagent.runtime_self_protectionr   Ú	getLoggerr2   r²   Ú	frozensetrU   rD   r5   rŽ   rŒ   r   r=   rE   rI   rO   rX   r^   rd   ri   rq   r}   rƒ   r‘   r–   r¢   r§   r­   rª   r¹   r½   rÂ   r   )rÄ   s   @r   Ú<module>rÓ      sé   øðöó Û 	Û Û 
Û ß 'å 5à	×	Ò	˜8Ó	$€ñ $Ò$BÓCÐ Ù$-Ò.^Ó$_Ð !àFÐ ð Ð Ø(*Ð Ó *õ$÷(A÷.=÷\õ
8õ9õ@÷8÷ \õ õõ&õ&õ,Mõ&Dõ*2ñaØ@D÷að a÷"÷4i÷A÷ñ r   