+
    lHàjÄH  ã                   óR  € 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
 ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt R	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*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# )+u¨  Real-profile local browsing: snapshot the user's default Chromium profile into a
hermes-owned copy, launch the real browser binary on it, and attach agent-browser.

State (``_REAL_PROFILE_SESSION``, ``_real_profile_cdp_lock``, ``_real_profile_cdp_cache``,
``_real_profile_chrome_procs``) lives in ``tools.browser_tool``; it is read
through ``_bt`` (resolved per call â€” never import ``tools.browser_tool`` at import time).
N)ÚOptionalÚTuple)Úloopback_request_kwargs)Úorigin_module)Úbrowser_tool_cloud)Úbrowser_tool_install)Ú browser_tool_lightpanda_fallback)Úbrowser_tool_sessionz$browser.use_real_profile is on, but c                ó   € V ^8„  d   QhRR/# )é   ÚreturnN© )Úformats   "ÚD/home/ubuntu/.hermes/hermes-agent/tools/browser_tool_real_profile.pyÚ__annotate__r      s   € ÷ Uñ U¨ñ Uó    c                 ó’   € ^ RI Hp  \        4       pVP                  '       d%   V ! VP                  P	                  4       RR7       K6  R# )z°Terminate real-browser processes launched for real-profile sessions (idempotent, atexit-safe);
agent-browser only ATTACHED to them, so its own session cleanup never kills them.)Ú
_terminatezreal-profile chrome)ÚwhatN)Útools.browser_lightpandar   Ú_originÚ_real_profile_chrome_procsÚpop)r   Ú_bts     r   Ú_terminate_real_profile_chromer      s9   € õ 4Ü
‹)€CØ
×
(×
(Ð
(Ù�3×1Ñ1×5Ñ5Ó7Ð>S×Tñ )r   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úhttp_cdpr   ©ÚstrÚbool)r   s   "r   r   r   "   s   € ÷ -ñ -œcð -¤dñ -r   c                ó"   € ^ RI Hp V! V RR7      # )z=True when an ``http://host:port`` CDP discovery root answers.)Ú
_cdp_readyg      ð?©Útimeout)r   r!   )r   r!   s   & r   Ú_cdp_http_readyr$   "   s   € å3Ù�h¨Ô,Ð,r   c                ó$   € V ^8„  d   QhR\         /# ©r   r   ©Útuple)r   s   "r   r   r   (   s   € ÷ 	ñ 	¤%ñ 	r   c                 ó¬   € \        4       p \        P                  ! V P                  4      p\        P                  ! V4      pVP                  RR4       W!3# )uc  Reaper-visible socket dir + ``owner_pid`` claim like every other lane (agent-browser's
default dir is invisible to the reaper â€” #100855). The daemon-side idle timeout is dropped:
Chrome is launched by Hermes, not the daemon, so a self-exiting daemon would leave Chrome
holding the copy dir under the next snapshot overlay. Returns ``(env, socket_dir)``.ÚAGENT_BROWSER_IDLE_TIMEOUT_MSN)r   Ú_sessionÚ_prepare_session_socket_dirÚ_REAL_PROFILE_SESSIONÚ_agent_browser_command_envr   )r   Ú
socket_dirÚenvs      r   Ú_real_profile_daemon_envr1   (   sH   € ô
 ‹)€CÜ×5Ò5°c×6OÑ6OÓP€JÜ
×
-Ò
-¨jÓ
9€CØ‡G�GÐ+¨TÔ2Øˆ?Ðr   c                ó\   € V ^8„  d   QhR\         R\        R\        R\        P                  /# )r   Úargvr#   Útagr   )ÚlistÚfloatr   Ú
subprocessÚCompletedProcess)r   s   "r   r   r   4   s4   € ÷ \ñ \¤Tð \´Eð \Äð \Ì
×HcÑHcñ \r   c                óT  € \        4       w  r4\        P                  P                  VRV 24      p\        P                  P                  VRV 24      p\        P
                  ! WWB4      pRp VP                  VR7       \        P                  ! WV4      w  rš\        P                  ! WV4       V'       d   \        P                  ! W4      h\        P                  ! WP                  WšR7      #   \        P                   d&    RpTP                  4        TP                  4         L§i ; i)uO  Run an agent-browser CLI argv once, capturing output through temp files (not pipes).

