use-computer 0.0.7__tar.gz → 0.0.8__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.
Files changed (43) hide show
  1. {use_computer-0.0.7 → use_computer-0.0.8}/PKG-INFO +1 -1
  2. {use_computer-0.0.7 → use_computer-0.0.8}/pyproject.toml +3 -3
  3. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/__init__.py +9 -9
  4. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/ax_transpile.py +1 -1
  5. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/client.py +8 -8
  6. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/display.py +1 -1
  7. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/errors.py +4 -4
  8. use_computer-0.0.8/use_computer/ios/__init__.py +14 -0
  9. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/ios/apps.py +1 -1
  10. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/ios/environment.py +1 -1
  11. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/ios/input.py +1 -1
  12. use_computer-0.0.8/use_computer/macos/__init__.py +4 -0
  13. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/macos/keyboard.py +1 -1
  14. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/macos/mouse.py +1 -1
  15. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/parsers.py +3 -3
  16. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/recording.py +1 -1
  17. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/retry.py +2 -2
  18. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/sandbox.py +11 -11
  19. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/__init__.py +1 -1
  20. use_computer-0.0.7/mmini/ios/__init__.py +0 -14
  21. use_computer-0.0.7/mmini/macos/__init__.py +0 -4
  22. use_computer-0.0.7/use_computer/__init__.py +0 -15
  23. use_computer-0.0.7/use_computer/py.typed +0 -1
  24. {use_computer-0.0.7 → use_computer-0.0.8}/.env.example +0 -0
  25. {use_computer-0.0.7 → use_computer-0.0.8}/.gitignore +0 -0
  26. {use_computer-0.0.7 → use_computer-0.0.8}/.pre-commit-config.yaml +0 -0
  27. {use_computer-0.0.7 → use_computer-0.0.8}/README.md +0 -0
  28. {use_computer-0.0.7 → use_computer-0.0.8}/examples/_1_hello_macos.py +0 -0
  29. {use_computer-0.0.7 → use_computer-0.0.8}/examples/_2_hello_ios.py +0 -0
  30. {use_computer-0.0.7 → use_computer-0.0.8}/examples/_3_recording.py +0 -0
  31. {use_computer-0.0.7 → use_computer-0.0.8}/examples/_4_file_transfer.py +0 -0
  32. {use_computer-0.0.7 → use_computer-0.0.8}/examples/_5_keepalive.py +0 -0
  33. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/models.py +0 -0
  34. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/py.typed +0 -0
  35. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/screenshot.py +0 -0
  36. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/templates/pre_command.sh +0 -0
  37. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/templates/task.toml +0 -0
  38. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/templates/test_ios.sh +0 -0
  39. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/templates/test_ios_nograder.sh +0 -0
  40. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/templates/test_macos.sh +0 -0
  41. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/templates/test_macos_check.sh +0 -0
  42. {use_computer-0.0.7/mmini → use_computer-0.0.8/use_computer}/tasks/templates/test_macos_nograder.sh +0 -0
  43. {use_computer-0.0.7 → use_computer-0.0.8}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: use-computer
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Python SDK for the use.computer macOS and iOS Computer Use API
5
5
  Project-URL: Homepage, https://use.computer
6
6
  Project-URL: Documentation, https://api.use.computer/docs
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "use-computer"
7
- version = "0.0.7"
7
+ version = "0.0.8"
8
8
  description = "Python SDK for the use.computer macOS and iOS Computer Use API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -38,7 +38,7 @@ Documentation = "https://api.use.computer/docs"
38
38
  Repository = "https://github.com/josancamon19/use-computer-python"
39
39
 
40
40
  [tool.hatch.build.targets.wheel]
41
- packages = ["mmini", "use_computer"]
41
+ packages = ["use_computer"]
42
42
 
43
43
  [tool.hatch.build]
