hyperbrowser 1.0.0__tar.gz → 1.2.0__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.
Files changed (112) hide show
  1. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/PKG-INFO +18 -1
  2. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/README.md +17 -0
  3. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/sandbox.py +35 -2
  4. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/volume.py +19 -4
  5. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sandboxes/image_build.py +1 -1
  6. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/sandbox.py +35 -2
  7. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/volume.py +19 -4
  8. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/__init__.py +10 -1
  9. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/consts.py +1 -0
  10. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/sandbox.py +47 -21
  11. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/session.py +11 -1
  12. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/volume.py +9 -0
  13. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/__init__.py +8 -1
  14. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/sandbox.py +23 -2
  15. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/session.py +4 -1
  16. hyperbrowser-1.2.0/hyperbrowser/types/volume.py +20 -0
  17. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/pyproject.toml +1 -1
  18. hyperbrowser-1.0.0/hyperbrowser/types/volume.py +0 -10
  19. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/LICENSE +0 -0
  20. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/__init__.py +0 -0
  21. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/_request.py +0 -0
  22. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/async_client.py +0 -0
  23. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/base.py +0 -0
  24. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/agents/__init__.py +0 -0
  25. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/agents/browser_use.py +0 -0
  26. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/agents/claude_computer_use.py +0 -0
  27. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/agents/cua.py +0 -0
  28. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/agents/gemini_computer_use.py +0 -0
  29. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/agents/grok_computer_use.py +0 -0
  30. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/agents/hyper_agent.py +0 -0
  31. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/computer_action.py +0 -0
  32. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/crawl.py +0 -0
  33. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/extension.py +0 -0
  34. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/extract.py +0 -0
  35. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/profile.py +0 -0
  36. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/sandboxes/__init__.py +0 -0
  37. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_files.py +0 -0
  38. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_processes.py +0 -0
  39. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_terminal.py +0 -0
  40. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/sandboxes/sandbox_transport.py +0 -0
  41. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/scrape.py +0 -0
  42. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/session.py +0 -0
  43. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/team.py +0 -0
  44. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/web/__init__.py +0 -0
  45. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/web/batch_fetch.py +0 -0
  46. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/async_manager/web/crawl.py +0 -0
  47. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sandboxes/__init__.py +0 -0
  48. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sandboxes/shared.py +0 -0
  49. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/agents/__init__.py +0 -0
  50. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/agents/browser_use.py +0 -0
  51. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/agents/claude_computer_use.py +0 -0
  52. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/agents/cua.py +0 -0
  53. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/agents/gemini_computer_use.py +0 -0
  54. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/agents/grok_computer_use.py +0 -0
  55. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/agents/hyper_agent.py +0 -0
  56. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/computer_action.py +0 -0
  57. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/crawl.py +0 -0
  58. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/extension.py +0 -0
  59. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/extract.py +0 -0
  60. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/profile.py +0 -0
  61. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/sandboxes/__init__.py +0 -0
  62. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_files.py +0 -0
  63. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_processes.py +0 -0
  64. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_terminal.py +0 -0
  65. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/sandboxes/sandbox_transport.py +0 -0
  66. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/scrape.py +0 -0
  67. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/session.py +0 -0
  68. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/team.py +0 -0
  69. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/web/__init__.py +0 -0
  70. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/web/batch_fetch.py +0 -0
  71. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/managers/sync_manager/web/crawl.py +0 -0
  72. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/client/sync.py +0 -0
  73. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/config.py +0 -0
  74. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/exceptions.py +0 -0
  75. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/_parsers.py +0 -0
  76. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/agents/browser_use.py +0 -0
  77. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/agents/claude_computer_use.py +0 -0
  78. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/agents/cua.py +0 -0
  79. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/agents/gemini_computer_use.py +0 -0
  80. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/agents/grok_computer_use.py +0 -0
  81. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/agents/hyper_agent.py +0 -0
  82. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/computer_action.py +0 -0
  83. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/crawl.py +0 -0
  84. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/extension.py +0 -0
  85. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/extract.py +0 -0
  86. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/profile.py +0 -0
  87. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/scrape.py +0 -0
  88. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/team.py +0 -0
  89. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/web/batch_fetch.py +0 -0
  90. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/web/branding.py +0 -0
  91. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/web/common.py +0 -0
  92. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/web/crawl.py +0 -0
  93. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/web/fetch.py +0 -0
  94. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/models/web/search.py +0 -0
  95. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/py.typed +0 -0
  96. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/sandbox_common.py +0 -0
  97. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/tools/__init__.py +0 -0
  98. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/tools/anthropic.py +0 -0
  99. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/tools/openai.py +0 -0
  100. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/tools/schema.py +0 -0
  101. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/transport/async_transport.py +0 -0
  102. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/transport/base.py +0 -0
  103. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/transport/sync.py +0 -0
  104. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/_json.py +0 -0
  105. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/agents.py +0 -0
  106. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/computer_action.py +0 -0
  107. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/crawl.py +0 -0
  108. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/extension.py +0 -0
  109. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/extract.py +0 -0
  110. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/profile.py +0 -0
  111. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/scrape.py +0 -0
  112. {hyperbrowser-1.0.0 → hyperbrowser-1.2.0}/hyperbrowser/types/web.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hyperbrowser
