Conversation
- Replace custom WebSocket SignallingClient with Ably Realtime implementation - Remove heartbeat logic as Ably handles connection health automatically - Update ClientConfigResponse to use ablyToken and ablyChannel - Hardcode Ably channel rewind parameter to 100 messages - Defer connection initialization to connect() method for better resource management - Add proper error handling for uninitialized connections - Remove message buffering in favor of explicit connection errors - Add Ably SDK v2.9.0 dependency 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
…for new signalling channel
feat: Working ably connections
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the signalling infrastructure from WebSocket to Ably PubSub, removing custom WebSocket logic and heartbeat mechanisms. The changes also introduce deprecation of brainType in favor of llmId in PersonaConfig.
- WebSocket signalling replaced with Ably Realtime client and channel-based messaging
- SignallingClientOptions and related types updated to use Ably token and channel configuration
- Added deprecation warnings and support for both
brainTypeandllmIdfields during transition period
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/signalling/index.ts | Removed SignallingURLOptions export, keeping only SignallingClientOptions |
| src/types/signalling/SignallingClientOptions.ts | Replaced WebSocket config with Ably token and channel name |
| src/types/signalling/SignalMessage.ts | Added payload format handling and unencoded message conversion |
| src/types/coreApi/StartSessionResponse.ts | Updated client config to use Ably token and channel |
| src/types/PersonaConfig.ts | Added llmId field and updated type guard for backward compatibility |
| src/modules/SignallingClient.ts | Complete rewrite from WebSocket to Ably Realtime implementation |
| src/modules/CoreApiRestClient.ts | Added deprecation warnings for brainType usage |
| src/lib/constants.ts | Added supportsPubSubSignalling flag to client metadata |
| src/lib/ClientMetrics.ts | Extended metric tags type to support boolean values |
| src/AnamClient.ts | Updated to use new Ably configuration and added user message functionality |
| package.json | Added Ably dependency |
| README.md | Updated documentation with deprecation notice and llmId usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.