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
21 changes: 19 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#
# go-sdk is a library, not a binary - for a Go module the git tag *is* the
# release (consumers fetch source via `go get`). This workflow therefore does
# not build or publish artifacts; it only creates a GitHub Release with
# auto-generated notes for the tag created by tag-release.yml.
# not build or publish artifacts; it only creates a GitHub Release. The release
# body is the matching section from CHANGELOG.md (curated notes), with the
# auto-generated commit/PR list appended below it.
#
# Triggered by tag-release.yml (workflow_dispatch at the new tag) or by a
# manually pushed `v*` tag.
Expand All @@ -27,7 +28,23 @@ jobs:
with:
fetch-depth: 0

- name: Extract changelog section for this version
id: changelog
run: |
VERSION="${GITHUB_REF_NAME#v}"
if [ -f CHANGELOG.md ]; then
awk -v ver="$VERSION" '
$0 ~ ("^## \\[" ver "\\]") { capture = 1; next }
capture && /^## \[/ { exit }
capture { print }
' CHANGELOG.md > release-notes.md
fi
if [ ! -s release-notes.md ]; then
echo "Release v${VERSION}. See the full changelog in CHANGELOG.md." > release-notes.md
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.md
generate_release_notes: true
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Changelog

All notable changes to the ChatBotKit Go SDK are documented in this file. The
format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

