orgo 0.0.19__py3-none-any.whl → 0.0.20__py3-none-any.whl

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/computer.py CHANGED
@@ -74,7 +74,10 @@ class Computer:
74
74
 
75
75
  def destroy(self) -> Dict[str, Any]:
76
76
  """Terminate and delete the computer instance"""
77
- return self.api.delete_computer(self.project_id)
77
+ result = self.api.delete_computer(self.project_id)
78
+ # Clear the local project cache after destroying
79
+ ProjectManager.clear_project_cache()
80
+ return result
78
81
 
79
82
  # Navigation methods
80
83
  def left_click(self, x: int, y: int) -> Dict[str, Any]:
orgo/project.py CHANGED
@@ -2,6 +2,7 @@
2
2
  """Project management for Orgo virtual environments"""
3
3
  import os
4
4
  import json
5
+ import shutil
5
6
  import logging
6
7
  from typing import Optional
7
8
 
@@ -40,6 +41,18 @@ class ProjectManager:
40
41
  logger.error(f"Failed to save project ID: {str(e)}")
41
42
  raise RuntimeError(f"Failed to save project configuration: {str(e)}") from e
42
43
 
44
+ @staticmethod
45
+ def clear_project_cache() -> None:
46
+ """Clear the .orgo folder and all its contents"""
47
+ project_dir = ProjectManager._get_project_dir()
48
+
49
+ if os.path.exists(project_dir):
50
+ try:
51
+ shutil.rmtree(project_dir)
52
+ logger.info(f"Cleared project cache at {project_dir}")
53
+ except (IOError, OSError) as e:
54
+ logger.warning(f"Failed to clear project cache: {str(e)}")
55
+
43
56
  @staticmethod
44
57
  def _get_project_dir() -> str:
45
58
  """Get the project directory path"""
@@ -48,4 +61,4 @@ class ProjectManager:
48
61
  @staticmethod
49
62
  def _get_config_path() -> str:
50
63
  """Get the full path to the config file"""
51
- return os.path.join(ProjectManager._get_project_dir(), "project.json")
64
+ return os.path.join(ProjectManager._get_project_dir(), "project.json")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orgo
3
- Version: 0.0.19
3
+ Version: 0.0.20
4
4
  Summary: Computers for AI agents
5
5
  Author: Orgo Team
6
6
  License: MIT
@@ -1,12 +1,12 @@
1
1
  orgo/__init__.py,sha256=TlOzDJqRKotAam631MdZcz8ypAqyWrLo-Px8HWLkrD0,131
2
- orgo/computer.py,sha256=iX4KUzsCljT-F5m-ZlrUAs43wy8zlJIEQfvN-ghiKMM,9284
3
- orgo/project.py,sha256=0rcii4AKLWP4GSbUzfnP4G7TMgmzjm6bj2n-22NIjmk,1779
2
+ orgo/computer.py,sha256=zp5cqkaSHHMIUTg04VfpUunlSPLKDrzlOPrUToxVQhw,9410
3
+ orgo/project.py,sha256=F90mYJKRZAoFSFw8HVAiosMoLyzVlf0QaKJgTyXoJ4A,2267
4
4
  orgo/prompt.py,sha256=ynblwXPTDp_aF1MbGBsY0PIEr9naklDaKFcfSE_EZ6E,19781
5
5
  orgo/api/__init__.py,sha256=9Tzb_OPJ5DH7Cg7OrHzpZZUT4ip05alpa9RLDYmnId8,113
6
6
  orgo/api/client.py,sha256=mCm1m_8k3DCCYSM0JvY29BI6HHlH0PjVXNnENHhvMvU,5799
7
7
  orgo/utils/__init__.py,sha256=W4G_nwGBf_7jy0w_mfcrkllurYHSRU4B5cMTVYH_uCc,123
8
8
  orgo/utils/auth.py,sha256=tPLBJY-6gdBQWLUjUbwIwxHphC3KoRT_XgP3Iykw3Mw,509
9
- orgo-0.0.19.dist-info/METADATA,sha256=Bs6WzId6JoTU0e93BMkvfceVKo8bN9GJzMNTig7TAy4,822
10
- orgo-0.0.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- orgo-0.0.19.dist-info/top_level.txt,sha256=q0rYtFji8GbYuhFW8A5Ab9e0j27761IKPhnL0E9xow4,5
12
- orgo-0.0.19.dist-info/RECORD,,
9
+ orgo-0.0.20.dist-info/METADATA,sha256=3dT1Vy4T4bcQ9RxOb1fqo-dVYCFCSnMcQ8aT7wQvEgo,822
10
+ orgo-0.0.20.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ orgo-0.0.20.dist-info/top_level.txt,sha256=q0rYtFji8GbYuhFW8A5Ab9e0j27761IKPhnL0E9xow4,5
12
+ orgo-0.0.20.dist-info/RECORD,,
File without changes