Sawra/sdk go fix#98
Conversation
- 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
|
Caution Review failedThe pull request is closed. WalkthroughThis 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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (23)
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.
Example instruction:
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. Comment |
Summary by CodeRabbit
New Features
Documentation
Chores