"""Tool for exposing and retrieving preview URLs for sandbox ports."""
def__init__(self,sandbox:Sandbox):
super().__init__(sandbox)
self.workspace_path="/workspace"
@openapi_schema({
"type":"function",
"function":{
"name":"expose_port",
"description":"Expose a port from the agent's sandbox environment to the public internet and get its preview URL. This is essential for making services running in the sandbox accessible to users, such as web applications, APIs, or other network services. The exposed URL can be shared with users to allow them to interact with the sandbox environment.",
"parameters":{
"type":"object",
"properties":{
"port":{
"type":"integer",
"description":"The port number to expose. Must be a valid port number between 1 and 65535.",