hyperbrowser 0.64.0__py3-none-any.whl → 0.65.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 +16 -3
- hyperbrowser/client/managers/sync_manager/computer_action.py +16 -3
- hyperbrowser/models/__init__.py +2 -0
- hyperbrowser/models/computer_action.py +16 -2
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.65.0.dist-info}/METADATA +1 -1
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.65.0.dist-info}/RECORD +8 -8
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.65.0.dist-info}/WHEEL +0 -0
- {hyperbrowser-0.64.0.dist-info → hyperbrowser-0.65.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,7 @@ from hyperbrowser.models import (
|
|
|
12
12
|
ScrollActionParams,
|
|
13
13
|
TypeTextActionParams,
|
|
14
14
|
Coordinate,
|
|
15
|
+
HoldKeyActionParams,
|
|
15
16
|
)
|
|
16
17
|
|
|
17
18
|
|
|
@@ -42,8 +43,8 @@ class ComputerActionManager:
|
|
|
42
43
|
async def click(
|
|
43
44
|
self,
|
|
44
45
|
session: Union[SessionDetail, str],
|
|
45
|
-
x: int,
|
|
46
|
-
y: int,
|
|
46
|
+
x: Optional[int] = None,
|
|
47
|
+
y: Optional[int] = None,
|
|
47
48
|
button: str = "left",
|
|
48
49
|
num_clicks: int = 1,
|
|
49
50
|
return_screenshot: bool = False,
|
|
@@ -82,6 +83,18 @@ class ComputerActionManager:
|
|
|
82
83
|
params = PressKeysActionParams(keys=keys, return_screenshot=return_screenshot)
|
|
83
84
|
return await self._execute_request(session, params)
|
|
84
85
|
|
|
86
|
+
async def hold_key(
|
|
87
|
+
self,
|
|
88
|
+
session: Union[SessionDetail, str],
|
|
89
|
+
key: str,
|
|
90
|
+
duration: int,
|
|
91
|
+
return_screenshot: bool = False,
|
|
92
|
+
) -> ComputerActionResponse:
|
|
93
|
+
params = HoldKeyActionParams(
|
|
94
|
+
key=key, duration=duration, return_screenshot=return_screenshot
|
|
95
|
+
)
|
|
96
|
+
return await self._execute_request(session, params)
|
|
97
|
+
|
|
85
98
|
async def drag(
|
|
86
99
|
self,
|
|
87
100
|
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,7 @@ from hyperbrowser.models import (
|
|
|
12
12
|
ScrollActionParams,
|
|
13
13
|
TypeTextActionParams,
|
|
14
14
|
Coordinate,
|
|
15
|
+
HoldKeyActionParams,
|
|
15
16
|
)
|
|
16
17
|
|
|
17
18
|
|
|
@@ -42,8 +43,8 @@ class ComputerActionManager:
|
|
|
42
43
|
def click(
|
|
43
44
|
self,
|
|
44
45
|
session: Union[SessionDetail, str],
|
|
45
|
-
x: int,
|
|
46
|
-
y: int,
|
|
46
|
+
x: Optional[int] = None,
|
|
47
|
+
y: Optional[int] = None,
|
|
47
48
|
button: str = "left",
|
|
48
49
|
num_clicks: int = 1,
|
|
49
50
|
return_screenshot: bool = False,
|
|
@@ -82,6 +83,18 @@ class ComputerActionManager:
|
|
|
82
83
|
params = PressKeysActionParams(keys=keys, return_screenshot=return_screenshot)
|
|
83
84
|
return self._execute_request(session, params)
|
|
84
85
|
|
|
86
|
+
def hold_key(
|
|
87
|
+
self,
|
|
88
|
+
session: Union[SessionDetail, str],
|
|
89
|
+
key: str,
|
|
90
|
+
duration: int,
|
|
91
|
+
return_screenshot: bool = False,
|
|
92
|
+
) -> ComputerActionResponse:
|
|
93
|
+
params = HoldKeyActionParams(
|
|
94
|
+
key=key, duration=duration, return_screenshot=return_screenshot
|
|
95
|
+
)
|
|
96
|
+
return self._execute_request(session, params)
|
|
97
|
+
|
|
85
98
|
def drag(
|
|
86
99
|
self,
|
|
87
100
|
session: Union[SessionDetail, str],
|
hyperbrowser/models/__init__.py
CHANGED
|
@@ -113,6 +113,7 @@ from .computer_action import (
|
|
|
113
113
|
ComputerActionResponse,
|
|
114
114
|
Coordinate,
|
|
115
115
|
DragActionParams,
|
|
116
|
+
HoldKeyActionParams,
|
|
116
117
|
MoveMouseActionParams,
|
|
117
118
|
PressKeysActionParams,
|
|
118
119
|
ScreenshotActionParams,
|
|
@@ -272,6 +273,7 @@ __all__ = [
|
|
|
272
273
|
"ComputerActionResponse",
|
|
273
274
|
"Coordinate",
|
|
274
275
|
"DragActionParams",
|
|
276
|
+
"HoldKeyActionParams",
|
|
275
277
|
"MoveMouseActionParams",
|
|
276
278
|
"PressKeysActionParams",
|
|
277
279
|
"ScreenshotActionParams",
|
|
@@ -9,6 +9,7 @@ class ComputerAction(str, Enum):
|
|
|
9
9
|
CLICK = "click"
|
|
10
10
|
DRAG = "drag"
|
|
11
11
|
PRESS_KEYS = "press_keys"
|
|
12
|
+
HOLD_KEY = "hold_key"
|
|
12
13
|
MOVE_MOUSE = "move_mouse"
|
|
13
14
|
SCREENSHOT = "screenshot"
|
|
14
15
|
SCROLL = "scroll"
|
|
@@ -28,8 +29,8 @@ class ClickActionParams(BaseModel):
|
|
|
28
29
|
model_config = ConfigDict(use_enum_values=True)
|
|
29
30
|
|
|
30
31
|
action: Literal[ComputerAction.CLICK] = ComputerAction.CLICK
|
|
31
|
-
x: int
|
|
32
|
-
y: int
|
|
32
|
+
x: Optional[int] = Field(default=None)
|
|
33
|
+
y: Optional[int] = Field(default=None)
|
|
33
34
|
button: Literal["left", "right", "middle", "back", "forward", "wheel"] = Field(
|
|
34
35
|
default="left"
|
|
35
36
|
)
|
|
@@ -63,6 +64,19 @@ class PressKeysActionParams(BaseModel):
|
|
|
63
64
|
)
|
|
64
65
|
|
|
65
66
|
|
|
67
|
+
class HoldKeyActionParams(BaseModel):
|
|
68
|
+
"""Parameters for hold key action."""
|
|
69
|
+
|
|
70
|
+
model_config = ConfigDict(use_enum_values=True)
|
|
71
|
+
|
|
72
|
+
action: Literal[ComputerAction.HOLD_KEY] = ComputerAction.HOLD_KEY
|
|
73
|
+
key: str
|
|
74
|
+
duration: int
|
|
75
|
+
return_screenshot: bool = Field(
|
|
76
|
+
serialization_alias="returnScreenshot", default=False
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
|
|
66
80
|
class MoveMouseActionParams(BaseModel):
|
|
67
81
|
"""Parameters for move mouse action."""
|
|
68
82
|
|
|
@@ -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=BLngK2TMDpfyHqocCN2FyGoWpJYmaTQmvi5LcP_UOU4,4162
|
|
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=9fp83fS6kEQDxR_hdtyHoh8YTyKrPic5Gl1kGDyktAE,4048
|
|
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=O8-3uHgb0LUs-120tyizmCnvlpqYS93DbXKqVWFZPDQ,7102
|
|
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=Q2svsbA3VKV4zPX1jLlvHRLpNCNrm2lT0dh53TsbAls,3921
|
|
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.65.0.dist-info/METADATA,sha256=JsqFXnlWYBtFkEb-FGuBk9bi55AiMg3ZFOyYQAc6EAU,3651
|
|
58
|
+
hyperbrowser-0.65.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
59
|
+
hyperbrowser-0.65.0.dist-info/licenses/LICENSE,sha256=NbSXeOZ2JKnPpkyLBYkfPqt9eWNy-Lx3xb4sjsSR9mI,1069
|
|
60
|
+
hyperbrowser-0.65.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|