cua-agent 0.2.11__tar.gz → 0.2.13__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.

Potentially problematic release.


This version of cua-agent might be problematic. Click here for more details.

Files changed (86) hide show
  1. {cua_agent-0.2.11 → cua_agent-0.2.13}/PKG-INFO +4 -5
  2. {cua_agent-0.2.11 → cua_agent-0.2.13}/README.md +1 -4
  3. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/__init__.py +1 -1
  4. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/agent.py +0 -2
  5. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/telemetry.py +1 -1
  6. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/loop.py +0 -2
  7. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/loop.py +0 -2
  8. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/gradio/app.py +9 -2
  9. {cua_agent-0.2.11 → cua_agent-0.2.13}/pyproject.toml +7 -4
  10. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/__init__.py +0 -0
  11. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/base.py +0 -0
  12. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/callbacks.py +0 -0
  13. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/experiment.py +0 -0
  14. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/factory.py +0 -0
  15. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/messages.py +0 -0
  16. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/provider_config.py +0 -0
  17. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/__init__.py +0 -0
  18. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/base.py +0 -0
  19. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/bash.py +0 -0
  20. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/collection.py +0 -0
  21. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/computer.py +0 -0
  22. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/edit.py +0 -0
  23. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/manager.py +0 -0
  24. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools.py +0 -0
  25. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/types.py +0 -0
  26. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/visualization.py +0 -0
  27. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/__init__.py +0 -0
  28. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/__init__.py +0 -0
  29. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/api/client.py +0 -0
  30. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/api/logging.py +0 -0
  31. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/api_handler.py +0 -0
  32. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/callbacks/__init__.py +0 -0
  33. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/callbacks/manager.py +0 -0
  34. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/loop.py +0 -0
  35. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/prompts.py +0 -0
  36. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/response_handler.py +0 -0
  37. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/__init__.py +0 -0
  38. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/base.py +0 -0
  39. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/bash.py +0 -0
  40. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/collection.py +0 -0
  41. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/computer.py +0 -0
  42. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/edit.py +0 -0
  43. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/manager.py +0 -0
  44. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/run.py +0 -0
  45. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/types.py +0 -0
  46. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/utils.py +0 -0
  47. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/__init__.py +0 -0
  48. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/api_handler.py +0 -0
  49. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/anthropic.py +0 -0
  50. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/base.py +0 -0
  51. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/oaicompat.py +0 -0
  52. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/ollama.py +0 -0
  53. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/openai.py +0 -0
  54. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/utils.py +0 -0
  55. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/image_utils.py +0 -0
  56. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/parser.py +0 -0
  57. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/prompts.py +0 -0
  58. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/__init__.py +0 -0
  59. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/base.py +0 -0
  60. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/bash.py +0 -0
  61. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/computer.py +0 -0
  62. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/manager.py +0 -0
  63. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/utils.py +0 -0
  64. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/__init__.py +0 -0
  65. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/api_handler.py +0 -0
  66. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/loop.py +0 -0
  67. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/response_handler.py +0 -0
  68. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/__init__.py +0 -0
  69. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/base.py +0 -0
  70. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/computer.py +0 -0
  71. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/manager.py +0 -0
  72. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/types.py +0 -0
  73. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/utils.py +0 -0
  74. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/__init__.py +0 -0
  75. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/clients/base.py +0 -0
  76. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/clients/mlxvlm.py +0 -0
  77. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/clients/oaicompat.py +0 -0
  78. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/prompts.py +0 -0
  79. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/tools/__init__.py +0 -0
  80. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/tools/computer.py +0 -0
  81. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/tools/manager.py +0 -0
  82. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/utils.py +0 -0
  83. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/telemetry.py +0 -0
  84. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/__init__.py +0 -0
  85. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/__main__.py +0 -0
  86. {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/gradio/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.2.11
3
+ Version: 0.2.13
4
4
  Summary: CUA (Computer Use) Agent for AI-driven computer interaction
5
5
  Author-Email: TryCua <gh@trycua.com>
6
6
  Requires-Python: >=3.11
@@ -24,6 +24,7 @@ Requires-Dist: httpx<0.29.0,>=0.27.0; extra == "openai"
24
24
  Provides-Extra: uitars
25
25
  Requires-Dist: httpx<0.29.0,>=0.27.0; extra == "uitars"
26
26
  Provides-Extra: uitars-mlx
27
+ Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "uitars-mlx"
27
28
  Provides-Extra: ui
28
29
  Requires-Dist: gradio<6.0.0,>=5.23.3; extra == "ui"
29
30
  Requires-Dist: python-dotenv<2.0.0,>=1.0.1; extra == "ui"
@@ -67,6 +68,7 @@ Requires-Dist: requests<3.0.0,>=2.31.0; extra == "all"
67
68
  Requires-Dist: ollama<0.5.0,>=0.4.7; extra == "all"
68
69
  Requires-Dist: gradio<6.0.0,>=5.23.3; extra == "all"
69
70
  Requires-Dist: python-dotenv<2.0.0,>=1.0.1; extra == "all"
71
+ Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "all"
70
72
  Description-Content-Type: text/markdown
71
73
 
72
74
  <div align="center">
@@ -105,10 +107,7 @@ pip install "cua-agent[anthropic]" # Anthropic Cua Loop
105
107
  pip install "cua-agent[uitars]" # UI-Tars support
106
108
  pip install "cua-agent[omni]" # Cua Loop based on OmniParser (includes Ollama for local models)
107
109
  pip install "cua-agent[ui]" # Gradio UI for the agent
108
-
109
- # For local UI-TARS with MLX support, you need to manually install mlx-vlm:
110
- pip install "cua-agent[uitars-mlx]"
111
- pip install git+https://github.com/ddupont808/mlx-vlm.git@stable/fix/qwen2-position-id # PR: https://github.com/Blaizzy/mlx-vlm/pull/349
110
+ pip install "cua-agent[uitars-mlx]" # MLX UI-Tars support
112
111
  ```
113
112
 
114
113
  ## Run
@@ -34,10 +34,7 @@ pip install "cua-agent[anthropic]" # Anthropic Cua Loop
34
34
  pip install "cua-agent[uitars]" # UI-Tars support
35
35
  pip install "cua-agent[omni]" # Cua Loop based on OmniParser (includes Ollama for local models)
36
36
  pip install "cua-agent[ui]" # Gradio UI for the agent
37
-
38
- # For local UI-TARS with MLX support, you need to manually install mlx-vlm:
39
- pip install "cua-agent[uitars-mlx]"
40
- pip install git+https://github.com/ddupont808/mlx-vlm.git@stable/fix/qwen2-position-id # PR: https://github.com/Blaizzy/mlx-vlm/pull/349
37
+ pip install "cua-agent[uitars-mlx]" # MLX UI-Tars support
41
38
  ```
42
39
 
43
40
  ## Run
@@ -6,7 +6,7 @@ import logging
6
6
  __version__ = "0.1.0"
7
7
 
8
8
  # Initialize logging
9
- logger = logging.getLogger("cua.agent")
9
+ logger = logging.getLogger("agent")
10
10
 
11
11
  # Initialize telemetry when the package is imported
12
12
  try:
@@ -11,10 +11,8 @@ from .types import AgentResponse
11
11
  from .factory import LoopFactory
12
12
  from .provider_config import DEFAULT_MODELS, ENV_VARS
13
13
 
14
- logging.basicConfig(level=logging.INFO)
15
14
  logger = logging.getLogger(__name__)
16
15
 
17
-
18
16
  class ComputerAgent:
19
17
  """A computer agent that can perform automated tasks using natural language instructions."""
20
18
 
@@ -34,7 +34,7 @@ flush = _default_flush
34
34
  is_telemetry_enabled = _default_is_telemetry_enabled
35
35
  is_telemetry_globally_disabled = _default_is_telemetry_globally_disabled
36
36
 
37
- logger = logging.getLogger("cua.agent.telemetry")
37
+ logger = logging.getLogger("agent.telemetry")
38
38
 
39
39
  try:
40
40
  # Import from core telemetry
@@ -26,10 +26,8 @@ from .api_handler import OmniAPIHandler
26
26
  from .tools.manager import ToolManager
27
27
  from .tools import ToolResult
28
28
 
29
- logging.basicConfig(level=logging.INFO)
30
29
  logger = logging.getLogger(__name__)
31
30
 
32
-
33
31
  def extract_data(input_string: str, data_type: str) -> str:
34
32
  """Extract content from code blocks."""
35
33
  pattern = f"```{data_type}" + r"(.*?)(```|$)"
@@ -25,10 +25,8 @@ from .prompts import COMPUTER_USE, SYSTEM_PROMPT, MAC_SPECIFIC_NOTES
25
25
  from .clients.oaicompat import OAICompatClient
26
26
  from .clients.mlxvlm import MLXVLMUITarsClient
27
27
 
28
- logging.basicConfig(level=logging.INFO)
29
28
  logger = logging.getLogger(__name__)
30
29
 
31
-
32
30
  class UITARSLoop(BaseLoop):
33
31
  """UI-TARS-specific implementation of the agent loop.
34
32
 
@@ -132,6 +132,13 @@ class GradioChatScreenshotHandler(DefaultCallbackHandler):
132
132
  # Detect if current device is MacOS
133
133
  is_mac = platform.system().lower() == "darwin"
134
134
 
135
+ # Detect if lume is available (host device is macOS)
136
+ is_lume_available = is_mac or (os.environ.get("PYLUME_HOST", "localhost") != "localhost")
137
+
138
+ print("PYLUME_HOST: ", os.environ.get("PYLUME_HOST", "localhost"))
139
+ print("is_mac: ", is_mac)
140
+ print("Lume available: ", is_lume_available)
141
+
135
142
  # Map model names to specific provider model names
136
143
  MODEL_MAPPINGS = {
137
144
  "openai": {
@@ -733,9 +740,9 @@ if __name__ == "__main__":
733
740
  is_mac = platform.system().lower() == "darwin"
734
741
 
735
742
  providers = ["cloud"]
736
- if is_mac:
743
+ if is_lume_available:
737
744
  providers += ["lume"]
738
- elif is_windows:
745
+ if is_windows:
739
746
  providers += ["winsandbox"]
740
747
 
741
748
  computer_provider = gr.Radio(
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "cua-agent"
9
- version = "0.2.11"
9
+ version = "0.2.13"
10
10
  description = "CUA (Computer Use) Agent for AI-driven computer interaction"
11
11
  readme = "README.md"
12
12
  authors = [
@@ -39,7 +39,9 @@ openai = [
39
39
  uitars = [
40
40
  "httpx>=0.27.0,<0.29.0",
41
41
  ]
42
- uitars-mlx = []
42
+ uitars-mlx = [
43
+ "mlx-vlm>=0.1.27; sys_platform == 'darwin'",
44
+ ]
43
45
  ui = [
44
46
  "gradio>=5.23.3,<6.0.0",
45
47
  "python-dotenv>=1.0.1,<2.0.0",
@@ -86,6 +88,7 @@ all = [
86
88
  "ollama>=0.4.7,<0.5.0",
87
89
  "gradio>=5.23.3,<6.0.0",
88
90
  "python-dotenv>=1.0.1,<2.0.0",
91
+ "mlx-vlm>=0.1.27; sys_platform == 'darwin'",
89
92
  ]
90
93
 
91
94
  [tool.pdm]
@@ -109,7 +112,7 @@ target-version = [
109
112
 
110
113
  [tool.ruff]
111
114
  line-length = 100
112
- target-version = "0.2.11"
115
+ target-version = "0.2.13"
113
116
  select = [
114
117
  "E",
115
118
  "F",
@@ -123,7 +126,7 @@ docstring-code-format = true
123
126
 
124
127
  [tool.mypy]
125
128
  strict = true
126
- python_version = "0.2.11"
129
+ python_version = "0.2.13"
127
130
  ignore_missing_imports = true
128
131
  disallow_untyped_defs = true
129
132
  check_untyped_defs = true