Skip to content

Sawra/sdk go fix#98

Merged
sawradip merged 9 commits into
mainfrom
sawra/sdk_go_fix
Nov 19, 2025
Merged

Sawra/sdk go fix#98
sawradip merged 9 commits into
mainfrom
sawra/sdk_go_fix

Conversation

@sawradip
Copy link
Copy Markdown
Contributor

@sawradip sawradip commented Nov 19, 2025

Summary by CodeRabbit

  • New Features

    • Go SDK with full client implementation, streaming support, and local agent discovery.
    • Rust SDK automated publishing workflow integration.
  • Documentation

    • Added Go SDK publishing guide and comprehensive README with usage examples.
  • Chores

    • Version bumped to 0.1.36 across all SDKs (Python, TypeScript, Go, Rust).
    • Updated package metadata and documentation URLs.

- Added support for native Go-shaped arguments in Run and RunStream methods.
- Enhanced README with a comprehensive feature overview, including usage examples for positional and keyword arguments.
- Updated example files to demonstrate the new argument handling capabilities.
- Improved error handling for argument validation in both Run and RunStream methods.
- Added detailed documentation on local vs remote configuration, including examples for client initialization.
- Improved error handling by enriching error payloads with user-friendly suggestions for common issues.
- Introduced a new convenience method, NextOrPanic, for streamlined error management in stream processing.
- Enhanced payload decoding to handle structured objects and improve error detection in stream frames.
- Introduced a new workflow for publishing the Rust SDK, including a dedicated `rust-release.yml` file.
- Updated `create-release.yml` to include the Rust SDK publishing step.
- Enhanced `reusable-sdk-release.yml` to support Rust-specific inputs and job execution.
- Implemented version verification and crate existence checks in the Rust release process.
- Updated all SDK versions to 0.1.35
- Generated changelog with git-cliff
- Updated all SDK versions to 0.1.36
- Generated changelog with git-cliff
- Updated changelog to reflect the new version 0.1.36
- Removed previous version details for clarity
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces Rust SDK release automation via new GitHub Actions workflows, implements a comprehensive Go SDK client with streaming and local/remote operation support, updates version numbers across all SDKs to 0.1.36, and adds Go SDK documentation and examples.

Changes

