A Gleam WebSocket consumer for AT Protocol Jetstream events.
1# Changelog 2 3All notable changes to this project will be documented in this file. 4 5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8## [2.0.0] - 2025-11-04 9 10### Changed 11- **BREAKING**: Migrated from Erlang's `gun` library to Gleam's `stratus` WebSocket client 12- **BREAKING**: Removed three configuration fields from `JetstreamConfig`: 13 - `max_backoff_seconds` (retry logic still works internally, capped at 60s) 14 - `log_connection_events` (connection logging removed) 15 - `log_retry_attempts` (retry logging removed) 16- Reduced Erlang FFI code from ~290 lines to ~40 lines 17- Improved code maintainability with more idiomatic Gleam implementation 18 19### Added 20- Vendored `stratus` WebSocket client internally (moved to `goose/stratus`) until a new version is published 21- New dependency: `simplifile` (>= 2.0.0 and < 3.0.0) 22- New dependencies (from stratus): `gleam_otp`, `gleam_crypto`, `logging`, `exception`, `gramps` 23 24### Removed 25- Dependency: `gun` (>= 2.2.0 and < 3.0.0) 26 27### Migration Guide 28If you're upgrading from v1.x, remove the following fields from your `JetstreamConfig`: 29```gleam 30// Before (v1.x) 31let config = goose.JetstreamConfig( 32 endpoint: "wss://jetstream2.us-east.bsky.network/subscribe", 33 wanted_collections: [], 34 wanted_dids: [], 35 cursor: option.None, 36 max_message_size_bytes: option.None, 37 compress: True, 38 require_hello: False, 39 max_backoff_seconds: 60, // Remove this 40 log_connection_events: True, // Remove this 41 log_retry_attempts: True, // Remove this 42) 43 44// After (v2.x) 45let config = goose.JetstreamConfig( 46 endpoint: "wss://jetstream2.us-east.bsky.network/subscribe", 47 wanted_collections: [], 48 wanted_dids: [], 49 cursor: option.None, 50 max_message_size_bytes: option.None, 51 compress: True, 52 require_hello: False, 53) 54``` 55 56All other functionality remains the same. Automatic retry with exponential backoff still works internally. 57 58## [1.1.0] - 2025-01-29 59 60### Added 61- Automatic retry logic with exponential backoff for all connections 62- Three new configuration fields in `JetstreamConfig`: 63 - `max_backoff_seconds: Int` - Maximum wait time between retries (default: 60) 64 - `log_connection_events: Bool` - Log connection state changes (default: True) 65 - `log_retry_attempts: Bool` - Log detailed retry information (default: True) 66 67### Changed 68- `start_consumer()` now automatically retries failed connections and handles disconnections 69- Enhanced error handling distinguishes between harmless timeouts and real connection failures 70 71### Fixed 72- Connection failures no longer cause application to stop 73- Harmless 60-second timeouts no longer trigger unnecessary reconnections 74- WebSocket disconnections are handled gracefully with automatic reconnection 75 76## [1.0.0] - 2024-10-28 77 78### Added 79- Initial release 80- WebSocket consumer for AT Protocol Jetstream events 81- Support for collection and DID filtering 82- Zstd compression support 83- Cursor-based replay 84- Event parsing for Commit, Identity, and Account events