hyperbrowser 0.64.0__py3-none-any.whl → 0.66.0__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 hyperbrowser might be problematic. Click here for more details.
- hyperbrowser/client/managers/async_manager/computer_action.py +40 -4
- hyperbrowser/client/managers/sync_manager/computer_action.py +40 -4
- hyperbrowser/models/__init__.py +8 -0
- hyperbrowser/models/computer_action.py +49 -6
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.66.0.dist-info}/METADATA +1 -1
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.66.0.dist-info}/RECORD +8 -8
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.66.0.dist-info}/WHEEL +0 -0
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.66.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel
|
|
2
|
-
from typing import Union, List
|
|
2
|
+
from typing import Union, List, Optional
|
|
3
3
|
from hyperbrowser.models import (
|
|
4
4
|
SessionDetail,
|
|
5
5
|
ComputerActionParams,
|
|
@@ -12,6 +12,10 @@ from hyperbrowser.models import (
|
|
|
12
12
|
ScrollActionParams,
|
|
13
13
|
TypeTextActionParams,
|
|
14
14
|
Coordinate,
|
|
15
|
+
HoldKeyActionParams,
|
|
16
|
+
MouseDownActionParams,
|
|
17
|
+
MouseUpActionParams,
|
|
18
|
+
ComputerActionMouseButton,
|
|
15
19
|
)
|
|
16
20
|
|
|
17
21
|
|
|
@@ -42,9 +46,9 @@ class ComputerActionManager:
|
|
|
42
46
|
async def click(
|
|
43
47
|
self,
|
|
44
48
|
session: Union[SessionDetail, str],
|
|
45
|
-
x: int,
|
|
46
|
-
y: int,
|
|
47
|
-
button:
|
|
49
|
+
x: Optional[int] = None,
|
|
50
|
+
y: Optional[int] = None,
|
|
51
|
+
button: ComputerActionMouseButton = "left",
|
|
48
52
|
num_clicks: int = 1,
|
|
49
53
|
return_screenshot: bool = False,
|
|
50
54
|
) -> ComputerActionResponse:
|
|
@@ -82,6 +86,38 @@ class ComputerActionManager:
|
|
|
82
86
|
params = PressKeysActionParams(keys=keys, return_screenshot=return_screenshot)
|
|
83
87
|
return await self._execute_request(session, params)
|
|
84
88
|
|
|
89
|
+
async def hold_key(
|
|
90
|
+
self,
|
|
91
|
+
session: Union[SessionDetail, str],
|
|
92
|
+
key: str,
|
|
93
|
+
duration: int,
|
|
94
|
+
return_screenshot: bool = False,
|
|
95
|
+
) -> ComputerActionResponse:
|
|
96
|
+
params = HoldKeyActionParams(
|
|
97
|
+
key=key, duration=duration, return_screenshot=return_screenshot
|
|
98
|
+
)
|
|
99
|
+
return await self._execute_request(session, params)
|
|
100
|
+
|
|
101
|
+
async def mouse_down(
|
|
102
|
+
self,
|
|
103
|
+
session: Union[SessionDetail, str],
|
|
104
|
+
button: ComputerActionMouseButton = "left",
|
|
105
|
+
return_screenshot: bool = False,
|
|
106
|
+
) -> ComputerActionResponse:
|
|
107
|
+
params = MouseDownActionParams(
|
|
108
|
+
button=button, return_screenshot=return_screenshot
|
|
109
|
+
)
|
|
110
|
+
return await self._execute_request(session, params)
|
|
111
|
+
|
|
112
|
+
async def mouse_up(
|
|
113
|
+
self,
|
|
114
|
+
session: Union[SessionDetail, str],
|
|
115
|
+
button: ComputerActionMouseButton = "left",
|
|
116
|
+
return_screenshot: bool = False,
|
|
117
|
+
) -> ComputerActionResponse:
|
|
118
|
+
params = MouseUpActionParams(button=button, return_screenshot=return_screenshot)
|
|
119
|
+
return await self._execute_request(session, params)
|
|
120
|
+
|
|
85
121
|
async def drag(
|
|
86
122
|
self,
|
|
87
123
|
session: Union[SessionDetail, str],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from pydantic import BaseModel
|
|
2
|
-
from typing import Union, List
|
|
2
|
+
from typing import Union, List, Optional
|
|
3
3
|
from hyperbrowser.models import (
|
|
4
4
|
SessionDetail,
|
|
5
5
|
ComputerActionParams,
|
|
@@ -12,6 +12,10 @@ from hyperbrowser.models import (
|
|
|
12
12
|
ScrollActionParams,
|
|
13
13
|
TypeTextActionParams,
|
|
14
14
|
Coordinate,
|
|
15
|
+
HoldKeyActionParams,
|
|
16
|
+
MouseDownActionParams,
|
|
17
|
+
MouseUpActionParams,
|
|
18
|
+
ComputerActionMouseButton,
|
|
15
19
|
)
|
|
16
20
|
|
|
17
21
|
|
|
@@ -42,9 +46,9 @@ class ComputerActionManager:
|
|
|
42
46
|
def click(
|
|
43
47
|
self,
|
|
44
48
|
session: Union[SessionDetail, str],
|
|
45
|
-
x: int,
|
|
46
|
-
y: int,
|
|
47
|
-
button:
|
|
49
|
+
x: Optional[int] = None,
|
|
50
|
+
y: Optional[int] = None,
|
|
51
|
+
button: ComputerActionMouseButton = "left",
|
|
48
52
|
num_clicks: int = 1,
|
|
49
53
|
return_screenshot: bool = False,
|
|
50
54
|
) -> ComputerActionResponse:
|
|
@@ -82,6 +86,38 @@ class ComputerActionManager:
|
|
|
82
86
|
params = PressKeysActionParams(keys=keys, return_screenshot=return_screenshot)
|
|
83
87
|
return self._execute_request(session, params)
|
|
84
88
|
|
|
89
|
+
def hold_key(
|
|
90
|
+
self,
|
|
91
|
+
session: Union[SessionDetail, str],
|
|
92
|
+
key: str,
|
|
93
|
+
duration: int,
|
|
94
|
+
return_screenshot: bool = False,
|
|
95
|
+
) -> ComputerActionResponse:
|
|
96
|
+
params = HoldKeyActionParams(
|
|
97
|
+
key=key, duration=duration, return_screenshot=return_screenshot
|
|
98
|
+
)
|
|
99
|
+
return self._execute_request(session, params)
|
|
100
|
+
|
|
101
|
+
def mouse_down(
|
|
102
|
+
self,
|
|
103
|
+
session: Union[SessionDetail, str],
|
|
104
|
+
button: ComputerActionMouseButton = "left",
|
|
105
|
+
return_screenshot: bool = False,
|
|
106
|
+
) -> ComputerActionResponse:
|
|
107
|
+
params = MouseDownActionParams(
|
|
108
|
+
button=button, return_screenshot=return_screenshot
|
|
109
|
+
)
|
|
110
|
+
return self._execute_request(session, params)
|
|
111
|
+
|
|
112
|
+
def mouse_up(
|
|
113
|
+
self,
|
|
114
|
+
session: Union[SessionDetail, str],
|
|
115
|
+
button: ComputerActionMouseButton = "left",
|
|
116
|
+
return_screenshot: bool = False,
|
|
117
|
+
) -> ComputerActionResponse:
|
|
118
|
+
params = MouseUpActionParams(button=button, return_screenshot=return_screenshot)
|
|
119
|
+
return self._execute_request(session, params)
|
|
120
|
+
|
|
85
121
|
def drag(
|
|
86
122
|
self,
|
|
87
123
|
session: Union[SessionDetail, str],
|
hyperbrowser/models/__init__.py
CHANGED
|
@@ -113,11 +113,15 @@ from .computer_action import (
|
|
|
113
113
|
ComputerActionResponse,
|
|
114
114
|
Coordinate,
|
|
115
115
|
DragActionParams,
|
|
116
|
+
HoldKeyActionParams,
|
|
117
|
+
MouseDownActionParams,
|
|
118
|
+
MouseUpActionParams,
|
|
116
119
|
MoveMouseActionParams,
|
|
117
120
|
PressKeysActionParams,
|
|
118
121
|
ScreenshotActionParams,
|
|
119
122
|
ScrollActionParams,
|
|
120
123
|
TypeTextActionParams,
|
|
124
|
+
ComputerActionMouseButton,
|
|
121
125
|
)
|
|
122
126
|
from .session import (
|
|
123
127
|
BasicResponse,
|
|
@@ -272,9 +276,13 @@ __all__ = [
|
|
|
272
276
|
"ComputerActionResponse",
|
|
273
277
|
"Coordinate",
|
|
274
278
|
"DragActionParams",
|
|
279
|
+
"HoldKeyActionParams",
|
|
280
|
+
"MouseDownActionParams",
|
|
281
|
+
"MouseUpActionParams",
|
|
275
282
|
"MoveMouseActionParams",
|
|
276
283
|
"PressKeysActionParams",
|
|
277
284
|
"ScreenshotActionParams",
|
|
278
285
|
"ScrollActionParams",
|
|
279
286
|
"TypeTextActionParams",
|
|
287
|
+
"ComputerActionMouseButton",
|
|
280
288
|
]
|
|
@@ -8,13 +8,21 @@ class ComputerAction(str, Enum):
|
|
|
8
8
|
|
|
9
9
|
CLICK = "click"
|
|
10
10
|
DRAG = "drag"
|
|
11
|
-
|
|
11
|
+
HOLD_KEY = "hold_key"
|
|
12
|
+
MOUSE_DOWN = "mouse_down"
|
|
13
|
+
MOUSE_UP = "mouse_up"
|
|
12
14
|
MOVE_MOUSE = "move_mouse"
|
|
15
|
+
PRESS_KEYS = "press_keys"
|
|
13
16
|
SCREENSHOT = "screenshot"
|
|
14
17
|
SCROLL = "scroll"
|
|
15
18
|
TYPE_TEXT = "type_text"
|
|
16
19
|
|
|
17
20
|
|
|
21
|
+
ComputerActionMouseButton = Literal[
|
|
22
|
+
"left", "right", "middle", "back", "forward", "wheel"
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
|
|
18
26
|
class Coordinate(BaseModel):
|
|
19
27
|
"""Coordinate model for drag actions."""
|
|
20
28
|
|
|
@@ -28,11 +36,9 @@ class ClickActionParams(BaseModel):
|
|
|
28
36
|
model_config = ConfigDict(use_enum_values=True)
|
|
29
37
|
|
|
30
38
|
action: Literal[ComputerAction.CLICK] = ComputerAction.CLICK
|
|
31
|
-
x: int
|
|
32
|
-
y: int
|
|
33
|
-
button:
|
|
34
|
-
default="left"
|
|
35
|
-
)
|
|
39
|
+
x: Optional[int] = Field(default=None)
|
|
40
|
+
y: Optional[int] = Field(default=None)
|
|
41
|
+
button: ComputerActionMouseButton = Field(default="left")
|
|
36
42
|
num_clicks: int = Field(serialization_alias="numClicks", default=1)
|
|
37
43
|
return_screenshot: bool = Field(
|
|
38
44
|
serialization_alias="returnScreenshot", default=False
|
|
@@ -63,6 +69,43 @@ class PressKeysActionParams(BaseModel):
|
|
|
63
69
|
)
|
|
64
70
|
|
|
65
71
|
|
|
72
|
+
class HoldKeyActionParams(BaseModel):
|
|
73
|
+
"""Parameters for hold key action."""
|
|
74
|
+
|
|
75
|
+
model_config = ConfigDict(use_enum_values=True)
|
|
76
|
+
|
|
77
|
+
action: Literal[ComputerAction.HOLD_KEY] = ComputerAction.HOLD_KEY
|
|
78
|
+
key: str
|
|
79
|
+
duration: int
|
|
80
|
+
return_screenshot: bool = Field(
|
|
81
|
+
serialization_alias="returnScreenshot", default=False
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class MouseDownActionParams(BaseModel):
|
|
86
|
+
"""Parameters for mouse down action."""
|
|
87
|
+
|
|
88
|
+
model_config = ConfigDict(use_enum_values=True)
|
|
89
|
+
|
|
90
|
+
action: Literal[ComputerAction.MOUSE_DOWN] = ComputerAction.MOUSE_DOWN
|
|
91
|
+
button: ComputerActionMouseButton = Field(default="left")
|
|
92
|
+
return_screenshot: bool = Field(
|
|
93
|
+
serialization_alias="returnScreenshot", default=False
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class MouseUpActionParams(BaseModel):
|
|
98
|
+
"""Parameters for mouse up action."""
|
|
99
|
+
|
|
100
|
+
model_config = ConfigDict(use_enum_values=True)
|
|
101
|
+
|
|
102
|
+
action: Literal[ComputerAction.MOUSE_UP] = ComputerAction.MOUSE_UP
|
|
103
|
+
button: ComputerActionMouseButton = Field(default="left")
|
|
104
|
+
return_screenshot: bool = Field(
|
|
105
|
+
serialization_alias="returnScreenshot", default=False
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
|
|
66
109
|
class MoveMouseActionParams(BaseModel):
|
|
67
110
|
"""Parameters for move mouse action."""
|
|
68
111
|
|
|
@@ -7,7 +7,7 @@ hyperbrowser/client/managers/async_manager/agents/claude_computer_use.py,sha256=
|
|
|
7
7
|
hyperbrowser/client/managers/async_manager/agents/cua.py,sha256=e43QgSLi0LvGd9cOirsRETcit0MXvvtLA2cNv16xH0s,2337
|
|
8
8
|
hyperbrowser/client/managers/async_manager/agents/gemini_computer_use.py,sha256=S3qYI9UYh0a35EfUNcUQ1hhZnMtOuyS1V7NkgLrtGkk,2657
|
|
9
9
|
hyperbrowser/client/managers/async_manager/agents/hyper_agent.py,sha256=VzPTrvlYX_CZohoCD6Z8Cf1itDZ6BLKmrzpjv6YGs88,2501
|
|
10
|
-
hyperbrowser/client/managers/async_manager/computer_action.py,sha256=
|
|
10
|
+
hyperbrowser/client/managers/async_manager/computer_action.py,sha256=CKn3OEpidMRUHRjwzsMn_ufp-eaQvWJJOXPTAsCw4qE,5009
|
|
11
11
|
hyperbrowser/client/managers/async_manager/crawl.py,sha256=3EW-QauFPaW92XJk0mQU7f0-xgCdKKEc6WaPeM5exlA,4417
|
|
12
12
|
hyperbrowser/client/managers/async_manager/extension.py,sha256=a-xYtXXdCspukYtsguRgjEoQ8E_kzzA2tQAJtIyCtAs,1439
|
|
13
13
|
hyperbrowser/client/managers/async_manager/extract.py,sha256=wZO696_3Mse3tnsHgpSXibo6IfwcO5K1lWstcO_2GjQ,2492
|
|
@@ -21,7 +21,7 @@ hyperbrowser/client/managers/sync_manager/agents/claude_computer_use.py,sha256=p
|
|
|
21
21
|
hyperbrowser/client/managers/sync_manager/agents/cua.py,sha256=rh3JyXWzh9SvSLkDBtWGVUd2KMx27MyLMuNPnRwvbxk,2253
|
|
22
22
|
hyperbrowser/client/managers/sync_manager/agents/gemini_computer_use.py,sha256=qgNdoDASsh2XMM_oINawrKKpIXsITR3RzHZr3MfxsTs,2573
|
|
23
23
|
hyperbrowser/client/managers/sync_manager/agents/hyper_agent.py,sha256=UgB_eEa7PODGoTegulJzJDPBr2VQ-hIT0yA0z7BfYtk,2403
|
|
24
|
-
hyperbrowser/client/managers/sync_manager/computer_action.py,sha256=
|
|
24
|
+
hyperbrowser/client/managers/sync_manager/computer_action.py,sha256=bpBZQRIXC2yKDFsd8jbE-xPcxL4skZ8IgdTJZSEh3IM,4871
|
|
25
25
|
hyperbrowser/client/managers/sync_manager/crawl.py,sha256=mk5G7NGrneU47P2lbOlI7dkAZ9PMMPwPjIYGSO5yR-Y,4349
|
|
26
26
|
hyperbrowser/client/managers/sync_manager/extension.py,sha256=1YoyTZtMo43trl9jAsXv95aor0nBHiJEmLva39jFW-k,1415
|
|
27
27
|
hyperbrowser/client/managers/sync_manager/extract.py,sha256=rNSxAMR95_nL4qHuatPSzXrYFUGbLQE1xm9Us1myy9s,2391
|
|
@@ -32,13 +32,13 @@ hyperbrowser/client/managers/sync_manager/team.py,sha256=VKuKXpbGBZ-iwTDAlO0U0yv
|
|
|
32
32
|
hyperbrowser/client/sync.py,sha256=Oi-d4upNRkAUS5T5LcJPun5hL6FPbODn_PcM1AERCrg,1519
|
|
33
33
|
hyperbrowser/config.py,sha256=7P-sbcvqXVr8Qzubo5O6jJgzcCgB5DdwbeIgEjRZNlY,623
|
|
34
34
|
hyperbrowser/exceptions.py,sha256=SUUkptK2OL36xDORYmSicaTYR7pMbxeWAjAgz35xnM8,1171
|
|
35
|
-
hyperbrowser/models/__init__.py,sha256=
|
|
35
|
+
hyperbrowser/models/__init__.py,sha256=x9WTgA6cJ5OeVx82emGOgTQ0sN2o18TSyZL5oAf8paM,7274
|
|
36
36
|
hyperbrowser/models/agents/browser_use.py,sha256=Na3av_EivqOCtEjd-Bfm68sp3H_tr_cE8q1oFCjagUU,6303
|
|
37
37
|
hyperbrowser/models/agents/claude_computer_use.py,sha256=RflxYn2Js4TQQsAM3liTBoWJkIViYjOuBVFOPR4sTho,3311
|
|
38
38
|
hyperbrowser/models/agents/cua.py,sha256=mDFC3hVWQ3OS9wpjRTPdJgXaIOLDw00GGPD_pURo8Tw,3609
|
|
39
39
|
hyperbrowser/models/agents/gemini_computer_use.py,sha256=31nSL6BvTTdidVWT1Q0ftftJnPWQJIEDW9R4OxoUuKo,3342
|
|
40
40
|
hyperbrowser/models/agents/hyper_agent.py,sha256=tHca1Xw6sHekF0SAL1buKMjeUjwmm8qciKFCWsJ1q0g,3728
|
|
41
|
-
hyperbrowser/models/computer_action.py,sha256=
|
|
41
|
+
hyperbrowser/models/computer_action.py,sha256=79bL8pzxqsoQbVgENo_0YdB3nhOW_ZDsGxzC1H-2pBA,4781
|
|
42
42
|
hyperbrowser/models/consts.py,sha256=xEfvmRa8UIMPshQdSbrmJ1v_qiJIOuOuG55S9MTg8YU,7332
|
|
43
43
|
hyperbrowser/models/crawl.py,sha256=XUS5Ja-Abl8gMyDtLIsRaEKa_taSOORMLOFCdAPgGaI,2820
|
|
44
44
|
hyperbrowser/models/extension.py,sha256=nXjKXKt9R7RxyZ4hd3EvfqZsEGy_ufh1r5j2mqCLykQ,804
|
|
@@ -54,7 +54,7 @@ hyperbrowser/tools/schema.py,sha256=YFUAoQjx_SpjezS3UQdTCCn4xMdN3CgEeKAlulkIATc,
|
|
|
54
54
|
hyperbrowser/transport/async_transport.py,sha256=6HKoeM5TutIqraEscEWobvSPWF3iVKh2hPflGNKwykw,4128
|
|
55
55
|
hyperbrowser/transport/base.py,sha256=ildpMrDiM8nvrSGrH2LTOafmB17T7PQB_NQ1ODA378U,1703
|
|
56
56
|
hyperbrowser/transport/sync.py,sha256=aUVpxWF8sqSycLNKxVNEZvlsZSoqc1eHgPK1Y1QA1u8,3422
|
|
57
|
-
hyperbrowser-0.
|
|
58
|
-
hyperbrowser-0.
|
|
59
|
-
hyperbrowser-0.
|
|
60
|
-
hyperbrowser-0.
|
|
57
|
+
hyperbrowser-0.66.0.dist-info/METADATA,sha256=O-wfuNgIU3XDCMGCiY0PyqQvVh1fVdWkCKKwFcdjbZg,3651
|
|
58
|
+
hyperbrowser-0.66.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
59
|
+
hyperbrowser-0.66.0.dist-info/licenses/LICENSE,sha256=NbSXeOZ2JKnPpkyLBYkfPqt9eWNy-Lx3xb4sjsSR9mI,1069
|
|
60
|
+
hyperbrowser-0.66.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|