@telnyx/ai-agent-widget 0.27.0 → 0.29.0

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
@@ -49,10 +49,10 @@ The widget emits DOM CustomEvents that you can listen to for tracking analytics,
49
49
  });
50
50
 
51
51
  widget.addEventListener('conversation.agent.state', function (event) {
52
- const { state, latencyMs, thinkingStartedAt } = event.detail;
52
+ const { state, userPerceivedLatencyMs, thinkingStartedAt } = event.detail;
53
53
  console.log('Agent state:', state);
54
- if (latencyMs) {
55
- console.log('Response latency:', latencyMs, 'ms');
54
+ if (userPerceivedLatencyMs) {
55
+ console.log('Response latency:', userPerceivedLatencyMs, 'ms');
56
56
  }
57
57
  });
58
58
 
@@ -66,15 +66,15 @@ The widget emits DOM CustomEvents that you can listen to for tracking analytics,
66
66
 
67
67
  ### Available Events
68
68
 
69
- | Event | Description | Detail |
70
- | -------------------------- | ------------------------------------------------- | ------------------------------------------------ |
71
- | `agent.connected` | Agent connected to platform | - |
72
- | `agent.disconnected` | Agent disconnected from platform | - |
73
- | `agent.error` | Error occurred | `{ message, name }` |
74
- | `transcript.item` | Transcript message received | `{ id, role, content, timestamp, attachments? }` |
75
- | `conversation.update` | Conversation state updated | `{ type, callState }` |
76
- | `conversation.agent.state` | Agent state changed (listening/speaking/thinking) | `{ state, latencyMs?, thinkingStartedAt? }` |
77
- | `agent.audio.mute` | Agent audio muted/unmuted | `{ muted }` |
69
+ | Event | Description | Detail |
70
+ | -------------------------- | ------------------------------------------------- | -------------------------------------------------------- |
71
+ | `agent.connected` | Agent connected to platform | - |
72
+ | `agent.disconnected` | Agent disconnected from platform | - |
73
+ | `agent.error` | Error occurred | `{ message, name }` |
74
+ | `transcript.item` | Transcript message received | `{ id, role, content, timestamp, attachments? }` |
75
+ | `conversation.update` | Conversation state updated | `{ type, callState }` |
76
+ | `conversation.agent.state` | Agent state changed (listening/speaking/thinking) | `{ state, userPerceivedLatencyMs?, thinkingStartedAt? }` |
77
+ | `agent.audio.mute` | Agent audio muted/unmuted | `{ muted }` |
78
78
 
79
79
  ## Development
80
80