-
Notifications
You must be signed in to change notification settings - Fork 688
Golang sdk #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Golang sdk #339
Conversation
Implements comprehensive event handling for the Go SDK including: - Message, run, state, and thinking events - Custom event support - Tool event handling - Event decoding and ID generation utilities - Test coverage for core functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add tests for EventDecoder covering all event types (100% coverage) - Add tests for ID generation utilities (DefaultIDGenerator, TimestampIDGenerator) - Add tests for previously untested event methods (ToJSON, ID, auto ID generation) - Add tests for chunk events (TextMessageChunk, ToolCallChunk) - Add tests for ToolCallResult events - Improve overall test coverage from 43.9% to 84.8% - Verify thread safety with concurrent ID generation tests - Add edge case testing for invalid inputs All 166 test cases passing with no race conditions detected. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Implement SSE client with retry logic and event handling - Add comprehensive unit tests with 100% coverage - Support custom headers and error handling - Include exponential backoff for reconnection attempts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add comprehensive encoding package with JSON support - Implement content negotiation for Accept headers - Add buffer sizing utilities and encoder pool - Add error types and utilities package - Include unit tests for negotiation functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Added extensive test coverage for SSE client streaming functionality - Coverage improved from 12.5% to 97.1% for the SSE client package - Tests cover authentication, error handling, context cancellation, multiline data, concurrent operations, and timeout scenarios - Added performance benchmarks for streaming operations - Overall SDK test coverage now at 82.6% 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Implement SSE (Server-Sent Events) writer for Go SDK with: - Thread-safe SSE frame creation and writing - Support for custom event types and IDs - Proper escaping of newlines in JSON data - Error event handling with request IDs - Content negotiation support - Automatic flushing for compatible writers - CustomEvent implementation for flexible event creation - Comprehensive unit tests with 100% coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add main Go SDK overview with installation and getting started guide - Add client package documentation for SSE client implementation - Add core package documentation for events and types - Add encoding package documentation for marshaling/unmarshaling - Add errors package documentation for error handling - Include code examples and API references for all packages 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Hey @mattsp1290, it's looking like you're making a lot of progress. Do you need anything from our end? |
I have gone through this again and I think this is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks awesome @mattsp1290! For the tests, would you mind adding a new Github Action to actually run them so we can validate they are working on this PR?
- Add Go test job following Python and TypeScript patterns - Set up Go 1.24.4 environment - Cache Go modules for faster builds - Run all tests in sdks/community/go with verbose output 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Added Github Actions |
Add a golang sdk for clients and servers. Includes working example and documentation.