3
- Version: 1.0.0
3
+ Version: 1.2.0
4
4
  Summary: Python SDK for hyperbrowser
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -81,6 +81,23 @@ session = client.sessions.create(
81
81
  )
82
82
  ```
83
83
 
84
+ Browser sessions can also use an outbound network policy. Omitting these fields
85
+ keeps the default unrestricted behavior:
86
+
87
+ ```python
88
+ session = client.sessions.create(
89
+ {
90
+ "allow_internet_access": False,
91
+ "allow_out": ["example.com"],
92
+ "deny_out": ["0.0.0.0/0"],
93
+ }
94
+ )
95
+ ```
96
+
97
+ Direct browser policies accept domains, IPv4 addresses, and CIDR ranges in
98
+ `allow_out`; `deny_out` accepts IPv4 addresses and CIDR ranges. With a proxy,
99
+ allow rules must be domains and the only supported deny rule is `0.0.0.0/0`.
100
+
84
101
  Existing Pydantic request classes remain accepted, so upgrading does not require
85
102
  an immediate rewrite:
86
103
 
@@ -54,6 +54,23 @@ session = client.sessions.create(
54
54
  )
55
55
  ```
56
56
 
57
+ Browser sessions can also use an outbound network policy. Omitting these fields
58
+ keeps the default unrestricted behavior:
59
+
60
+ ```python
61
+ session = client.sessions.create(
62
+ {
63
+ "allow_internet_access": False,
64
+ "allow_out": ["example.com"],
65
+ "deny_out": ["0.0.0.0/0"],
66
+ }
67
+ )
68
+ ```
69
+
70
+ Direct browser policies accept domains, IPv4 addresses, and CIDR ranges in
71
+ `allow_out`; `deny_out` accepts IPv4 addresses and CIDR ranges. With a proxy,
72
+ allow rules must be domains and the only supported deny rule is `0.0.0.0/0`.
73
+
57
74
  Existing Pydantic request classes remain accepted, so upgrading does not require
58
75
  an immediate rewrite:
59
76
 
@@ -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,10 @@ from ....models.sandbox import (
25
27
  SandboxNetworkPolicy,
26
28
  SandboxNetworkUpdateResult,
27
29
  SandboxRuntimeSession,
30
+ SandboxSnapshotDeleteResult,
28
31
  SandboxSnapshotListParams,
29
32
  SandboxSnapshotListResponse,
33
+ SandboxSnapshotSummary,
30
34
  SandboxUnexposeResult,
31
35
  StartSandboxFromSnapshotParams,
32
36
  )
