Skip to content
Merged
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.146.0"
".": "0.147.0"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.147.0](https://github.com/kernel/kernel-go-sdk/compare/v0.146.0...v0.147.0) (2026-11-12)


### Features

* Prepare native OAuth for MCP: path resource, exchange targets, static exchange client, retention, Clerk OAuth cutoff ([13a30a6](https://github.com/kernel/kernel-go-sdk/commit/13a30a650ea08fdcdaaebb3f7a75e6f4a6b4fb34))

## [0.146.0](https://github.com/kernel/kernel-go-sdk/compare/v0.145.0...v0.146.0) (2026-11-10)


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/kernel/kernel-go-sdk@v0.146.0'
go get -u 'github.com/kernel/kernel-go-sdk@v0.147.0'
```

<!-- x-release-please-end -->
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ Methods:
Params Types:

- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuthBrowserConfigParam">ManagedAuthBrowserConfigParam</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuthBrowserLocationParam">ManagedAuthBrowserLocationParam</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuthCreateRequestParam">ManagedAuthCreateRequestParam</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuthUpdateRequestParam">ManagedAuthUpdateRequestParam</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#SubmitFieldsRequestParam">SubmitFieldsRequestParam</a>
Expand All @@ -428,6 +429,7 @@ Response Types:
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#LoginResponse">LoginResponse</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuth">ManagedAuth</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuthBrowserConfig">ManagedAuthBrowserConfig</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuthBrowserLocation">ManagedAuthBrowserLocation</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#ManagedAuthTimelineEvent">ManagedAuthTimelineEvent</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#SubmitFieldsResponse">SubmitFieldsResponse</a>
- <a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk">kernel</a>.<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk#AuthConnectionFollowResponseUnion">AuthConnectionFollowResponseUnion</a>
Expand Down
56 changes: 56 additions & 0 deletions authconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,9 @@ func (r *ManagedAuthSignInOption) UnmarshalJSON(data []byte) error {
// connection. Managed auth controls the profile, headless mode, timeout, start
// URL, kiosk mode, and viewport.
type ManagedAuthBrowserConfig struct {
// Browser locale for the connection's login, reauthentication, and health-check
// sessions. Set on create or update; not supported on login.
Location ManagedAuthBrowserLocation `json:"location"`
// Proxy configuration for managed auth browser sessions. Omit on create to derive
// the default from stealth, or on update and login to preserve or inherit the
// connection default.
Expand All @@ -1029,6 +1032,7 @@ type ManagedAuthBrowserConfig struct {
Telemetry ManagedAuthBrowserConfigTelemetry `json:"telemetry" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Location respjson.Field
Proxy respjson.Field
Region respjson.Field
Stealth respjson.Field
Expand Down Expand Up @@ -1203,6 +1207,9 @@ type ManagedAuthBrowserConfigParam struct {
Stealth param.Opt[bool] `json:"stealth,omitzero"`
// Browser telemetry configuration using the same semantics as browser create.
Telemetry ManagedAuthBrowserConfigTelemetryParam `json:"telemetry,omitzero"`
// Browser locale for the connection's login, reauthentication, and health-check
// sessions. Set on create or update; not supported on login.
Location ManagedAuthBrowserLocationParam `json:"location,omitzero"`
// Proxy configuration for managed auth browser sessions. Omit on create to derive
// the default from stealth, or on update and login to preserve or inherit the
// connection default.
Expand Down Expand Up @@ -1332,6 +1339,55 @@ func (r *ManagedAuthBrowserConfigTelemetryStorageParam) UnmarshalJSON(data []byt
return apijson.UnmarshalRoot(data, r)
}

// Browser locale applied to browser sessions created for a managed auth
// connection.
type ManagedAuthBrowserLocation struct {
// Supported canonical BCP 47 locale for the browser's language and Accept-Language
// header. Omit to use the default for the browser's region, or omit on update to
// keep the current locale. Null clears it on update.
Locale string `json:"locale" api:"nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Locale respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

// Returns the unmodified JSON received from the API
func (r ManagedAuthBrowserLocation) RawJSON() string { return r.JSON.raw }
func (r *ManagedAuthBrowserLocation) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// ToParam converts this ManagedAuthBrowserLocation to a
// ManagedAuthBrowserLocationParam.
//
// Warning: the fields of the param type will not be present. ToParam should only
// be used at the last possible moment before sending a request. Test for this with
// ManagedAuthBrowserLocationParam.Overrides()
func (r ManagedAuthBrowserLocation) ToParam() ManagedAuthBrowserLocationParam {
return param.Override[ManagedAuthBrowserLocationParam](json.RawMessage(r.RawJSON()))
}

// Browser locale applied to browser sessions created for a managed auth
// connection.
type ManagedAuthBrowserLocationParam struct {
// Supported canonical BCP 47 locale for the browser's language and Accept-Language
// header. Omit to use the default for the browser's region, or omit on update to
// keep the current locale. Null clears it on update.
Locale param.Opt[string] `json:"locale,omitzero"`
paramObj
}

func (r ManagedAuthBrowserLocationParam) MarshalJSON() (data []byte, err error) {
type shadow ManagedAuthBrowserLocationParam
return param.MarshalObject(r, (*shadow)(&r))
}
func (r *ManagedAuthBrowserLocationParam) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// Request to create an auth connection for a profile and domain
//
// The properties Domain, ProfileName are required.
Expand Down
9 changes: 9 additions & 0 deletions authconnection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ func TestAuthConnectionNewWithOptionalParams(t *testing.T) {
AllowedDomains: []string{"login.netflix.com", "auth.netflix.com"},
AutoReauth: kernel.Bool(true),
Browser: kernel.ManagedAuthBrowserConfigParam{
Location: kernel.ManagedAuthBrowserLocationParam{
Locale: kernel.String("sv-SE"),
},
Proxy: kernel.BrowserProxyConfigParam{
ID: kernel.String("x"),
Mode: kernel.BrowserProxyModeDirect,
Expand Down Expand Up @@ -212,6 +215,9 @@ func TestAuthConnectionUpdateWithOptionalParams(t *testing.T) {
AllowedDomains: []string{"login.netflix.com", "auth.netflix.com"},
AutoReauth: kernel.Bool(true),
Browser: kernel.ManagedAuthBrowserConfigParam{
Location: kernel.ManagedAuthBrowserLocationParam{
Locale: kernel.String("sv-SE"),
},
Proxy: kernel.BrowserProxyConfigParam{
ID: kernel.String("x"),
Mode: kernel.BrowserProxyModeDirect,
Expand Down Expand Up @@ -418,6 +424,9 @@ func TestAuthConnectionLoginWithOptionalParams(t *testing.T) {
"id",
kernel.AuthConnectionLoginParams{
Browser: kernel.ManagedAuthBrowserConfigParam{
Location: kernel.ManagedAuthBrowserLocationParam{
Locale: kernel.String("sv-SE"),
},
Proxy: kernel.BrowserProxyConfigParam{
ID: kernel.String("x"),
Mode: kernel.BrowserProxyModeDirect,
Expand Down
136 changes: 136 additions & 0 deletions browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,10 @@ type BrowserNewResponse struct {
//
// Deprecated: deprecated
ProxyID string `json:"proxy_id"`
// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
Replay BrowserNewResponseReplay `json:"replay"`
// URL the session was most recently asked to navigate to, if any. Recorded for
// debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
// without waiting for it to load, and any errors (DNS failure, bad status,
Expand Down Expand Up @@ -1310,6 +1314,7 @@ type BrowserNewResponse struct {
ProfileSaveChanges respjson.Field
Proxy respjson.Field
ProxyID respjson.Field
Replay respjson.Field
StartURL respjson.Field
Tags respjson.Field
Telemetry respjson.Field
Expand Down Expand Up @@ -1339,6 +1344,35 @@ const (
BrowserNewResponseRegionApSoutheast BrowserNewResponseRegion = "ap-southeast"
)

// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
type BrowserNewResponseReplay struct {
// Unique identifier for the replay recording.
ReplayID string `json:"replay_id" api:"required"`
// Timestamp when replay finished
FinishedAt time.Time `json:"finished_at" api:"nullable" format:"date-time"`
// URL for viewing the replay recording.
ReplayViewURL string `json:"replay_view_url"`
// Timestamp when replay started
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ReplayID respjson.Field
FinishedAt respjson.Field
ReplayViewURL respjson.Field
StartedAt respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

// Returns the unmodified JSON received from the API
func (r BrowserNewResponseReplay) RawJSON() string { return r.JSON.raw }
func (r *BrowserNewResponseReplay) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// Whether final usage billing is still pending or complete. Only present for
// deleted sessions.
type BrowserNewResponseUsageStatus string
Expand Down Expand Up @@ -1411,6 +1445,10 @@ type BrowserGetResponse struct {
//
// Deprecated: deprecated
ProxyID string `json:"proxy_id"`
// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
Replay BrowserGetResponseReplay `json:"replay"`
// URL the session was most recently asked to navigate to, if any. Recorded for
// debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
// without waiting for it to load, and any errors (DNS failure, bad status,
Expand Down Expand Up @@ -1474,6 +1512,7 @@ type BrowserGetResponse struct {
ProfileSaveChanges respjson.Field
Proxy respjson.Field
ProxyID respjson.Field
Replay respjson.Field
StartURL respjson.Field
Tags respjson.Field
Telemetry respjson.Field
Expand Down Expand Up @@ -1503,6 +1542,35 @@ const (
BrowserGetResponseRegionApSoutheast BrowserGetResponseRegion = "ap-southeast"
)

// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
type BrowserGetResponseReplay struct {
// Unique identifier for the replay recording.
ReplayID string `json:"replay_id" api:"required"`
// Timestamp when replay finished
FinishedAt time.Time `json:"finished_at" api:"nullable" format:"date-time"`
// URL for viewing the replay recording.
ReplayViewURL string `json:"replay_view_url"`
// Timestamp when replay started
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ReplayID respjson.Field
FinishedAt respjson.Field
ReplayViewURL respjson.Field
StartedAt respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

// Returns the unmodified JSON received from the API
func (r BrowserGetResponseReplay) RawJSON() string { return r.JSON.raw }
func (r *BrowserGetResponseReplay) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// Whether final usage billing is still pending or complete. Only present for
// deleted sessions.
type BrowserGetResponseUsageStatus string
Expand Down Expand Up @@ -1575,6 +1643,10 @@ type BrowserUpdateResponse struct {
//
// Deprecated: deprecated
ProxyID string `json:"proxy_id"`
// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
Replay BrowserUpdateResponseReplay `json:"replay"`
// URL the session was most recently asked to navigate to, if any. Recorded for
// debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
// without waiting for it to load, and any errors (DNS failure, bad status,
Expand Down Expand Up @@ -1638,6 +1710,7 @@ type BrowserUpdateResponse struct {
ProfileSaveChanges respjson.Field
Proxy respjson.Field
ProxyID respjson.Field
Replay respjson.Field
StartURL respjson.Field
Tags respjson.Field
Telemetry respjson.Field
Expand Down Expand Up @@ -1667,6 +1740,35 @@ const (
BrowserUpdateResponseRegionApSoutheast BrowserUpdateResponseRegion = "ap-southeast"
)

// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
type BrowserUpdateResponseReplay struct {
// Unique identifier for the replay recording.
ReplayID string `json:"replay_id" api:"required"`
// Timestamp when replay finished
FinishedAt time.Time `json:"finished_at" api:"nullable" format:"date-time"`
// URL for viewing the replay recording.
ReplayViewURL string `json:"replay_view_url"`
// Timestamp when replay started
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ReplayID respjson.Field
FinishedAt respjson.Field
ReplayViewURL respjson.Field
StartedAt respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

// Returns the unmodified JSON received from the API
func (r BrowserUpdateResponseReplay) RawJSON() string { return r.JSON.raw }
func (r *BrowserUpdateResponseReplay) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// Whether final usage billing is still pending or complete. Only present for
// deleted sessions.
type BrowserUpdateResponseUsageStatus string
Expand Down Expand Up @@ -1739,6 +1841,10 @@ type BrowserListResponse struct {
//
// Deprecated: deprecated
ProxyID string `json:"proxy_id"`
// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
Replay BrowserListResponseReplay `json:"replay"`
// URL the session was most recently asked to navigate to, if any. Recorded for
// debugging. Navigation is fire-and-forget — the URL is dispatched to the browser
// without waiting for it to load, and any errors (DNS failure, bad status,
Expand Down Expand Up @@ -1802,6 +1908,7 @@ type BrowserListResponse struct {
ProfileSaveChanges respjson.Field
Proxy respjson.Field
ProxyID respjson.Field
Replay respjson.Field
StartURL respjson.Field
Tags respjson.Field
Telemetry respjson.Field
Expand Down Expand Up @@ -1831,6 +1938,35 @@ const (
BrowserListResponseRegionApSoutheast BrowserListResponseRegion = "ap-southeast"
)

// Replay recording started by `start_replay` when this browser was created or
// acquired. Omitted otherwise; list replays with
// `GET /browsers/{id_or_name}/replays`.
type BrowserListResponseReplay struct {
// Unique identifier for the replay recording.
ReplayID string `json:"replay_id" api:"required"`
// Timestamp when replay finished
FinishedAt time.Time `json:"finished_at" api:"nullable" format:"date-time"`
// URL for viewing the replay recording.
ReplayViewURL string `json:"replay_view_url"`
// Timestamp when replay started
StartedAt time.Time `json:"started_at" api:"nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ReplayID respjson.Field
FinishedAt respjson.Field
ReplayViewURL respjson.Field
StartedAt respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

// Returns the unmodified JSON received from the API
func (r BrowserListResponseReplay) RawJSON() string { return r.JSON.raw }
func (r *BrowserListResponseReplay) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// Whether final usage billing is still pending or complete. Only present for
// deleted sessions.
type BrowserListResponseUsageStatus string
Expand Down
Loading
Loading