from src.infrastructure.tools.registry import tool_registry from src.infrastructure.sandbox.docker_manager import docker_sandbox async def file_read(session_id: str, path: str) -> str: """Read a file from the sandbox""" if not docker_sandbox: return "Error: Sandbox unavailable" return await docker_sandbox.read_file(session_id, path) tool_registry.register( name="file_read", description="Read a file from the sandbox", parameters={ "type": "OBJECT", "properties": { "session_id": {"type": "STRING", "description": "The session ID"}, "path": {"type": "STRING", "description": "The file path"} }, "required": ["session_id", "path"] }, func=file_read )