hyperbrowser 1.1.0__tar.gz → 1.2.1__tar.gz
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.
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/PKG-INFO +1 -1
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/sandbox.py +40 -2
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/volume.py +19 -4
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sandboxes/image_build.py +1 -1
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/sandbox.py +40 -2
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/volume.py +19 -4
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/__init__.py +12 -1
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/consts.py +1 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/sandbox.py +54 -21
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/session.py +1 -1
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/volume.py +9 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/__init__.py +8 -1
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/sandbox.py +23 -2
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/session.py +1 -1
- hyperbrowser-1.2.1/hyperbrowser/types/volume.py +20 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/pyproject.toml +1 -1
- hyperbrowser-1.1.0/hyperbrowser/types/volume.py +0 -10
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/LICENSE +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/README.md +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/_request.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/async_client.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/base.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/browser_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/claude_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/cua.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/gemini_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/grok_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/hyper_agent.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/computer_action.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/crawl.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/extension.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/extract.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/profile.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/sandboxes/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_files.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_processes.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_terminal.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_transport.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/scrape.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/session.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/team.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/web/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/web/batch_fetch.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/web/crawl.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sandboxes/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sandboxes/shared.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/browser_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/claude_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/cua.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/gemini_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/grok_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/hyper_agent.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/computer_action.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/crawl.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/extension.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/extract.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/profile.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/sandboxes/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_files.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_processes.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_terminal.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_transport.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/scrape.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/session.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/team.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/web/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/web/batch_fetch.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/web/crawl.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/sync.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/config.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/exceptions.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/_parsers.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/agents/browser_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/agents/claude_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/agents/cua.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/agents/gemini_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/agents/grok_computer_use.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/agents/hyper_agent.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/computer_action.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/crawl.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/extension.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/extract.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/profile.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/scrape.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/team.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/web/batch_fetch.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/web/branding.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/web/common.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/web/crawl.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/web/fetch.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/models/web/search.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/py.typed +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/sandbox_common.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/tools/__init__.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/tools/anthropic.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/tools/openai.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/tools/schema.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/transport/async_transport.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/transport/base.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/transport/sync.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/_json.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/agents.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/computer_action.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/crawl.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/extension.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/extract.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/profile.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/scrape.py +0 -0
- {hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/types/web.py +0 -0
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/sandbox.py
RENAMED
|
@@ -15,6 +15,8 @@ from ....models.sandbox import (
|
|
|
15
15
|
SandboxExposeResult,
|
|
16
16
|
SandboxImageBuild,
|
|
17
17
|
SandboxImageBuildCreateResult,
|
|
18
|
+
SandboxImageBuildListParams,
|
|
19
|
+
SandboxImageBuildListResponse,
|
|
18
20
|
SandboxImageListParams,
|
|
19
21
|
SandboxImageListResponse,
|
|
20
22
|
SandboxImageInit,
|
|
@@ -25,8 +27,11 @@ from ....models.sandbox import (
|
|
|
25
27
|
SandboxNetworkPolicy,
|
|
26
28
|
SandboxNetworkUpdateResult,
|
|
27
29
|
SandboxRuntimeSession,
|
|
30
|
+
SandboxImageDeleteResult,
|
|
31
|
+
SandboxSnapshotDeleteResult,
|
|
28
32
|
SandboxSnapshotListParams,
|
|
29
33
|
SandboxSnapshotListResponse,
|
|
34
|
+
SandboxSnapshotSummary,
|
|
30
35
|
SandboxUnexposeResult,
|
|
31
36
|
StartSandboxFromSnapshotParams,
|
|
32
37
|
)
|
|
@@ -37,6 +42,7 @@ from ....types import (
|
|
|
37
42
|
CreateSandboxParams as CreateSandboxParamsDict,
|
|
38
43
|
SandboxExecParams as SandboxExecParamsDict,
|
|
39
44
|
SandboxExposeParams as SandboxExposeParamsDict,
|
|
45
|
+
SandboxImageBuildListParams as SandboxImageBuildListParamsDict,
|
|
40
46
|
SandboxImageInit as SandboxImageInitDict,
|
|
41
47
|
SandboxImageListParams as SandboxImageListParamsDict,
|
|
42
48
|
SandboxListParams as SandboxListParamsDict,
|
|
@@ -167,6 +173,10 @@ class SandboxHandle:
|
|
|
167
173
|
def disk_mib(self):
|
|
168
174
|
return self._detail.disk_mib
|
|
169
175
|
|
|
176
|
+
@property
|
|
177
|
+
def timeout_minutes(self):
|
|
178
|
+
return self._detail.timeout_minutes
|
|
179
|
+
|
|
170
180
|
@property
|
|
171
181
|
def exposed_ports(self):
|
|
172
182
|
return self._detail.exposed_ports
|
|
@@ -346,7 +356,7 @@ class SandboxHandle:
|
|
|
346
356
|
)
|
|
347
357
|
|
|
348
358
|
def _assert_runtime_available(self) -> None:
|
|
349
|
-
if self._detail.status in {"closed", "error"}:
|
|
359
|
+
if self._detail.status in {"closed", "error", "close-error"}:
|
|
350
360
|
raise HyperbrowserError(
|
|
351
361
|
f"Sandbox {self.id} is not running",
|
|
352
362
|
status_code=409,
|
|
@@ -394,7 +404,7 @@ class SandboxManager:
|
|
|
394
404
|
],
|
|
395
405
|
) -> SandboxHandle:
|
|
396
406
|
normalized = coerce_request(params, StartSandboxFromSnapshotParams)
|
|
397
|
-
return await self.create(normalized)
|
|
407
|
+
return await self.create(normalized.model_dump(exclude_none=True))
|
|
398
408
|
|
|
399
409
|
async def get(self, sandbox_id: str) -> SandboxHandle:
|
|
400
410
|
return self.attach(await self.get_detail(sandbox_id))
|
|
@@ -418,6 +428,10 @@ class SandboxManager:
|
|
|
418
428
|
)
|
|
419
429
|
return SandboxListResponse(**payload)
|
|
420
430
|
|
|
431
|
+
async def delete_image(self, image: str) -> SandboxImageDeleteResult:
|
|
432
|
+
payload = await self._request("DELETE", f"/images/{image}")
|
|
433
|
+
return SandboxImageDeleteResult(**payload)
|
|
434
|
+
|
|
421
435
|
async def list_images(
|
|
422
436
|
self,
|
|
423
437
|
params: Optional[
|
|
@@ -450,6 +464,14 @@ class SandboxManager:
|
|
|
450
464
|
)
|
|
451
465
|
return SandboxSnapshotListResponse(**payload)
|
|
452
466
|
|
|
467
|
+
async def get_snapshot(self, snapshot: str) -> SandboxSnapshotSummary:
|
|
468
|
+
payload = await self._request("GET", f"/snapshots/{snapshot}")
|
|
469
|
+
return SandboxSnapshotSummary(**payload["snapshot"])
|
|
470
|
+
|
|
471
|
+
async def delete_snapshot(self, snapshot: str) -> SandboxSnapshotDeleteResult:
|
|
472
|
+
payload = await self._request("DELETE", f"/snapshots/{snapshot}")
|
|
473
|
+
return SandboxSnapshotDeleteResult(**payload)
|
|
474
|
+
|
|
453
475
|
async def stop(self, sandbox_id: str) -> BasicResponse:
|
|
454
476
|
payload = await self._request("PUT", f"/sandbox/{sandbox_id}/stop")
|
|
455
477
|
return BasicResponse(**payload)
|
|
@@ -491,6 +513,22 @@ class SandboxManager:
|
|
|
491
513
|
payload = await self._request("POST", f"/images/builds/{build_id}/cancel")
|
|
492
514
|
return SandboxImageBuild(**payload["build"])
|
|
493
515
|
|
|
516
|
+
async def list_image_builds(
|
|
517
|
+
self,
|
|
518
|
+
params: Optional[
|
|
519
|
+
Union[SandboxImageBuildListParamsDict, SandboxImageBuildListParams]
|
|
520
|
+
] = None,
|
|
521
|
+
) -> SandboxImageBuildListResponse:
|
|
522
|
+
payload = await self._request(
|
|
523
|
+
"GET",
|
|
524
|
+
"/images/builds",
|
|
525
|
+
params=dump_request(
|
|
526
|
+
params if params is not None else {},
|
|
527
|
+
SandboxImageBuildListParams,
|
|
528
|
+
),
|
|
529
|
+
)
|
|
530
|
+
return SandboxImageBuildListResponse(**payload)
|
|
531
|
+
|
|
494
532
|
async def wait_for_image_build(
|
|
495
533
|
self,
|
|
496
534
|
build_id: str,
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/volume.py
RENAMED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
from typing import Union
|
|
1
|
+
from typing import Optional, Union
|
|
2
2
|
|
|
3
3
|
from hyperbrowser.client._request import dump_request
|
|
4
|
-
from hyperbrowser.models.volume import
|
|
4
|
+
from hyperbrowser.models.volume import (
|
|
5
|
+
CreateVolumeParams,
|
|
6
|
+
Volume,
|
|
7
|
+
VolumeListParams,
|
|
8
|
+
VolumeListResponse,
|
|
9
|
+
)
|
|
5
10
|
from hyperbrowser.types import CreateVolumeParams as CreateVolumeParamsDict
|
|
11
|
+
from hyperbrowser.types import VolumeListParams as VolumeListParamsDict
|
|
6
12
|
|
|
7
13
|
|
|
8
14
|
class VolumeManager:
|
|
@@ -19,8 +25,17 @@ class VolumeManager:
|
|
|
19
25
|
)
|
|
20
26
|
return Volume(**response.data)
|
|
21
27
|
|
|
22
|
-
async def list(
|
|
23
|
-
|
|
28
|
+
async def list(
|
|
29
|
+
self,
|
|
30
|
+
params: Optional[Union[VolumeListParamsDict, VolumeListParams]] = None,
|
|
31
|
+
) -> VolumeListResponse:
|
|
32
|
+
response = await self._client.transport.get(
|
|
33
|
+
self._client._build_url("/volume"),
|
|
34
|
+
params=dump_request(
|
|
35
|
+
params if params is not None else {},
|
|
36
|
+
VolumeListParams,
|
|
37
|
+
),
|
|
38
|
+
)
|
|
24
39
|
return VolumeListResponse(**response.data)
|
|
25
40
|
|
|
26
41
|
async def get(self, volume_id: str) -> Volume:
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sandboxes/image_build.py
RENAMED
|
@@ -22,7 +22,7 @@ from ....models.sandbox import (
|
|
|
22
22
|
IMAGE_BUILD_INPUT_FORMAT: SandboxImageBuildInputFormat = "rootfs_export_tar_gz"
|
|
23
23
|
IMAGE_BUILD_SOURCE_PLATFORM = "linux/amd64"
|
|
24
24
|
TERMINAL_IMAGE_BUILD_STATUSES: FrozenSet[SandboxImageBuildStatus] = frozenset(
|
|
25
|
-
{"completed", "failed", "canceled"
|
|
25
|
+
{"completed", "failed", "canceled"}
|
|
26
26
|
)
|
|
27
27
|
_IMAGE_INIT_ENV_KEY_PATTERN = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
|
|
28
28
|
_RESERVED_IMAGE_INIT_ENV_KEYS = {
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/sandbox.py
RENAMED
|
@@ -13,6 +13,8 @@ from ....models.sandbox import (
|
|
|
13
13
|
SandboxExposeResult,
|
|
14
14
|
SandboxImageBuild,
|
|
15
15
|
SandboxImageBuildCreateResult,
|
|
16
|
+
SandboxImageBuildListParams,
|
|
17
|
+
SandboxImageBuildListResponse,
|
|
16
18
|
SandboxImageListParams,
|
|
17
19
|
SandboxImageListResponse,
|
|
18
20
|
SandboxImageInit,
|
|
@@ -23,8 +25,11 @@ from ....models.sandbox import (
|
|
|
23
25
|
SandboxNetworkPolicy,
|
|
24
26
|
SandboxNetworkUpdateResult,
|
|
25
27
|
SandboxRuntimeSession,
|
|
28
|
+
SandboxImageDeleteResult,
|
|
29
|
+
SandboxSnapshotDeleteResult,
|
|
26
30
|
SandboxSnapshotListParams,
|
|
27
31
|
SandboxSnapshotListResponse,
|
|
32
|
+
SandboxSnapshotSummary,
|
|
28
33
|
SandboxUnexposeResult,
|
|
29
34
|
StartSandboxFromSnapshotParams,
|
|
30
35
|
)
|
|
@@ -35,6 +40,7 @@ from ....types import (
|
|
|
35
40
|
CreateSandboxParams as CreateSandboxParamsDict,
|
|
36
41
|
SandboxExecParams as SandboxExecParamsDict,
|
|
37
42
|
SandboxExposeParams as SandboxExposeParamsDict,
|
|
43
|
+
SandboxImageBuildListParams as SandboxImageBuildListParamsDict,
|
|
38
44
|
SandboxImageInit as SandboxImageInitDict,
|
|
39
45
|
SandboxImageListParams as SandboxImageListParamsDict,
|
|
40
46
|
SandboxListParams as SandboxListParamsDict,
|
|
@@ -159,6 +165,10 @@ class SandboxHandle:
|
|
|
159
165
|
def disk_mib(self):
|
|
160
166
|
return self._detail.disk_mib
|
|
161
167
|
|
|
168
|
+
@property
|
|
169
|
+
def timeout_minutes(self):
|
|
170
|
+
return self._detail.timeout_minutes
|
|
171
|
+
|
|
162
172
|
@property
|
|
163
173
|
def exposed_ports(self):
|
|
164
174
|
return self._detail.exposed_ports
|
|
@@ -338,7 +348,7 @@ class SandboxHandle:
|
|
|
338
348
|
)
|
|
339
349
|
|
|
340
350
|
def _assert_runtime_available(self) -> None:
|
|
341
|
-
if self._detail.status in {"closed", "error"}:
|
|
351
|
+
if self._detail.status in {"closed", "error", "close-error"}:
|
|
342
352
|
raise HyperbrowserError(
|
|
343
353
|
f"Sandbox {self.id} is not running",
|
|
344
354
|
status_code=409,
|
|
@@ -386,7 +396,7 @@ class SandboxManager:
|
|
|
386
396
|
],
|
|
387
397
|
) -> SandboxHandle:
|
|
388
398
|
normalized = coerce_request(params, StartSandboxFromSnapshotParams)
|
|
389
|
-
return self.create(normalized)
|
|
399
|
+
return self.create(normalized.model_dump(exclude_none=True))
|
|
390
400
|
|
|
391
401
|
def get(self, sandbox_id: str) -> SandboxHandle:
|
|
392
402
|
return self.attach(self.get_detail(sandbox_id))
|
|
@@ -410,6 +420,10 @@ class SandboxManager:
|
|
|
410
420
|
)
|
|
411
421
|
return SandboxListResponse(**payload)
|
|
412
422
|
|
|
423
|
+
def delete_image(self, image: str) -> SandboxImageDeleteResult:
|
|
424
|
+
payload = self._request("DELETE", f"/images/{image}")
|
|
425
|
+
return SandboxImageDeleteResult(**payload)
|
|
426
|
+
|
|
413
427
|
def list_images(
|
|
414
428
|
self,
|
|
415
429
|
params: Optional[
|
|
@@ -442,6 +456,14 @@ class SandboxManager:
|
|
|
442
456
|
)
|
|
443
457
|
return SandboxSnapshotListResponse(**payload)
|
|
444
458
|
|
|
459
|
+
def get_snapshot(self, snapshot: str) -> SandboxSnapshotSummary:
|
|
460
|
+
payload = self._request("GET", f"/snapshots/{snapshot}")
|
|
461
|
+
return SandboxSnapshotSummary(**payload["snapshot"])
|
|
462
|
+
|
|
463
|
+
def delete_snapshot(self, snapshot: str) -> SandboxSnapshotDeleteResult:
|
|
464
|
+
payload = self._request("DELETE", f"/snapshots/{snapshot}")
|
|
465
|
+
return SandboxSnapshotDeleteResult(**payload)
|
|
466
|
+
|
|
445
467
|
def stop(self, sandbox_id: str) -> BasicResponse:
|
|
446
468
|
payload = self._request("PUT", f"/sandbox/{sandbox_id}/stop")
|
|
447
469
|
return BasicResponse(**payload)
|
|
@@ -483,6 +505,22 @@ class SandboxManager:
|
|
|
483
505
|
payload = self._request("POST", f"/images/builds/{build_id}/cancel")
|
|
484
506
|
return SandboxImageBuild(**payload["build"])
|
|
485
507
|
|
|
508
|
+
def list_image_builds(
|
|
509
|
+
self,
|
|
510
|
+
params: Optional[
|
|
511
|
+
Union[SandboxImageBuildListParamsDict, SandboxImageBuildListParams]
|
|
512
|
+
] = None,
|
|
513
|
+
) -> SandboxImageBuildListResponse:
|
|
514
|
+
payload = self._request(
|
|
515
|
+
"GET",
|
|
516
|
+
"/images/builds",
|
|
517
|
+
params=dump_request(
|
|
518
|
+
params if params is not None else {},
|
|
519
|
+
SandboxImageBuildListParams,
|
|
520
|
+
),
|
|
521
|
+
)
|
|
522
|
+
return SandboxImageBuildListResponse(**payload)
|
|
523
|
+
|
|
486
524
|
def wait_for_image_build(
|
|
487
525
|
self,
|
|
488
526
|
build_id: str,
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/volume.py
RENAMED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
from typing import Union
|
|
1
|
+
from typing import Optional, Union
|
|
2
2
|
|
|
3
3
|
from hyperbrowser.client._request import dump_request
|
|
4
|
-
from hyperbrowser.models.volume import
|
|
4
|
+
from hyperbrowser.models.volume import (
|
|
5
|
+
CreateVolumeParams,
|
|
6
|
+
Volume,
|
|
7
|
+
VolumeListParams,
|
|
8
|
+
VolumeListResponse,
|
|
9
|
+
)
|
|
5
10
|
from hyperbrowser.types import CreateVolumeParams as CreateVolumeParamsDict
|
|
11
|
+
from hyperbrowser.types import VolumeListParams as VolumeListParamsDict
|
|
6
12
|
|
|
7
13
|
|
|
8
14
|
class VolumeManager:
|
|
@@ -19,8 +25,17 @@ class VolumeManager:
|
|
|
19
25
|
)
|
|
20
26
|
return Volume(**response.data)
|
|
21
27
|
|
|
22
|
-
def list(
|
|
23
|
-
|
|
28
|
+
def list(
|
|
29
|
+
self,
|
|
30
|
+
params: Optional[Union[VolumeListParamsDict, VolumeListParams]] = None,
|
|
31
|
+
) -> VolumeListResponse:
|
|
32
|
+
response = self._client.transport.get(
|
|
33
|
+
self._client._build_url("/volume"),
|
|
34
|
+
params=dump_request(
|
|
35
|
+
params if params is not None else {},
|
|
36
|
+
VolumeListParams,
|
|
37
|
+
),
|
|
38
|
+
)
|
|
24
39
|
return VolumeListResponse(**response.data)
|
|
25
40
|
|
|
26
41
|
def get(self, volume_id: str) -> Volume:
|
|
@@ -210,7 +210,7 @@ from .profile import (
|
|
|
210
210
|
ProfileListResponse,
|
|
211
211
|
ProfileResponse,
|
|
212
212
|
)
|
|
213
|
-
from .volume import CreateVolumeParams, Volume, VolumeListResponse
|
|
213
|
+
from .volume import CreateVolumeParams, Volume, VolumeListParams, VolumeListResponse
|
|
214
214
|
from .scrape import (
|
|
215
215
|
BatchScrapeJobResponse,
|
|
216
216
|
BatchScrapeJobStatusResponse,
|
|
@@ -310,12 +310,15 @@ from .sandbox import (
|
|
|
310
310
|
SandboxImageListResponse,
|
|
311
311
|
SandboxImageSummary,
|
|
312
312
|
SandboxSnapshotStatus,
|
|
313
|
+
SandboxSnapshotDeleteResult,
|
|
314
|
+
SandboxImageDeleteResult,
|
|
313
315
|
SandboxSnapshotListResponse,
|
|
314
316
|
SandboxSnapshotSummary,
|
|
315
317
|
SandboxSnapshotListParams,
|
|
316
318
|
SandboxMemorySnapshotParams,
|
|
317
319
|
SandboxMemorySnapshotResult,
|
|
318
320
|
SandboxImageBuildInputFormat,
|
|
321
|
+
SandboxImageBuildSourcePlatform,
|
|
319
322
|
SandboxImageBuildStatus,
|
|
320
323
|
SandboxImageInit,
|
|
321
324
|
CreateSandboxImageBuildParams,
|
|
@@ -323,6 +326,8 @@ from .sandbox import (
|
|
|
323
326
|
SandboxImageBuildUpload,
|
|
324
327
|
SandboxImageBuild,
|
|
325
328
|
SandboxImageBuildCreateResult,
|
|
329
|
+
SandboxImageBuildListParams,
|
|
330
|
+
SandboxImageBuildListResponse,
|
|
326
331
|
SandboxExposeParams,
|
|
327
332
|
SandboxExposeResult,
|
|
328
333
|
SandboxUnexposeResult,
|
|
@@ -530,6 +535,7 @@ __all__ = [
|
|
|
530
535
|
# volume
|
|
531
536
|
"CreateVolumeParams",
|
|
532
537
|
"Volume",
|
|
538
|
+
"VolumeListParams",
|
|
533
539
|
"VolumeListResponse",
|
|
534
540
|
# scrape
|
|
535
541
|
"BatchScrapeJobResponse",
|
|
@@ -604,12 +610,15 @@ __all__ = [
|
|
|
604
610
|
"SandboxImageListResponse",
|
|
605
611
|
"SandboxImageSummary",
|
|
606
612
|
"SandboxSnapshotStatus",
|
|
613
|
+
"SandboxSnapshotDeleteResult",
|
|
614
|
+
"SandboxImageDeleteResult",
|
|
607
615
|
"SandboxSnapshotListResponse",
|
|
608
616
|
"SandboxSnapshotSummary",
|
|
609
617
|
"SandboxSnapshotListParams",
|
|
610
618
|
"SandboxMemorySnapshotParams",
|
|
611
619
|
"SandboxMemorySnapshotResult",
|
|
612
620
|
"SandboxImageBuildInputFormat",
|
|
621
|
+
"SandboxImageBuildSourcePlatform",
|
|
613
622
|
"SandboxImageBuildStatus",
|
|
614
623
|
"SandboxImageInit",
|
|
615
624
|
"CreateSandboxImageBuildParams",
|
|
@@ -617,6 +626,8 @@ __all__ = [
|
|
|
617
626
|
"SandboxImageBuildUpload",
|
|
618
627
|
"SandboxImageBuild",
|
|
619
628
|
"SandboxImageBuildCreateResult",
|
|
629
|
+
"SandboxImageBuildListParams",
|
|
630
|
+
"SandboxImageBuildListResponse",
|
|
620
631
|
"SandboxExposeParams",
|
|
621
632
|
"SandboxExposeResult",
|
|
622
633
|
"SandboxUnexposeResult",
|
|
@@ -39,14 +39,16 @@ SandboxFileWatchRoute = Literal["ws", "stream"]
|
|
|
39
39
|
SandboxFileSystemEventType = Literal["chmod", "create", "remove", "rename", "write"]
|
|
40
40
|
SandboxVolumeMountType = Literal["rw", "ro"]
|
|
41
41
|
SandboxImageBuildInputFormat = Literal["rootfs_export_tar_gz"]
|
|
42
|
+
SandboxImageBuildSourcePlatform = Literal["linux/amd64"]
|
|
42
43
|
SandboxImageBuildStatus = Literal[
|
|
43
44
|
"awaiting_upload",
|
|
44
45
|
"upload_verified",
|
|
46
|
+
"dispatching",
|
|
45
47
|
"building",
|
|
48
|
+
"verifying",
|
|
46
49
|
"completed",
|
|
47
50
|
"failed",
|
|
48
51
|
"canceled",
|
|
49
|
-
"cancelled",
|
|
50
52
|
]
|
|
51
53
|
|
|
52
54
|
|
|
@@ -147,6 +149,7 @@ class Sandbox(SandboxBaseModel):
|
|
|
147
149
|
cpu: Optional[int] = Field(default=None, alias="vcpus")
|
|
148
150
|
memory_mib: Optional[int] = Field(default=None, alias="memMiB")
|
|
149
151
|
disk_mib: Optional[int] = Field(default=None, alias="diskSizeMiB")
|
|
152
|
+
timeout_minutes: Optional[int] = Field(default=None, alias="timeoutMinutes")
|
|
150
153
|
runtime: SandboxRuntimeTarget
|
|
151
154
|
exposed_ports: List[SandboxExposeResult] = Field(
|
|
152
155
|
default_factory=list,
|
|
@@ -163,6 +166,7 @@ class Sandbox(SandboxBaseModel):
|
|
|
163
166
|
"cpu",
|
|
164
167
|
"memory_mib",
|
|
165
168
|
"disk_mib",
|
|
169
|
+
"timeout_minutes",
|
|
166
170
|
mode="before",
|
|
167
171
|
)
|
|
168
172
|
@classmethod
|
|
@@ -194,13 +198,7 @@ class SandboxRuntimeSession(SandboxBaseModel):
|
|
|
194
198
|
return _parse_optional_datetime(value)
|
|
195
199
|
|
|
196
200
|
|
|
197
|
-
class
|
|
198
|
-
snapshot_name: Optional[str] = Field(
|
|
199
|
-
default=None, serialization_alias="snapshotName"
|
|
200
|
-
)
|
|
201
|
-
snapshot_id: Optional[str] = Field(default=None, serialization_alias="snapshotId")
|
|
202
|
-
image_name: Optional[str] = Field(default=None, serialization_alias="imageName")
|
|
203
|
-
image_id: Optional[str] = Field(default=None, serialization_alias="imageId")
|
|
201
|
+
class _SandboxLaunchCommonParams(SandboxBaseModel):
|
|
204
202
|
region: Optional[SandboxRegion] = None
|
|
205
203
|
enable_recording: Optional[bool] = Field(
|
|
206
204
|
default=None, serialization_alias="enableRecording"
|
|
@@ -216,11 +214,6 @@ class CreateSandboxParams(SandboxBaseModel):
|
|
|
216
214
|
timeout_minutes: Optional[int] = Field(
|
|
217
215
|
default=None, serialization_alias="timeoutMinutes"
|
|
218
216
|
)
|
|
219
|
-
cpu: Optional[int] = Field(default=None, ge=1, serialization_alias="vcpus")
|
|
220
|
-
memory_mib: Optional[int] = Field(default=None, ge=1, serialization_alias="memMiB")
|
|
221
|
-
disk_mib: Optional[int] = Field(
|
|
222
|
-
default=None, ge=1, serialization_alias="diskSizeMiB"
|
|
223
|
-
)
|
|
224
217
|
allow_internet_access: Optional[bool] = Field(
|
|
225
218
|
default=None,
|
|
226
219
|
serialization_alias="allowInternetAccess",
|
|
@@ -228,6 +221,20 @@ class CreateSandboxParams(SandboxBaseModel):
|
|
|
228
221
|
allow_out: Optional[List[str]] = Field(default=None, serialization_alias="allowOut")
|
|
229
222
|
deny_out: Optional[List[str]] = Field(default=None, serialization_alias="denyOut")
|
|
230
223
|
|
|
224
|
+
|
|
225
|
+
class CreateSandboxParams(_SandboxLaunchCommonParams):
|
|
226
|
+
snapshot_name: Optional[str] = Field(
|
|
227
|
+
default=None, serialization_alias="snapshotName"
|
|
228
|
+
)
|
|
229
|
+
snapshot_id: Optional[str] = Field(default=None, serialization_alias="snapshotId")
|
|
230
|
+
image_name: Optional[str] = Field(default=None, serialization_alias="imageName")
|
|
231
|
+
image_id: Optional[str] = Field(default=None, serialization_alias="imageId")
|
|
232
|
+
cpu: Optional[int] = Field(default=None, ge=1, serialization_alias="vcpus")
|
|
233
|
+
memory_mib: Optional[int] = Field(default=None, ge=1, serialization_alias="memMiB")
|
|
234
|
+
disk_mib: Optional[int] = Field(
|
|
235
|
+
default=None, ge=1, serialization_alias="diskSizeMiB"
|
|
236
|
+
)
|
|
237
|
+
|
|
231
238
|
@model_validator(mode="after")
|
|
232
239
|
def validate_launch_source(self):
|
|
233
240
|
if self.snapshot_id and not self.snapshot_name:
|
|
@@ -250,8 +257,11 @@ class CreateSandboxParams(SandboxBaseModel):
|
|
|
250
257
|
return self
|
|
251
258
|
|
|
252
259
|
|
|
253
|
-
class StartSandboxFromSnapshotParams(
|
|
254
|
-
|
|
260
|
+
class StartSandboxFromSnapshotParams(_SandboxLaunchCommonParams):
|
|
261
|
+
model_config = ConfigDict(populate_by_name=True, extra="forbid")
|
|
262
|
+
|
|
263
|
+
snapshot_name: str = Field(min_length=1, serialization_alias="snapshotName")
|
|
264
|
+
snapshot_id: Optional[str] = Field(default=None, serialization_alias="snapshotId")
|
|
255
265
|
|
|
256
266
|
|
|
257
267
|
class SandboxListParams(SandboxBaseModel):
|
|
@@ -309,6 +319,9 @@ class SandboxSnapshotSummary(SandboxBaseModel):
|
|
|
309
319
|
image_name: str = Field(alias="imageName")
|
|
310
320
|
image_id: str = Field(alias="imageId")
|
|
311
321
|
status: SandboxSnapshotStatus
|
|
322
|
+
vcpus: Optional[int] = None
|
|
323
|
+
mem_mib: Optional[int] = Field(default=None, alias="memMiB")
|
|
324
|
+
disk_size_mib: Optional[int] = Field(default=None, alias="diskSizeMiB")
|
|
312
325
|
compatibility_tag: Optional[str] = Field(default=None, alias="compatibilityTag")
|
|
313
326
|
metadata: Dict[str, object]
|
|
314
327
|
uploaded: bool
|
|
@@ -334,6 +347,17 @@ class SandboxSnapshotListResponse(SandboxBaseModel):
|
|
|
334
347
|
per_page: Optional[int] = Field(default=None, alias="perPage")
|
|
335
348
|
|
|
336
349
|
|
|
350
|
+
class SandboxSnapshotDeleteResult(SandboxBaseModel):
|
|
351
|
+
deleted: bool
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
class SandboxImageDeleteResult(SandboxBaseModel):
|
|
355
|
+
deleted: bool
|
|
356
|
+
id: Optional[str] = None
|
|
357
|
+
image_name: Optional[str] = Field(default=None, alias="imageName")
|
|
358
|
+
uploaded: Optional[bool] = None
|
|
359
|
+
|
|
360
|
+
|
|
337
361
|
class SandboxMemorySnapshotParams(SandboxBaseModel):
|
|
338
362
|
snapshot_name: Optional[str] = Field(
|
|
339
363
|
default=None, serialization_alias="snapshotName"
|
|
@@ -354,12 +378,12 @@ class CreateSandboxImageBuildParams(SandboxBaseModel):
|
|
|
354
378
|
image_name: str = Field(serialization_alias="imageName")
|
|
355
379
|
input_sha256: str = Field(serialization_alias="inputSha256")
|
|
356
380
|
input_size_bytes: int = Field(serialization_alias="inputSizeBytes")
|
|
357
|
-
input_format: SandboxImageBuildInputFormat = Field(
|
|
358
|
-
default=
|
|
381
|
+
input_format: Optional[SandboxImageBuildInputFormat] = Field(
|
|
382
|
+
default=None,
|
|
359
383
|
serialization_alias="inputFormat",
|
|
360
384
|
)
|
|
361
|
-
source_platform:
|
|
362
|
-
default=
|
|
385
|
+
source_platform: Optional[SandboxImageBuildSourcePlatform] = Field(
|
|
386
|
+
default=None,
|
|
363
387
|
serialization_alias="sourcePlatform",
|
|
364
388
|
)
|
|
365
389
|
image_config_user: Optional[str] = Field(
|
|
@@ -375,8 +399,8 @@ class CreateSandboxImageBuildParams(SandboxBaseModel):
|
|
|
375
399
|
class CompleteSandboxImageBuildParams(SandboxBaseModel):
|
|
376
400
|
input_sha256: str = Field(serialization_alias="inputSha256")
|
|
377
401
|
input_size_bytes: int = Field(serialization_alias="inputSizeBytes")
|
|
378
|
-
input_format: SandboxImageBuildInputFormat = Field(
|
|
379
|
-
default=
|
|
402
|
+
input_format: Optional[SandboxImageBuildInputFormat] = Field(
|
|
403
|
+
default=None,
|
|
380
404
|
serialization_alias="inputFormat",
|
|
381
405
|
)
|
|
382
406
|
|
|
@@ -423,6 +447,15 @@ class SandboxImageBuildCreateResult(SandboxBaseModel):
|
|
|
423
447
|
upload: SandboxImageBuildUpload
|
|
424
448
|
|
|
425
449
|
|
|
450
|
+
class SandboxImageBuildListParams(SandboxBaseModel):
|
|
451
|
+
status: Optional[SandboxImageBuildStatus] = None
|
|
452
|
+
limit: Optional[int] = None
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
class SandboxImageBuildListResponse(SandboxBaseModel):
|
|
456
|
+
builds: List[SandboxImageBuild]
|
|
457
|
+
|
|
458
|
+
|
|
426
459
|
class SandboxExecParams(SandboxBaseModel):
|
|
427
460
|
command: str
|
|
428
461
|
args: Optional[List[str]] = None
|
|
@@ -15,7 +15,7 @@ from hyperbrowser.models.consts import (
|
|
|
15
15
|
SessionEventLogType,
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
SessionStatus = Literal["active", "closed", "error"]
|
|
18
|
+
SessionStatus = Literal["active", "closed", "error", "close-error"]
|
|
19
19
|
BrowserMemorySize = Literal["small", "medium", "large"]
|
|
20
20
|
CaptchaSolverType = Literal["visual"]
|
|
21
21
|
CaptchaEvaluationType = Literal[
|
|
@@ -13,6 +13,12 @@ class CreateVolumeParams(VolumeBaseModel):
|
|
|
13
13
|
name: str
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
class VolumeListParams(VolumeBaseModel):
|
|
17
|
+
page: Optional[int] = None
|
|
18
|
+
limit: Optional[int] = None
|
|
19
|
+
search: Optional[str] = None
|
|
20
|
+
|
|
21
|
+
|
|
16
22
|
class Volume(VolumeBaseModel):
|
|
17
23
|
id: str
|
|
18
24
|
name: str
|
|
@@ -27,3 +33,6 @@ class Volume(VolumeBaseModel):
|
|
|
27
33
|
|
|
28
34
|
class VolumeListResponse(VolumeBaseModel):
|
|
29
35
|
volumes: List[Volume]
|
|
36
|
+
total_count: Optional[int] = Field(default=None, alias="totalCount")
|
|
37
|
+
page: Optional[int] = None
|
|
38
|
+
per_page: Optional[int] = Field(default=None, alias="perPage")
|
|
@@ -81,6 +81,9 @@ from .sandbox import (
|
|
|
81
81
|
SandboxFileWriteEntry,
|
|
82
82
|
SandboxFileWriteTextParams,
|
|
83
83
|
SandboxImageBuildInputFormat,
|
|
84
|
+
SandboxImageBuildListParams,
|
|
85
|
+
SandboxImageBuildSourcePlatform,
|
|
86
|
+
SandboxImageBuildStatus,
|
|
84
87
|
SandboxImageInit,
|
|
85
88
|
SandboxImageListParams,
|
|
86
89
|
SandboxListParams,
|
|
@@ -132,7 +135,7 @@ from .session import (
|
|
|
132
135
|
UpdateSessionScreenParams,
|
|
133
136
|
UpdateSessionSolveCaptchasParams,
|
|
134
137
|
)
|
|
135
|
-
from .volume import CreateVolumeParams
|
|
138
|
+
from .volume import CreateVolumeParams, VolumeListParams
|
|
136
139
|
from .web import (
|
|
137
140
|
FetchBrowserLocationOptions,
|
|
138
141
|
FetchBrowserOptions,
|
|
@@ -235,6 +238,9 @@ __all__ = [
|
|
|
235
238
|
"SandboxFileWriteEntry",
|
|
236
239
|
"SandboxFileWriteTextParams",
|
|
237
240
|
"SandboxImageBuildInputFormat",
|
|
241
|
+
"SandboxImageBuildListParams",
|
|
242
|
+
"SandboxImageBuildSourcePlatform",
|
|
243
|
+
"SandboxImageBuildStatus",
|
|
238
244
|
"SandboxImageInit",
|
|
239
245
|
"SandboxImageListParams",
|
|
240
246
|
"SandboxListParams",
|
|
@@ -282,6 +288,7 @@ __all__ = [
|
|
|
282
288
|
"UpdateSessionScreenParams",
|
|
283
289
|
"UpdateSessionSolveCaptchasParams",
|
|
284
290
|
"CreateVolumeParams",
|
|
291
|
+
"VolumeListParams",
|
|
285
292
|
"FetchBrowserLocationOptions",
|
|
286
293
|
"FetchBrowserOptions",
|
|
287
294
|
"FetchCacheOptions",
|
|
@@ -3,7 +3,7 @@ from typing import Dict, List, Literal, Optional, Union
|
|
|
3
3
|
from typing_extensions import Required, TypeAlias, TypedDict
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
SandboxStatus: TypeAlias = Literal["active", "closed", "error"]
|
|
6
|
+
SandboxStatus: TypeAlias = Literal["active", "closed", "error", "close-error"]
|
|
7
7
|
SandboxRegion: TypeAlias = Literal[
|
|
8
8
|
"us-central",
|
|
9
9
|
"asia-south",
|
|
@@ -27,6 +27,17 @@ SandboxFileReadFormat: TypeAlias = Literal["text", "bytes", "blob", "stream"]
|
|
|
27
27
|
SandboxFileWatchRoute: TypeAlias = Literal["ws", "stream"]
|
|
28
28
|
SandboxVolumeMountType: TypeAlias = Literal["rw", "ro"]
|
|
29
29
|
SandboxImageBuildInputFormat: TypeAlias = Literal["rootfs_export_tar_gz"]
|
|
30
|
+
SandboxImageBuildSourcePlatform: TypeAlias = Literal["linux/amd64"]
|
|
31
|
+
SandboxImageBuildStatus: TypeAlias = Literal[
|
|
32
|
+
"awaiting_upload",
|
|
33
|
+
"upload_verified",
|
|
34
|
+
"dispatching",
|
|
35
|
+
"building",
|
|
36
|
+
"verifying",
|
|
37
|
+
"completed",
|
|
38
|
+
"failed",
|
|
39
|
+
"canceled",
|
|
40
|
+
]
|
|
30
41
|
SandboxFileWriteData: TypeAlias = Union[str, bytes]
|
|
31
42
|
|
|
32
43
|
|
|
@@ -128,6 +139,13 @@ class SandboxSnapshotListParams(TypedDict, total=False):
|
|
|
128
139
|
page: Optional[int]
|
|
129
140
|
|
|
130
141
|
|
|
142
|
+
class SandboxImageBuildListParams(TypedDict, total=False):
|
|
143
|
+
"""Filters for listing sandbox image builds."""
|
|
144
|
+
|
|
145
|
+
status: Optional[SandboxImageBuildStatus]
|
|
146
|
+
limit: Optional[int]
|
|
147
|
+
|
|
148
|
+
|
|
131
149
|
class SandboxMemorySnapshotParams(TypedDict, total=False):
|
|
132
150
|
"""Parameters for creating a sandbox memory snapshot."""
|
|
133
151
|
|
|
@@ -141,7 +159,7 @@ class CreateSandboxImageBuildParams(TypedDict, total=False):
|
|
|
141
159
|
input_sha256: Required[str]
|
|
142
160
|
input_size_bytes: Required[int]
|
|
143
161
|
input_format: SandboxImageBuildInputFormat
|
|
144
|
-
source_platform:
|
|
162
|
+
source_platform: SandboxImageBuildSourcePlatform
|
|
145
163
|
image_config_user: Optional[str]
|
|
146
164
|
image_init: Optional[SandboxImageInit]
|
|
147
165
|
|
|
@@ -415,6 +433,9 @@ __all__ = [
|
|
|
415
433
|
"SandboxFileWriteEntry",
|
|
416
434
|
"SandboxFileWriteTextParams",
|
|
417
435
|
"SandboxImageBuildInputFormat",
|
|
436
|
+
"SandboxImageBuildListParams",
|
|
437
|
+
"SandboxImageBuildSourcePlatform",
|
|
438
|
+
"SandboxImageBuildStatus",
|
|
418
439
|
"SandboxImageInit",
|
|
419
440
|
"SandboxImageListParams",
|
|
420
441
|
"SandboxListParams",
|
|
@@ -13,7 +13,7 @@ from hyperbrowser.models.consts import (
|
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
SessionStatus = Literal["active", "closed", "error"]
|
|
16
|
+
SessionStatus = Literal["active", "closed", "error", "close-error"]
|
|
17
17
|
BrowserMemorySize = Literal["small", "medium", "large"]
|
|
18
18
|
CaptchaSolverType = Literal["visual"]
|
|
19
19
|
CaptchaEvaluationType = Literal[
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from typing_extensions import TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class CreateVolumeParams(TypedDict):
|
|
7
|
+
"""Parameters for creating a persistent sandbox volume."""
|
|
8
|
+
|
|
9
|
+
name: str
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class VolumeListParams(TypedDict, total=False):
|
|
13
|
+
"""Filters and pagination for listing sandbox volumes."""
|
|
14
|
+
|
|
15
|
+
page: Optional[int]
|
|
16
|
+
limit: Optional[int]
|
|
17
|
+
search: Optional[str]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
__all__ = ["CreateVolumeParams", "VolumeListParams"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/agents/cua.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/crawl.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/extension.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/extract.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/profile.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/scrape.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/session.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/team.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/web/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/async_manager/web/crawl.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sandboxes/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/agents/cua.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/crawl.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/extension.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/extract.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/profile.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/scrape.py
RENAMED
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/session.py
RENAMED
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/web/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{hyperbrowser-1.1.0 → hyperbrowser-1.2.1}/hyperbrowser/client/managers/sync_manager/web/crawl.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|