orgo 0.0.31__tar.gz → 0.0.32__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.31
3
+ Version: 0.0.32
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.31"
7
+ version = "0.0.32"
8
8
  description = "Computers for AI agents"
9
9
  authors = [{name = "Orgo Team"}]
10
10
  license = {text = "MIT"}
@@ -47,8 +47,8 @@ class Computer:
47
47
  # Create computer in existing project
48
48
  computer = Computer(project="manus", ram=4, cpu=2)
49
49
 
50
- # Connect to existing computer in project
51
- computer = Computer(project="manus")
50
+ # Connect to existing computer by ID
51
+ computer = Computer(computer_id="11c4fd46-e069-4c32-be65-f82d9f87b9b8")
52
52
  """
53
53
  self.api_key = api_key or operating_system.environ.get("ORGO_API_KEY")
54
54
  self.base_api_url = base_api_url
@@ -65,8 +65,12 @@ class Computer:
65
65
  self.gpu = gpu or "none"
66
66
 
67
67
  if computer_id:
68
- # Connect to existing computer by ID
69
- self._connect_by_id(computer_id)
68
+ # Just store the computer ID, no API call needed
69
+ self.computer_id = computer_id
70
+ self.name = name
71
+ self.project_id = None
72
+ self.project_name = None
73
+ logger.info(f"Connected to computer ID: {self.computer_id}")
70
74
  elif project:
71
75
  # Work with specified project
72
76
  if isinstance(project, str):
@@ -86,17 +90,6 @@ class Computer:
86
90
  # No project specified, create a new one
87
91
  self._create_new_project_and_computer(name)
88
92
 
89
- def _connect_by_id(self, computer_id: str):
90
- """Connect to existing computer by ID"""
91
- self.computer_id = computer_id
92
- self._info = self.api.get_computer(computer_id)
93
- self.project_id = self._info.get("project_id")
94
- self.name = self._info.get("name")
95
- # Get project name
96
- if self.project_id:
97
- project = self.api.get_project(self.project_id)
98
- self.project_name = project.get("name")
99
-
100
93
  def _initialize_with_project_name(self, project_name: str, computer_name: Optional[str]):
101
94
  """Initialize with a project name (create project if needed)"""
102
95
  try:
@@ -165,7 +158,6 @@ class Computer:
165
158
  """Connect to an existing computer"""
166
159
  self.computer_id = computer_info.get("id")
167
160
  self.name = computer_info.get("name")
168
- self._info = computer_info
169
161
  logger.info(f"Connected to existing computer {self.name} (ID: {self.computer_id})")
170
162
 
171
163
  def _create_computer(self, project_id: str, computer_name: Optional[str]):
@@ -195,7 +187,6 @@ class Computer:
195
187
  gpu=self.gpu
196
188
  )
197
189
  self.computer_id = computer.get("id")
198
- self._info = computer
199
190
  logger.info(f"Created new computer {self.name} (ID: {self.computer_id})")
200
191
 
201
192
  def status(self) -> Dict[str, Any]:
@@ -330,4 +321,6 @@ class Computer:
330
321
  )
331
322
 
332
323
  def __repr__(self):
333
- return f"Computer(name='{self.name}', project='{self.project_name}', id='{self.computer_id}')"
324
+ project_str = f", project='{self.project_name}'" if hasattr(self, 'project_name') and self.project_name else ""
325
+ name_str = f"name='{self.name}'" if hasattr(self, 'name') and self.name else f"id='{self.computer_id}'"
326
+ return f"Computer({name_str}{project_str})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orgo
3
- Version: 0.0.31
3
+ Version: 0.0.32
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