The CLI forks a resident daemon that inherits its stdio and outlives the CLI, so with
pipe capture the CLI can exit while its output never reaches EOF: POSIX burns the whole
timeout draining pipes on every call, and Windows' ``TimeoutExpired`` cleanup re-drains
with no timeout, blocking past the outer tool deadline (#96731). Same pattern as
``_popen_agent_browser``: wait for the CLI alone â€” a grandchild holding the inherited
file handles is harmless. Raises ``TimeoutExpired`` after killing the CLI.Ú_stdout_Ú_stderr_Fr"   T)ÚstdoutÚstderr)r1   ÚosÚpathÚjoinr+   Ú_popen_agent_browserÚwaitr7   ÚTimeoutExpiredÚkillÚ_read_command_output_filesÚ_unlink_command_output_filesr8   Ú
returncode)r3   r#   r4   r0   r/   Ústdout_pathÚstderr_pathÚprocÚ	timed_outr<   r=   s   &&&        r   Ú_capture_agent_browser_clirL   4   sé   € ô /Ó0�O€CÜ—'‘'—,‘,˜z¨X°c°UÐ+;Ó<€KÜ—'‘'—,‘,˜z¨X°c°UÐ+;Ó<€KÜ×(Ò(¨°JÓD€DØ€IðØ�	‰	˜'ˆ	Ô"ô
 ×8Ò8¸ÓR�N€FÜ×)Ò)¨+ÔCßÜ×'Ò'¨Ó6Ð6Ü×&Ò& t¯_©_ÀVÔ[Ð[øô ×$Ñ$ô Øˆ	Ø�	‰	ŒØ�	‰	Žðús   Á-C- Ã-7D'Ä&D'c          	      ór   € V ^8„  d   QhR\         R\         R\         R\        \        P                  ,          /# )r   Úsession_nameÚcmdÚ	log_labelr   )r   r   r7   r8   )r   s   "r   r   r   O   s5   € ÷ ñ ¬Sð ¼ð Ìð ÔPXÔYc×YtÑYtÕPuñ r   c          	     ól  € \        4       p \        P                  ! 4       p \	        . \
        P                  ! T4      ORNT NTO^RTP                  RR4       2R7      #   \         d     R# i ; i  \        P                  \        3 d(   pTP                  P                  RY4        Rp?R# Rp?ii ; i)zeRun ``agent-browser --session <name> <cmd...>``; None when agent-browser is missing or the run fails.Nú	--sessionzrp-Ú Ú-©r#   r4   zreal-profile %s failed: %s)r   Ú_installÚ_find_agent_browserÚFileNotFoundErrorrL   r+   Ú_agent_browser_argvÚreplacer7   ÚSubprocessErrorÚOSErrorÚloggerÚdebug)rN   rP   rO   r   Úbrowser_cmdÚes   &$*   r   Ú_agent_browser_session_cmdra   O   s³   € ä
‹)€CðÜ×2Ò2Ó4ˆðÜ)ØYŒh×*Ò*¨;Ó7ÐY¸ÐYÀlÐYÐUXÐYØ˜c )×"3Ñ"3°C¸Ó"=Ð!>Ð?ô
ð 	
øô ô Úðûô ×&Ñ&¬Ð0ô Ø�
‰
×ÑÐ5°yÔDÝûðús(   ŒA ¢<A1 ÁA.Á-A.Á1B3ÂB.Â.B3c                óF   € V ^8„  d   QhR\         R\        \         ,          /# )r   rN   r   ©r   r   )r   s   "r   r   r   `   s   € ÷ ;ñ ;¬ð ;´¼#µñ ;r   c                óÚ   € \        V RRRR7      pVe:   \        P                  ! RVP                  ;'       g    RP	                  4       4      MRpV'       d   RVP                  ^4       2# R# )	zZHTTP CDP discovery root of an agent-browser session (from its ``ws://`` cdp-url), or None.Úgetzcdp-urlzget cdp-url©rP   Nzws://127\.0\.0\.1:(\d+)/Ú úhttp://127.0.0.1:)ra   ÚreÚsearchr<   ÚstripÚgroup)rN   rJ   Úms   &  r   Ú_agent_browser_get_cdprn   `   s^   € ä% l°E¸9ÐP]Ô^€DØOSÒO_Œ�	Š	Ð-°·±×0AÐ0A¸r×/HÑ/HÓ/JÔKÐei€Aß/0Ð˜qŸw™w q›z˜lÐ+Ð:°dÐ:r   c                óF   € V ^8„  d   QhR\         R\        \         ,          /# ©r   Údata_dirr   rc   )r   s   "r   r   r   g   s   € ÷ ñ ¤#ð ¬(´3­-ñ r   c                ó  €  \        \        P                  P                  V R4      RR7      ;_uu_ 4       pVP	                  4       P                  4       uuRRR4       #   + '       g   i     R# ; i  \         d     R# i ; i)zUFirst line of Chrome's ``DevToolsActivePort`` in ``data_dir`` (None when unreadable).ÚDevToolsActivePortú	utf-8-sig©ÚencodingN)Úopenr>   r?   r@   Úreadlinerk   r\   )rq   Úfhs   & r   Ú_read_devtools_portrz   g   sZ   € ðÜ”"—'‘'—,‘,˜xÐ)=Ó>È×UÕUÐY[Ø—;‘;“=×&Ñ&Ó(÷ V×U×UÓUûäô Úðús.   ‚3A2 µAÁ
A2 ÁA/	Á)A2 Á/A2 Á2BÂ Bc                óF   € V ^8„  d   QhR\         R\        \         ,          /# rp   rc   )r   s   "r   r   r   p   s   € ÷ ?ñ ?¤Cð ?¬H´S­Mñ ?r   c           	     óª  €  \        \        P                  P                  V R4      RR7      ;_uu_ 4       pVP	                  4       P                  4       VP	                  4       P                  4       r2RRR4       XP                  4       '       d   XP                  R4      '       g   R# RT 2p ^ RI	p\        TP                  ! T R23R^/\        T4      B P                  4       P                  R	4      ;'       g    R
4      pTP                  T4      '       d   T# R#   + '       g   i     Lµ; i  \         d     R# i ; i  \         d     R# i ; i)a  HTTP CDP root of a Chrome still running on ``data_dir``, or None. ``DevToolsActivePort``
outlives a crashed Chrome and its port can be recycled by another local CDP server, so the
file's browser id (line 2) must match what ``/json/version`` reports before it is trusted.rs   rt   ru   Nz/devtools/browser/rh   z/json/versionr#   ÚwebSocketDebuggerUrlrg   )rw   r>   r?   r@   rx   rk   r\   ÚisdigitÚ
startswithÚrequestsr   re   r   ÚjsonÚ	ExceptionÚendswith)rq   ry   ÚportÚbrowser_pathr   r€   Úws_urls   &      r   Ú_surviving_chrome_cdpr‡   p   s  € ðÜ”"—'‘'—,‘,˜xÐ)=Ó>È×UÕUÐY[Ø!#§¡£×!4Ñ!4Ó!6¸¿¹»×8KÑ8KÓ8M�,÷ Vð �<‰<�>Š> ×!8Ñ!8Ð9M×!NÒ!NÙØ" 4 &Ð)€HðÛÜ�X—\’\ X J¨mÐ"<ÑmÀaÐmÔKbÐckÓKlÑmß‘d“fŸS™SÐ!7Ó8÷?ð ?Ø<>ó@ˆð —‘ |×4Ò4ˆ8Ð>¸$Ð>÷ V×Uûäô Úðûô ô ÚðúsG   ‚3D1 µ<DÁ1D1 Â.AE Ã<E ÄD.	Ä)D1 Ä.D1 Ä1E Ä?E ÅEÅEc                ó<   € V ^8„  d   QhR\         R\         R\        /# )r   r   rq   r   r   )r   s   "r   r   r   …   s&   € ÷ Cñ Cœsð C¬cð C´dñ Cr   c                ó¤   € \         P                  ! RT ;'       g    R4      p\        V4      ;'       d    \        V4      VP	                  ^4      8H  # )z¯True when the CDP endpoint's browser runs on ``data_dir`` (DevToolsActivePort match proves it
is our profile copy, not a throwaway temp dir a raced/stale launch fell back to).ú:(\d+)rg   )ri   rj   r   rz   rl   )r   rq   rm   s   && r   Ú_cdp_on_data_dirr‹   …   s?   € ô 	�	Š	�)˜XŸ^˜^¨Ó,€AÜ�‹7×BÐBÔ*¨8Ó4¸¿¹À»
ÑBÐBr   c                ó(   € V ^8„  d   QhR\         RR/# )r   rN   r   N©r   )r   s   "r   r   r   Œ   s   € ÷ Qñ Q¬sð Q°tñ Qr   c                ó"   € \        V RRR7       R# )zHBest-effort close of an agent-browser session (stale/wrong-dir cleanup).Úclosezsession closerf   N)ra   )rN   s   &r   Ú_agent_browser_close_sessionr�   Œ   s   € ä˜|¨WÀ×Pr   c                ó0   € V ^8„  d   QhR\         R\         /# ©r   Úerrr   r�   )r   s   "r   r   r   ™   s   € ÷ ?ñ ?¤Cð ?¬Cñ ?r   c                ó   € V  R2# )a  Tool-result note when the real profile can't load and a fresh browser serves instead: the
browser keeps working (a consented user is never left with no browser), and the model is told
it is signed out so it can say so rather than act as if the user's accounts were there.zz Using a fresh browser without the user's logins for this session instead; tell the user if the task needs their accounts.r   )r“   s   &r   Úreal_profile_fallback_noter•   ™   s   € ð ˆeð >ð >ð ?r   c                ó:   € V ^8„  d   QhR\         \        ,          /# r&   )r   r   )r   s   "r   r   r   ¡   s   € ÷ ñ ´¼#µñ r   c                óZ   € ^ RI Hp V f   \        R,           # W8X  d   \        R,           # R# )a%  Why the default browser's profile can't be used (the session falls back to a fresh browser), else None.