Cohort / File(s) Summary
Rust SDK Release Workflows
.github/workflows/create-release.yml, .github/workflows/reusable-sdk-release.yml, .github/workflows/rust-release.yml
Introduces Rust SDK publishing automation: new publish-rust job triggered after detect-release, reusable workflow updated to accept sdk: rust input with CARGO_REGISTRY_TOKEN secret, and new dedicated rust-release.yml workflow that verifies crate versions, runs tests, and publishes to crates.io.
Go SDK Client Implementation
runagent-go/runagent/client.go, runagent-go/runagent/types.go, runagent-go/runagent/errors.go, runagent-go/runagent/stream.go
Comprehensive Go client with NewRunAgentClient, Run/RunNative, RunStream/RunStreamNative methods; token-based input coercion (Arg, Kw, etc.); error taxonomy (RunAgentError, RunAgentExecutionError); and WebSocket streaming via StreamIterator with frame parsing and error handling.
Go SDK Configuration & Constants
runagent-go/runagent/pkg/constants/constants.go, runagent-go/runagent/pkg/db/db.go, runagent-go/runagent/pkg/server/server.go, runagent-go/runagent/pkg/utils/port.go
Extended constants for local agent discovery, host/port configuration, and timeouts; updated import paths to reflect new module structure.
Go SDK Examples & Documentation
runagent-go/examples/basic.go, runagent-go/examples/streaming.go, runagent-go/README.md, runagent-go/PUBLISH.md, runagent-go/go.mod
Updated examples to use new client API with error handling and Bool wrapper for config fields; comprehensive README covering authentication, local/remote modes, and streaming; detailed PUBLISH.md guide; added gorilla/mux and mattn/go-sqlite3 dependencies.
SDK Version Bumps
runagent-go/runagent/version.go, runagent-rust/runagent/Cargo.toml, runagent-ts/package.json, runagent/__version__.py, runagent/__init__.py, pyproject.toml, CHANGELOG.md
Updated version across all SDKs from 0.1.33–0.1.34 to 0.1.36; Rust Cargo.toml also updated homepage and documentation URLs.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Client as RunAgentClient
    participant Local as Local Agent
    participant Remote as Remote API
    participant Auth as Auth/Crates
    
    rect rgb(200, 220, 255)
    Note over User,Auth: Go SDK: Run Operation
    User->>Client: Run(ctx, values...)
    activate Client
    Client->>Client: coerceToRunInput(values)
    Client->>Client: Determine mode (local/remote)
    alt Local Mode
        Client->>Local: POST /api/v1/run
        Local-->>Client: response
    else Remote Mode
        Client->>Remote: POST + auth header
        Remote-->>Client: response
    end
    Client->>Client: parseRunResponse()
    Client-->>User: result or error
    deactivate Client
    end
    
    rect rgb(220, 240, 220)
    Note over User,Auth: Go SDK: Streaming
    User->>Client: RunStream(ctx, values...)
    activate Client
    Client->>Client: coerceToRunInput(values)
    alt Local Mode
        Client->>Local: WebSocket /api/v1/stream
    else Remote Mode
        Client->>Remote: WebSocket + token auth
    end
    Client-->>User: StreamIterator
    deactivate Client
    User->>User: stream.Next(ctx)
    activate User
    User->>User: Read WebSocket frame
    User->>User: Parse frame (status/data/error)
    alt Error in frame
        User->>User: Panic with RunAgentError
    else Data in frame
        User-->>User: Return payload
    end
    deactivate User
    end
    
    rect rgb(255, 240, 200)
    Note over Remote,Auth: Rust SDK Release Workflow
    Remote->>Auth: cargo publish
    activate Auth
    Auth->>Auth: Verify crate version vs Cargo.toml
    Auth->>Auth: Check if version exists
    alt Version already published
        Auth-->>Remote: Skip publish
    else Version new
        Auth->>Auth: Publish to crates.io
        Auth-->>Remote: Success
    end
    deactivate Auth
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Specific areas requiring attention:
    • Go SDK client logic (runagent-go/runagent/client.go): Complex input coercion, local/remote routing, error translation, and response parsing need careful verification.
    • WebSocket streaming (runagent-go/runagent/stream.go): Frame parsing, error detection, and panic-on-error semantics require thorough testing of edge cases.
    • Example correctness (runagent-go/examples/basic.go, streaming.go): Verify API usage matches new signatures and Bool wrapper usage is consistent.
    • Rust release workflow (.github/workflows/rust-release.yml): Validate crate version verification logic, publish gate conditions, and error handling.
    • Import path migrations: Confirm all updated import paths across runagent-go/runagent/pkg/* files are consistent with new module structure.

Possibly related PRs

  • updated more go streaming examples #54 — Updates Go streaming examples to use the new simplified Go client API and streaming calls, directly aligning with this PR's Go SDK client and streaming implementation.
  • release -> ci/cd -> version release #61 — Modifies the same release workflow (.github/workflows/create-release.yml) to add publishing steps; related at the CI/CD workflow integration level.
  • chore: bump version to v0.1.27 #87 — Makes overlapping edits to version/versioning files across SDKs (runagent-go, runagent-rust, runagent-ts, runagent-python), directly related version bump changes.

Poem

🐰 A rabbit hops through the forest of code,
Go clients and Rust workflows aligned on the road,
Streaming through WebSockets, from local to cloud,
Version 0.1.36 sings out proud!
Release gates open, the agents take flight,
Fuzzy friends ship it all through the night.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawra/sdk_go_fix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d9da15 and 2c47ce6.

⛔ Files ignored due to path filters (1)
  • runagent-ts/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (23)
  • .github/workflows/create-release.yml (1 hunks)
  • .github/workflows/reusable-sdk-release.yml (2 hunks)
  • .github/workflows/rust-release.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • pyproject.toml (3 hunks)
  • runagent-go/PUBLISH.md (1 hunks)
  • runagent-go/README.md (1 hunks)
  • runagent-go/examples/basic.go (1 hunks)
  • runagent-go/examples/streaming.go (1 hunks)
  • runagent-go/go.mod (1 hunks)
  • runagent-go/runagent/client.go (1 hunks)
  • runagent-go/runagent/errors.go (1 hunks)
  • runagent-go/runagent/pkg/constants/constants.go (1 hunks)
  • runagent-go/runagent/pkg/db/db.go (1 hunks)
  • runagent-go/runagent/pkg/server/server.go (1 hunks)
  • runagent-go/runagent/pkg/utils/port.go (1 hunks)
  • runagent-go/runagent/stream.go (1 hunks)
  • runagent-go/runagent/types.go (1 hunks)
  • runagent-go/runagent/version.go (1 hunks)
  • runagent-rust/runagent/Cargo.toml (1 hunks)
  • runagent-ts/package.json (1 hunks)
  • runagent/__init__.py (1 hunks)
  • runagent/__version__.py (1 hunks)

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sawradip sawradip merged commit a57b97a into main Nov 19, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant