From 4bef9afe3097d7d07596799efae41ca2acbff038 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 04:51:28 +0000 Subject: [PATCH 1/3] fix(client): process custom base url ahead of time --- option/requestoption.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/option/requestoption.go b/option/requestoption.go index a450d56..60920f4 100644 --- a/option/requestoption.go +++ b/option/requestoption.go @@ -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 }) From e1bfb1d1874a0ad1dbb61c035e3f728b9406df5a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 22:49:28 +0000 Subject: [PATCH 2/3] feat(api): add action name to the response to invoke --- .stats.yml | 4 ++-- invocation.go | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 38d124b..5c1470b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/invocation.go b/invocation.go index 5dc72ae..c8f330a 100644 --- a/invocation.go +++ b/invocation.go @@ -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". @@ -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 From 3613dbddd494585a417104ade0a5f312358ae9ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 22:52:28 +0000 Subject: [PATCH 3/3] release: 0.8.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2b28d6e..34dc535 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.8.1" + ".": "0.8.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cd7395..3b24516 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/README.md b/README.md index e80727e..fd0b427 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Or to pin the 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' ``` diff --git a/internal/version.go b/internal/version.go index f93cfe5..da2dd47 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.8.1" // x-release-please-version +const PackageVersion = "0.8.2" // x-release-please-version