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.8.1"
".": "0.8.2"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 19
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-84945582139b11633f792c1052a33e6af9cafc96bbafc2902a905312d14c4cc1.yml
openapi_spec_hash: c77be216626b789a543529a6de56faed
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-5e4716f7fce42bbcecc7ecb699c1c467ae778d74d558f7a260d531e2af1a7f30.yml
openapi_spec_hash: f545dcef9001b00c2604e3dcc6a12f7a
config_hash: 65328ff206b8c0168c915914506d9dba
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.8.2 (2025-07-23)

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

### Features

* **api:** add action name to the response to invoke ([e1bfb1d](https://github.com/onkernel/kernel-go-sdk/commit/e1bfb1d1874a0ad1dbb61c035e3f728b9406df5a))


### Bug Fixes

* **client:** process custom base url ahead of time ([4bef9af](https://github.com/onkernel/kernel-go-sdk/commit/4bef9afe3097d7d07596799efae41ca2acbff038))

## 0.8.1 (2025-07-21)

Full Changelog: [v0.8.0...v0.8.1](https://github.com/onkernel/kernel-go-sdk/compare/v0.8.0...v0.8.1)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

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

<!-- x-release-please-end -->
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.8.1" // x-release-please-version
const PackageVersion = "0.8.2" // x-release-please-version
3 changes: 3 additions & 0 deletions invocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ func (r *InvocationStateEventInvocation) UnmarshalJSON(data []byte) error {
type InvocationNewResponse struct {
// ID of the invocation
ID string `json:"id,required"`
// Name of the action invoked
ActionName string `json:"action_name,required"`
// Status of the invocation
//
// Any of "queued", "running", "succeeded", "failed".
Expand All @@ -186,6 +188,7 @@ type InvocationNewResponse struct {
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ActionName respjson.Field
Status respjson.Field
Output respjson.Field
StatusReason respjson.Field
Expand Down
9 changes: 5 additions & 4 deletions option/requestoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ type RequestOption = requestconfig.RequestOption
// For security reasons, ensure that the base URL is trusted.
func WithBaseURL(base string) RequestOption {
u, err := url.Parse(base)
if err == nil && u.Path != "" && !strings.HasSuffix(u.Path, "/") {
u.Path += "/"
}

return requestconfig.RequestOptionFunc(func(r *requestconfig.RequestConfig) error {
if err != nil {
return fmt.Errorf("requestoption: WithBaseURL failed to parse url %s\n", err)
return fmt.Errorf("requestoption: WithBaseURL failed to parse url %s", err)
}

if u.Path != "" && !strings.HasSuffix(u.Path, "/") {
u.Path += "/"
}
r.BaseURL = u
return nil
})
Expand Down