Skip to content

Commit 28d8206

Browse files
feat: Kiosk mode
1 parent 32ca0a1 commit 28d8206

File tree

7 files changed

+29
-2
lines changed

7 files changed

+29
-2
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: 57
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-1cd328ccf61f0e888d6df27b091c30b38c392ab9ca8ce7fd0ead8f10aaf71ffa.yml
3-
openapi_spec_hash: af761c48d1955f11822f3b95f9c46750
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-6c765f1c4ce1c4dd4ceb371f56bf047aa79af36031ba43cbd68fa16a5fdb9bb3.yml
3+
openapi_spec_hash: e9086f69281360f4e0895c9274a59531
44
config_hash: deadfc4d2b0a947673bcf559b5db6e1b

src/kernel/resources/browsers/browsers.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def create(
100100
extensions: Iterable[browser_create_params.Extension] | Omit = omit,
101101
headless: bool | Omit = omit,
102102
invocation_id: str | Omit = omit,
103+
kiosk_mode: bool | Omit = omit,
103104
persistence: BrowserPersistenceParam | Omit = omit,
104105
profile: browser_create_params.Profile | Omit = omit,
105106
proxy_id: str | Omit = omit,
@@ -124,6 +125,9 @@ def create(
124125
125126
invocation_id: action invocation ID
126127
128+
kiosk_mode: If true, launches the browser in kiosk mode to hide address bar and tabs in live
129+
view.
130+
127131
persistence: Optional persistence configuration for the browser session.
128132
129133
profile: Profile selection for the browser session. Provide either id or name. If
@@ -167,6 +171,7 @@ def create(
167171
"extensions": extensions,
168172
"headless": headless,
169173
"invocation_id": invocation_id,
174+
"kiosk_mode": kiosk_mode,
170175
"persistence": persistence,
171176
"profile": profile,
172177
"proxy_id": proxy_id,
@@ -395,6 +400,7 @@ async def create(
395400
extensions: Iterable[browser_create_params.Extension] | Omit = omit,
396401
headless: bool | Omit = omit,
397402
invocation_id: str | Omit = omit,
403+
kiosk_mode: bool | Omit = omit,
398404
persistence: BrowserPersistenceParam | Omit = omit,
399405
profile: browser_create_params.Profile | Omit = omit,
400406
proxy_id: str | Omit = omit,
@@ -419,6 +425,9 @@ async def create(
419425
420426
invocation_id: action invocation ID
421427
428+
kiosk_mode: If true, launches the browser in kiosk mode to hide address bar and tabs in live
429+
view.
430+
422431
persistence: Optional persistence configuration for the browser session.
423432
424433
profile: Profile selection for the browser session. Provide either id or name. If
@@ -462,6 +471,7 @@ async def create(
462471
"extensions": extensions,
463472
"headless": headless,
464473
"invocation_id": invocation_id,
474+
"kiosk_mode": kiosk_mode,
465475
"persistence": persistence,
466476
"profile": profile,
467477
"proxy_id": proxy_id,

src/kernel/types/browser_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ class BrowserCreateParams(TypedDict, total=False):
2626
invocation_id: str
2727
"""action invocation ID"""
2828

29+
kiosk_mode: bool
30+
"""
31+
If true, launches the browser in kiosk mode to hide address bar and tabs in live
32+
view.
33+
"""
34+
2935
persistence: BrowserPersistenceParam
3036
"""Optional persistence configuration for the browser session."""
3137

src/kernel/types/browser_create_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ class BrowserCreateResponse(BaseModel):
4949
Only available for non-headless browsers.
5050
"""
5151

52+
kiosk_mode: Optional[bool] = None
53+
"""Whether the browser session is running in kiosk mode."""
54+
5255
persistence: Optional[BrowserPersistence] = None
5356
"""Optional persistence configuration for the browser session."""
5457

src/kernel/types/browser_list_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ class BrowserListResponseItem(BaseModel):
5050
Only available for non-headless browsers.
5151
"""
5252

53+
kiosk_mode: Optional[bool] = None
54+
"""Whether the browser session is running in kiosk mode."""
55+
5356
persistence: Optional[BrowserPersistence] = None
5457
"""Optional persistence configuration for the browser session."""
5558

src/kernel/types/browser_retrieve_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ class BrowserRetrieveResponse(BaseModel):
4949
Only available for non-headless browsers.
5050
"""
5151

52+
kiosk_mode: Optional[bool] = None
53+
"""Whether the browser session is running in kiosk mode."""
54+
5255
persistence: Optional[BrowserPersistence] = None
5356
"""Optional persistence configuration for the browser session."""
5457

tests/api_resources/test_browsers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def test_method_create_with_all_params(self, client: Kernel) -> None:
3939
],
4040
headless=False,
4141
invocation_id="rr33xuugxj9h0bkf1rdt2bet",
42+
kiosk_mode=True,
4243
persistence={"id": "my-awesome-browser-for-user-1234"},
4344
profile={
4445
"id": "id",
@@ -314,6 +315,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) ->
314315
],
315316
headless=False,
316317
invocation_id="rr33xuugxj9h0bkf1rdt2bet",
318+
kiosk_mode=True,
317319
persistence={"id": "my-awesome-browser-for-user-1234"},
318320
profile={
319321
"id": "id",

0 commit comments

Comments
 (0)