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.66.0"
".": "0.67.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: 119
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-e66c3f8aedccc39104386a3ec619f3fdcef7e8b00d9e5aa82e414a1b387351c2.yml
openapi_spec_hash: afeddf18ebc3da1521b3e6f6739411fa
config_hash: 80eef1b592110714ea55cd26c470fabb
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/kernel-51549f813f3002e18c6ca8d850cc0c7932828d511c151e0412c73b6798d19e30.yml
openapi_spec_hash: ee77b293c4bda91c1a32cfdd12b8739e
config_hash: 57567e00b41af47cef1b78e51b747aa0
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.67.0 (2026-06-11)

Full Changelog: [v0.66.0...v0.67.0](https://github.com/kernel/kernel-go-sdk/compare/v0.66.0...v0.67.0)

### Features

* Add project_id SDK client option mapped to X-Kernel-Project-Id ([fc37447](https://github.com/kernel/kernel-go-sdk/commit/fc37447ec9fc09e21c04d1ecee2009dc44010363))


### Documentation

* **api:** correct project-scoping descriptions in OpenAPI spec ([d10587c](https://github.com/kernel/kernel-go-sdk/commit/d10587c1131648662d969b25ed921264063e36a4))

## 0.66.0 (2026-06-10)

Full Changelog: [v0.65.0...v0.66.0](https://github.com/kernel/kernel-go-sdk/compare/v0.65.0...v0.66.0)
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.66.0'
go get -u 'github.com/kernel/kernel-go-sdk@v0.67.0'
```

<!-- x-release-please-end -->
Expand Down
24 changes: 12 additions & 12 deletions authconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,8 @@ type ManagedAuthCreateRequestParam struct {
// - { provider, path } for external provider item
// - { provider, auto: true } for external provider domain lookup
Credential ManagedAuthCreateRequestCredentialParam `json:"credential,omitzero"`
// Proxy selection. Provide either id or name. The proxy must belong to the
// caller's org.
// Proxy selection. Provide either id or name. The proxy must be in the same
// project as the resource referencing it.
Proxy ManagedAuthCreateRequestProxyParam `json:"proxy,omitzero"`
paramObj
}
Expand Down Expand Up @@ -774,8 +774,8 @@ func (r *ManagedAuthCreateRequestCredentialParam) UnmarshalJSON(data []byte) err
return apijson.UnmarshalRoot(data, r)
}

// Proxy selection. Provide either id or name. The proxy must belong to the
// caller's org.
// Proxy selection. Provide either id or name. The proxy must be in the same
// project as the resource referencing it.
type ManagedAuthCreateRequestProxyParam struct {
// Proxy ID
ID param.Opt[string] `json:"id,omitzero"`
Expand Down Expand Up @@ -823,8 +823,8 @@ type ManagedAuthUpdateRequestParam struct {
// - { provider, path } for external provider item
// - { provider, auto: true } for external provider domain lookup
Credential ManagedAuthUpdateRequestCredentialParam `json:"credential,omitzero"`
// Proxy selection. Provide either id or name. The proxy must belong to the
// caller's org.
// Proxy selection. Provide either id or name. The proxy must be in the same
// project as the resource referencing it.
Proxy ManagedAuthUpdateRequestProxyParam `json:"proxy,omitzero"`
paramObj
}
Expand Down Expand Up @@ -862,8 +862,8 @@ func (r *ManagedAuthUpdateRequestCredentialParam) UnmarshalJSON(data []byte) err
return apijson.UnmarshalRoot(data, r)
}

// Proxy selection. Provide either id or name. The proxy must belong to the
// caller's org.
// Proxy selection. Provide either id or name. The proxy must be in the same
// project as the resource referencing it.
type ManagedAuthUpdateRequestProxyParam struct {
// Proxy ID
ID param.Opt[string] `json:"id,omitzero"`
Expand Down Expand Up @@ -1298,8 +1298,8 @@ type AuthConnectionLoginParams struct {
// Override the connection's default for recording this login's browser session.
// When omitted, the connection's record_session default is used.
RecordSession param.Opt[bool] `json:"record_session,omitzero"`
// Proxy selection. Provide either id or name. The proxy must belong to the
// caller's org.
// Proxy selection. Provide either id or name. The proxy must be in the same
// project as the resource referencing it.
Proxy AuthConnectionLoginParamsProxy `json:"proxy,omitzero"`
paramObj
}
Expand All @@ -1312,8 +1312,8 @@ func (r *AuthConnectionLoginParams) UnmarshalJSON(data []byte) error {
return apijson.UnmarshalRoot(data, r)
}

// Proxy selection. Provide either id or name. The proxy must belong to the
// caller's org.
// Proxy selection. Provide either id or name. The proxy must be in the same
// project as the resource referencing it.
type AuthConnectionLoginParamsProxy struct {
// Proxy ID
ID param.Opt[string] `json:"id,omitzero"`
Expand Down
4 changes: 2 additions & 2 deletions browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,8 @@ type BrowserNewParams struct {
// the dashboard. Must be unique among active sessions within the project. Can be
// changed later via PATCH /browsers/{id_or_name}.
Name param.Opt[string] `json:"name,omitzero"`
// Optional proxy to associate to the browser session. Must reference a proxy
// belonging to the caller's org.
// Optional proxy to associate to the browser session. Must reference a proxy in
// the same project as the browser session.
ProxyID param.Opt[string] `json:"proxy_id,omitzero"`
// Optional URL to open when the browser session is created. Navigation is
// best-effort, so navigation failures do not prevent the session from being
Expand Down
16 changes: 8 additions & 8 deletions browserpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (r *BrowserPoolService) Update(ctx context.Context, idOrName string, body B
return res, err
}

// List browser pools owned by the caller's organization.
// List browser pools in the resolved project.
func (r *BrowserPoolService) List(ctx context.Context, query BrowserPoolListParams, opts ...option.RequestOption) (res *pagination.OffsetPagination[BrowserPool], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
Expand All @@ -92,7 +92,7 @@ func (r *BrowserPoolService) List(ctx context.Context, query BrowserPoolListPara
return res, nil
}

// List browser pools owned by the caller's organization.
// List browser pools in the resolved project.
func (r *BrowserPoolService) ListAutoPaging(ctx context.Context, query BrowserPoolListParams, opts ...option.RequestOption) *pagination.OffsetPaginationAutoPager[BrowserPool] {
return pagination.NewOffsetPaginationAutoPager(r.List(ctx, query, opts...))
}
Expand Down Expand Up @@ -211,8 +211,8 @@ type BrowserPoolBrowserPoolConfig struct {
// specified, the matching profile will be loaded into the browser session.
// Profiles must be created beforehand.
Profile shared.BrowserProfile `json:"profile"`
// Optional proxy to associate to the browser session. Must reference a proxy
// belonging to the caller's org.
// Optional proxy to associate to the browser session. Must reference a proxy in
// the same project as the browser session.
ProxyID string `json:"proxy_id"`
// Optional URL to navigate to when a new browser is warmed into the pool.
// Best-effort: failures to navigate do not fail pool fill. Only applied to
Expand Down Expand Up @@ -379,8 +379,8 @@ type BrowserPoolNewParams struct {
KioskMode param.Opt[bool] `json:"kiosk_mode,omitzero"`
// Optional name for the browser pool. Must be unique within the project.
Name param.Opt[string] `json:"name,omitzero"`
// Optional proxy to associate to the browser session. Must reference a proxy
// belonging to the caller's org.
// Optional proxy to associate to the browser session. Must reference a proxy in
// the same project as the browser session.
ProxyID param.Opt[string] `json:"proxy_id,omitzero"`
// Optional URL to navigate to when a new browser is warmed into the pool.
// Best-effort: failures to navigate do not fail pool fill. Only applied to
Expand Down Expand Up @@ -442,8 +442,8 @@ type BrowserPoolUpdateParams struct {
KioskMode param.Opt[bool] `json:"kiosk_mode,omitzero"`
// Optional name for the browser pool. Must be unique within the project.
Name param.Opt[string] `json:"name,omitzero"`
// Optional proxy to associate to the browser session. Must reference a proxy
// belonging to the caller's org.
// Optional proxy to associate to the browser session. Must reference a proxy in
// the same project as the browser session.
ProxyID param.Opt[string] `json:"proxy_id,omitzero"`
// Number of browsers to maintain in the pool. The maximum size is determined by
// your organization's pooled sessions limit (the sum of all pool sizes cannot
Expand Down
6 changes: 2 additions & 4 deletions credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ func (r *CredentialService) Update(ctx context.Context, idOrName string, body Cr
return res, err
}

// List credentials owned by the caller's organization. Credential values are not
// returned.
// List credentials in the resolved project. Credential values are not returned.
func (r *CredentialService) List(ctx context.Context, query CredentialListParams, opts ...option.RequestOption) (res *pagination.OffsetPagination[Credential], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
Expand All @@ -94,8 +93,7 @@ func (r *CredentialService) List(ctx context.Context, query CredentialListParams
return res, nil
}

// List credentials owned by the caller's organization. Credential values are not
// returned.
// List credentials in the resolved project. Credential values are not returned.
func (r *CredentialService) ListAutoPaging(ctx context.Context, query CredentialListParams, opts ...option.RequestOption) *pagination.OffsetPaginationAutoPager[Credential] {
return pagination.NewOffsetPaginationAutoPager(r.List(ctx, query, opts...))
}
Expand Down
4 changes: 2 additions & 2 deletions extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewExtensionService(opts ...option.RequestOption) (r ExtensionService) {
return
}

// List extensions owned by the caller's organization.
// List extensions in the resolved project.
func (r *ExtensionService) List(ctx context.Context, query ExtensionListParams, opts ...option.RequestOption) (res *pagination.OffsetPagination[ExtensionListResponse], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
Expand All @@ -63,7 +63,7 @@ func (r *ExtensionService) List(ctx context.Context, query ExtensionListParams,
return res, nil
}

// List extensions owned by the caller's organization.
// List extensions in the resolved project.
func (r *ExtensionService) ListAutoPaging(ctx context.Context, query ExtensionListParams, opts ...option.RequestOption) *pagination.OffsetPaginationAutoPager[ExtensionListResponse] {
return pagination.NewOffsetPaginationAutoPager(r.List(ctx, query, opts...))
}
Expand Down
2 changes: 2 additions & 0 deletions internal/requestconfig/requestconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ type RequestConfig struct {
HTTPClient *http.Client
Middlewares []middleware
APIKey string
ProjectID string
// If ResponseBodyInto not nil, then we will attempt to deserialize into
// ResponseBodyInto. If Destination is a []byte, then it will return the body as
// is.
Expand Down Expand Up @@ -593,6 +594,7 @@ func (cfg *RequestConfig) Clone(ctx context.Context) *RequestConfig {
HTTPClient: cfg.HTTPClient,
Middlewares: cfg.Middlewares,
APIKey: cfg.APIKey,
ProjectID: cfg.ProjectID,
}

return new
Expand Down
2 changes: 1 addition & 1 deletion internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package internal

const PackageVersion = "0.66.0" // x-release-please-version
const PackageVersion = "0.67.0" // x-release-please-version
8 changes: 8 additions & 0 deletions option/requestoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,11 @@ func WithAPIKey(value string) RequestOption {
return r.Apply(WithHeader("authorization", fmt.Sprintf("Bearer %s", r.APIKey)))
})
}

// WithProjectID returns a RequestOption that sets the client setting "project_id".
func WithProjectID(value string) RequestOption {
return requestconfig.RequestOptionFunc(func(r *requestconfig.RequestConfig) error {
r.ProjectID = value
return r.Apply(WithHeader("X-Kernel-Project-Id", value))
})
}
8 changes: 4 additions & 4 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ func NewProxyService(opts ...option.RequestOption) (r ProxyService) {
return
}

// Create a new proxy configuration for the caller's organization.
// Create a new proxy configuration in the resolved project.
func (r *ProxyService) New(ctx context.Context, body ProxyNewParams, opts ...option.RequestOption) (res *ProxyNewResponse, err error) {
opts = slices.Concat(r.Options, opts)
path := "proxies"
err = requestconfig.ExecuteNewRequest(ctx, http.MethodPost, path, body, &res, opts...)
return res, err
}

// Retrieve a proxy belonging to the caller's organization by ID.
// Retrieve a proxy in the resolved project by ID.
func (r *ProxyService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ProxyGetResponse, err error) {
opts = slices.Concat(r.Options, opts)
if id == "" {
Expand All @@ -62,7 +62,7 @@ func (r *ProxyService) Get(ctx context.Context, id string, opts ...option.Reques
return res, err
}

// List proxies owned by the caller's organization.
// List proxies in the resolved project.
func (r *ProxyService) List(ctx context.Context, query ProxyListParams, opts ...option.RequestOption) (res *pagination.OffsetPagination[ProxyListResponse], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
Expand All @@ -80,7 +80,7 @@ func (r *ProxyService) List(ctx context.Context, query ProxyListParams, opts ...
return res, nil
}

// List proxies owned by the caller's organization.
// List proxies in the resolved project.
func (r *ProxyService) ListAutoPaging(ctx context.Context, query ProxyListParams, opts ...option.RequestOption) *pagination.OffsetPaginationAutoPager[ProxyListResponse] {
return pagination.NewOffsetPaginationAutoPager(r.List(ctx, query, opts...))
}
Expand Down
Loading