orgo 0.0.17__tar.gz → 0.0.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {orgo-0.0.17 → orgo-0.0.19}/PKG-INFO +1 -1
- {orgo-0.0.17 → orgo-0.0.19}/pyproject.toml +1 -1
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/api/client.py +31 -5
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/computer.py +11 -3
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo.egg-info/PKG-INFO +1 -1
- {orgo-0.0.17 → orgo-0.0.19}/README.md +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/setup.cfg +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/__init__.py +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/api/__init__.py +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/project.py +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/prompt.py +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/utils/__init__.py +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo/utils/auth.py +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo.egg-info/SOURCES.txt +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo.egg-info/dependency_links.txt +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo.egg-info/requires.txt +0 -0
- {orgo-0.0.17 → orgo-0.0.19}/src/orgo.egg-info/top_level.txt +0 -0
|
@@ -51,11 +51,37 @@ class ApiClient:
|
|
|
51
51
|
def get_status(self, project_id: str) -> Dict[str, Any]:
|
|
52
52
|
return self._request("GET", f"projects/by-name/{project_id}")
|
|
53
53
|
|
|
54
|
-
def
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
def start_computer(self, project_name: str) -> Dict[str, Any]:
|
|
55
|
+
# Get the actual project ID from the name
|
|
56
|
+
project = self.get_status(project_name)
|
|
57
|
+
project_id = project.get("id")
|
|
58
|
+
if not project_id:
|
|
59
|
+
raise ValueError(f"Could not find ID for project {project_name}")
|
|
60
|
+
return self._request("POST", f"projects/{project_id}/start")
|
|
61
|
+
|
|
62
|
+
def stop_computer(self, project_name: str) -> Dict[str, Any]:
|
|
63
|
+
# Get the actual project ID from the name
|
|
64
|
+
project = self.get_status(project_name)
|
|
65
|
+
project_id = project.get("id")
|
|
66
|
+
if not project_id:
|
|
67
|
+
raise ValueError(f"Could not find ID for project {project_name}")
|
|
68
|
+
return self._request("POST", f"projects/{project_id}/stop")
|
|
69
|
+
|
|
70
|
+
def restart_computer(self, project_name: str) -> Dict[str, Any]:
|
|
71
|
+
# Get the actual project ID from the name
|
|
72
|
+
project = self.get_status(project_name)
|
|
73
|
+
project_id = project.get("id")
|
|
74
|
+
if not project_id:
|
|
75
|
+
raise ValueError(f"Could not find ID for project {project_name}")
|
|
76
|
+
return self._request("POST", f"projects/{project_id}/restart")
|
|
77
|
+
|
|
78
|
+
def delete_computer(self, project_name: str) -> Dict[str, Any]:
|
|
79
|
+
# Get the actual project ID from the name
|
|
80
|
+
project = self.get_status(project_name)
|
|
81
|
+
project_id = project.get("id")
|
|
82
|
+
if not project_id:
|
|
83
|
+
raise ValueError(f"Could not find ID for project {project_name}")
|
|
84
|
+
return self._request("POST", f"projects/{project_id}/delete")
|
|
59
85
|
|
|
60
86
|
# Computer control methods
|
|
61
87
|
def left_click(self, project_id: str, x: int, y: int) -> Dict[str, Any]:
|
|
@@ -60,13 +60,21 @@ class Computer:
|
|
|
60
60
|
"""Get current computer status"""
|
|
61
61
|
return self.api.get_status(self.project_id)
|
|
62
62
|
|
|
63
|
+
def start(self) -> Dict[str, Any]:
|
|
64
|
+
"""Start the computer"""
|
|
65
|
+
return self.api.start_computer(self.project_id)
|
|
66
|
+
|
|
67
|
+
def stop(self) -> Dict[str, Any]:
|
|
68
|
+
"""Stop the computer"""
|
|
69
|
+
return self.api.stop_computer(self.project_id)
|
|
70
|
+
|
|
63
71
|
def restart(self) -> Dict[str, Any]:
|
|
64
72
|
"""Restart the computer"""
|
|
65
73
|
return self.api.restart_computer(self.project_id)
|
|
66
74
|
|
|
67
|
-
def
|
|
68
|
-
"""Terminate the computer instance"""
|
|
69
|
-
return self.api.
|
|
75
|
+
def destroy(self) -> Dict[str, Any]:
|
|
76
|
+
"""Terminate and delete the computer instance"""
|
|
77
|
+
return self.api.delete_computer(self.project_id)
|
|
70
78
|
|
|
71
79
|
# Navigation methods
|
|
72
80
|
def left_click(self, x: int, y: int) -> Dict[str, Any]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|