A pre-release channel lives in a profile dir we don't resolve; normalizing to the stable
family would drive a DIFFERENT profile/account (wrong-principal bug), so refuse rather than guess.
)ÚUNSUPPORTED_CHANNELNzºyour default browser is not a supported Chromium browser (Chrome, Edge, Brave, Brave Origin, Chromium). Real-profile browsing requires a Chromium default; set one or turn the toggle off.záyour default browser is a pre-release Chromium channel (Beta / Dev / Canary), which real-profile browsing does not support. Set your default to a stable Chrome / Edge / Brave / Brave Origin / Chromium, or turn the toggle off.)Úhermes_cli.browser_connectr˜   Ú_RP)Úbrowserr˜   s   & r   Ú _real_profile_unsupported_reasonrœ   ¡   sA   € õ ?Ø‚Üð ~õ ~ð 	àÔ%Üð bõ bð 	cñ r   c                ó0   € V ^8„  d   QhR\         R\         /# r’   r�   )r   s   "r   r   r   ²   s   € ÷ ñ ¤cð ¬cñ r   c                óŠ   € ^ RI Hp V '       d-   V P                  V4      '       d   V \        V4      R R,           # \         V  2# )z¬User-facing message for a failed profile snapshot; a locked profile adds the approved-close
command, which the agent must ASK the user about first (it quits their browser).)Ú_PROFILE_LOCKED_PREFIXNu³    To close it (only after the user approves â€” it quits their browser and loses unsaved tabs), run: `hermes browser close-profile`; the next browser session then uses the profile.)r™   rŸ   r   Úlenrš   )r“   rŸ   s   & r   Ú_real_profile_snapshot_errorr¡   ²   sJ   € õ Bß
ˆs�~‰~Ð4×5Ò5Ø”CÐ.Ó/Ð0Ð1ð 59õ 9ð 	:ô ˆU�3�%ˆ=Ðr   c          	      óŠ   € V ^8„  d   QhR\         R\         R\        \        \        ,          \        \         ,          3,          /# )r   Úreal_binaryÚcopy_dirr   )r   r(   r   Úint)r   s   "r   r   r   ½   s<   € ÷ &vñ &v¬Sð &v¼Cð &vÄEÌ(ÔSVÍ-ÔYaÔbeÕYfÐJfÕDgñ &vr   c           	     óâ  € \        4       p \        P                  ! \        P                  P	                  VR4      4       V RV 2.\        Op\        P                  ! 4        VP                  4       p\        VP                  R4      ;'       g    VP                  R4      4      p\        P                  ! 4       '       d.   V'       g7   \        P                  P!                  R4      '       d   VP#                  R4        \$        P&                  ! V\$        P(                  \$        P(                  \$        P(                  RVR7      pTP.                  P#                  T4       \0        P2                  ! 4       R,           p\0        P2                  ! 4       T8  d|   \5        T4      ;'       g    Rp	T	P7                  4       '       d   \9        T	4      R	3# TP;                  4       e   \=        4        R	\,        R,           3# \0        P>                  ! R4       K•  \=        4        R	\,        R,           3#   \
         d     ELøi ; i  \$        P*                  \
        3 d   pR	\,         R
