Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.58.0"
".": "0.59.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 117
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-3b34d85c005a4058ac1faaea092615af577d12cee6e420f102de57339251672d.yml
openapi_spec_hash: fad386b8e8712e6639ed9689e9dfc070
config_hash: 0f222358f24700d1811c5d27078a3849
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-4bada2a5bdbde93018e5a1b1e80e134acbc5509cfdea94db6e4c5b799eba7b82.yml
openapi_spec_hash: e0d541d480f5663b1e6bd3bb19a0fe61
config_hash: e0741f8035aea13f71e54e0fdb88eaa4
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.59.0 (2026-05-29)

Full Changelog: [v0.58.0...v0.59.0](https://github.com/kernel/kernel-python-sdk/compare/v0.58.0...v0.59.0)

### Features

* api: surface category field on browser telemetry events ([06a2f7b](https://github.com/kernel/kernel-python-sdk/commit/06a2f7babbc8f6ea31e46f3dfeb8d09dbaae88f0))
* Support Byteful mobile proxies ([8c0ce1c](https://github.com/kernel/kernel-python-sdk/commit/8c0ce1c1533a538483419f4da0937a6153eb5273))

## 0.58.0 (2026-05-27)

Full Changelog: [v0.57.0...v0.58.0](https://github.com/kernel/kernel-python-sdk/compare/v0.57.0...v0.58.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "kernel"
version = "0.58.0"
version = "0.59.0"
description = "The official Python library for the kernel API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/kernel/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "kernel"
__version__ = "0.58.0" # x-release-please-version
__version__ = "0.59.0" # x-release-please-version
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_console_error_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class BrowserConsoleErrorEvent(BaseModel):
Emitted from two distinct CDP sources with different data shapes. Runtime.consoleAPICalled (console.error calls) produces level, text, args, and stack_trace. Runtime.exceptionThrown (uncaught exceptions) produces text, line, column, source_url, and stack_trace. Fields not applicable to the source are absent.
"""

category: Literal["console"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_console_log_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Data(BrowserEventContext):
class BrowserConsoleLogEvent(BaseModel):
"""A browser console log event (console.log, console.info, console.warn, etc.)."""

category: Literal["console"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_interaction_click_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class Data(BrowserEventContext):
class BrowserInteractionClickEvent(BaseModel):
"""A browser user click event captured via injected page script."""

category: Literal["interaction"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_interaction_key_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class Data(BrowserEventContext):
class BrowserInteractionKeyEvent(BaseModel):
"""A browser keyboard event captured via injected page script."""

category: Literal["interaction"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class BrowserInteractionScrollSettledEvent(BaseModel):
A browser scroll settled event emitted after scroll position stops changing, captured via injected page script.
"""

category: Literal["interaction"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class BrowserMonitorDisconnectedEvent(BaseModel):
Telemetry events may be dropped until monitor_reconnected arrives. Treat any in-progress computed state (network_idle, page_layout_settled) as unreliable until then.
"""

category: Literal["system"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class Data(BaseModel):
class BrowserMonitorInitFailedEvent(BaseModel):
"""The CDP session could not be initialized."""

category: Literal["system"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class BrowserMonitorReconnectFailedEvent(BaseModel):
The CDP connection to Chrome could not be re-established after exhausting all reconnection attempts. No further telemetry events will arrive on this session.
"""

category: Literal["system"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class BrowserMonitorReconnectedEvent(BaseModel):
The CDP connection to Chrome was successfully re-established after a disconnection. Events emitted during the gap are lost. Computed state is reset, so navigation and network tracking restart fresh from this point.
"""

category: Literal["system"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_monitor_screenshot_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class Data(BaseModel):
class BrowserMonitorScreenshotEvent(BaseModel):
"""A periodic screenshot of the browser viewport."""

category: Literal["system"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_network_idle_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class BrowserNetworkIdleEvent(BaseModel):
A browser network idle event emitted after a 500ms quiet period with no in-flight HTTP requests.
"""

category: Literal["network"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class BrowserNetworkLoadingFailedEvent(BaseModel):
If the request was already in flight when CDP attached (no prior network_request was emitted for it), url, frame_id, loader_id, and resource_type are absent; BrowserEventContext is partially populated in that case.
"""

category: Literal["network"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_network_request_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ class Data(BrowserEventContext):
class BrowserNetworkRequestEvent(BaseModel):
"""A browser network request sent event."""

category: Literal["network"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_network_response_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class BrowserNetworkResponseEvent(BaseModel):
Fired after the response body is fully received, not when headers arrive.
"""

category: Literal["network"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Data(BrowserEventContext):
class BrowserPageDomContentLoadedEvent(BaseModel):
"""A browser DOMContentLoaded event (CDP Page.domContentEventFired)."""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class BrowserPageLayoutSettledEvent(BaseModel):
A browser layout settled event emitted 1 second after page load with no intervening layout shifts, indicating visual stability. Each layout shift resets the 1-second timer.
"""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_page_layout_shift_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class BrowserPageLayoutShiftEvent(BaseModel):
A browser cumulative layout shift (CLS) event from the Performance Timeline API.
"""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_page_lcp_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class BrowserPageLcpEvent(BaseModel):
A browser Largest Contentful Paint (LCP) event from the Performance Timeline API.
"""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_page_load_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Data(BrowserEventContext):
class BrowserPageLoadEvent(BaseModel):
"""A browser page load event (CDP Page.loadEventFired)."""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_page_navigation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class BrowserPageNavigationEvent(BaseModel):
Carries nav context fields inline but not nav_seq, as this event resets the navigation epoch.
"""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class BrowserPageNavigationSettledEvent(BaseModel):
Emitted when page_dom_content_loaded and page_layout_settled have both fired for the same navigation, indicating the page is loaded and visually stable. Independent of network_idle; a single pending request does not block it.
"""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
2 changes: 2 additions & 0 deletions src/kernel/types/browsers/browser_page_tab_opened_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class BrowserPageTabOpenedEvent(BaseModel):
A new browser tab or target was opened (CDP Target.attachedToTarget for page targets). Fires before a CDP session is attached to the new target, so session_id, frame_id, loader_id, and nav_seq are absent; this event does not compose BrowserEventContext. Consumers reading context fields generically should treat it as a special case.
"""

category: Literal["page"]

source: BrowserEventSource
"""Provenance metadata identifying which producer emitted the event."""

Expand Down
77 changes: 2 additions & 75 deletions src/kernel/types/proxy_check_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,87 +59,14 @@ class ConfigResidentialProxyConfig(BaseModel):
class ConfigMobileProxyConfig(BaseModel):
"""Configuration for mobile proxies."""

asn: Optional[str] = None
"""Autonomous system number. See https://bgp.potaroo.net/cidr/autnums.html"""

carrier: Optional[
Literal[
"a1",
"aircel",
"airtel",
"att",
"celcom",
"chinamobile",
"claro",
"comcast",
"cox",
"digi",
"dt",
"docomo",
"dtac",
"etisalat",
"idea",
"kyivstar",
"meo",
"megafon",
"mtn",
"mtnza",
"mts",
"optus",
"orange",
"qwest",
"reliance_jio",
"robi",
"sprint",
"telefonica",
"telstra",
"tmobile",
"tigo",
"tim",
"verizon",
"vimpelcom",
"vodacomza",
"vodafone",
"vivo",
"zain",
"vivabo",
"telenormyanmar",
"kcelljsc",
"swisscom",
"singtel",
"asiacell",
"windit",
"cellc",
"ooredoo",
"drei",
"umobile",
"cableone",
"proximus",
"tele2",
"mobitel",
"o2",
"bouygues",
"free",
"sfr",
"digicel",
]
] = None
"""Mobile carrier."""

city: Optional[str] = None
"""City name (no spaces, e.g.

`sanfrancisco`). If provided, `country` must also be provided.
"""
"""Provider city alias. Mobile carrier routing can make observed geo vary."""

country: Optional[str] = None
"""ISO 3166 country code"""

state: Optional[str] = None
"""Two-letter state code."""

zip: Optional[str] = None
"""US ZIP code."""
"""US-only state code. Mobile carrier routing can make observed geo vary."""


class ConfigCustomProxyConfig(BaseModel):
Expand Down
Loading
Loading