Ryanhub - file viewer
filename: chat/__pycache__/sandbox.cpython-314.pyc
branch: main
back to repo
+
+��i���^RIt^RItRt]PP	]PP]4RR4t]PP]4'dA]	!]RRR7;_uu_4t
]P!]
4t]PR4tRRR4RR	ltR# +'giL;i ]dRtL&i;i)
�N�agentzconfig.json�rzutf-8)�encoding�	WORKSPACEc�0�V^8�dQhR\R\/#)��path�return)�str)�formats"�
sandbox.py�__annotate__rs����C��C��c��\V\4'g\R4h\PP\4pVPR4p\PP\PPW44p\PPW.4pYA8wd\R4hT# \d
\R4hi;i)zReturn a safely-normalized absolute path inside `WORKSPACE`.

Raises ValueError if the resolved path is outside the workspace.
zpath must be a stringz/\z attempted path outside workspace)
�
isinstancer�	TypeError�osr	�abspathr�lstrip�normpath�join�
commonpath�	Exception�
ValueError)r	�
abs_workspace�rel�joined�commons&    r
�	safe_pathrs����d�C� � ��/�0�0��G�G�O�O�I�.�M��+�+�e�
�C�
�W�W�
�
�b�g�g�l�l�=�>�
?�F�=����#�#�]�$;�<�����;�<�<��M���=��;�<�<�=�s� C�C)r�jsonrr	r�dirname�__file__�
_agent_cfg�exists�open�_f�load�_j�getrr�rr
�<module>r+s���	��
�	�
�W�W�\�\�"�'�'�/�/�(�3�W�m�
L�
��7�7�>�>�*����
�*�c�G�
4�
4�����2��B����{�+�I�5��
5�
4�����	��s0�#B=�6$B*�B=�*B:	�5B=�:B=�=	C	�C