T 23u R	p?# R	p?ii ; i)a‹  Launch the user's REAL browser binary on the profile COPY; return (debug_port, error).

agent-browser's own launch force-adds --use-mock-keychain / --password-store=basic, which makes
macOS Chrome drop every keychain-encrypted cookie (signed-out copy); launching the real binary
ourselves keeps the OS keychain path intact and agent-browser attaches via ``--cdp <port>``.
Headless by default (a focus-stealing window defeats a background capability); Chrome's NEW
headless shares the profile's cookie store (legacy --headless does not). browser.headed /
AGENT_BROWSER_HEADED opts into a window, except on a display-less Linux host (launch would die).
rs   z--user-data-dir=ÚDISPLAYÚWAYLAND_DISPLAYÚlinuxz--headless=newT)r<   r=   ÚstdinÚstart_new_sessionr0   Núthe launch failed: g      >@rg   zJChrome exited during startup (another instance may hold the profile copy).g      Ð?z\the real-profile browser did not expose a debug port in time. Retry, or turn the toggle off.) r   r>   Úunlinkr?   r@   r\   Ú_REAL_PROFILE_CHROME_FLAGSr+   Ú"_ensure_screen_for_headed_chromiumÚ_build_browser_envr   re   Ú_cloudÚ_is_headed_modeÚsysÚplatformr   Úappendr7   ÚPopenÚDEVNULLr[   rš   r   ÚtimeÚ	monotonicrz   r~   r¥   Úpollr   Úsleep)
r£   r¤   r   Úchrome_argvÚbrowser_envÚ_has_displayÚchrome_procr`   ÚdeadlineÚlines
   &&        r   Ú_launch_real_profile_chromerÂ   ½   sã  € ô ‹)€CðÜ
�	Š	”"—'‘'—,‘,˜xÐ)=Ó>Ô?ð Ð"2°8°*Ð =Ð[Ô@ZÐ[€KÜ×/Ò/Ô1Ø×(Ñ(Ó*€KÜ˜Ÿ™¨	Ó2×XÐX°k·o±oÐFWÓ6XÓY€LÜ×"Ò"×$Ò$¯,¼c¿l¹l×>UÑ>UÐV]×>^Ò>^Ø×ÑÐ+Ô,ð4Ü ×&Ò& {¼:×;MÑ;MÔV`×VhÑVhÜ-7×-?Ñ-?ÐSWÐ]hôjˆð ×"Ñ"×)Ñ)¨+Ô6ä�~Š~Ó $Õ&€HÜ
�.Š.Ó
˜XÔ
%Ü" 8Ó,×2Ð2°ˆØ�<‰<�>Š>Ü�t“9˜d�?Ð"Ø×ÑÓÒ)Ü*Ô,ØœÐkÕkÐkÐkÜ�
Š
�4ÖÜ"Ô$Ø”ÐuÕuÐuÐuøô3 ô Úðûô ×&Ñ&¬Ð0ô 4Øœ�uÐ/°¨sÐ3Ð3Õ3ûð4ús0   Œ4H* Ã?AH< È*H9È8H9È<I.ÉI)É#I.É)I.c          	      óŠ   € V ^8„  d   QhR\         R\        R\        \        \        ,          \        \        ,          3,          /# )r   r„   r¤   r   )r¥   r   r(   r   )r   s   "r   r   r   æ   s7   € ÷ ñ ´ð ¼sð ÄuÌXÔVYÍ]Ô\dÔehÕ\iÐMiÕGjñ r   c                óú  € \        4       p \        P                  ! 4       p. \
        P                  ! T4      ORNTP                  NRN\        T 4      NRNRNp \        YRP                  RR7      R	R
