From 61cec0e4e1155d52db2cb8fa64f21e0a965c2977 Mon Sep 17 00:00:00 2001 From: pdparchitect Date: Thu, 11 Jun 2026 22:06:22 +0000 Subject: [PATCH] - fix: standardize punctuation in comments and documentation - chore: update README files across SDKs to add Twitter follow badge and improve descriptions - refactor: remove unused fields and rename resource map for consistency --- .github/workflows/release.yml | 2 +- Makefile | 2 +- README.md | 31 +++++++++++--- examples/README.md | 2 +- examples/agent-with-embedded-skills/README.md | 14 +++---- examples/agent-with-embedded-skills/main.go | 4 +- examples/chatbot/README.md | 2 +- examples/stateful-agent/README.md | 14 +++---- types/types.go | 41 ++++++++++--------- 9 files changed, 67 insertions(+), 45 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fa8abc..517d431 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,6 @@ # Release workflow for the go-sdk. # -# go-sdk is a library, not a binary — for a Go module the git tag *is* the +# 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. diff --git a/Makefile b/Makefile index 00ac320..130a682 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ lint: vet fmt-check @if command -v golangci-lint > /dev/null 2>&1; then \ golangci-lint run $(PACKAGES); \ else \ - echo "golangci-lint not installed — skipping (run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest)"; \ + echo "golangci-lint not installed - skipping (run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest)"; \ fi tidy: diff --git a/README.md b/README.md index e43bb49..f66f8f4 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,37 @@ +[![ChatBotKit](https://img.shields.io/badge/credits-ChatBotKit-blue.svg)](https://chatbotkit.com) +[![CBK.AI](https://img.shields.io/badge/credits-CBK.AI-blue.svg)](https://cbk.ai) +[![Email](https://img.shields.io/badge/Email-Support-blue?logo=mail.ru)](mailto:support@chatbotkit.com) +[![Discord](https://img.shields.io/badge/Discord-Support-blue?logo=discord)](https://go.cbk.ai/discord) +[![Go Reference](https://pkg.go.dev/badge/github.com/chatbotkit/go-sdk.svg)](https://pkg.go.dev/github.com/chatbotkit/go-sdk) +[![Follow on Twitter](https://img.shields.io/twitter/follow/chatbotkit.svg?logo=twitter)](https://twitter.com/chatbotkit) + +```text + .d8888b. 888888b. 888 d8P +d88P Y88b 888 "88b 888 d8P +888 888 888 .88P 888 d8P +888 8888888K. 888d88K +888 888 "Y88b 8888888b +888 888 888 888 888 Y88b +Y88b d88P 888 d88P 888 Y88b + "Y8888P" 8888888P" 888 Y88b .ai +``` + # ChatBotKit Go SDK -The official Go SDK for [ChatBotKit](https://chatbotkit.com) - a platform for building and deploying conversational AI applications. +The official Go SDK for [ChatBotKit](https://chatbotkit.com) - a platform for +building and deploying conversational AI applications. With ChatBotKit you can +create bots and agents with custom data, skillsets, and integrations while +keeping AI orchestration on the ChatBotKit platform. ## Why ChatBotKit? -**Build lighter, future-proof AI agents.** When you build with ChatBotKit, the heavy lifting happens on our servers-not in your application. This architectural advantage delivers: +**Build lighter, future-proof AI agents.** When you build with ChatBotKit, the heavy lifting happens on our servers, not in your application. This architectural advantage delivers: - ðŸŠķ **Lightweight Agents**: Your agents stay lean because complex AI processing, model orchestration, and tool execution happen server-side. Less code in your app means faster load times and simpler maintenance. - ðŸ›Ąïļ **Robust & Streamlined**: Server-side processing provides a more reliable experience with built-in error handling, automatic retries, and consistent behavior across all platforms. -- 🔄 **Backward & Forward Compatible**: As AI technology evolves-new models, new capabilities, new paradigms-your agents automatically benefit. No code changes required on your end. +- 🔄 **Backward & Forward Compatible**: As AI technology evolves with new models, new capabilities, and new paradigms, your agents automatically benefit. No code changes required on your end. - ðŸ”Ū **Future-Proof**: Agents you build today will remain capable tomorrow. When we add support for new AI models or capabilities, your existing agents gain those powers without any updates to your codebase. @@ -575,10 +596,10 @@ if err != nil { ## Releasing -Versions are published as Git tags — for a Go module, the tag _is_ the release. +Versions are published as Git tags - for a Go module, the tag _is_ the release. The version is driven by the [`VERSION`](VERSION) file: -1. Bump `VERSION` (semver, no `v` prefix — e.g. `0.2.0`) in a pull request. +1. Bump `VERSION` (semver, no `v` prefix - e.g. `0.2.0`) in a pull request. 2. Merge to `main`. The `Tag Release` workflow reads `VERSION` and, if the matching `vX.Y.Z` tag does not yet exist, creates and pushes it, then triggers the `Release` workflow to publish GitHub release notes. diff --git a/examples/README.md b/examples/README.md index 853f208..354ea6b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -176,7 +176,7 @@ tools := agent.Tools{ An autonomous agent that ships with skill definitions baked into the binary using Go's `embed` package: - Embeds a `skills/` directory at compile time with `//go:embed` -- Loads skills from `embed.FS` via `agent.LoadSkillsFromFS` — no temp-directory extraction needed +- Loads skills from `embed.FS` via `agent.LoadSkillsFromFS` - no temp-directory extraction needed - Bundles skills as a feature passed to `agent.ExecuteWithTools` - Produces a single self-contained executable with no external skill files diff --git a/examples/agent-with-embedded-skills/README.md b/examples/agent-with-embedded-skills/README.md index 9c8254e..5f9724c 100644 --- a/examples/agent-with-embedded-skills/README.md +++ b/examples/agent-with-embedded-skills/README.md @@ -11,12 +11,12 @@ Demonstrates bundling skill definitions directly into the executable using Go's ## Skills bundled in this example -| Skill | Description | -| --- | --- | +| Skill | Description | +| ------------- | ------------------------------------------------------------------ | | `Code Review` | Reviews code snippets for correctness, style, and potential issues | -| `Summarize` | Condenses long text into a concise summary | +| `Summarize` | Condenses long text into a concise summary | -Add more skills by creating a new subdirectory under `skills/` with a `SKILL.md` file — they are picked up automatically at compile time. +Add more skills by creating a new subdirectory under `skills/` with a `SKILL.md` file - they are picked up automatically at compile time. ## Usage @@ -34,8 +34,8 @@ go run . ``` Loaded 2 embedded skill(s): - â€Ē Code Review — Reviews code snippets for correctness, style, and potential issues... - â€Ē Summarize — Condenses long text into a concise summary, preserving key points... + â€Ē Code Review - Reviews code snippets for correctness, style, and potential issues... + â€Ē Summarize - Condenses long text into a concise summary, preserving key points... Task: Summarize the following text in bullet style: ... @@ -86,4 +86,4 @@ Extended documentation... ## Difference from `agent.LoadSkills` -`LoadSkills` reads from OS directories at runtime and sets `SkillDefinition.Path` to an absolute filesystem path. `LoadSkillsFromFS` accepts any `fs.FS` — including `embed.FS` — and sets `Path` to the FS-relative directory name (e.g. `"code-review"`). The rest of the API is identical. +`LoadSkills` reads from OS directories at runtime and sets `SkillDefinition.Path` to an absolute filesystem path. `LoadSkillsFromFS` accepts any `fs.FS` - including `embed.FS` - and sets `Path` to the FS-relative directory name (e.g. `"code-review"`). The rest of the API is identical. diff --git a/examples/agent-with-embedded-skills/main.go b/examples/agent-with-embedded-skills/main.go index 0cbbc4b..ccf4566 100644 --- a/examples/agent-with-embedded-skills/main.go +++ b/examples/agent-with-embedded-skills/main.go @@ -6,7 +6,7 @@ // ships as a single self-contained executable with no external skill files. // // The skills/ directory is embedded at compile time. At startup the embedded -// FS is passed directly to agent.LoadSkillsFromFS — no temp-directory +// FS is passed directly to agent.LoadSkillsFromFS - no temp-directory // extraction required. // // Usage: @@ -78,7 +78,7 @@ fast compilation.` skills := skillsResult.GetSkills() fmt.Printf("Loaded %d embedded skill(s):\n", len(skills)) for _, s := range skills { - fmt.Printf(" â€Ē %s — %s\n", s.Name, s.Description) + fmt.Printf(" â€Ē %s - %s\n", s.Name, s.Description) } fmt.Println() diff --git a/examples/chatbot/README.md b/examples/chatbot/README.md index 89c96e7..0e89cc4 100644 --- a/examples/chatbot/README.md +++ b/examples/chatbot/README.md @@ -30,7 +30,7 @@ ChatBot ready! Type your message and press Enter. Type 'exit' to quit. user: Hello! What can you do? bot: Hello! I'm an AI assistant powered by ChatBotKit. I can help you with a -variety of tasks — answering questions, explaining concepts, writing, brainstorming, +variety of tasks - answering questions, explaining concepts, writing, brainstorming, and much more. What would you like to discuss? user: Tell me a short joke diff --git a/examples/stateful-agent/README.md b/examples/stateful-agent/README.md index 7c07a20..a2d4a9a 100644 --- a/examples/stateful-agent/README.md +++ b/examples/stateful-agent/README.md @@ -11,12 +11,12 @@ Demonstrates the same manually-driven `agent.CompleteWithTools` loop as the stat ## When to use this pattern -| Use case | Why | -| --- | --- | -| Persisted history | The server stores every message; no local slice to maintain | -| Remote orchestration | Resume a long-running conversation by ID from any process | -| Recovery | Restart without reconstructing a local message array | -| Inspection | Query the final conversation state via the API after the loop | +| Use case | Why | +| -------------------- | ------------------------------------------------------------- | +| Persisted history | The server stores every message; no local slice to maintain | +| Remote orchestration | Resume a long-running conversation by ID from any process | +| Recovery | Restart without reconstructing a local message array | +| Inspection | Query the final conversation state via the API after the loop | ## Usage @@ -51,7 +51,7 @@ Bot: The weather in San Francisco is sunny at 72°F... ## Key difference from the stateless example -The stateless example appends `MessageAgentEvent` entries to a local `[]agent.Message` slice. Here, that slice is replaced by a server-side conversation — the only state the loop tracks locally is the conversation ID and whether to send `Text` on the next call: +The stateless example appends `MessageAgentEvent` entries to a local `[]agent.Message` slice. Here, that slice is replaced by a server-side conversation - the only state the loop tracks locally is the conversation ID and whether to send `Text` on the next call: ```go nextText := &userPrompt // send prompt on first iteration diff --git a/types/types.go b/types/types.go index f36ddb4..f0d6ff4 100644 --- a/types/types.go +++ b/types/types.go @@ -11099,11 +11099,14 @@ type BlueprintBulletinCreateResponse struct { } type Bulletin struct { - Author *string `json:"author,omitempty"` - CreatedAt float64 `json:"createdAt"` - ExpiresAt float64 `json:"expiresAt"` - ID string `json:"id"` - Text string `json:"text"` + // The display name of the author who posted the bulletin (a bot or a user) + Author *string `json:"author,omitempty"` + // The ID of the bot the bulletin is associated with, when posted by a bot + BotID *string `json:"botId,omitempty"` + CreatedAt float64 `json:"createdAt"` + ExpiresAt float64 `json:"expiresAt"` + ID string `json:"id"` + Text string `json:"text"` } type BlueprintBulletinListParams struct { @@ -11124,16 +11127,18 @@ type BlueprintBulletinListResponse struct { } type BlueprintBulletinListResponseItem struct { - // The ID of the bot that posted the bulletin - Author *string `json:"author,omitempty"` - // The epoch millisecond timestamp when the bulletin was created - CreatedAt float64 `json:"createdAt"` - // The epoch millisecond timestamp when the bulletin expires - ExpiresAt float64 `json:"expiresAt"` - // The unique identifier of the bulletin - ID string `json:"id"` - // The message body - Text string `json:"text"` + // The display name of the author who posted the bulletin (a bot or a user) + Author *string `json:"author,omitempty"` + // The ID of the bot the bulletin is associated with, when posted by a bot + BotID *string `json:"botId,omitempty"` + // The epoch millisecond timestamp when the bulletin was created + CreatedAt float64 `json:"createdAt"` + // The epoch millisecond timestamp when the bulletin expires + ExpiresAt float64 `json:"expiresAt"` + // The unique identifier of the bulletin + ID string `json:"id"` + // The message body + Text string `json:"text"` } type BlueprintCloneParams struct { @@ -11193,12 +11198,8 @@ type BlueprintResourcesExportParams struct { } type BlueprintResourcesExportResponse struct { - // The description of the blueprint - Description *string `json:"description,omitempty"` // The ID of the blueprint ID string `json:"id"` - // The name of the blueprint - Name *string `json:"name,omitempty"` // A map of the resources by category Resources map[string]interface{} `json:"resources"` } @@ -11208,7 +11209,7 @@ type BlueprintResourcesImportParams struct { } type BlueprintResourcesImportRequest struct { - Resource map[string]interface{} `json:"resource"` + Resources map[string]interface{} `json:"resources"` } type BlueprintResourceListParams struct {