Skip to content

Conversation

mattsp1290
Copy link

@mattsp1290 mattsp1290 commented Sep 2, 2025

Add a golang sdk for clients and servers. Includes working example and documentation.

mattsp1290 and others added 9 commits August 31, 2025 20:23
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]>
@NathanTarbert
Copy link
Contributor

Hey @mattsp1290, it's looking like you're making a lot of progress.

Do you need anything from our end?

@mattsp1290 mattsp1290 marked this pull request as ready for review September 16, 2025 14:37
@mattsp1290
Copy link
Author

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.

@mattsp1290 mattsp1290 mentioned this pull request Sep 16, 2025
Copy link
Contributor

@tylerslaton tylerslaton left a 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?

This was referenced Sep 17, 2025
- 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]>
@mattsp1290
Copy link
Author

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?

Added Github Actions

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.

3 participants