@voicelayer/sdk 0.5.0 → 0.5.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 AgentEnvironment, P as ProcessSchemaDTO, R as ReadinessProbe, a as AgentLifecycleEvent, b as AgentDTO, c as AgentEventEmitter, d as AgentContext, e as AgentConfig$1, f as ProcessField, M as ModelConfig, C as ConnectorInstance, g as ProviderFactory, S as STTProvider, T as TTSProvider, L as LLMProvider, h as RealtimeProvider, i as TurnDetectorProvider, V as VADProvider, j as ProcessDefinition, k as TriggerDefinition, H as HandoffConfig, l as MemoryConfig, m as ToolDefinition$1, n as SpeechConfig, o as ToolExecutor, p as HostLookup } from './text-session-Bf4Jni7H.js';
2
- export { q as AgentEventListener, r as AgentTurnEvent, s as AudioProfile, t as AudioSurface, u as CallInfo, v as CallOutcomeSummary, w as ChannelKind, x as CompletionStrategy, y as ComplianceTag, z as ConsultationPolicy, D as DtmfEvent, B as DtmfHandler, E as EndCallControllerHandle, F as EndCallInfo, G as EndCallOutcome, I as EndCallPolicy, J as EndCallTrigger, K as EndpointingConfig, N as FakeSessionAdapter, O as FloorControlConfig, Q as InboundOptions, U as InferProcessData, W as InterruptionConfig, X as LK_AGENT_STATE_MAP, Y as MemoryHandle, Z as MemoryScope, _ as MetricsEvent, $ as NON_BUSY_STATES, a0 as Participant, a1 as ParticipantId, a2 as ParticipantKind, a3 as ParticipantSet, a4 as ParticipantsConfig, a5 as ProcessBackendAck, a6 as ProcessFieldType, a7 as ProcessSnapshot, a8 as ReadinessReport, a9 as ReadinessResult, aa as RespondOptions, ab as Room, ac as RouteEntry, ad as RoutingRule, ae as RoutingSnapshot, af as RunTextSessionOptions, ag as RunTextTranscriptOptions, ah as SayOptions, ai as SecurityConfig, aj as SendDtmfOptions, ak as SessionAdapter, al as SessionCapabilities, am as SessionErrorEvent, an as SessionEvent, ao as SessionEventMap, ap as SessionFactory, aq as SessionFactoryInput, ar as SessionOutbound, as as SessionState, at as ShorthandPrimitive, au as SpeechResult, av as SpeechTarget, aw as StateChangeEvent, ax as TextSession, ay as TextTranscriptResult, az as ToolInputShape, aA as TriggerAction, aB as TriggerCondition, aC as TtsVoiceConfig, aD as TurnEvent, aE as Unsubscribe, aF as UserInputEvent, aG as UserStateEvent, aH as UserTurn, aI as VoiceLayerAuthError, aJ as VoiceLayerError, aK as VoiceLayerHttpError, aL as VoiceLayerNetworkError, aM as VoiceLayerValidationError, aN as applySpeechTurnHandling, aO as asyncProbe, aP as defineProcess, aQ as dtmfCodeToDigit, aR as dtmfDigitToCode, aS as duck, aT as envProbe, aU as mute, aV as normalizeState, a1 as participantId, aW as passthrough, aX as runProbes, aY as runTextSession, aZ as runTextTranscript, a_ as transform, a$ as urlProbe } from './text-session-Bf4Jni7H.js';
1
+ import { A as AgentEnvironment, P as ProcessSchemaDTO, R as ReadinessProbe, a as AgentLifecycleEvent, b as AgentDTO, c as AgentEventEmitter, d as AgentContext, e as AgentConfig$1, f as ProcessField, M as ModelConfig, C as ConnectorInstance, g as ProviderFactory, S as STTProvider, T as TTSProvider, L as LLMProvider, h as RealtimeProvider, i as TurnDetectorProvider, V as VADProvider, j as ProcessDefinition, k as TriggerDefinition, H as HandoffConfig, l as MemoryConfig, m as ToolDefinition$1, n as SpeechConfig, o as ToolExecutor, p as HostLookup } from './text-session-BbG3VG50.js';
2
+ export { q as AgentEventListener, r as AgentTurnEvent, s as AudioProfile, t as AudioSurface, u as CallInfo, v as CallOutcomeSummary, w as ChannelKind, x as CompletionStrategy, y as ComplianceTag, z as ConsultationPolicy, D as DtmfEvent, B as DtmfHandler, E as EndCallControllerHandle, F as EndCallInfo, G as EndCallOutcome, I as EndCallPolicy, J as EndCallTrigger, K as EndpointingConfig, N as FakeSessionAdapter, O as FloorControlConfig, Q as InboundOptions, U as InferProcessData, W as InterruptionConfig, X as LK_AGENT_STATE_MAP, Y as MemoryHandle, Z as MemoryScope, _ as MetricsEvent, $ as NON_BUSY_STATES, a0 as Participant, a1 as ParticipantId, a2 as ParticipantKind, a3 as ParticipantSet, a4 as ParticipantsConfig, a5 as ProcessBackendAck, a6 as ProcessFieldType, a7 as ProcessSnapshot, a8 as ReadinessReport, a9 as ReadinessResult, aa as RespondOptions, ab as Room, ac as RouteEntry, ad as RoutingRule, ae as RoutingSnapshot, af as RunTextSessionOptions, ag as RunTextTranscriptOptions, ah as SayOptions, ai as SecurityConfig, aj as SendDtmfOptions, ak as SessionAdapter, al as SessionCapabilities, am as SessionErrorEvent, an as SessionEvent, ao as SessionEventMap, ap as SessionFactory, aq as SessionFactoryInput, ar as SessionOutbound, as as SessionState, at as ShorthandPrimitive, au as SpeechResult, av as SpeechTarget, aw as StateChangeEvent, ax as TextSession, ay as TextTranscriptResult, az as ToolInputShape, aA as TriggerAction, aB as TriggerCondition, aC as TtsVoiceConfig, aD as TurnEvent, aE as Unsubscribe, aF as UserInputEvent, aG as UserStateEvent, aH as UserTurn, aI as VoiceLayerAuthError, aJ as VoiceLayerError, aK as VoiceLayerHttpError, aL as VoiceLayerNetworkError, aM as VoiceLayerValidationError, aN as applySpeechTurnHandling, aO as asyncProbe, aP as defineProcess, aQ as dtmfCodeToDigit, aR as dtmfDigitToCode, aS as duck, aT as envProbe, aU as mute, aV as normalizeState, a1 as participantId, aW as passthrough, aX as runProbes, aY as runTextSession, aZ as runTextTranscript, a_ as transform, a$ as urlProbe } from './text-session-BbG3VG50.js';
3
3
  import { z, ZodType } from 'zod';
4
4
  import { O as OnQuery, B as BrainTransport } from './types-KqrAfY85.js';
5
5
  export { a as BrainCallMetadata, b as BrainCapabilities, c as BrainChunk, d as BrainMessage, e as BrainRequest, f as OnQueryContext, g as OnQueryResult } from './types-KqrAfY85.js';
