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
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 89
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-8d66dbedea5b240936b338809f272568ca84a452fc13dbda835479f2ec068b41.yml
openapi_spec_hash: 7c499bfce2e996f1fff5e7791cea390e
config_hash: fcc2db3ed48ab4e8d1b588d31d394a23
configured_endpoints: 90
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-cc60c65c6bb0b8a8ea662cf758806e641790870ded35f6ffdb9f4801f3d29b15.yml
openapi_spec_hash: a1074e1bba578bcd5912512166ada0dc
config_hash: 7868d3397406c2974b6f058488aeefd6
22 changes: 9 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
# Changelog

## 0.25.0 (2026-01-07)
## 0.25.0 (2026-01-15)

Full Changelog: [v0.24.0...v0.25.0](https://github.com/onkernel/kernel-go-sdk/compare/v0.24.0...v0.25.0)
Full Changelog: [v0.24.0...v0.25.0](https://github.com/kernel/kernel-go-sdk/compare/v0.24.0...v0.25.0)

### Features

* **api:** add health check endpoint for proxies ([c7b8728](https://github.com/onkernel/kernel-go-sdk/commit/c7b8728369482de76bdf143a59f16b0de8bc03bb))
* **auth:** add auto_login credential flow ([2eec1a1](https://github.com/onkernel/kernel-go-sdk/commit/2eec1a147279fe64a060c2066b30a2f0a13e74ab))
* Enhance AuthAgentInvocation with step and last activity tracking ([ccb1425](https://github.com/onkernel/kernel-go-sdk/commit/ccb1425ea205fbb18129f341ae36bfc55c70ca64))


### Bug Fixes

* skip usage tests that don't work with Prism ([8872193](https://github.com/onkernel/kernel-go-sdk/commit/88721930052bff16639f371a9a7e46e7e34e7ff4))
* add MFA options to agent authentication workflow ([0f5b637](https://github.com/kernel/kernel-go-sdk/commit/0f5b63778ed3fce2f8662053eb213ba55a77cde9))
* add WebSocket process attach and PTY support ([690d473](https://github.com/kernel/kernel-go-sdk/commit/690d4737fe6b3d13c64acc5de08da76deb74a597))
* **api:** add IP address logging for residential and custom proxies ([35a09ad](https://github.com/kernel/kernel-go-sdk/commit/35a09ad5ece2cdaf09a8d3b6420b4744377f5d6f))
* **api:** manual updates ([0980329](https://github.com/kernel/kernel-go-sdk/commit/0980329671baab3951d42b472f69fcd5ef29aab7))
* **api:** update production repos ([0cdfbfd](https://github.com/kernel/kernel-go-sdk/commit/0cdfbfdfccab1abe18180bce8500623be8bcad66))


### Chores

* add float64 to valid types for RegisterFieldValidator ([1e23b39](https://github.com/onkernel/kernel-go-sdk/commit/1e23b39aca94dd1a98d6ec6669d2c8b87f8ccf02))
* **internal:** codegen related update ([e07718d](https://github.com/onkernel/kernel-go-sdk/commit/e07718dbecbbc00c19e9d0725c04297fe48f2121))
* **internal:** codegen related update ([0320876](https://github.com/onkernel/kernel-go-sdk/commit/0320876c8f64185768a3ad562b9656f96ab7e935))
* sync repo ([1728134](https://github.com/kernel/kernel-go-sdk/commit/1728134103bf4a4bcb1c74ad335408cc3f7cc65a))
* update module path from onkernel to kernel ([52c5887](https://github.com/kernel/kernel-go-sdk/commit/52c588700307b752e5d239718a00aafddc86ab96))

## 0.24.0 (2025-12-17)

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To use a local version of this library from source in another project, edit the
directive. This can be done through the CLI with the following:

```sh
$ go mod edit -replace github.com/onkernel/kernel-go-sdk=/path/to/kernel-go-sdk
$ go mod edit -replace github.com/kernel/kernel-go-sdk=/path/to/kernel-go-sdk
```

## Running tests
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

<!-- x-release-please-start-version -->

<a href="https://pkg.go.dev/github.com/onkernel/kernel-go-sdk"><img src="https://pkg.go.dev/badge/github.com/onkernel/kernel-go-sdk.svg" alt="Go Reference"></a>
<a href="https://pkg.go.dev/github.com/kernel/kernel-go-sdk"><img src="https://pkg.go.dev/badge/github.com/kernel/kernel-go-sdk.svg" alt="Go Reference"></a>

<!-- x-release-please-end -->

The Kernel Go library provides convenient access to the [Kernel REST API](https://docs.onkernel.com)
The Kernel Go library provides convenient access to the [Kernel REST API](https://docs.kernel.com)
from applications written in Go.

It is generated with [Stainless](https://www.stainless.com/).
Expand All @@ -17,7 +17,7 @@ It is generated with [Stainless](https://www.stainless.com/).

```go
import (
"github.com/onkernel/kernel-go-sdk" // imported as kernel
"github.com/kernel/kernel-go-sdk" // imported as kernel
)
```

Expand All @@ -28,7 +28,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/onkernel/kernel-go-sdk@v0.25.0'
go get -u 'github.com/kernel/kernel-go-sdk@v0.25.0'
```

<!-- x-release-please-end -->
Expand All @@ -48,8 +48,8 @@ import (
"context"
"fmt"

"github.com/onkernel/kernel-go-sdk"
"github.com/onkernel/kernel-go-sdk/option"
"github.com/kernel/kernel-go-sdk"
"github.com/kernel/kernel-go-sdk/option"
)

func main() {
Expand Down Expand Up @@ -279,7 +279,7 @@ client.Browsers.New(context.TODO(), ...,

The request option `option.WithDebugLog(nil)` may be helpful while debugging.

See the [full list of request options](https://pkg.go.dev/github.com/onkernel/kernel-go-sdk/option).
See the [full list of request options](https://pkg.go.dev/github.com/kernel/kernel-go-sdk/option).

### Pagination

Expand Down Expand Up @@ -542,7 +542,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an [issue](https://www.github.com/onkernel/kernel-go-sdk/issues) with questions, bugs, or suggestions.
We are keen for your feedback; please open an [issue](https://www.github.com/kernel/kernel-go-sdk/issues) with questions, bugs, or suggestions.

## Contributing

Expand Down
33 changes: 33 additions & 0 deletions agentauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ type AgentAuthInvocationResponse struct {
ExternalActionMessage string `json:"external_action_message,nullable"`
// Browser live view URL for debugging the invocation
LiveViewURL string `json:"live_view_url,nullable"`
// MFA method options to choose from (present when step=awaiting_input and MFA
// selection is required)
MfaOptions []AgentAuthInvocationResponseMfaOption `json:"mfa_options,nullable"`
// Fields currently awaiting input (present when step=awaiting_input)
PendingFields []DiscoveredField `json:"pending_fields,nullable"`
// SSO buttons available on the page (present when step=awaiting_input)
Expand All @@ -156,6 +159,7 @@ type AgentAuthInvocationResponse struct {
ErrorMessage respjson.Field
ExternalActionMessage respjson.Field
LiveViewURL respjson.Field
MfaOptions respjson.Field
PendingFields respjson.Field
PendingSSOButtons respjson.Field
SubmittedFields respjson.Field
Expand Down Expand Up @@ -207,6 +211,35 @@ const (
AgentAuthInvocationResponseTypeReauth AgentAuthInvocationResponseType = "reauth"
)

// An MFA method option for verification
type AgentAuthInvocationResponseMfaOption struct {
// The visible option text
Label string `json:"label,required"`
// The MFA delivery method type
//
// Any of "sms", "call", "email", "totp", "push", "security_key".
Type string `json:"type,required"`
// Additional instructions from the site
Description string `json:"description,nullable"`
// The masked destination (phone/email) if shown
Target string `json:"target,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Label respjson.Field
Type respjson.Field
Description respjson.Field
Target respjson.Field
ExtraFields map[string]respjson.Field
raw string
} `json:"-"`
}

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

// An SSO button for signing in with an external identity provider
type AgentAuthInvocationResponsePendingSSOButton struct {
// Visible button text
Expand Down
27 changes: 26 additions & 1 deletion agentauthinvocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,14 @@ type AgentAuthInvocationSubmitParams struct {
OfFieldValues *AgentAuthInvocationSubmitParamsBodyFieldValues `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfSSOButton *AgentAuthInvocationSubmitParamsBodySSOButton `json:",inline"`
// This field is a request body variant, only one variant field can be set.
OfSelectedMfaType *AgentAuthInvocationSubmitParamsBodySelectedMfaType `json:",inline"`

paramObj
}

func (u AgentAuthInvocationSubmitParams) MarshalJSON() ([]byte, error) {
return param.MarshalUnion(u, u.OfFieldValues, u.OfSSOButton)
return param.MarshalUnion(u, u.OfFieldValues, u.OfSSOButton, u.OfSelectedMfaType)
}
func (r *AgentAuthInvocationSubmitParams) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
Expand Down Expand Up @@ -185,3 +187,26 @@ func (r AgentAuthInvocationSubmitParamsBodySSOButton) MarshalJSON() (data []byte
func (r *AgentAuthInvocationSubmitParamsBodySSOButton) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// The property SelectedMfaType is required.
type AgentAuthInvocationSubmitParamsBodySelectedMfaType struct {
// The MFA delivery method type
//
// Any of "sms", "call", "email", "totp", "push", "security_key".
SelectedMfaType string `json:"selected_mfa_type,omitzero,required"`
paramObj
}

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

func init() {
apijson.RegisterFieldValidator[AgentAuthInvocationSubmitParamsBodySelectedMfaType](
"selected_mfa_type", "sms", "call", "email", "totp", "push", "security_key",
)
}
Loading
Loading