@craftedxp/voice-js 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -344,7 +344,10 @@ Renders a floating call button with a Shadow-DOM transcript panel. Pre-mint the
344
344
 
345
345
  ## Status
346
346
 
347
- - **0.3.2** (current) — bug fix: `onStateChange` now fires for state transitions driven by server frames (`connected listening`, `agent_turn_start agent_speaking`, etc.). Latent regression since 0.2.0; `onTranscript`-only consumers were unaffected, but anyone deriving UI from `onStateChange` should upgrade. No API changes — drop-in.
347
+ - **0.4.2** (current) — WebRTC reliability: `onicecandidate` + `onconnectionstatechange` listeners now register before `setLocalDescription` (where ICE gathering starts). Candidates emitted before `callId` is known are buffered and flushed once the answer arrives. Browsers buffer candidates internally so the prior listen-after-`setRemoteDescription` pattern worked in Chrome/Safari, but the explicit ordering is correct per spec and matches the fix shipped in `@craftedxp/voice-rn@0.4.1`. No API surface change — drop-in upgrade.
348
+ - 0.4.1 — `client_tools` over the WebRTC DataChannel — tool register on `connected`, dispatch on `client_tool_call` frames, parity with the WS transport.
349
+ - 0.4.0 — WebRTC transport support. `fetchToken` may now return `{ token, transport, webrtcGatewayBase? }`; the SDK dispatches WS vs WebRTC accordingly. Backwards-compatible — bare-string returns still always use WS.
350
+ - 0.3.2 — bug fix: `onStateChange` now fires for state transitions driven by server frames (`connected → listening`, `agent_turn_start → agent_speaking`, etc.). Latent regression since 0.2.0; `onTranscript`-only consumers were unaffected, but anyone deriving UI from `onStateChange` should upgrade. No API changes — drop-in.
348
351
  - 0.3.1 — adds `onInterrupt` / `onAgentTurnStart` callbacks on `StartCallOptions` and `NodeVoiceClientFactory` proper return type for the Node entry. Backwards-compatible. **Use 0.3.2 instead** — both new callbacks depend on the state-callback path that 0.3.2 fixes.
349
352
  - 0.3.0 — adds client-tools support. New `clientTools` option on `startCall` accepts a `ClientToolMap` (description, parameters, handler, optional usage/timeoutMs/example). Browser and Node bundles both supported. Backwards-compatible — existing consumers see no change.
350
353
  - 0.2.0 — first `@craftedxp/voice-js` release. Browser + Node dual bundle, `fetchToken` factory, voice-rn 0.3.x parity. Migration path from `@voxline/web@0.1.0` documented above.