orgo 0.0.18__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orgo
3
- Version: 0.0.18
3
+ Version: 0.0.19
4
4
  Summary: Computers for AI agents
5
5
  Author: Orgo Team
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "orgo"
7
- version = "0.0.18"
7
+ version = "0.0.19"
8
8
  description = "Computers for AI agents"
9
9
  authors = [{name = "Orgo Team"}]
10
10
  license = {text = "MIT"}
@@ -51,16 +51,36 @@ 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 start_computer(self, project_id: str) -> Dict[str, Any]:
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}")
55
60
  return self._request("POST", f"projects/{project_id}/start")
56
61
 
57
- def stop_computer(self, project_id: str) -> Dict[str, Any]:
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}")
58
68
  return self._request("POST", f"projects/{project_id}/stop")
59
69
 
60
- def restart_computer(self, project_id: str) -> Dict[str, Any]:
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}")
61
76
  return self._request("POST", f"projects/{project_id}/restart")
62
77
 
63
- def delete_computer(self, project_id: str) -> Dict[str, Any]:
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}")
64
84
  return self._request("POST", f"projects/{project_id}/delete")
65
85
 
66
86
  # Computer control methods
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orgo
3
- Version: 0.0.18
3
+ Version: 0.0.19
4
4
  Summary: Computers for AI agents
5
5
  Author: Orgo Team
6
6
  License: MIT
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