@@ -37,6 +41,7 @@ from ....types import (
37
41
  CreateSandboxParams as CreateSandboxParamsDict,
38
42
  SandboxExecParams as SandboxExecParamsDict,
39
43
  SandboxExposeParams as SandboxExposeParamsDict,
44
+ SandboxImageBuildListParams as SandboxImageBuildListParamsDict,
40
45
  SandboxImageInit as SandboxImageInitDict,
41
46
  SandboxImageListParams as SandboxImageListParamsDict,
42
47
  SandboxListParams as SandboxListParamsDict,
@@ -167,6 +172,10 @@ class SandboxHandle:
167
172
  def disk_mib(self):
168
173
  return self._detail.disk_mib
169
174
 
175
+ @property
176
+ def timeout_minutes(self):
177
+ return self._detail.timeout_minutes
178
+
170
179
  @property
171
180
  def exposed_ports(self):
172
181
  return self._detail.exposed_ports
@@ -346,7 +355,7 @@ class SandboxHandle:
346
355
  )
347
356
 
348
357
  def _assert_runtime_available(self) -> None:
349
- if self._detail.status in {"closed", "error"}:
358
+ if self._detail.status in {"closed", "error", "close-error"}:
350
359
  raise HyperbrowserError(
351
360
  f"Sandbox {self.id} is not running",
352
361
  status_code=409,
@@ -394,7 +403,7 @@ class SandboxManager:
394
403
  ],
395
404
  ) -> SandboxHandle:
396
405
  normalized = coerce_request(params, StartSandboxFromSnapshotParams)
397
- return await self.create(normalized)
406
+ return await self.create(normalized.model_dump(exclude_none=True))
398
407
 
399
408
  async def get(self, sandbox_id: str) -> SandboxHandle:
400
409
  return self.attach(await self.get_detail(sandbox_id))
@@ -450,6 +459,14 @@ class SandboxManager:
450
459
  )
451
460
  return SandboxSnapshotListResponse(**payload)
452
461
 
462
+ async def get_snapshot(self, snapshot: str) -> SandboxSnapshotSummary:
463
+ payload = await self._request("GET", f"/snapshots/{snapshot}")
464
+ return SandboxSnapshotSummary(**payload["snapshot"])
465
+
466
+ async def delete_snapshot(self, snapshot: str) -> SandboxSnapshotDeleteResult:
467
+ payload = await self._request("DELETE", f"/snapshots/{snapshot}")
468
+ return SandboxSnapshotDeleteResult(**payload)
469
+
453
470
  async def stop(self, sandbox_id: str) -> BasicResponse:
454
471
  payload = await self._request("PUT", f"/sandbox/{sandbox_id}/stop")
455
472
  return BasicResponse(**payload)
@@ -491,6 +508,22 @@ class SandboxManager:
491
508
  payload = await self._request("POST", f"/images/builds/{build_id}/cancel")
492
509
  return SandboxImageBuild(**payload["build"])
493
510
 
