From 17c38fa6c7668a7e2bb1f058d57053d83238263a Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Fri, 21 Aug 2026 15:13:33 +0000 Subject: [PATCH 1/2] feat: Mirror the control/platform telemetry split into the public API Stainless-Generated-From: 84de8903f89fe67101549c27d1d3c4b16b3324df --- api.md | 6 + src/kernel/resources/browsers/browsers.py | 4 +- src/kernel/resources/browsers/telemetry.py | 2 + src/kernel/resources/proxies.py | 10 +- .../types/auth/connection_create_params.py | 14 +- .../types/auth/connection_login_params.py | 14 +- .../types/auth/connection_update_params.py | 14 +- src/kernel/types/auth/managed_auth.py | 14 +- .../types/auth/managed_auth_browser_config.py | 14 +- .../auth/managed_auth_browser_config_param.py | 14 +- src/kernel/types/browser_create_params.py | 16 +- .../types/browser_pool_acquire_params.py | 14 +- .../types/browser_pool_create_params.py | 14 +- .../types/browser_pool_update_params.py | 14 +- src/kernel/types/browser_update_params.py | 14 +- src/kernel/types/browsers/__init__.py | 12 + .../types/browsers/browser_api_call_event.py | 16 +- .../browsers/browser_cdp_command_event.py | 1883 +++++++++++++++++ .../browsers/browser_cdp_command_method.py | 46 + .../browsers/browser_cdp_connect_event.py | 13 +- .../browsers/browser_cdp_disconnect_event.py | 24 + .../browsers/browser_page_crashed_event.py | 41 + .../browser_platform_api_call_event.py | 47 + .../browser_telemetry_categories_config.py | 20 +- ...owser_telemetry_categories_config_param.py | 20 +- .../browser_telemetry_category_config.py | 4 +- ...browser_telemetry_category_config_param.py | 4 +- .../browser_telemetry_cdp_control_config.py | 24 + ...wser_telemetry_cdp_control_config_param.py | 26 + .../browser_telemetry_control_config.py | 28 + .../browser_telemetry_control_config_param.py | 29 + .../types/browsers/browser_telemetry_event.py | 6 + .../types/browsers/telemetry_events_params.py | 1 + tests/api_resources/auth/test_connections.py | 72 +- tests/api_resources/test_browser_pools.py | 36 +- tests/api_resources/test_browsers.py | 24 +- 36 files changed, 2431 insertions(+), 123 deletions(-) create mode 100644 src/kernel/types/browsers/browser_cdp_command_event.py create mode 100644 src/kernel/types/browsers/browser_cdp_command_method.py create mode 100644 src/kernel/types/browsers/browser_page_crashed_event.py create mode 100644 src/kernel/types/browsers/browser_platform_api_call_event.py create mode 100644 src/kernel/types/browsers/browser_telemetry_cdp_control_config.py create mode 100644 src/kernel/types/browsers/browser_telemetry_cdp_control_config_param.py create mode 100644 src/kernel/types/browsers/browser_telemetry_control_config.py create mode 100644 src/kernel/types/browsers/browser_telemetry_control_config_param.py diff --git a/api.md b/api.md index 6f8c4256..4d75e371 100644 --- a/api.md +++ b/api.md @@ -117,6 +117,8 @@ from kernel.types.browsers import ( BrowserAPICallEvent, BrowserCallStack, BrowserCaptchaSolveResultEvent, + BrowserCdpCommandEvent, + BrowserCdpCommandMethod, BrowserCdpConnectEvent, BrowserCdpDisconnectEvent, BrowserConsoleErrorEvent, @@ -138,6 +140,7 @@ from kernel.types.browsers import ( BrowserNetworkLoadingFailedEvent, BrowserNetworkRequestEvent, BrowserNetworkResponseEvent, + BrowserPageCrashedEvent, BrowserPageDomContentLoadedEvent, BrowserPageLayoutSettledEvent, BrowserPageLayoutShiftEvent, @@ -146,12 +149,15 @@ from kernel.types.browsers import ( BrowserPageNavigationEvent, BrowserPageNavigationSettledEvent, BrowserPageTabOpenedEvent, + BrowserPlatformAPICallEvent, BrowserProxyErrorEvent, BrowserServiceCrashedEvent, BrowserSystemOomKillEvent, BrowserTelemetryCategoriesConfig, BrowserTelemetryCategoryConfig, + BrowserTelemetryCdpControlConfig, BrowserTelemetryConfig, + BrowserTelemetryControlConfig, BrowserTelemetryEvent, BrowserTelemetryExportConfig, BrowserTelemetryOtlpExportConfig, diff --git a/src/kernel/resources/browsers/browsers.py b/src/kernel/resources/browsers/browsers.py index 8078b952..0a15061a 100644 --- a/src/kernel/resources/browsers/browsers.py +++ b/src/kernel/resources/browsers/browsers.py @@ -208,7 +208,7 @@ def create( extensions: List of browser extensions to load into the session. Provide each by id or name. gpu: If true, enables GPU acceleration for the browser session. Requires Start-Up or - Enterprise plan and headless=false. + Enterprise plan, headless=false, and region=us-east. headless: If true, launches the browser using a headless image (no VNC/GUI). Defaults to false. @@ -828,7 +828,7 @@ async def create( extensions: List of browser extensions to load into the session. Provide each by id or name. gpu: If true, enables GPU acceleration for the browser session. Requires Start-Up or - Enterprise plan and headless=false. + Enterprise plan, headless=false, and region=us-east. headless: If true, launches the browser using a headless image (no VNC/GUI). Defaults to false. diff --git a/src/kernel/resources/browsers/telemetry.py b/src/kernel/resources/browsers/telemetry.py index 5ed61557..c6fa04ea 100644 --- a/src/kernel/resources/browsers/telemetry.py +++ b/src/kernel/resources/browsers/telemetry.py @@ -62,6 +62,7 @@ def events( "page", "interaction", "control", + "platform", "connection", "system", "screenshot", @@ -238,6 +239,7 @@ def events( "page", "interaction", "control", + "platform", "connection", "system", "screenshot", diff --git a/src/kernel/resources/proxies.py b/src/kernel/resources/proxies.py index 08f97e37..ee9f9084 100644 --- a/src/kernel/resources/proxies.py +++ b/src/kernel/resources/proxies.py @@ -252,7 +252,10 @@ def delete( ) -> None: """Soft delete a proxy. - Sessions referencing it are not modified. + Session records referencing it are not modified. If egress + binding polling is enabled, existing tunnels for active sessions using the proxy + are terminated within one polling interval; subsequent connections through the + deleted proxy are rejected. Args: extra_headers: Send extra headers @@ -553,7 +556,10 @@ async def delete( ) -> None: """Soft delete a proxy. - Sessions referencing it are not modified. + Session records referencing it are not modified. If egress + binding polling is enabled, existing tunnels for active sessions using the proxy + are terminated within one polling interval; subsequent connections through the + deleted proxy are rejected. Args: extra_headers: Send extra headers diff --git a/src/kernel/types/auth/connection_create_params.py b/src/kernel/types/auth/connection_create_params.py index 2fdc808b..54995d37 100644 --- a/src/kernel/types/auth/connection_create_params.py +++ b/src/kernel/types/auth/connection_create_params.py @@ -175,13 +175,13 @@ class BrowserTelemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/auth/connection_login_params.py b/src/kernel/types/auth/connection_login_params.py index c26b020f..cbe2bf3b 100644 --- a/src/kernel/types/auth/connection_login_params.py +++ b/src/kernel/types/auth/connection_login_params.py @@ -96,13 +96,13 @@ class BrowserTelemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/auth/connection_update_params.py b/src/kernel/types/auth/connection_update_params.py index ad3fbe44..829cf489 100644 --- a/src/kernel/types/auth/connection_update_params.py +++ b/src/kernel/types/auth/connection_update_params.py @@ -135,13 +135,13 @@ class BrowserTelemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/auth/managed_auth.py b/src/kernel/types/auth/managed_auth.py index 23e45d6b..7c4ba7d6 100644 --- a/src/kernel/types/auth/managed_auth.py +++ b/src/kernel/types/auth/managed_auth.py @@ -79,13 +79,13 @@ class BrowserTelemetry(BaseModel): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: Optional[bool] = None diff --git a/src/kernel/types/auth/managed_auth_browser_config.py b/src/kernel/types/auth/managed_auth_browser_config.py index a4d63de7..c7e565d1 100644 --- a/src/kernel/types/auth/managed_auth_browser_config.py +++ b/src/kernel/types/auth/managed_auth_browser_config.py @@ -67,13 +67,13 @@ class Telemetry(BaseModel): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: Optional[bool] = None diff --git a/src/kernel/types/auth/managed_auth_browser_config_param.py b/src/kernel/types/auth/managed_auth_browser_config_param.py index 7f8650e0..bfd09f95 100644 --- a/src/kernel/types/auth/managed_auth_browser_config_param.py +++ b/src/kernel/types/auth/managed_auth_browser_config_param.py @@ -69,13 +69,13 @@ class Telemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/browser_create_params.py b/src/kernel/types/browser_create_params.py index 2899fb7c..85e0b9bd 100644 --- a/src/kernel/types/browser_create_params.py +++ b/src/kernel/types/browser_create_params.py @@ -41,7 +41,7 @@ class BrowserCreateParams(TypedDict, total=False): gpu: bool """If true, enables GPU acceleration for the browser session. - Requires Start-Up or Enterprise plan and headless=false. + Requires Start-Up or Enterprise plan, headless=false, and region=us-east. """ headless: bool @@ -221,13 +221,13 @@ class Telemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/browser_pool_acquire_params.py b/src/kernel/types/browser_pool_acquire_params.py index bd50be1b..b5bd708d 100644 --- a/src/kernel/types/browser_pool_acquire_params.py +++ b/src/kernel/types/browser_pool_acquire_params.py @@ -115,13 +115,13 @@ class Telemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/browser_pool_create_params.py b/src/kernel/types/browser_pool_create_params.py index 474e4243..3a736fbc 100644 --- a/src/kernel/types/browser_pool_create_params.py +++ b/src/kernel/types/browser_pool_create_params.py @@ -216,13 +216,13 @@ class Telemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/browser_pool_update_params.py b/src/kernel/types/browser_pool_update_params.py index 36693003..9bf898f2 100644 --- a/src/kernel/types/browser_pool_update_params.py +++ b/src/kernel/types/browser_pool_update_params.py @@ -226,13 +226,13 @@ class Telemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/browser_update_params.py b/src/kernel/types/browser_update_params.py index a9ea675c..e7769e61 100644 --- a/src/kernel/types/browser_update_params.py +++ b/src/kernel/types/browser_update_params.py @@ -136,13 +136,13 @@ class Telemetry(TypedDict, total=False): The operational categories (control, connection, system, captcha) are captured whenever telemetry is enabled; set one to enabled=false to opt out. The CDP - categories (console, network, page, interaction) and screenshot are off by - default; set enabled=true to opt in. On create, provided categories layer onto - the default set. On update, provided categories merge onto the session's current - config; when no telemetry is active this falls back to the default set (matching - create). If browser is omitted or empty, the default set is used. A browser - config that disables every category stops capture on update and starts no - capture on create. + categories (console, network, page, interaction), screenshot and platform are + off by default; set enabled=true to opt in. On create, provided categories layer + onto the default set. On update, provided categories merge onto the session's + current config; when no telemetry is active this falls back to the default set + (matching create). If browser is omitted or empty, the default set is used. A + browser config that disables every category stops capture on update and starts + no capture on create. """ enabled: bool diff --git a/src/kernel/types/browsers/__init__.py b/src/kernel/types/browsers/__init__.py index 8ed451a0..a6d6eb74 100644 --- a/src/kernel/types/browsers/__init__.py +++ b/src/kernel/types/browsers/__init__.py @@ -40,6 +40,7 @@ from .telemetry_events_params import TelemetryEventsParams as TelemetryEventsParams from .telemetry_stream_params import TelemetryStreamParams as TelemetryStreamParams from .browser_telemetry_config import BrowserTelemetryConfig as BrowserTelemetryConfig +from .browser_cdp_command_event import BrowserCdpCommandEvent as BrowserCdpCommandEvent from .browser_cdp_connect_event import BrowserCdpConnectEvent as BrowserCdpConnectEvent from .browser_console_log_event import BrowserConsoleLogEvent as BrowserConsoleLogEvent from .browser_proxy_error_event import BrowserProxyErrorEvent as BrowserProxyErrorEvent @@ -51,7 +52,9 @@ from .playwright_execute_params import PlaywrightExecuteParams as PlaywrightExecuteParams from .telemetry_events_response import TelemetryEventsResponse as TelemetryEventsResponse from .telemetry_stream_response import TelemetryStreamResponse as TelemetryStreamResponse +from .browser_cdp_command_method import BrowserCdpCommandMethod as BrowserCdpCommandMethod from .browser_network_idle_event import BrowserNetworkIdleEvent as BrowserNetworkIdleEvent +from .browser_page_crashed_event import BrowserPageCrashedEvent as BrowserPageCrashedEvent from .computer_drag_mouse_params import ComputerDragMouseParams as ComputerDragMouseParams from .computer_move_mouse_params import ComputerMoveMouseParams as ComputerMoveMouseParams from .browser_console_error_event import BrowserConsoleErrorEvent as BrowserConsoleErrorEvent @@ -70,9 +73,11 @@ from .browser_interaction_click_event import BrowserInteractionClickEvent as BrowserInteractionClickEvent from .browser_live_view_connect_event import BrowserLiveViewConnectEvent as BrowserLiveViewConnectEvent from .browser_page_layout_shift_event import BrowserPageLayoutShiftEvent as BrowserPageLayoutShiftEvent +from .browser_platform_api_call_event import BrowserPlatformAPICallEvent as BrowserPlatformAPICallEvent from .browser_telemetry_export_config import BrowserTelemetryExportConfig as BrowserTelemetryExportConfig from .computer_write_clipboard_params import ComputerWriteClipboardParams as ComputerWriteClipboardParams from .browser_monitor_screenshot_event import BrowserMonitorScreenshotEvent as BrowserMonitorScreenshotEvent +from .browser_telemetry_control_config import BrowserTelemetryControlConfig as BrowserTelemetryControlConfig from .computer_read_clipboard_response import ComputerReadClipboardResponse as ComputerReadClipboardResponse from .browser_monitor_init_failed_event import BrowserMonitorInitFailedEvent as BrowserMonitorInitFailedEvent from .browser_monitor_reconnected_event import BrowserMonitorReconnectedEvent as BrowserMonitorReconnectedEvent @@ -84,6 +89,7 @@ from .computer_capture_screenshot_params import ComputerCaptureScreenshotParams as ComputerCaptureScreenshotParams from .browser_telemetry_categories_config import BrowserTelemetryCategoriesConfig as BrowserTelemetryCategoriesConfig from .browser_network_loading_failed_event import BrowserNetworkLoadingFailedEvent as BrowserNetworkLoadingFailedEvent +from .browser_telemetry_cdp_control_config import BrowserTelemetryCdpControlConfig as BrowserTelemetryCdpControlConfig from .browser_telemetry_otlp_export_config import BrowserTelemetryOtlpExportConfig as BrowserTelemetryOtlpExportConfig from .computer_get_mouse_position_response import ComputerGetMousePositionResponse as ComputerGetMousePositionResponse from .browser_page_dom_content_loaded_event import BrowserPageDomContentLoadedEvent as BrowserPageDomContentLoadedEvent @@ -96,6 +102,9 @@ from .browser_monitor_reconnect_failed_event import ( BrowserMonitorReconnectFailedEvent as BrowserMonitorReconnectFailedEvent, ) +from .browser_telemetry_control_config_param import ( + BrowserTelemetryControlConfigParam as BrowserTelemetryControlConfigParam, +) from .browser_telemetry_category_config_param import ( BrowserTelemetryCategoryConfigParam as BrowserTelemetryCategoryConfigParam, ) @@ -108,3 +117,6 @@ from .browser_telemetry_categories_config_param import ( BrowserTelemetryCategoriesConfigParam as BrowserTelemetryCategoriesConfigParam, ) +from .browser_telemetry_cdp_control_config_param import ( + BrowserTelemetryCdpControlConfigParam as BrowserTelemetryCdpControlConfigParam, +) diff --git a/src/kernel/types/browsers/browser_api_call_event.py b/src/kernel/types/browsers/browser_api_call_event.py index 702596d8..b4210968 100644 --- a/src/kernel/types/browsers/browser_api_call_event.py +++ b/src/kernel/types/browsers/browser_api_call_event.py @@ -14,7 +14,10 @@ class Data(BaseModel): """Wall-clock duration of the handler in milliseconds.""" operation_id: str - """OpenAPI operationId of the matched route (e.g. processExec, takeScreenshot).""" + """Matched route's operation, named as the in-VM API names its handler (e.g. + + ProcessExec, TakeScreenshot). + """ request_id: str """Per-request identifier from the in-VM API request middleware.""" @@ -22,9 +25,18 @@ class Data(BaseModel): status: int """HTTP response status code.""" + code: Optional[str] = None + """ + Source submitted to the Playwright code-execution endpoint, capped at 8192 bytes + like every other captured string. A capped value is cut on a character boundary + and ends in `...[truncated]`. Absent for every other operation. + """ + class BrowserAPICallEvent(BaseModel): - """An agent-driven HTTP call handled by the in-VM API server.""" + """ + An agent-driven HTTP call that drives the browser, handled by the in-VM API server. Calls that manage the VM instead emit platform_api_call. + """ category: Literal["control"] diff --git a/src/kernel/types/browsers/browser_cdp_command_event.py b/src/kernel/types/browsers/browser_cdp_command_event.py new file mode 100644 index 00000000..045be40f --- /dev/null +++ b/src/kernel/types/browsers/browser_cdp_command_event.py @@ -0,0 +1,1883 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Union, Optional +from typing_extensions import Literal, Annotated, TypeAlias + +from ..._utils import PropertyInfo +from ..._models import BaseModel +from .browser_event_source import BrowserEventSource + +__all__ = [ + "BrowserCdpCommandEvent", + "Data", + "DataBrowserCdpInputDispatchMouseEventCommandData", + "DataBrowserCdpInputDispatchKeyEventCommandData", + "DataBrowserCdpInputInsertTextCommandData", + "DataBrowserCdpInputImeSetCompositionCommandData", + "DataBrowserCdpInputDispatchTouchEventCommandData", + "DataBrowserCdpInputDispatchDragEventCommandData", + "DataBrowserCdpInputCancelDraggingCommandData", + "DataBrowserCdpInputEmulateTouchFromMouseEventCommandData", + "DataBrowserCdpInputSynthesizePinchGestureCommandData", + "DataBrowserCdpInputSynthesizeScrollGestureCommandData", + "DataBrowserCdpInputSynthesizeTapGestureCommandData", + "DataBrowserCdpDomSetFileInputFilesCommandData", + "DataBrowserCdpDomFocusCommandData", + "DataBrowserCdpDomScrollIntoViewIfNeededCommandData", + "DataBrowserCdpPageBringToFrontCommandData", + "DataBrowserCdpPageCaptureScreenshotCommandData", + "DataBrowserCdpPageCaptureSnapshotCommandData", + "DataBrowserCdpPageHandleJavaScriptDialogCommandData", + "DataBrowserCdpPageNavigateCommandData", + "DataBrowserCdpPageNavigateToHistoryEntryCommandData", + "DataBrowserCdpPageReloadCommandData", + "DataBrowserCdpPagePrintToPdfCommandData", + "DataBrowserCdpPageStartScreencastCommandData", + "DataBrowserCdpPageStopScreencastCommandData", + "DataBrowserCdpPageStopLoadingCommandData", + "DataBrowserCdpPageCloseCommandData", + "DataBrowserCdpPageSetWebLifecycleStateCommandData", + "DataBrowserCdpTargetActivateTargetCommandData", + "DataBrowserCdpTargetCloseTargetCommandData", + "DataBrowserCdpTargetCreateTargetCommandData", + "DataBrowserCdpTargetCreateBrowserContextCommandData", + "DataBrowserCdpTargetDisposeBrowserContextCommandData", + "DataBrowserCdpTargetOpenDevToolsCommandData", + "DataBrowserCdpBrowserCancelDownloadCommandData", + "DataBrowserCdpBrowserCloseCommandData", + "DataBrowserCdpBrowserSetWindowBoundsCommandData", + "DataBrowserCdpBrowserSetContentsSizeCommandData", + "DataBrowserCdpAutofillTriggerCommandData", +] + + +class DataBrowserCdpInputDispatchMouseEventCommandData(BaseModel): + """Sanitized `Input.dispatchMouseEvent` arguments. + + Canonical input: `Input.dispatchMouseEvent` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + event_type: Literal["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel", "other"] + """Mouse event phase: `mousePressed`, `mouseReleased`, `mouseMoved` or + `mouseWheel`. + + A value the protocol does not define is reported as `other`. + """ + + method: Literal["Input.dispatchMouseEvent"] + + button: Optional[Literal["none", "left", "middle", "right", "back", "forward", "other"]] = None + """ + Button named by the command (`none`, `left`, `middle`, `right`, `back`, + `forward`). A value the protocol does not define is reported as `other`. + """ + + buttons: Optional[int] = None + """Bit field of buttons held down. + + Non-zero on a `mouseMoved` means the move is a drag path. + """ + + click_count: Optional[int] = None + """Number of times the button was clicked (2 is a double click).""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + delta_x: Optional[float] = None + """Horizontal scroll delta, for `mouseWheel`.""" + + delta_y: Optional[float] = None + """Vertical scroll delta, for `mouseWheel`.""" + + force: Optional[float] = None + """Normalized pressure, 0 to 1.""" + + modifiers: Optional[int] = None + """Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).""" + + pointer_type: Optional[Literal["mouse", "pen", "other"]] = None + """Pointer that generated the event (`mouse` or `pen`). + + A value the protocol does not define is reported as `other`. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + tangential_pressure: Optional[float] = None + """Normalized tangential pressure, -1 to 1.""" + + tilt_x: Optional[float] = None + """Pen tilt from the Y-Z plane, in degrees.""" + + tilt_y: Optional[float] = None + """Pen tilt from the X-Z plane, in degrees.""" + + twist: Optional[int] = None + """Pen clockwise rotation, in degrees.""" + + x: Optional[float] = None + """Viewport x coordinate in CSS pixels.""" + + y: Optional[float] = None + """Viewport y coordinate in CSS pixels.""" + + +class DataBrowserCdpInputDispatchKeyEventCommandData(BaseModel): + """Sanitized `Input.dispatchKeyEvent` arguments. + + Canonical input: `Input.dispatchKeyEvent` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + event_type: Literal["keyDown", "keyUp", "rawKeyDown", "char", "other"] + """Key event phase: `keyDown`, `keyUp`, `rawKeyDown` or `char`. + + A value the protocol does not define is reported as `other`. + """ + + method: Literal["Input.dispatchKeyEvent"] + + auto_repeat: Optional[bool] = None + """Whether the event was generated by key repeat.""" + + command_count: Optional[int] = None + """Number of editing commands (e.g. `selectAll`) carried by the event.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + is_keypad: Optional[bool] = None + """Whether the key is on the numeric keypad.""" + + is_system_key: Optional[bool] = None + """Whether the event is a system key event.""" + + location: Optional[int] = None + """Keyboard location (1=left, 2=right, 3=numpad).""" + + modifiers: Optional[int] = None + """Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).""" + + named_key: Optional[str] = None + """Key that commands the page rather than typing into it (e.g. + + `Enter`, `Tab`, `ArrowDown`, `F5`). Keys that produce a character are never + captured; those are counted by `text_length`. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + text_length: Optional[int] = None + """Number of characters the command submitted. The text itself is never captured.""" + + +class DataBrowserCdpInputInsertTextCommandData(BaseModel): + """Sanitized `Input.insertText` arguments. + + Canonical input: `Input.insertText` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Input.insertText"] + + text_length: int + """Number of characters inserted. The text itself is never captured.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpInputImeSetCompositionCommandData(BaseModel): + """Sanitized `Input.imeSetComposition` arguments. + + Canonical input: `Input.imeSetComposition` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Input.imeSetComposition"] + + text_length: int + """Number of characters in the composition. The text itself is never captured.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + replacement_end: Optional[int] = None + """Replacement range end offset.""" + + replacement_start: Optional[int] = None + """Replacement range start offset.""" + + selection_end: Optional[int] = None + """Selection end offset within the composition.""" + + selection_start: Optional[int] = None + """Selection start offset within the composition.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpInputDispatchTouchEventCommandData(BaseModel): + """Sanitized `Input.dispatchTouchEvent` arguments. + + Canonical input: `Input.dispatchTouchEvent` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + event_type: Literal["touchStart", "touchEnd", "touchMove", "touchCancel", "other"] + """Touch event phase: `touchStart`, `touchEnd`, `touchMove` or `touchCancel`. + + A value the protocol does not define is reported as `other`. + """ + + method: Literal["Input.dispatchTouchEvent"] + + touch_point_count: int + """Number of active touch points the command carried.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + force: Optional[float] = None + """Normalized pressure of the first touch point, 0 to 1.""" + + modifiers: Optional[int] = None + """Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).""" + + radius_x: Optional[float] = None + """Horizontal radius of the first touch point.""" + + radius_y: Optional[float] = None + """Vertical radius of the first touch point.""" + + rotation_angle: Optional[float] = None + """Rotation of the first touch point, in degrees.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + tangential_pressure: Optional[float] = None + """Normalized tangential pressure of the first touch point, -1 to 1.""" + + tilt_x: Optional[float] = None + """Tilt of the first touch point from the Y-Z plane, in degrees.""" + + tilt_y: Optional[float] = None + """Tilt of the first touch point from the X-Z plane, in degrees.""" + + twist: Optional[int] = None + """Clockwise rotation of the first touch point, in degrees.""" + + x: Optional[float] = None + """Viewport x coordinate of the first touch point. + + Touch coordinates live inside `touchPoints`, so this is the primary point rather + than a command-level argument. + """ + + y: Optional[float] = None + """Viewport y coordinate of the first touch point.""" + + +class DataBrowserCdpInputDispatchDragEventCommandData(BaseModel): + """Sanitized `Input.dispatchDragEvent` arguments. + + Canonical input: `Input.dispatchDragEvent` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + event_type: Literal["dragEnter", "dragOver", "drop", "dragCancel", "other"] + """Drag event phase: `dragEnter`, `dragOver`, `drop` or `dragCancel`. + + A value the protocol does not define is reported as `other`. + """ + + method: Literal["Input.dispatchDragEvent"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + drag_file_count: Optional[int] = None + """Number of files in the drag payload. File paths are never captured.""" + + drag_item_count: Optional[int] = None + """Number of items in the drag payload. Item contents are never captured.""" + + drag_mime_categories: Optional[ + List[ + Literal["text", "image", "audio", "video", "application", "font", "model", "multipart", "message", "other"] + ] + ] = None + """Distinct top-level MIME categories of the drag items (e.g. + + `text`, `image`, `application`). Subtypes and contents are never captured. A + value the protocol does not define is reported as `other`. + """ + + drag_operations_mask: Optional[int] = None + """Bit field of allowed drag operations (1=copy, 2=link, 16=move).""" + + modifiers: Optional[int] = None + """Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + x: Optional[float] = None + """Viewport x coordinate in CSS pixels.""" + + y: Optional[float] = None + """Viewport y coordinate in CSS pixels.""" + + +class DataBrowserCdpInputCancelDraggingCommandData(BaseModel): + """Sanitized `Input.cancelDragging` arguments. + + Canonical input: `Input.cancelDragging` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Input.cancelDragging"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpInputEmulateTouchFromMouseEventCommandData(BaseModel): + """Sanitized `Input.emulateTouchFromMouseEvent` arguments. + + Canonical input: `Input.emulateTouchFromMouseEvent` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + event_type: Literal["mousePressed", "mouseReleased", "mouseMoved", "mouseWheel", "other"] + """Mouse event phase being emulated as touch. + + A value the protocol does not define is reported as `other`. + """ + + method: Literal["Input.emulateTouchFromMouseEvent"] + + button: Optional[Literal["none", "left", "middle", "right", "back", "forward", "other"]] = None + """Button named by the command. + + A value the protocol does not define is reported as `other`. + """ + + click_count: Optional[int] = None + """Number of times the button was clicked.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + delta_x: Optional[float] = None + """Horizontal scroll delta.""" + + delta_y: Optional[float] = None + """Vertical scroll delta.""" + + modifiers: Optional[int] = None + """Bit field of held modifier keys (1=Alt, 2=Ctrl, 4=Meta, 8=Shift).""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + x: Optional[float] = None + """Viewport x coordinate in CSS pixels.""" + + y: Optional[float] = None + """Viewport y coordinate in CSS pixels.""" + + +class DataBrowserCdpInputSynthesizePinchGestureCommandData(BaseModel): + """Sanitized `Input.synthesizePinchGesture` arguments. + + Canonical input: `Input.synthesizePinchGesture` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Input.synthesizePinchGesture"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + gesture_source_type: Optional[Literal["default", "touch", "mouse", "other"]] = None + """Input source the synthesized gesture emulates. + + A value the protocol does not define is reported as `other`. + """ + + relative_speed: Optional[int] = None + """Relative pointer speed, in pixels per second.""" + + scale_factor: Optional[float] = None + """Relative scale of the pinch (>1 zooms in).""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + x: Optional[float] = None + """Viewport x coordinate in CSS pixels.""" + + y: Optional[float] = None + """Viewport y coordinate in CSS pixels.""" + + +class DataBrowserCdpInputSynthesizeScrollGestureCommandData(BaseModel): + """Sanitized `Input.synthesizeScrollGesture` arguments. + + Canonical input: `Input.synthesizeScrollGesture` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Input.synthesizeScrollGesture"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + gesture_source_type: Optional[Literal["default", "touch", "mouse", "other"]] = None + """Input source the synthesized gesture emulates. + + A value the protocol does not define is reported as `other`. + """ + + prevent_fling: Optional[bool] = None + """Whether fling was suppressed.""" + + repeat_count: Optional[int] = None + """Number of additional repeats of the scroll.""" + + repeat_delay_ms: Optional[int] = None + """Delay between repeats, in milliseconds.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + speed: Optional[int] = None + """Swipe speed in pixels per second.""" + + x: Optional[float] = None + """Viewport x coordinate in CSS pixels.""" + + x_distance: Optional[float] = None + """Horizontal scroll distance in CSS pixels; positive scrolls left.""" + + x_overscroll: Optional[float] = None + """Additional horizontal distance scrolled past the end.""" + + y: Optional[float] = None + """Viewport y coordinate in CSS pixels.""" + + y_distance: Optional[float] = None + """Vertical scroll distance in CSS pixels; positive scrolls up.""" + + y_overscroll: Optional[float] = None + """Additional vertical distance scrolled past the end.""" + + +class DataBrowserCdpInputSynthesizeTapGestureCommandData(BaseModel): + """Sanitized `Input.synthesizeTapGesture` arguments. + + Canonical input: `Input.synthesizeTapGesture` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Input.synthesizeTapGesture"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + duration: Optional[int] = None + """Duration between touchdown and touchup, in milliseconds.""" + + gesture_source_type: Optional[Literal["default", "touch", "mouse", "other"]] = None + """Input source the synthesized gesture emulates. + + A value the protocol does not define is reported as `other`. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + tap_count: Optional[int] = None + """Number of times to tap (2 is a double tap).""" + + x: Optional[float] = None + """Viewport x coordinate in CSS pixels.""" + + y: Optional[float] = None + """Viewport y coordinate in CSS pixels.""" + + +class DataBrowserCdpDomSetFileInputFilesCommandData(BaseModel): + """Sanitized `DOM.setFileInputFiles` arguments. + + Canonical input: `DOM.setFileInputFiles` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + file_count: int + """Number of files handed to the input. File paths are never captured.""" + + method: Literal["DOM.setFileInputFiles"] + + backend_node_id: Optional[int] = None + """Opaque backend DOM node identifier the command targeted.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + node_id: Optional[int] = None + """Opaque DOM node identifier the command targeted.""" + + object_id: Optional[str] = None + """Opaque Runtime remote object identifier the command targeted. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpDomFocusCommandData(BaseModel): + """Sanitized `DOM.focus` arguments. + + Canonical input: `DOM.focus` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["DOM.focus"] + + backend_node_id: Optional[int] = None + """Opaque backend DOM node identifier the command targeted.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + node_id: Optional[int] = None + """Opaque DOM node identifier the command targeted.""" + + object_id: Optional[str] = None + """Opaque Runtime remote object identifier the command targeted. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpDomScrollIntoViewIfNeededCommandData(BaseModel): + """Sanitized `DOM.scrollIntoViewIfNeeded` arguments. + + Canonical input: `DOM.scrollIntoViewIfNeeded` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["DOM.scrollIntoViewIfNeeded"] + + backend_node_id: Optional[int] = None + """Opaque backend DOM node identifier the command targeted.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + node_id: Optional[int] = None + """Opaque DOM node identifier the command targeted.""" + + object_id: Optional[str] = None + """Opaque Runtime remote object identifier the command targeted. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + rect_height: Optional[float] = None + """Height of the rect the command scrolled to.""" + + rect_width: Optional[float] = None + """Width of the rect the command scrolled to.""" + + rect_x: Optional[float] = None + """X offset of the rect the command scrolled to, relative to the node.""" + + rect_y: Optional[float] = None + """Y offset of the rect the command scrolled to, relative to the node.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageBringToFrontCommandData(BaseModel): + """Sanitized `Page.bringToFront` arguments. + + Canonical input: `Page.bringToFront` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.bringToFront"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageCaptureScreenshotCommandData(BaseModel): + """Sanitized `Page.captureScreenshot` arguments. + + Canonical input: `Page.captureScreenshot` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.captureScreenshot"] + + capture_beyond_viewport: Optional[bool] = None + """Whether the capture extended past the viewport.""" + + clip_height: Optional[float] = None + """Clip region height in CSS pixels.""" + + clip_scale: Optional[float] = None + """Clip region page scale factor.""" + + clip_width: Optional[float] = None + """Clip region width in CSS pixels.""" + + clip_x: Optional[float] = None + """Clip region x offset in CSS pixels.""" + + clip_y: Optional[float] = None + """Clip region y offset in CSS pixels.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + format: Optional[Literal["jpeg", "png", "webp", "other"]] = None + """Image format requested (`jpeg`, `png` or `webp`). + + A value the protocol does not define is reported as `other`. + """ + + from_surface: Optional[bool] = None + """Whether the capture was taken from the surface rather than the view.""" + + optimize_for_speed: Optional[bool] = None + """Whether encoding favored speed over size.""" + + quality: Optional[int] = None + """Compression quality, 0 to 100, for lossy formats.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageCaptureSnapshotCommandData(BaseModel): + """Sanitized `Page.captureSnapshot` arguments. + + Canonical input: `Page.captureSnapshot` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.captureSnapshot"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + format: Optional[Literal["mhtml", "other"]] = None + """Snapshot format requested (`mhtml`). + + A value the protocol does not define is reported as `other`. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageHandleJavaScriptDialogCommandData(BaseModel): + """Sanitized `Page.handleJavaScriptDialog` arguments. + + Canonical input: `Page.handleJavaScriptDialog` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + accept: bool + """Whether the dialog was accepted or dismissed.""" + + method: Literal["Page.handleJavaScriptDialog"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + prompt_text_length: Optional[int] = None + """Number of characters entered into a prompt dialog. + + The text itself is never captured. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageNavigateCommandData(BaseModel): + """Sanitized `Page.navigate` arguments. + + Canonical input: `Page.navigate` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.navigate"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + frame_id: Optional[str] = None + """Opaque frame identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + referrer_policy: Optional[ + Literal[ + "noReferrer", + "noReferrerWhenDowngrade", + "origin", + "originWhenCrossOrigin", + "sameOrigin", + "strictOrigin", + "strictOriginWhenCrossOrigin", + "unsafeUrl", + "other", + ] + ] = None + """Referrer policy named by the command. + + A value the protocol does not define is reported as `other`. + """ + + referrer_present: Optional[bool] = None + """Whether the command carried a referrer. The referrer itself is never captured.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + transition_type: Optional[ + Literal[ + "link", + "typed", + "address_bar", + "auto_bookmark", + "auto_subframe", + "manual_subframe", + "generated", + "auto_toplevel", + "form_submit", + "reload", + "keyword", + "keyword_generated", + "other", + ] + ] = None + """Navigation reason reported by the caller (e.g. + + `link`, `typed`, `reload`). A value the protocol does not define is reported as + `other`. + """ + + url_scheme: Optional[str] = None + """Scheme of the destination URL (e.g. + + `https`, `about`, `data`). The rest of the URL is never captured. + """ + + +class DataBrowserCdpPageNavigateToHistoryEntryCommandData(BaseModel): + """Sanitized `Page.navigateToHistoryEntry` arguments. + + Canonical input: `Page.navigateToHistoryEntry` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + entry_id: int + """History entry the command navigated to.""" + + method: Literal["Page.navigateToHistoryEntry"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageReloadCommandData(BaseModel): + """Sanitized `Page.reload` arguments. + + Canonical input: `Page.reload` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.reload"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + ignore_cache: Optional[bool] = None + """Whether the reload bypassed the cache.""" + + loader_id: Optional[str] = None + """Opaque document loader identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + script_length: Optional[int] = None + """Number of characters in the injected script.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPagePrintToPdfCommandData(BaseModel): + """Sanitized `Page.printToPDF` arguments. + + Canonical input: `Page.printToPDF` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.printToPDF"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + display_header_footer: Optional[bool] = None + """Whether a header and footer were rendered.""" + + footer_template_present: Optional[bool] = None + """Whether a footer template was supplied. The template itself is never captured.""" + + generate_document_outline: Optional[bool] = None + """Whether a document outline was embedded.""" + + generate_tagged_pdf: Optional[bool] = None + """Whether a tagged (accessible) PDF was requested.""" + + header_template_present: Optional[bool] = None + """Whether a header template was supplied. The template itself is never captured.""" + + landscape: Optional[bool] = None + """Whether the page was laid out in landscape.""" + + margin_bottom: Optional[float] = None + """Bottom margin in inches.""" + + margin_left: Optional[float] = None + """Left margin in inches.""" + + margin_right: Optional[float] = None + """Right margin in inches.""" + + margin_top: Optional[float] = None + """Top margin in inches.""" + + page_ranges_present: Optional[bool] = None + """Whether a page range was supplied.""" + + paper_height: Optional[float] = None + """Paper height in inches.""" + + paper_width: Optional[float] = None + """Paper width in inches.""" + + prefer_css_page_size: Optional[bool] = None + """Whether the CSS page size was preferred over the paper size.""" + + print_background: Optional[bool] = None + """Whether background graphics were printed.""" + + scale: Optional[float] = None + """Page render scale.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + transfer_mode: Optional[Literal["ReturnAsBase64", "ReturnAsStream", "other"]] = None + """How the PDF was returned (`ReturnAsBase64` or `ReturnAsStream`). + + A value the protocol does not define is reported as `other`. + """ + + +class DataBrowserCdpPageStartScreencastCommandData(BaseModel): + """Sanitized `Page.startScreencast` arguments. + + Canonical input: `Page.startScreencast` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.startScreencast"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + every_nth_frame: Optional[int] = None + """Frame sampling interval.""" + + format: Optional[Literal["jpeg", "png", "other"]] = None + """Frame format requested (`jpeg` or `png`). + + A value the protocol does not define is reported as `other`. + """ + + max_height: Optional[int] = None + """Maximum frame height in pixels.""" + + max_width: Optional[int] = None + """Maximum frame width in pixels.""" + + quality: Optional[int] = None + """Compression quality, 0 to 100.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageStopScreencastCommandData(BaseModel): + """Sanitized `Page.stopScreencast` arguments. + + Canonical input: `Page.stopScreencast` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.stopScreencast"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageStopLoadingCommandData(BaseModel): + """Sanitized `Page.stopLoading` arguments. + + Canonical input: `Page.stopLoading` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.stopLoading"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageCloseCommandData(BaseModel): + """Sanitized `Page.close` arguments. + + Canonical input: `Page.close` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.close"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpPageSetWebLifecycleStateCommandData(BaseModel): + """Sanitized `Page.setWebLifecycleState` arguments. + + Canonical input: `Page.setWebLifecycleState` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Page.setWebLifecycleState"] + + state: Literal["frozen", "active", "other"] + """Lifecycle state applied (`frozen` or `active`). + + A value the protocol does not define is reported as `other`. + """ + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpTargetActivateTargetCommandData(BaseModel): + """Sanitized `Target.activateTarget` arguments. + + Canonical input: `Target.activateTarget` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Target.activateTarget"] + + target_id: str + """Opaque target identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpTargetCloseTargetCommandData(BaseModel): + """Sanitized `Target.closeTarget` arguments. + + Canonical input: `Target.closeTarget` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Target.closeTarget"] + + target_id: str + """Opaque target identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpTargetCreateTargetCommandData(BaseModel): + """Sanitized `Target.createTarget` arguments. + + Canonical input: `Target.createTarget` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Target.createTarget"] + + background: Optional[bool] = None + """Whether the target was created in the background.""" + + browser_context_id: Optional[str] = None + """Opaque browser context identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + enable_begin_frame_control: Optional[bool] = None + """Whether BeginFrame control was enabled (headless only).""" + + focus: Optional[bool] = None + """Whether the new target was focused.""" + + for_tab: Optional[bool] = None + """Whether a tab target rather than a page target was created.""" + + height: Optional[int] = None + """Window height in DIP.""" + + hidden: Optional[bool] = None + """Whether the target was created hidden.""" + + left: Optional[int] = None + """Window x position in screen coordinates.""" + + new_window: Optional[bool] = None + """Whether a new window was requested.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + top: Optional[int] = None + """Window y position in screen coordinates.""" + + url_scheme: Optional[str] = None + """Scheme of the destination URL (e.g. + + `https`, `about`, `data`). The rest of the URL is never captured. + """ + + width: Optional[int] = None + """Window width in DIP.""" + + window_state: Optional[Literal["normal", "minimized", "maximized", "fullscreen", "other"]] = None + """Window state requested (`normal`, `minimized`, `maximized`, `fullscreen`). + + A value the protocol does not define is reported as `other`. + """ + + +class DataBrowserCdpTargetCreateBrowserContextCommandData(BaseModel): + """Sanitized `Target.createBrowserContext` arguments. + + Canonical input: `Target.createBrowserContext` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Target.createBrowserContext"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + dispose_on_detach: Optional[bool] = None + """Whether the context is disposed when the debugging session detaches.""" + + proxy_bypass_list_present: Optional[bool] = None + """Whether a proxy bypass list was configured.""" + + proxy_server_present: Optional[bool] = None + """Whether a proxy was configured. The proxy address is never captured.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + universal_network_access_origin_count: Optional[int] = None + """Number of origins granted universal network access. + + The origins themselves are never captured. + """ + + +class DataBrowserCdpTargetDisposeBrowserContextCommandData(BaseModel): + """Sanitized `Target.disposeBrowserContext` arguments. + + Canonical input: `Target.disposeBrowserContext` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + browser_context_id: str + """Opaque browser context identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + method: Literal["Target.disposeBrowserContext"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpTargetOpenDevToolsCommandData(BaseModel): + """Sanitized `Target.openDevTools` arguments. + + Canonical input: `Target.openDevTools` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Target.openDevTools"] + + target_id: str + """Opaque target identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + panel_id: Optional[str] = None + """DevTools panel opened. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpBrowserCancelDownloadCommandData(BaseModel): + """Sanitized `Browser.cancelDownload` arguments. + + Canonical input: `Browser.cancelDownload` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + download_guid: str + """Opaque identifier of the download that was cancelled. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + method: Literal["Browser.cancelDownload"] + + browser_context_id: Optional[str] = None + """Opaque browser context identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpBrowserCloseCommandData(BaseModel): + """Sanitized `Browser.close` arguments. + + Canonical input: `Browser.close` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Browser.close"] + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +class DataBrowserCdpBrowserSetWindowBoundsCommandData(BaseModel): + """Sanitized `Browser.setWindowBounds` arguments. + + Canonical input: `Browser.setWindowBounds` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Browser.setWindowBounds"] + + window_id: int + """Browser window identifier.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + height: Optional[int] = None + """Window height in DIP.""" + + left: Optional[int] = None + """Window x position in screen coordinates.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + top: Optional[int] = None + """Window y position in screen coordinates.""" + + width: Optional[int] = None + """Window width in DIP.""" + + window_state: Optional[Literal["normal", "minimized", "maximized", "fullscreen", "other"]] = None + """Window state requested (`normal`, `minimized`, `maximized`, `fullscreen`). + + A value the protocol does not define is reported as `other`. + """ + + +class DataBrowserCdpBrowserSetContentsSizeCommandData(BaseModel): + """Sanitized `Browser.setContentsSize` arguments. + + Canonical input: `Browser.setContentsSize` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + method: Literal["Browser.setContentsSize"] + + window_id: int + """Browser window identifier.""" + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + height: Optional[int] = None + """Contents height in DIP.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + width: Optional[int] = None + """Contents width in DIP.""" + + +class DataBrowserCdpAutofillTriggerCommandData(BaseModel): + """Sanitized `Autofill.trigger` arguments. + + Canonical input: `Autofill.trigger` in devtools-protocol@2d019e73, pinned at https://github.com/ChromeDevTools/devtools-protocol/blob/2d019e73eb371d1d6985d26d395d78bd8f8a22ba/json/browser_protocol.json. Every argument of this command has a retained or redacted decision in lib/devtoolsproxy/testdata/cdp_arguments.yaml. + """ + + field_id: int + """Opaque backend node identifier of the field that was autofilled.""" + + method: Literal["Autofill.trigger"] + + address_field_count: Optional[int] = None + """Number of address fields the command filled. + + Their names and values are never captured. + """ + + command_id: Optional[int] = None + """ + The command's JSON-RPC id, so the command can be joined to the result the + browser returned for it. Absent when the client sent none. + """ + + connection_id: Optional[str] = None + """ + Identifies the CDP proxy connection the command arrived on, matching + `cdp_connect` and `cdp_disconnect`. Two clients driving the same browser are + told apart by this. + """ + + frame_id: Optional[str] = None + """Opaque frame identifier. + + Clipped to 128 characters; a longer value is not a real identifier. + """ + + mode: Optional[Literal["card", "address"]] = None + """What was filled: `card` or `address`. The values themselves are never captured.""" + + session_id: Optional[str] = None + """CDP session identifier the command was addressed to. + + Absent for browser-level commands. Clipped to 128 characters. + """ + + +Data: TypeAlias = Annotated[ + Union[ + DataBrowserCdpInputDispatchMouseEventCommandData, + DataBrowserCdpInputDispatchKeyEventCommandData, + DataBrowserCdpInputInsertTextCommandData, + DataBrowserCdpInputImeSetCompositionCommandData, + DataBrowserCdpInputDispatchTouchEventCommandData, + DataBrowserCdpInputDispatchDragEventCommandData, + DataBrowserCdpInputCancelDraggingCommandData, + DataBrowserCdpInputEmulateTouchFromMouseEventCommandData, + DataBrowserCdpInputSynthesizePinchGestureCommandData, + DataBrowserCdpInputSynthesizeScrollGestureCommandData, + DataBrowserCdpInputSynthesizeTapGestureCommandData, + DataBrowserCdpDomSetFileInputFilesCommandData, + DataBrowserCdpDomFocusCommandData, + DataBrowserCdpDomScrollIntoViewIfNeededCommandData, + DataBrowserCdpPageBringToFrontCommandData, + DataBrowserCdpPageCaptureScreenshotCommandData, + DataBrowserCdpPageCaptureSnapshotCommandData, + DataBrowserCdpPageHandleJavaScriptDialogCommandData, + DataBrowserCdpPageNavigateCommandData, + DataBrowserCdpPageNavigateToHistoryEntryCommandData, + DataBrowserCdpPageReloadCommandData, + DataBrowserCdpPagePrintToPdfCommandData, + DataBrowserCdpPageStartScreencastCommandData, + DataBrowserCdpPageStopScreencastCommandData, + DataBrowserCdpPageStopLoadingCommandData, + DataBrowserCdpPageCloseCommandData, + DataBrowserCdpPageSetWebLifecycleStateCommandData, + DataBrowserCdpTargetActivateTargetCommandData, + DataBrowserCdpTargetCloseTargetCommandData, + DataBrowserCdpTargetCreateTargetCommandData, + DataBrowserCdpTargetCreateBrowserContextCommandData, + DataBrowserCdpTargetDisposeBrowserContextCommandData, + DataBrowserCdpTargetOpenDevToolsCommandData, + DataBrowserCdpBrowserCancelDownloadCommandData, + DataBrowserCdpBrowserCloseCommandData, + DataBrowserCdpBrowserSetWindowBoundsCommandData, + DataBrowserCdpBrowserSetContentsSizeCommandData, + DataBrowserCdpAutofillTriggerCommandData, + ], + PropertyInfo(discriminator="method"), +] + + +class BrowserCdpCommandEvent(BaseModel): + """ + A browser-control command a client sent over the CDP WebSocket proxy: input gestures, navigation, dialog handling, file selection and screenshots. Configuration commands and the DOM/Runtime traffic a client library issues on the caller's behalf are not reported. + One event per browser-control command that reached the browser. The command stream is not sampled, coalesced or reordered. An event is lost only when the method is excluded by telemetry configuration, when the command's arguments do not decode, or when classification cannot keep up. Exclusions are counted in `cdp_disconnect.telemetry_excluded`; the rest in `cdp_disconnect.telemetry_dropped`. + """ + + category: Literal["control"] + + data: Data + """Per-command payload for `cdp_command` events, discriminated by `method`. + + Each variant carries only the arguments approved for that command: values that + could hold a secret — typed and composition text, URLs, referrers, scripts, + templates, file paths, drag contents and autofill values — are replaced by a + length, a count, a presence flag, an enum or a URL scheme and host. + """ + + source: BrowserEventSource + """Provenance metadata identifying which producer emitted the event.""" + + ts: int + """Event timestamp in Unix microseconds.""" + + type: Literal["cdp_command"] + + truncated: Optional[bool] = None + """True if the data field was truncated due to size limits.""" diff --git a/src/kernel/types/browsers/browser_cdp_command_method.py b/src/kernel/types/browsers/browser_cdp_command_method.py new file mode 100644 index 00000000..18ccbb96 --- /dev/null +++ b/src/kernel/types/browsers/browser_cdp_command_method.py @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal, TypeAlias + +__all__ = ["BrowserCdpCommandMethod"] + +BrowserCdpCommandMethod: TypeAlias = Literal[ + "Input.dispatchMouseEvent", + "Input.dispatchKeyEvent", + "Input.insertText", + "Input.imeSetComposition", + "Input.dispatchTouchEvent", + "Input.dispatchDragEvent", + "Input.cancelDragging", + "Input.emulateTouchFromMouseEvent", + "Input.synthesizePinchGesture", + "Input.synthesizeScrollGesture", + "Input.synthesizeTapGesture", + "DOM.setFileInputFiles", + "DOM.focus", + "DOM.scrollIntoViewIfNeeded", + "Page.bringToFront", + "Page.captureScreenshot", + "Page.captureSnapshot", + "Page.handleJavaScriptDialog", + "Page.navigate", + "Page.navigateToHistoryEntry", + "Page.reload", + "Page.printToPDF", + "Page.startScreencast", + "Page.stopScreencast", + "Page.stopLoading", + "Page.close", + "Page.setWebLifecycleState", + "Target.activateTarget", + "Target.closeTarget", + "Target.createTarget", + "Target.createBrowserContext", + "Target.disposeBrowserContext", + "Target.openDevTools", + "Browser.cancelDownload", + "Browser.close", + "Browser.setWindowBounds", + "Browser.setContentsSize", + "Autofill.trigger", +] diff --git a/src/kernel/types/browsers/browser_cdp_connect_event.py b/src/kernel/types/browsers/browser_cdp_connect_event.py index ebbc7fa3..042ab131 100644 --- a/src/kernel/types/browsers/browser_cdp_connect_event.py +++ b/src/kernel/types/browsers/browser_cdp_connect_event.py @@ -6,7 +6,16 @@ from ..._models import BaseModel from .browser_event_source import BrowserEventSource -__all__ = ["BrowserCdpConnectEvent"] +__all__ = ["BrowserCdpConnectEvent", "Data"] + + +class Data(BaseModel): + connection_id: Optional[str] = None + """ + Identifies this CDP proxy connection, matching the connection_id on the + cdp_command events that arrived on it. Two clients driving the same browser are + told apart by this. + """ class BrowserCdpConnectEvent(BaseModel): @@ -25,5 +34,7 @@ class BrowserCdpConnectEvent(BaseModel): type: Literal["cdp_connect"] + data: Optional[Data] = None + truncated: Optional[bool] = None """True if the data field was truncated due to size limits.""" diff --git a/src/kernel/types/browsers/browser_cdp_disconnect_event.py b/src/kernel/types/browsers/browser_cdp_disconnect_event.py index d9260ebc..5ec69172 100644 --- a/src/kernel/types/browsers/browser_cdp_disconnect_event.py +++ b/src/kernel/types/browsers/browser_cdp_disconnect_event.py @@ -26,6 +26,30 @@ class Data(BaseModel): shutdown). """ + connection_id: Optional[str] = None + """ + Identifies this CDP proxy connection, matching the connection_id on the + cdp_command events that arrived on it. Two clients driving the same browser are + told apart by this. + """ + + telemetry_dropped: Optional[int] = None + """ + Number of forwarded client frames the classifier never saw, because it could not + keep up or because classification failed. An upper bound on lost commands rather + than a count: a saturated queue turns away whatever arrives next, which may be + library traffic that would have produced no event. Telemetry loss only; every + command was still relayed to the browser. Absent on events from a browser image + predating the field, which is not the same as zero. + """ + + telemetry_excluded: Optional[int] = None + """ + Number of forwarded client commands that produced no cdp_command event because + their method is listed in control.cdp.excluded_methods. Configuration rather + than loss, so it is counted apart from telemetry_dropped. + """ + class BrowserCdpDisconnectEvent(BaseModel): """An external client disconnected from the CDP WebSocket proxy on this VM. diff --git a/src/kernel/types/browsers/browser_page_crashed_event.py b/src/kernel/types/browsers/browser_page_crashed_event.py new file mode 100644 index 00000000..46e84f32 --- /dev/null +++ b/src/kernel/types/browsers/browser_page_crashed_event.py @@ -0,0 +1,41 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .browser_event_source import BrowserEventSource + +__all__ = ["BrowserPageCrashedEvent", "Data"] + + +class Data(BaseModel): + target_id: str + """CDP target identifier of the crashed page.""" + + target_type: Literal["page", "background_page", "service_worker", "shared_worker", "other"] + """CDP target type of the page that produced the event.""" + + url: str + """URL the page was on when its renderer process crashed.""" + + +class BrowserPageCrashedEvent(BaseModel): + """ + A page's renderer process crashed (an "Aw, Snap!" failure) while the browser process itself stayed alive. Reported on the crashed page's session, with the session and target ids on `source.metadata`. Captured only while the `page` category is enabled. + """ + + category: Literal["page"] + + source: BrowserEventSource + """Provenance metadata identifying which producer emitted the event.""" + + ts: int + """Event timestamp in Unix microseconds.""" + + type: Literal["page_crashed"] + + data: Optional[Data] = None + + truncated: Optional[bool] = None + """True if the data field was truncated due to size limits.""" diff --git a/src/kernel/types/browsers/browser_platform_api_call_event.py b/src/kernel/types/browsers/browser_platform_api_call_event.py new file mode 100644 index 00000000..f6e78b3b --- /dev/null +++ b/src/kernel/types/browsers/browser_platform_api_call_event.py @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from .browser_event_source import BrowserEventSource + +__all__ = ["BrowserPlatformAPICallEvent", "Data"] + + +class Data(BaseModel): + duration_ms: float + """Wall-clock duration of the handler in milliseconds.""" + + operation_id: str + """Matched route's operation, named as the in-VM API names its handler (e.g. + + ProcessExec, StartRecording). + """ + + request_id: str + """Per-request identifier from the in-VM API request middleware.""" + + status: int + """HTTP response status code.""" + + +class BrowserPlatformAPICallEvent(BaseModel): + """ + An HTTP call that manages the browser VM rather than driving the browser, handled by the in-VM API server — recording lifecycle, filesystem and process management, telemetry and browser configuration. Mostly platform-induced (e.g. profile save, replay capture) rather than agent actions. + """ + + category: Literal["platform"] + + source: BrowserEventSource + """Provenance metadata identifying which producer emitted the event.""" + + ts: int + """Event timestamp in Unix microseconds.""" + + type: Literal["platform_api_call"] + + data: Optional[Data] = None + + truncated: Optional[bool] = None + """True if the data field was truncated due to size limits.""" diff --git a/src/kernel/types/browsers/browser_telemetry_categories_config.py b/src/kernel/types/browsers/browser_telemetry_categories_config.py index b89ff17b..8b1f811a 100644 --- a/src/kernel/types/browsers/browser_telemetry_categories_config.py +++ b/src/kernel/types/browsers/browser_telemetry_categories_config.py @@ -3,6 +3,7 @@ from typing import Optional from ..._models import BaseModel +from .browser_telemetry_control_config import BrowserTelemetryControlConfig from .browser_telemetry_category_config import BrowserTelemetryCategoryConfig __all__ = ["BrowserTelemetryCategoriesConfig"] @@ -11,7 +12,7 @@ class BrowserTelemetryCategoriesConfig(BaseModel): """Per-category telemetry capture settings layered onto the default set. - The operational signals (control, connection, system, captcha) are on by default and are opt-out: set one to enabled=false to stop capturing it. The CDP categories (console, network, page, interaction) and screenshot are off by default and are opt-in: set enabled=true to capture them. + The operational signals (control, connection, system, captcha) are on by default and are opt-out: set one to enabled=false to stop capturing it. The CDP categories (console, network, page, interaction), screenshot and platform are off by default and are opt-in: set enabled=true to capture them. """ captcha: Optional[BrowserTelemetryCategoryConfig] = None @@ -26,11 +27,11 @@ class BrowserTelemetryCategoriesConfig(BaseModel): CDP category; off by default. """ - control: Optional[BrowserTelemetryCategoryConfig] = None - """Agent-driven actions against the browser, such as inbound calls to the in-VM - API. - - On by default. + control: Optional[BrowserTelemetryControlConfig] = None + """ + Agent-driven actions against the browser — computer-control calls, Playwright + code execution, screenshots, clipboard access, and browser-control commands sent + over the CDP proxy. On by default. """ interaction: Optional[BrowserTelemetryCategoryConfig] = None @@ -54,6 +55,13 @@ class BrowserTelemetryCategoriesConfig(BaseModel): shifts, and LCP. CDP category; off by default. """ + platform: Optional[BrowserTelemetryCategoryConfig] = None + """ + In-VM API calls that manage the browser VM rather than drive the browser + (recording, filesystem, process, telemetry and browser configuration). Mostly + platform-induced; off by default and must be opted into. + """ + screenshot: Optional[BrowserTelemetryCategoryConfig] = None """Periodic base64-encoded viewport screenshots. diff --git a/src/kernel/types/browsers/browser_telemetry_categories_config_param.py b/src/kernel/types/browsers/browser_telemetry_categories_config_param.py index add32385..e707230f 100644 --- a/src/kernel/types/browsers/browser_telemetry_categories_config_param.py +++ b/src/kernel/types/browsers/browser_telemetry_categories_config_param.py @@ -4,6 +4,7 @@ from typing_extensions import TypedDict +from .browser_telemetry_control_config_param import BrowserTelemetryControlConfigParam from .browser_telemetry_category_config_param import BrowserTelemetryCategoryConfigParam __all__ = ["BrowserTelemetryCategoriesConfigParam"] @@ -12,7 +13,7 @@ class BrowserTelemetryCategoriesConfigParam(TypedDict, total=False): """Per-category telemetry capture settings layered onto the default set. - The operational signals (control, connection, system, captcha) are on by default and are opt-out: set one to enabled=false to stop capturing it. The CDP categories (console, network, page, interaction) and screenshot are off by default and are opt-in: set enabled=true to capture them. + The operational signals (control, connection, system, captcha) are on by default and are opt-out: set one to enabled=false to stop capturing it. The CDP categories (console, network, page, interaction), screenshot and platform are off by default and are opt-in: set enabled=true to capture them. """ captcha: BrowserTelemetryCategoryConfigParam @@ -27,11 +28,11 @@ class BrowserTelemetryCategoriesConfigParam(TypedDict, total=False): CDP category; off by default. """ - control: BrowserTelemetryCategoryConfigParam - """Agent-driven actions against the browser, such as inbound calls to the in-VM - API. - - On by default. + control: BrowserTelemetryControlConfigParam + """ + Agent-driven actions against the browser — computer-control calls, Playwright + code execution, screenshots, clipboard access, and browser-control commands sent + over the CDP proxy. On by default. """ interaction: BrowserTelemetryCategoryConfigParam @@ -55,6 +56,13 @@ class BrowserTelemetryCategoriesConfigParam(TypedDict, total=False): shifts, and LCP. CDP category; off by default. """ + platform: BrowserTelemetryCategoryConfigParam + """ + In-VM API calls that manage the browser VM rather than drive the browser + (recording, filesystem, process, telemetry and browser configuration). Mostly + platform-induced; off by default and must be opted into. + """ + screenshot: BrowserTelemetryCategoryConfigParam """Periodic base64-encoded viewport screenshots. diff --git a/src/kernel/types/browsers/browser_telemetry_category_config.py b/src/kernel/types/browsers/browser_telemetry_category_config.py index f63c02f4..1a64f7d6 100644 --- a/src/kernel/types/browsers/browser_telemetry_category_config.py +++ b/src/kernel/types/browsers/browser_telemetry_category_config.py @@ -14,6 +14,6 @@ class BrowserTelemetryCategoryConfig(BaseModel): """Whether this category is captured. Operational categories (control, connection, system, captcha) default to true; - set false to opt out. CDP categories (console, network, page, interaction) and - screenshot default to false; set true to opt in. + set false to opt out. CDP categories (console, network, page, interaction), + screenshot and platform default to false; set true to opt in. """ diff --git a/src/kernel/types/browsers/browser_telemetry_category_config_param.py b/src/kernel/types/browsers/browser_telemetry_category_config_param.py index 09dbe418..27f08538 100644 --- a/src/kernel/types/browsers/browser_telemetry_category_config_param.py +++ b/src/kernel/types/browsers/browser_telemetry_category_config_param.py @@ -14,6 +14,6 @@ class BrowserTelemetryCategoryConfigParam(TypedDict, total=False): """Whether this category is captured. Operational categories (control, connection, system, captcha) default to true; - set false to opt out. CDP categories (console, network, page, interaction) and - screenshot default to false; set true to opt in. + set false to opt out. CDP categories (console, network, page, interaction), + screenshot and platform default to false; set true to opt in. """ diff --git a/src/kernel/types/browsers/browser_telemetry_cdp_control_config.py b/src/kernel/types/browsers/browser_telemetry_cdp_control_config.py new file mode 100644 index 00000000..fe425713 --- /dev/null +++ b/src/kernel/types/browsers/browser_telemetry_cdp_control_config.py @@ -0,0 +1,24 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from ..._models import BaseModel +from .browser_cdp_command_method import BrowserCdpCommandMethod + +__all__ = ["BrowserTelemetryCdpControlConfig"] + + +class BrowserTelemetryCdpControlConfig(BaseModel): + """Settings for the cdp_command events the CDP proxy reports.""" + + excluded_methods: Optional[List[BrowserCdpCommandMethod]] = None + """Methods to leave out of the cdp_command stream. + + Omit the list to keep the current one; send an empty list to report every + supported method again. Exclusion is a telemetry setting only: an excluded + command is still relayed to the browser unchanged, it simply produces no event. + Use it to drop the highest-volume methods — Input.dispatchMouseEvent during a + humanized cursor path, or Page.captureScreenshot under a screencast — without + turning the whole category off. Excluded commands are counted in + cdp_disconnect.telemetry_excluded. + """ diff --git a/src/kernel/types/browsers/browser_telemetry_cdp_control_config_param.py b/src/kernel/types/browsers/browser_telemetry_cdp_control_config_param.py new file mode 100644 index 00000000..300e9b60 --- /dev/null +++ b/src/kernel/types/browsers/browser_telemetry_cdp_control_config_param.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import TypedDict + +from .browser_cdp_command_method import BrowserCdpCommandMethod + +__all__ = ["BrowserTelemetryCdpControlConfigParam"] + + +class BrowserTelemetryCdpControlConfigParam(TypedDict, total=False): + """Settings for the cdp_command events the CDP proxy reports.""" + + excluded_methods: List[BrowserCdpCommandMethod] + """Methods to leave out of the cdp_command stream. + + Omit the list to keep the current one; send an empty list to report every + supported method again. Exclusion is a telemetry setting only: an excluded + command is still relayed to the browser unchanged, it simply produces no event. + Use it to drop the highest-volume methods — Input.dispatchMouseEvent during a + humanized cursor path, or Page.captureScreenshot under a screencast — without + turning the whole category off. Excluded commands are counted in + cdp_disconnect.telemetry_excluded. + """ diff --git a/src/kernel/types/browsers/browser_telemetry_control_config.py b/src/kernel/types/browsers/browser_telemetry_control_config.py new file mode 100644 index 00000000..7a8dfbb3 --- /dev/null +++ b/src/kernel/types/browsers/browser_telemetry_control_config.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel +from .browser_telemetry_cdp_control_config import BrowserTelemetryCdpControlConfig + +__all__ = ["BrowserTelemetryControlConfig"] + + +class BrowserTelemetryControlConfig(BaseModel): + """Configuration for the control category. + + Same enabled semantics as any other category, plus settings for the browser-control commands the CDP proxy reports. + """ + + cdp: Optional[BrowserTelemetryCdpControlConfig] = None + """Settings for the cdp_command events the CDP proxy reports. + + Merged independently of enabled, so a later update that only sets enabled keeps + the current exclusion list. + """ + + enabled: Optional[bool] = None + """Whether this category is captured. + + Control is on by default; set false to opt out. + """ diff --git a/src/kernel/types/browsers/browser_telemetry_control_config_param.py b/src/kernel/types/browsers/browser_telemetry_control_config_param.py new file mode 100644 index 00000000..e5afaea5 --- /dev/null +++ b/src/kernel/types/browsers/browser_telemetry_control_config_param.py @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +from .browser_telemetry_cdp_control_config_param import BrowserTelemetryCdpControlConfigParam + +__all__ = ["BrowserTelemetryControlConfigParam"] + + +class BrowserTelemetryControlConfigParam(TypedDict, total=False): + """Configuration for the control category. + + Same enabled semantics as any other category, plus settings for the browser-control commands the CDP proxy reports. + """ + + cdp: BrowserTelemetryCdpControlConfigParam + """Settings for the cdp_command events the CDP proxy reports. + + Merged independently of enabled, so a later update that only sets enabled keeps + the current exclusion list. + """ + + enabled: bool + """Whether this category is captured. + + Control is on by default; set false to opt out. + """ diff --git a/src/kernel/types/browsers/browser_telemetry_event.py b/src/kernel/types/browsers/browser_telemetry_event.py index d57b92d2..2ce872f4 100644 --- a/src/kernel/types/browsers/browser_telemetry_event.py +++ b/src/kernel/types/browsers/browser_telemetry_event.py @@ -9,10 +9,12 @@ from .browser_api_call_event import BrowserAPICallEvent from .browser_page_lcp_event import BrowserPageLcpEvent from .browser_page_load_event import BrowserPageLoadEvent +from .browser_cdp_command_event import BrowserCdpCommandEvent from .browser_cdp_connect_event import BrowserCdpConnectEvent from .browser_console_log_event import BrowserConsoleLogEvent from .browser_proxy_error_event import BrowserProxyErrorEvent from .browser_network_idle_event import BrowserNetworkIdleEvent +from .browser_page_crashed_event import BrowserPageCrashedEvent from .browser_console_error_event import BrowserConsoleErrorEvent from .browser_cdp_disconnect_event import BrowserCdpDisconnectEvent from .browser_interaction_key_event import BrowserInteractionKeyEvent @@ -25,6 +27,7 @@ from .browser_interaction_click_event import BrowserInteractionClickEvent from .browser_live_view_connect_event import BrowserLiveViewConnectEvent from .browser_page_layout_shift_event import BrowserPageLayoutShiftEvent +from .browser_platform_api_call_event import BrowserPlatformAPICallEvent from .browser_monitor_screenshot_event import BrowserMonitorScreenshotEvent from .browser_monitor_init_failed_event import BrowserMonitorInitFailedEvent from .browser_monitor_reconnected_event import BrowserMonitorReconnectedEvent @@ -53,6 +56,7 @@ BrowserPageDomContentLoadedEvent, BrowserPageLoadEvent, BrowserPageTabOpenedEvent, + BrowserPageCrashedEvent, BrowserPageLayoutShiftEvent, BrowserPageLcpEvent, BrowserPageLayoutSettledEvent, @@ -66,6 +70,8 @@ BrowserMonitorReconnectFailedEvent, BrowserMonitorInitFailedEvent, BrowserAPICallEvent, + BrowserPlatformAPICallEvent, + BrowserCdpCommandEvent, BrowserCdpConnectEvent, BrowserCdpDisconnectEvent, BrowserLiveViewConnectEvent, diff --git a/src/kernel/types/browsers/telemetry_events_params.py b/src/kernel/types/browsers/telemetry_events_params.py index 4aa0f13c..ec385bb5 100644 --- a/src/kernel/types/browsers/telemetry_events_params.py +++ b/src/kernel/types/browsers/telemetry_events_params.py @@ -16,6 +16,7 @@ class TelemetryEventsParams(TypedDict, total=False): "page", "interaction", "control", + "platform", "connection", "system", "screenshot", diff --git a/tests/api_resources/auth/test_connections.py b/tests/api_resources/auth/test_connections.py index f3d4a05c..4dff13ee 100644 --- a/tests/api_resources/auth/test_connections.py +++ b/tests/api_resources/auth/test_connections.py @@ -52,10 +52,14 @@ def test_method_create_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -76,10 +80,14 @@ def test_method_create_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -209,10 +217,14 @@ def test_method_update_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -233,10 +245,14 @@ def test_method_update_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -451,10 +467,14 @@ def test_method_login_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -475,10 +495,14 @@ def test_method_login_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -687,10 +711,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -711,10 +739,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -844,10 +876,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -868,10 +904,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -1086,10 +1126,14 @@ async def test_method_login_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -1110,10 +1154,14 @@ async def test_method_login_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, diff --git a/tests/api_resources/test_browser_pools.py b/tests/api_resources/test_browser_pools.py index e411df27..1f541959 100644 --- a/tests/api_resources/test_browser_pools.py +++ b/tests/api_resources/test_browser_pools.py @@ -60,10 +60,14 @@ def test_method_create_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -195,10 +199,14 @@ def test_method_update_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -372,10 +380,14 @@ def test_method_acquire_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -570,10 +582,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -705,10 +721,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -882,10 +902,14 @@ async def test_method_acquire_with_all_params(self, async_client: AsyncKernel) - "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, diff --git a/tests/api_resources/test_browsers.py b/tests/api_resources/test_browsers.py index 1a352038..55a7e66f 100644 --- a/tests/api_resources/test_browsers.py +++ b/tests/api_resources/test_browsers.py @@ -71,10 +71,14 @@ def test_method_create_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -206,10 +210,14 @@ def test_method_update_with_all_params(self, client: Kernel) -> None: "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -530,10 +538,14 @@ async def test_method_create_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, @@ -665,10 +677,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncKernel) -> "captcha": {"enabled": True}, "connection": {"enabled": True}, "console": {"enabled": True}, - "control": {"enabled": True}, + "control": { + "cdp": {"excluded_methods": ["Input.dispatchMouseEvent"]}, + "enabled": True, + }, "interaction": {"enabled": True}, "network": {"enabled": True}, "page": {"enabled": True}, + "platform": {"enabled": True}, "screenshot": {"enabled": True}, "system": {"enabled": True}, }, From ec54d958465653ee30c092a25947fe92e98abe1a Mon Sep 17 00:00:00 2001 From: "kernel-internal[bot]" <260533166+kernel-internal[bot]@users.noreply.github.com> Date: Fri, 21 Aug 2026 15:18:12 +0000 Subject: [PATCH 2/2] release: 0.94.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ pyproject.toml | 2 +- src/kernel/_version.py | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c486f6de..91393ed8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.93.0" + ".": "0.94.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1283a424..af7b2b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.94.0](https://github.com/kernel/kernel-python-sdk/compare/v0.93.0...v0.94.0) (2026-08-21) + + +### Features + +* Mirror the control/platform telemetry split into the public API ([17c38fa](https://github.com/kernel/kernel-python-sdk/commit/17c38fa6c7668a7e2bb1f058d57053d83238263a)) + ## [0.93.0](https://github.com/kernel/kernel-python-sdk/compare/v0.92.0...v0.93.0) (2026-08-19) diff --git a/pyproject.toml b/pyproject.toml index 8f8dab0e..420e8de4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "kernel" -version = "0.93.0" +version = "0.94.0" description = "The official Python library for the kernel API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/kernel/_version.py b/src/kernel/_version.py index 2fb26cce..54fa859a 100644 --- a/src/kernel/_version.py +++ b/src/kernel/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "kernel" -__version__ = "0.93.0" # x-release-please-version +__version__ = "0.94.0" # x-release-please-version