@d-id/client-sdk 3.0.0-staging.414 → 3.0.0-staging.416

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.
Files changed (120) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/index-DCAt0P7O.js +2062 -0
  4. package/dist/index.d.ts +3525 -0
  5. package/dist/index.js +1 -1
  6. package/dist/index.umd.cjs +13 -13
  7. package/dist/{index-DBWnR72S.js → livekit-client.esm-QkbCKsng.js} +6234 -8269
  8. package/dist/livekit-manager-Cj0YXe2U.js +557 -0
  9. package/package.json +33 -9
  10. package/dist/livekit-manager-BM3JMzT5.js +0 -531
  11. package/dist/src/api/agents.d.ts +0 -18
  12. package/dist/src/api/apiClient.d.ts +0 -11
  13. package/dist/src/api/apiClient.test.d.ts +0 -1
  14. package/dist/src/api/knowledge.d.ts +0 -15
  15. package/dist/src/api/streams/index.d.ts +0 -1
  16. package/dist/src/api/streams/streamApi.d.ts +0 -3
  17. package/dist/src/api/streams/streamApi.test.d.ts +0 -1
  18. package/dist/src/api/streams/streamsApiV2.d.ts +0 -5
  19. package/dist/src/auth/get-auth-header.d.ts +0 -5
  20. package/dist/src/auth/get-auth-header.test.d.ts +0 -1
  21. package/dist/src/config/consts.d.ts +0 -3
  22. package/dist/src/config/environment.d.ts +0 -5
  23. package/dist/src/errors/base-error.d.ts +0 -182
  24. package/dist/src/errors/chat/chat-creation-failed.d.ts +0 -30
  25. package/dist/src/errors/chat/chat-mode-downgraded.d.ts +0 -35
  26. package/dist/src/errors/errors.test.d.ts +0 -1
  27. package/dist/src/errors/http-error.d.ts +0 -74
  28. package/dist/src/errors/index.d.ts +0 -9
  29. package/dist/src/errors/network-error.d.ts +0 -72
  30. package/dist/src/errors/request-meta.d.ts +0 -12
  31. package/dist/src/errors/stream-error.d.ts +0 -37
  32. package/dist/src/errors/validation-error.d.ts +0 -67
  33. package/dist/src/errors/ws-error.d.ts +0 -34
  34. package/dist/src/index.d.ts +0 -20
  35. package/dist/src/public-api.test.d.ts +0 -1
  36. package/dist/src/services/agent-manager/connect-to-manager.d.ts +0 -19
  37. package/dist/src/services/agent-manager/connect-to-manager.test.d.ts +0 -1
  38. package/dist/src/services/agent-manager/index.d.ts +0 -64
  39. package/dist/src/services/agent-manager/index.test.d.ts +0 -1
  40. package/dist/src/services/analytics/mixpanel.d.ts +0 -22
  41. package/dist/src/services/analytics/mixpanel.test.d.ts +0 -1
  42. package/dist/src/services/analytics/timestamp-tracker.d.ts +0 -15
  43. package/dist/src/services/chat/index.d.ts +0 -10
  44. package/dist/src/services/chat/index.test.d.ts +0 -1
  45. package/dist/src/services/chat/intial-messages.d.ts +0 -3
  46. package/dist/src/services/chat/intial-messages.test.d.ts +0 -1
  47. package/dist/src/services/socket-manager/index.d.ts +0 -12
  48. package/dist/src/services/socket-manager/message-queue.d.ts +0 -12
  49. package/dist/src/services/socket-manager/message-queue.test.d.ts +0 -1
  50. package/dist/src/services/streaming-manager/advanced.test.d.ts +0 -1
  51. package/dist/src/services/streaming-manager/business-flows.test.d.ts +0 -5
  52. package/dist/src/services/streaming-manager/common.d.ts +0 -101
  53. package/dist/src/services/streaming-manager/data-channel-handlers.d.ts +0 -3
  54. package/dist/src/services/streaming-manager/disconnect.test.d.ts +0 -5
  55. package/dist/src/services/streaming-manager/edge-cases.test.d.ts +0 -1
  56. package/dist/src/services/streaming-manager/factory.d.ts +0 -13
  57. package/dist/src/services/streaming-manager/factory.test.d.ts +0 -1
  58. package/dist/src/services/streaming-manager/index.d.ts +0 -5
  59. package/dist/src/services/streaming-manager/livekit-manager.d.ts +0 -10
  60. package/dist/src/services/streaming-manager/livekit-manager.test.d.ts +0 -1
  61. package/dist/src/services/streaming-manager/stats/av-sync.d.ts +0 -3
  62. package/dist/src/services/streaming-manager/stats/av-sync.test.d.ts +0 -1
  63. package/dist/src/services/streaming-manager/stats/poll.d.ts +0 -16
  64. package/dist/src/services/streaming-manager/stats/report.d.ts +0 -19
  65. package/dist/src/services/streaming-manager/stats/report.test.d.ts +0 -1
  66. package/dist/src/services/streaming-manager/webrtc-core.test.d.ts +0 -1
  67. package/dist/src/services/streaming-manager/webrtc-manager.d.ts +0 -12
  68. package/dist/src/services/streaming-manager/webrtc-utils.test.d.ts +0 -5
  69. package/dist/src/test-utils/factories/agent-manager.factory.d.ts +0 -3
  70. package/dist/src/test-utils/factories/agent.factory.d.ts +0 -4
  71. package/dist/src/test-utils/factories/agents-api.factory.d.ts +0 -1
  72. package/dist/src/test-utils/factories/analytics.factory.d.ts +0 -1
  73. package/dist/src/test-utils/factories/chat.factory.d.ts +0 -1
  74. package/dist/src/test-utils/factories/index.d.ts +0 -8
  75. package/dist/src/test-utils/factories/socket-manager.factory.d.ts +0 -1
  76. package/dist/src/test-utils/factories/stream-api.factory.d.ts +0 -1
  77. package/dist/src/test-utils/factories/streaming-manager.factory.d.ts +0 -4
  78. package/dist/src/types/auth.d.ts +0 -95
  79. package/dist/src/types/entities/agents/agent.d.ts +0 -202
  80. package/dist/src/types/entities/agents/chat.d.ts +0 -476
  81. package/dist/src/types/entities/agents/index.d.ts +0 -3
  82. package/dist/src/types/entities/agents/manager.d.ts +0 -897
  83. package/dist/src/types/entities/avatar.d.ts +0 -21
  84. package/dist/src/types/entities/index.d.ts +0 -3
  85. package/dist/src/types/entities/knowledge/document.d.ts +0 -31
  86. package/dist/src/types/entities/knowledge/index.d.ts +0 -4
  87. package/dist/src/types/entities/knowledge/knowledge.d.ts +0 -56
  88. package/dist/src/types/entities/knowledge/record.d.ts +0 -24
  89. package/dist/src/types/entities/knowledge/retrival.d.ts +0 -9
  90. package/dist/src/types/face-rect.d.ts +0 -6
  91. package/dist/src/types/index.d.ts +0 -6
  92. package/dist/src/types/stream/api/clip.d.ts +0 -122
  93. package/dist/src/types/stream/api/index.d.ts +0 -2
  94. package/dist/src/types/stream/api/talk.d.ts +0 -77
  95. package/dist/src/types/stream/data-channel.d.ts +0 -16
  96. package/dist/src/types/stream/index.d.ts +0 -4
  97. package/dist/src/types/stream/rtc.d.ts +0 -125
  98. package/dist/src/types/stream/stream.d.ts +0 -856
  99. package/dist/src/types/stream/streams-v2.d.ts +0 -28
  100. package/dist/src/types/stream-script.d.ts +0 -138
  101. package/dist/src/types/voice/stt.d.ts +0 -16
  102. package/dist/src/types/voice/tts.d.ts +0 -238
  103. package/dist/src/utils/agent.d.ts +0 -8
  104. package/dist/src/utils/analytics.d.ts +0 -31
  105. package/dist/src/utils/analytics.test.d.ts +0 -1
  106. package/dist/src/utils/chat.d.ts +0 -4
  107. package/dist/src/utils/content-parser.d.ts +0 -35
  108. package/dist/src/utils/content-parser.test.d.ts +0 -1
  109. package/dist/src/utils/defer.d.ts +0 -7
  110. package/dist/src/utils/error-analytics.d.ts +0 -4
  111. package/dist/src/utils/error-analytics.test.d.ts +0 -1
  112. package/dist/src/utils/index.d.ts +0 -3
  113. package/dist/src/utils/retry-operation.d.ts +0 -38
  114. package/dist/src/utils/stream-end.d.ts +0 -5
  115. package/dist/src/utils/stream-end.test.d.ts +0 -1
  116. package/dist/src/utils/tool-calls.d.ts +0 -27
  117. package/dist/src/utils/tool-calls.test.d.ts +0 -1
  118. package/dist/src/utils/user-context.d.ts +0 -15
  119. package/dist/src/utils/user-context.test.d.ts +0 -1
  120. package/dist/src/version.d.ts +0 -7