@@ -33,10 +33,10 @@ declare const TextTurn: z.ZodObject<{
33
33
  deadlineAt: z.ZodString;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  text: string;
36
- from: string;
37
36
  agentId: string;
38
37
  turnId: string;
39
38
  channel: string;
39
+ from: string;
40
40
  conversationKey: string;
41
41
  history: {
42
42
  role: "user" | "assistant";
@@ -45,10 +45,10 @@ declare const TextTurn: z.ZodObject<{
45
45
  deadlineAt: string;
46
46
  }, {
47
47
  text: string;
48
- from: string;
49
48
  agentId: string;
50
49
  turnId: string;
51
50
  channel: string;
51
+ from: string;
52
52
  conversationKey: string;
53
53
  history: {
54
54
  role: "user" | "assistant";
@@ -81,8 +81,8 @@ declare const TextTurnReply: z.ZodUnion<[z.ZodObject<{
81
81
  byok: boolean;
82
82
  }>, "many">>;
83
83
  }, "strip", z.ZodTypeAny, {
84
- replies: string[];
85
84
  agentId: string;
85
+ replies: string[];
86
86
  usage: {
87
87
  provider: string;
88
88
  model: string;
@@ -91,8 +91,8 @@ declare const TextTurnReply: z.ZodUnion<[z.ZodObject<{
91
91
  byok: boolean;
92
92
  }[];
93
93
  }, {
94
- replies: string[];
95
94
  agentId: string;
95
+ replies: string[];
96
96
  usage?: {
97
97
  provider: string;
98
98
  model: string;
@@ -150,6 +150,61 @@ declare const CallPlan: z.ZodObject<{
150
150
  e164?: string | undefined;
151
151
  }>;
152
152
  draftConfig: z.ZodDefault<z.ZodObject<{
153
+ stt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
154
+ provider: z.ZodEnum<["deepgram", "cartesia", "assemblyai"]>;
155
+ model: z.ZodOptional<z.ZodString>;
156
+ language: z.ZodOptional<z.ZodString>;
157
+ endOfTurnConfidence: z.ZodOptional<z.ZodNumber>;
158
+ endOfTurnTimeoutMs: z.ZodOptional<z.ZodNumber>;
159
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ provider: "deepgram" | "cartesia" | "assemblyai";
162
+ model?: string | undefined;
163
+ language?: string | undefined;
164
+ endOfTurnConfidence?: number | undefined;
165
+ endOfTurnTimeoutMs?: number | undefined;
166
+ keywords?: string[] | undefined;
167
+ }, {
168
+ provider: "deepgram" | "cartesia" | "assemblyai";
169
+ model?: string | undefined;
170
+ language?: string | undefined;
171
+ endOfTurnConfidence?: number | undefined;
172
+ endOfTurnTimeoutMs?: number | undefined;
173
+ keywords?: string[] | undefined;
174
+ }>>>;
175
+ realtime: z.ZodOptional<z.ZodOptional<z.ZodObject<{
176
+ provider: z.ZodEnum<["openai", "google"]>;
177
+ model: z.ZodString;
178
+ voice: z.ZodOptional<z.ZodString>;
179
+ temperature: z.ZodOptional<z.ZodNumber>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ provider: "openai" | "google";
182
+ model: string;
183
+ voice?: string | undefined;
184
+ temperature?: number | undefined;
185
+ }, {
186
+ provider: "openai" | "google";
187
+ model: string;
188
+ voice?: string | undefined;
189
+ temperature?: number | undefined;
190
+ }>>>;
191
+ voice: z.ZodOptional<z.ZodObject<{
192
+ provider: z.ZodEnum<["deepgram", "elevenlabs", "openai", "cartesia"]>;
193
+ voiceId: z.ZodString;
194
+ model: z.ZodOptional<z.ZodString>;
195
+ rate: z.ZodOptional<z.ZodNumber>;
196
+ }, "strip", z.ZodTypeAny, {
197
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
198
+ voiceId: string;
199
+ model?: string | undefined;
200
+ rate?: number | undefined;
201
+ }, {
202
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
203
+ voiceId: string;
204
+ model?: string | undefined;
205
+ rate?: number | undefined;
206
+ }>>;
207
+ source: z.ZodOptional<z.ZodOptional<z.ZodEnum<["sdk", "flow", "playbook", "connector"]>>>;
153
208
  name: z.ZodOptional<z.ZodString>;
154
209
  triggers: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
155
210
  on: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -157,22 +212,22 @@ declare const CallPlan: z.ZodObject<{
157
212
  pattern: z.ZodString;
158
213
  flags: z.ZodOptional<z.ZodString>;
159
214
  }, "strip", z.ZodTypeAny, {
160
- pattern: string;
161
215
  kind: "regex";
216
+ pattern: string;
162
217
  flags?: string | undefined;
163
218
  }, {
164
- pattern: string;
165
219
  kind: "regex";
220
+ pattern: string;
166
221
  flags?: string | undefined;
167
222
  }>, z.ZodObject<{
168
223
  kind: z.ZodLiteral<"signal">;
169
224
  name: z.ZodString;
170
225
  }, "strip", z.ZodTypeAny, {
171
- name: string;
172
226
  kind: "signal";
173
- }, {
174
227
  name: string;
228
+ }, {
175
229
  kind: "signal";
230
+ name: string;
176
231
  }>]>;
177
232
  then: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
178
233
  kind: z.ZodLiteral<"handoff">;
@@ -207,12 +262,12 @@ declare const CallPlan: z.ZodObject<{
207
262
  kind: "say";
208
263
  };
209
264
  on: {
210
- pattern: string;
211
265
  kind: "regex";
266
+ pattern: string;
212
267
  flags?: string | undefined;
213
268
  } | {
214
- name: string;
215
269
  kind: "signal";
270
+ name: string;
216
271
  };
217
272
  onlyWhile?: string | undefined;
218
273
  }, {
@@ -225,12 +280,12 @@ declare const CallPlan: z.ZodObject<{
225
280
  kind: "say";
226
281
  };
227
282
  on: {
228
- pattern: string;
229
283
  kind: "regex";
284
+ pattern: string;
230
285
  flags?: string | undefined;
231
286
  } | {
232
- name: string;
233
287
  kind: "signal";
288
+ name: string;
234
289
  };
235
290
  onlyWhile?: string | undefined;
236
291
  }>>>>;
@@ -244,61 +299,6 @@ declare const CallPlan: z.ZodObject<{
244
299
  toolName: string;
245
300
  defaultArgs?: Record<string, unknown> | undefined;
246
301
  }>, "many">>>;
247
- stt: z.ZodOptional<z.ZodOptional<z.ZodObject<{
248
- provider: z.ZodEnum<["deepgram", "cartesia", "assemblyai"]>;
249
- model: z.ZodOptional<z.ZodString>;
250
- language: z.ZodOptional<z.ZodString>;
251
- endOfTurnConfidence: z.ZodOptional<z.ZodNumber>;
252
- endOfTurnTimeoutMs: z.ZodOptional<z.ZodNumber>;
253
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
254
- }, "strip", z.ZodTypeAny, {
255
- provider: "deepgram" | "cartesia" | "assemblyai";
256
- model?: string | undefined;
257
- language?: string | undefined;
258
- endOfTurnConfidence?: number | undefined;
259
- endOfTurnTimeoutMs?: number | undefined;
260
- keywords?: string[] | undefined;
261
- }, {
262
- provider: "deepgram" | "cartesia" | "assemblyai";
263
- model?: string | undefined;
264
- language?: string | undefined;
265
- endOfTurnConfidence?: number | undefined;
266
- endOfTurnTimeoutMs?: number | undefined;
267
- keywords?: string[] | undefined;
268
- }>>>;
269
- realtime: z.ZodOptional<z.ZodOptional<z.ZodObject<{
270
- provider: z.ZodEnum<["openai", "google"]>;
271
- model: z.ZodString;
272
- voice: z.ZodOptional<z.ZodString>;
273
- temperature: z.ZodOptional<z.ZodNumber>;
274
- }, "strip", z.ZodTypeAny, {
275
- provider: "openai" | "google";
276
- model: string;
277
- voice?: string | undefined;
278
- temperature?: number | undefined;
279
- }, {
280
- provider: "openai" | "google";
281
- model: string;
282
- voice?: string | undefined;
283
- temperature?: number | undefined;
284
- }>>>;
285
- voice: z.ZodOptional<z.ZodObject<{
286
- provider: z.ZodEnum<["deepgram", "elevenlabs", "openai", "cartesia"]>;
287
- voiceId: z.ZodString;
288
- model: z.ZodOptional<z.ZodString>;
289
- rate: z.ZodOptional<z.ZodNumber>;
290
- }, "strip", z.ZodTypeAny, {
291
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
292
- voiceId: string;
293
- model?: string | undefined;
294
- rate?: number | undefined;
295
- }, {
296
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
297
- voiceId: string;
298
- model?: string | undefined;
299
- rate?: number | undefined;
300
- }>>;
301
- source: z.ZodOptional<z.ZodOptional<z.ZodEnum<["sdk", "flow", "playbook", "connector"]>>>;
302
302
  mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["cascade", "realtime"]>>>;
303
303
  model: z.ZodOptional<z.ZodObject<{
304
304
  provider: z.ZodEnum<["openai", "anthropic", "gemini"]>;
@@ -381,7 +381,7 @@ declare const CallPlan: z.ZodObject<{
381
381
  ask: z.ZodOptional<z.ZodString>;
382
382
  extract: z.ZodOptional<z.ZodString>;
383
383
  }, "strip", z.ZodTypeAny, {
384
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
384
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
385
385
  ask?: string | undefined;
386
386
  required?: boolean | undefined;
387
387
  pattern?: string | undefined;
@@ -390,7 +390,7 @@ declare const CallPlan: z.ZodObject<{
390
390
  enum?: string[] | undefined;
391
391
  extract?: string | undefined;
392
392
  }, {
393
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
393
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
394
394
  ask?: string | undefined;
395
395
  required?: boolean | undefined;
396
396
  pattern?: string | undefined;
@@ -406,16 +406,16 @@ declare const CallPlan: z.ZodObject<{
406
406
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
407
407
  }, "strip", z.ZodTypeAny, {
408
408
  url: string;
409
- timeoutMs?: number | undefined;
410
409
  headers?: Record<string, string> | undefined;
410
+ timeoutMs?: number | undefined;
411
411
  }, {
412
412
  url: string;
413
- timeoutMs?: number | undefined;
414
413
  headers?: Record<string, string> | undefined;
414
+ timeoutMs?: number | undefined;
415
415
  }>>;
416
416
  }, "strip", z.ZodTypeAny, {
417
417
  collect: Record<string, {
418
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
418
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
419
419
  ask?: string | undefined;
420
420
  required?: boolean | undefined;
421
421
  pattern?: string | undefined;
@@ -427,17 +427,17 @@ declare const CallPlan: z.ZodObject<{
427
427
  completeWhen: "all-required-captured" | "all-captured";
428
428
  backendAck?: {
429
429
  url: string;
430
- timeoutMs?: number | undefined;
431
430
  headers?: Record<string, string> | undefined;
431
+ timeoutMs?: number | undefined;
432
432
  } | undefined;
433
433
  }, {
434
434
  backendAck?: {
435
435
  url: string;
436
- timeoutMs?: number | undefined;
437
436
  headers?: Record<string, string> | undefined;
437
+ timeoutMs?: number | undefined;
438
438
  } | undefined;
439
439
  collect?: Record<string, {
440
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
440
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
441
441
  ask?: string | undefined;
442
442
  required?: boolean | undefined;
443
443
  pattern?: string | undefined;
@@ -458,19 +458,40 @@ declare const CallPlan: z.ZodObject<{
458
458
  description: z.ZodOptional<z.ZodString>;
459
459
  enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
460
460
  }, "strip", z.ZodTypeAny, {
461
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
461
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
462
462
  name: string;
463
463
  required: boolean;
464
464
  enum?: string[] | undefined;
465
465
  description?: string | undefined;
466
466
  }, {
467
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
467
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
468
468
  name: string;
469
469
  required: boolean;
470
470
  enum?: string[] | undefined;
471
471
  description?: string | undefined;
472
472
  }>, "many">>>;
473
473
  }, "strip", z.ZodTypeAny, {
474
+ stt?: {
475
+ provider: "deepgram" | "cartesia" | "assemblyai";
476
+ model?: string | undefined;
477
+ language?: string | undefined;
478
+ endOfTurnConfidence?: number | undefined;
479
+ endOfTurnTimeoutMs?: number | undefined;
480
+ keywords?: string[] | undefined;
481
+ } | undefined;
482
+ realtime?: {
483
+ provider: "openai" | "google";
484
+ model: string;
485
+ voice?: string | undefined;
486
+ temperature?: number | undefined;
487
+ } | undefined;
488
+ voice?: {
489
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
490
+ voiceId: string;
491
+ model?: string | undefined;
492
+ rate?: number | undefined;
493
+ } | undefined;
494
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
474
495
  name?: string | undefined;
475
496
  triggers?: Record<string, {
476
497
  then: {
@@ -482,12 +503,12 @@ declare const CallPlan: z.ZodObject<{
482
503
  kind: "say";
483
504
  };
484
505
  on: {
485
- pattern: string;
486
506
  kind: "regex";
507
+ pattern: string;
487
508
  flags?: string | undefined;
488
509
  } | {
489
- name: string;
490
510
  kind: "signal";
511
+ name: string;
491
512
  };
492
513
  onlyWhile?: string | undefined;
493
514
  }> | undefined;
@@ -495,27 +516,6 @@ declare const CallPlan: z.ZodObject<{
495
516
  toolName: string;
496
517
  defaultArgs?: Record<string, unknown> | undefined;
497
518
  }[] | undefined;
498
- stt?: {
499
- provider: "deepgram" | "cartesia" | "assemblyai";
500
- model?: string | undefined;
501
- language?: string | undefined;
502
- endOfTurnConfidence?: number | undefined;
503
- endOfTurnTimeoutMs?: number | undefined;
504
- keywords?: string[] | undefined;
505
- } | undefined;
506
- realtime?: {
507
- provider: "openai" | "google";
508
- model: string;
509
- voice?: string | undefined;
510
- temperature?: number | undefined;
511
- } | undefined;
512
- voice?: {
513
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
514
- voiceId: string;
515
- model?: string | undefined;
516
- rate?: number | undefined;
517
- } | undefined;
518
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
519
519
  mode?: "realtime" | "cascade" | undefined;
520
520
  model?: {
521
521
  provider: "openai" | "anthropic" | "gemini";
@@ -543,7 +543,7 @@ declare const CallPlan: z.ZodObject<{
543
543
  } | undefined;
544
544
  process?: {
545
545
  collect: Record<string, {
546
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
546
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
547
547
  ask?: string | undefined;
548
548
  required?: boolean | undefined;
549
549
  pattern?: string | undefined;
@@ -555,21 +555,42 @@ declare const CallPlan: z.ZodObject<{
555
555
  completeWhen: "all-required-captured" | "all-captured";
556
556
  backendAck?: {
557
557
  url: string;
558
- timeoutMs?: number | undefined;
559
558
  headers?: Record<string, string> | undefined;
559
+ timeoutMs?: number | undefined;
560
560
  } | undefined;
561
561
  } | undefined;
562
562
  tags?: string[] | undefined;
563
563
  brainConnectorId?: string | null | undefined;
564
564
  modeLocked?: boolean | undefined;
565
565
  requiredInfo?: {
566
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
566
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
567
567
  name: string;
568
568
  required: boolean;
569
569
  enum?: string[] | undefined;
570
570
  description?: string | undefined;
571
571
  }[] | undefined;
572
572
  }, {
573
+ stt?: {
574
+ provider: "deepgram" | "cartesia" | "assemblyai";
575
+ model?: string | undefined;
576
+ language?: string | undefined;
577
+ endOfTurnConfidence?: number | undefined;
578
+ endOfTurnTimeoutMs?: number | undefined;
579
+ keywords?: string[] | undefined;
580
+ } | undefined;
581
+ realtime?: {
582
+ provider: "openai" | "google";
583
+ model: string;
584
+ voice?: string | undefined;
585
+ temperature?: number | undefined;
586
+ } | undefined;
587
+ voice?: {
588
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
589
+ voiceId: string;
590
+ model?: string | undefined;
591
+ rate?: number | undefined;
592
+ } | undefined;
593
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
573
594
  name?: string | undefined;
574
595
  triggers?: Record<string, {
575
596
  then: {
@@ -581,12 +602,12 @@ declare const CallPlan: z.ZodObject<{
581
602
  kind: "say";
582
603
  };
583
604
  on: {
584
- pattern: string;
585
605
  kind: "regex";
606
+ pattern: string;
586
607
  flags?: string | undefined;
587
608
  } | {
588
- name: string;
589
609
  kind: "signal";
610
+ name: string;
590
611
  };
591
612
  onlyWhile?: string | undefined;
592
613
  }> | undefined;
@@ -594,27 +615,6 @@ declare const CallPlan: z.ZodObject<{
594
615
  toolName: string;
595
616
  defaultArgs?: Record<string, unknown> | undefined;
596
617
  }[] | undefined;
597
- stt?: {
598
- provider: "deepgram" | "cartesia" | "assemblyai";
599
- model?: string | undefined;
600
- language?: string | undefined;
601
- endOfTurnConfidence?: number | undefined;
602
- endOfTurnTimeoutMs?: number | undefined;
603
- keywords?: string[] | undefined;
604
- } | undefined;
605
- realtime?: {
606
- provider: "openai" | "google";
607
- model: string;
608
- voice?: string | undefined;
609
- temperature?: number | undefined;
610
- } | undefined;
611
- voice?: {
612
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
613
- voiceId: string;
614
- model?: string | undefined;
615
- rate?: number | undefined;
616
- } | undefined;
617
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
618
618
  mode?: "realtime" | "cascade" | undefined;
619
619
  model?: {
620
620
  provider: "openai" | "anthropic" | "gemini";
@@ -643,11 +643,11 @@ declare const CallPlan: z.ZodObject<{
643
643
  process?: {
644
644
  backendAck?: {
645
645
  url: string;
646
- timeoutMs?: number | undefined;
647
646
  headers?: Record<string, string> | undefined;
647
+ timeoutMs?: number | undefined;
648
648
  } | undefined;
649
649
  collect?: Record<string, {
650
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
650
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
651
651
  ask?: string | undefined;
652
652
  required?: boolean | undefined;
653
653
  pattern?: string | undefined;
@@ -662,7 +662,7 @@ declare const CallPlan: z.ZodObject<{
662
662
  brainConnectorId?: string | null | undefined;
663
663
  modeLocked?: boolean | undefined;
664
664
  requiredInfo?: {
665
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
665
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
666
666
  name: string;
667
667
  required: boolean;
668
668
  enum?: string[] | undefined;
@@ -676,14 +676,14 @@ declare const CallPlan: z.ZodObject<{
676
676
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
677
677
  deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
678
678
  }, "strip", z.ZodTypeAny, {
679
- id: string;
680
679
  kind: "decision" | "auth" | "fact";
680
+ id: string;
681
681
  prompt: string;
682
682
  deferrableToCallee: boolean;
683
683
  options?: string[] | undefined;
684
684
  }, {
685
- id: string;
686
685
  kind: "decision" | "auth" | "fact";
686
+ id: string;
687
687
  prompt: string;
688
688
  options?: string[] | undefined;
689
689
  deferrableToCallee?: boolean | undefined;
@@ -695,14 +695,14 @@ declare const CallPlan: z.ZodObject<{
695
695
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
696
696
  deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
697
697
  }, "strip", z.ZodTypeAny, {
698
- id: string;
699
698
  kind: "decision" | "auth" | "fact";
699
+ id: string;
700
700
  prompt: string;
701
701
  deferrableToCallee: boolean;
702
702
  options?: string[] | undefined;
703
703
  }, {
704
- id: string;
705
704
  kind: "decision" | "auth" | "fact";
705
+ id: string;
706
706
  prompt: string;
707
707
  options?: string[] | undefined;
708
708
  deferrableToCallee?: boolean | undefined;
@@ -740,30 +740,6 @@ declare const CallPlan: z.ZodObject<{
740
740
  e164?: string | undefined;
741
741
  };
742
742
  draftConfig: {
743
- name?: string | undefined;
744
- triggers?: Record<string, {
745
- then: {
746
- kind: "handoff";
747
- } | {
748
- kind: "endCall";
749
- } | {
750
- text: string;
751
- kind: "say";
752
- };
753
- on: {
754
- pattern: string;
755
- kind: "regex";
756
- flags?: string | undefined;
757
- } | {
758
- name: string;
759
- kind: "signal";
760
- };
761
- onlyWhile?: string | undefined;
762
- }> | undefined;
763
- tools?: {
764
- toolName: string;
765
- defaultArgs?: Record<string, unknown> | undefined;
766
- }[] | undefined;
767
743
  stt?: {
768
744
  provider: "deepgram" | "cartesia" | "assemblyai";
769
745
  model?: string | undefined;
@@ -785,6 +761,30 @@ declare const CallPlan: z.ZodObject<{
785
761
  rate?: number | undefined;
786
762
  } | undefined;
787
763
  source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
764
+ name?: string | undefined;
765
+ triggers?: Record<string, {
766
+ then: {
767
+ kind: "handoff";
768
+ } | {
769
+ kind: "endCall";
770
+ } | {
771
+ text: string;
772
+ kind: "say";
773
+ };
774
+ on: {
775
+ kind: "regex";
776
+ pattern: string;
777
+ flags?: string | undefined;
778
+ } | {
779
+ kind: "signal";
780
+ name: string;
781
+ };
782
+ onlyWhile?: string | undefined;
783
+ }> | undefined;
784
+ tools?: {
785
+ toolName: string;
786
+ defaultArgs?: Record<string, unknown> | undefined;
787
+ }[] | undefined;
788
788
  mode?: "realtime" | "cascade" | undefined;
789
789
  model?: {
790
790
  provider: "openai" | "anthropic" | "gemini";
@@ -812,7 +812,7 @@ declare const CallPlan: z.ZodObject<{
812
812
  } | undefined;
813
813
  process?: {
814
814
  collect: Record<string, {
815
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
815
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
816
816
  ask?: string | undefined;
817
817
  required?: boolean | undefined;
818
818
  pattern?: string | undefined;
@@ -824,15 +824,15 @@ declare const CallPlan: z.ZodObject<{
824
824
  completeWhen: "all-required-captured" | "all-captured";
825
825
  backendAck?: {
826
826
  url: string;
827
- timeoutMs?: number | undefined;
828
827
  headers?: Record<string, string> | undefined;
828
+ timeoutMs?: number | undefined;
829
829
  } | undefined;
830
830
  } | undefined;
831
831
  tags?: string[] | undefined;
832
832
  brainConnectorId?: string | null | undefined;
833
833
  modeLocked?: boolean | undefined;
834
834
  requiredInfo?: {
835
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
835
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
836
836
  name: string;
837
837
  required: boolean;
838
838
  enum?: string[] | undefined;
@@ -840,15 +840,15 @@ declare const CallPlan: z.ZodObject<{
840
840
  }[] | undefined;
841
841
  };
842
842
  openQuestions: {
843
- id: string;
844
843
  kind: "decision" | "auth" | "fact";
844
+ id: string;
845
845
  prompt: string;
846
846
  deferrableToCallee: boolean;
847
847
  options?: string[] | undefined;
848
848
  }[];
849
849
  unresolvedQuestions: {
850
- id: string;
851
850
  kind: "decision" | "auth" | "fact";
851
+ id: string;
852
852
  prompt: string;
853
853
  deferrableToCallee: boolean;
854
854
  options?: string[] | undefined;
@@ -880,6 +880,27 @@ declare const CallPlan: z.ZodObject<{
880
880
  secondary?: "ask_callee" | "fallback_phrase" | undefined;
881
881
  };
882
882
  draftConfig?: {
883
+ stt?: {
884
+ provider: "deepgram" | "cartesia" | "assemblyai";
885
+ model?: string | undefined;
886
+ language?: string | undefined;
887
+ endOfTurnConfidence?: number | undefined;
888
+ endOfTurnTimeoutMs?: number | undefined;
889
+ keywords?: string[] | undefined;
890
+ } | undefined;
891
+ realtime?: {
892
+ provider: "openai" | "google";
893
+ model: string;
894
+ voice?: string | undefined;
895
+ temperature?: number | undefined;
896
+ } | undefined;
897
+ voice?: {
898
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
899
+ voiceId: string;
900
+ model?: string | undefined;
901
+ rate?: number | undefined;
902
+ } | undefined;
903
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
883
904
  name?: string | undefined;
884
905
  triggers?: Record<string, {
885
906
  then: {
@@ -891,12 +912,12 @@ declare const CallPlan: z.ZodObject<{
891
912
  kind: "say";
892
913
  };
893
914
  on: {
894
- pattern: string;
895
915
  kind: "regex";
916
+ pattern: string;
896
917
  flags?: string | undefined;
897
918
  } | {
898
- name: string;
899
919
  kind: "signal";
920
+ name: string;
900
921
  };
901
922
  onlyWhile?: string | undefined;
902
923
  }> | undefined;
@@ -904,27 +925,6 @@ declare const CallPlan: z.ZodObject<{
904
925
  toolName: string;
905
926
  defaultArgs?: Record<string, unknown> | undefined;
906
927
  }[] | undefined;
907
- stt?: {
908
- provider: "deepgram" | "cartesia" | "assemblyai";
909
- model?: string | undefined;
910
- language?: string | undefined;
911
- endOfTurnConfidence?: number | undefined;
912
- endOfTurnTimeoutMs?: number | undefined;
913
- keywords?: string[] | undefined;
914
- } | undefined;
915
- realtime?: {
916
- provider: "openai" | "google";
917
- model: string;
918
- voice?: string | undefined;
919
- temperature?: number | undefined;
920
- } | undefined;
921
- voice?: {
922
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
923
- voiceId: string;
924
- model?: string | undefined;
925
- rate?: number | undefined;
926
- } | undefined;
927
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
928
928
  mode?: "realtime" | "cascade" | undefined;
929
929
  model?: {
930
930
  provider: "openai" | "anthropic" | "gemini";
@@ -953,11 +953,11 @@ declare const CallPlan: z.ZodObject<{
953
953
  process?: {
954
954
  backendAck?: {
955
955
  url: string;
956
- timeoutMs?: number | undefined;
957
956
  headers?: Record<string, string> | undefined;
957
+ timeoutMs?: number | undefined;
958
958
  } | undefined;
959
959
  collect?: Record<string, {
960
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
960
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
961
961
  ask?: string | undefined;
962
962
  required?: boolean | undefined;
963
963
  pattern?: string | undefined;
@@ -972,7 +972,7 @@ declare const CallPlan: z.ZodObject<{
972
972
  brainConnectorId?: string | null | undefined;
973
973
  modeLocked?: boolean | undefined;
974
974
  requiredInfo?: {
975
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
975
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
976
976
  name: string;
977
977
  required: boolean;
978
978
  enum?: string[] | undefined;
@@ -980,15 +980,15 @@ declare const CallPlan: z.ZodObject<{
980
980
  }[] | undefined;
981
981
  } | undefined;
982
982
  openQuestions?: {
983
- id: string;
984
983
  kind: "decision" | "auth" | "fact";
984
+ id: string;
985
985
  prompt: string;
986
986
  options?: string[] | undefined;
987
987
  deferrableToCallee?: boolean | undefined;
988
988
  }[] | undefined;
989
989
  unresolvedQuestions?: {
990
- id: string;
991
990
  kind: "decision" | "auth" | "fact";
991
+ id: string;
992
992
  prompt: string;
993
993
  options?: string[] | undefined;
994
994
  deferrableToCallee?: boolean | undefined;
@@ -1006,13 +1006,13 @@ declare const RelevantContext: z.ZodObject<{
1006
1006
  account: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1007
1007
  platform: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1008
1008
  }, "strip", z.ZodTypeAny, {
1009
- call: Record<string, unknown>;
1010
1009
  caller: Record<string, unknown>;
1010
+ call: Record<string, unknown>;
1011
1011
  account: Record<string, unknown>;
1012
1012
  platform: Record<string, unknown>;
1013
1013
  }, {
1014
- call: Record<string, unknown>;
1015
1014
  caller: Record<string, unknown>;
1015
+ call: Record<string, unknown>;
1016
1016
  account: Record<string, unknown>;
1017
1017
  platform: Record<string, unknown>;
1018
1018
  }>;
@@ -1028,38 +1028,38 @@ declare const ResolveCallerResponse: z.ZodObject<{
1028
1028
  updatedAt: z.ZodString;
1029
1029
  }, "strip", z.ZodTypeAny, {
1030
1030
  id: string;
1031
- displayName: string | null;
1032
1031
  projectId: string;
1033
1032
  createdAt: string;
1034
1033
  updatedAt: string;
1034
+ displayName: string | null;
1035
1035
  metadata: Record<string, unknown>;
1036
1036
  externalKey: string;
1037
1037
  }, {
1038
1038
  id: string;
1039
- displayName: string | null;
1040
1039
  projectId: string;
1041
1040
  createdAt: string;
1042
1041
  updatedAt: string;
1042
+ displayName: string | null;
1043
1043
  metadata: Record<string, unknown>;
1044
1044
  externalKey: string;
1045
1045
  }>;
1046
1046
  }, "strip", z.ZodTypeAny, {
1047
1047
  caller: {
1048
1048
  id: string;
1049
- displayName: string | null;
1050
1049
  projectId: string;
1051
1050
  createdAt: string;
1052
1051
  updatedAt: string;
1052
+ displayName: string | null;
1053
1053
  metadata: Record<string, unknown>;
1054
1054
  externalKey: string;
1055
1055
  };
1056
1056
  }, {
1057
1057
  caller: {
1058
1058
  id: string;
1059
- displayName: string | null;
1060
1059
  projectId: string;
1061
1060
  createdAt: string;
1062
1061
  updatedAt: string;
1062
+ displayName: string | null;
1063
1063
  metadata: Record<string, unknown>;
1064
1064
  externalKey: string;
1065
1065
  };
@@ -1070,10 +1070,10 @@ declare const DeleteCallerResponse: z.ZodObject<{
1070
1070
  scopesPurged: z.ZodArray<z.ZodEnum<["call", "caller", "account", "platform"]>, "many">;
1071
1071
  }, "strip", z.ZodTypeAny, {
1072
1072
  ok: true;
1073
- scopesPurged: ("call" | "caller" | "account" | "platform")[];
1073
+ scopesPurged: ("caller" | "call" | "account" | "platform")[];
1074
1074
  }, {
1075
1075
  ok: true;
1076
- scopesPurged: ("call" | "caller" | "account" | "platform")[];
1076
+ scopesPurged: ("caller" | "call" | "account" | "platform")[];
1077
1077
  }>;
1078
1078
  type DeleteCallerResponse = z.infer<typeof DeleteCallerResponse>;
1079
1079
 
@@ -1227,7 +1227,7 @@ declare const AgentConfig: z.ZodObject<{
1227
1227
  ask: z.ZodOptional<z.ZodString>;
1228
1228
  extract: z.ZodOptional<z.ZodString>;
1229
1229
  }, "strip", z.ZodTypeAny, {
1230
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1230
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1231
1231
  ask?: string | undefined;
1232
1232
  required?: boolean | undefined;
1233
1233
  pattern?: string | undefined;
@@ -1236,7 +1236,7 @@ declare const AgentConfig: z.ZodObject<{
1236
1236
  enum?: string[] | undefined;
1237
1237
  extract?: string | undefined;
1238
1238
  }, {
1239
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1239
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1240
1240
  ask?: string | undefined;
1241
1241
  required?: boolean | undefined;
1242
1242
  pattern?: string | undefined;
@@ -1252,16 +1252,16 @@ declare const AgentConfig: z.ZodObject<{
1252
1252
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1253
1253
  }, "strip", z.ZodTypeAny, {
1254
1254
  url: string;
1255
- timeoutMs?: number | undefined;
1256
1255
  headers?: Record<string, string> | undefined;
1256
+ timeoutMs?: number | undefined;
1257
1257
  }, {
1258
1258
  url: string;
1259
- timeoutMs?: number | undefined;
1260
1259
  headers?: Record<string, string> | undefined;
1260
+ timeoutMs?: number | undefined;
1261
1261
  }>>;
1262
1262
  }, "strip", z.ZodTypeAny, {
1263
1263
  collect: Record<string, {
1264
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1264
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1265
1265
  ask?: string | undefined;
1266
1266
  required?: boolean | undefined;
1267
1267
  pattern?: string | undefined;
@@ -1273,17 +1273,17 @@ declare const AgentConfig: z.ZodObject<{
1273
1273
  completeWhen: "all-required-captured" | "all-captured";
1274
1274
  backendAck?: {
1275
1275
  url: string;
1276
- timeoutMs?: number | undefined;
1277
1276
  headers?: Record<string, string> | undefined;
1277
+ timeoutMs?: number | undefined;
1278
1278
  } | undefined;
1279
1279
  }, {
1280
1280
  backendAck?: {
1281
1281
  url: string;
1282
- timeoutMs?: number | undefined;
1283
1282
  headers?: Record<string, string> | undefined;
1283
+ timeoutMs?: number | undefined;
1284
1284
  } | undefined;
1285
1285
  collect?: Record<string, {
1286
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1286
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1287
1287
  ask?: string | undefined;
1288
1288
  required?: boolean | undefined;
1289
1289
  pattern?: string | undefined;
@@ -1300,22 +1300,22 @@ declare const AgentConfig: z.ZodObject<{
1300
1300
  pattern: z.ZodString;
1301
1301
  flags: z.ZodOptional<z.ZodString>;
1302
1302
  }, "strip", z.ZodTypeAny, {
1303
- pattern: string;
1304
1303
  kind: "regex";
1304
+ pattern: string;
1305
1305
  flags?: string | undefined;
1306
1306
  }, {
1307
- pattern: string;
1308
1307
  kind: "regex";
1308
+ pattern: string;
1309
1309
  flags?: string | undefined;
1310
1310
  }>, z.ZodObject<{
1311
1311
  kind: z.ZodLiteral<"signal">;
1312
1312
  name: z.ZodString;
1313
1313
  }, "strip", z.ZodTypeAny, {
1314
- name: string;
1315
1314
  kind: "signal";
1316
- }, {
1317
1315
  name: string;
1316
+ }, {
1318
1317
  kind: "signal";
1318
+ name: string;
1319
1319
  }>]>;
1320
1320
  then: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1321
1321
  kind: z.ZodLiteral<"handoff">;
@@ -1350,12 +1350,12 @@ declare const AgentConfig: z.ZodObject<{
1350
1350
  kind: "say";
1351
1351
  };
1352
1352
  on: {
1353
- pattern: string;
1354
1353
  kind: "regex";
1354
+ pattern: string;
1355
1355
  flags?: string | undefined;
1356
1356
  } | {
1357
- name: string;
1358
1357
  kind: "signal";
1358
+ name: string;
1359
1359
  };
1360
1360
  onlyWhile?: string | undefined;
1361
1361
  }, {
@@ -1368,12 +1368,12 @@ declare const AgentConfig: z.ZodObject<{
1368
1368
  kind: "say";
1369
1369
  };
1370
1370
  on: {
1371
- pattern: string;
1372
1371
  kind: "regex";
1372
+ pattern: string;
1373
1373
  flags?: string | undefined;
1374
1374
  } | {
1375
- name: string;
1376
1375
  kind: "signal";
1376
+ name: string;
1377
1377
  };
1378
1378
  onlyWhile?: string | undefined;
1379
1379
  }>>>;
@@ -1388,13 +1388,13 @@ declare const AgentConfig: z.ZodObject<{
1388
1388
  description: z.ZodOptional<z.ZodString>;
1389
1389
  enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1390
1390
  }, "strip", z.ZodTypeAny, {
1391
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1391
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1392
1392
  name: string;
1393
1393
  required: boolean;
1394
1394
  enum?: string[] | undefined;
1395
1395
  description?: string | undefined;
1396
1396
  }, {
1397
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1397
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1398
1398
  name: string;
1399
1399
  required: boolean;
1400
1400
  enum?: string[] | undefined;
@@ -1403,21 +1403,21 @@ declare const AgentConfig: z.ZodObject<{
1403
1403
  createdAt: z.ZodString;
1404
1404
  updatedAt: z.ZodString;
1405
1405
  }, "strip", z.ZodTypeAny, {
1406
- id: string;
1407
- name: string;
1408
- tools: {
1409
- toolName: string;
1410
- defaultArgs?: Record<string, unknown> | undefined;
1411
- }[];
1412
1406
  voice: {
1413
1407
  provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
1414
1408
  voiceId: string;
1415
1409
  model?: string | undefined;
1416
1410
  rate?: number | undefined;
1417
1411
  };
1412
+ id: string;
1418
1413
  projectId: string;
1414
+ name: string;
1419
1415
  createdAt: string;
1420
1416
  updatedAt: string;
1417
+ tools: {
1418
+ toolName: string;
1419
+ defaultArgs?: Record<string, unknown> | undefined;
1420
+ }[];
1421
1421
  mode: "realtime" | "cascade";
1422
1422
  model: {
1423
1423
  provider: "openai" | "anthropic" | "gemini";
@@ -1442,12 +1442,27 @@ declare const AgentConfig: z.ZodObject<{
1442
1442
  } | undefined;
1443
1443
  };
1444
1444
  requiredInfo: {
1445
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1445
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1446
1446
  name: string;
1447
1447
  required: boolean;
1448
1448
  enum?: string[] | undefined;
1449
1449
  description?: string | undefined;
1450
1450
  }[];
1451
+ stt?: {
1452
+ provider: "deepgram" | "cartesia" | "assemblyai";
1453
+ model?: string | undefined;
1454
+ language?: string | undefined;
1455
+ endOfTurnConfidence?: number | undefined;
1456
+ endOfTurnTimeoutMs?: number | undefined;
1457
+ keywords?: string[] | undefined;
1458
+ } | undefined;
1459
+ realtime?: {
1460
+ provider: "openai" | "google";
1461
+ model: string;
1462
+ voice?: string | undefined;
1463
+ temperature?: number | undefined;
1464
+ } | undefined;
1465
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1451
1466
  triggers?: Record<string, {
1452
1467
  then: {
1453
1468
  kind: "handoff";
@@ -1458,35 +1473,20 @@ declare const AgentConfig: z.ZodObject<{
1458
1473
  kind: "say";
1459
1474
  };
1460
1475
  on: {
1461
- pattern: string;
1462
1476
  kind: "regex";
1477
+ pattern: string;
1463
1478
  flags?: string | undefined;
1464
1479
  } | {
1465
- name: string;
1466
1480
  kind: "signal";
1481
+ name: string;
1467
1482
  };
1468
1483
  onlyWhile?: string | undefined;
1469
1484
  }> | undefined;
1470
- stt?: {
1471
- provider: "deepgram" | "cartesia" | "assemblyai";
1472
- model?: string | undefined;
1473
- language?: string | undefined;
1474
- endOfTurnConfidence?: number | undefined;
1475
- endOfTurnTimeoutMs?: number | undefined;
1476
- keywords?: string[] | undefined;
1477
- } | undefined;
1478
- realtime?: {
1479
- provider: "openai" | "google";
1480
- model: string;
1481
- voice?: string | undefined;
1482
- temperature?: number | undefined;
1483
- } | undefined;
1484
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1485
1485
  systemPrompt?: string | undefined;
1486
1486
  routingInstructions?: string | undefined;
1487
1487
  process?: {
1488
1488
  collect: Record<string, {
1489
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1489
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1490
1490
  ask?: string | undefined;
1491
1491
  required?: boolean | undefined;
1492
1492
  pattern?: string | undefined;
@@ -1498,23 +1498,23 @@ declare const AgentConfig: z.ZodObject<{
1498
1498
  completeWhen: "all-required-captured" | "all-captured";
1499
1499
  backendAck?: {
1500
1500
  url: string;
1501
- timeoutMs?: number | undefined;
1502
1501
  headers?: Record<string, string> | undefined;
1502
+ timeoutMs?: number | undefined;
1503
1503
  } | undefined;
1504
1504
  } | undefined;
1505
1505
  tags?: string[] | undefined;
1506
1506
  brainConnectorId?: string | null | undefined;
1507
1507
  modeLocked?: boolean | undefined;
1508
1508
  }, {
1509
- id: string;
1510
- name: string;
1511
1509
  voice: {
1512
1510
  provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
1513
1511
  voiceId: string;
1514
1512
  model?: string | undefined;
1515
1513
  rate?: number | undefined;
1516
1514
  };
1515
+ id: string;
1517
1516
  projectId: string;
1517
+ name: string;
1518
1518
  createdAt: string;
1519
1519
  updatedAt: string;
1520
1520
  model: {
@@ -1538,6 +1538,21 @@ declare const AgentConfig: z.ZodObject<{
1538
1538
  normal?: number | undefined;
1539
1539
  } | undefined;
1540
1540
  };
1541
+ stt?: {
1542
+ provider: "deepgram" | "cartesia" | "assemblyai";
1543
+ model?: string | undefined;
1544
+ language?: string | undefined;
1545
+ endOfTurnConfidence?: number | undefined;
1546
+ endOfTurnTimeoutMs?: number | undefined;
1547
+ keywords?: string[] | undefined;
1548
+ } | undefined;
1549
+ realtime?: {
1550
+ provider: "openai" | "google";
1551
+ model: string;
1552
+ voice?: string | undefined;
1553
+ temperature?: number | undefined;
1554
+ } | undefined;
1555
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1541
1556
  triggers?: Record<string, {
1542
1557
  then: {
1543
1558
  kind: "handoff";
@@ -1548,12 +1563,12 @@ declare const AgentConfig: z.ZodObject<{
1548
1563
  kind: "say";
1549
1564
  };
1550
1565
  on: {
1551
- pattern: string;
1552
1566
  kind: "regex";
1567
+ pattern: string;
1553
1568
  flags?: string | undefined;
1554
1569
  } | {
1555
- name: string;
1556
1570
  kind: "signal";
1571
+ name: string;
1557
1572
  };
1558
1573
  onlyWhile?: string | undefined;
1559
1574
  }> | undefined;
@@ -1561,21 +1576,6 @@ declare const AgentConfig: z.ZodObject<{
1561
1576
  toolName: string;
1562
1577
  defaultArgs?: Record<string, unknown> | undefined;
1563
1578
  }[] | undefined;
1564
- stt?: {
1565
- provider: "deepgram" | "cartesia" | "assemblyai";
1566
- model?: string | undefined;
1567
- language?: string | undefined;
1568
- endOfTurnConfidence?: number | undefined;
1569
- endOfTurnTimeoutMs?: number | undefined;
1570
- keywords?: string[] | undefined;
1571
- } | undefined;
1572
- realtime?: {
1573
- provider: "openai" | "google";
1574
- model: string;
1575
- voice?: string | undefined;
1576
- temperature?: number | undefined;
1577
- } | undefined;
1578
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1579
1579
  mode?: "realtime" | "cascade" | undefined;
1580
1580
  language?: string | undefined;
1581
1581
  systemPrompt?: string | undefined;
@@ -1583,11 +1583,11 @@ declare const AgentConfig: z.ZodObject<{
1583
1583
  process?: {
1584
1584
  backendAck?: {
1585
1585
  url: string;
1586
- timeoutMs?: number | undefined;
1587
1586
  headers?: Record<string, string> | undefined;
1587
+ timeoutMs?: number | undefined;
1588
1588
  } | undefined;
1589
1589
  collect?: Record<string, {
1590
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1590
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1591
1591
  ask?: string | undefined;
1592
1592
  required?: boolean | undefined;
1593
1593
  pattern?: string | undefined;
@@ -1602,7 +1602,7 @@ declare const AgentConfig: z.ZodObject<{
1602
1602
  brainConnectorId?: string | null | undefined;
1603
1603
  modeLocked?: boolean | undefined;
1604
1604
  requiredInfo?: {
1605
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1605
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1606
1606
  name: string;
1607
1607
  required: boolean;
1608
1608
  enum?: string[] | undefined;
@@ -1638,6 +1638,9 @@ interface RequestOptions {
1638
1638
  /** Extra request headers, merged on top of the defaults (auth/content-type
1639
1639
  * etc). Lowercase keys recommended. */
1640
1640
  readonly headers?: Record<string, string>;
1641
+ /** Server-error statuses that are an answer, not a blip: never retried (e.g. an email the provider refused — a
1642
+ * retry could only send it twice or fail again). */
1643
+ readonly noRetryStatuses?: readonly number[];
1641
1644
  }
1642
1645
  declare class Transport {
1643
1646
  private readonly options;
@@ -1649,6 +1652,35 @@ declare class Transport {
1649
1652
  private backoffMs;
1650
1653
  }
1651
1654
 
1655
+ interface SendEmailInput {
1656
+ readonly to: string;
1657
+ readonly subject: string;
1658
+ readonly text: string;
1659
+ readonly html?: string;
1660
+ /** An address on one of your workspace's verified sending domains (Settings → Email sending). Omitted → VoiceLayer's
1661
+ * sender. An unverified domain is refused (422 `from_not_verified`). */
1662
+ readonly from?: string;
1663
+ /** The display name beside the From address. */
1664
+ readonly fromName?: string;
1665
+ /** Where a reply goes — any address. */
1666
+ readonly replyTo?: string;
1667
+ /** The conversation (e.g. the call id) this email belongs to: a conversation sends at most 3 emails. */
1668
+ readonly conversationId?: string;
1669
+ }
1670
+ interface SentEmail {
1671
+ readonly emailId: string;
1672
+ }
1673
+ declare class EmailClient {
1674
+ private readonly transport;
1675
+ constructor(transport: Transport);
1676
+ /** `signal` aborts the request (the flow's Email step bounds its wait). A provider refusal (502), "email isn't set
1677
+ * up" (503) and "SES didn't answer — it may have sent" (504) are answers, never retried: a retry could only send
1678
+ * twice or fail again. */
1679
+ send(input: SendEmailInput, opts?: {
1680
+ readonly signal?: AbortSignal;
1681
+ }): Promise<SentEmail>;
1682
+ }
1683
+
1652
1684
  interface RegisterInput {
1653
1685
  readonly name: string;
1654
1686
  readonly version: string;
@@ -1778,8 +1810,8 @@ declare class AgentsClient {
1778
1810
  agents: {
1779
1811
  status: "online" | "offline" | "degraded";
1780
1812
  id: string;
1781
- name: string;
1782
1813
  projectId: string;
1814
+ name: string;
1783
1815
  createdAt: string;
1784
1816
  updatedAt: string;
1785
1817
  version: string;
@@ -1804,7 +1836,7 @@ declare class AgentsClient {
1804
1836
  } | undefined;
1805
1837
  };
1806
1838
  fields: {
1807
- type: "string" | "number" | "boolean" | "string[]" | "datetime" | "email" | "phone";
1839
+ type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
1808
1840
  name: string;
1809
1841
  required: boolean;
1810
1842
  ask?: string | undefined;
@@ -1819,7 +1851,7 @@ declare class AgentsClient {
1819
1851
  routes?: Record<string, string> | undefined;
1820
1852
  } | undefined;
1821
1853
  memory?: {
1822
- scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1854
+ scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1823
1855
  retentionDays?: number | undefined;
1824
1856
  piiFields?: string[] | undefined;
1825
1857
  } | undefined;
@@ -1835,8 +1867,8 @@ declare class AgentsClient {
1835
1867
  } | undefined;
1836
1868
  } | undefined;
1837
1869
  prompts?: {
1838
- id: string;
1839
1870
  text: string;
1871
+ id: string;
1840
1872
  }[] | undefined;
1841
1873
  triggers?: {
1842
1874
  then: string;
@@ -1846,31 +1878,31 @@ declare class AgentsClient {
1846
1878
  }[] | undefined;
1847
1879
  tools?: {
1848
1880
  name: string;
1849
- url: string;
1850
1881
  description: string;
1851
1882
  input: Record<string, "string" | "number" | "boolean">;
1883
+ url: string;
1852
1884
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1853
1885
  auth: "none" | "connection";
1854
- allowPrivateNetwork?: boolean | undefined;
1855
1886
  headers?: Record<string, string> | undefined;
1856
1887
  connectionRef?: string | undefined;
1888
+ allowPrivateNetwork?: boolean | undefined;
1857
1889
  }[] | undefined;
1858
1890
  displayName?: string | undefined;
1859
1891
  program?: {
1860
- v: 1;
1861
1892
  id: string;
1862
- entry: string[];
1863
1893
  nodes: Record<string, {
1864
- type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1894
+ type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1865
1895
  id: string;
1866
1896
  config: Record<string, unknown>;
1867
1897
  out: {
1868
1898
  to: string;
1869
- condition?: string | undefined;
1870
1899
  sourceHandle?: string | undefined;
1871
1900
  label?: string | undefined;
1901
+ condition?: string | undefined;
1872
1902
  }[];
1873
1903
  }>;
1904
+ v: 1;
1905
+ entry: string[];
1874
1906
  completionGate: {
1875
1907
  requiredFields: string[];
1876
1908
  };
@@ -2111,21 +2143,6 @@ declare class FormsClient {
2111
2143
  }>;
2112
2144
  }
2113
2145
 
2114
- interface SendEmailInput {
2115
- readonly to: string;
2116
- readonly subject: string;
2117
- readonly text: string;
2118
- readonly html?: string;
2119
- }
2120
- interface SentEmail {
2121
- readonly emailId: string;
2122
- }
2123
- declare class EmailClient {
2124
- private readonly transport;
2125
- constructor(transport: Transport);
2126
- send(input: SendEmailInput): Promise<SentEmail>;
2127
- }
2128
-
2129
2146
  declare class PlansClient {
2130
2147
  private readonly transport;
2131
2148
  constructor(transport: Transport);
@@ -2167,8 +2184,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2167
2184
  baseUrl: string;
2168
2185
  }>>>;
2169
2186
  }, "strip", z.ZodTypeAny, {
2170
- id: string;
2171
2187
  enabled: boolean;
2188
+ id: string;
2172
2189
  mode: "tunnel" | "direct";
2173
2190
  defaultModel: string | null;
2174
2191
  connectionId: string | null;
@@ -2178,8 +2195,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2178
2195
  baseUrl: string;
2179
2196
  } | null | undefined;
2180
2197
  }, {
2181
- id: string;
2182
2198
  enabled: boolean;
2199
+ id: string;
2183
2200
  mode: "tunnel" | "direct";
2184
2201
  defaultModel: string | null;
2185
2202
  connectionId: string | null;
@@ -2191,8 +2208,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2191
2208
  }>;
2192
2209
  }, "strip", z.ZodTypeAny, {
2193
2210
  connector: {
2194
- id: string;
2195
2211
  enabled: boolean;
2212
+ id: string;
2196
2213
  mode: "tunnel" | "direct";
2197
2214
  defaultModel: string | null;
2198
2215
  connectionId: string | null;
@@ -2204,8 +2221,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2204
2221
  };
2205
2222
  }, {
2206
2223
  connector: {
2207
- id: string;
2208
2224
  enabled: boolean;
2225
+ id: string;
2209
2226
  mode: "tunnel" | "direct";
2210
2227
  defaultModel: string | null;
2211
2228
  connectionId: string | null;
@@ -2315,8 +2332,8 @@ interface FormToolsOptions {
2315
2332
  * platform receives a structured log event after the send instead.
2316
2333
  *
2317
2334
  * When omitted, sendFormLink falls back to the platform's email path
2318
- * (POST /v1/forms with `sendEmail` block), which uses VoiceLayer's
2319
- * shared Resend account.
2335
+ * (POST /v1/forms with `sendEmail` block): VoiceLayer's email (Amazon
2336
+ * SES), metered to your workspace.
2320
2337
  */
2321
2338
  readonly resend?: ResendCredentials;
2322
2339
  }