Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

added status endpoint with OS

Dillon DuPont5db20b999539
diff --git a/libs/python/computer-server/computer_server/main.py b/libs/python/computer-server/computer_server/main.py
index 401b7b9a26..5d028766da 100644
--- a/libs/python/computer-server/computer_server/main.py
+++ b/libs/python/computer-server/computer_server/main.py
@@ -198,6 +198,14 @@ class ConnectionManager:
manager = ConnectionManager()
auth_manager = AuthenticationManager()
+async def status():
+ sys = platform.system().lower()
+ if "darwin" in sys or sys == "macos" or sys == "mac":
+ sys = "mac"
+ if "windows" in sys:
+ sys = "windows"
+ return {"status": "ok", "os": sys}
@app.websocket("/ws", name="websocket_endpoint")
async def websocket_endpoint(websocket: WebSocket):
@@ -332,7 +340,6 @@ async def websocket_endpoint(websocket: WebSocket):
pass
manager.disconnect(websocket)
-
@app.post("/cmd")
async def cmd_endpoint(
request: Request,
@@ -427,7 +434,6 @@ async def cmd_endpoint(
}
)
-
@app.post("/responses")
async def agent_response_endpoint(
request: Request,