orgo 0.0.2__py3-none-any.whl → 0.0.4__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/api/client.py CHANGED
@@ -1,4 +1,4 @@
1
- """Low-level API client for Orgo service"""
1
+ """API client for Orgo service"""
2
2
 
3
3
  import requests
4
4
  from typing import Dict, Any, Optional
@@ -41,8 +41,9 @@ class ApiClient:
41
41
  raise Exception(f"Connection error: {str(e)}") from e
42
42
 
43
43
  # Computer lifecycle methods
44
- def create_computer(self) -> Dict[str, Any]:
45
- return self._request("POST", "computers")
44
+ def create_computer(self, config: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
45
+ """Create a new project with desktop instance"""
46
+ return self._request("POST", "projects", {"config": config} if config else None)
46
47
 
47
48
  def connect_computer(self, project_id: str) -> Dict[str, Any]:
48
49
  return self._request("GET", f"computers/{project_id}")
orgo/computer.py CHANGED
@@ -9,15 +9,25 @@ from PIL import Image
9
9
  from .api.client import ApiClient
10
10
 
11
11
  class Computer:
12
- def __init__(self, project_id=None, api_key=None):
12
+ def __init__(self, project_id: Optional[str] = None, api_key: Optional[str] = None, config: Optional[Dict[str, Any]] = None):
13
+ """
14
+ Initialize a computer instance.
15
+
16
+ Args:
17
+ project_id: Existing project ID to connect to
18
+ api_key: API key for authentication (falls back to ORGO_API_KEY env var)
19
+ config: Configuration for creating a new computer
20
+ """
13
21
  self.api = ApiClient(api_key or os.environ.get("ORGO_API_KEY"))
22
+ self._info = {}
14
23
 
15
24
  if project_id:
25
+ # Simply set the project ID if provided
16
26
  self.project_id = project_id
17
- self._info = self.api.connect_computer(project_id)
18
27
  else:
19
- response = self.api.create_computer()
20
- self.project_id = response.get("project_id")
28
+ # Create a new computer instance
29
+ response = self.api.create_computer(config)
30
+ self.project_id = response.get("id")
21
31
  self._info = response
22
32
 
23
33
  if not self.project_id:
@@ -65,13 +75,13 @@ class Computer:
65
75
  def screenshot(self) -> Image.Image:
66
76
  """Capture screenshot and return as PIL Image"""
67
77
  response = self.api.get_screenshot(self.project_id)
68
- img_data = base64.b64decode(response.get("screenshot", ""))
78
+ img_data = base64.b64decode(response.get("image", ""))
69
79
  return Image.open(io.BytesIO(img_data))
70
80
 
71
81
  def screenshot_base64(self) -> str:
72
82
  """Capture screenshot and return as base64 string"""
73
83
  response = self.api.get_screenshot(self.project_id)
74
- return response.get("screenshot", "")
84
+ return response.get("image", "")
75
85
 
76
86
  # Execution methods
77
87
  def bash(self, command: str) -> str:
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.4
2
+ Name: orgo
3
+ Version: 0.0.4
4
+ Summary: Desktop infrastructure for AI agents
5
+ Author: Orgo Team
6
+ License: MIT
7
+ Project-URL: Homepage, https://www.orgo.ai
8
+ Project-URL: Documentation, https://docs.orgo.ai
9
+ Requires-Python: >=3.7
10
+ Description-Content-Type: text/markdown
11
+ Requires-Dist: requests>=2.25.0
12
+ Requires-Dist: pillow>=8.0.0
13
+
14
+ # Orgo SDK
15
+
16
+ Desktop infrastructure for AI agents.
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ pip install orgo
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ```python
27
+ from orgo import Computer
28
+
29
+ # Create computer
30
+ computer = Computer()
31
+
32
+ # Control
33
+ computer.left_click(100, 200)
34
+ computer.type("Hello world")
35
+ computer.key("Enter")
36
+ computer.screenshot() # Returns PIL Image
37
+
38
+ # Cleanup
39
+ computer.shutdown()
40
+ ```
41
+
42
+ Full documentation: [docs.orgo.ai](https://docs.orgo.ai)
@@ -1,14 +1,14 @@
1
1
  orgo/__init__.py,sha256=SjO41JOwyLmX8K6fKu7LAIOyBk8sAtQKRaNVu2wZVBE,108
2
- orgo/computer.py,sha256=WJgCESNwDf4aU454upvwuAGwQgCD1zHti7faNOv73X0,3249
2
+ orgo/computer.py,sha256=o9QC1pCfd13o47JRnpHj0mP9nn2efYvClWu9qxqcvE0,3662
3
3
  orgo/adapters/__init__.py,sha256=LMpWJGVHvvSrLPhCJrMSENYSJ8ifWIpTfi88L6aN65I,219
4
4
  orgo/adapters/anthropic.py,sha256=KfPD5YWbwECZkpj421rSLCQf9SMr-EJ4nePe2EMXDWA,2342
5
5
  orgo/adapters/base.py,sha256=W1dNArKn1ri-X_36KuN-h5yxh1LmjIYCZMkKi9dm020,559
6
6
  orgo/adapters/openai.py,sha256=3NFmUYmaCSXHZImMvqj-fVc8oUxxrcU_6voBx2eFf5A,2605
7
7
  orgo/api/__init__.py,sha256=nE9fyIZw2q4mGqy063-1RAbBgy_Qhx11gN_swkhmbX8,86
8
- orgo/api/client.py,sha256=c-Wiymvre4v7psdgvu2aKZfBc7R8QimHfu5UrQl0H2s,4057
8
+ orgo/api/client.py,sha256=x-5tK_8cBnF1a8chkleHpJt1JEOQ561hTMVOxQOKTDg,4184
9
9
  orgo/utils/__init__.py,sha256=XSx9W-IPAc7yDnkwgED4v5eBUIQCxmokr_VQzF6LOZs,94
10
10
  orgo/utils/auth.py,sha256=mpnaOvM3BGIdZ_j9cTw8K34gPpCeLRrG0rZfoojzONc,484
11
- orgo-0.0.2.dist-info/METADATA,sha256=8NEJnaANllG7P4d4kg18tisNiaMjPC5q-zR3I3aavio,301
12
- orgo-0.0.2.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
13
- orgo-0.0.2.dist-info/top_level.txt,sha256=q0rYtFji8GbYuhFW8A5Ab9e0j27761IKPhnL0E9xow4,5
14
- orgo-0.0.2.dist-info/RECORD,,
11
+ orgo-0.0.4.dist-info/METADATA,sha256=lPDhaIW5LCygSH3DTXSbTOS9uuys8eX5CTlLR0_bOsc,750
12
+ orgo-0.0.4.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
13
+ orgo-0.0.4.dist-info/top_level.txt,sha256=q0rYtFji8GbYuhFW8A5Ab9e0j27761IKPhnL0E9xow4,5
14
+ orgo-0.0.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,11 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: orgo
3
- Version: 0.0.2
4
- Summary: Desktop infrastructure for AI agents
5
- Author: Orgo Team
6
- License: MIT
7
- Project-URL: Homepage, https://www.orgo.ai
8
- Project-URL: Documentation, https://docs.orgo.ai
9
- Requires-Python: >=3.7
10
- Requires-Dist: requests>=2.25.0
11
- Requires-Dist: pillow>=8.0.0