cua-agent 0.4.13__py3-none-any.whl → 0.4.14__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.

Potentially problematic release.


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

agent/loops/uitars.py CHANGED
@@ -782,11 +782,19 @@ class UITARSConfig:
782
782
  # Extract response content
783
783
  response_content = response.choices[0].message.content.strip() # type: ignore
784
784
 
785
+ print(response_content)
786
+
785
787
  # Parse the response to extract click coordinates
786
- # Look for click action with coordinates
788
+ # Look for click action with coordinates (with special tokens)
787
789
  click_pattern = r"click\(point='<\|box_start\|>\((\d+),(\d+)\)<\|box_end\|>'\)"
788
790
  match = re.search(click_pattern, response_content)
789
791
 
792
+ # Fallback: Look for simpler format without special tokens
793
+ if not match:
794
+ # Pattern for: click(start_box='(x,y)') or click(point='(x,y)')
795
+ fallback_pattern = r"click\((?:start_box|point)='\((\d+),(\d+)\)'\)"
796
+ match = re.search(fallback_pattern, response_content)
797
+
790
798
  if match:
791
799
  x, y = int(match.group(1)), int(match.group(2))
792
800
  # Scale coordinates back to original image dimensions
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.4.13
3
+ Version: 0.4.14
4
4
  Summary: CUA (Computer Use) Agent for AI-driven computer interaction
5
5
  Author-Email: TryCua <gh@trycua.com>
6
- Requires-Python: >=3.11
6
+ Requires-Python: >=3.12
7
7
  Requires-Dist: httpx>=0.27.0
8
8
  Requires-Dist: aiohttp>=3.9.3
9
9
  Requires-Dist: asyncio
@@ -35,7 +35,7 @@ agent/loops/gta1.py,sha256=ha5TaUWqUzTffx_ow1WiBU8i3VNP-6FL5XC66ajPFjg,5829
35
35
  agent/loops/model_types.csv,sha256=GmFn4x80yoUpQZuQ-GXtJkPVlOLYWZ5u_5A73HRyeNE,112
36
36
  agent/loops/omniparser.py,sha256=-db8JUL2Orn47ERIaLbuNShAXn4LeIgYzRWphn_9Dg4,15071
37
37
  agent/loops/openai.py,sha256=8Ad_XufpENmLq1nEnhzF3oswPrPK1EPz-C5NU8UOEs0,8035
38
- agent/loops/uitars.py,sha256=EDq8AO20lrnwB013uJoWSkkz3TVRU9oG8DQ1VviXltc,31445
38
+ agent/loops/uitars.py,sha256=PVNOdwcn2K6RgaxoU-9I4HjBTsEH073M11LTqTrN7C4,31849
39
39
  agent/responses.py,sha256=TTJ3wXN_eb0J26GKhO3cVQngOiZ1AgUPIUadozLUQyE,28991
40
40
  agent/telemetry.py,sha256=87ZTyBaT0wEPQn4v76II3g0V3GERuIVbypoX-Ug6FKQ,4786
41
41
  agent/types.py,sha256=ZoWY8a3GZtB8V0SnOzoI7DQy4nP_GRubxJKbuLPOc8c,840
@@ -44,7 +44,7 @@ agent/ui/__main__.py,sha256=vudWXYvGM0aNT5aZ94HPtGW8YXOZ4cLXepHyhUM_k1g,73
44
44
  agent/ui/gradio/__init__.py,sha256=yv4Mrfo-Sj2U5sVn_UJHAuwYCezo-5O4ItR2C9jzNko,145
45
45
  agent/ui/gradio/app.py,sha256=m2yDd6Tua_lMMZT1zCzOty2meYEy756d8OlFF7lpdeU,9117
46
46
  agent/ui/gradio/ui_components.py,sha256=vfsqVo_COsFfw11ouMHClib9fdBf3q52G-qbuo0RyOY,36068
47
- cua_agent-0.4.13.dist-info/METADATA,sha256=Xr2mN1uCE8Mu5TiYskFjb6DpN-FgmihPTyNyPa665yo,12616
48
- cua_agent-0.4.13.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
49
- cua_agent-0.4.13.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
50
- cua_agent-0.4.13.dist-info/RECORD,,
47
+ cua_agent-0.4.14.dist-info/METADATA,sha256=uLZvYOCvm5B-sX4z-WNZ1CYLmpZYQd31Rk-33MwzOMM,12616
48
+ cua_agent-0.4.14.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
49
+ cua_agent-0.4.14.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
50
+ cua_agent-0.4.14.dist-info/RECORD,,