@voicelayer/sdk 0.3.1 → 0.4.1

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as AgentDTO, a as AgentStatus, b as AgentEnvironment, c as AgentContext, P as Participant, C as CallInfo, d as ProcessSchemaDTO } from './text-session-oMqJh6SF.js';
2
- export { e as AgentTurnEvent, f as AudioProfile, g as AudioSurface, h as ChannelKind, D as DtmfEvent, i as DtmfHandler, E as EndCallControllerHandle, j as EndCallOutcome, F as FakeSessionAdapter, k as FloorControlConfig, I as InboundOptions, L as LK_AGENT_STATE_MAP, M as MemoryHandle, l as MetricsEvent, N as NON_BUSY_STATES, m as ParticipantId, n as ParticipantKind, o as ParticipantSet, p as ProcessSnapshot, R as RespondOptions, q as Room, r as RouteEntry, s as RoutingRule, t as RoutingSnapshot, u as RunTextSessionOptions, v as RunTextTranscriptOptions, S as SayOptions, w as SendDtmfOptions, x as SessionAdapter, y as SessionCapabilities, z as SessionErrorEvent, B as SessionEvent, G as SessionEventMap, H as SessionFactory, J as SessionFactoryInput, K as SessionOutbound, O as SessionState, Q as SpeechResult, T as SpeechTarget, U as StateChangeEvent, V as TextSession, W as TextTranscriptResult, X as TtsVoiceConfig, Y as TurnEvent, Z as Unsubscribe, _ as UserInputEvent, $ as UserStateEvent, a0 as UserTurn, a1 as applySpeechTurnHandling, a2 as dtmfCodeToDigit, a3 as dtmfDigitToCode, a4 as duck, a5 as mute, a6 as normalizeState, m as participantId, a7 as passthrough, a8 as runTextSession, a9 as runTextTranscript, aa as transform } from './text-session-oMqJh6SF.js';
1
+ import { A as AgentDTO, a as AgentStatus, b as AgentEnvironment, c as AgentContext, P as Participant, C as CallInfo, d as ProcessSchemaDTO } from './text-session-BB0dLLH2.js';
2
+ export { e as AgentTurnEvent, f as AudioProfile, g as AudioSurface, h as ChannelKind, D as DtmfEvent, i as DtmfHandler, E as EndCallControllerHandle, j as EndCallOutcome, F as FakeSessionAdapter, k as FloorControlConfig, I as InboundOptions, L as LK_AGENT_STATE_MAP, M as MemoryHandle, l as MetricsEvent, N as NON_BUSY_STATES, m as ParticipantId, n as ParticipantKind, o as ParticipantSet, p as ProcessSnapshot, R as RespondOptions, q as Room, r as RouteEntry, s as RoutingRule, t as RoutingSnapshot, u as RunTextSessionOptions, v as RunTextTranscriptOptions, S as SayOptions, w as SendDtmfOptions, x as SessionAdapter, y as SessionCapabilities, z as SessionErrorEvent, B as SessionEvent, G as SessionEventMap, H as SessionFactory, J as SessionFactoryInput, K as SessionOutbound, O as SessionState, Q as SpeechResult, T as SpeechTarget, U as StateChangeEvent, V as TextSession, W as TextTranscriptResult, X as TtsVoiceConfig, Y as TurnEvent, Z as Unsubscribe, _ as UserInputEvent, $ as UserStateEvent, a0 as UserTurn, a1 as applySpeechTurnHandling, a2 as dtmfCodeToDigit, a3 as dtmfDigitToCode, a4 as duck, a5 as mute, a6 as normalizeState, m as participantId, a7 as passthrough, a8 as runTextSession, a9 as runTextTranscript, aa as transform } from './text-session-BB0dLLH2.js';
3
3
  import { z, ZodType } from 'zod';
4
4
  import { OnQuery, BrainTransport } from './brain/index.js';
5
5
  export { BrainCallMetadata, BrainCapabilities, BrainChunk, BrainConfigError, BrainEndpointConfig, BrainMessage, BrainPubSub, BrainRequest, BrainRequestError, ConnectorChatModel, ConnectorChatModelOptions, ConnectorLLMOptions, IncomingBrainRequest, OnQueryContext, OnQueryResult, RedisBrainPubSub, SseDelta, TunnelBrainTransportOptions, assertPublicHttpsUrl, buildRedisBrainPubSub, callbackTransport, createConnectorLLM, httpBrainTransport, parseChatCompletionSse, runBrainRequest, tunnelBrainTransport } from './brain/index.js';
