+
    lHàja  ã                   ót   € R t ^ RIt^ RIHt Rt ! R R4      tR R ltRR R	 llt ! R
 R4      t]! 4       t	R# )uG  Origin-module lookup shared by the ``tools.browser_tool_*`` extraction modules.

Extracted code reads facade-owned state (caches, locks, session tables, facade-defined
helpers) *through* ``tools.browser_tool`` and must not import it at import time (cycle) â€”
hence the lazy :func:`origin_module` and the :data:`origin` proxy.
N)Ú
ModuleTypeztools.browser_toolc                   ó:   a € ] tR t^t o RtRtR tR tR tRt	V t
R# )Ú_NamespaceViewzœLive view over a module namespace whose module object is gone (a test purged
``sys.modules``): the old code still runs with its own globals, so hit *those*.c                ó4   € \         P                  V R V4       R# )Ú_gN)ÚobjectÚ__setattr__)ÚselfÚgs   &&Ú>/home/ubuntu/.hermes/hermes-agent/tools/browser_tool_origin.pyÚ__init__Ú_NamespaceView.__init__   s   € Ü×Ñ˜4  qÖ)ó    c                ó`   €  V P                   V,          #   \         d    \        T4      R hi ; i©N)r   ÚKeyErrorÚAttributeError©r	   Únames   &&r   Ú__getattr__Ú_NamespaceView.__getattr__   s1   € ð	1Ø—7‘7˜4•=Ð øÜô 	1Ü  Ó&¨DÐ0ð	1ús   ‚ •-c                ó"   € W P                   V&   R # r   ©r   ©r	   r   Úvalues   &&&r   r   Ú_NamespaceView.__setattr__   s   € Ø�‰�‹r   © Nr   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   r   r   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s&   ø‡ € ñWð €Iò*ò1÷ð r   r   c                ó$   € V ^8„  d   QhR\         /# )é   r
   )Údict)Úformats   "r   Ú__annotate__r+   !   s   € ÷ ñ œ4ñ r   c                óÂ   € ^ RI p\        P                  P                  \        4      \        VRR4      3 F  pVf   K	  VP                  V J g   K  Vu # 	  \        V 4      # )zDThe module object whose namespace is ``g`` (or a live view over it).NÚbrowser_tool)ÚtoolsÚsysÚmodulesÚgetÚ_ORIGIN_NAMEÚgetattrÚ__dict__r   )r
   r.   Úmods   &  r   Ú_module_for_globalsr6   !   sM   € ãä—‘—‘¤Ó-¬w°u¸nÈdÓ/SÓTˆØŒ?˜sŸ|™|¨qÕ0ØŠJñ Uô ˜!ÓÐr   c                ó$   € V ^8„  d   QhR\         /# )r(   Ú_depth)Úint)r*   s   "r   r+   r+   +   s   € ÷ ñ œ#ñ r   c                óZ  €  \         P                  ! V 4      pTpVeH   VP                  P	                  R4      \
        8X  d   \        VP                  4      # VP                  pKK  TpVek   \        VP                  P                  4       4       F5  p\        V\        4      '       g   K  \        VRR4      \
        8X  g   K3  Vu # 	  VP                  pKn  \         P                  P	                  \
        4      pVf   ^ RIp\        VRR4      pVf   ^ RIHp V#   \         d    Rp ELi ; i)a¯  The ``tools.browser_tool`` instance the *calling* moved function belongs to, mirroring
what in-file code would see: (1) the nearest enclosing frame executing origin code (the
exact module copy, even after a test purged/reloaded ``sys.modules``); (2) an origin
module referenced from a calling frame's globals; (3) ``sys.modules`` / ``tools``
package attribute / fresh import. ``_depth`` is the frame of the moved function's caller.Nr   r-   )r/   Ú	_getframeÚ
ValueErrorÚ	f_globalsr1   r2   r6   Úf_backÚlistÚvaluesÚ
isinstancer   r3   r0   r.   Útools.browser_toolr-   )r8   ÚstartÚframer   r5   r.   s   &     r   Úorigin_modulerE   +   sñ   € ðÜ—’˜fÓ%ˆð €EØ
Ò
Ø�?‰?×Ñ˜zÓ*¬lÔ:Ü& u§¡Ó7Ð7Ø—‘ŠØ€EØ
Ò
Ü˜%Ÿ/™/×0Ñ0Ó2Ö3ˆEÜ˜%¤×,Ô,´¸À
ÈDÓ1QÔUaÖ1aØ’ñ 4ð —‘ŠÜ
�+‰+�/‰/œ,Ó
'€CØ
‚{Ûä�e˜^¨TÓ2ˆØ
‚{Ý(Ø€Jøô) ô Ø‹ðús   ‚D ÄD*Ä)D*c                   ó4   a € ] tR t^Jt o RtRtR tR tRtV t	R# )Ú_OriginProxyzpModule-level ``_bt`` stand-in: every attribute read/write forwards to the origin
module resolved at that moment.c                ó,   € \        \        ^4      V4      # )é   )r3   rE   r   s   &&r   r   Ú_OriginProxy.__getattr__P   s   € Ü”} QÓ'¨Ó.Ð.r   c                ó0   € \        \        ^4      W4       R# )rI   N)ÚsetattrrE   r   s   &&&r   r   Ú_OriginProxy.__setattr__S   s   € Ü”˜aÓ  $Ö.r   r   N)
r   r   r   r    r!   r"   r   r   r#   r$   r%   s   @r   rG   rG   J   s    ø‡ € ñ'ð €Iò/÷/ð /r   rG   )r(   )
r!   r/   Útypesr   r2   r   r6   rE   rG   Úoriginr   r   r   Ú<module>rP      s>   ðñó Ý à#€÷ñ õ&÷÷>
/ñ 
/ñ 
‹‚r   