7      pTP                  ^ 8w  du   TP                   ;'       g    TP"                  ;'       g    RP%                  4       P'                  4       pR\         RT'       d   TR,           23# RTP                   2 23# \)        TP                  4      p\+        T4      p	T	eE   \,        P.                  ! RT;'       g    R4      ;p
'       d   T
P1                  ^4      T	8w  d   RT	 2pT'       g   R\        R,           3# TR3#   \         d   pR\         RT 23u Rp?# Rp?ii ; i  \        P                   d    R\        R,           3u # \        P                  \        3 d   pR\         RT 23u Rp?# Rp?ii ; i)a  Make agent-browser ATTACH to the running Chrome (never launch its own); returns ``(http_cdp, error)``.

The daemon may answer with the endpoint of a browser IT spawned (throwaway temp profile);
the DevToolsActivePort OUR Chrome wrote is authoritative on disagreement.
Nz;the local browser engine (agent-browser) is not installed: rR   z--cdprw   zabout:blankT)Ú
first_openzrp-openrU   zOthe real-profile browser took too long to start. Retry, or turn the toggle off.r¬   rg   z*the real-profile browser failed to start: zexit rŠ   rh   zethe real-profile browser started without exposing a devtools endpoint. Retry, or turn the toggle off.éÿÿÿÿ)r   rV   rW   rX   rš   r+   rY   r-   r   rL   Ú_get_open_command_timeoutr7   rC   r[   r\   rG   r=   r<   rk   Ú
splitlinesrn   rz   ri   rj   rl   )r„   r¤   r   r_   r`   r3   rJ   ÚtailÚcdpÚour_portrm   s   &&         r   Ú%_attach_agent_browser_to_real_profilerÌ   æ   s  € ô ‹)€Cð\Ü×2Ò2Ó4ˆð7ŒX×)Ò)¨+Ó6ð 7¸ð 7ÀS×E^ÑE^ð 7Øð7Ü˜“Yð7Ø &ð7Ø(5ð7€Dð4Ü)Ø×7Ñ7À4Ð7ÓHÈiô
ˆð ‡�˜!ÔØ—‘×0Ð0˜tŸ{™{×0Ð0¨b×7Ñ7Ó9×DÑDÓFˆØœ�uÐF×SWÀtÈBÅxÐFwÐxÐxÐxÐ_dÐei×etÑetÐduÐ]vÐFwÐxÐxÐxÜ
  ×!:Ñ!:Ó
;€CÜ" 8Ó,€HØÒ¤b§i¢i°	¸3¿9¸9À"Ó&EÐ!E Ö!EÈ1Ï7É7ÐSTË:ÐYaÔKaØ! ( Ð,ˆßØ”Sð  Cõ  Cð  Cð  	CØ�ˆ9Ðøô+ ô \Øœ�uÐWÐXYÐWZÐ[Ð[Õ[ûð\ûô ×$Ñ$ô mØ”SÐlÕlÐlÒlÜ×&Ñ&¬Ð0ô 4Øœ�uÐ/°¨sÐ3Ð3Õ3ûð4úsG   ŒE> ÁF# Å>F Æ	FÆF ÆF Æ#$G:Ç	G:Ç"G:Ç#G5Ç/G:Ç5G:c                ó$   € V ^8„  d   QhR\         /# r&   r'   )r   s   "r   r   r     s   € ÷ [-ñ [-œ5ñ [-r   c                 ó~  € \        4       p \        P                  ! 4       '       g-    ^ RIHp V! 4        V P                  P                  RR4       R# \        P                  ! 4       '       d   R\        R,           3# ^ RIHpHpHpHp V P"                  P%                  V P&                  R7      '       g   R\        R,           3#  V P                  P)                  R4      pV'       dP   \+        V4      '       d?   \,        P.                  ! V P0                  4       VR3V P"                  P3                  4        # V P                  P                  RR4       V! 4       p\5        V4      p	V	'       d   RV	3V P"                  P3                  4        # V! V4      p
\7        V P0                  4      pV'       dO   \+        V4      '       d>   \9        Wº4      '       d-   W°P                  R&   VR3V P"                  P3                  4        # V'       d   \;        V P0                  4       \=        V
4      pV'       d�   \?        \A        VPC                  R	^4      ^,          4      V
4      w  rÞV'       g   RV3V P"                  P3                  4        # WÐP                  R&   V P                  PE                  R
WÚ4       VR3V P"                  P3                  4        # V! V4      w  r®V'       g	   V
'       g(   R\G        V4      3V P"                  P3                  4        # V! V4      pVf)   R\         RV R23V P"                  P3                  4        # \I        Wú4      w  ppVf   RV3V P"                  P3                  4        # \?        VV
4      w  rÞV'       g   RV3V P"                  P3                  4        # WÐP                  R&   V P                  PE                  RW�V
4       VR3V P"                  P3                  4        #   \
         d(   pT P                  P                  RT4        Rp?ELäRp?ii ; i  T P"                  P3                  4        i ; i)a  Resolve ``(cdp_url, error)`` for consented real-profile browsing.

Snapshot -> launch real binary on the copy -> return its HTTP CDP endpoint. The copy is a
non-default dir, so it sidesteps the Chrome >=136 default-profile remote-debugging block and
never contends with the user's running browser. One shared agent-browser session is reused
across calls (cached, re-validated). ``(None, message)`` when it can't (callers fall back to a fresh
browser and report the message); ``(None, None)`` when consent is off.
)Úcleanup_real_profile_snapshotsz.real-profile cleanup-on-consent-off failed: %sNrÊ   z°browser.engine is set to 'lightpanda', which cannot load a real Chromium profile. Set browser.engine to 'auto' or 'chrome' to use real-profile browsing, or turn the toggle off.)Úchromium_executableÚdetect_default_chromiumÚreal_profile_copy_dirÚsnapshot_real_profiler"   z¡the real-profile browser is already being prepared by another call that has not finished. Retry after that call completes, or restart Hermes if it was abandoned.Ú:z8real-profile: re-attached to surviving Chrome at %s (%s)zthe real browser binary for 'z:' could not be found. Reinstall it or turn the toggle off.z,real-profile browser ready for %s at %s (%s))NN)%r   r±   Ú_use_real_profiler™   rÏ   r‚   r]   r^   Ú_real_profile_cdp_cacher   Ú_lpÚ_using_lightpanda_enginerš   rÐ   rÑ   rÒ   rÓ   Ú_real_profile_cdp_lockÚacquireÚ _REAL_PROFILE_CDP_LOCK_TIMEOUT_Sre   r$   r+   r,   r-   Úreleaserœ   rn   r‹   r�   r‡   rÌ   r¥   ÚrsplitÚinfor¡   rÂ   )r   rÏ   r`   rÐ   rÑ   rÒ   rÓ   Úcachedr›   Úunsupportedr¤   ÚexistingÚ	survivingrÊ   r“   r£   r„   s                    r   Ú_real_profile_cdprã     sÎ  € ô ‹)€CÜ×#Ò#×%Ò%ð	RÝQÙ*Ô,ð 	×#Ñ#×'Ñ'¨¨tÔ4ØÐô ×#Ò#×%Ò%Ø”cð wõ wð xð 	x÷Zó Zð ×%Ñ%×-Ñ-Ø×4Ñ4ð .÷ ò ð Üð 2õ 2ð
ð 	
ð
5-Ø×,Ñ,×0Ñ0°Ó7ˆß”o f×-Ò-ô ×0Ò0°×1JÑ1JÔKØ˜4�<ð^ 	×"Ñ"×*Ñ*Õ,ð] 	×#Ñ#×'Ñ'¨¨tÔ4á)Ó+ˆÜ6°wÓ?ˆßØ˜Ð$ðR 	×"Ñ"×*Ñ*Õ,ñI )¨Ó1ˆÜ)¨#×*CÑ*CÓDˆßœ¨×1Ò1Ô6FÀx×6ZÒ6ZØ19×'Ñ'¨Ñ.Ø˜T�>ð@ 	×"Ñ"×*Ñ*Õ,÷? Ü(¨×)BÑ)BÔCô
 *¨(Ó3ˆ	ßÜ<¼SÀ×AQÑAQÐRUÐWXÓAYÐZ[ÕA\Ó=]Ð_gÓh‰HˆCßØ˜S�yð* 	×"Ñ"×*Ñ*Õ,ð) 25×'Ñ'¨Ñ.Ø�J‰J�O‰OÐVÐX[ÔfØ˜�9ð$ 	×"Ñ"×*Ñ*Õ,ñ! .¨gÓ6‰ˆß—hØÔ5°cÓ:Ð:ð 	×"Ñ"×*Ñ*Õ,ñ *¨'Ó2ˆØÒØœC˜5Ð =¸g¸Yð  GAð  Bð  Bð 	×"Ñ"×*Ñ*Õ,ô 0°ÓF‰	ˆˆcØŠ<Ø˜�9ð 	×"Ñ"×*Ñ*Õ,ô 9¸¸xÓH‰ˆßØ˜�9ð
 	×"Ñ"×*Ñ*Õ,ð	 .1×#Ñ# EÑ*Ø�
‰
�‰ÐFÈÐV^Ô_Ø�Dˆyà×"Ñ"×*Ñ*Õ,øôW ô 	RØ�J‰J×ÑÐMÈq×QÒQûð	RûðV 	×"Ñ"×*Ñ*Õ,úsm   §O+ Ã"P  Ã'4P  Ä69P  Æ
AP  Ç=P  ÈA!P  Ê-P  Ë	P  Ë#P  Ì
P  Ì>P  Í.P  Î".P  Ï+PÏ6PÐPÐ P<)z--remote-debugging-port=0z--no-first-runz--no-default-browser-checkz--disable-background-networkingz--disable-component-updatez--disable-default-appsz--disable-hang-monitorz--disable-popup-blockingz--disable-prompt-on-repostz--disable-syncz--disable-features=Translatez--no-startup-window))Ú__doc__r>   ri   r7   r³   r¸   Útypingr   r   Úagent.proxy_bypassr   Útools.browser_tool_originr   r   Útoolsr   r±   r   rV   r   r×   r	   r+   rš   r   r$   r1   rL   ra   rn   rz   r‡   r‹   r�   r®   r•   rœ   r¡   rÂ   rÌ   rã   r   r   r   Ú<module>ré      s•   ðñó 
Û 	Û Û 
Û ß "Ý 6Ý >Ý .Ý 2Ý 9Ý 2à,€õUõ-õ	õ\õ6õ";õõ?õ*CõQð
Ð õ?õõ"õ&võR÷B[-r   