@@ -32,10 +32,10 @@ declare const TextTurn: z.ZodObject<{
32
32
  deadlineAt: z.ZodString;
33
33
  }, "strip", z.ZodTypeAny, {
34
34
  text: string;
35
+ from: string;
35
36
  agentId: string;
36
37
  turnId: string;
37
38
  channel: string;
38
- from: string;
39
39
  conversationKey: string;
40
40
  history: {
41
41
  role: "user" | "assistant";
@@ -44,10 +44,10 @@ declare const TextTurn: z.ZodObject<{
44
44
  deadlineAt: string;
45
45
  }, {
46
46
  text: string;
47
+ from: string;
47
48
  agentId: string;
48
49
  turnId: string;
49
50
  channel: string;
50
- from: string;
51
51
  conversationKey: string;
52
52
  history: {
53
53
  role: "user" | "assistant";
@@ -80,8 +80,8 @@ declare const TextTurnReply: z.ZodUnion<[z.ZodObject<{
80
80
  byok: boolean;
81
81
  }>, "many">>;
82
82
  }, "strip", z.ZodTypeAny, {
83
- agentId: string;
84
83
  replies: string[];
84
+ agentId: string;
85
85
  usage: {
86
86
  provider: string;
87
87
  model: string;
@@ -90,8 +90,8 @@ declare const TextTurnReply: z.ZodUnion<[z.ZodObject<{
90
90
  byok: boolean;
91
91
  }[];
92
92
  }, {
93
- agentId: string;
94
93
  replies: string[];
94
+ agentId: string;
95
95
  usage?: {
96
96
  provider: string;
97
97
  model: string;
@@ -149,61 +149,6 @@ declare const CallPlan: z.ZodObject<{
149
149
  displayName?: string | undefined;
150
150
  }>;
151
151
  draftConfig: z.ZodDefault<z.ZodObject<{
152
- stt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
153
- provider: z.ZodEnum<["deepgram", "cartesia", "assemblyai"]>;
154
- model: z.ZodOptional<z.ZodString>;
155
- language: z.ZodOptional<z.ZodString>;
156
- endOfTurnConfidence: z.ZodOptional<z.ZodNumber>;
157
- endOfTurnTimeoutMs: z.ZodOptional<z.ZodNumber>;
158
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
159
- }, "strip", z.ZodTypeAny, {
160
- provider: "deepgram" | "cartesia" | "assemblyai";
161
- model?: string | undefined;
162
- language?: string | undefined;
163
- endOfTurnConfidence?: number | undefined;
164
- endOfTurnTimeoutMs?: number | undefined;
165
- keywords?: string[] | undefined;
166
- }, {
167
- provider: "deepgram" | "cartesia" | "assemblyai";
168
- model?: string | undefined;
169
- language?: string | undefined;
170
- endOfTurnConfidence?: number | undefined;
171
- endOfTurnTimeoutMs?: number | undefined;
172
- keywords?: string[] | undefined;
173
- }>>>;
174
- realtime: z.ZodOptional<z.ZodOptional<z.ZodObject<{
175
- provider: z.ZodEnum<["openai", "google"]>;
176
- model: z.ZodString;
177
- voice: z.ZodOptional<z.ZodString>;
178
- temperature: z.ZodOptional<z.ZodNumber>;
179
- }, "strip", z.ZodTypeAny, {
180
- provider: "openai" | "google";
181
- model: string;
182
- voice?: string | undefined;
183
- temperature?: number | undefined;
184
- }, {
185
- provider: "openai" | "google";
186
- model: string;
187
- voice?: string | undefined;
188
- temperature?: number | undefined;
189
- }>>>;
190
- voice: z.ZodOptional<z.ZodObject<{
191
- provider: z.ZodEnum<["deepgram", "elevenlabs", "openai", "cartesia"]>;
192
- voiceId: z.ZodString;
193
- model: z.ZodOptional<z.ZodString>;
194
- rate: z.ZodOptional<z.ZodNumber>;
195
- }, "strip", z.ZodTypeAny, {
196
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
197
- voiceId: string;
198
- model?: string | undefined;
199
- rate?: number | undefined;
200
- }, {
201
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
202
- voiceId: string;
203
- model?: string | undefined;
204
- rate?: number | undefined;
205
- }>>;
206
- source: z.ZodOptional<z.ZodOptional<z.ZodEnum<["sdk", "flow", "playbook", "connector"]>>>;
207
152
  name: z.ZodOptional<z.ZodString>;
208
153
  triggers: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
209
154
  on: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -211,22 +156,22 @@ declare const CallPlan: z.ZodObject<{
211
156
  pattern: z.ZodString;
212
157
  flags: z.ZodOptional<z.ZodString>;
213
158
  }, "strip", z.ZodTypeAny, {
214
- kind: "regex";
215
159
  pattern: string;
160
+ kind: "regex";
216
161
  flags?: string | undefined;
217
162
  }, {
218
- kind: "regex";
219
163
  pattern: string;
164
+ kind: "regex";
220
165
  flags?: string | undefined;
221
166
  }>, z.ZodObject<{
222
167
  kind: z.ZodLiteral<"signal">;
223
168
  name: z.ZodString;
224
169
  }, "strip", z.ZodTypeAny, {
225
- kind: "signal";
226
170
  name: string;
227
- }, {
228
171
  kind: "signal";
172
+ }, {
229
173
  name: string;
174
+ kind: "signal";
230
175
  }>]>;
231
176
  then: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
232
177
  kind: z.ZodLiteral<"handoff">;
@@ -261,12 +206,12 @@ declare const CallPlan: z.ZodObject<{
261
206
  kind: "say";
262
207
  };
263
208
  on: {
264
- kind: "regex";
265
209
  pattern: string;
210
+ kind: "regex";
266
211
  flags?: string | undefined;
267
212
  } | {
268
- kind: "signal";
269
213
  name: string;
214
+ kind: "signal";
270
215
  };
271
216
  onlyWhile?: string | undefined;
272
217
  }, {
@@ -279,12 +224,12 @@ declare const CallPlan: z.ZodObject<{
279
224
  kind: "say";
280
225
  };
281
226
  on: {
282
- kind: "regex";
283
227
  pattern: string;
228
+ kind: "regex";
284
229
  flags?: string | undefined;
285
230
  } | {
286
- kind: "signal";
287
231
  name: string;
232
+ kind: "signal";
288
233
  };
289
234
  onlyWhile?: string | undefined;
290
235
  }>>>>;
@@ -298,6 +243,61 @@ declare const CallPlan: z.ZodObject<{
298
243
  toolName: string;
299
244
  defaultArgs?: Record<string, unknown> | undefined;
300
245
  }>, "many">>>;
246
+ stt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
247
+ provider: z.ZodEnum<["deepgram", "cartesia", "assemblyai"]>;
248
+ model: z.ZodOptional<z.ZodString>;
249
+ language: z.ZodOptional<z.ZodString>;
250
+ endOfTurnConfidence: z.ZodOptional<z.ZodNumber>;
251
+ endOfTurnTimeoutMs: z.ZodOptional<z.ZodNumber>;
252
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ provider: "deepgram" | "cartesia" | "assemblyai";
255
+ model?: string | undefined;
256
+ language?: string | undefined;
257
+ endOfTurnConfidence?: number | undefined;
258
+ endOfTurnTimeoutMs?: number | undefined;
259
+ keywords?: string[] | undefined;
260
+ }, {
261
+ provider: "deepgram" | "cartesia" | "assemblyai";
262
+ model?: string | undefined;
263
+ language?: string | undefined;
264
+ endOfTurnConfidence?: number | undefined;
265
+ endOfTurnTimeoutMs?: number | undefined;
266
+ keywords?: string[] | undefined;
267
+ }>>>;
268
+ realtime: z.ZodOptional<z.ZodOptional<z.ZodObject<{
269
+ provider: z.ZodEnum<["openai", "google"]>;
270
+ model: z.ZodString;
271
+ voice: z.ZodOptional<z.ZodString>;
272
+ temperature: z.ZodOptional<z.ZodNumber>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ provider: "openai" | "google";
275
+ model: string;
276
+ voice?: string | undefined;
277
+ temperature?: number | undefined;
278
+ }, {
279
+ provider: "openai" | "google";
280
+ model: string;
281
+ voice?: string | undefined;
282
+ temperature?: number | undefined;
283
+ }>>>;
284
+ voice: z.ZodOptional<z.ZodObject<{
285
+ provider: z.ZodEnum<["deepgram", "elevenlabs", "openai", "cartesia"]>;
286
+ voiceId: z.ZodString;
287
+ model: z.ZodOptional<z.ZodString>;
288
+ rate: z.ZodOptional<z.ZodNumber>;
289
+ }, "strip", z.ZodTypeAny, {
290
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
291
+ voiceId: string;
292
+ model?: string | undefined;
293
+ rate?: number | undefined;
294
+ }, {
295
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
296
+ voiceId: string;
297
+ model?: string | undefined;
298
+ rate?: number | undefined;
299
+ }>>;
300
+ source: z.ZodOptional<z.ZodOptional<z.ZodEnum<["sdk", "flow", "playbook", "connector"]>>>;
301
301
  mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["cascade", "realtime"]>>>;
302
302
  model: z.ZodOptional<z.ZodObject<{
303
303
  provider: z.ZodEnum<["openai", "anthropic", "gemini"]>;
@@ -405,12 +405,12 @@ declare const CallPlan: z.ZodObject<{
405
405
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
406
406
  }, "strip", z.ZodTypeAny, {
407
407
  url: string;
408
- headers?: Record<string, string> | undefined;
409
408
  timeoutMs?: number | undefined;
409
+ headers?: Record<string, string> | undefined;
410
410
  }, {
411
411
  url: string;
412
- headers?: Record<string, string> | undefined;
413
412
  timeoutMs?: number | undefined;
413
+ headers?: Record<string, string> | undefined;
414
414
  }>>;
415
415
  }, "strip", z.ZodTypeAny, {
416
416
  collect: Record<string, {
@@ -426,14 +426,14 @@ declare const CallPlan: z.ZodObject<{
426
426
  completeWhen: "all-required-captured" | "all-captured";
427
427
  backendAck?: {
428
428
  url: string;
429
- headers?: Record<string, string> | undefined;
430
429
  timeoutMs?: number | undefined;
430
+ headers?: Record<string, string> | undefined;
431
431
  } | undefined;
432
432
  }, {
433
433
  backendAck?: {
434
434
  url: string;
435
- headers?: Record<string, string> | undefined;
436
435
  timeoutMs?: number | undefined;
436
+ headers?: Record<string, string> | undefined;
437
437
  } | undefined;
438
438
  collect?: Record<string, {
439
439
  type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
@@ -470,27 +470,6 @@ declare const CallPlan: z.ZodObject<{
470
470
  description?: string | undefined;
471
471
  }>, "many">>>;
472
472
  }, "strip", z.ZodTypeAny, {
473
- stt?: {
474
- provider: "deepgram" | "cartesia" | "assemblyai";
475
- model?: string | undefined;
476
- language?: string | undefined;
477
- endOfTurnConfidence?: number | undefined;
478
- endOfTurnTimeoutMs?: number | undefined;
479
- keywords?: string[] | undefined;
480
- } | undefined;
481
- realtime?: {
482
- provider: "openai" | "google";
483
- model: string;
484
- voice?: string | undefined;
485
- temperature?: number | undefined;
486
- } | undefined;
487
- voice?: {
488
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
489
- voiceId: string;
490
- model?: string | undefined;
491
- rate?: number | undefined;
492
- } | undefined;
493
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
494
473
  name?: string | undefined;
495
474
  triggers?: Record<string, {
496
475
  then: {
@@ -502,12 +481,12 @@ declare const CallPlan: z.ZodObject<{
502
481
  kind: "say";
503
482
  };
504
483
  on: {
505
- kind: "regex";
506
484
  pattern: string;
485
+ kind: "regex";
507
486
  flags?: string | undefined;
508
487
  } | {
509
- kind: "signal";
510
488
  name: string;
489
+ kind: "signal";
511
490
  };
512
491
  onlyWhile?: string | undefined;
513
492
  }> | undefined;
@@ -515,6 +494,27 @@ declare const CallPlan: z.ZodObject<{
515
494
  toolName: string;
516
495
  defaultArgs?: Record<string, unknown> | undefined;
517
496
  }[] | undefined;
497
+ stt?: {
498
+ provider: "deepgram" | "cartesia" | "assemblyai";
499
+ model?: string | undefined;
500
+ language?: string | undefined;
501
+ endOfTurnConfidence?: number | undefined;
502
+ endOfTurnTimeoutMs?: number | undefined;
503
+ keywords?: string[] | undefined;
504
+ } | undefined;
505
+ realtime?: {
506
+ provider: "openai" | "google";
507
+ model: string;
508
+ voice?: string | undefined;
509
+ temperature?: number | undefined;
510
+ } | undefined;
511
+ voice?: {
512
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
513
+ voiceId: string;
514
+ model?: string | undefined;
515
+ rate?: number | undefined;
516
+ } | undefined;
517
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
518
518
  mode?: "realtime" | "cascade" | undefined;
519
519
  model?: {
520
520
  provider: "openai" | "anthropic" | "gemini";
@@ -554,8 +554,8 @@ declare const CallPlan: z.ZodObject<{
554
554
  completeWhen: "all-required-captured" | "all-captured";
555
555
  backendAck?: {
556
556
  url: string;
557
- headers?: Record<string, string> | undefined;
558
557
  timeoutMs?: number | undefined;
558
+ headers?: Record<string, string> | undefined;
559
559
  } | undefined;
560
560
  } | undefined;
561
561
  tags?: string[] | undefined;
@@ -569,27 +569,6 @@ declare const CallPlan: z.ZodObject<{
569
569
  description?: string | undefined;
570
570
  }[] | undefined;
571
571
  }, {
572
- stt?: {
573
- provider: "deepgram" | "cartesia" | "assemblyai";
574
- model?: string | undefined;
575
- language?: string | undefined;
576
- endOfTurnConfidence?: number | undefined;
577
- endOfTurnTimeoutMs?: number | undefined;
578
- keywords?: string[] | undefined;
579
- } | undefined;
580
- realtime?: {
581
- provider: "openai" | "google";
582
- model: string;
583
- voice?: string | undefined;
584
- temperature?: number | undefined;
585
- } | undefined;
586
- voice?: {
587
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
588
- voiceId: string;
589
- model?: string | undefined;
590
- rate?: number | undefined;
591
- } | undefined;
592
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
593
572
  name?: string | undefined;
594
573
  triggers?: Record<string, {
595
574
  then: {
@@ -601,12 +580,12 @@ declare const CallPlan: z.ZodObject<{
601
580
  kind: "say";
602
581
  };
603
582
  on: {
604
- kind: "regex";
605
583
  pattern: string;
584
+ kind: "regex";
606
585
  flags?: string | undefined;
607
586
  } | {
608
- kind: "signal";
609
587
  name: string;
588
+ kind: "signal";
610
589
  };
611
590
  onlyWhile?: string | undefined;
612
591
  }> | undefined;
@@ -614,6 +593,27 @@ declare const CallPlan: z.ZodObject<{
614
593
  toolName: string;
615
594
  defaultArgs?: Record<string, unknown> | undefined;
616
595
  }[] | undefined;
596
+ stt?: {
597
+ provider: "deepgram" | "cartesia" | "assemblyai";
598
+ model?: string | undefined;
599
+ language?: string | undefined;
600
+ endOfTurnConfidence?: number | undefined;
601
+ endOfTurnTimeoutMs?: number | undefined;
602
+ keywords?: string[] | undefined;
603
+ } | undefined;
604
+ realtime?: {
605
+ provider: "openai" | "google";
606
+ model: string;
607
+ voice?: string | undefined;
608
+ temperature?: number | undefined;
609
+ } | undefined;
610
+ voice?: {
611
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
612
+ voiceId: string;
613
+ model?: string | undefined;
614
+ rate?: number | undefined;
615
+ } | undefined;
616
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
617
617
  mode?: "realtime" | "cascade" | undefined;
618
618
  model?: {
619
619
  provider: "openai" | "anthropic" | "gemini";
@@ -642,8 +642,8 @@ declare const CallPlan: z.ZodObject<{
642
642
  process?: {
643
643
  backendAck?: {
644
644
  url: string;
645
- headers?: Record<string, string> | undefined;
646
645
  timeoutMs?: number | undefined;
646
+ headers?: Record<string, string> | undefined;
647
647
  } | undefined;
648
648
  collect?: Record<string, {
649
649
  type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
@@ -675,14 +675,14 @@ declare const CallPlan: z.ZodObject<{
675
675
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
676
676
  deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
677
677
  }, "strip", z.ZodTypeAny, {
678
- kind: "decision" | "auth" | "fact";
679
678
  id: string;
679
+ kind: "decision" | "auth" | "fact";
680
680
  prompt: string;
681
681
  deferrableToCallee: boolean;
682
682
  options?: string[] | undefined;
683
683
  }, {
684
- kind: "decision" | "auth" | "fact";
685
684
  id: string;
685
+ kind: "decision" | "auth" | "fact";
686
686
  prompt: string;
687
687
  options?: string[] | undefined;
688
688
  deferrableToCallee?: boolean | undefined;
@@ -694,14 +694,14 @@ declare const CallPlan: z.ZodObject<{
694
694
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
695
695
  deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
696
696
  }, "strip", z.ZodTypeAny, {
697
- kind: "decision" | "auth" | "fact";
698
697
  id: string;
698
+ kind: "decision" | "auth" | "fact";
699
699
  prompt: string;
700
700
  deferrableToCallee: boolean;
701
701
  options?: string[] | undefined;
702
702
  }, {
703
- kind: "decision" | "auth" | "fact";
704
703
  id: string;
704
+ kind: "decision" | "auth" | "fact";
705
705
  prompt: string;
706
706
  options?: string[] | undefined;
707
707
  deferrableToCallee?: boolean | undefined;
@@ -739,27 +739,6 @@ declare const CallPlan: z.ZodObject<{
739
739
  displayName?: string | undefined;
740
740
  };
741
741
  draftConfig: {
742
- stt?: {
743
- provider: "deepgram" | "cartesia" | "assemblyai";
744
- model?: string | undefined;
745
- language?: string | undefined;
746
- endOfTurnConfidence?: number | undefined;
747
- endOfTurnTimeoutMs?: number | undefined;
748
- keywords?: string[] | undefined;
749
- } | undefined;
750
- realtime?: {
751
- provider: "openai" | "google";
752
- model: string;
753
- voice?: string | undefined;
754
- temperature?: number | undefined;
755
- } | undefined;
756
- voice?: {
757
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
758
- voiceId: string;
759
- model?: string | undefined;
760
- rate?: number | undefined;
761
- } | undefined;
762
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
763
742
  name?: string | undefined;
764
743
  triggers?: Record<string, {
765
744
  then: {
@@ -771,12 +750,12 @@ declare const CallPlan: z.ZodObject<{
771
750
  kind: "say";
772
751
  };
773
752
  on: {
774
- kind: "regex";
775
753
  pattern: string;
754
+ kind: "regex";
776
755
  flags?: string | undefined;
777
756
  } | {
778
- kind: "signal";
779
757
  name: string;
758
+ kind: "signal";
780
759
  };
781
760
  onlyWhile?: string | undefined;
782
761
  }> | undefined;
@@ -784,6 +763,27 @@ declare const CallPlan: z.ZodObject<{
784
763
  toolName: string;
785
764
  defaultArgs?: Record<string, unknown> | undefined;
786
765
  }[] | undefined;
766
+ stt?: {
767
+ provider: "deepgram" | "cartesia" | "assemblyai";
768
+ model?: string | undefined;
769
+ language?: string | undefined;
770
+ endOfTurnConfidence?: number | undefined;
771
+ endOfTurnTimeoutMs?: number | undefined;
772
+ keywords?: string[] | undefined;
773
+ } | undefined;
774
+ realtime?: {
775
+ provider: "openai" | "google";
776
+ model: string;
777
+ voice?: string | undefined;
778
+ temperature?: number | undefined;
779
+ } | undefined;
780
+ voice?: {
781
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
782
+ voiceId: string;
783
+ model?: string | undefined;
784
+ rate?: number | undefined;
785
+ } | undefined;
786
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
787
787
  mode?: "realtime" | "cascade" | undefined;
788
788
  model?: {
789
789
  provider: "openai" | "anthropic" | "gemini";
@@ -823,8 +823,8 @@ declare const CallPlan: z.ZodObject<{
823
823
  completeWhen: "all-required-captured" | "all-captured";
824
824
  backendAck?: {
825
825
  url: string;
826
- headers?: Record<string, string> | undefined;
827
826
  timeoutMs?: number | undefined;
827
+ headers?: Record<string, string> | undefined;
828
828
  } | undefined;
829
829
  } | undefined;
830
830
  tags?: string[] | undefined;
@@ -839,15 +839,15 @@ declare const CallPlan: z.ZodObject<{
839
839
  }[] | undefined;
840
840
  };
841
841
  openQuestions: {
842
- kind: "decision" | "auth" | "fact";
843
842
  id: string;
843
+ kind: "decision" | "auth" | "fact";
844
844
  prompt: string;
845
845
  deferrableToCallee: boolean;
846
846
  options?: string[] | undefined;
847
847
  }[];
848
848
  unresolvedQuestions: {
849
- kind: "decision" | "auth" | "fact";
850
849
  id: string;
850
+ kind: "decision" | "auth" | "fact";
851
851
  prompt: string;
852
852
  deferrableToCallee: boolean;
853
853
  options?: string[] | undefined;
@@ -879,27 +879,6 @@ declare const CallPlan: z.ZodObject<{
879
879
  secondary?: "ask_callee" | "fallback_phrase" | undefined;
880
880
  };
881
881
  draftConfig?: {
882
- stt?: {
883
- provider: "deepgram" | "cartesia" | "assemblyai";
884
- model?: string | undefined;
885
- language?: string | undefined;
886
- endOfTurnConfidence?: number | undefined;
887
- endOfTurnTimeoutMs?: number | undefined;
888
- keywords?: string[] | undefined;
889
- } | undefined;
890
- realtime?: {
891
- provider: "openai" | "google";
892
- model: string;
893
- voice?: string | undefined;
894
- temperature?: number | undefined;
895
- } | undefined;
896
- voice?: {
897
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
898
- voiceId: string;
899
- model?: string | undefined;
900
- rate?: number | undefined;
901
- } | undefined;
902
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
903
882
  name?: string | undefined;
904
883
  triggers?: Record<string, {
905
884
  then: {
@@ -911,12 +890,12 @@ declare const CallPlan: z.ZodObject<{
911
890
  kind: "say";
912
891
  };
913
892
  on: {
914
- kind: "regex";
915
893
  pattern: string;
894
+ kind: "regex";
916
895
  flags?: string | undefined;
917
896
  } | {
918
- kind: "signal";
919
897
  name: string;
898
+ kind: "signal";
920
899
  };
921
900
  onlyWhile?: string | undefined;
922
901
  }> | undefined;
@@ -924,6 +903,27 @@ declare const CallPlan: z.ZodObject<{
924
903
  toolName: string;
925
904
  defaultArgs?: Record<string, unknown> | undefined;
926
905
  }[] | undefined;
906
+ stt?: {
907
+ provider: "deepgram" | "cartesia" | "assemblyai";
908
+ model?: string | undefined;
909
+ language?: string | undefined;
910
+ endOfTurnConfidence?: number | undefined;
911
+ endOfTurnTimeoutMs?: number | undefined;
912
+ keywords?: string[] | undefined;
913
+ } | undefined;
914
+ realtime?: {
915
+ provider: "openai" | "google";
916
+ model: string;
917
+ voice?: string | undefined;
918
+ temperature?: number | undefined;
919
+ } | undefined;
920
+ voice?: {
921
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
922
+ voiceId: string;
923
+ model?: string | undefined;
924
+ rate?: number | undefined;
925
+ } | undefined;
926
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
927
927
  mode?: "realtime" | "cascade" | undefined;
928
928
  model?: {
929
929
  provider: "openai" | "anthropic" | "gemini";
@@ -952,8 +952,8 @@ declare const CallPlan: z.ZodObject<{
952
952
  process?: {
953
953
  backendAck?: {
954
954
  url: string;
955
- headers?: Record<string, string> | undefined;
956
955
  timeoutMs?: number | undefined;
956
+ headers?: Record<string, string> | undefined;
957
957
  } | undefined;
958
958
  collect?: Record<string, {
959
959
  type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
@@ -979,15 +979,15 @@ declare const CallPlan: z.ZodObject<{
979
979
  }[] | undefined;
980
980
  } | undefined;
981
981
  openQuestions?: {
982
- kind: "decision" | "auth" | "fact";
983
982
  id: string;
983
+ kind: "decision" | "auth" | "fact";
984
984
  prompt: string;
985
985
  options?: string[] | undefined;
986
986
  deferrableToCallee?: boolean | undefined;
987
987
  }[] | undefined;
988
988
  unresolvedQuestions?: {
989
- kind: "decision" | "auth" | "fact";
990
989
  id: string;
990
+ kind: "decision" | "auth" | "fact";
991
991
  prompt: string;
992
992
  options?: string[] | undefined;
993
993
  deferrableToCallee?: boolean | undefined;
@@ -1005,13 +1005,13 @@ declare const RelevantContext: z.ZodObject<{
1005
1005
  account: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1006
1006
  platform: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1007
1007
  }, "strip", z.ZodTypeAny, {
1008
- caller: Record<string, unknown>;
1009
1008
  call: Record<string, unknown>;
1009
+ caller: Record<string, unknown>;
1010
1010
  account: Record<string, unknown>;
1011
1011
  platform: Record<string, unknown>;
1012
1012
  }, {
1013
- caller: Record<string, unknown>;
1014
1013
  call: Record<string, unknown>;
1014
+ caller: Record<string, unknown>;
1015
1015
  account: Record<string, unknown>;
1016
1016
  platform: Record<string, unknown>;
1017
1017
  }>;
@@ -1069,10 +1069,10 @@ declare const DeleteCallerResponse: z.ZodObject<{
1069
1069
  scopesPurged: z.ZodArray<z.ZodEnum<["call", "caller", "account", "platform"]>, "many">;
1070
1070
  }, "strip", z.ZodTypeAny, {
1071
1071
  ok: true;
1072
- scopesPurged: ("caller" | "call" | "account" | "platform")[];
1072
+ scopesPurged: ("call" | "caller" | "account" | "platform")[];
1073
1073
  }, {
1074
1074
  ok: true;
1075
- scopesPurged: ("caller" | "call" | "account" | "platform")[];
1075
+ scopesPurged: ("call" | "caller" | "account" | "platform")[];
1076
1076
  }>;
1077
1077
  type DeleteCallerResponse = z.infer<typeof DeleteCallerResponse>;
1078
1078
 
@@ -1302,12 +1302,12 @@ declare const AgentConfig$1: z.ZodObject<{
1302
1302
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1303
1303
  }, "strip", z.ZodTypeAny, {
1304
1304
  url: string;
1305
- headers?: Record<string, string> | undefined;
1306
1305
  timeoutMs?: number | undefined;
1306
+ headers?: Record<string, string> | undefined;
1307
1307
  }, {
1308
1308
  url: string;
1309
- headers?: Record<string, string> | undefined;
1310
1309
  timeoutMs?: number | undefined;
1310
+ headers?: Record<string, string> | undefined;
1311
1311
  }>>;
1312
1312
  }, "strip", z.ZodTypeAny, {
1313
1313
  collect: Record<string, {
@@ -1323,14 +1323,14 @@ declare const AgentConfig$1: z.ZodObject<{
1323
1323
  completeWhen: "all-required-captured" | "all-captured";
1324
1324
  backendAck?: {
1325
1325
  url: string;
1326
- headers?: Record<string, string> | undefined;
1327
1326
  timeoutMs?: number | undefined;
1327
+ headers?: Record<string, string> | undefined;
1328
1328
  } | undefined;
1329
1329
  }, {
1330
1330
  backendAck?: {
1331
1331
  url: string;
1332
- headers?: Record<string, string> | undefined;
1333
1332
  timeoutMs?: number | undefined;
1333
+ headers?: Record<string, string> | undefined;
1334
1334
  } | undefined;
1335
1335
  collect?: Record<string, {
1336
1336
  type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
@@ -1350,22 +1350,22 @@ declare const AgentConfig$1: z.ZodObject<{
1350
1350
  pattern: z.ZodString;
1351
1351
  flags: z.ZodOptional<z.ZodString>;
1352
1352
  }, "strip", z.ZodTypeAny, {
1353
- kind: "regex";
1354
1353
  pattern: string;
1354
+ kind: "regex";
1355
1355
  flags?: string | undefined;
1356
1356
  }, {
1357
- kind: "regex";
1358
1357
  pattern: string;
1358
+ kind: "regex";
1359
1359
  flags?: string | undefined;
1360
1360
  }>, z.ZodObject<{
1361
1361
  kind: z.ZodLiteral<"signal">;
1362
1362
  name: z.ZodString;
1363
1363
  }, "strip", z.ZodTypeAny, {
1364
- kind: "signal";
1365
1364
  name: string;
1366
- }, {
1367
1365
  kind: "signal";
1366
+ }, {
1368
1367
  name: string;
1368
+ kind: "signal";
1369
1369
  }>]>;
1370
1370
  then: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1371
1371
  kind: z.ZodLiteral<"handoff">;
@@ -1400,12 +1400,12 @@ declare const AgentConfig$1: z.ZodObject<{
1400
1400
  kind: "say";
1401
1401
  };
1402
1402
  on: {
1403
- kind: "regex";
1404
1403
  pattern: string;
1404
+ kind: "regex";
1405
1405
  flags?: string | undefined;
1406
1406
  } | {
1407
- kind: "signal";
1408
1407
  name: string;
1408
+ kind: "signal";
1409
1409
  };
1410
1410
  onlyWhile?: string | undefined;
1411
1411
  }, {
@@ -1418,12 +1418,12 @@ declare const AgentConfig$1: z.ZodObject<{
1418
1418
  kind: "say";
1419
1419
  };
1420
1420
  on: {
1421
- kind: "regex";
1422
1421
  pattern: string;
1422
+ kind: "regex";
1423
1423
  flags?: string | undefined;
1424
1424
  } | {
1425
- kind: "signal";
1426
1425
  name: string;
1426
+ kind: "signal";
1427
1427
  };
1428
1428
  onlyWhile?: string | undefined;
1429
1429
  }>>>;
@@ -1453,21 +1453,21 @@ declare const AgentConfig$1: z.ZodObject<{
1453
1453
  createdAt: z.ZodString;
1454
1454
  updatedAt: z.ZodString;
1455
1455
  }, "strip", z.ZodTypeAny, {
1456
+ id: string;
1457
+ name: string;
1458
+ tools: {
1459
+ toolName: string;
1460
+ defaultArgs?: Record<string, unknown> | undefined;
1461
+ }[];
1456
1462
  voice: {
1457
1463
  provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
1458
1464
  voiceId: string;
1459
1465
  model?: string | undefined;
1460
1466
  rate?: number | undefined;
1461
1467
  };
1462
- id: string;
1463
1468
  projectId: string;
1464
- name: string;
1465
1469
  createdAt: string;
1466
1470
  updatedAt: string;
1467
- tools: {
1468
- toolName: string;
1469
- defaultArgs?: Record<string, unknown> | undefined;
1470
- }[];
1471
1471
  mode: "realtime" | "cascade";
1472
1472
  model: {
1473
1473
  provider: "openai" | "anthropic" | "gemini";
@@ -1498,21 +1498,6 @@ declare const AgentConfig$1: z.ZodObject<{
1498
1498
  enum?: string[] | undefined;
1499
1499
  description?: string | undefined;
1500
1500
  }[];
1501
- stt?: {
1502
- provider: "deepgram" | "cartesia" | "assemblyai";
1503
- model?: string | undefined;
1504
- language?: string | undefined;
1505
- endOfTurnConfidence?: number | undefined;
1506
- endOfTurnTimeoutMs?: number | undefined;
1507
- keywords?: string[] | undefined;
1508
- } | undefined;
1509
- realtime?: {
1510
- provider: "openai" | "google";
1511
- model: string;
1512
- voice?: string | undefined;
1513
- temperature?: number | undefined;
1514
- } | undefined;
1515
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1516
1501
  triggers?: Record<string, {
1517
1502
  then: {
1518
1503
  kind: "handoff";
@@ -1523,15 +1508,30 @@ declare const AgentConfig$1: z.ZodObject<{
1523
1508
  kind: "say";
1524
1509
  };
1525
1510
  on: {
1526
- kind: "regex";
1527
1511
  pattern: string;
1512
+ kind: "regex";
1528
1513
  flags?: string | undefined;
1529
1514
  } | {
1530
- kind: "signal";
1531
1515
  name: string;
1516
+ kind: "signal";
1532
1517
  };
1533
1518
  onlyWhile?: string | undefined;
1534
1519
  }> | undefined;
1520
+ stt?: {
1521
+ provider: "deepgram" | "cartesia" | "assemblyai";
1522
+ model?: string | undefined;
1523
+ language?: string | undefined;
1524
+ endOfTurnConfidence?: number | undefined;
1525
+ endOfTurnTimeoutMs?: number | undefined;
1526
+ keywords?: string[] | undefined;
1527
+ } | undefined;
1528
+ realtime?: {
1529
+ provider: "openai" | "google";
1530
+ model: string;
1531
+ voice?: string | undefined;
1532
+ temperature?: number | undefined;
1533
+ } | undefined;
1534
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1535
1535
  systemPrompt?: string | undefined;
1536
1536
  routingInstructions?: string | undefined;
1537
1537
  process?: {
@@ -1548,23 +1548,23 @@ declare const AgentConfig$1: z.ZodObject<{
1548
1548
  completeWhen: "all-required-captured" | "all-captured";
1549
1549
  backendAck?: {
1550
1550
  url: string;
1551
- headers?: Record<string, string> | undefined;
1552
1551
  timeoutMs?: number | undefined;
1552
+ headers?: Record<string, string> | undefined;
1553
1553
  } | undefined;
1554
1554
  } | undefined;
1555
1555
  tags?: string[] | undefined;
1556
1556
  brainConnectorId?: string | null | undefined;
1557
1557
  modeLocked?: boolean | undefined;
1558
1558
  }, {
1559
+ id: string;
1560
+ name: string;
1559
1561
  voice: {
1560
1562
  provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
1561
1563
  voiceId: string;
1562
1564
  model?: string | undefined;
1563
1565
  rate?: number | undefined;
1564
1566
  };
1565
- id: string;
1566
1567
  projectId: string;
1567
- name: string;
1568
1568
  createdAt: string;
1569
1569
  updatedAt: string;
1570
1570
  model: {
@@ -1588,21 +1588,6 @@ declare const AgentConfig$1: z.ZodObject<{
1588
1588
  normal?: number | undefined;
1589
1589
  } | undefined;
1590
1590
  };
1591
- stt?: {
1592
- provider: "deepgram" | "cartesia" | "assemblyai";
1593
- model?: string | undefined;
1594
- language?: string | undefined;
1595
- endOfTurnConfidence?: number | undefined;
1596
- endOfTurnTimeoutMs?: number | undefined;
1597
- keywords?: string[] | undefined;
1598
- } | undefined;
1599
- realtime?: {
1600
- provider: "openai" | "google";
1601
- model: string;
1602
- voice?: string | undefined;
1603
- temperature?: number | undefined;
1604
- } | undefined;
1605
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1606
1591
  triggers?: Record<string, {
1607
1592
  then: {
1608
1593
  kind: "handoff";
@@ -1613,12 +1598,12 @@ declare const AgentConfig$1: z.ZodObject<{
1613
1598
  kind: "say";
1614
1599
  };
1615
1600
  on: {
1616
- kind: "regex";
1617
1601
  pattern: string;
1602
+ kind: "regex";
1618
1603
  flags?: string | undefined;
1619
1604
  } | {
1620
- kind: "signal";
1621
1605
  name: string;
1606
+ kind: "signal";
1622
1607
  };
1623
1608
  onlyWhile?: string | undefined;
1624
1609
  }> | undefined;
@@ -1626,6 +1611,21 @@ declare const AgentConfig$1: z.ZodObject<{
1626
1611
  toolName: string;
1627
1612
  defaultArgs?: Record<string, unknown> | undefined;
1628
1613
  }[] | undefined;
1614
+ stt?: {
1615
+ provider: "deepgram" | "cartesia" | "assemblyai";
1616
+ model?: string | undefined;
1617
+ language?: string | undefined;
1618
+ endOfTurnConfidence?: number | undefined;
1619
+ endOfTurnTimeoutMs?: number | undefined;
1620
+ keywords?: string[] | undefined;
1621
+ } | undefined;
1622
+ realtime?: {
1623
+ provider: "openai" | "google";
1624
+ model: string;
1625
+ voice?: string | undefined;
1626
+ temperature?: number | undefined;
1627
+ } | undefined;
1628
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1629
1629
  mode?: "realtime" | "cascade" | undefined;
1630
1630
  language?: string | undefined;
1631
1631
  systemPrompt?: string | undefined;
@@ -1633,8 +1633,8 @@ declare const AgentConfig$1: z.ZodObject<{
1633
1633
  process?: {
1634
1634
  backendAck?: {
1635
1635
  url: string;
1636
- headers?: Record<string, string> | undefined;
1637
1636
  timeoutMs?: number | undefined;
1637
+ headers?: Record<string, string> | undefined;
1638
1638
  } | undefined;
1639
1639
  collect?: Record<string, {
1640
1640
  type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
@@ -1661,6 +1661,9 @@ declare const AgentConfig$1: z.ZodObject<{
1661
1661
  }>;
1662
1662
  type AgentConfig$1 = z.infer<typeof AgentConfig$1>;
1663
1663
 
1664
+ declare const AgentEndReason: z.ZodEnum<["flow_boot:schema_fetch_failed" | "flow_boot:no_process_schema" | "flow_boot:missing_agent_id" | "flow_boot:no_api_key", ...("flow_boot:schema_fetch_failed" | "flow_boot:no_process_schema" | "flow_boot:missing_agent_id" | "flow_boot:no_api_key")[]]>;
1665
+ type AgentEndReason = z.infer<typeof AgentEndReason>;
1666
+
1664
1667
  interface ReadinessResult {
1665
1668
  readonly ok: boolean;
1666
1669
  /** Human-readable explanation when ok=false. Surfaced in metadata. */
@@ -2481,8 +2484,8 @@ declare class AgentsClient {
2481
2484
  agents: {
2482
2485
  status: "online" | "offline" | "degraded";
2483
2486
  id: string;
2484
- projectId: string;
2485
2487
  name: string;
2488
+ projectId: string;
2486
2489
  createdAt: string;
2487
2490
  updatedAt: string;
2488
2491
  version: string;
@@ -2520,7 +2523,7 @@ declare class AgentsClient {
2520
2523
  routes?: Record<string, string> | undefined;
2521
2524
  } | undefined;
2522
2525
  memory?: {
2523
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
2526
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
2524
2527
  retentionDays?: number | undefined;
2525
2528
  piiFields?: string[] | undefined;
2526
2529
  } | undefined;
@@ -2536,8 +2539,8 @@ declare class AgentsClient {
2536
2539
  } | undefined;
2537
2540
  } | undefined;
2538
2541
  prompts?: {
2539
- text: string;
2540
2542
  id: string;
2543
+ text: string;
2541
2544
  }[] | undefined;
2542
2545
  triggers?: {
2543
2546
  then: string;
@@ -2547,29 +2550,29 @@ declare class AgentsClient {
2547
2550
  }[] | undefined;
2548
2551
  tools?: {
2549
2552
  name: string;
2553
+ url: string;
2550
2554
  description: string;
2551
2555
  input: Record<string, "string" | "number" | "boolean">;
2552
- url: string;
2553
2556
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
2554
2557
  auth: "none" | "connection";
2555
2558
  headers?: Record<string, string> | undefined;
2556
2559
  connectionRef?: string | undefined;
2557
2560
  }[] | undefined;
2558
2561
  program?: {
2562
+ v: 1;
2559
2563
  id: string;
2564
+ entry: string[];
2560
2565
  nodes: Record<string, {
2561
- type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
2566
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
2562
2567
  id: string;
2563
2568
  config: Record<string, unknown>;
2564
2569
  out: {
2565
2570
  to: string;
2571
+ condition?: string | undefined;
2566
2572
  sourceHandle?: string | undefined;
2567
2573
  label?: string | undefined;
2568
- condition?: string | undefined;
2569
2574
  }[];
2570
2575
  }>;
2571
- v: 1;
2572
- entry: string[];
2573
2576
  completionGate: {
2574
2577
  requiredFields: string[];
2575
2578
  };
@@ -2712,6 +2715,9 @@ interface SyncCallStateInput {
2712
2715
  readonly attributes?: Record<string, CallAttributeValue>;
2713
2716
  readonly participants?: CallParticipantInput[];
2714
2717
  readonly legs?: CallLegInput[];
2718
+ /** Why the agent is ending the call — recorded as the call's end reason when it arrives before the disconnect.
2719
+ * Only agent-reported reasons are accepted (the rest come from the carrier). */
2720
+ readonly endReason?: AgentEndReason;
2715
2721
  }
2716
2722
  declare class CallsClient {
2717
2723
  private readonly transport;
@@ -2863,8 +2869,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2863
2869
  baseUrl: string;
2864
2870
  }>>>;
2865
2871
  }, "strip", z.ZodTypeAny, {
2866
- enabled: boolean;
2867
2872
  id: string;
2873
+ enabled: boolean;
2868
2874
  mode: "tunnel" | "direct";
2869
2875
  defaultModel: string | null;
2870
2876
  connectionId: string | null;
@@ -2874,8 +2880,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2874
2880
  baseUrl: string;
2875
2881
  } | null | undefined;
2876
2882
  }, {
2877
- enabled: boolean;
2878
2883
  id: string;
2884
+ enabled: boolean;
2879
2885
  mode: "tunnel" | "direct";
2880
2886
  defaultModel: string | null;
2881
2887
  connectionId: string | null;
@@ -2887,8 +2893,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2887
2893
  }>;
2888
2894
  }, "strip", z.ZodTypeAny, {
2889
2895
  connector: {
2890
- enabled: boolean;
2891
2896
  id: string;
2897
+ enabled: boolean;
2892
2898
  mode: "tunnel" | "direct";
2893
2899
  defaultModel: string | null;
2894
2900
  connectionId: string | null;
@@ -2900,8 +2906,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2900
2906
  };
2901
2907
  }, {
2902
2908
  connector: {
2903
- enabled: boolean;
2904
2909
  id: string;
2910
+ enabled: boolean;
2905
2911
  mode: "tunnel" | "direct";
2906
2912
  defaultModel: string | null;
2907
2913
  connectionId: string | null;