Skip to content

Commit bcbbcf2

Browse files
authored
Merge pull request #143 from kernel/stainless/release
Release SDK updates
2 parents 9529bea + 4fbcc02 commit bcbbcf2

23 files changed

Lines changed: 735 additions & 17 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Please
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
jobs:
12+
release-please:
13+
if: github.repository == 'kernel/kernel-python-sdk'
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
18+
id: release
19+
with:
20+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}

.stats.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
configured_endpoints: 127
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-3fc18876d59a47ed6993892cc5f69d7461fe2ca6a94fad43905677955a5adc55.yml
3-
openapi_spec_hash: 75d990158aeb0dac3d3ef8da476e86b9
4-
config_hash: 77ee715aa17061166f9a02b264a21b8d

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ from kernel.types.browsers import (
146146
BrowserTelemetryCategoryConfig,
147147
BrowserTelemetryConfig,
148148
BrowserTelemetryEvent,
149+
BrowserTelemetryExportConfig,
150+
BrowserTelemetryOtlpExportConfig,
149151
TelemetryEventsResponse,
150152
TelemetryStreamResponse,
151153
)

release-please-config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"packages": {
33
".": {}
44
},
5-
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
5+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
66
"include-v-in-tag": true,
77
"include-component-in-tag": false,
88
"versioning": "prerelease",
9-
"prerelease": true,
9+
"prerelease": false,
1010
"bump-minor-pre-major": true,
1111
"bump-patch-for-minor-pre-major": false,
1212
"pull-request-header": "Automated Release PR",