@@ -1,21 +0,0 @@
1
- /**
2
- * The kind of avatar an agent is built on, which is what decides how its video is produced.
3
- *
4
- * It is the `type` of the agent's avatar ({@link Agent.avatar}) and so determines which SDK
5
- * features a session has: {@link AvatarType.Talk | talk} is Talks (V2),
6
- * {@link AvatarType.Clip | clip} is Clips (V3), and {@link AvatarType.Expressive | expressive} is
7
- * Expressive (V4).
8
- *
9
- * @category Agent Manager
10
- */
11
- export declare enum AvatarType {
12
- /** A Clips (V3) agent: a pre-recorded presenter, driven by the D-ID Clips pipeline. */
13
- Clip = "clip",
14
- /** A Talks (V2) agent: a still photo animated to speak. */
15
- Talk = "talk",
16
- /**
17
- * An Expressive (V4) avatar: a real-time avatar that also supports microphone and camera
18
- * publishing, client tools and interruption.
19
- */
20
- Expressive = "expressive"
21
- }
@@ -1,3 +0,0 @@
1
- export * from './agents';
2
- export * from './avatar';
3
- export * from './knowledge';
@@ -1,31 +0,0 @@
1
- import { DocumentType, KnowledgeType } from './knowledge';
2
-
3
- /**
4
- * Lifecycle status of a document, as served by the knowledge API. The API stores the
5
- * status as a prefixed event subject (`document/done`) but strips the prefix on read,
6
- * so the wire value is always bare.
7
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
8
- */
9
- export type DocumentStatus = 'created' | 'processed' | 'done' | 'rejected' | 'error';
10
- /**
11
- * A document as returned by the Knowledge API.
12
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
13
- */
14
- export interface DocumentData {
15
- created_at: string;
16
- modified_at: string;
17
- owner_id: string;
18
- id: string;
19
- created_by: string;
20
- status: DocumentStatus;
21
- documentType: DocumentType;
22
- type: KnowledgeType;
23
- source_url: string;
24
- parsed_url: string;
25
- title: string;
26
- }
27
- /**
28
- * Request payload for creating a document, derived from `DocumentData`.
29
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
30
- */
31
- export type CreateDocumentPayload = Omit<DocumentData, 'created_by' | 'parsed_url' | 'status' | 'type' | 'created_at' | 'modified_at' | 'id' | 'owner_id'>;
@@ -1,4 +0,0 @@
1
- export * from './document';
2
- export * from './knowledge';
3
- export * from './record';
4
- export * from './retrival';
@@ -1,56 +0,0 @@
1
- /**
2
- * Kind of a knowledge entity as stored by the Knowledge API.
3
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
4
- */
5
- export declare enum KnowledgeType {
6
- Knowledge = "knowledge",
7
- Document = "document",
8
- Record = "record"
9
- }
10
- /**
11
- * File format of a document ingested into the Knowledge API.
12
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
13
- */
14
- export declare enum DocumentType {
15
- Pdf = "pdf",
16
- Text = "text",
17
- Html = "html",
18
- Word = "word",
19
- Json = "json",
20
- Markdown = "markdown",
21
- Csv = "csv",
22
- Excel = "excel",
23
- Powerpoint = "powerpoint",
24
- Archive = "archive",
25
- Image = "image",
26
- Audio = "audio",
27
- Video = "video"
28
- }
29
- /**
30
- * Result of parsing a document's raw content for the Knowledge API.
31
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
32
- */
33
- export interface IParserResult {
34
- data: string;
35
- }
36
- /**
37
- * A knowledge entity as returned by the Knowledge API.
38
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
39
- */
40
- export interface KnowledgeData {
41
- created_at: string;
42
- modified_at: string;
43
- owner_id: string;
44
- id: string;
45
- created_by: string;
46
- type: KnowledgeType;
47
- vector_store: string;
48
- description: string;
49
- name: string;
50
- starter_message?: string[];
51
- }
52
- /**
53
- * Request payload for creating a knowledge entity, derived from `KnowledgeData`.
54
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
55
- */
56
- export type KnowledgePayload = Omit<KnowledgeData, 'created_by' | 'type' | 'created_at' | 'modified_at' | 'id' | 'owner_id'>;
@@ -1,24 +0,0 @@
1
- import { KnowledgeType } from './knowledge';
2
-
3
- /**
4
- * A record (chunk of a document) as returned by the Knowledge API.
5
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
6
- */
7
- export interface RecordData {
8
- created_at: string;
9
- modified_at: string;
10
- owner_id: string;
11
- id: string;
12
- created_by: string;
13
- type: KnowledgeType;
14
- embedding_id: string;
15
- start_index: number;
16
- source_url: string;
17
- title: string;
18
- data: string;
19
- }
20
- /**
21
- * Request payload for creating a record, derived from `RecordData`.
22
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
23
- */
24
- export type CreateRecordPayload = Omit<RecordData, 'created_by' | 'type' | 'created_at' | 'modified_at' | 'id' | 'owner_id'>;
@@ -1,9 +0,0 @@
1
- /**
2
- * Result of a knowledge-base query against the Knowledge API.
3
- * @internal The SDK exposes no knowledge methods; manage knowledge through the D-ID API.
4
- */
5
- export interface QueryResult {
6
- documentIds: string[];
7
- result: any;
8
- matches: any;
9
- }
@@ -1,6 +0,0 @@
1
- export interface Rect {
2
- top: number;
3
- left: number;
4
- bottom: number;
5
- right: number;
6
- }
@@ -1,6 +0,0 @@
1
- export * from './auth';
2
- export * from './entities';
3
- export * from './stream';
4
- export * from './stream-script';
5
- export * from './voice/stt';
6
- export * from './voice/tts';
@@ -1,122 +0,0 @@
1
- import { StickyRequest, StreamScript } from '../..';
2
- import { CompatibilityMode } from '../stream';
3
-
4
- interface Logo {
5
- /**
6
- * https url to an ARGB jpg/png image, a default logo is used otherwise
7
- * @pattern ((https|s3):\/\/.+) must be a valid https URL
8
- * @example https://url.to/image.png
9
- */
10
- url: string;
11
- /**
12
- * position of the logo in pixels from the top left corner (w,h) negative values are subtracted from last pixel
13
- * @example [0, 500]
14
- * @minItems 2
15
- * @maxItems 2
16
- * @isInt
17
- */
18
- position: number[];
19
- }
20
- interface ClipConfig {
21
- logo?: Logo | boolean;
22
- /** File format of the animated result
23
- * @default mp4
24
- */
25
- result_format?: 'mp4' | 'gif' | 'mov' | 'webm';
26
- }
27
- /**
28
- * Wire request body for creating a clip stream.
29
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
30
- */
31
- export interface CreateClipStreamRequest {
32
- /**
33
- * Defines the video codec to be used in the stream.
34
- * When set to on: VP8 will be used.
35
- * When set to off: H264 will be used
36
- * When set to auto the codec will be selected according to the browser.
37
- * @default auto
38
- */
39
- compatibility_mode?: CompatibilityMode;
40
- /**
41
- * Whether to stream wamrup video on the connection.
42
- * If set to true, will stream a warmup video when connection is established.
43
- * At the end of the warmup video, a message containing "stream/ready" will be sent on the data channel.
44
- */
45
- stream_warmup?: boolean;
46
- /**
47
- * Maximum duration (in seconds) between messages before session times out.
48
- * Can only be used with proper permissions
49
- * @maximum 300
50
- * @example 180
51
- */
52
- session_timeout?: number;
53
- }
54
- /**
55
- * Wire payload sent to advance a clip stream with a new script.
56
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
57
- */
58
- export interface SendClipStreamPayload extends StickyRequest {
59
- script: StreamScript;
60
- /**
61
- * Advanced configuration options.
62
- */
63
- config?: ClipConfig;
64
- /**
65
- * The user created the clip.
66
- */
67
- created_by?: string;
68
- /**
69
- * Advanced presenter configuration options.
70
- */
71
- presenter_config?: {
72
- crop?: {
73
- /**
74
- * The type of the crop.
75
- */
76
- type: 'rectangle';
77
- /**
78
- * A set of numbers between 0 and 1 representing the top, left, right and bottom of the crop.
79
- * Each number correlates to the distance from the top left corner of the image, relative the the image width.
80
- * For example, right: 0.75 means that the right side of the crop is 75% of the image width from the left side.
81
- */
82
- rectangle: {
83
- top: number;
84
- left: number;
85
- right: number;
86
- bottom: number;
87
- };
88
- };
89
- };
90
- /**
91
- * Background color of the clip result
92
- */
93
- background?: {
94
- /**
95
- * Background color of the animated result, or false to use transparent background in-case of webm result format.
96
- * @example "#47ffff"
97
- * @pattern ^#[a-fA-F0-9]{6}$ must be a valid 6-characters long color css code
98
- */
99
- color?: string | false;
100
- };
101
- /**
102
- * Non-sensitive custom data that will be added to the clip response and webhook.
103
- */
104
- user_data?: string;
105
- /**
106
- * The name of the clip
107
- */
108
- name?: string;
109
- /**
110
- * The URL of the clip video, if not provided use default destination.
111
- * @example "https://path.to.directory/"
112
- */
113
- result_url?: string;
114
- /**
115
- * The URL of the raw clip video, if not provided use default destination.
116
- * @hidden
117
- * @example "https://path.to.directory/"
118
- */
119
- raw_result_url?: string;
120
- metadata: Record<string, any>;
121
- }
122
- export {};
@@ -1,2 +0,0 @@
1
- export * from './clip';
2
- export * from './talk';
@@ -1,77 +0,0 @@
1
- import { StreamScript } from '../..';
2
- import { CompatibilityMode } from '../stream';
3
-
4
- /**
5
- * Wire request body for creating a legacy (talk) stream.
6
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
7
- */
8
- export interface CreateTalkStreamRequest {
9
- driver_url?: string;
10
- face?: {
11
- size: number;
12
- top_left: [number, number];
13
- overlap?: 'NO' | 'YES' | 'PARTIAL' | 'UNKNOWN';
14
- face_id?: string;
15
- detect_confidence?: number;
16
- detection?: {
17
- top: number;
18
- left: number;
19
- right: number;
20
- bottom: number;
21
- };
22
- };
23
- config?: {
24
- motion_factor?: number;
25
- align_expand_factor?: number;
26
- stitch?: boolean;
27
- };
28
- /**
29
- * Defines the video codec to be used in the stream.
30
- * When set to on: VP8 will be used.
31
- * When set to off: H264 will be used
32
- * When set to auto the codec will be selected according to the browser.
33
- * @default auto
34
- */
35
- compatibility_mode?: CompatibilityMode;
36
- /**
37
- * Whether to stream wamrup video on the connection.
38
- * If set to true, will stream a warmup video when connection is established.
39
- * At the end of the warmup video, a message containing "stream/ready" will be sent on the data channel.
40
- */
41
- stream_warmup?: boolean;
42
- /**
43
- * Maximum duration (in seconds) between messages before session times out.
44
- * Can only be used with proper permissions
45
- * @maximum 300
46
- * @example 180
47
- */
48
- session_timeout?: number;
49
- }
50
- /**
51
- * Wire payload sent to advance a talk stream with a new script.
52
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
53
- */
54
- export interface SendTalkStreamPayload {
55
- script: StreamScript;
56
- resultUrl?: string;
57
- config?: {
58
- align_driver?: boolean;
59
- auto_match?: boolean;
60
- normalization_factor?: number;
61
- sharpen?: boolean;
62
- result_format?: 'mp4' | 'gif' | 'mov';
63
- fluent?: boolean;
64
- driver_expressions?: {
65
- expressions: {
66
- start_frame: number;
67
- expression: string;
68
- intensity: number;
69
- };
70
- transition_frames?: number;
71
- };
72
- };
73
- user_data?: Record<string, any>;
74
- name?: string;
75
- audio_optimization?: number;
76
- metadata: Record<string, any>;
77
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * Data-channel topics messages can be sent on.
3
- * V2 (LiveKit) routes by topic; V1 (WebRTC) has no topic concept and ignores it.
4
- *
5
- * Internal on purpose: this module is deliberately left out of the `stream`
6
- * barrel so the topics driven by dedicated methods (`chat`, `speak`,
7
- * `interrupt`, `setSttLanguage`) never reach the package's public API.
8
- * Customers get the public `DataChannelTopic` enum instead.
9
- */
10
- export declare enum InternalDataChannelTopic {
11
- Chat = "lk.chat",
12
- Speak = "did.speak",
13
- Interrupt = "did.interrupt",
14
- SttLanguage = "did.stt-language",
15
- Presentation = "did.presentation"
16
- }
@@ -1,4 +0,0 @@
1
- export * from './api';
2
- export * from './rtc';
3
- export * from './stream';
4
- export * from './streams-v2';
@@ -1,125 +0,0 @@
1
- /**
2
- * Carrier of the `session_id` that keeps successive streaming requests on the same server session.
3
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
4
- */
5
- export interface StickyRequest {
6
- session_id?: string;
7
- }
8
- interface Jsep {
9
- /**
10
- * The type of the message - should normally be `answer` when replying to the offer
11
- */
12
- type: 'offer' | 'answer';
13
- /**
14
- * Describe the media communication sessions to accept the session the is being negotiated
15
- */
16
- sdp: string;
17
- }
18
- /**
19
- * STUN/TURN server credentials returned by the Agents API for establishing the WebRTC connection.
20
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
21
- */
22
- export interface IceServer {
23
- /**
24
- * URL of the server - can be multiple addresses
25
- */
26
- urls: string[] | string;
27
- /**
28
- * Username for authentication
29
- */
30
- username?: string;
31
- /**
32
- * Credintials for secure connection to the server
33
- */
34
- credential?: string;
35
- }
36
- /**
37
- * Response of `POST /agents/{id}/streams`: the SDP offer and ICE servers for the WebRTC handshake.
38
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
39
- */
40
- export interface ICreateStreamRequestResponse extends StickyRequest {
41
- id: string;
42
- jsep: Jsep;
43
- offer: any;
44
- ice_servers: IceServer[];
45
- fluent?: boolean;
46
- interrupt_enabled?: boolean;
47
- }
48
- /**
49
- * A single ICE candidate exchanged during the WebRTC connection handshake.
50
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
51
- */
52
- export interface IceCandidate {
53
- /**
54
- * A string representing the transport address for the candidate that can be used for connectivity checks.
55
- * The format of this address is a candidate-attribute as defined in RFC 5245. This string is empty ("") if the
56
- * RTCIceCandidate is an "end of candidates" indicator.
57
- */
58
- candidate: string | null;
59
- /**
60
- * A string specifying the candidate's media stream identification tag which uniquely identifies the media stream
61
- * within the component with which the candidate is associated, or null if no such association exists.
62
- */
63
- sdpMid?: string;
64
- /**
65
- * If not null, sdpMLineIndex indicates the zero-based index number of the media description (as defined in RFC
66
- * 4566) in the SDP with which the candidate is associated.
67
- */
68
- sdpMLineIndex?: number;
69
- }
70
- /**
71
- * Bare `{ status }` envelope returned by the streaming endpoints that report only success or failure.
72
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
73
- */
74
- export interface Status {
75
- status: string;
76
- }
77
- /**
78
- * What {@link AgentManager.speak | speak()} resolves with: the video the agent is about to stream.
79
- *
80
- * The fields come from the Talks (V2) and Clips (V3) API, which generates a discrete video while
81
- * answering the request. Where no such video exists the call still resolves, with the same stub —
82
- * `status` `'success'`, `duration` `0` and an empty `videoId`: on Expressive (V4) agents, whose
83
- * speech is streamed over the data channel rather than rendered as a separate video, and in a
84
- * text-only chat mode ({@link ChatMode.TextOnly}, {@link ChatMode.Playground} or
85
- * {@link ChatMode.Maintenance}), which produces no video at all.
86
- *
87
- * @category Speak & Scripts
88
- */
89
- export interface SpeakResponse {
90
- /**
91
- * Whether the server accepted the speak request — `'success'` when it did.
92
- */
93
- status: string;
94
- /**
95
- * Id of the session this call was made on; the SDK sends it back on later streaming requests.
96
- */
97
- sessionId?: string;
98
- /**
99
- * Duration of the generated video as reported by the Agents API for Talks (V2) and Clips (V3)
100
- * agents. `0` when the call produced no discrete video — on Expressive (V4) agents, and in a
101
- * text-only chat mode.
102
- */
103
- duration: number;
104
- /**
105
- * Id of the generated video.
106
- *
107
- * Use it to correlate this call with the video the agent then plays, which
108
- * {@link AgentManagerCallbacks.onVideoStateChange | onVideoStateChange} reports the start and
109
- * end of, and which {@link AgentManager.interrupt | interrupt()} cancels. Empty when the call
110
- * produced no discrete video — on Expressive (V4) agents, and in a text-only chat mode.
111
- */
112
- videoId: string;
113
- }
114
- /**
115
- * What the Agents API answers a speak request with, converted to {@link SpeakResponse} before it
116
- * reaches the application.
117
- * @internal Wire type of the streaming transport; not part of the public SDK surface.
118
- */
119
- export interface SpeakWireResponse {
120
- status: string;
121
- session_id?: string;
122
- duration: number;
123
- video_id: string;
124
- }
125
- export {};