cua-agent 0.4.3__tar.gz → 0.4.5__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 (32) hide show
  1. {cua_agent-0.4.3 → cua_agent-0.4.5}/PKG-INFO +1 -1
  2. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/loops/anthropic.py +18 -20
  3. {cua_agent-0.4.3 → cua_agent-0.4.5}/pyproject.toml +1 -1
  4. {cua_agent-0.4.3 → cua_agent-0.4.5}/README.md +0 -0
  5. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/__init__.py +0 -0
  6. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/__main__.py +0 -0
  7. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/adapters/__init__.py +0 -0
  8. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/adapters/huggingfacelocal_adapter.py +0 -0
  9. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/agent.py +0 -0
  10. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/__init__.py +0 -0
  11. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/base.py +0 -0
  12. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/budget_manager.py +0 -0
  13. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/image_retention.py +0 -0
  14. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/logging.py +0 -0
  15. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/pii_anonymization.py +0 -0
  16. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/telemetry.py +0 -0
  17. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/callbacks/trajectory_saver.py +0 -0
  18. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/cli.py +0 -0
  19. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/computer_handler.py +0 -0
  20. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/decorators.py +0 -0
  21. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/loops/__init__.py +0 -0
  22. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/loops/omniparser.py +0 -0
  23. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/loops/openai.py +0 -0
  24. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/loops/uitars.py +0 -0
  25. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/responses.py +0 -0
  26. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/telemetry.py +0 -0
  27. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/types.py +0 -0
  28. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/ui/__init__.py +0 -0
  29. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/ui/__main__.py +0 -0
  30. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/ui/gradio/__init__.py +0 -0
  31. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/ui/gradio/app.py +0 -0
  32. {cua_agent-0.4.3 → cua_agent-0.4.5}/agent/ui/gradio/ui_components.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.4.3
3
+ Version: 0.4.5
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
@@ -326,13 +326,13 @@ def _convert_responses_items_to_completion_messages(messages: Messages) -> List[
326
326
  "text": "+".join(action.get("keys", []))
327
327
  }
328
328
  })
329
- elif action_type == "mouse_move":
329
+ elif action_type in ["mouse_move", "move"]:
330
330
  # Input:
331
331
  # {
332
332
  # "type": "computer_call",
333
333
  # "call_id": "call_1",
334
334
  # "action": {
335
- # "type": "mouse_move",
335
+ # "type": "move",
336
336
  # "x": 150,
337
337
  # "y": 250
338
338
  # }
@@ -606,35 +606,33 @@ def _convert_completion_to_responses_items(response: Any) -> List[Dict[str, Any]
606
606
  # Basic actions (all versions)
607
607
  if action_type == "screenshot":
608
608
  responses_items.append(make_screenshot_item(call_id=call_id))
609
- elif action_type == "left_click":
609
+ elif action_type in ["click", "left_click"]:
610
610
  coordinate = tool_input.get("coordinate", [0, 0])
611
611
  responses_items.append(make_click_item(
612
612
  x=coordinate[0] if len(coordinate) > 0 else 0,
613
613
  y=coordinate[1] if len(coordinate) > 1 else 0,
614
614
  call_id=call_id
615
615
  ))
616
- elif action_type == "type":
616
+ elif action_type in ["type", "type_text"]:
617
617
  responses_items.append(make_type_item(
618
618
  text=tool_input.get("text", ""),
619
619
  call_id=call_id
620
620
  ))
621
- elif action_type == "key":
621
+ elif action_type in ["key", "keypress", "hotkey"]:
622
622
  responses_items.append(make_keypress_item(
623
623
  keys=tool_input.get("text", "").replace("+", "-").split("-"),
624
624
  call_id=call_id
625
625
  ))
626
- elif action_type == "mouse_move":
626
+ elif action_type in ["mouse_move", "move_cursor", "move"]:
627
627
  # Mouse move - create a custom action item
628
628
  coordinate = tool_input.get("coordinate", [0, 0])
629
- responses_items.append({
630
- "type": "computer_call",
631
- "call_id": call_id,
632
- "action": {
633
- "type": "mouse_move",
634
- "x": coordinate[0] if len(coordinate) > 0 else 0,
635
- "y": coordinate[1] if len(coordinate) > 1 else 0
636
- }
637
- })
629
+ responses_items.append(
630
+ make_move_item(
631
+ x=coordinate[0] if len(coordinate) > 0 else 0,
632
+ y=coordinate[1] if len(coordinate) > 1 else 0,
633
+ call_id=call_id
634
+ )
635
+ )
638
636
 
639
637
  # Enhanced actions (computer_20250124) Available in Claude 4 and Claude Sonnet 3.7
640
638
  elif action_type == "scroll":
@@ -651,7 +649,7 @@ def _convert_completion_to_responses_items(response: Any) -> List[Dict[str, Any]
651
649
  scroll_y=scroll_y,
652
650
  call_id=call_id
653
651
  ))
654
- elif action_type == "left_click_drag":
652
+ elif action_type in ["left_click_drag", "drag"]:
655
653
  start_coord = tool_input.get("start_coordinate", [0, 0])
656
654
  end_coord = tool_input.get("end_coordinate", [0, 0])
657
655
  responses_items.append(make_drag_item(
@@ -809,7 +807,7 @@ def _convert_completion_to_responses_items(response: Any) -> List[Dict[str, Any]
809
807
  y=coordinate[1] if len(coordinate) > 1 else 0,
810
808
  call_id=call_id
811
809
  ))
812
- elif action_type == "type":
810
+ elif action_type in ["type", "type_text"]:
813
811
  # Input:
814
812
  # {
815
813
  # "function": {
@@ -836,7 +834,7 @@ def _convert_completion_to_responses_items(response: Any) -> List[Dict[str, Any]
836
834
  text=args.get("text", ""),
837
835
  call_id=call_id
838
836
  ))
839
- elif action_type == "key":
837
+ elif action_type in ["key", "keypress", "hotkey"]:
840
838
  # Input:
841
839
  # {
842
840
  # "function": {
@@ -863,7 +861,7 @@ def _convert_completion_to_responses_items(response: Any) -> List[Dict[str, Any]
863
861
  keys=args.get("text", "").replace("+", "-").split("-"),
864
862
  call_id=call_id
865
863
  ))
866
- elif action_type == "mouse_move":
864
+ elif action_type in ["mouse_move", "move_cursor", "move"]:
867
865
  # Input:
868
866
  # {
869
867
  # "function": {
@@ -937,7 +935,7 @@ def _convert_completion_to_responses_items(response: Any) -> List[Dict[str, Any]
937
935
  scroll_y=scroll_y,
938
936
  call_id=call_id
939
937
  ))
940
- elif action_type == "left_click_drag":
938
+ elif action_type in ["left_click_drag", "drag"]:
941
939
  # Input:
942
940
  # {
943
941
  # "function": {
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "cua-agent"
9
- version = "0.4.3"
9
+ version = "0.4.5"
10
10
  description = "CUA (Computer Use) Agent for AI-driven computer interaction"
11
11
  readme = "README.md"
12
12
  authors = [
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