computer-use-ootb-internal 0.0.108__py3-none-any.whl → 0.0.109.post1__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.
- computer_use_ootb_internal/app_teachmode.py +8 -16
- computer_use_ootb_internal/app_teachmode_gradio.py +1 -1
- computer_use_ootb_internal/computer_use_demo/animation/click_animation.py +1 -1
- computer_use_ootb_internal/computer_use_demo/executor/teachmode_executor.py +70 -72
- computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/utils.py +7 -0
- computer_use_ootb_internal/computer_use_demo/tools/base.py +4 -2
- computer_use_ootb_internal/computer_use_demo/tools/computer.py +55 -43
- computer_use_ootb_internal/run_teachmode_ootb_args.py +24 -13
- {computer_use_ootb_internal-0.0.108.dist-info → computer_use_ootb_internal-0.0.109.post1.dist-info}/METADATA +1 -1
- {computer_use_ootb_internal-0.0.108.dist-info → computer_use_ootb_internal-0.0.109.post1.dist-info}/RECORD +12 -17
- computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_parser.py +0 -676
- computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/icon_detection/icon_detection.py +0 -253
- computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/panel_recognition/llm_panel_recognize.py +0 -170
- computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/test_capture.py +0 -8
- computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/uia_parser.py +0 -0
- {computer_use_ootb_internal-0.0.108.dist-info → computer_use_ootb_internal-0.0.109.post1.dist-info}/WHEEL +0 -0
- {computer_use_ootb_internal-0.0.108.dist-info → computer_use_ootb_internal-0.0.109.post1.dist-info}/entry_points.txt +0 -0
@@ -2,16 +2,13 @@ import argparse
|
|
2
2
|
import time
|
3
3
|
import json
|
4
4
|
import platform
|
5
|
-
from typing import Callable
|
6
|
-
from collections.abc import Callable
|
7
5
|
import uuid
|
8
6
|
import datetime
|
9
7
|
from datetime import datetime, timedelta, timezone
|
10
8
|
|
11
9
|
from computer_use_ootb_internal.computer_use_demo.executor.teachmode_executor import TeachmodeExecutor
|
12
|
-
from computer_use_ootb_internal.computer_use_demo.gui_agent.
|
13
|
-
from computer_use_ootb_internal.computer_use_demo.gui_agent.
|
14
|
-
from computer_use_ootb_internal.computer_use_demo.gui_agent.gui_parser.simple_parser.icon_detection.icon_detection import get_screen_resize_factor
|
10
|
+
from computer_use_ootb_internal.computer_use_demo.gui_agent.llm_utils.llm_utils import is_image_path
|
11
|
+
from computer_use_ootb_internal.computer_use_demo.gui_agent.gui_parser.simple_parser.utils import get_screen_resize_factor
|
15
12
|
from computer_use_ootb_internal.computer_use_demo.tools.aws_request import send_request_to_server
|
16
13
|
from computer_use_ootb_internal.computer_use_demo.gui_agent.gui_parser.uia_tools.screenshot_service import get_screenshot_external_cmd
|
17
14
|
utc_plus_8 = timezone(timedelta(hours=8))
|
@@ -41,7 +38,7 @@ def simple_teachmode_sampling_loop(
|
|
41
38
|
if "star_rail" in user_id or "star_rail" in user_id:
|
42
39
|
full_screen_game_mode = 1
|
43
40
|
|
44
|
-
if "star_rail_dev" in trace_id or "star_rail_dev" in user_id or "hero_case" in user_id:
|
41
|
+
if "star_rail_dev" in trace_id or "star_rail_dev" in user_id or "hero_case" in user_id or "offical" in user_id:
|
45
42
|
full_screen_game_mode = 2
|
46
43
|
|
47
44
|
print(f"Full Screen Game Mode: {full_screen_game_mode}")
|
@@ -53,7 +50,7 @@ def simple_teachmode_sampling_loop(
|
|
53
50
|
timestamp = datetime.now(utc_plus_8).strftime("%m%d-%H%M%S")
|
54
51
|
|
55
52
|
step_count = 1
|
56
|
-
unique_task_id = f"{timestamp}_uid_{user_id}_tid_{trace_id}_{str(uuid.uuid4())[:
|
53
|
+
unique_task_id = f"{timestamp}_uid_{user_id}_tid_{trace_id}_{str(uuid.uuid4())[:6]}"
|
57
54
|
|
58
55
|
print("[simple_teachmode_sampling_loop] starting task: ", task)
|
59
56
|
print(f"[simple_teachmode_sampling_loop] unique_task_id: {unique_task_id}")
|
@@ -68,6 +65,10 @@ def simple_teachmode_sampling_loop(
|
|
68
65
|
|
69
66
|
uia_meta, sc_path = get_screenshot_external_cmd(selected_screen=selected_screen,
|
70
67
|
capture_uia_data=full_screen_game_mode==0)
|
68
|
+
|
69
|
+
if is_image_path(sc_path):
|
70
|
+
screenshot_message = {"role": "user", "content": sc_path, "type": "image"}
|
71
|
+
yield screenshot_message
|
71
72
|
|
72
73
|
payload = {
|
73
74
|
"task_id": unique_task_id,
|
@@ -102,25 +103,35 @@ def simple_teachmode_sampling_loop(
|
|
102
103
|
|
103
104
|
try:
|
104
105
|
step_plan = infer_server_response["generated_plan"]
|
105
|
-
|
106
|
+
step_reasoning = step_plan["reasoning"]
|
107
|
+
step_info = step_plan["step_info"]
|
106
108
|
step_action = infer_server_response["generated_action"]["content"]
|
107
109
|
step_traj_idx = infer_server_response["current_traj_step"]
|
108
110
|
|
109
111
|
except Exception as e:
|
110
112
|
print("Error parsing generated_action content:", e)
|
111
113
|
continue
|
114
|
+
|
115
|
+
plan_message = {"role": "assistant", "content": step_reasoning, "type": "text"}
|
116
|
+
yield plan_message
|
112
117
|
|
113
118
|
if step_action.get("action") == "STOP":
|
114
119
|
final_sc, final_sc_path = get_screenshot_external_cmd(selected_screen=selected_screen)
|
115
|
-
action_history = [] # reset action history
|
116
|
-
break
|
117
120
|
|
118
|
-
|
121
|
+
final_message = {"role": "assistant", "content": "Task completed. Final screenshot:", "type": "text"}
|
122
|
+
yield final_message
|
123
|
+
|
124
|
+
final_sc_message = {"role": "user", "content": final_sc_path, "type": "image"}
|
125
|
+
yield final_sc_message
|
126
|
+
|
127
|
+
# reset action history
|
128
|
+
action_history = []
|
129
|
+
break
|
119
130
|
|
120
131
|
action_history.append(f"Executing guidance trajectory step [{step_traj_idx}], Plan: {step_info}, Action: {step_action};\n")
|
121
132
|
|
122
|
-
for
|
123
|
-
yield
|
133
|
+
for exec_message in executor({"role": "assistant", "content": step_action}):
|
134
|
+
yield exec_message
|
124
135
|
|
125
136
|
step_count += 1
|
126
137
|
|
@@ -1,21 +1,16 @@
|
|
1
1
|
computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6Grub7li4,31
|
2
|
-
computer_use_ootb_internal/app_teachmode.py,sha256=
|
3
|
-
computer_use_ootb_internal/app_teachmode_gradio.py,sha256=
|
2
|
+
computer_use_ootb_internal/app_teachmode.py,sha256=Yb5LtyaW4agGsfTmVvnIAkERXILkg3KkUZf7yI1dW-g,19253
|
3
|
+
computer_use_ootb_internal/app_teachmode_gradio.py,sha256=cmFpBrkdlZxOQADWveVdIaaNqaBD8IVs-xNLJogU7F8,7909
|
4
4
|
computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
|
5
5
|
computer_use_ootb_internal/requirements-lite.txt,sha256=5DAHomz4A_P2BmTIXNkNqkHbnIF0AyZ4_1XAlb1LaYs,290
|
6
|
-
computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=
|
7
|
-
computer_use_ootb_internal/computer_use_demo/animation/click_animation.py,sha256=
|
6
|
+
computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=7Dj0iY4GG7P03tRKYJ2x9Yvt-PE-b7uyjCAed3SaF3Y,7086
|
7
|
+
computer_use_ootb_internal/computer_use_demo/animation/click_animation.py,sha256=tP1gsayFy-CKk10UlrE9RlexwlHWiHQUe5Ogg4vQvSg,3234
|
8
8
|
computer_use_ootb_internal/computer_use_demo/animation/icons8-select-cursor-transparent-96.gif,sha256=4LfwsfFQnREXrNRs32aJU2jO65JXianJoL_8q7-8elg,30966
|
9
9
|
computer_use_ootb_internal/computer_use_demo/animation/test_animation.py,sha256=SOJz2yffXTkjuAHqk0IZLcMriR0KQYTo7W1b8wGyRGY,1222
|
10
|
-
computer_use_ootb_internal/computer_use_demo/executor/teachmode_executor.py,sha256=
|
10
|
+
computer_use_ootb_internal/computer_use_demo/executor/teachmode_executor.py,sha256=1xver_8cRCrFk85OYqEQ7LUPYs5v2Mvtg944wiGN05A,16562
|
11
11
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/__init__.py,sha256=h2CNeuACklxVpJC65QR8_6AvSybEZLmeO45hY_-lLBs,61
|
12
12
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/gui_capture.py,sha256=CxFJbsSb68ERKH7-C4RaaZy7FIhhzrzGx5qQJ4C37cA,13907
|
13
|
-
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/
|
14
|
-
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/test_capture.py,sha256=26uxu70di9Me-jseym5ejF7RNIbP35uPEiipN5qamIc,211
|
15
|
-
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/uia_parser.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/utils.py,sha256=GEA1ES7vOpHBg_Suxpl99reh34kRG4RQpp072JQBK5c,9787
|
17
|
-
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/icon_detection/icon_detection.py,sha256=ysTgvtjE1XM7QSrLLy1HD0i6_7iOb9GME5FWJljrJg0,9752
|
18
|
-
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/panel_recognition/llm_panel_recognize.py,sha256=R1v3I_U9evoS2H8csBnobl4BQdvcwmg4kgElXu5FARg,6054
|
13
|
+
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/simple_parser/utils.py,sha256=OOVxy4Qlbk5q-X9kXFXqt6AmuOMl6FWWqtH269DvJJA,10005
|
19
14
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
15
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/screenshot_cli.py,sha256=hrUBH3aeUe9t4EDsMhaUZLPpNLKeEaG4ZvikrFy-bOU,1313
|
21
16
|
computer_use_ootb_internal/computer_use_demo/gui_agent/gui_parser/uia_tools/screenshot_service.py,sha256=fJ8G4_-ZLGsHLdLgHCNgjVM1osbfz21L2w8QrcvnuhA,2738
|
@@ -27,16 +22,16 @@ computer_use_ootb_internal/computer_use_demo/gui_agent/vlm_utils/__init__.py,sha
|
|
27
22
|
computer_use_ootb_internal/computer_use_demo/gui_agent/vlm_utils/run_vlm.py,sha256=9IaX15dhFFOALr0vcsI-EtEU4pDLfdzlmwCy3HRbISA,1441
|
28
23
|
computer_use_ootb_internal/computer_use_demo/tools/__init__.py,sha256=Pj8_5L4_PPQK298X4NV3KMbP-84t-bM0pbjEeb5_SJQ,343
|
29
24
|
computer_use_ootb_internal/computer_use_demo/tools/aws_request.py,sha256=12UVzeA2PmpZhpy2Pt5Vh48-_q1e8ZjVQux6r3pbAcw,2629
|
30
|
-
computer_use_ootb_internal/computer_use_demo/tools/base.py,sha256=
|
25
|
+
computer_use_ootb_internal/computer_use_demo/tools/base.py,sha256=4HHSxDg6GsCoraamWor75ZnoR7tAcRarMv4MzvqMWGU,2099
|
31
26
|
computer_use_ootb_internal/computer_use_demo/tools/bash.py,sha256=rHetQ80_v-TTi-1oxIA7ncFEwJxFTh8FJCErIoZbGeY,4236
|
32
27
|
computer_use_ootb_internal/computer_use_demo/tools/collection.py,sha256=8RzHLobL44_Jjt8ltXS6I8XJlEAQOfc75dmnDUaHE-8,922
|
33
28
|
computer_use_ootb_internal/computer_use_demo/tools/colorful_text.py,sha256=cvlmnhAImDTwoRRwhT5au7mNFhfAD7ZfeoDEVdVzDKw,892
|
34
|
-
computer_use_ootb_internal/computer_use_demo/tools/computer.py,sha256=
|
29
|
+
computer_use_ootb_internal/computer_use_demo/tools/computer.py,sha256=Z-kt6XxGIeZJaeaj02ktAcUQL8vG7co2bedzC5pSAsc,26794
|
35
30
|
computer_use_ootb_internal/computer_use_demo/tools/computer_marbot.py,sha256=zZuWz9ArfP3Zss-afnscrPkgCtB5UWbCy7HwAOvO2bo,5970
|
36
31
|
computer_use_ootb_internal/computer_use_demo/tools/edit.py,sha256=b0PwUitxckHCQqFP3ZwlthWdqNkn7WETeTHeB6-o98c,11486
|
37
32
|
computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO44CEirL9hpGy3NmKbjfMpyeVmn8Y,1595
|
38
33
|
computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
|
39
|
-
computer_use_ootb_internal-0.0.
|
40
|
-
computer_use_ootb_internal-0.0.
|
41
|
-
computer_use_ootb_internal-0.0.
|
42
|
-
computer_use_ootb_internal-0.0.
|
34
|
+
computer_use_ootb_internal-0.0.109.post1.dist-info/METADATA,sha256=sK_kPqyLBjBFbinqhhx7t83mYHAHyeyPnQlr-h3PAQA,916
|
35
|
+
computer_use_ootb_internal-0.0.109.post1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
36
|
+
computer_use_ootb_internal-0.0.109.post1.dist-info/entry_points.txt,sha256=-AbmawU7IRQuDZihgVMVDrFoY4E6rnXYOUB-5vSeBKs,93
|
37
|
+
computer_use_ootb_internal-0.0.109.post1.dist-info/RECORD,,
|