@telnyx/ai-agent-lib 0.4.1 → 0.4.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/dist/types.d.ts CHANGED
@@ -42,7 +42,28 @@ export type AgentConnectionInfo = {
42
42
  region: string | null;
43
43
  callReportId: string | null;
44
44
  };
45
+ /**
46
+ * Emitted when the underlying WebRTC socket receives a "logged in" response.
47
+ *
48
+ * This can happen before REGED / `agent.connected`, so consumers that need to
49
+ * cancel authentication retry timers should use this event instead of waiting
50
+ * for the full client-ready state.
51
+ */
52
+ export type AgentLoginSuccessInfo = {
53
+ sessionId: string | null;
54
+ };
55
+ /**
56
+ * Emitted when the underlying WebRTC login request starts.
57
+ *
58
+ * This is useful for retry controllers that need to avoid closing a socket
59
+ * while authentication is already in flight.
60
+ */
61
+ export type AgentLoginStartedInfo = {
62
+ sessionId: string | null;
63
+ };
45
64
  export type AIAgentEvents = {
65
+ "agent.login.started": (info: AgentLoginStartedInfo) => void;
66
+ "agent.login.success": (info: AgentLoginSuccessInfo) => void;
46
67
  "agent.connected": (info: AgentConnectionInfo) => void;
47
68
  "agent.disconnected": () => void;
48
69
  "agent.error": (error: Error) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@telnyx/ai-agent-lib",
3
3
  "private": false,
4
- "version": "0.4.1",
4
+ "version": "0.4.4",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  "react-dom": "^19.1.0"
31
31
  },
32
32
  "dependencies": {
33
- "@telnyx/webrtc": "2.26.3",
33
+ "@telnyx/webrtc": "2.26.4",
34
34
  "eventemitter3": "^5.0.1",
35
35
  "jotai": "^2.12.5",
36
36
  "loglevel": "^1.9.2"