orgo 0.0.22__py3-none-any.whl → 0.0.24__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 +29 -1
- orgo/computer.py +63 -0
- {orgo-0.0.22.dist-info → orgo-0.0.24.dist-info}/METADATA +1 -1
- {orgo-0.0.22.dist-info → orgo-0.0.24.dist-info}/RECORD +6 -6
- {orgo-0.0.22.dist-info → orgo-0.0.24.dist-info}/WHEEL +0 -0
- {orgo-0.0.22.dist-info → orgo-0.0.24.dist-info}/top_level.txt +0 -0
orgo/api/client.py
CHANGED
|
@@ -101,6 +101,19 @@ class ApiClient:
|
|
|
101
101
|
"button": "left", "x": x, "y": y, "double": True
|
|
102
102
|
})
|
|
103
103
|
|
|
104
|
+
def drag(self, project_id: str, start_x: int, start_y: int,
|
|
105
|
+
end_x: int, end_y: int, button: str = "left",
|
|
106
|
+
duration: float = 0.5) -> Dict[str, Any]:
|
|
107
|
+
"""Perform a drag operation from start to end coordinates"""
|
|
108
|
+
return self._request("POST", f"computers/{project_id}/drag", {
|
|
109
|
+
"start_x": start_x,
|
|
110
|
+
"start_y": start_y,
|
|
111
|
+
"end_x": end_x,
|
|
112
|
+
"end_y": end_y,
|
|
113
|
+
"button": button,
|
|
114
|
+
"duration": duration
|
|
115
|
+
})
|
|
116
|
+
|
|
104
117
|
def scroll(self, project_id: str, direction: str, amount: int) -> Dict[str, Any]:
|
|
105
118
|
return self._request("POST", f"computers/{project_id}/scroll", {
|
|
106
119
|
"direction": direction, "amount": amount
|
|
@@ -134,4 +147,19 @@ class ApiClient:
|
|
|
134
147
|
def wait(self, project_id: str, seconds: float) -> Dict[str, Any]:
|
|
135
148
|
return self._request("POST", f"computers/{project_id}/wait", {
|
|
136
149
|
"seconds": seconds
|
|
137
|
-
})
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
# Streaming methods
|
|
153
|
+
def start_stream(self, project_id: str, connection_name: str) -> Dict[str, Any]:
|
|
154
|
+
"""Start streaming to a configured RTMP connection"""
|
|
155
|
+
return self._request("POST", f"computers/{project_id}/stream/start", {
|
|
156
|
+
"connection_name": connection_name
|
|
157
|
+
})
|
|
158
|
+
|
|
159
|
+
def stop_stream(self, project_id: str) -> Dict[str, Any]:
|
|
160
|
+
"""Stop the active stream"""
|
|
161
|
+
return self._request("POST", f"computers/{project_id}/stream/stop")
|
|
162
|
+
|
|
163
|
+
def get_stream_status(self, project_id: str) -> Dict[str, Any]:
|
|
164
|
+
"""Get current stream status"""
|
|
165
|
+
return self._request("GET", f"computers/{project_id}/stream/status")
|
orgo/computer.py
CHANGED
|
@@ -132,6 +132,24 @@ class Computer:
|
|
|
132
132
|
"""Perform double click at specified coordinates"""
|
|
133
133
|
return self.api.double_click(self.project_id, x, y)
|
|
134
134
|
|
|
135
|
+
def drag(self, start_x: int, start_y: int, end_x: int, end_y: int,
|
|
136
|
+
button: str = "left", duration: float = 0.5) -> Dict[str, Any]:
|
|
137
|
+
"""
|
|
138
|
+
Perform a smooth drag operation from start to end coordinates.
|
|
139
|
+
|
|
140
|
+
Args:
|
|
141
|
+
start_x: Starting X coordinate
|
|
142
|
+
start_y: Starting Y coordinate
|
|
143
|
+
end_x: Ending X coordinate
|
|
144
|
+
end_y: Ending Y coordinate
|
|
145
|
+
button: Mouse button to use ("left" or "right", default: "left")
|
|
146
|
+
duration: Duration of the drag in seconds (0.1 to 5.0, default: 0.5)
|
|
147
|
+
|
|
148
|
+
Returns:
|
|
149
|
+
Dict with operation result
|
|
150
|
+
"""
|
|
151
|
+
return self.api.drag(self.project_id, start_x, start_y, end_x, end_y, button, duration)
|
|
152
|
+
|
|
135
153
|
def scroll(self, direction: str = "down", amount: int = 1) -> Dict[str, Any]:
|
|
136
154
|
"""Scroll in specified direction and amount"""
|
|
137
155
|
return self.api.scroll(self.project_id, direction, amount)
|
|
@@ -218,6 +236,51 @@ print(f"Files: {os.listdir('.')}")
|
|
|
218
236
|
"""Wait for specified number of seconds"""
|
|
219
237
|
return self.api.wait(self.project_id, seconds)
|
|
220
238
|
|
|
239
|
+
# Streaming methods
|
|
240
|
+
def start_stream(self, connection: str) -> Dict[str, Any]:
|
|
241
|
+
"""
|
|
242
|
+
Start streaming the computer screen to an RTMP server.
|
|
243
|
+
|
|
244
|
+
Args:
|
|
245
|
+
connection: Name of the RTMP connection configured in settings (e.g., "my-twitch-1")
|
|
246
|
+
|
|
247
|
+
Returns:
|
|
248
|
+
Dict with streaming status information
|
|
249
|
+
|
|
250
|
+
Example:
|
|
251
|
+
# First configure a connection in settings at https://www.orgo.ai/settings
|
|
252
|
+
# Then start streaming
|
|
253
|
+
computer.start_stream("my-twitch-1")
|
|
254
|
+
|
|
255
|
+
# Do your demo/automation
|
|
256
|
+
computer.type("Hello viewers!")
|
|
257
|
+
|
|
258
|
+
# Stop streaming when done
|
|
259
|
+
computer.stop_stream()
|
|
260
|
+
"""
|
|
261
|
+
return self.api.start_stream(self.project_id, connection)
|
|
262
|
+
|
|
263
|
+
def stop_stream(self) -> Dict[str, Any]:
|
|
264
|
+
"""
|
|
265
|
+
Stop the active stream.
|
|
266
|
+
|
|
267
|
+
Returns:
|
|
268
|
+
Dict with stop status information
|
|
269
|
+
"""
|
|
270
|
+
return self.api.stop_stream(self.project_id)
|
|
271
|
+
|
|
272
|
+
def stream_status(self) -> Dict[str, Any]:
|
|
273
|
+
"""
|
|
274
|
+
Get the current streaming status.
|
|
275
|
+
|
|
276
|
+
Returns:
|
|
277
|
+
Dict with keys:
|
|
278
|
+
- status: "idle", "streaming", or "terminated"
|
|
279
|
+
- start_time: ISO timestamp when stream started (if streaming)
|
|
280
|
+
- pid: Process ID of ffmpeg (if streaming)
|
|
281
|
+
"""
|
|
282
|
+
return self.api.get_stream_status(self.project_id)
|
|
283
|
+
|
|
221
284
|
# AI control method
|
|
222
285
|
def prompt(self,
|
|
223
286
|
instruction: str,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
orgo/__init__.py,sha256=TlOzDJqRKotAam631MdZcz8ypAqyWrLo-Px8HWLkrD0,131
|
|
2
|
-
orgo/computer.py,sha256=
|
|
2
|
+
orgo/computer.py,sha256=44jqFqANITalNt-7hsDn-UKVJZCyqR-63wrxAyTnpmw,13629
|
|
3
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
|
-
orgo/api/client.py,sha256=
|
|
6
|
+
orgo/api/client.py,sha256=MgOg5shKzsOVsablvtTa39_ms-OdrmFMW1pD07C6PTs,7045
|
|
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.
|
|
10
|
-
orgo-0.0.
|
|
11
|
-
orgo-0.0.
|
|
12
|
-
orgo-0.0.
|
|
9
|
+
orgo-0.0.24.dist-info/METADATA,sha256=uidJBILPzxo19T-6DJS6xYb8JSqSMfxuEU8113xAQMA,822
|
|
10
|
+
orgo-0.0.24.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
orgo-0.0.24.dist-info/top_level.txt,sha256=q0rYtFji8GbYuhFW8A5Ab9e0j27761IKPhnL0E9xow4,5
|
|
12
|
+
orgo-0.0.24.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|