Ryanhub - file viewer
filename: chat/__pycache__/sandbox.cpython-310.pyc
branch: main
back to repo
o

+��i�@s�ddlZddlZdZej�ej�e�dd�Zej�e�rKz#e	eddd��Z
e�e
�Ze�
d�ZWd�n1s9wYWneyJdZYnwded	efd
d�ZdS)�N�agentzconfig.json�rzutf-8)�encoding�	WORKSPACE�path�returncCs~t|t�s	td��tj�t�}|�d�}tj�tj�	||��}z
tj�
||g�}Wnty4td��w||kr=td��|S)z�Return 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)
�
isinstance�str�	TypeError�osr�abspathr�lstrip�normpath�join�
commonpath�	Exception�
ValueError)rZ
abs_workspace�relZjoined�common�r�/C:\Users\Ralpo\OneDrive\Desktop\chat\sandbox.py�	safe_paths

�r)r�jsonrrr�dirname�__file__�
_agent_cfg�exists�open�_f�load�_j�getrr	rrrrr�<module>s
���