Skip to content

Commit 2ba9e57

Browse files
feat: [wip] Browser pools polish pass
1 parent 57af2e1 commit 2ba9e57

11 files changed

+43
-43
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 74
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-cbef7e4fef29ad40af5c767aceb762ee68811c2287f255c05d2ee44a9a9247a2.yml
3-
openapi_spec_hash: 467e61e072773ec9f2d49c7dd3de8c2f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-3a68acd8c46e121c66be5b4c30bb4e962967840ca0f31070905baa39635fbc2d.yml
3+
openapi_spec_hash: 9453963fbb01de3e0afb462b16cdf115
44
config_hash: 6dbe88d2ba9df1ec46cedbfdb7d00000

src/kernel/resources/browser_pools.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ def create(
106106
are destroyed. Defaults to 600 seconds if not specified
107107
108108
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
109-
image defaults apply (commonly 1024x768@60). Only specific viewport
110-
configurations are supported. The server will reject unsupported combinations.
111-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
112-
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
113-
be automatically determined from the width and height if they match a supported
109+
image defaults apply (1920x1080@25). Only specific viewport configurations are
110+
supported. The server will reject unsupported combinations. Supported
111+
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
112+
1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
113+
automatically determined from the width and height if they match a supported
114114
configuration exactly. Note: Higher resolutions may affect the responsiveness of
115115
live view browser
116116
@@ -209,7 +209,7 @@ def update(
209209
size: Number of browsers to create in the pool
210210
211211
discard_all_idle: Whether to discard all idle browsers and rebuild the pool immediately. Defaults
212-
to true.
212+
to false.
213213
214214
extensions: List of browser extensions to load into the session. Provide each by id or name.
215215
@@ -236,11 +236,11 @@ def update(
236236
are destroyed. Defaults to 600 seconds if not specified
237237
238238
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
239-
image defaults apply (commonly 1024x768@60). Only specific viewport
240-
configurations are supported. The server will reject unsupported combinations.
241-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
242-
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
243-
be automatically determined from the width and height if they match a supported
239+
image defaults apply (1920x1080@25). Only specific viewport configurations are
240+
supported. The server will reject unsupported combinations. Supported
241+
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
242+
1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
243+
automatically determined from the width and height if they match a supported
244244
configuration exactly. Note: Higher resolutions may affect the responsiveness of
245245
live view browser
246246
@@ -540,11 +540,11 @@ async def create(
540540
are destroyed. Defaults to 600 seconds if not specified
541541
542542
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
543-
image defaults apply (commonly 1024x768@60). Only specific viewport
544-
configurations are supported. The server will reject unsupported combinations.
545-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
546-
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
547-
be automatically determined from the width and height if they match a supported
543+
image defaults apply (1920x1080@25). Only specific viewport configurations are
544+
supported. The server will reject unsupported combinations. Supported
545+
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
546+
1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
547+
automatically determined from the width and height if they match a supported
548548
configuration exactly. Note: Higher resolutions may affect the responsiveness of
549549
live view browser
550550
@@ -643,7 +643,7 @@ async def update(
643643
size: Number of browsers to create in the pool
644644
645645
discard_all_idle: Whether to discard all idle browsers and rebuild the pool immediately. Defaults
646-
to true.
646+
to false.
647647
648648
extensions: List of browser extensions to load into the session. Provide each by id or name.
649649
@@ -670,11 +670,11 @@ async def update(
670670
are destroyed. Defaults to 600 seconds if not specified
671671
672672
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
673-
image defaults apply (commonly 1024x768@60). Only specific viewport
674-
configurations are supported. The server will reject unsupported combinations.
675-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
676-
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
677-
be automatically determined from the width and height if they match a supported
673+
image defaults apply (1920x1080@25). Only specific viewport configurations are
674+
supported. The server will reject unsupported combinations. Supported
675+
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
676+
1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
677+
automatically determined from the width and height if they match a supported
678678
configuration exactly. Note: Higher resolutions may affect the responsiveness of
679679
live view browser
680680

src/kernel/resources/browsers/browsers.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,11 @@ def create(
181181
see is +/- 5 seconds around the specified value.
182182
183183
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
184-
image defaults apply (commonly 1024x768@60). Only specific viewport
185-
configurations are supported. The server will reject unsupported combinations.
186-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
187-
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
188-
be automatically determined from the width and height if they match a supported
184+
image defaults apply (1920x1080@25). Only specific viewport configurations are
185+
supported. The server will reject unsupported combinations. Supported
186+
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
187+
1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
188+
automatically determined from the width and height if they match a supported
189189
configuration exactly. Note: Higher resolutions may affect the responsiveness of
190190
live view browser
191191
@@ -526,11 +526,11 @@ async def create(
526526
see is +/- 5 seconds around the specified value.
527527
528528
viewport: Initial browser window size in pixels with optional refresh rate. If omitted,
529-
image defaults apply (commonly 1024x768@60). Only specific viewport
530-
configurations are supported. The server will reject unsupported combinations.
531-
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
532-
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will
533-
be automatically determined from the width and height if they match a supported
529+
image defaults apply (1920x1080@25). Only specific viewport configurations are
530+
supported. The server will reject unsupported combinations. Supported
531+
resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25,
532+
1024x768@60, 1200x800@60 If refresh_rate is not provided, it will be
533+
automatically determined from the width and height if they match a supported
534534
configuration exactly. Note: Higher resolutions may affect the responsiveness of
535535
live view browser
536536

src/kernel/types/browser_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class BrowserCreateParams(TypedDict, total=False):
6969
viewport: BrowserViewport
7070
"""Initial browser window size in pixels with optional refresh rate.
7171
72-
If omitted, image defaults apply (commonly 1024x768@60). Only specific viewport
72+
If omitted, image defaults apply (1920x1080@25). Only specific viewport
7373
configurations are supported. The server will reject unsupported combinations.
7474
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
7575
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will

src/kernel/types/browser_create_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class BrowserCreateResponse(BaseModel):
5454
viewport: Optional[BrowserViewport] = None
5555
"""Initial browser window size in pixels with optional refresh rate.
5656
57-
If omitted, image defaults apply (commonly 1024x768@60). Only specific viewport
57+
If omitted, image defaults apply (1920x1080@25). Only specific viewport
5858
configurations are supported. The server will reject unsupported combinations.
5959
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
6060
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will

src/kernel/types/browser_list_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class BrowserListResponse(BaseModel):
5454
viewport: Optional[BrowserViewport] = None
5555
"""Initial browser window size in pixels with optional refresh rate.
5656
57-
If omitted, image defaults apply (commonly 1024x768@60). Only specific viewport
57+
If omitted, image defaults apply (1920x1080@25). Only specific viewport
5858
configurations are supported. The server will reject unsupported combinations.
5959
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
6060
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will

src/kernel/types/browser_pool_acquire_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class BrowserPoolAcquireResponse(BaseModel):
5454
viewport: Optional[BrowserViewport] = None
5555
"""Initial browser window size in pixels with optional refresh rate.
5656
57-
If omitted, image defaults apply (commonly 1024x768@60). Only specific viewport
57+
If omitted, image defaults apply (1920x1080@25). Only specific viewport
5858
configurations are supported. The server will reject unsupported combinations.
5959
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
6060
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will

src/kernel/types/browser_pool_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class BrowserPoolCreateParams(TypedDict, total=False):
6565
viewport: BrowserViewport
6666
"""Initial browser window size in pixels with optional refresh rate.
6767
68-
If omitted, image defaults apply (commonly 1024x768@60). Only specific viewport
68+
If omitted, image defaults apply (1920x1080@25). Only specific viewport
6969
configurations are supported. The server will reject unsupported combinations.
7070
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
7171
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will

src/kernel/types/browser_pool_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class BrowserPoolRequest(BaseModel):
6363
viewport: Optional[BrowserViewport] = None
6464
"""Initial browser window size in pixels with optional refresh rate.
6565
66-
If omitted, image defaults apply (commonly 1024x768@60). Only specific viewport
66+
If omitted, image defaults apply (1920x1080@25). Only specific viewport
6767
configurations are supported. The server will reject unsupported combinations.
6868
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
6969
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will

src/kernel/types/browser_pool_update_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class BrowserPoolUpdateParams(TypedDict, total=False):
1919
discard_all_idle: bool
2020
"""Whether to discard all idle browsers and rebuild the pool immediately.
2121
22-
Defaults to true.
22+
Defaults to false.
2323
"""
2424

2525
extensions: Iterable[BrowserExtension]
@@ -71,7 +71,7 @@ class BrowserPoolUpdateParams(TypedDict, total=False):
7171
viewport: BrowserViewport
7272
"""Initial browser window size in pixels with optional refresh rate.
7373
74-
If omitted, image defaults apply (commonly 1024x768@60). Only specific viewport
74+
If omitted, image defaults apply (1920x1080@25). Only specific viewport
7575
configurations are supported. The server will reject unsupported combinations.
7676
Supported resolutions are: 2560x1440@10, 1920x1080@25, 1920x1200@25,
7777
1440x900@25, 1024x768@60, 1200x800@60 If refresh_rate is not provided, it will

0 commit comments

Comments
 (0)