scripts/utils/upload-artifact.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ UPLOAD_RESPONSE=$(curl -v -X PUT \
2020

2121
if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
2222
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
23-
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/kernel-python/$SHA/$FILENAME'\033[0m"
23+
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/kernel-python-sdk-staging/$SHA/$FILENAME'\033[0m"
2424
else
2525
echo -e "\033[31mFailed to upload artifact.\033[0m"
2626
exit 1

src/kernel/resources/browsers/browsers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def list(
439439
440440
offset: Number of results to skip. Defaults to 0.
441441
442-
query: Search browsers by name, session ID, profile ID, proxy ID, or pool name.
442+
query: Search browsers by name, session ID, profile name or ID, proxy ID, or pool name.
443443
444444
status: Filter sessions by status. "active" returns only active sessions (default),
445445
"deleted" returns only soft-deleted sessions, "all" returns both.
@@ -1017,7 +1017,7 @@ def list(
10171017
10181018
offset: Number of results to skip. Defaults to 0.
10191019
1020-
query: Search browsers by name, session ID, profile ID, proxy ID, or pool name.
1020+
query: Search browsers by name, session ID, profile name or ID, proxy ID, or pool name.
10211021
10221022
status: Filter sessions by status. "active" returns only active sessions (default),
10231023
"deleted" returns only soft-deleted sessions, "all" returns both.

src/kernel/types/auth/connection_create_params.py

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88
from ..._types import SequenceNotStr
99
from ..browsers.browser_telemetry_categories_config_param import BrowserTelemetryCategoriesConfigParam
1010

11-
__all__ = ["ConnectionCreateParams", "BrowserTelemetry", "Credential", "Proxy"]
11+
__all__ = [
12+
"ConnectionCreateParams",
13+
"BrowserTelemetry",
14+
"BrowserTelemetryExport",
15+
"BrowserTelemetryExportOtlp",
16+
"BrowserTelemetryExportOtlpDestination",
17+
"Credential",
18+
"Proxy",
19+
]
1220

1321

1422
class ConnectionCreateParams(TypedDict, total=False):
@@ -111,6 +119,50 @@ class ConnectionCreateParams(TypedDict, total=False):
111119
"""
112120

113121

122+
class BrowserTelemetryExportOtlpDestination(TypedDict, total=False):
123+
"""OTLP destination to export this session's captured telemetry to.
124+
125+
Provide either id or name. Requires telemetry capture to be enabled.
126+
"""
127+
128+
id: str
129+
"""OTLP destination ID"""
130+
131+
name: str
132+
"""OTLP destination name"""
133+
134+
135+
class BrowserTelemetryExportOtlp(TypedDict, total=False):
136+
"""
137+
Export captured telemetry over OTLP to one of the org's configured destinations.
138+
"""
139+
140+
destination: BrowserTelemetryExportOtlpDestination
141+
"""OTLP destination to export this session's captured telemetry to.
142+
143+
Provide either id or name. Requires telemetry capture to be enabled.
144+
"""
145+
146+
enabled: bool
147+
"""Whether to export captured telemetry over OTLP.
148+
149+
Setting destination implies enabled=true, so this only needs to be set
150+
explicitly to disable export (enabled=false with a destination is rejected).
151+
"""
152+
153+
154+
class BrowserTelemetryExport(TypedDict, total=False):
155+
"""Where to export this session's captured telemetry.
156+
157+
Omit to capture without exporting.
158+
"""
159+
160+
otlp: BrowserTelemetryExportOtlp
161+
"""
162+
Export captured telemetry over OTLP to one of the org's configured destinations.
163+
"""
164+
165+
114166
class BrowserTelemetry(TypedDict, total=False):
115167
"""
116168
Browser telemetry configuration used by this connection's browser sessions by default. Uses the exact create-browser configuration. Can be overridden per-login.
@@ -143,6 +195,12 @@ class BrowserTelemetry(TypedDict, total=False):
143195
settings.
144196
"""
145197

198+
export: BrowserTelemetryExport
199+
"""Where to export this session's captured telemetry.
200+
201+
Omit to capture without exporting.
202+
"""
203+
146204

147205
class Credential(TypedDict, total=False):
148206
"""Reference to credentials for the auth connection.

src/kernel/types/auth/connection_login_params.py

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77

88
from ..browsers.browser_telemetry_categories_config_param import BrowserTelemetryCategoriesConfigParam
99

10-
__all__ = ["ConnectionLoginParams", "BrowserTelemetry", "Proxy"]
10+
__all__ = [
11+
"ConnectionLoginParams",
12+
"BrowserTelemetry",
13+
"BrowserTelemetryExport",
14+
"BrowserTelemetryExportOtlp",
15+
"BrowserTelemetryExportOtlpDestination",
16+
"Proxy",
17+
]
1118

1219

1320
class ConnectionLoginParams(TypedDict, total=False):
@@ -35,6 +42,50 @@ class ConnectionLoginParams(TypedDict, total=False):
3542
"""
3643

3744

45+
class BrowserTelemetryExportOtlpDestination(TypedDict, total=False):
46+
"""OTLP destination to export this session's captured telemetry to.
47+
48+
Provide either id or name. Requires telemetry capture to be enabled.
49+
"""
50+
51+
id: str
52+
"""OTLP destination ID"""
53+
54+
name: str
55+
"""OTLP destination name"""
56+
57+
58+
class BrowserTelemetryExportOtlp(TypedDict, total=False):
59+
"""
60+
Export captured telemetry over OTLP to one of the org's configured destinations.
61+
"""
62+
63+
destination: BrowserTelemetryExportOtlpDestination
64+
"""OTLP destination to export this session's captured telemetry to.
65+
66+
Provide either id or name. Requires telemetry capture to be enabled.
67+
"""
68+
69+
enabled: bool
70+
"""Whether to export captured telemetry over OTLP.
71+
72+
Setting destination implies enabled=true, so this only needs to be set
73+
explicitly to disable export (enabled=false with a destination is rejected).
74+
"""
75+
76+
77+
class BrowserTelemetryExport(TypedDict, total=False):
78+
"""Where to export this session's captured telemetry.
79+
80+
Omit to capture without exporting.
81+
"""
82+
83+
otlp: BrowserTelemetryExportOtlp
84+
"""
85+
Export captured telemetry over OTLP to one of the org's configured destinations.
86+
"""
87+
88+
3889
class BrowserTelemetry(TypedDict, total=False):
3990
"""Override the connection's default browser telemetry configuration for this login.
4091
@@ -68,6 +119,12 @@ class BrowserTelemetry(TypedDict, total=False):
68119
settings.
69120
"""
70121

122+
export: BrowserTelemetryExport
123+
"""Where to export this session's captured telemetry.
124+
125+
Omit to capture without exporting.
126+
"""
127+
71128

72129
class Proxy(TypedDict, total=False):
73130
"""Proxy selection.

src/kernel/types/auth/connection_update_params.py

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@
88
from ..._types import SequenceNotStr
99
from ..browsers.browser_telemetry_categories_config_param import BrowserTelemetryCategoriesConfigParam
1010

11-
__all__ = ["ConnectionUpdateParams", "BrowserTelemetry", "Credential", "Proxy"]
11+
__all__ = [
12+
"ConnectionUpdateParams",
13+
"BrowserTelemetry",
14+
"BrowserTelemetryExport",
15+
"BrowserTelemetryExportOtlp",
16+
"BrowserTelemetryExportOtlpDestination",
17+
"Credential",
18+
"Proxy",
19+
]
1220

1321

1422
class ConnectionUpdateParams(TypedDict, total=False):
@@ -72,6 +80,50 @@ class ConnectionUpdateParams(TypedDict, total=False):
7280
"""Whether to save credentials after every successful login"""
7381

7482

83+
class BrowserTelemetryExportOtlpDestination(TypedDict, total=False):
84+
"""OTLP destination to export this session's captured telemetry to.
85+
86+
Provide either id or name. Requires telemetry capture to be enabled.
87+
"""
88+
89+
id: str
90+
"""OTLP destination ID"""
91+
92+
name: str
93+
"""OTLP destination name"""
94+
95+
96+
class BrowserTelemetryExportOtlp(TypedDict, total=False):
97+
"""
98+
Export captured telemetry over OTLP to one of the org's configured destinations.
99+
"""
100+
101+
destination: BrowserTelemetryExportOtlpDestination
102+
"""OTLP destination to export this session's captured telemetry to.
103+
104+
Provide either id or name. Requires telemetry capture to be enabled.
105+
"""
106+
107+
enabled: bool
108+
"""Whether to export captured telemetry over OTLP.
109+
110+
Setting destination implies enabled=true, so this only needs to be set
111+
explicitly to disable export (enabled=false with a destination is rejected).
112+
"""
113+
114+
115+
class BrowserTelemetryExport(TypedDict, total=False):
116+
"""Where to export this session's captured telemetry.
117+
118+
Omit to capture without exporting.
119+
"""
120+
121+
otlp: BrowserTelemetryExportOtlp
122+
"""
123+
Export captured telemetry over OTLP to one of the org's configured destinations.
124+
"""
125+
126+
75127
class BrowserTelemetry(TypedDict, total=False):
76128
"""
77129
Browser telemetry configuration used by future browser sessions for this connection. Uses the exact create-browser configuration. Set enabled to false to disable telemetry.
@@ -104,6 +156,12 @@ class BrowserTelemetry(TypedDict, total=False):
104156
settings.
105157
"""
106158

159+
export: BrowserTelemetryExport
160+
"""Where to export this session's captured telemetry.
161+
162+
Omit to capture without exporting.
163+
"""
164+
107165

108166
class Credential(TypedDict, total=False):
109167
"""Reference to credentials for the auth connection.

src/kernel/types/auth/managed_auth.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
__all__ = [
1111
"ManagedAuth",
1212
"BrowserTelemetry",
13+
"BrowserTelemetryExport",
14+
"BrowserTelemetryExportOtlp",
15+
"BrowserTelemetryExportOtlpDestination",
1316
"Choice",
1417
"Credential",
1518
"DiscoveredField",
@@ -20,6 +23,50 @@
2023
]
2124

2225

26+
class BrowserTelemetryExportOtlpDestination(BaseModel):
27+
"""OTLP destination to export this session's captured telemetry to.
28+
29+
Provide either id or name. Requires telemetry capture to be enabled.
30+
"""
31+
32+
id: Optional[str] = None
33+
"""OTLP destination ID"""
34+
35+
name: Optional[str] = None
36+
"""OTLP destination name"""
37+
38+
39+
class BrowserTelemetryExportOtlp(BaseModel):
40+
"""
41+
Export captured telemetry over OTLP to one of the org's configured destinations.
42+
"""
43+
44+
destination: Optional[BrowserTelemetryExportOtlpDestination] = None
45+
"""OTLP destination to export this session's captured telemetry to.
46+
47+
Provide either id or name. Requires telemetry capture to be enabled.
48+
"""
49+
50+
enabled: Optional[bool] = None
51+
"""Whether to export captured telemetry over OTLP.
52+
53+
Setting destination implies enabled=true, so this only needs to be set
54+
explicitly to disable export (enabled=false with a destination is rejected).
55+
"""
56+
57+
58+
class BrowserTelemetryExport(BaseModel):
59+
"""Where to export this session's captured telemetry.
60+
61+
Omit to capture without exporting.
62+
"""
63+
64+
otlp: Optional[BrowserTelemetryExportOtlp] = None
65+
"""
66+
Export captured telemetry over OTLP to one of the org's configured destinations.
67+
"""
68+
69+
2370
class BrowserTelemetry(BaseModel):
2471
"""
2572
Browser telemetry configuration used by this connection's browser sessions by default. The exact create-browser configuration is preserved and can be overridden per-login.
@@ -52,6 +99,12 @@ class BrowserTelemetry(BaseModel):
5299
settings.
53100
"""
54101

102+
export: Optional[BrowserTelemetryExport] = None
103+
"""Where to export this session's captured telemetry.
104+
105+
Omit to capture without exporting.
106+
"""
107+
55108

56109
class Choice(BaseModel):
57110
"""Canonical auth-flow choice awaiting user selection."""

0 commit comments

Comments
 (0)