hud-python 0.3.4__py3-none-any.whl → 0.3.5__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 hud-python might be problematic. Click here for more details.
- hud/tools/computer/anthropic.py +6 -0
- hud/tools/computer/hud.py +18 -12
- hud/tools/computer/openai.py +6 -0
- hud/utils/tests/test_version.py +1 -1
- hud/version.py +1 -1
- {hud_python-0.3.4.dist-info → hud_python-0.3.5.dist-info}/METADATA +1 -1
- {hud_python-0.3.4.dist-info → hud_python-0.3.5.dist-info}/RECORD +9 -9
- {hud_python-0.3.4.dist-info → hud_python-0.3.5.dist-info}/WHEEL +0 -0
- {hud_python-0.3.4.dist-info → hud_python-0.3.5.dist-info}/licenses/LICENSE +0 -0
hud/tools/computer/anthropic.py
CHANGED
|
@@ -68,6 +68,8 @@ class AnthropicComputerTool(HudComputerTool):
|
|
|
68
68
|
self,
|
|
69
69
|
width: int = 1400,
|
|
70
70
|
height: int = 850,
|
|
71
|
+
environment_width: int = 1920,
|
|
72
|
+
environment_height: int = 1080,
|
|
71
73
|
display_num: int | None = None,
|
|
72
74
|
platform_type: Literal["auto", "xdo", "pyautogui"] = "auto",
|
|
73
75
|
rescale_images: bool = False,
|
|
@@ -79,6 +81,8 @@ class AnthropicComputerTool(HudComputerTool):
|
|
|
79
81
|
Args:
|
|
80
82
|
width: Target width for rescaling (default: 1400 for Anthropic)
|
|
81
83
|
height: Target height for rescaling (default: 850 for Anthropic)
|
|
84
|
+
environment_width: Environment screen width (default: 1920)
|
|
85
|
+
environment_height: Environment screen height (default: 1080)
|
|
82
86
|
display_num: X display number
|
|
83
87
|
platform_type: Which executor to use:
|
|
84
88
|
- "auto": Automatically detect based on platform
|
|
@@ -91,6 +95,8 @@ class AnthropicComputerTool(HudComputerTool):
|
|
|
91
95
|
width=width,
|
|
92
96
|
height=height,
|
|
93
97
|
display_num=display_num,
|
|
98
|
+
environment_width=environment_width,
|
|
99
|
+
environment_height=environment_height,
|
|
94
100
|
platform_type=platform_type,
|
|
95
101
|
rescale_images=rescale_images,
|
|
96
102
|
**kwargs,
|
hud/tools/computer/hud.py
CHANGED
|
@@ -16,9 +16,6 @@ from hud.tools.executors.xdo import XDOExecutor
|
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger(__name__)
|
|
18
18
|
|
|
19
|
-
BASE_SCREEN_WIDTH = 1920
|
|
20
|
-
BASE_SCREEN_HEIGHT = 1080
|
|
21
|
-
|
|
22
19
|
|
|
23
20
|
class HudComputerTool:
|
|
24
21
|
"""
|
|
@@ -29,6 +26,8 @@ class HudComputerTool:
|
|
|
29
26
|
self,
|
|
30
27
|
width: int | None = None,
|
|
31
28
|
height: int | None = None,
|
|
29
|
+
environment_width: int = 1920,
|
|
30
|
+
environment_height: int = 1080,
|
|
32
31
|
display_num: int | None = None,
|
|
33
32
|
platform_type: Literal["auto", "xdo", "pyautogui"] = "auto",
|
|
34
33
|
custom_executor: BaseExecutor | None = None,
|
|
@@ -38,8 +37,10 @@ class HudComputerTool:
|
|
|
38
37
|
Initialize the HUD computer tool.
|
|
39
38
|
|
|
40
39
|
Args:
|
|
41
|
-
width: Target width for rescaling (None = use
|
|
42
|
-
height: Target height for rescaling (None = use
|
|
40
|
+
width: Target width for rescaling (None = use environment width)
|
|
41
|
+
height: Target height for rescaling (None = use environment height)
|
|
42
|
+
environment_width: Base screen width
|
|
43
|
+
environment_height: Base screen height
|
|
43
44
|
display_num: X display number
|
|
44
45
|
platform_type: Which executor to use:
|
|
45
46
|
- "auto": Automatically detect based on platform
|
|
@@ -49,20 +50,25 @@ class HudComputerTool:
|
|
|
49
50
|
rescale_images: If True, rescale screenshots. If False, only rescale action coordinates
|
|
50
51
|
"""
|
|
51
52
|
# Use provided dimensions or defaults
|
|
52
|
-
self.width = width or
|
|
53
|
-
self.
|
|
53
|
+
self.width = width or environment_width
|
|
54
|
+
self.environment_width = environment_width
|
|
55
|
+
|
|
56
|
+
self.height = height or environment_height
|
|
57
|
+
self.environment_height = environment_height
|
|
58
|
+
|
|
54
59
|
self.rescale_images = rescale_images
|
|
55
60
|
|
|
56
61
|
logger.info("Width: %s, Height: %s", self.width, self.height)
|
|
57
62
|
logger.info(
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
"Environment Screen Width: %s, Environment Screen Height: %s",
|
|
64
|
+
self.environment_width,
|
|
65
|
+
self.environment_height,
|
|
61
66
|
)
|
|
62
67
|
|
|
63
68
|
# Calculate scaling factors from base screen size to target size
|
|
64
|
-
self.scale_x = self.width /
|
|
65
|
-
|
|
69
|
+
self.scale_x = self.width / self.environment_width
|
|
70
|
+
|
|
71
|
+
self.scale_y = self.height / self.environment_height
|
|
66
72
|
|
|
67
73
|
logger.info("Scale X: %s, Scale Y: %s", self.scale_x, self.scale_y)
|
|
68
74
|
self.scale = min(self.scale_x, self.scale_y)
|
hud/tools/computer/openai.py
CHANGED
|
@@ -51,6 +51,8 @@ class OpenAIComputerTool(HudComputerTool):
|
|
|
51
51
|
self,
|
|
52
52
|
width: int = 1024,
|
|
53
53
|
height: int = 768,
|
|
54
|
+
environment_width: int = 1920,
|
|
55
|
+
environment_height: int = 1080,
|
|
54
56
|
display_num: int | None = None,
|
|
55
57
|
platform_type: Literal["auto", "xdo", "pyautogui"] = "auto",
|
|
56
58
|
rescale_images: bool = False,
|
|
@@ -62,6 +64,8 @@ class OpenAIComputerTool(HudComputerTool):
|
|
|
62
64
|
Args:
|
|
63
65
|
width: Target width for rescaling (default: 1024 for OpenAI)
|
|
64
66
|
height: Target height for rescaling (default: 768 for OpenAI)
|
|
67
|
+
environment_width: Environment screen width (default: 1920)
|
|
68
|
+
environment_height: Environment screen height (default: 1080)
|
|
65
69
|
display_num: X display number
|
|
66
70
|
platform_type: Which executor to use:
|
|
67
71
|
- "auto": Automatically detect based on platform
|
|
@@ -73,6 +77,8 @@ class OpenAIComputerTool(HudComputerTool):
|
|
|
73
77
|
super().__init__(
|
|
74
78
|
width=width,
|
|
75
79
|
height=height,
|
|
80
|
+
environment_width=environment_width,
|
|
81
|
+
environment_height=environment_height,
|
|
76
82
|
display_num=display_num,
|
|
77
83
|
platform_type=platform_type,
|
|
78
84
|
rescale_images=rescale_images,
|
hud/utils/tests/test_version.py
CHANGED
hud/version.py
CHANGED
|
@@ -8,7 +8,7 @@ hud/task.py,sha256=Ck26zeJzQmYmVzMwbcqIMkXoN_QRFr24B7CFDnhpOzc,5688
|
|
|
8
8
|
hud/taskset.py,sha256=8xNckJ_4_VPlBudD2l5jOfKMemVRJodf3uQzYJq8wDQ,7116
|
|
9
9
|
hud/trajectory.py,sha256=LBVkFz6U_rmyooCZHN81tdOx0Z7DuAgzf0KQLejc4Fo,3937
|
|
10
10
|
hud/types.py,sha256=h7fUowbdyGF4Fg8TUnvCFoa2fflRRPi6xx7YgpBwFis,3109
|
|
11
|
-
hud/version.py,sha256
|
|
11
|
+
hud/version.py,sha256=GhrTUN0K1E2l-GjofIbs-yOpyGwJa9pO-BGm989EFf0,104
|
|
12
12
|
hud/adapters/__init__.py,sha256=zz24KdC_e9TJPgWo6y57_8SzevEE5ak4Cm6tXzMxwRk,266
|
|
13
13
|
hud/adapters/claude/__init__.py,sha256=i7QEF-29FLb9qxp1eYtXs-adIk_tG54tL-9g6d3xodk,100
|
|
14
14
|
hud/adapters/claude/adapter.py,sha256=vCpotJ5gzQs4PP2iCXVavIcyG8c_4m1P6fuXStwUxSo,6675
|
|
@@ -74,9 +74,9 @@ hud/tools/edit.py,sha256=9vJ2XSnWOPViujQbZZuDjLahvzxoPHyAeXxgKfpUDHo,11796
|
|
|
74
74
|
hud/tools/playwright_tool.py,sha256=IQT1hk5U4H8BI988iZq0B2oS_fbgkaX01Z-ZXL4r71o,13724
|
|
75
75
|
hud/tools/utils.py,sha256=bfVyYMcBOJvr1QdptCjVb6jaHVGIL5WUxmY59kzMekQ,1447
|
|
76
76
|
hud/tools/computer/__init__.py,sha256=ehKY7u0_4cZ9h7YQlOQjbKPWfd5LhQq8ZQn2w2-l2mY,302
|
|
77
|
-
hud/tools/computer/anthropic.py,sha256=
|
|
78
|
-
hud/tools/computer/hud.py,sha256=
|
|
79
|
-
hud/tools/computer/openai.py,sha256=
|
|
77
|
+
hud/tools/computer/anthropic.py,sha256=C7u0VkPF1F9pcJYlt0lHJf4kdSJ52YE_ruL0ezdhm_U,16565
|
|
78
|
+
hud/tools/computer/hud.py,sha256=b7p8acZWdUWCGk-ZUHOt2nLcH2gjxvByHoRPuO7JLgs,14123
|
|
79
|
+
hud/tools/computer/openai.py,sha256=MzyGdH5-fuo2NgzptJpFt_4A5VMb04LWzZS_WtfGVaY,10999
|
|
80
80
|
hud/tools/executors/__init__.py,sha256=jHxfus9SLhkL6YGtebR5RyKYyVAix3yu5EkUp2Q27Kg,732
|
|
81
81
|
hud/tools/executors/base.py,sha256=ZVdriSlO6XmhT8-123rYgd7K1DbeGaNRDiO4-oGYM_c,14180
|
|
82
82
|
hud/tools/executors/pyautogui.py,sha256=Kc2OcFw-sEuRBRFtO1ZrWeHs1p-p5FtEpESkzpRhOHk,22098
|
|
@@ -112,9 +112,9 @@ hud/utils/tests/test_config.py,sha256=dPlXYWuMrxX-NOYbf0vdJ27TJpfacKG8eiKOSGOcfD
|
|
|
112
112
|
hud/utils/tests/test_init.py,sha256=UxlNTwjlSE2q3M0R86EmMYmmXmbRvzZaC-S2av26QXI,529
|
|
113
113
|
hud/utils/tests/test_progress.py,sha256=QunwDgi_heQXhDgmC25zgjr-sFUu5FdJ_1aYigMKeIc,6351
|
|
114
114
|
hud/utils/tests/test_telemetry.py,sha256=t0An1RTBaE0dZVEpF4uwuq5k1R-PXFR5k4u71h60tx8,1224
|
|
115
|
-
hud/utils/tests/test_version.py,sha256=
|
|
115
|
+
hud/utils/tests/test_version.py,sha256=UhhhjGC9AWGadMxj8Dfo-Fsp2TQgI5PTkYKJ9uQOxiM,159
|
|
116
116
|
hud/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
|
-
hud_python-0.3.
|
|
118
|
-
hud_python-0.3.
|
|
119
|
-
hud_python-0.3.
|
|
120
|
-
hud_python-0.3.
|
|
117
|
+
hud_python-0.3.5.dist-info/METADATA,sha256=o-LHc9HvF4gj06-gD2Yaie7WHwhrKFQPXwdprOkfD10,10250
|
|
118
|
+
hud_python-0.3.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
119
|
+
hud_python-0.3.5.dist-info/licenses/LICENSE,sha256=yIzBheVUf86FC1bztAcr7RYWWNxyd3B-UJQ3uddg1HA,1078
|
|
120
|
+
hud_python-0.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|