feat(realtime): add realtimeBaseUrl option to createDecartClient#91
Merged
AdirAmsalem merged 1 commit intomainfrom Feb 23, 2026
Merged
feat(realtime): add realtimeBaseUrl option to createDecartClient#91AdirAmsalem merged 1 commit intomainfrom
AdirAmsalem merged 1 commit intomainfrom
Conversation
Allow overriding the default wss://api3.decart.ai WebSocket base URL for realtime connections via a new realtimeBaseUrl option on createDecartClient(). Useful for self-hosted or custom deployments. - Add realtimeBaseUrl to Zod schema, TypeScript types, and JSDoc - Wire through to realtime client with fallback to default URL - Add validation error handling for invalid realtimeBaseUrl - Add unit tests for invalid URL and custom URL scenarios - Add realtimeBaseUrl input to test page (index.html) - Add usage example (examples/sdk-core/realtime/custom-base-url.ts)
bb096ce to
69f4aa8
Compare
commit: |
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.
Summary
realtimeBaseUrloption tocreateDecartClient()to override the defaultwss://api3.decart.aiWebSocket base URL for realtime connectionsChanges
packages/sdk/src/index.ts— AddedrealtimeBaseUrlto Zod schema, TypeScript types, JSDoc, error handling, and wiring to the realtime clientpackages/sdk/tests/unit.test.ts— Added tests for invalid URL validation and custom URL creationpackages/sdk/index.html— Added optional "Realtime Base URL" input field to the test pageexamples/sdk-core/realtime/custom-base-url.ts— New usage exampleexamples/sdk-core/README.md— Added example entryUsage
When
realtimeBaseUrlis omitted, the defaultwss://api3.decart.aiis used (no breaking change).Note
Low Risk
Additive configuration change with URL validation and tests; main risk is misconfiguration causing realtime connection failures.
Overview
Adds an optional
realtimeBaseUrltocreateDecartClientto override the defaultwss://api3.decart.aiused for realtime (WebRTC) connections.Updates input validation/types/JSDoc and error handling to treat invalid
realtimeBaseUrllikebaseUrl, wires the value into realtime client creation, and adds unit tests. Also updates the SDK testindex.htmlandexamples/sdk-corewith a new custom-base-url example and README entry showing how to configure it.Written by Cursor Bugbot for commit 69f4aa8. This will update automatically on new commits. Configure here.