cua-agent 0.4.3__py3-none-any.whl → 0.4.4__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/anthropic.py +16 -18
- {cua_agent-0.4.3.dist-info → cua_agent-0.4.4.dist-info}/METADATA +1 -1
- {cua_agent-0.4.3.dist-info → cua_agent-0.4.4.dist-info}/RECORD +5 -5
- {cua_agent-0.4.3.dist-info → cua_agent-0.4.4.dist-info}/WHEEL +0 -0
- {cua_agent-0.4.3.dist-info → cua_agent-0.4.4.dist-info}/entry_points.txt +0 -0
agent/loops/anthropic.py
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
938
|
+
elif action_type in ["left_click_drag", "drag"]:
|
|
941
939
|
# Input:
|
|
942
940
|
# {
|
|
943
941
|
# "function": {
|
|
@@ -15,7 +15,7 @@ agent/cli.py,sha256=odI7cdl1psOGK-mEQzezsPzbRcLFwDbi7A2ukvYq8dk,12130
|
|
|
15
15
|
agent/computer_handler.py,sha256=2gfFBeDk9Vd54x9mOqnswMo8BdjUduLo5I0RbBPLovY,3964
|
|
16
16
|
agent/decorators.py,sha256=bCmcCjP31WEjWg1D91OE2jo7AZTfGa9cNgCnYUvjiyw,2832
|
|
17
17
|
agent/loops/__init__.py,sha256=_qpP_--3ePdFkTZP8qmUEFlBsy6m4h8fj0gGLDKA7zw,217
|
|
18
|
-
agent/loops/anthropic.py,sha256=
|
|
18
|
+
agent/loops/anthropic.py,sha256=2oAfzGKamhvZVZfq5oGNPotX00YnF3w9U1GSryvAH4U,58196
|
|
19
19
|
agent/loops/omniparser.py,sha256=m3bDNQ0Igc_HHVoAbjVNj599uRoC9Eap3DCALg6RZ54,11422
|
|
20
20
|
agent/loops/openai.py,sha256=ArTqadeJY8F9N8ZLKfswlzgHV_54HbWJgLd4l6ele9w,3010
|
|
21
21
|
agent/loops/uitars.py,sha256=L0NYxKoIiMfIHbyomnaiK3ZGLmLv3QMx9nX57GruAk0,26323
|
|
@@ -27,7 +27,7 @@ agent/ui/__main__.py,sha256=vudWXYvGM0aNT5aZ94HPtGW8YXOZ4cLXepHyhUM_k1g,73
|
|
|
27
27
|
agent/ui/gradio/__init__.py,sha256=yv4Mrfo-Sj2U5sVn_UJHAuwYCezo-5O4ItR2C9jzNko,145
|
|
28
28
|
agent/ui/gradio/app.py,sha256=X7he4jzyFqWJDP1y_M8yfZvfdy6GHNuclLn4k9iIwAw,8824
|
|
29
29
|
agent/ui/gradio/ui_components.py,sha256=WxFE-4wvdEgj7FPLNXUrs118sXJ9vN3kLkZxtto-weo,34474
|
|
30
|
-
cua_agent-0.4.
|
|
31
|
-
cua_agent-0.4.
|
|
32
|
-
cua_agent-0.4.
|
|
33
|
-
cua_agent-0.4.
|
|
30
|
+
cua_agent-0.4.4.dist-info/METADATA,sha256=em9aTDDBAep3_OgKpXFj1RLILShzSE2myiZJep4XIaw,12060
|
|
31
|
+
cua_agent-0.4.4.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
32
|
+
cua_agent-0.4.4.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
33
|
+
cua_agent-0.4.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|