511
+ async def list_image_builds(
512
+ self,
513
+ params: Optional[
514
+ Union[SandboxImageBuildListParamsDict, SandboxImageBuildListParams]
515
+ ] = None,
516
+ ) -> SandboxImageBuildListResponse:
517
+ payload = await self._request(
518
+ "GET",
519
+ "/images/builds",
520
+ params=dump_request(
521
+ params if params is not None else {},
522
+ SandboxImageBuildListParams,
523
+ ),
524
+ )
525
+ return SandboxImageBuildListResponse(**payload)
526
+
494
527
  async def wait_for_image_build(
495
528
  self,
496
529
  build_id: str,
@@ -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 CreateVolumeParams, Volume, VolumeListResponse
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(self) -> VolumeListResponse:
23
- response = await self._client.transport.get(self._client._build_url("/volume"))
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:
@@ -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", "cancelled"}
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 = {
@@ -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,10 @@ from ....models.sandbox import (
23
25
  SandboxNetworkPolicy,
24
26
  SandboxNetworkUpdateResult,
25
27
  SandboxRuntimeSession,
28
+ SandboxSnapshotDeleteResult,
26
29
  SandboxSnapshotListParams,
27
30
  SandboxSnapshotListResponse,
31
+ SandboxSnapshotSummary,
28
32
  SandboxUnexposeResult,
29
33
  StartSandboxFromSnapshotParams,
30
34
  )
@@ -35,6 +39,7 @@ from ....types import (
35
39
  CreateSandboxParams as CreateSandboxParamsDict,
36
40
  SandboxExecParams as SandboxExecParamsDict,
37
41
  SandboxExposeParams as SandboxExposeParamsDict,
42
+ SandboxImageBuildListParams as SandboxImageBuildListParamsDict,
38
43
  SandboxImageInit as SandboxImageInitDict,
39
44
  SandboxImageListParams as SandboxImageListParamsDict,
40
45
  SandboxListParams as SandboxListParamsDict,
@@ -159,6 +164,10 @@ class SandboxHandle:
159
164
  def disk_mib(self):
160
165
  return self._detail.disk_mib
161
166
 
167
+ @property
168
+ def timeout_minutes(self):
169
+ return self._detail.timeout_minutes
170
+
162
171
  @property
163
172
  def exposed_ports(self):
164
173
  return self._detail.exposed_ports
@@ -338,7 +347,7 @@ class SandboxHandle:
338
347
  )
339
348
 
340
349
  def _assert_runtime_available(self) -> None:
341
- if self._detail.status in {"closed", "error"}:
350
+ if self._detail.status in {"closed", "error", "close-error"}:
342
351
  raise HyperbrowserError(
343
352
  f"Sandbox {self.id} is not running",
344
353
  status_code=409,
@@ -386,7 +395,7 @@ class SandboxManager:
386
395
  ],
387
396
  ) -> SandboxHandle:
388
397
  normalized = coerce_request(params, StartSandboxFromSnapshotParams)
389
- return self.create(normalized)
398
+ return self.create(normalized.model_dump(exclude_none=True))
390
399
 
391
400
  def get(self, sandbox_id: str) -> SandboxHandle:
392
401
  return self.attach(self.get_detail(sandbox_id))
@@ -442,6 +451,14 @@ class SandboxManager:
442
451
  )
443
452
  return SandboxSnapshotListResponse(**payload)
444
453
 
454
+ def get_snapshot(self, snapshot: str) -> SandboxSnapshotSummary:
455
+ payload = self._request("GET", f"/snapshots/{snapshot}")
456
+ return SandboxSnapshotSummary(**payload["snapshot"])
457
+
458
+ def delete_snapshot(self, snapshot: str) -> SandboxSnapshotDeleteResult:
459
+ payload = self._request("DELETE", f"/snapshots/{snapshot}")
460
+ return SandboxSnapshotDeleteResult(**payload)
461
+
445
462
  def stop(self, sandbox_id: str) -> BasicResponse:
446
463
  payload = self._request("PUT", f"/sandbox/{sandbox_id}/stop")
447
464
  return BasicResponse(**payload)
@@ -483,6 +500,22 @@ class SandboxManager:
483
500
  payload = self._request("POST", f"/images/builds/{build_id}/cancel")
484
501
  return SandboxImageBuild(**payload["build"])
485
502
 
