use-computer 0.0.43__tar.gz → 0.0.44__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.
- {use_computer-0.0.43 → use_computer-0.0.44}/PKG-INFO +7 -2
- {use_computer-0.0.43 → use_computer-0.0.44}/README.md +6 -1
- {use_computer-0.0.43 → use_computer-0.0.44}/pyproject.toml +1 -1
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/core/sandbox.py +29 -2
- {use_computer-0.0.43 → use_computer-0.0.44}/.env.example +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/.gitignore +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/.pre-commit-config.yaml +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/scripts/smoke_wheel.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/actions.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/agent.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/artifacts.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/desktop.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/final_state.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/prompts.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/recordings.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/sandbox.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/screenshots.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/task_setup.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/base/trajectory.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/core.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/debug/README.md +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/debug/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/debug/actions.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/debug/agent.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/debug/models.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/ios/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/ios/agent.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/ios/tools.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/prompts/anthropic.txt +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/prompts/gemini.txt +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/prompts/ios.txt +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/prompts/openai.txt +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/prompts/osworld_pyautogui.txt +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/prompts/pyautogui.txt +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/providers/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/providers/anthropic.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/providers/gemini.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/providers/generic.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/providers/openai.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/providers/osworld.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/providers/tinker_backend.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/types.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/automation/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/automation/ax_transpile.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/automation/osworld.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/automation/parsers.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/core/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/core/client.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/core/errors.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/core/models.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/core/retry.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/harbor/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/harbor/agents.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/ios/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/ios/apps.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/ios/environment.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/ios/input.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/ios/simulators.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/macos/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/macos/keyboard.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/macos/mouse.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/py.typed +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/resources/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/resources/accessibility.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/resources/display.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/resources/recording.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/resources/screenshot.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/setup_files.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/pre_command.ps1 +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/pre_command.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/task.toml +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ios.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ios_nograder.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_macos.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_macos_check.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_macos_nograder.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ubuntu.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ubuntu_check.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ubuntu_nograder.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_windows.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_windows_check.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_windows_nograder.sh +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/windows/__init__.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/use_computer/windows/shell.py +0 -0
- {use_computer-0.0.43 → use_computer-0.0.44}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: use-computer
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.44
|
|
4
4
|
Summary: Python SDK for use.computer sandboxes across macOS, iOS simulators, Windows, and Ubuntu
|
|
5
5
|
Project-URL: Homepage, https://use.computer
|
|
6
6
|
Project-URL: Documentation, https://api.use.computer/docs
|
|
@@ -53,6 +53,11 @@ Base installs only the SDK client and `httpx`. The `agents` extra installs the
|
|
|
53
53
|
agent runtime plus model-provider dependencies; `harbor` installs Harbor for
|
|
54
54
|
`use_computer.harbor.agents`.
|
|
55
55
|
|
|
56
|
+
Sandboxes default to `ephemeral=True`, so they are deleted after roughly 2
|
|
57
|
+
minutes without activity. Use `ephemeral=False` when a sandbox should persist
|
|
58
|
+
until manual deletion, or call `sandbox.start_keepalive(interval=30)` during
|
|
59
|
+
long model-think/install periods.
|
|
60
|
+
|
|
56
61
|
```python
|
|
57
62
|
from use_computer.agents import AnthropicComputerAgent
|
|
58
63
|
```
|
|
@@ -202,7 +207,7 @@ visionOS yet. Use it for read-only flows for now.
|
|
|
202
207
|
| [`examples/_2_hello_ios.py`](examples/_2_hello_ios.py) | create iPhone sim → open URL → screenshot |
|
|
203
208
|
| [`examples/_3_recording.py`](examples/_3_recording.py) | start / stop / download a screen recording |
|
|
204
209
|
| [`examples/_4_file_transfer.py`](examples/_4_file_transfer.py) | upload bytes, download a file back |
|
|
205
|
-
| [`examples/_5_keepalive.py`](examples/_5_keepalive.py) | heartbeat for sessions idle > 2 min
|
|
210
|
+
| [`examples/_5_keepalive.py`](examples/_5_keepalive.py) | heartbeat for ephemeral sessions idle > 2 min |
|
|
206
211
|
| [`examples/_6_hello_tvos.py`](examples/_6_hello_tvos.py) | tvOS: pick TV family + drive the Apple Remote |
|
|
207
212
|
| [`examples/_7_hello_windows.py`](examples/_7_hello_windows.py) | create Windows → run PowerShell → screenshot |
|
|
208
213
|
| [`examples/_8_hello_ubuntu.py`](examples/_8_hello_ubuntu.py) | create Ubuntu → run bash → screenshot |
|
|
@@ -19,6 +19,11 @@ Base installs only the SDK client and `httpx`. The `agents` extra installs the
|
|
|
19
19
|
agent runtime plus model-provider dependencies; `harbor` installs Harbor for
|
|
20
20
|
`use_computer.harbor.agents`.
|
|
21
21
|
|
|
22
|
+
Sandboxes default to `ephemeral=True`, so they are deleted after roughly 2
|
|
23
|
+
minutes without activity. Use `ephemeral=False` when a sandbox should persist
|
|
24
|
+
until manual deletion, or call `sandbox.start_keepalive(interval=30)` during
|
|
25
|
+
long model-think/install periods.
|
|
26
|
+
|
|
22
27
|
```python
|
|
23
28
|
from use_computer.agents import AnthropicComputerAgent
|
|
24
29
|
```
|
|
@@ -168,7 +173,7 @@ visionOS yet. Use it for read-only flows for now.
|
|
|
168
173
|
| [`examples/_2_hello_ios.py`](examples/_2_hello_ios.py) | create iPhone sim → open URL → screenshot |
|
|
169
174
|
| [`examples/_3_recording.py`](examples/_3_recording.py) | start / stop / download a screen recording |
|
|
170
175
|
| [`examples/_4_file_transfer.py`](examples/_4_file_transfer.py) | upload bytes, download a file back |
|
|
171
|
-
| [`examples/_5_keepalive.py`](examples/_5_keepalive.py) | heartbeat for sessions idle > 2 min
|
|
176
|
+
| [`examples/_5_keepalive.py`](examples/_5_keepalive.py) | heartbeat for ephemeral sessions idle > 2 min |
|
|
172
177
|
| [`examples/_6_hello_tvos.py`](examples/_6_hello_tvos.py) | tvOS: pick TV family + drive the Apple Remote |
|
|
173
178
|
| [`examples/_7_hello_windows.py`](examples/_7_hello_windows.py) | create Windows → run PowerShell → screenshot |
|
|
174
179
|
| [`examples/_8_hello_ubuntu.py`](examples/_8_hello_ubuntu.py) | create Ubuntu → run bash → screenshot |
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "use-computer"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.44"
|
|
8
8
|
description = "Python SDK for use.computer sandboxes across macOS, iOS simulators, Windows, and Ubuntu"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -101,6 +101,17 @@ def _stop_keepalive_thread(
|
|
|
101
101
|
thread.join(timeout=2)
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
class _CompletedAwaitable:
|
|
105
|
+
def __await__(self):
|
|
106
|
+
if False:
|
|
107
|
+
yield None
|
|
108
|
+
return None
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def _keepalive_running(thread: threading.Thread | None) -> bool:
|
|
112
|
+
return thread is not None and thread.is_alive()
|
|
113
|
+
|
|
114
|
+
|
|
104
115
|
# ---------------------------------------------------------------------------
|
|
105
116
|
# Sync
|
|
106
117
|
# ---------------------------------------------------------------------------
|
|
@@ -177,10 +188,17 @@ class Sandbox:
|
|
|
177
188
|
|
|
178
189
|
def start_keepalive(self, interval: float = 30.0) -> None:
|
|
179
190
|
"""Start a background thread that pings the gateway every `interval` seconds."""
|
|
191
|
+
if _keepalive_running(self._keepalive_thread):
|
|
192
|
+
return
|
|
180
193
|
self._keepalive_stop, self._keepalive_thread = _start_keepalive_thread(
|
|
181
194
|
self._http, self._prefix, interval
|
|
182
195
|
)
|
|
183
196
|
|
|
197
|
+
def keepalive(self) -> None:
|
|
198
|
+
"""Reset the gateway idle timer once."""
|
|
199
|
+
resp = self._http.post(f"{self._prefix}/keepalive")
|
|
200
|
+
resp.raise_for_status()
|
|
201
|
+
|
|
184
202
|
def stop_keepalive(self) -> None:
|
|
185
203
|
"""Stop the keepalive background thread."""
|
|
186
204
|
_stop_keepalive_thread(self._keepalive_stop, self._keepalive_thread)
|
|
@@ -602,21 +620,30 @@ class AsyncSandbox:
|
|
|
602
620
|
platform=data.get("platform", self.type.value),
|
|
603
621
|
)
|
|
604
622
|
|
|
605
|
-
|
|
623
|
+
def start_keepalive(self, interval: float = 30.0) -> _CompletedAwaitable:
|
|
606
624
|
"""Start a background OS thread that pings the gateway every `interval` seconds.
|
|
607
625
|
|
|
608
626
|
Uses a real thread (not an asyncio task) so it fires reliably even when
|
|
609
627
|
the event loop is blocked by sync calls (e.g. sync Anthropic client).
|
|
610
628
|
"""
|
|
629
|
+
if _keepalive_running(self._keepalive_thread):
|
|
630
|
+
return _CompletedAwaitable()
|
|
611
631
|
self._keepalive_stop, self._keepalive_thread = _start_keepalive_thread(
|
|
612
632
|
self._http, self._prefix, interval
|
|
613
633
|
)
|
|
634
|
+
return _CompletedAwaitable()
|
|
635
|
+
|
|
636
|
+
async def keepalive(self) -> None:
|
|
637
|
+
"""Reset the gateway idle timer once."""
|
|
638
|
+
resp = await self._http.post(f"{self._prefix}/keepalive")
|
|
639
|
+
resp.raise_for_status()
|
|
614
640
|
|
|
615
|
-
|
|
641
|
+
def stop_keepalive(self) -> _CompletedAwaitable:
|
|
616
642
|
"""Stop the keepalive background thread."""
|
|
617
643
|
_stop_keepalive_thread(self._keepalive_stop, self._keepalive_thread)
|
|
618
644
|
self._keepalive_stop = None
|
|
619
645
|
self._keepalive_thread = None
|
|
646
|
+
return _CompletedAwaitable()
|
|
620
647
|
|
|
621
648
|
async def close(self):
|
|
622
649
|
await self.stop_keepalive()
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/agents/prompts/osworld_pyautogui.txt
RENAMED
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ios_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_macos_check.sh
RENAMED
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_macos_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ubuntu_check.sh
RENAMED
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_ubuntu_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_windows_check.sh
RENAMED
|
File without changes
|
{use_computer-0.0.43 → use_computer-0.0.44}/use_computer/tasks/templates/test_windows_nograder.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|