For releases prior to `0.2.0`, see the auto-generated notes on the
[GitHub Releases](https://github.com/chatbotkit/go-sdk/releases) page.

## [0.2.0] - 2026-06-22

### Added

- `SkillServer` integration client (`client.Integration.SkillServer`) with
`List`, `Fetch`, `Create`, `Update`, and `Delete`. The Skill Server
integration exposes a skillset's abilities as a text-first HTTP API.
- `Site` client under `Space` (`client.Space.Site`) with `List`, `Fetch`,
`Create`, `Update`, and `Delete`, keyed by the parent space ID. A space site
binds a `<label>.chatbotkit.space` subdomain to static content served from a
space's storage.
- `alias` field on PartnerUser requests for instance identification.
- `BotID` field on the Bulletin struct for bot association.

### Changed

- Re-generated request/response types from the latest API spec, including the
`alias` field now present across integration create/update requests.

### Fixed

- Re-pointed conversation message role and parameter type aliases after a
generated type rotation.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.1
0.2.0
3 changes: 3 additions & 0 deletions sdk/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ type Client struct {
Email *EmailClient
// McpServer provides access to MCP server integration resources.
McpServer *McpServerClient
// SkillServer provides access to skill server integration resources.
SkillServer *SkillServerClient
// Microsoftteams provides access to Microsoft Teams integration resources.
Microsoftteams *MicrosoftteamsClient
// GoogleChat provides access to Google Chat integration resources.
Expand All @@ -63,6 +65,7 @@ func NewClient(httpClient *httpclient.Client) *Client {
Twilio: NewTwilioClient(httpClient),
Email: NewEmailClient(httpClient),
McpServer: NewMcpServerClient(httpClient),
SkillServer: NewSkillServerClient(httpClient),
Microsoftteams: NewMicrosoftteamsClient(httpClient),
GoogleChat: NewGoogleChatClient(httpClient),
}
Expand Down
77 changes: 77 additions & 0 deletions sdk/integration/skillserver.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
package integration

import (
"context"
"fmt"
"net/url"

"github.com/chatbotkit/go-sdk/internal/httpclient"
"github.com/chatbotkit/go-sdk/internal/params"
"github.com/chatbotkit/go-sdk/types"
)

// SkillServerClient provides access to skill server integration resources.
type SkillServerClient struct {
httpClient *httpclient.Client
}

// NewSkillServerClient creates a new SkillServerClient.
func NewSkillServerClient(httpClient *httpclient.Client) *SkillServerClient {
return &SkillServerClient{httpClient: httpClient}
}

// List retrieves a list of skill server integrations.
func (c *SkillServerClient) List(ctx context.Context, opts *types.SkillServerIntegrationListParams) (*types.SkillServerIntegrationListResponse, error) {
query := url.Values{}
if opts != nil {
query = params.BuildListQuery(opts.Cursor, opts.Order, opts.Take, opts.Meta)
}

var result types.SkillServerIntegrationListResponse
if err := c.httpClient.Get(ctx, "/api/v1/integration/skillserver/list", query, &result); err != nil {
return nil, err
}
return &result, nil
}

// Fetch retrieves a skill server integration by ID.
func (c *SkillServerClient) Fetch(ctx context.Context, skillServerID string) (*types.SkillServerIntegrationFetchResponse, error) {
path := fmt.Sprintf("/api/v1/integration/skillserver/%s/fetch", skillServerID)

var result types.SkillServerIntegrationFetchResponse
if err := c.httpClient.Get(ctx, path, nil, &result); err != nil {
return nil, err
}
return &result, nil
}

// Create creates a skill server integration.
func (c *SkillServerClient) Create(ctx context.Context, req types.SkillServerIntegrationCreateRequest) (*types.SkillServerIntegrationCreateResponse, error) {
var result types.SkillServerIntegrationCreateResponse
if err := c.httpClient.Post(ctx, "/api/v1/integration/skillserver/create", req, &result); err != nil {
return nil, err
}
return &result, nil
}

// Update updates a skill server integration.
func (c *SkillServerClient) Update(ctx context.Context, skillServerID string, req types.SkillServerIntegrationUpdateRequest) (*types.SkillServerIntegrationUpdateResponse, error) {
path := fmt.Sprintf("/api/v1/integration/skillserver/%s/update", skillServerID)

var result types.SkillServerIntegrationUpdateResponse
if err := c.httpClient.Post(ctx, path, req, &result); err != nil {
return nil, err
}
return &result, nil
}

// Delete deletes a skill server integration.
func (c *SkillServerClient) Delete(ctx context.Context, skillServerID string) (*types.SkillServerIntegrationDeleteResponse, error) {
path := fmt.Sprintf("/api/v1/integration/skillserver/%s/delete", skillServerID)

var result types.SkillServerIntegrationDeleteResponse
if err := c.httpClient.Post(ctx, path, types.SkillServerIntegrationDeleteRequest{}, &result); err != nil {
return nil, err
}
return &result, nil
}
72 changes: 72 additions & 0 deletions sdk/space.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ type SpaceClient struct {
httpClient *httpclient.Client
// Storage provides access to space storage resources.
Storage *SpaceStorageClient
// Site provides access to space site resources.
Site *SpaceSiteClient
}

// NewSpaceClient creates a new SpaceClient.
func NewSpaceClient(httpClient *httpclient.Client) *SpaceClient {
return &SpaceClient{
httpClient: httpClient,
Storage: NewSpaceStorageClient(httpClient),
Site: NewSpaceSiteClient(httpClient),
}
}

Expand Down Expand Up @@ -177,3 +180,72 @@ func encodeStoragePath(path string) string {
}
return strings.Join(segments, "/")
}

// SpaceSiteClient provides access to space site resources.
type SpaceSiteClient struct {
httpClient *httpclient.Client
}

// NewSpaceSiteClient creates a new SpaceSiteClient.
func NewSpaceSiteClient(httpClient *httpclient.Client) *SpaceSiteClient {
return &SpaceSiteClient{httpClient: httpClient}
}

// List retrieves a list of all sites in a space.
func (c *SpaceSiteClient) List(ctx context.Context, spaceID string, opts *types.SpaceSiteListParams) (*types.SpaceSiteListResponse, error) {
path := fmt.Sprintf("/api/v1/space/%s/site/list", spaceID)
query := url.Values{}
if opts != nil {
query = params.BuildListQuery(opts.Cursor, opts.Order, opts.Take, opts.Meta)
}

var result types.SpaceSiteListResponse
if err := c.httpClient.Get(ctx, path, query, &result); err != nil {
return nil, err
}
return &result, nil
}

// Fetch retrieves a single space site by ID.
func (c *SpaceSiteClient) Fetch(ctx context.Context, spaceID, siteID string) (*types.SpaceSiteFetchResponse, error) {
path := fmt.Sprintf("/api/v1/space/%s/site/%s/fetch", spaceID, siteID)

var result types.SpaceSiteFetchResponse
if err := c.httpClient.Get(ctx, path, nil, &result); err != nil {
return nil, err
}
return &result, nil
}

// Create creates a new space site.
func (c *SpaceSiteClient) Create(ctx context.Context, spaceID string, req types.SpaceSiteCreateRequest) (*types.SpaceSiteCreateResponse, error) {
path := fmt.Sprintf("/api/v1/space/%s/site/create", spaceID)

var result types.SpaceSiteCreateResponse
if err := c.httpClient.Post(ctx, path, req, &result); err != nil {
return nil, err
}
return &result, nil
}

// Update updates a space site.
func (c *SpaceSiteClient) Update(ctx context.Context, spaceID, siteID string, req types.SpaceSiteUpdateRequest) (*types.SpaceSiteUpdateResponse, error) {
path := fmt.Sprintf("/api/v1/space/%s/site/%s/update", spaceID, siteID)

var result types.SpaceSiteUpdateResponse
if err := c.httpClient.Post(ctx, path, req, &result); err != nil {
return nil, err
}
return &result, nil
}

// Delete deletes a space site.
func (c *SpaceSiteClient) Delete(ctx context.Context, spaceID, siteID string) (*types.SpaceSiteDeleteResponse, error) {
path := fmt.Sprintf("/api/v1/space/%s/site/%s/delete", spaceID, siteID)

var result types.SpaceSiteDeleteResponse
if err := c.httpClient.Post(ctx, path, types.SpaceSiteDeleteRequest{}, &result); err != nil {
return nil, err
}
return &result, nil
}
24 changes: 12 additions & 12 deletions types/aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@ package types

// CompleteMessageType is the role of a message sent in a conversation complete
// request.
type CompleteMessageType = FriskyType
type CompleteMessageType = Type2

const (
// CompleteMessageRoleUser marks a sent message authored by the end user.
CompleteMessageRoleUser = AmbitiousUser
CompleteMessageRoleUser = MischievousUser
// CompleteMessageRoleBot marks a sent message authored by the bot.
CompleteMessageRoleBot = AmbitiousBot
CompleteMessageRoleBot = MischievousBot
)

// --- Conversation message list item role ---

// MessageItemType is the role of a message returned from a conversation message
// listing.
type MessageItemType = IndecentType
type MessageItemType = HilariousType

const (
// MessageItemRoleUser marks a listed message authored by the end user.
MessageItemRoleUser = IndecentUser
MessageItemRoleUser = HilariousUser
// MessageItemRoleBot marks a listed message authored by the bot.
MessageItemRoleBot = IndecentBot
MessageItemRoleBot = HilariousBot
)

// --- Conversation complete request (stateful) extensions ---

type (
// CompleteDataset is an inline dataset on a conversation complete request.
CompleteDataset = IndecentDataset
CompleteDataset = AmbitiousDataset
// CompleteRecord is a record within a CompleteDataset.
CompleteRecord = IndecentRecord
// CompleteFeature is an inline feature on a conversation complete request.
CompleteFeature = IndecentFeature
// CompleteSkillset is an inline skillset on a conversation complete request.
CompleteSkillset = IndecentSkillset
CompleteSkillset = AmbitiousSkillset
// CompleteAbility is an ability within a CompleteSkillset.
CompleteAbility = IndecentAbility
)
Expand All @@ -65,7 +65,7 @@ type (
CompleteFunctionParameters = IndigoParameters
// CompleteFunctionResult is the result configuration of a function on a
// conversation complete request.
CompleteFunctionResult = IndigoResult
CompleteFunctionResult = FriskyResult
)

// CompleteFunctionParametersTypeObject is the "object" value of a function
Expand All @@ -77,15 +77,15 @@ const CompleteFunctionParametersTypeObject = IndigoObject
type (
// MessageCompleteDataset is an inline dataset on a conversation message
// complete request.
MessageCompleteDataset = PurpleDataset
MessageCompleteDataset = TentacledDataset
// MessageCompleteRecord is a record within a MessageCompleteDataset.
MessageCompleteRecord = PurpleRecord
// MessageCompleteFeature is an inline feature on a conversation message
// complete request.
MessageCompleteFeature = PurpleFeature
// MessageCompleteSkillset is an inline skillset on a conversation message
// complete request.
MessageCompleteSkillset = PurpleSkillset
MessageCompleteSkillset = TentacledSkillset
// MessageCompleteAbility is an ability within a MessageCompleteSkillset.
MessageCompleteAbility = PurpleAbility
)
Expand All @@ -98,7 +98,7 @@ type (
MessageCompleteFunctionParameters = PurpleParameters
// MessageCompleteFunctionResult is the result configuration of a function
// on a conversation message complete request.
MessageCompleteFunctionResult = PurpleResult
MessageCompleteFunctionResult = HilariousResult
)

// MessageCompleteFunctionParametersTypeObject is the "object" value of a
Expand Down
Loading
Loading