503
+ def list_image_builds(
504
+ self,
505
+ params: Optional[
506
+ Union[SandboxImageBuildListParamsDict, SandboxImageBuildListParams]
507
+ ] = None,
508
+ ) -> SandboxImageBuildListResponse:
509
+ payload = self._request(
510
+ "GET",
511
+ "/images/builds",
512
+ params=dump_request(
513
+ params if params is not None else {},
514
+ SandboxImageBuildListParams,
515
+ ),
516
+ )
517
+ return SandboxImageBuildListResponse(**payload)
518
+
486
519
  def wait_for_image_build(
487
520
  self,
488
521
  build_id: str,
@@ -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 CreateVolumeParams, Volume, VolumeListResponse
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(self) -> VolumeListResponse:
23
- response = self._client.transport.get(self._client._build_url("/volume"))
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,14 @@ from .sandbox import (
310
310
  SandboxImageListResponse,
311
311
  SandboxImageSummary,
312
312
  SandboxSnapshotStatus,
313
+ SandboxSnapshotDeleteResult,
313
314
  SandboxSnapshotListResponse,
314
315
  SandboxSnapshotSummary,
315
316
  SandboxSnapshotListParams,
316
317
  SandboxMemorySnapshotParams,
317
318
  SandboxMemorySnapshotResult,
318
319
  SandboxImageBuildInputFormat,
320
+ SandboxImageBuildSourcePlatform,
319
321
  SandboxImageBuildStatus,
320
322
  SandboxImageInit,
321
323
  CreateSandboxImageBuildParams,
@@ -323,6 +325,8 @@ from .sandbox import (
323
325
  SandboxImageBuildUpload,
324
326
  SandboxImageBuild,
325
327
  SandboxImageBuildCreateResult,
328
+ SandboxImageBuildListParams,
329
+ SandboxImageBuildListResponse,
326
330
  SandboxExposeParams,
327
331
  SandboxExposeResult,
328
332
  SandboxUnexposeResult,
@@ -530,6 +534,7 @@ __all__ = [
530
534
  # volume
531
535
  "CreateVolumeParams",
532
536
  "Volume",
537
+ "VolumeListParams",
533
538
  "VolumeListResponse",
534
539
  # scrape
535
540
  "BatchScrapeJobResponse",
@@ -604,12 +609,14 @@ __all__ = [
604
609
  "SandboxImageListResponse",
605
610
  "SandboxImageSummary",
606
611
  "SandboxSnapshotStatus",
612
+ "SandboxSnapshotDeleteResult",
607
613
  "SandboxSnapshotListResponse",
608
614
  "SandboxSnapshotSummary",
609
615
  "SandboxSnapshotListParams",
610
616
  "SandboxMemorySnapshotParams",
611
617
  "SandboxMemorySnapshotResult",
612
618
  "SandboxImageBuildInputFormat",
619
+ "SandboxImageBuildSourcePlatform",
613
620
  "SandboxImageBuildStatus",
614
621
  "SandboxImageInit",
615
622
  "CreateSandboxImageBuildParams",
@@ -617,6 +624,8 @@ __all__ = [
617
624
  "SandboxImageBuildUpload",
618
625
  "SandboxImageBuild",
619
626
  "SandboxImageBuildCreateResult",
627
+ "SandboxImageBuildListParams",
628
+ "SandboxImageBuildListResponse",
620
629
  "SandboxExposeParams",
621
630
  "SandboxExposeResult",
622
631
  "SandboxUnexposeResult",
@@ -100,6 +100,7 @@ GrokReasoningEffort = Literal[
100
100
  "high",
101
101
  ]
102
102
  SessionRegion = Literal[
103
+ "us",
103
104
  "us-central",
104
105
  "asia-south",
105
106
  "us-dev",
@@ -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 CreateSandboxParams(SandboxBaseModel):
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(CreateSandboxParams):
254
- pass
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,10 @@ 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
+
337
354
  class SandboxMemorySnapshotParams(SandboxBaseModel):
338
355
  snapshot_name: Optional[str] = Field(
339
356
  default=None, serialization_alias="snapshotName"
@@ -354,12 +371,12 @@ class CreateSandboxImageBuildParams(SandboxBaseModel):
354
371
  image_name: str = Field(serialization_alias="imageName")
355
372
  input_sha256: str = Field(serialization_alias="inputSha256")
356
373
  input_size_bytes: int = Field(serialization_alias="inputSizeBytes")
357
- input_format: SandboxImageBuildInputFormat = Field(
358
- default="rootfs_export_tar_gz",
374
+ input_format: Optional[SandboxImageBuildInputFormat] = Field(
375
+ default=None,
359
376
  serialization_alias="inputFormat",
360
377
  )
361
- source_platform: str = Field(
362
- default="linux/amd64",
378
+ source_platform: Optional[SandboxImageBuildSourcePlatform] = Field(
379
+ default=None,
363
380
  serialization_alias="sourcePlatform",
364
381
  )
365
382
  image_config_user: Optional[str] = Field(
@@ -375,8 +392,8 @@ class CreateSandboxImageBuildParams(SandboxBaseModel):
375
392
  class CompleteSandboxImageBuildParams(SandboxBaseModel):
376
393
  input_sha256: str = Field(serialization_alias="inputSha256")
377
394
  input_size_bytes: int = Field(serialization_alias="inputSizeBytes")
378
- input_format: SandboxImageBuildInputFormat = Field(
379
- default="rootfs_export_tar_gz",
395
+ input_format: Optional[SandboxImageBuildInputFormat] = Field(
396
+ default=None,
380
397
  serialization_alias="inputFormat",
381
398
  )
382
399
 
@@ -423,6 +440,15 @@ class SandboxImageBuildCreateResult(SandboxBaseModel):
423
440
  upload: SandboxImageBuildUpload
424
441
 
425
442
 
443
+ class SandboxImageBuildListParams(SandboxBaseModel):
444
+ status: Optional[SandboxImageBuildStatus] = None
445
+ limit: Optional[int] = None
446
+
447
+
448
+ class SandboxImageBuildListResponse(SandboxBaseModel):
449
+ builds: List[SandboxImageBuild]
450
+
451
+
426
452
  class SandboxExecParams(SandboxBaseModel):
427
453
  command: str
428
454
  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[
@@ -144,6 +144,11 @@ class SessionLaunchState(BaseModel):
144
144
  default=None, alias="enableVideoWebRecording"
145
145
  )
146
146
  enable_log_capture: Optional[bool] = Field(default=None, alias="enableLogCapture")
147
+ allow_internet_access: Optional[bool] = Field(
148
+ default=None, alias="allowInternetAccess"
149
+ )
150
+ allow_out: Optional[List[str]] = Field(default=None, alias="allowOut")
151
+ deny_out: Optional[List[str]] = Field(default=None, alias="denyOut")
147
152
  accept_cookies: Optional[bool] = Field(default=None, alias="acceptCookies")
148
153
  solver_type: Optional[CaptchaSolverType] = Field(default=None, alias="solverType")
149
154
  profile: Optional[SessionProfile] = Field(default=None, alias="profile")
@@ -472,6 +477,11 @@ class CreateSessionParams(BaseModel):
472
477
  timeout_minutes: Optional[int] = Field(
473
478
  default=None, serialization_alias="timeoutMinutes"
474
479
  )
480
+ allow_internet_access: Optional[bool] = Field(
481
+ default=None, serialization_alias="allowInternetAccess"
482
+ )
483
+ allow_out: Optional[List[str]] = Field(default=None, serialization_alias="allowOut")
484
+ deny_out: Optional[List[str]] = Field(default=None, serialization_alias="denyOut")
475
485
  enable_window_manager: Optional[bool] = Field(
476
486
  default=None, serialization_alias="enableWindowManager"
477
487
  )
@@ -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: str
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[
@@ -149,6 +149,9 @@ class CreateSessionParams(TypedDict, total=False):
149
149
  save_downloads: Optional[bool]
150
150
  image_captcha_params: Optional[List[ImageCaptchaParam]]
151
151
  timeout_minutes: Optional[int]
152
+ allow_internet_access: Optional[bool]
153
+ allow_out: Optional[List[str]]
154
+ deny_out: Optional[List[str]]
152
155
  enable_window_manager: Optional[bool]
153
156
  enable_window_manager_taskbar: Optional[bool]
154
157
  region: Optional[SessionRegion]
@@ -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"]
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "hyperbrowser"
3
- version = "1.0.0"
3
+ version = "1.2.0"
4
4
  description = "Python SDK for hyperbrowser"
5
5
  authors = ["Nikhil Shahi <nshahi1998@gmail.com>"]
6
6
  license = "MIT"
@@ -1,10 +0,0 @@
1
- from typing_extensions import TypedDict
2
-
3
-
4
- class CreateVolumeParams(TypedDict):
5
- """Parameters for creating a persistent sandbox volume."""
6
-
7
- name: str
8
-
9
-
10
- __all__ = ["CreateVolumeParams"]
File without changes