@voxevolv/client 0.3.1 → 0.3.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/CHANGELOG.md +7 -0
- package/README.md +32 -3
- package/dist/browser/index.js +6 -6
- package/dist/browser/index.js.map +4 -4
- package/dist/browser/index.js.sha384 +1 -1
- package/dist/browser/manifest.json +1 -1
- package/dist/context-queue.d.ts +19 -0
- package/dist/context-queue.d.ts.map +1 -0
- package/dist/context-queue.js +112 -0
- package/dist/context-queue.js.map +1 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +145 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@voxevolv/client` are recorded here.
|
|
4
4
|
|
|
5
|
+
## 0.3.2 - 2026-09-17
|
|
6
|
+
|
|
7
|
+
- Recover from agent loss even while the room remains connected, with a default three-minute recovery deadline.
|
|
8
|
+
- Restore the client handshake, tools, audio, and latest replacement context before reporting connected.
|
|
9
|
+
- Coalesce pending replacement context by key; superseded pending requests reject explicitly.
|
|
10
|
+
- Expose `autoRejoin.timeoutMs`; explicit `maxAttempts` remains an optional earlier limit.
|
|
11
|
+
|
|
5
12
|
## 0.3.1 - 2026-07-28
|
|
6
13
|
|
|
7
14
|
- Treat a server-pushed `session.ending` event as a graceful hang-up: it marks
|
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.
|
|
29
|
+
"https://cdn.jsdelivr.net/npm/@voxevolv/client@0.3.2/dist/browser/index.js";
|
|
30
30
|
</script>
|
|
31
31
|
```
|
|
32
32
|
|
|
@@ -125,12 +125,41 @@ await session.connect({ waitForRemoteAudio: false });
|
|
|
125
125
|
|
|
126
126
|
## Recovery, rejoin, and connection quality
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
With `@voxevolv/client@0.3.2`, set `autoRejoin: true` to let the SDK recover
|
|
129
|
+
when an agent leaves, its worker changes, a context command times out, or LiveKit
|
|
130
|
+
exhausts its transport reconnect. Automatic recovery runs only after the session has
|
|
130
131
|
connected successfully, never after an explicit `disconnect()`, `end()`, or
|
|
131
132
|
terminal LiveKit removal. It waits for browser connectivity, obtains a fresh
|
|
132
133
|
room token, and retries with bounded backoff.
|
|
133
134
|
|
|
135
|
+
Automatic rejoin has a default 180-second deadline, including time spent offline.
|
|
136
|
+
Use `autoRejoin: { timeoutMs: 180_000 }` to configure it; an explicit `maxAttempts`
|
|
137
|
+
can stop retries earlier. This renews the room connection for the **same session**.
|
|
138
|
+
It never creates a replacement assessment/session. `connected` is reported only
|
|
139
|
+
after the client hello (including tool handlers), agent readiness, remote audio
|
|
140
|
+
(unless opted out), and replacement-context restoration succeed.
|
|
141
|
+
|
|
142
|
+
The updated server protects replacement-worker startup with a three-minute
|
|
143
|
+
participant grace period. It restores up to the latest 200 committed transcript
|
|
144
|
+
messages within 100,000 UTF-8 bytes and skips the initial greeting on resume.
|
|
145
|
+
Uncommitted speech, raw audio, provider-internal state, and tool executions are
|
|
146
|
+
not replayed. Recovery does not extend an application's timer or the session's
|
|
147
|
+
configured maximum duration.
|
|
148
|
+
|
|
149
|
+
Use stable keys and `mode: "replace"` for screen frames and timer snapshots.
|
|
150
|
+
Only one update per key is sent at a time; while recovering, the newest pending
|
|
151
|
+
value replaces older pending values. Superseded callers reject with
|
|
152
|
+
`Context update superseded by a newer value`, so handle each returned promise.
|
|
153
|
+
The SDK retains up to 64 keys / 16 MiB of recent replacement context for recovery;
|
|
154
|
+
it restores accepted values with `respond: false`. Append updates are not queued
|
|
155
|
+
or replayed during recovery because repeating them could duplicate input. Updates
|
|
156
|
+
already in flight may have reached the server even if their acknowledgment was lost.
|
|
157
|
+
|
|
158
|
+
Keep the existing `RealtimeSession` instance during recovery, register tools on
|
|
159
|
+
that instance, and use `onStateChange` / `onRecovery` for UI. Avoid application
|
|
160
|
+
retry loops that create new sessions. Older clients remain API-compatible but
|
|
161
|
+
need the SDK upgrade to gain agent-loss detection and context restoration.
|
|
162
|
+
|
|
134
163
|
```ts
|
|
135
164
|
session.onStateChange((state) => {
|
|
136
165
|
// reconnecting: LiveKit is restoring transport
|