44
44
  exclude = [
@@ -48,7 +48,7 @@ exclude = [
48
48
  "/.venv",
49
49
  "/dist",
50
50
  "/results",
51
- "/mmini/test_*.py",
51
+ "/use_computer/test_*.py",
52
52
  ]
53
53
 
54
54
  [tool.ruff]
@@ -1,6 +1,6 @@
1
- from mmini.client import AsyncMmini, Mmini, RunStatus
2
- from mmini.errors import MminiError, PlatformNotSupportedError
3
- from mmini.models import (
1
+ from use_computer.client import AsyncComputer, Computer, RunStatus
2
+ from use_computer.errors import PlatformNotSupportedError, UseComputerError
3
+ from use_computer.models import (
4
4
  ActionResult,
5
5
  ActResult,
6
6
  CursorPosition,
@@ -8,8 +8,8 @@ from mmini.models import (
8
8
  ExecResult,
9
9
  RecordingInfo,
10
10
  )
11
- from mmini.parsers import Action, parse_pyautogui, parse_xdotool
12
- from mmini.sandbox import (
11
+ from use_computer.parsers import Action, parse_pyautogui, parse_xdotool
12
+ from use_computer.sandbox import (
13
13
  AsyncIOSSandbox,
14
14
  AsyncMacOSSandbox,
15
15
  AsyncSandbox,
@@ -18,7 +18,7 @@ from mmini.sandbox import (
18
18
  Sandbox,
19
19
  SandboxType,
20
20
  )
21
- from mmini.tasks import Task, TasksClient, TaskSummary
21
+ from use_computer.tasks import Task, TasksClient, TaskSummary
22
22
 
23
23
  __all__ = [
24
24
  "Action",
@@ -26,15 +26,15 @@ __all__ = [
26
26
  "ActResult",
27
27
  "AsyncIOSSandbox",
28
28
  "AsyncMacOSSandbox",
29
- "AsyncMmini",
29
+ "AsyncComputer",
30
30
  "AsyncSandbox",
31
31
  "CursorPosition",
32
32
  "DisplayInfo",
33
33
  "ExecResult",
34
34
  "IOSSandbox",
35
35
  "MacOSSandbox",
36
- "Mmini",
37
- "MminiError",
36
+ "Computer",
37
+ "UseComputerError",
38
38
  "PlatformNotSupportedError",
39
39
  "RecordingInfo",
40
40
  "RunStatus",
@@ -464,7 +464,7 @@ _B64_PAYLOAD_RE = re.compile(r"echo ([A-Za-z0-9+/=]+) \| base64 -d \| bash")
464
464
 
465
465
  def patch_curl_timeouts(text: str) -> tuple[str, int]:
466
466
  """Add -m 5 to `curl -s -X POST` calls that are buried inside base64-encoded
467
- payloads (the ax_helper emission style). Used by mmini._run_setup to harden
467
+ payloads (the ax_helper emission style). Used by use_computer._run_setup to harden
468
468
  already-baked test.sh files whose payloads were generated before the -m flag
469
469
  was added to _emit_helper_call.
470
470
 
@@ -8,9 +8,9 @@ from typing import Any, Literal, overload
8
8
 
9
9
  import httpx
10
10
 
11
- from mmini.errors import _araise_if_unsupported, _raise_if_unsupported
12
- from mmini.retry import AsyncRetryTransport, RetryTransport
13
- from mmini.sandbox import (
11
+ from use_computer.errors import _araise_if_unsupported, _raise_if_unsupported
12
+ from use_computer.retry import AsyncRetryTransport, RetryTransport
13
+ from use_computer.sandbox import (
14
14
  AsyncIOSSandbox,
15
15
  AsyncMacOSSandbox,
16
16
  AsyncSandbox,
@@ -19,7 +19,7 @@ from mmini.sandbox import (
19
19
  Sandbox,
20
20
  SandboxType,
21
21
  )
22
- from mmini.tasks import TasksClient
22
+ from use_computer.tasks import TasksClient
23
23
 
24
24
  DEFAULT_BASE_URL = "https://api.use.computer"
25
25
 
@@ -77,8 +77,8 @@ class RunStatus:
77
77
  )
78
78
 
79
79
 
80
- class Mmini:
81
- """mmini client. Creates and manages macOS and iOS sandboxes."""
80
+ class Computer:
81
+ """use.computer client. Creates and manages macOS and iOS sandboxes."""
82
82
 
83
83
  def __init__(self, api_key: str | None = None, base_url: str | None = None):
84
84
  self._base_url = _resolve_base_url(base_url)
@@ -224,8 +224,8 @@ class Mmini:
224
224
  self.close()
225
225
 
226
226
 
227
- class AsyncMmini:
228
- """Async mmini client."""
227
+ class AsyncComputer:
228
+ """Async use.computer client."""
229
229
 
230
230
  def __init__(self, api_key: str | None = None, base_url: str | None = None):
231
231
  self._base_url = _resolve_base_url(base_url)
@@ -4,7 +4,7 @@ from typing import Any
4
4
 
5
5
  import httpx
6
6
 
7
- from mmini.models import DisplayInfo
7
+ from use_computer.models import DisplayInfo
8
8
 
9
9
 
10
10
  class Display:
@@ -1,4 +1,4 @@
1
- """Typed exceptions for mmini SDK errors that callers should catch by class
1
+ """Typed exceptions for use.computer SDK errors that callers should catch by class
2
2
  rather than by parsing HTTP status codes or response bodies."""
3
3
 
4
4
  from __future__ import annotations
@@ -6,11 +6,11 @@ from __future__ import annotations
6
6
  import httpx
7
7
 
8
8
 
9
- class MminiError(Exception):
10
- """Base class for typed mmini SDK errors."""
9
+ class UseComputerError(Exception):
10
+ """Base class for typed use.computer SDK errors."""
11
11
 
12
12
 
13
- class PlatformNotSupportedError(MminiError):
13
+ class PlatformNotSupportedError(UseComputerError):
14
14
  """Raised when an action is not supported on the sandbox's platform.
15
15
 
16
16
  The gateway returns 501 with a JSON body of the shape:
@@ -0,0 +1,14 @@
1
+ from use_computer.ios.apps import Apps, AsyncApps
2
+ from use_computer.ios.environment import AsyncEnvironment, Environment
3
+ from use_computer.ios.input import AsyncInput, Button, Input, Key
4
+
5
+ __all__ = [
6
+ "Apps",
7
+ "AsyncApps",
8
+ "AsyncEnvironment",
9
+ "AsyncInput",
10
+ "Button",
11
+ "Environment",
12
+ "Input",
13
+ "Key",
14
+ ]
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import httpx
4
4
 
5
- from mmini.models import ActionResult
5
+ from use_computer.models import ActionResult
6
6
 
7
7
 
8
8
  class Apps:
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import httpx
4
4
 
5
- from mmini.models import ActionResult
5
+ from use_computer.models import ActionResult
6
6
 
7
7
 
8
8
  class Environment:
@@ -4,7 +4,7 @@ from enum import Enum
4
4
 
5
5
  import httpx
6
6
 
7
- from mmini.models import ActionResult
7
+ from use_computer.models import ActionResult
8
8
 
9
9
 
10
10
  class Button(str, Enum):
@@ -0,0 +1,4 @@
1
+ from use_computer.macos.keyboard import AsyncKeyboard, Keyboard
2
+ from use_computer.macos.mouse import AsyncMouse, Mouse
3
+
4
+ __all__ = ["AsyncKeyboard", "AsyncMouse", "Keyboard", "Mouse"]
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import httpx
4
4
 
5
- from mmini.models import ActionResult
5
+ from use_computer.models import ActionResult
6
6
 
7
7
 
8
8
  class Keyboard:
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import httpx
4
4
 
5
- from mmini.models import ActionResult, CursorPosition
5
+ from use_computer.models import ActionResult, CursorPosition
6
6
 
7
7
 
8
8
  class Mouse:
@@ -1,10 +1,10 @@
1
- """Parse pyautogui and xdotool commands into mmini Sandbox calls.
1
+ """Parse pyautogui and xdotool commands into use.computer Sandbox calls.
2
2
 
3
3
  Models like Claude and GPT sometimes output raw pyautogui or xdotool commands.
4
4
  These parsers translate them into Sandbox method calls.
5
5
 
6
6
  Usage:
7
- from mmini.parsers import parse_pyautogui, parse_xdotool
7
+ from use_computer.parsers import parse_pyautogui, parse_xdotool
8
8
 
9
9
  for action in parse_pyautogui("pyautogui.click(100, 200)"):
10
10
  action.execute(sandbox)
@@ -20,7 +20,7 @@ from dataclasses import dataclass, field
20
20
  from typing import TYPE_CHECKING, Any
21
21
 
22
22
  if TYPE_CHECKING:
23
- from mmini.sandbox import Sandbox
23
+ from use_computer.sandbox import Sandbox
24
24
 
25
25
 
26
26
  @dataclass
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  import httpx
4
4
 
5
- from mmini.models import RecordingInfo
5
+ from use_computer.models import RecordingInfo
6
6
 
7
7
 
8
8
  class Recording:
@@ -1,4 +1,4 @@
1
- """Single retry layer for all mmini SDK HTTP calls.
1
+ """Single retry layer for all use.computer SDK HTTP calls.
2
2
 
3
3
  Retries are handled at the httpx transport level so they apply
4
4
  automatically to every request — no per-method wrappers needed.
@@ -12,7 +12,7 @@ import time
12
12
 
13
13
  import httpx
14
14
 
15
- _log = logging.getLogger("mmini.retry")
15
+ _log = logging.getLogger("use_computer.retry")
16
16
 
17
17
  RETRYABLE_EXCEPTIONS = (
18
18
  httpx.TimeoutException,
@@ -9,15 +9,15 @@ from pathlib import Path
9
9
 
10
10
  import httpx
11
11
 
12
- from mmini.display import AsyncDisplay, Display
13
- from mmini.ios.apps import Apps, AsyncApps
14
- from mmini.ios.environment import AsyncEnvironment, Environment
15
- from mmini.ios.input import AsyncInput, Input
16
- from mmini.macos.keyboard import AsyncKeyboard, Keyboard
17
- from mmini.macos.mouse import AsyncMouse, Mouse
18
- from mmini.models import ActResult, ExecResult
19
- from mmini.recording import AsyncRecording, Recording
20
- from mmini.screenshot import AsyncScreenshot, Screenshot
12
+ from use_computer.display import AsyncDisplay, Display
13
+ from use_computer.ios.apps import Apps, AsyncApps
14
+ from use_computer.ios.environment import AsyncEnvironment, Environment
15
+ from use_computer.ios.input import AsyncInput, Input
16
+ from use_computer.macos.keyboard import AsyncKeyboard, Keyboard
17
+ from use_computer.macos.mouse import AsyncMouse, Mouse
18
+ from use_computer.models import ActResult, ExecResult
19
+ from use_computer.recording import AsyncRecording, Recording
20
+ from use_computer.screenshot import AsyncScreenshot, Screenshot
21
21
 
22
22
 
23
23
  class SandboxType(str, Enum):
@@ -222,7 +222,7 @@ class MacOSSandbox(Sandbox):
222
222
  with tarfile.open(fileobj=buf, mode="w:gz") as tar:
223
223
  for item in local_dir.rglob("*"):
224
224
  tar.add(str(item), arcname=str(item.relative_to(local_dir)))
225
- tmp = f"/tmp/_mmini_upload_{self.sandbox_id[-8:]}.tar.gz"
225
+ tmp = f"/tmp/_use_computer_upload_{self.sandbox_id[-8:]}.tar.gz"
226
226
  self.upload_bytes(buf.getvalue(), tmp)
227
227
  self.exec_ssh(f'mkdir -p "{remote_dir}" && tar xzf {tmp} -C "{remote_dir}" && rm -f {tmp}')
228
228
 
@@ -390,7 +390,7 @@ class AsyncMacOSSandbox(AsyncSandbox):
390
390
  with tarfile.open(fileobj=buf, mode="w:gz") as tar:
391
391
  for item in local_dir.rglob("*"):
392
392
  tar.add(str(item), arcname=str(item.relative_to(local_dir)))
393
- tmp = f"/tmp/_mmini_upload_{self.sandbox_id[-8:]}.tar.gz"
393
+ tmp = f"/tmp/_use_computer_upload_{self.sandbox_id[-8:]}.tar.gz"
394
394
  await self.upload_bytes(buf.getvalue(), tmp)
395
395
  cmd = f'mkdir -p "{remote_dir}" && tar xzf {tmp} -C "{remote_dir}" && rm -f {tmp}'
396
396
  await self.exec_ssh(cmd)
@@ -11,7 +11,7 @@ from pathlib import Path
11
11
 
12
12
  import httpx
13
13
 
14
- from mmini.ax_transpile import patch_curl_timeouts, transpile
14
+ from use_computer.ax_transpile import patch_curl_timeouts, transpile
15
15
 
16
16
  logger = logging.getLogger(__name__)
17
17
 
@@ -1,14 +0,0 @@
1
- from mmini.ios.apps import Apps, AsyncApps
2
- from mmini.ios.environment import AsyncEnvironment, Environment
3
- from mmini.ios.input import AsyncInput, Button, Input, Key
4
-
5
- __all__ = [
6
- "Apps",
7
- "AsyncApps",
8
- "AsyncEnvironment",
9
- "AsyncInput",
10
- "Button",
11
- "Environment",
12
- "Input",
13
- "Key",
14
- ]
@@ -1,4 +0,0 @@
1
- from mmini.macos.keyboard import AsyncKeyboard, Keyboard
2
- from mmini.macos.mouse import AsyncMouse, Mouse
3
-
4
- __all__ = ["AsyncKeyboard", "AsyncMouse", "Keyboard", "Mouse"]
@@ -1,15 +0,0 @@
1
- from __future__ import annotations
2
-
3
- import mmini as _mmini
4
- from mmini import * # noqa: F403
5
-
6
-
7
- class Computer(_mmini.Mmini):
8
- """use.computer client."""
9
-
10
-
11
- class AsyncComputer(_mmini.AsyncMmini):
12
- """Async use.computer client."""
13
-
14
-
15
- __all__ = [*_mmini.__all__, "AsyncComputer", "Computer"]
@@ -1 +0,0 @@
1
-
File without changes
File without changes
File without changes
File without changes