@voxevolv/client 0.3.2 → 0.3.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  All notable changes to `@voxevolv/client` are recorded here.
4
4
 
5
+ ## 0.3.4 - 2026-09-22
6
+
7
+ - Add a typed `trigger` and safe command correlation fields to every recovery event.
8
+ - Keep the latest 128 content-free diagnostic entries in memory and report them
9
+ only after a slow operation, rejection, failure, timeout, or reconnect.
10
+ - Send triggered reports through the session-scoped diagnostics endpoint without
11
+ exposing context text, images, tokens, or request URLs, and never let reporting
12
+ failures affect the realtime call.
13
+ - Coalesce rate-limited triggers into a trailing report and stop waiting on a
14
+ diagnostics request after five seconds, so later failure evidence is not lost.
15
+
16
+ ## 0.3.3 - 2026-09-17
17
+
18
+ - Add identified, revisioned transcript snapshots with `onTranscriptUpdated()` and `session.transcript`.
19
+ - Reconcile late finals, corrected text, interruption, and replay by message identity. Legacy callbacks remain available.
20
+
5
21
  ## 0.3.2 - 2026-09-17
6
22
 
7
23
  - Recover from agent loss even while the room remains connected, with a default three-minute recovery deadline.
package/README.md CHANGED
@@ -26,7 +26,7 @@ Browsers without a build step can use the versioned bundle after publication:
26
26
  ```html
27
27
  <script type="module">
28
28
  import { RealtimeSession } from
29
- "https://cdn.jsdelivr.net/npm/@voxevolv/client@0.3.2/dist/browser/index.js";
29
+ "https://cdn.jsdelivr.net/npm/@voxevolv/client@0.3.4/dist/browser/index.js";
30
30
  </script>
31
31
  ```
32
32
 
@@ -47,8 +47,10 @@ const session = await RealtimeSession.create({
47
47
  },
48
48
  });
49
49
 
50
- session.onUserTranscript(({ text, final }) => renderUser(text, final));
51
- session.onAgentTranscript(({ text, final }) => renderAgent(text, final));
50
+ session.onTranscriptUpdated(message => {
51
+ // Replace this message by ID, including when it is interrupted.
52
+ renderMessage(message.messageId, message.role, message.text, message.final, message.interrupted);
53
+ });
52
54
  session.onError((event) => reportVoiceError(event.payload));
53
55
 
54
56
  await session.connect();
@@ -125,7 +127,7 @@ await session.connect({ waitForRemoteAudio: false });
125
127
 
126
128
  ## Recovery, rejoin, and connection quality
127
129
 
128
- With `@voxevolv/client@0.3.2`, set `autoRejoin: true` to let the SDK recover
130
+ With `@voxevolv/client@0.3.2` or newer, set `autoRejoin: true` to let the SDK recover
129
131
  when an agent leaves, its worker changes, a context command times out, or LiveKit
130
132
  exhausts its transport reconnect. Automatic recovery runs only after the session has
131
133
  connected successfully, never after an explicit `disconnect()`, `end()`, or
@@ -167,8 +169,17 @@ session.onStateChange((state) => {
167
169
  renderConnectionState(state);
168
170
  });
169
171
 
170
- session.onRecovery(({ status, strategy, attempt, error }) => {
171
- recordRecovery({ status, strategy, attempt, error });
172
+ session.onRecovery(({ status, strategy, attempt, trigger, messageId, contextKey, timeoutMs, error }) => {
173
+ recordRecovery({
174
+ status,
175
+ strategy,
176
+ attempt,
177
+ trigger,
178
+ messageId,
179
+ contextKey,
180
+ timeoutMs,
181
+ error,
182
+ });
172
183
  });
173
184
 
174
185
  session.onConnectionQuality((quality) => {
@@ -180,6 +191,17 @@ session.onConnectionQuality((quality) => {
180
191
  `waitForState(states, timeoutMs, { signal })` is available for advanced flows
181
192
  that need to await a bounded set of lifecycle states.
182
193
 
194
+ In version 0.3.4, every recovery event includes a typed `trigger`, such as
195
+ `context_command_timeout`, `livekit_disconnected`, `agent_disconnected`, or
196
+ `worker_replaced`. Context timeouts also include the safe `messageId`,
197
+ `contextKey`, and `timeoutMs` correlation fields. The SDK keeps the latest 128
198
+ content-free transport and command entries in memory. It sends a throttled,
199
+ best-effort report only after a slow operation, rejection, failure, timeout, or
200
+ reconnect. Reports never include context text, screenshots, tokens, or raw URLs,
201
+ and reporting failures never affect the call. A trigger received during the
202
+ throttle window is retained for one trailing report, and each diagnostics request
203
+ stops waiting after five seconds so a stuck endpoint cannot block later evidence.
204
+
183
205
  Manual `rejoin()` remains available. It obtains a fresh room token, disconnects
184
206
  any underlying room connection, and reconnects with the original microphone or
185
207
  application-owned track choice. A managed microphone that the user muted with
@@ -197,6 +219,7 @@ enabled by default), or a same-origin proxy base that forwards only:
197
219
 
198
220
  - `POST /sessions/{id}/room-tokens`
199
221
  - `GET /sessions/{id}/events`
222
+ - `POST /sessions/{id}/diagnostics`
200
223
  - `DELETE /sessions/{id}`
201
224
 
202
225
  The proxy must forward the browser's `Authorization: Bearer vsa_...` header. It