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/.stats.yml b/.stats.yml
index f9d1086b..2aae27b8 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1 +1 @@
-configured_endpoints: 140
+configured_endpoints: 145
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1283a424..ccd152aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## [0.94.0](https://github.com/kernel/kernel-python-sdk/compare/v0.93.0...v0.94.0) (2026-08-24)
+
+
+### Features
+
+* Mirror the control/platform telemetry split into the public API ([27c5a0a](https://github.com/kernel/kernel-python-sdk/commit/27c5a0a75ade568f1feb7e058070771ae1f6db60))
+* site configs: report proxy-restricted analyses ([7afcfc4](https://github.com/kernel/kernel-python-sdk/commit/7afcfc499d7008407c872d75bcc4d8a1604f7954))
+
## [0.93.0](https://github.com/kernel/kernel-python-sdk/compare/v0.92.0...v0.93.0) (2026-08-19)
diff --git a/api.md b/api.md
index 6f8c4256..60493a41 100644
--- a/api.md
+++ b/api.md
@@ -74,6 +74,37 @@ Methods:
- client.invocations.follow(id, \*\*params) -> InvocationFollowResponse
- client.invocations.list_browsers(id) -> InvocationListBrowsersResponse
+# SiteConfigs
+
+Types:
+
+```python
+from kernel.types import (
+ Analysis,
+ AnalysisSummary,
+ Browser,
+ Evidence,
+ LookupRequest,
+ LookupResponse,
+ NoRecommendation,
+ Proxy,
+ Recommendation,
+ RecommendationResult,
+ RecommendationSummary,
+ ResolveRequest,
+ SiteConfigResponse,
+ Target,
+)
+```
+
+Methods:
+
+- client.site_configs.retrieve(id) -> SiteConfigResponse
+- client.site_configs.list(\*\*params) -> SyncOffsetPagination[AnalysisSummary]
+- client.site_configs.list_recommendations(\*\*params) -> SyncOffsetPagination[RecommendationSummary]
+- client.site_configs.lookup(\*\*params) -> LookupResponse
+- client.site_configs.resolve(\*\*params) -> SiteConfigResponse
+
# Browsers
Types:
@@ -117,6 +148,8 @@ from kernel.types.browsers import (
BrowserAPICallEvent,
BrowserCallStack,
BrowserCaptchaSolveResultEvent,
+ BrowserCdpCommandEvent,
+ BrowserCdpCommandMethod,
BrowserCdpConnectEvent,
BrowserCdpDisconnectEvent,
BrowserConsoleErrorEvent,
@@ -138,6 +171,7 @@ from kernel.types.browsers import (
BrowserNetworkLoadingFailedEvent,
BrowserNetworkRequestEvent,
BrowserNetworkResponseEvent,
+ BrowserPageCrashedEvent,
BrowserPageDomContentLoadedEvent,
BrowserPageLayoutSettledEvent,
BrowserPageLayoutShiftEvent,
@@ -146,12 +180,15 @@ from kernel.types.browsers import (
BrowserPageNavigationEvent,
BrowserPageNavigationSettledEvent,
BrowserPageTabOpenedEvent,
+ BrowserPlatformAPICallEvent,
BrowserProxyErrorEvent,
BrowserServiceCrashedEvent,
BrowserSystemOomKillEvent,
BrowserTelemetryCategoriesConfig,
BrowserTelemetryCategoryConfig,
+ BrowserTelemetryCdpControlConfig,
BrowserTelemetryConfig,
+ BrowserTelemetryControlConfig,
BrowserTelemetryEvent,
BrowserTelemetryExportConfig,
BrowserTelemetryOtlpExportConfig,
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/_client.py b/src/kernel/_client.py
index 9a040e34..d96b5804 100644
--- a/src/kernel/_client.py
+++ b/src/kernel/_client.py
@@ -62,6 +62,7 @@
deployments,
invocations,
organization,
+ site_configs,
browser_pools,
credential_providers,
)
@@ -74,6 +75,7 @@
from .resources.credentials import CredentialsResource, AsyncCredentialsResource
from .resources.deployments import DeploymentsResource, AsyncDeploymentsResource
from .resources.invocations import InvocationsResource, AsyncInvocationsResource
+ from .resources.site_configs import SiteConfigsResource, AsyncSiteConfigsResource
from .resources.browser_pools import BrowserPoolsResource, AsyncBrowserPoolsResource
from .resources.browsers.browsers import BrowsersResource, AsyncBrowsersResource
from .resources.projects.projects import ProjectsResource, AsyncProjectsResource
@@ -223,6 +225,13 @@ def invocations(self) -> InvocationsResource:
return InvocationsResource(self)
+ @cached_property
+ def site_configs(self) -> SiteConfigsResource:
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+ from .resources.site_configs import SiteConfigsResource
+
+ return SiteConfigsResource(self)
+
@cached_property
def browsers(self) -> BrowsersResource:
"""Create and manage browser sessions."""
@@ -599,6 +608,13 @@ def invocations(self) -> AsyncInvocationsResource:
return AsyncInvocationsResource(self)
+ @cached_property
+ def site_configs(self) -> AsyncSiteConfigsResource:
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+ from .resources.site_configs import AsyncSiteConfigsResource
+
+ return AsyncSiteConfigsResource(self)
+
@cached_property
def browsers(self) -> AsyncBrowsersResource:
"""Create and manage browser sessions."""
@@ -879,6 +895,13 @@ def invocations(self) -> invocations.InvocationsResourceWithRawResponse:
return InvocationsResourceWithRawResponse(self._client.invocations)
+ @cached_property
+ def site_configs(self) -> site_configs.SiteConfigsResourceWithRawResponse:
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+ from .resources.site_configs import SiteConfigsResourceWithRawResponse
+
+ return SiteConfigsResourceWithRawResponse(self._client.site_configs)
+
@cached_property
def browsers(self) -> browsers.BrowsersResourceWithRawResponse:
"""Create and manage browser sessions."""
@@ -999,6 +1022,13 @@ def invocations(self) -> invocations.AsyncInvocationsResourceWithRawResponse:
return AsyncInvocationsResourceWithRawResponse(self._client.invocations)
+ @cached_property
+ def site_configs(self) -> site_configs.AsyncSiteConfigsResourceWithRawResponse:
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+ from .resources.site_configs import AsyncSiteConfigsResourceWithRawResponse
+
+ return AsyncSiteConfigsResourceWithRawResponse(self._client.site_configs)
+
@cached_property
def browsers(self) -> browsers.AsyncBrowsersResourceWithRawResponse:
"""Create and manage browser sessions."""
@@ -1119,6 +1149,13 @@ def invocations(self) -> invocations.InvocationsResourceWithStreamingResponse:
return InvocationsResourceWithStreamingResponse(self._client.invocations)
+ @cached_property
+ def site_configs(self) -> site_configs.SiteConfigsResourceWithStreamingResponse:
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+ from .resources.site_configs import SiteConfigsResourceWithStreamingResponse
+
+ return SiteConfigsResourceWithStreamingResponse(self._client.site_configs)
+
@cached_property
def browsers(self) -> browsers.BrowsersResourceWithStreamingResponse:
"""Create and manage browser sessions."""
@@ -1239,6 +1276,13 @@ def invocations(self) -> invocations.AsyncInvocationsResourceWithStreamingRespon
return AsyncInvocationsResourceWithStreamingResponse(self._client.invocations)
+ @cached_property
+ def site_configs(self) -> site_configs.AsyncSiteConfigsResourceWithStreamingResponse:
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+ from .resources.site_configs import AsyncSiteConfigsResourceWithStreamingResponse
+
+ return AsyncSiteConfigsResourceWithStreamingResponse(self._client.site_configs)
+
@cached_property
def browsers(self) -> browsers.AsyncBrowsersResourceWithStreamingResponse:
"""Create and manage browser sessions."""
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
diff --git a/src/kernel/resources/__init__.py b/src/kernel/resources/__init__.py
index 10f1a88b..2ec29c9c 100644
--- a/src/kernel/resources/__init__.py
+++ b/src/kernel/resources/__init__.py
@@ -112,6 +112,14 @@
OrganizationResourceWithStreamingResponse,
AsyncOrganizationResourceWithStreamingResponse,
)
+from .site_configs import (
+ SiteConfigsResource,
+ AsyncSiteConfigsResource,
+ SiteConfigsResourceWithRawResponse,
+ AsyncSiteConfigsResourceWithRawResponse,
+ SiteConfigsResourceWithStreamingResponse,
+ AsyncSiteConfigsResourceWithStreamingResponse,
+)
from .browser_pools import (
BrowserPoolsResource,
AsyncBrowserPoolsResource,
@@ -148,6 +156,12 @@
"AsyncInvocationsResourceWithRawResponse",
"InvocationsResourceWithStreamingResponse",
"AsyncInvocationsResourceWithStreamingResponse",
+ "SiteConfigsResource",
+ "AsyncSiteConfigsResource",
+ "SiteConfigsResourceWithRawResponse",
+ "AsyncSiteConfigsResourceWithRawResponse",
+ "SiteConfigsResourceWithStreamingResponse",
+ "AsyncSiteConfigsResourceWithStreamingResponse",
"BrowsersResource",
"AsyncBrowsersResource",
"BrowsersResourceWithRawResponse",
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/resources/site_configs.py b/src/kernel/resources/site_configs.py
new file mode 100644
index 00000000..b98a8d80
--- /dev/null
+++ b/src/kernel/resources/site_configs.py
@@ -0,0 +1,596 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal
+
+import httpx
+
+from ..types import (
+ site_config_list_params,
+ site_config_lookup_params,
+ site_config_resolve_params,
+ site_config_list_recommendations_params,
+)
+from .._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
+from .._utils import path_template, maybe_transform, async_maybe_transform
+from .._compat import cached_property
+from .._resource import SyncAPIResource, AsyncAPIResource
+from .._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..pagination import SyncOffsetPagination, AsyncOffsetPagination
+from .._base_client import AsyncPaginator, make_request_options
+from ..types.lookup_response import LookupResponse
+from ..types.analysis_summary import AnalysisSummary
+from ..types.site_config_response import SiteConfigResponse
+from ..types.recommendation_summary import RecommendationSummary
+
+__all__ = ["SiteConfigsResource", "AsyncSiteConfigsResource"]
+
+
+class SiteConfigsResource(SyncAPIResource):
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+
+ @cached_property
+ def with_raw_response(self) -> SiteConfigsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
+ """
+ return SiteConfigsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> SiteConfigsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
+ """
+ return SiteConfigsResourceWithStreamingResponse(self)
+
+ def retrieve(
+ self,
+ id: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SiteConfigResponse:
+ """
+ Returns a project-scoped historical analysis and the recommendation outcome
+ concluded by that run. Later knowledge does not change this response.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._get(
+ path_template("/site-configs/{id}", id=id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SiteConfigResponse,
+ )
+
+ def list(
+ self,
+ *,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SyncOffsetPagination[AnalysisSummary]:
+ """
+ Lists analyses for the selected project, newest first.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get_api_list(
+ "/site-configs",
+ page=SyncOffsetPagination[AnalysisSummary],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "limit": limit,
+ "offset": offset,
+ },
+ site_config_list_params.SiteConfigListParams,
+ ),
+ ),
+ model=AnalysisSummary,
+ )
+
+ def list_recommendations(
+ self,
+ *,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
+ sort_by: Literal["target", "recommended_config", "last_requested_at", "success_rate"] | Omit = omit,
+ sort_order: Literal["asc", "desc"] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SyncOffsetPagination[RecommendationSummary]:
+ """
+ Lists unique domains previously analyzed by the selected project with their
+ current domain-level recommendations.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get_api_list(
+ "/site-configs/recommendations",
+ page=SyncOffsetPagination[RecommendationSummary],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "limit": limit,
+ "offset": offset,
+ "sort_by": sort_by,
+ "sort_order": sort_order,
+ },
+ site_config_list_recommendations_params.SiteConfigListRecommendationsParams,
+ ),
+ ),
+ model=RecommendationSummary,
+ )
+
+ def lookup(
+ self,
+ *,
+ url: str,
+ allowed_proxy_countries: SequenceNotStr[str] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> LookupResponse:
+ """
+ Returns current global knowledge without resolving DNS, creating an analysis, or
+ updating Site Config data.
+
+ Args:
+ url: Public HTTP(S) URL to look up.
+
+ allowed_proxy_countries: ISO 3166 country codes Kernel may use when returning a proxy configuration. When
+ omitted, Kernel uses its default country selection.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/site-configs/lookup",
+ body=maybe_transform(
+ {
+ "url": url,
+ "allowed_proxy_countries": allowed_proxy_countries,
+ },
+ site_config_lookup_params.SiteConfigLookupParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=LookupResponse,
+ )
+
+ def resolve(
+ self,
+ *,
+ url: str,
+ allowed_proxy_countries: SequenceNotStr[str] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SiteConfigResponse:
+ """
+ Explicitly starts or retries a project-scoped background analysis while
+ preserving current global knowledge when available. Use `/site-configs/lookup`
+ for side-effect-free reads.
+
+ Args:
+ url: Public HTTP(S) URL to refresh.
+
+ allowed_proxy_countries: ISO 3166 country codes Kernel may use when searching for or returning a proxy
+ configuration. Kernel may test a subset of allowed countries. When omitted,
+ Kernel uses its default country selection.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._post(
+ "/site-configs/resolve",
+ body=maybe_transform(
+ {
+ "url": url,
+ "allowed_proxy_countries": allowed_proxy_countries,
+ },
+ site_config_resolve_params.SiteConfigResolveParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SiteConfigResponse,
+ )
+
+
+class AsyncSiteConfigsResource(AsyncAPIResource):
+ """Resolve browser and proxy recommendations for bot-protected sites."""
+
+ @cached_property
+ def with_raw_response(self) -> AsyncSiteConfigsResourceWithRawResponse:
+ """
+ This property can be used as a prefix for any HTTP method call to return
+ the raw response object instead of the parsed content.
+
+ For more information, see https://www.github.com/kernel/kernel-python-sdk#accessing-raw-response-data-eg-headers
+ """
+ return AsyncSiteConfigsResourceWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncSiteConfigsResourceWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/kernel/kernel-python-sdk#with_streaming_response
+ """
+ return AsyncSiteConfigsResourceWithStreamingResponse(self)
+
+ async def retrieve(
+ self,
+ id: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SiteConfigResponse:
+ """
+ Returns a project-scoped historical analysis and the recommendation outcome
+ concluded by that run. Later knowledge does not change this response.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._get(
+ path_template("/site-configs/{id}", id=id),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SiteConfigResponse,
+ )
+
+ def list(
+ self,
+ *,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncPaginator[AnalysisSummary, AsyncOffsetPagination[AnalysisSummary]]:
+ """
+ Lists analyses for the selected project, newest first.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get_api_list(
+ "/site-configs",
+ page=AsyncOffsetPagination[AnalysisSummary],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "limit": limit,
+ "offset": offset,
+ },
+ site_config_list_params.SiteConfigListParams,
+ ),
+ ),
+ model=AnalysisSummary,
+ )
+
+ def list_recommendations(
+ self,
+ *,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
+ sort_by: Literal["target", "recommended_config", "last_requested_at", "success_rate"] | Omit = omit,
+ sort_order: Literal["asc", "desc"] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> AsyncPaginator[RecommendationSummary, AsyncOffsetPagination[RecommendationSummary]]:
+ """
+ Lists unique domains previously analyzed by the selected project with their
+ current domain-level recommendations.
+
+ Args:
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return self._get_api_list(
+ "/site-configs/recommendations",
+ page=AsyncOffsetPagination[RecommendationSummary],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "limit": limit,
+ "offset": offset,
+ "sort_by": sort_by,
+ "sort_order": sort_order,
+ },
+ site_config_list_recommendations_params.SiteConfigListRecommendationsParams,
+ ),
+ ),
+ model=RecommendationSummary,
+ )
+
+ async def lookup(
+ self,
+ *,
+ url: str,
+ allowed_proxy_countries: SequenceNotStr[str] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> LookupResponse:
+ """
+ Returns current global knowledge without resolving DNS, creating an analysis, or
+ updating Site Config data.
+
+ Args:
+ url: Public HTTP(S) URL to look up.
+
+ allowed_proxy_countries: ISO 3166 country codes Kernel may use when returning a proxy configuration. When
+ omitted, Kernel uses its default country selection.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/site-configs/lookup",
+ body=await async_maybe_transform(
+ {
+ "url": url,
+ "allowed_proxy_countries": allowed_proxy_countries,
+ },
+ site_config_lookup_params.SiteConfigLookupParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=LookupResponse,
+ )
+
+ async def resolve(
+ self,
+ *,
+ url: str,
+ allowed_proxy_countries: SequenceNotStr[str] | Omit = omit,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> SiteConfigResponse:
+ """
+ Explicitly starts or retries a project-scoped background analysis while
+ preserving current global knowledge when available. Use `/site-configs/lookup`
+ for side-effect-free reads.
+
+ Args:
+ url: Public HTTP(S) URL to refresh.
+
+ allowed_proxy_countries: ISO 3166 country codes Kernel may use when searching for or returning a proxy
+ configuration. Kernel may test a subset of allowed countries. When omitted,
+ Kernel uses its default country selection.
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ return await self._post(
+ "/site-configs/resolve",
+ body=await async_maybe_transform(
+ {
+ "url": url,
+ "allowed_proxy_countries": allowed_proxy_countries,
+ },
+ site_config_resolve_params.SiteConfigResolveParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=SiteConfigResponse,
+ )
+
+
+class SiteConfigsResourceWithRawResponse:
+ def __init__(self, site_configs: SiteConfigsResource) -> None:
+ self._site_configs = site_configs
+
+ self.retrieve = to_raw_response_wrapper(
+ site_configs.retrieve,
+ )
+ self.list = to_raw_response_wrapper(
+ site_configs.list,
+ )
+ self.list_recommendations = to_raw_response_wrapper(
+ site_configs.list_recommendations,
+ )
+ self.lookup = to_raw_response_wrapper(
+ site_configs.lookup,
+ )
+ self.resolve = to_raw_response_wrapper(
+ site_configs.resolve,
+ )
+
+
+class AsyncSiteConfigsResourceWithRawResponse:
+ def __init__(self, site_configs: AsyncSiteConfigsResource) -> None:
+ self._site_configs = site_configs
+
+ self.retrieve = async_to_raw_response_wrapper(
+ site_configs.retrieve,
+ )
+ self.list = async_to_raw_response_wrapper(
+ site_configs.list,
+ )
+ self.list_recommendations = async_to_raw_response_wrapper(
+ site_configs.list_recommendations,
+ )
+ self.lookup = async_to_raw_response_wrapper(
+ site_configs.lookup,
+ )
+ self.resolve = async_to_raw_response_wrapper(
+ site_configs.resolve,
+ )
+
+
+class SiteConfigsResourceWithStreamingResponse:
+ def __init__(self, site_configs: SiteConfigsResource) -> None:
+ self._site_configs = site_configs
+
+ self.retrieve = to_streamed_response_wrapper(
+ site_configs.retrieve,
+ )
+ self.list = to_streamed_response_wrapper(
+ site_configs.list,
+ )
+ self.list_recommendations = to_streamed_response_wrapper(
+ site_configs.list_recommendations,
+ )
+ self.lookup = to_streamed_response_wrapper(
+ site_configs.lookup,
+ )
+ self.resolve = to_streamed_response_wrapper(
+ site_configs.resolve,
+ )
+
+
+class AsyncSiteConfigsResourceWithStreamingResponse:
+ def __init__(self, site_configs: AsyncSiteConfigsResource) -> None:
+ self._site_configs = site_configs
+
+ self.retrieve = async_to_streamed_response_wrapper(
+ site_configs.retrieve,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ site_configs.list,
+ )
+ self.list_recommendations = async_to_streamed_response_wrapper(
+ site_configs.list_recommendations,
+ )
+ self.lookup = async_to_streamed_response_wrapper(
+ site_configs.lookup,
+ )
+ self.resolve = async_to_streamed_response_wrapper(
+ site_configs.resolve,
+ )
diff --git a/src/kernel/types/__init__.py b/src/kernel/types/__init__.py
index 6373f24c..9e7af34c 100644
--- a/src/kernel/types/__init__.py
+++ b/src/kernel/types/__init__.py
@@ -5,6 +5,7 @@
from . import browsers
from .. import _compat
from .tags import Tags as Tags
+from .proxy import Proxy as Proxy
from .shared import (
LogEvent as LogEvent,
AppAction as AppAction,
@@ -16,20 +17,28 @@
BrowserViewport as BrowserViewport,
BrowserExtension as BrowserExtension,
)
+from .target import Target as Target
from .api_key import APIKey as APIKey
+from .browser import Browser as Browser
from .profile import Profile as Profile
from .project import Project as Project
+from .analysis import Analysis as Analysis
+from .evidence import Evidence as Evidence
from .credential import Credential as Credential
from .tags_param import TagsParam as TagsParam
from .browser_pool import BrowserPool as BrowserPool
from .browser_proxy import BrowserProxy as BrowserProxy
from .browser_usage import BrowserUsage as BrowserUsage
from .browser_memory import BrowserMemory as BrowserMemory
+from .recommendation import Recommendation as Recommendation
from .app_list_params import AppListParams as AppListParams
from .audit_log_entry import AuditLogEntry as AuditLogEntry
from .created_api_key import CreatedAPIKey as CreatedAPIKey
+from .lookup_response import LookupResponse as LookupResponse
+from .analysis_summary import AnalysisSummary as AnalysisSummary
from .browser_pool_ref import BrowserPoolRef as BrowserPoolRef
from .app_list_response import AppListResponse as AppListResponse
+from .no_recommendation import NoRecommendation as NoRecommendation
from .proxy_list_params import ProxyListParams as ProxyListParams
from .browser_proxy_mode import BrowserProxyMode as BrowserProxyMode
from .proxy_check_params import ProxyCheckParams as ProxyCheckParams
@@ -44,6 +53,7 @@
from .proxy_update_params import ProxyUpdateParams as ProxyUpdateParams
from .browser_proxy_config import BrowserProxyConfig as BrowserProxyConfig
from .proxy_check_response import ProxyCheckResponse as ProxyCheckResponse
+from .site_config_response import SiteConfigResponse as SiteConfigResponse
from .api_key_create_params import APIKeyCreateParams as APIKeyCreateParams
from .api_key_rotate_params import APIKeyRotateParams as APIKeyRotateParams
from .api_key_update_params import APIKeyUpdateParams as APIKeyUpdateParams
@@ -59,6 +69,7 @@
from .project_update_params import ProjectUpdateParams as ProjectUpdateParams
from .proxy_create_response import ProxyCreateResponse as ProxyCreateResponse
from .proxy_update_response import ProxyUpdateResponse as ProxyUpdateResponse
+from .recommendation_result import RecommendationResult as RecommendationResult
from .browser_memory_request import BrowserMemoryRequest as BrowserMemoryRequest
from .browser_network_config import BrowserNetworkConfig as BrowserNetworkConfig
from .credential_list_params import CredentialListParams as CredentialListParams
@@ -67,6 +78,7 @@
from .extension_get_response import ExtensionGetResponse as ExtensionGetResponse
from .invocation_list_params import InvocationListParams as InvocationListParams
from .invocation_state_event import InvocationStateEvent as InvocationStateEvent
+from .recommendation_summary import RecommendationSummary as RecommendationSummary
from .api_key_retrieve_params import APIKeyRetrieveParams as APIKeyRetrieveParams
from .browser_create_response import BrowserCreateResponse as BrowserCreateResponse
from .browser_retrieve_params import BrowserRetrieveParams as BrowserRetrieveParams
@@ -75,6 +87,7 @@
from .extension_upload_params import ExtensionUploadParams as ExtensionUploadParams
from .profile_download_params import ProfileDownloadParams as ProfileDownloadParams
from .proxy_retrieve_response import ProxyRetrieveResponse as ProxyRetrieveResponse
+from .site_config_list_params import SiteConfigListParams as SiteConfigListParams
from .browser_pool_list_params import BrowserPoolListParams as BrowserPoolListParams
from .credential_create_params import CredentialCreateParams as CredentialCreateParams
from .credential_provider_item import CredentialProviderItem as CredentialProviderItem
@@ -88,6 +101,7 @@
from .invocation_update_params import InvocationUpdateParams as InvocationUpdateParams
from .browser_retrieve_response import BrowserRetrieveResponse as BrowserRetrieveResponse
from .extension_upload_response import ExtensionUploadResponse as ExtensionUploadResponse
+from .site_config_lookup_params import SiteConfigLookupParams as SiteConfigLookupParams
from .browser_pool_create_params import BrowserPoolCreateParams as BrowserPoolCreateParams
from .browser_pool_delete_params import BrowserPoolDeleteParams as BrowserPoolDeleteParams
from .browser_pool_update_params import BrowserPoolUpdateParams as BrowserPoolUpdateParams
@@ -97,6 +111,7 @@
from .invocation_create_response import InvocationCreateResponse as InvocationCreateResponse
from .invocation_follow_response import InvocationFollowResponse as InvocationFollowResponse
from .invocation_update_response import InvocationUpdateResponse as InvocationUpdateResponse
+from .site_config_resolve_params import SiteConfigResolveParams as SiteConfigResolveParams
from .browser_pool_acquire_params import BrowserPoolAcquireParams as BrowserPoolAcquireParams
from .browser_pool_release_params import BrowserPoolReleaseParams as BrowserPoolReleaseParams
from .browser_network_config_param import BrowserNetworkConfigParam as BrowserNetworkConfigParam
@@ -114,6 +129,9 @@
from .credential_provider_list_items_response import (
CredentialProviderListItemsResponse as CredentialProviderListItemsResponse,
)
+from .site_config_list_recommendations_params import (
+ SiteConfigListRecommendationsParams as SiteConfigListRecommendationsParams,
+)
from .extension_download_from_chrome_store_params import (
ExtensionDownloadFromChromeStoreParams as ExtensionDownloadFromChromeStoreParams,
)
diff --git a/src/kernel/types/analysis.py b/src/kernel/types/analysis.py
new file mode 100644
index 00000000..c47b956c
--- /dev/null
+++ b/src/kernel/types/analysis.py
@@ -0,0 +1,30 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+from .shared.error_model import ErrorModel
+
+__all__ = ["Analysis"]
+
+
+class Analysis(BaseModel):
+ id: str
+ """Discovery run ID used to poll analysis status."""
+
+ created_at: datetime
+ """Time the analysis was created."""
+
+ failure: Optional[ErrorModel] = None
+ """Present for failed or canceled analyses.
+
+ Messages contain safe retry guidance rather than internal workflow errors.
+ """
+
+ finished_at: Optional[datetime] = None
+ """Time the analysis reached a terminal status. Null while it is running."""
+
+ status: Literal["running", "completed", "failed", "canceled"]
+ """Lifecycle status of the background analysis."""
diff --git a/src/kernel/types/analysis_summary.py b/src/kernel/types/analysis_summary.py
new file mode 100644
index 00000000..fab0d8d8
--- /dev/null
+++ b/src/kernel/types/analysis_summary.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .target import Target
+from .._models import BaseModel
+from .analysis import Analysis
+
+__all__ = ["AnalysisSummary"]
+
+
+class AnalysisSummary(BaseModel):
+ analysis: Analysis
+
+ target: Target
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.py b/src/kernel/types/browser.py
new file mode 100644
index 00000000..f7905451
--- /dev/null
+++ b/src/kernel/types/browser.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .._models import BaseModel
+from .shared.browser_viewport import BrowserViewport
+
+__all__ = ["Browser"]
+
+
+class Browser(BaseModel):
+ """Browser settings that can be passed directly to `POST /browsers`."""
+
+ gpu: bool
+
+ headless: bool
+
+ stealth: bool
+
+ viewport: BrowserViewport
+ """
+ Initial browser window size in pixels with optional refresh rate. If omitted,
+ image defaults apply (1920x1080@25). For GPU images, the default is
+ 1920x1080@60. Arbitrary viewport dimensions and refresh rates are accepted.
+ Known-good presets include: 2560x1440@10, 1920x1080@25, 1920x1200@25,
+ 1440x900@25, 1280x800@60, 1024x768@60, 1200x800@60, 768x1024@60, 390x844@60. For
+ GPU images, recommended presets use one of these resolutions with refresh rates
+ 60, 30, 25, or 10: 800x600, 960x720, 1024x576, 1024x768, 1152x648, 1200x800,
+ 1280x720, 1368x768, 1440x900, 1600x900, 1920x1080, 1920x1200, 390x844, 360x250,
+ 768x1024, 800x1600. Viewports outside this list may exhibit unstable live view
+ or recording behavior. If refresh_rate is not provided, it will be automatically
+ determined based on the resolution (higher resolutions use lower refresh rates
+ to keep bandwidth reasonable).
+ """
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/src/kernel/types/evidence.py b/src/kernel/types/evidence.py
new file mode 100644
index 00000000..1a777de9
--- /dev/null
+++ b/src/kernel/types/evidence.py
@@ -0,0 +1,38 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from .._models import BaseModel
+
+__all__ = ["Evidence"]
+
+
+class Evidence(BaseModel):
+ accessed: int
+
+ blocked: int
+
+ inconclusive: int
+
+ last_observed_at: datetime
+ """Most recent contributing observation.
+
+ Recommendations remain eligible regardless of age and can be returned while a
+ new analysis refreshes them.
+ """
+
+ run_count: int
+
+ sample_size: int
+ """Number of judged trials."""
+
+ success_rate: float
+ """Accessed trials divided by judged trials. Inconclusive trials are excluded."""
+
+ last_verified_at: Optional[datetime] = None
+ """Most recent contributing run where this config met the success threshold.
+
+ Omitted for knowledge assembled from runs that did not independently meet the
+ threshold.
+ """
diff --git a/src/kernel/types/lookup_response.py b/src/kernel/types/lookup_response.py
new file mode 100644
index 00000000..cf0f5c16
--- /dev/null
+++ b/src/kernel/types/lookup_response.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .target import Target
+from .._models import BaseModel
+from .recommendation import Recommendation
+
+__all__ = ["LookupResponse"]
+
+
+class LookupResponse(BaseModel):
+ recommendation: Optional[Recommendation] = None
+
+ target: Target
diff --git a/src/kernel/types/no_recommendation.py b/src/kernel/types/no_recommendation.py
new file mode 100644
index 00000000..d1bab62c
--- /dev/null
+++ b/src/kernel/types/no_recommendation.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from .._models import BaseModel
+
+__all__ = ["NoRecommendation"]
+
+
+class NoRecommendation(BaseModel):
+ code: Literal["proxy_restricted", "no_working_configuration", "inconclusive"]
+ """
+ Machine-readable reason Kernel cannot currently provide a Site Config
+ recommendation.
+ """
+
+ message: str
+ """Human-readable explanation suitable for display."""
+
+ type: Literal["no_recommendation"]
diff --git a/src/kernel/types/proxy.py b/src/kernel/types/proxy.py
new file mode 100644
index 00000000..ea31827d
--- /dev/null
+++ b/src/kernel/types/proxy.py
@@ -0,0 +1,150 @@
+# 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
+
+__all__ = [
+ "Proxy",
+ "SiteConfigDirectProxy",
+ "SiteConfigManagedProxy",
+ "SiteConfigManagedProxyCreate",
+ "SiteConfigManagedProxyCreateConfig",
+ "SiteConfigManagedProxyCreateConfigDatacenterProxyConfig",
+ "SiteConfigManagedProxyCreateConfigIspProxyConfig",
+ "SiteConfigManagedProxyCreateConfigResidentialProxyConfig",
+ "SiteConfigManagedProxyCreateConfigMobileProxyConfig",
+ "SiteConfigManagedProxyCreateConfigCreateCustomProxyConfig",
+]
+
+
+class SiteConfigDirectProxy(BaseModel):
+ """Direct egress recipe. Pass `{ "mode": "direct" }` as the browser's `proxy`."""
+
+ mode: Literal["direct"]
+
+
+class SiteConfigManagedProxyCreateConfigDatacenterProxyConfig(BaseModel):
+ """Configuration for a datacenter proxy."""
+
+ country: Optional[str] = None
+ """ISO 3166 country code. Defaults to US if not provided."""
+
+
+class SiteConfigManagedProxyCreateConfigIspProxyConfig(BaseModel):
+ """Configuration for an ISP proxy."""
+
+ country: Optional[str] = None
+ """ISO 3166 country code. Defaults to US if not provided."""
+
+
+class SiteConfigManagedProxyCreateConfigResidentialProxyConfig(BaseModel):
+ """Configuration for residential proxies."""
+
+ asn: Optional[str] = None
+ """Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html"""
+
+ city: Optional[str] = None
+ """City name (no spaces, e.g.
+
+ `sanfrancisco`). If provided, `country` must also be provided.
+ """
+
+ country: Optional[str] = None
+ """ISO 3166 country code."""
+
+ os: Optional[Literal["windows", "macos", "android"]] = None
+ """Operating system of the residential device."""
+
+ state: Optional[str] = None
+ """Two-letter state code."""
+
+ zip: Optional[str] = None
+ """US ZIP code."""
+
+
+class SiteConfigManagedProxyCreateConfigMobileProxyConfig(BaseModel):
+ """Configuration for mobile proxies."""
+
+ city: Optional[str] = None
+ """Provider city alias. Mobile carrier routing can make observed geo vary."""
+
+ country: Optional[str] = None
+ """ISO 3166 country code"""
+
+ state: Optional[str] = None
+ """US-only state code. Mobile carrier routing can make observed geo vary."""
+
+
+class SiteConfigManagedProxyCreateConfigCreateCustomProxyConfig(BaseModel):
+ """Configuration for a custom proxy (e.g., private proxy server)."""
+
+ host: str
+ """Proxy host address or IP."""
+
+ port: int
+ """Proxy port."""
+
+ ca_bundle: Optional[str] = None
+ """PEM-encoded CA certificate bundle the proxy re-signs upstream TLS with.
+
+ Provide when the proxy terminates TLS (MITM) so the browser trusts its
+ certificates. May contain multiple concatenated certificates.
+ """
+
+ password: Optional[str] = None
+ """Password for proxy authentication."""
+
+ username: Optional[str] = None
+ """Username for proxy authentication."""
+
+
+SiteConfigManagedProxyCreateConfig: TypeAlias = Union[
+ SiteConfigManagedProxyCreateConfigDatacenterProxyConfig,
+ SiteConfigManagedProxyCreateConfigIspProxyConfig,
+ SiteConfigManagedProxyCreateConfigResidentialProxyConfig,
+ SiteConfigManagedProxyCreateConfigMobileProxyConfig,
+ SiteConfigManagedProxyCreateConfigCreateCustomProxyConfig,
+]
+
+
+class SiteConfigManagedProxyCreate(BaseModel):
+ """Configuration for routing traffic through a proxy."""
+
+ type: Literal["datacenter", "isp", "residential", "mobile", "custom"]
+ """Proxy type to use.
+
+ In terms of quality for avoiding bot-detection, from best to worst: `mobile` >
+ `residential` > `isp` > `datacenter`.
+ """
+
+ bypass_hosts: Optional[List[str]] = None
+ """Hostnames that should bypass the parent proxy and connect directly."""
+
+ config: Optional[SiteConfigManagedProxyCreateConfig] = None
+ """Configuration specific to the selected proxy `type`."""
+
+ name: Optional[str] = None
+ """Readable name of the proxy."""
+
+ protocol: Optional[Literal["http", "https"]] = None
+ """Protocol to use for the proxy connection."""
+
+
+class SiteConfigManagedProxy(BaseModel):
+ """Managed proxy recipe.
+
+ `create` is a non-idempotent `POST /proxies` payload:
+ create the resource once, retain its ID, and reuse that ID as the browser's
+ `proxy.id`. Do not submit this recipe before every browser session.
+ """
+
+ create: SiteConfigManagedProxyCreate
+ """Configuration for routing traffic through a proxy."""
+
+ mode: Literal["managed"]
+
+
+Proxy: TypeAlias = Annotated[Union[SiteConfigDirectProxy, SiteConfigManagedProxy], PropertyInfo(discriminator="mode")]
diff --git a/src/kernel/types/recommendation.py b/src/kernel/types/recommendation.py
new file mode 100644
index 00000000..74b1761a
--- /dev/null
+++ b/src/kernel/types/recommendation.py
@@ -0,0 +1,35 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from .proxy import Proxy
+from .browser import Browser
+from .._models import BaseModel
+from .evidence import Evidence
+
+__all__ = ["Recommendation"]
+
+
+class Recommendation(BaseModel):
+ browser: Browser
+ """Browser settings that can be passed directly to `POST /browsers`."""
+
+ evidence: Evidence
+
+ match_scope: Literal["exact", "host", "domain"]
+ """Specificity of knowledge matched for this recommendation."""
+
+ matched_target: str
+ """Target value that supplied the recommendation."""
+
+ proxy: Proxy
+ """Proxy recipe for the recommended browser."""
+
+ type: Literal["recommendation"]
+
+ verification: Literal["verified", "inferred"]
+ """
+ Exact matches meet the evidence threshold; host and domain fallbacks are
+ inferred. Check evidence.last_verified_at for successful verification age and
+ last_observed_at for the latest evidence.
+ """
diff --git a/src/kernel/types/recommendation_result.py b/src/kernel/types/recommendation_result.py
new file mode 100644
index 00000000..82a72d92
--- /dev/null
+++ b/src/kernel/types/recommendation_result.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union
+from typing_extensions import Annotated, TypeAlias
+
+from .._utils import PropertyInfo
+from .recommendation import Recommendation
+from .no_recommendation import NoRecommendation
+
+__all__ = ["RecommendationResult"]
+
+RecommendationResult: TypeAlias = Annotated[Union[Recommendation, NoRecommendation], PropertyInfo(discriminator="type")]
diff --git a/src/kernel/types/recommendation_summary.py b/src/kernel/types/recommendation_summary.py
new file mode 100644
index 00000000..abc2ea72
--- /dev/null
+++ b/src/kernel/types/recommendation_summary.py
@@ -0,0 +1,29 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from .._models import BaseModel
+from .recommendation import Recommendation
+
+__all__ = ["RecommendationSummary"]
+
+
+class RecommendationSummary(BaseModel):
+ last_requested_at: datetime
+ """Most recent time the selected project requested an analysis for this domain."""
+
+ recommendation: Optional[Recommendation] = None
+ """Current domain-level recommendation. Null when no eligible knowledge exists."""
+
+ recommended_config_label: Optional[str] = None
+ """Display label for the recommended browser configuration."""
+
+ success_rate: Optional[float] = None
+ """Success rate for the recommended configuration.
+
+ Null when no eligible knowledge exists.
+ """
+
+ target: str
+ """Registrable domain previously analyzed by the selected project."""
diff --git a/src/kernel/types/site_config_list_params.py b/src/kernel/types/site_config_list_params.py
new file mode 100644
index 00000000..ee95bad4
--- /dev/null
+++ b/src/kernel/types/site_config_list_params.py
@@ -0,0 +1,13 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["SiteConfigListParams"]
+
+
+class SiteConfigListParams(TypedDict, total=False):
+ limit: int
+
+ offset: int
diff --git a/src/kernel/types/site_config_list_recommendations_params.py b/src/kernel/types/site_config_list_recommendations_params.py
new file mode 100644
index 00000000..8ff51237
--- /dev/null
+++ b/src/kernel/types/site_config_list_recommendations_params.py
@@ -0,0 +1,17 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Literal, TypedDict
+
+__all__ = ["SiteConfigListRecommendationsParams"]
+
+
+class SiteConfigListRecommendationsParams(TypedDict, total=False):
+ limit: int
+
+ offset: int
+
+ sort_by: Literal["target", "recommended_config", "last_requested_at", "success_rate"]
+
+ sort_order: Literal["asc", "desc"]
diff --git a/src/kernel/types/site_config_lookup_params.py b/src/kernel/types/site_config_lookup_params.py
new file mode 100644
index 00000000..aba315f4
--- /dev/null
+++ b/src/kernel/types/site_config_lookup_params.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from .._types import SequenceNotStr
+
+__all__ = ["SiteConfigLookupParams"]
+
+
+class SiteConfigLookupParams(TypedDict, total=False):
+ url: Required[str]
+ """Public HTTP(S) URL to look up."""
+
+ allowed_proxy_countries: SequenceNotStr[str]
+ """ISO 3166 country codes Kernel may use when returning a proxy configuration.
+
+ When omitted, Kernel uses its default country selection.
+ """
diff --git a/src/kernel/types/site_config_resolve_params.py b/src/kernel/types/site_config_resolve_params.py
new file mode 100644
index 00000000..37a3f44d
--- /dev/null
+++ b/src/kernel/types/site_config_resolve_params.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+from .._types import SequenceNotStr
+
+__all__ = ["SiteConfigResolveParams"]
+
+
+class SiteConfigResolveParams(TypedDict, total=False):
+ url: Required[str]
+ """Public HTTP(S) URL to refresh."""
+
+ allowed_proxy_countries: SequenceNotStr[str]
+ """
+ ISO 3166 country codes Kernel may use when searching for or returning a proxy
+ configuration. Kernel may test a subset of allowed countries. When omitted,
+ Kernel uses its default country selection.
+ """
diff --git a/src/kernel/types/site_config_response.py b/src/kernel/types/site_config_response.py
new file mode 100644
index 00000000..b6673f76
--- /dev/null
+++ b/src/kernel/types/site_config_response.py
@@ -0,0 +1,23 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .target import Target
+from .._models import BaseModel
+from .analysis import Analysis
+from .recommendation_result import RecommendationResult
+
+__all__ = ["SiteConfigResponse"]
+
+
+class SiteConfigResponse(BaseModel):
+ analysis: Optional[Analysis] = None
+ """Pollable analysis after workflow submission is acknowledged.
+
+ Null when no refresh was submitted.
+ """
+
+ recommendation: Optional[RecommendationResult] = None
+ """A recommendation or a structured no-recommendation result."""
+
+ target: Target
diff --git a/src/kernel/types/target.py b/src/kernel/types/target.py
new file mode 100644
index 00000000..6950d513
--- /dev/null
+++ b/src/kernel/types/target.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .._models import BaseModel
+
+__all__ = ["Target"]
+
+
+class Target(BaseModel):
+ domain: str
+ """Registrable domain."""
+
+ host: str
+ """Full hostname, including subdomain."""
+
+ normalized: str
+ """Exact normalized scheme, host, port, and path used for lookup."""
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},
},
diff --git a/tests/api_resources/test_site_configs.py b/tests/api_resources/test_site_configs.py
new file mode 100644
index 00000000..2099899c
--- /dev/null
+++ b/tests/api_resources/test_site_configs.py
@@ -0,0 +1,438 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import os
+from typing import Any, cast
+
+import pytest
+
+from kernel import Kernel, AsyncKernel
+from tests.utils import assert_matches_type
+from kernel.types import (
+ LookupResponse,
+ AnalysisSummary,
+ SiteConfigResponse,
+ RecommendationSummary,
+)
+from kernel.pagination import SyncOffsetPagination, AsyncOffsetPagination
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestSiteConfigs:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_retrieve(self, client: Kernel) -> None:
+ site_config = client.site_configs.retrieve(
+ "id",
+ )
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_retrieve(self, client: Kernel) -> None:
+ response = client.site_configs.with_raw_response.retrieve(
+ "id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Kernel) -> None:
+ with client.site_configs.with_streaming_response.retrieve(
+ "id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_path_params_retrieve(self, client: Kernel) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.site_configs.with_raw_response.retrieve(
+ "",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list(self, client: Kernel) -> None:
+ site_config = client.site_configs.list()
+ assert_matches_type(SyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list_with_all_params(self, client: Kernel) -> None:
+ site_config = client.site_configs.list(
+ limit=1,
+ offset=0,
+ )
+ assert_matches_type(SyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_list(self, client: Kernel) -> None:
+ response = client.site_configs.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = response.parse()
+ assert_matches_type(SyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_list(self, client: Kernel) -> None:
+ with client.site_configs.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = response.parse()
+ assert_matches_type(SyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list_recommendations(self, client: Kernel) -> None:
+ site_config = client.site_configs.list_recommendations()
+ assert_matches_type(SyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_list_recommendations_with_all_params(self, client: Kernel) -> None:
+ site_config = client.site_configs.list_recommendations(
+ limit=1,
+ offset=0,
+ sort_by="target",
+ sort_order="asc",
+ )
+ assert_matches_type(SyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_list_recommendations(self, client: Kernel) -> None:
+ response = client.site_configs.with_raw_response.list_recommendations()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = response.parse()
+ assert_matches_type(SyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_list_recommendations(self, client: Kernel) -> None:
+ with client.site_configs.with_streaming_response.list_recommendations() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = response.parse()
+ assert_matches_type(SyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_lookup(self, client: Kernel) -> None:
+ site_config = client.site_configs.lookup(
+ url="https://example.com",
+ )
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_lookup_with_all_params(self, client: Kernel) -> None:
+ site_config = client.site_configs.lookup(
+ url="https://example.com",
+ allowed_proxy_countries=["US"],
+ )
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_lookup(self, client: Kernel) -> None:
+ response = client.site_configs.with_raw_response.lookup(
+ url="https://example.com",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = response.parse()
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_lookup(self, client: Kernel) -> None:
+ with client.site_configs.with_streaming_response.lookup(
+ url="https://example.com",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = response.parse()
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_resolve(self, client: Kernel) -> None:
+ site_config = client.site_configs.resolve(
+ url="https://example.com",
+ )
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_method_resolve_with_all_params(self, client: Kernel) -> None:
+ site_config = client.site_configs.resolve(
+ url="https://example.com",
+ allowed_proxy_countries=["US"],
+ )
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_raw_response_resolve(self, client: Kernel) -> None:
+ response = client.site_configs.with_raw_response.resolve(
+ url="https://example.com",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ def test_streaming_response_resolve(self, client: Kernel) -> None:
+ with client.site_configs.with_streaming_response.resolve(
+ url="https://example.com",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+
+class TestAsyncSiteConfigs:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.retrieve(
+ "id",
+ )
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncKernel) -> None:
+ response = await async_client.site_configs.with_raw_response.retrieve(
+ "id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = await response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncKernel) -> None:
+ async with async_client.site_configs.with_streaming_response.retrieve(
+ "id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = await response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncKernel) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.site_configs.with_raw_response.retrieve(
+ "",
+ )
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.list()
+ assert_matches_type(AsyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.list(
+ limit=1,
+ offset=0,
+ )
+ assert_matches_type(AsyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncKernel) -> None:
+ response = await async_client.site_configs.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = await response.parse()
+ assert_matches_type(AsyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncKernel) -> None:
+ async with async_client.site_configs.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = await response.parse()
+ assert_matches_type(AsyncOffsetPagination[AnalysisSummary], site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list_recommendations(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.list_recommendations()
+ assert_matches_type(AsyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_list_recommendations_with_all_params(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.list_recommendations(
+ limit=1,
+ offset=0,
+ sort_by="target",
+ sort_order="asc",
+ )
+ assert_matches_type(AsyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_list_recommendations(self, async_client: AsyncKernel) -> None:
+ response = await async_client.site_configs.with_raw_response.list_recommendations()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = await response.parse()
+ assert_matches_type(AsyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_list_recommendations(self, async_client: AsyncKernel) -> None:
+ async with async_client.site_configs.with_streaming_response.list_recommendations() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = await response.parse()
+ assert_matches_type(AsyncOffsetPagination[RecommendationSummary], site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_lookup(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.lookup(
+ url="https://example.com",
+ )
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_lookup_with_all_params(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.lookup(
+ url="https://example.com",
+ allowed_proxy_countries=["US"],
+ )
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_lookup(self, async_client: AsyncKernel) -> None:
+ response = await async_client.site_configs.with_raw_response.lookup(
+ url="https://example.com",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = await response.parse()
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_lookup(self, async_client: AsyncKernel) -> None:
+ async with async_client.site_configs.with_streaming_response.lookup(
+ url="https://example.com",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = await response.parse()
+ assert_matches_type(LookupResponse, site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_resolve(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.resolve(
+ url="https://example.com",
+ )
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_method_resolve_with_all_params(self, async_client: AsyncKernel) -> None:
+ site_config = await async_client.site_configs.resolve(
+ url="https://example.com",
+ allowed_proxy_countries=["US"],
+ )
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_raw_response_resolve(self, async_client: AsyncKernel) -> None:
+ response = await async_client.site_configs.with_raw_response.resolve(
+ url="https://example.com",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ site_config = await response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ @pytest.mark.skip(reason="Mock server tests are disabled")
+ @parametrize
+ async def test_streaming_response_resolve(self, async_client: AsyncKernel) -> None:
+ async with async_client.site_configs.with_streaming_response.resolve(
+ url="https://example.com",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ site_config = await response.parse()
+ assert_matches_type(SiteConfigResponse, site_config, path=["response"])
+
+ assert cast(Any, response.is_closed) is True