@voicelayer/sdk 0.5.1 → 0.6.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-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';
1
+ import { A as AgentEnvironment, P as ProcessSchemaDTO, R as ReadinessProbe, a as AgentLifecycleEvent, b as AgentDTO, c as AgentEventEmitter, T as ToolDefinition, d as AgentConfig$1, e as ProcessField, M as ModelConfig, C as ConnectorInstance, f as ProviderFactory, S as STTProvider, g 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 SpeechConfig, n as ToolExecutor, o as AgentContext, p as ToolRunInfo, q as HostLookup } from './text-session-C4Z59gG4.js';
2
+ export { r as AgentEventListener, s as AgentTurnEvent, t as AudioProfile, u as AudioSurface, v as CallInfo, w as CallOutcomeSummary, x as ChannelKind, y as CompletionStrategy, z as ComplianceTag, B as ConsultationPolicy, D as DtmfEvent, E as DtmfHandler, F as EndCallControllerHandle, G as EndCallInfo, I as EndCallOutcome, J as EndCallPolicy, K as EndCallTrigger, N as EndpointingConfig, O as FakeSessionAdapter, Q as FloorControlConfig, U as InboundOptions, W as InferProcessData, X as InterruptionConfig, Y as LK_AGENT_STATE_MAP, Z as MemoryHandle, _ as MemoryScope, $ as MetricsEvent, a0 as NON_BUSY_STATES, a1 as Participant, a2 as ParticipantId, a3 as ParticipantKind, a4 as ParticipantSet, a5 as ParticipantsConfig, a6 as ProcessBackendAck, a7 as ProcessFieldType, a8 as ProcessSnapshot, a9 as ReadinessReport, aa as ReadinessResult, ab as RespondOptions, ac as Room, ad as RouteEntry, ae as RoutingRule, af as RoutingSnapshot, ag as RunTextSessionOptions, ah as RunTextTranscriptOptions, ai as SayOptions, aj as SecurityConfig, ak as SendDtmfOptions, al as SessionAdapter, am as SessionCapabilities, an as SessionErrorEvent, ao as SessionEvent, ap as SessionEventMap, aq as SessionFactory, ar as SessionFactoryInput, as as SessionOutbound, at as SessionState, au as ShorthandPrimitive, av as SpeechResult, aw as SpeechTarget, ax as StateChangeEvent, ay as TextSession, az as TextTranscriptResult, aA as ToolInputShape, aB as TriggerAction, aC as TriggerCondition, aD as TtsVoiceConfig, aE as TurnEvent, aF as Unsubscribe, aG as UserInputEvent, aH as UserStateEvent, aI as UserTurn, aJ as VoiceLayerAuthError, aK as VoiceLayerError, aL as VoiceLayerHttpError, aM as VoiceLayerNetworkError, aN as VoiceLayerValidationError, aO as applySpeechTurnHandling, aP as asyncProbe, aQ as defineProcess, aR as dtmfCodeToDigit, aS as dtmfDigitToCode, aT as duck, aU as envProbe, aV as mute, aW as normalizeState, a2 as participantId, aX as passthrough, aY as runProbes, aZ as runTextSession, a_ as runTextTranscript, a$ as transform, b0 as urlProbe } from './text-session-C4Z59gG4.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;
36
37
  agentId: string;
37
38
  turnId: string;
38
39
  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;
48
49
  agentId: string;
49
50
  turnId: string;
50
51
  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
- agentId: string;
85
84
  replies: string[];
85
+ agentId: 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
- agentId: string;
95
94
  replies: string[];
95
+ agentId: string;
96
96
  usage?: {
97
97
  provider: string;
98
98
  model: string;
@@ -150,61 +150,6 @@ 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"]>>>;
208
153
  name: z.ZodOptional<z.ZodString>;
209
154
  triggers: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
210
155
  on: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -212,22 +157,22 @@ declare const CallPlan: z.ZodObject<{
212
157
  pattern: z.ZodString;
213
158
  flags: z.ZodOptional<z.ZodString>;
214
159
  }, "strip", z.ZodTypeAny, {
215
- kind: "regex";
216
160
  pattern: string;
161
+ kind: "regex";
217
162
  flags?: string | undefined;
218
163
  }, {
219
- kind: "regex";
220
164
  pattern: string;
165
+ kind: "regex";
221
166
  flags?: string | undefined;
222
167
  }>, z.ZodObject<{
223
168
  kind: z.ZodLiteral<"signal">;
224
169
  name: z.ZodString;
225
170
  }, "strip", z.ZodTypeAny, {
226
- kind: "signal";
227
171
  name: string;
228
- }, {
229
172
  kind: "signal";
173
+ }, {
230
174
  name: string;
175
+ kind: "signal";
231
176
  }>]>;
232
177
  then: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
233
178
  kind: z.ZodLiteral<"handoff">;
@@ -262,12 +207,12 @@ declare const CallPlan: z.ZodObject<{
262
207
  kind: "say";
263
208
  };
264
209
  on: {
265
- kind: "regex";
266
210
  pattern: string;
211
+ kind: "regex";
267
212
  flags?: string | undefined;
268
213
  } | {
269
- kind: "signal";
270
214
  name: string;
215
+ kind: "signal";
271
216
  };
272
217
  onlyWhile?: string | undefined;
273
218
  }, {
@@ -280,12 +225,12 @@ declare const CallPlan: z.ZodObject<{
280
225
  kind: "say";
281
226
  };
282
227
  on: {
283
- kind: "regex";
284
228
  pattern: string;
229
+ kind: "regex";
285
230
  flags?: string | undefined;
286
231
  } | {
287
- kind: "signal";
288
232
  name: string;
233
+ kind: "signal";
289
234
  };
290
235
  onlyWhile?: string | undefined;
291
236
  }>>>>;
@@ -299,6 +244,61 @@ declare const CallPlan: z.ZodObject<{
299
244
  toolName: string;
300
245
  defaultArgs?: Record<string, unknown> | undefined;
301
246
  }>, "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"]>;
@@ -406,12 +406,12 @@ 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
- headers?: Record<string, string> | undefined;
410
409
  timeoutMs?: number | undefined;
410
+ headers?: Record<string, string> | undefined;
411
411
  }, {
412
412
  url: string;
413
- headers?: Record<string, string> | undefined;
414
413
  timeoutMs?: number | undefined;
414
+ headers?: Record<string, string> | undefined;
415
415
  }>>;
416
416
  }, "strip", z.ZodTypeAny, {
417
417
  collect: Record<string, {
@@ -427,14 +427,14 @@ declare const CallPlan: z.ZodObject<{
427
427
  completeWhen: "all-required-captured" | "all-captured";
428
428
  backendAck?: {
429
429
  url: string;
430
- headers?: Record<string, string> | undefined;
431
430
  timeoutMs?: number | undefined;
431
+ headers?: Record<string, string> | undefined;
432
432
  } | undefined;
433
433
  }, {
434
434
  backendAck?: {
435
435
  url: string;
436
- headers?: Record<string, string> | undefined;
437
436
  timeoutMs?: number | undefined;
437
+ headers?: Record<string, string> | undefined;
438
438
  } | undefined;
439
439
  collect?: Record<string, {
440
440
  type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
@@ -470,28 +470,8 @@ declare const CallPlan: z.ZodObject<{
470
470
  enum?: string[] | undefined;
471
471
  description?: string | undefined;
472
472
  }>, "many">>>;
473
+ draftUpdatedAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
473
474
  }, "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;
495
475
  name?: string | undefined;
496
476
  triggers?: Record<string, {
497
477
  then: {
@@ -503,12 +483,12 @@ declare const CallPlan: z.ZodObject<{
503
483
  kind: "say";
504
484
  };
505
485
  on: {
506
- kind: "regex";
507
486
  pattern: string;
487
+ kind: "regex";
508
488
  flags?: string | undefined;
509
489
  } | {
510
- kind: "signal";
511
490
  name: string;
491
+ kind: "signal";
512
492
  };
513
493
  onlyWhile?: string | undefined;
514
494
  }> | undefined;
@@ -516,6 +496,27 @@ declare const CallPlan: z.ZodObject<{
516
496
  toolName: string;
517
497
  defaultArgs?: Record<string, unknown> | undefined;
518
498
  }[] | undefined;
499
+ stt?: {
500
+ provider: "deepgram" | "cartesia" | "assemblyai";
501
+ model?: string | undefined;
502
+ language?: string | undefined;
503
+ endOfTurnConfidence?: number | undefined;
504
+ endOfTurnTimeoutMs?: number | undefined;
505
+ keywords?: string[] | undefined;
506
+ } | undefined;
507
+ realtime?: {
508
+ provider: "openai" | "google";
509
+ model: string;
510
+ voice?: string | undefined;
511
+ temperature?: number | undefined;
512
+ } | undefined;
513
+ voice?: {
514
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
515
+ voiceId: string;
516
+ model?: string | undefined;
517
+ rate?: number | undefined;
518
+ } | undefined;
519
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
519
520
  mode?: "realtime" | "cascade" | undefined;
520
521
  model?: {
521
522
  provider: "openai" | "anthropic" | "gemini";
@@ -555,8 +556,8 @@ declare const CallPlan: z.ZodObject<{
555
556
  completeWhen: "all-required-captured" | "all-captured";
556
557
  backendAck?: {
557
558
  url: string;
558
- headers?: Record<string, string> | undefined;
559
559
  timeoutMs?: number | undefined;
560
+ headers?: Record<string, string> | undefined;
560
561
  } | undefined;
561
562
  } | undefined;
562
563
  tags?: string[] | undefined;
@@ -569,28 +570,8 @@ declare const CallPlan: z.ZodObject<{
569
570
  enum?: string[] | undefined;
570
571
  description?: string | undefined;
571
572
  }[] | undefined;
573
+ draftUpdatedAt?: string | undefined;
572
574
  }, {
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;
594
575
  name?: string | undefined;
595
576
  triggers?: Record<string, {
596
577
  then: {
@@ -602,12 +583,12 @@ declare const CallPlan: z.ZodObject<{
602
583
  kind: "say";
603
584
  };
604
585
  on: {
605
- kind: "regex";
606
586
  pattern: string;
587
+ kind: "regex";
607
588
  flags?: string | undefined;
608
589
  } | {
609
- kind: "signal";
610
590
  name: string;
591
+ kind: "signal";
611
592
  };
612
593
  onlyWhile?: string | undefined;
613
594
  }> | undefined;
@@ -615,6 +596,27 @@ declare const CallPlan: z.ZodObject<{
615
596
  toolName: string;
616
597
  defaultArgs?: Record<string, unknown> | undefined;
617
598
  }[] | undefined;
599
+ stt?: {
600
+ provider: "deepgram" | "cartesia" | "assemblyai";
601
+ model?: string | undefined;
602
+ language?: string | undefined;
603
+ endOfTurnConfidence?: number | undefined;
604
+ endOfTurnTimeoutMs?: number | undefined;
605
+ keywords?: string[] | undefined;
606
+ } | undefined;
607
+ realtime?: {
608
+ provider: "openai" | "google";
609
+ model: string;
610
+ voice?: string | undefined;
611
+ temperature?: number | undefined;
612
+ } | undefined;
613
+ voice?: {
614
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
615
+ voiceId: string;
616
+ model?: string | undefined;
617
+ rate?: number | undefined;
618
+ } | undefined;
619
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
618
620
  mode?: "realtime" | "cascade" | undefined;
619
621
  model?: {
620
622
  provider: "openai" | "anthropic" | "gemini";
@@ -643,8 +645,8 @@ declare const CallPlan: z.ZodObject<{
643
645
  process?: {
644
646
  backendAck?: {
645
647
  url: string;
646
- headers?: Record<string, string> | undefined;
647
648
  timeoutMs?: number | undefined;
649
+ headers?: Record<string, string> | undefined;
648
650
  } | undefined;
649
651
  collect?: Record<string, {
650
652
  type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
@@ -668,6 +670,7 @@ declare const CallPlan: z.ZodObject<{
668
670
  enum?: string[] | undefined;
669
671
  description?: string | undefined;
670
672
  }[] | undefined;
673
+ draftUpdatedAt?: string | undefined;
671
674
  }>>;
672
675
  openQuestions: z.ZodDefault<z.ZodArray<z.ZodObject<{
673
676
  id: z.ZodString;
@@ -676,14 +679,14 @@ declare const CallPlan: z.ZodObject<{
676
679
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
677
680
  deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
678
681
  }, "strip", z.ZodTypeAny, {
679
- kind: "decision" | "auth" | "fact";
680
682
  id: string;
683
+ kind: "decision" | "auth" | "fact";
681
684
  prompt: string;
682
685
  deferrableToCallee: boolean;
683
686
  options?: string[] | undefined;
684
687
  }, {
685
- kind: "decision" | "auth" | "fact";
686
688
  id: string;
689
+ kind: "decision" | "auth" | "fact";
687
690
  prompt: string;
688
691
  options?: string[] | undefined;
689
692
  deferrableToCallee?: boolean | undefined;
@@ -695,14 +698,14 @@ declare const CallPlan: z.ZodObject<{
695
698
  options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
696
699
  deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
697
700
  }, "strip", z.ZodTypeAny, {
698
- kind: "decision" | "auth" | "fact";
699
701
  id: string;
702
+ kind: "decision" | "auth" | "fact";
700
703
  prompt: string;
701
704
  deferrableToCallee: boolean;
702
705
  options?: string[] | undefined;
703
706
  }, {
704
- kind: "decision" | "auth" | "fact";
705
707
  id: string;
708
+ kind: "decision" | "auth" | "fact";
706
709
  prompt: string;
707
710
  options?: string[] | undefined;
708
711
  deferrableToCallee?: boolean | undefined;
@@ -740,27 +743,6 @@ declare const CallPlan: z.ZodObject<{
740
743
  e164?: string | undefined;
741
744
  };
742
745
  draftConfig: {
743
- stt?: {
744
- provider: "deepgram" | "cartesia" | "assemblyai";
745
- model?: string | undefined;
746
- language?: string | undefined;
747
- endOfTurnConfidence?: number | undefined;
748
- endOfTurnTimeoutMs?: number | undefined;
749
- keywords?: string[] | undefined;
750
- } | undefined;
751
- realtime?: {
752
- provider: "openai" | "google";
753
- model: string;
754
- voice?: string | undefined;
755
- temperature?: number | undefined;
756
- } | undefined;
757
- voice?: {
758
- provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
759
- voiceId: string;
760
- model?: string | undefined;
761
- rate?: number | undefined;
762
- } | undefined;
763
- source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
764
746
  name?: string | undefined;
765
747
  triggers?: Record<string, {
766
748
  then: {
@@ -772,12 +754,12 @@ declare const CallPlan: z.ZodObject<{
772
754
  kind: "say";
773
755
  };
774
756
  on: {
775
- kind: "regex";
776
757
  pattern: string;
758
+ kind: "regex";
777
759
  flags?: string | undefined;
778
760
  } | {
779
- kind: "signal";
780
761
  name: string;
762
+ kind: "signal";
781
763
  };
782
764
  onlyWhile?: string | undefined;
783
765
  }> | undefined;
@@ -785,6 +767,27 @@ declare const CallPlan: z.ZodObject<{
785
767
  toolName: string;
786
768
  defaultArgs?: Record<string, unknown> | undefined;
787
769
  }[] | undefined;
770
+ stt?: {
771
+ provider: "deepgram" | "cartesia" | "assemblyai";
772
+ model?: string | undefined;
773
+ language?: string | undefined;
774
+ endOfTurnConfidence?: number | undefined;
775
+ endOfTurnTimeoutMs?: number | undefined;
776
+ keywords?: string[] | undefined;
777
+ } | undefined;
778
+ realtime?: {
779
+ provider: "openai" | "google";
780
+ model: string;
781
+ voice?: string | undefined;
782
+ temperature?: number | undefined;
783
+ } | undefined;
784
+ voice?: {
785
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
786
+ voiceId: string;
787
+ model?: string | undefined;
788
+ rate?: number | undefined;
789
+ } | undefined;
790
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
788
791
  mode?: "realtime" | "cascade" | undefined;
789
792
  model?: {
790
793
  provider: "openai" | "anthropic" | "gemini";
@@ -824,8 +827,8 @@ declare const CallPlan: z.ZodObject<{
824
827
  completeWhen: "all-required-captured" | "all-captured";
825
828
  backendAck?: {
826
829
  url: string;
827
- headers?: Record<string, string> | undefined;
828
830
  timeoutMs?: number | undefined;
831
+ headers?: Record<string, string> | undefined;
829
832
  } | undefined;
830
833
  } | undefined;
831
834
  tags?: string[] | undefined;
@@ -838,17 +841,18 @@ declare const CallPlan: z.ZodObject<{
838
841
  enum?: string[] | undefined;
839
842
  description?: string | undefined;
840
843
  }[] | undefined;
844
+ draftUpdatedAt?: string | undefined;
841
845
  };
842
846
  openQuestions: {
843
- kind: "decision" | "auth" | "fact";
844
847
  id: string;
848
+ kind: "decision" | "auth" | "fact";
845
849
  prompt: string;
846
850
  deferrableToCallee: boolean;
847
851
  options?: string[] | undefined;
848
852
  }[];
849
853
  unresolvedQuestions: {
850
- kind: "decision" | "auth" | "fact";
851
854
  id: string;
855
+ kind: "decision" | "auth" | "fact";
852
856
  prompt: string;
853
857
  deferrableToCallee: boolean;
854
858
  options?: string[] | undefined;
@@ -880,27 +884,6 @@ declare const CallPlan: z.ZodObject<{
880
884
  secondary?: "ask_callee" | "fallback_phrase" | undefined;
881
885
  };
882
886
  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;
904
887
  name?: string | undefined;
905
888
  triggers?: Record<string, {
906
889
  then: {
@@ -912,12 +895,12 @@ declare const CallPlan: z.ZodObject<{
912
895
  kind: "say";
913
896
  };
914
897
  on: {
915
- kind: "regex";
916
898
  pattern: string;
899
+ kind: "regex";
917
900
  flags?: string | undefined;
918
901
  } | {
919
- kind: "signal";
920
902
  name: string;
903
+ kind: "signal";
921
904
  };
922
905
  onlyWhile?: string | undefined;
923
906
  }> | undefined;
@@ -925,6 +908,27 @@ declare const CallPlan: z.ZodObject<{
925
908
  toolName: string;
926
909
  defaultArgs?: Record<string, unknown> | undefined;
927
910
  }[] | undefined;
911
+ stt?: {
912
+ provider: "deepgram" | "cartesia" | "assemblyai";
913
+ model?: string | undefined;
914
+ language?: string | undefined;
915
+ endOfTurnConfidence?: number | undefined;
916
+ endOfTurnTimeoutMs?: number | undefined;
917
+ keywords?: string[] | undefined;
918
+ } | undefined;
919
+ realtime?: {
920
+ provider: "openai" | "google";
921
+ model: string;
922
+ voice?: string | undefined;
923
+ temperature?: number | undefined;
924
+ } | undefined;
925
+ voice?: {
926
+ provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
927
+ voiceId: string;
928
+ model?: string | undefined;
929
+ rate?: number | undefined;
930
+ } | undefined;
931
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
928
932
  mode?: "realtime" | "cascade" | undefined;
929
933
  model?: {
930
934
  provider: "openai" | "anthropic" | "gemini";
@@ -953,8 +957,8 @@ declare const CallPlan: z.ZodObject<{
953
957
  process?: {
954
958
  backendAck?: {
955
959
  url: string;
956
- headers?: Record<string, string> | undefined;
957
960
  timeoutMs?: number | undefined;
961
+ headers?: Record<string, string> | undefined;
958
962
  } | undefined;
959
963
  collect?: Record<string, {
960
964
  type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
@@ -978,17 +982,18 @@ declare const CallPlan: z.ZodObject<{
978
982
  enum?: string[] | undefined;
979
983
  description?: string | undefined;
980
984
  }[] | undefined;
985
+ draftUpdatedAt?: string | undefined;
981
986
  } | undefined;
982
987
  openQuestions?: {
983
- kind: "decision" | "auth" | "fact";
984
988
  id: string;
989
+ kind: "decision" | "auth" | "fact";
985
990
  prompt: string;
986
991
  options?: string[] | undefined;
987
992
  deferrableToCallee?: boolean | undefined;
988
993
  }[] | undefined;
989
994
  unresolvedQuestions?: {
990
- kind: "decision" | "auth" | "fact";
991
995
  id: string;
996
+ kind: "decision" | "auth" | "fact";
992
997
  prompt: string;
993
998
  options?: string[] | undefined;
994
999
  deferrableToCallee?: boolean | undefined;
@@ -1006,13 +1011,13 @@ declare const RelevantContext: z.ZodObject<{
1006
1011
  account: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1007
1012
  platform: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1008
1013
  }, "strip", z.ZodTypeAny, {
1009
- caller: Record<string, unknown>;
1010
1014
  call: Record<string, unknown>;
1015
+ caller: Record<string, unknown>;
1011
1016
  account: Record<string, unknown>;
1012
1017
  platform: Record<string, unknown>;
1013
1018
  }, {
1014
- caller: Record<string, unknown>;
1015
1019
  call: Record<string, unknown>;
1020
+ caller: Record<string, unknown>;
1016
1021
  account: Record<string, unknown>;
1017
1022
  platform: Record<string, unknown>;
1018
1023
  }>;
@@ -1028,38 +1033,38 @@ declare const ResolveCallerResponse: z.ZodObject<{
1028
1033
  updatedAt: z.ZodString;
1029
1034
  }, "strip", z.ZodTypeAny, {
1030
1035
  id: string;
1036
+ displayName: string | null;
1031
1037
  projectId: string;
1032
1038
  createdAt: string;
1033
1039
  updatedAt: string;
1034
- displayName: string | null;
1035
1040
  metadata: Record<string, unknown>;
1036
1041
  externalKey: string;
1037
1042
  }, {
1038
1043
  id: string;
1044
+ displayName: string | null;
1039
1045
  projectId: string;
1040
1046
  createdAt: string;
1041
1047
  updatedAt: string;
1042
- displayName: string | null;
1043
1048
  metadata: Record<string, unknown>;
1044
1049
  externalKey: string;
1045
1050
  }>;
1046
1051
  }, "strip", z.ZodTypeAny, {
1047
1052
  caller: {
1048
1053
  id: string;
1054
+ displayName: string | null;
1049
1055
  projectId: string;
1050
1056
  createdAt: string;
1051
1057
  updatedAt: string;
1052
- displayName: string | null;
1053
1058
  metadata: Record<string, unknown>;
1054
1059
  externalKey: string;
1055
1060
  };
1056
1061
  }, {
1057
1062
  caller: {
1058
1063
  id: string;
1064
+ displayName: string | null;
1059
1065
  projectId: string;
1060
1066
  createdAt: string;
1061
1067
  updatedAt: string;
1062
- displayName: string | null;
1063
1068
  metadata: Record<string, unknown>;
1064
1069
  externalKey: string;
1065
1070
  };
@@ -1070,10 +1075,10 @@ declare const DeleteCallerResponse: z.ZodObject<{
1070
1075
  scopesPurged: z.ZodArray<z.ZodEnum<["call", "caller", "account", "platform"]>, "many">;
1071
1076
  }, "strip", z.ZodTypeAny, {
1072
1077
  ok: true;
1073
- scopesPurged: ("caller" | "call" | "account" | "platform")[];
1078
+ scopesPurged: ("call" | "caller" | "account" | "platform")[];
1074
1079
  }, {
1075
1080
  ok: true;
1076
- scopesPurged: ("caller" | "call" | "account" | "platform")[];
1081
+ scopesPurged: ("call" | "caller" | "account" | "platform")[];
1077
1082
  }>;
1078
1083
  type DeleteCallerResponse = z.infer<typeof DeleteCallerResponse>;
1079
1084
 
@@ -1252,12 +1257,12 @@ declare const AgentConfig: z.ZodObject<{
1252
1257
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1253
1258
  }, "strip", z.ZodTypeAny, {
1254
1259
  url: string;
1255
- headers?: Record<string, string> | undefined;
1256
1260
  timeoutMs?: number | undefined;
1261
+ headers?: Record<string, string> | undefined;
1257
1262
  }, {
1258
1263
  url: string;
1259
- headers?: Record<string, string> | undefined;
1260
1264
  timeoutMs?: number | undefined;
1265
+ headers?: Record<string, string> | undefined;
1261
1266
  }>>;
1262
1267
  }, "strip", z.ZodTypeAny, {
1263
1268
  collect: Record<string, {
@@ -1273,14 +1278,14 @@ declare const AgentConfig: z.ZodObject<{
1273
1278
  completeWhen: "all-required-captured" | "all-captured";
1274
1279
  backendAck?: {
1275
1280
  url: string;
1276
- headers?: Record<string, string> | undefined;
1277
1281
  timeoutMs?: number | undefined;
1282
+ headers?: Record<string, string> | undefined;
1278
1283
  } | undefined;
1279
1284
  }, {
1280
1285
  backendAck?: {
1281
1286
  url: string;
1282
- headers?: Record<string, string> | undefined;
1283
1287
  timeoutMs?: number | undefined;
1288
+ headers?: Record<string, string> | undefined;
1284
1289
  } | undefined;
1285
1290
  collect?: Record<string, {
1286
1291
  type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
@@ -1300,22 +1305,22 @@ declare const AgentConfig: z.ZodObject<{
1300
1305
  pattern: z.ZodString;
1301
1306
  flags: z.ZodOptional<z.ZodString>;
1302
1307
  }, "strip", z.ZodTypeAny, {
1303
- kind: "regex";
1304
1308
  pattern: string;
1309
+ kind: "regex";
1305
1310
  flags?: string | undefined;
1306
1311
  }, {
1307
- kind: "regex";
1308
1312
  pattern: string;
1313
+ kind: "regex";
1309
1314
  flags?: string | undefined;
1310
1315
  }>, z.ZodObject<{
1311
1316
  kind: z.ZodLiteral<"signal">;
1312
1317
  name: z.ZodString;
1313
1318
  }, "strip", z.ZodTypeAny, {
1314
- kind: "signal";
1315
1319
  name: string;
1316
- }, {
1317
1320
  kind: "signal";
1321
+ }, {
1318
1322
  name: string;
1323
+ kind: "signal";
1319
1324
  }>]>;
1320
1325
  then: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1321
1326
  kind: z.ZodLiteral<"handoff">;
@@ -1350,12 +1355,12 @@ declare const AgentConfig: z.ZodObject<{
1350
1355
  kind: "say";
1351
1356
  };
1352
1357
  on: {
1353
- kind: "regex";
1354
1358
  pattern: string;
1359
+ kind: "regex";
1355
1360
  flags?: string | undefined;
1356
1361
  } | {
1357
- kind: "signal";
1358
1362
  name: string;
1363
+ kind: "signal";
1359
1364
  };
1360
1365
  onlyWhile?: string | undefined;
1361
1366
  }, {
@@ -1368,12 +1373,12 @@ declare const AgentConfig: z.ZodObject<{
1368
1373
  kind: "say";
1369
1374
  };
1370
1375
  on: {
1371
- kind: "regex";
1372
1376
  pattern: string;
1377
+ kind: "regex";
1373
1378
  flags?: string | undefined;
1374
1379
  } | {
1375
- kind: "signal";
1376
1380
  name: string;
1381
+ kind: "signal";
1377
1382
  };
1378
1383
  onlyWhile?: string | undefined;
1379
1384
  }>>>;
@@ -1402,22 +1407,23 @@ declare const AgentConfig: z.ZodObject<{
1402
1407
  }>, "many">>;
1403
1408
  createdAt: z.ZodString;
1404
1409
  updatedAt: z.ZodString;
1410
+ draftUpdatedAt: z.ZodOptional<z.ZodString>;
1405
1411
  }, "strip", z.ZodTypeAny, {
1412
+ id: string;
1413
+ name: string;
1414
+ tools: {
1415
+ toolName: string;
1416
+ defaultArgs?: Record<string, unknown> | undefined;
1417
+ }[];
1406
1418
  voice: {
1407
1419
  provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
1408
1420
  voiceId: string;
1409
1421
  model?: string | undefined;
1410
1422
  rate?: number | undefined;
1411
1423
  };
1412
- id: string;
1413
1424
  projectId: string;
1414
- name: string;
1415
1425
  createdAt: string;
1416
1426
  updatedAt: string;
1417
- tools: {
1418
- toolName: string;
1419
- defaultArgs?: Record<string, unknown> | undefined;
1420
- }[];
1421
1427
  mode: "realtime" | "cascade";
1422
1428
  model: {
1423
1429
  provider: "openai" | "anthropic" | "gemini";
@@ -1448,21 +1454,6 @@ declare const AgentConfig: z.ZodObject<{
1448
1454
  enum?: string[] | undefined;
1449
1455
  description?: string | undefined;
1450
1456
  }[];
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;
1466
1457
  triggers?: Record<string, {
1467
1458
  then: {
1468
1459
  kind: "handoff";
@@ -1473,15 +1464,30 @@ declare const AgentConfig: z.ZodObject<{
1473
1464
  kind: "say";
1474
1465
  };
1475
1466
  on: {
1476
- kind: "regex";
1477
1467
  pattern: string;
1468
+ kind: "regex";
1478
1469
  flags?: string | undefined;
1479
1470
  } | {
1480
- kind: "signal";
1481
1471
  name: string;
1472
+ kind: "signal";
1482
1473
  };
1483
1474
  onlyWhile?: string | undefined;
1484
1475
  }> | undefined;
1476
+ stt?: {
1477
+ provider: "deepgram" | "cartesia" | "assemblyai";
1478
+ model?: string | undefined;
1479
+ language?: string | undefined;
1480
+ endOfTurnConfidence?: number | undefined;
1481
+ endOfTurnTimeoutMs?: number | undefined;
1482
+ keywords?: string[] | undefined;
1483
+ } | undefined;
1484
+ realtime?: {
1485
+ provider: "openai" | "google";
1486
+ model: string;
1487
+ voice?: string | undefined;
1488
+ temperature?: number | undefined;
1489
+ } | undefined;
1490
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1485
1491
  systemPrompt?: string | undefined;
1486
1492
  routingInstructions?: string | undefined;
1487
1493
  process?: {
@@ -1498,23 +1504,24 @@ declare const AgentConfig: z.ZodObject<{
1498
1504
  completeWhen: "all-required-captured" | "all-captured";
1499
1505
  backendAck?: {
1500
1506
  url: string;
1501
- headers?: Record<string, string> | undefined;
1502
1507
  timeoutMs?: number | undefined;
1508
+ headers?: Record<string, string> | undefined;
1503
1509
  } | undefined;
1504
1510
  } | undefined;
1505
1511
  tags?: string[] | undefined;
1506
1512
  brainConnectorId?: string | null | undefined;
1507
1513
  modeLocked?: boolean | undefined;
1514
+ draftUpdatedAt?: string | undefined;
1508
1515
  }, {
1516
+ id: string;
1517
+ name: string;
1509
1518
  voice: {
1510
1519
  provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
1511
1520
  voiceId: string;
1512
1521
  model?: string | undefined;
1513
1522
  rate?: number | undefined;
1514
1523
  };
1515
- id: string;
1516
1524
  projectId: string;
1517
- name: string;
1518
1525
  createdAt: string;
1519
1526
  updatedAt: string;
1520
1527
  model: {
@@ -1538,21 +1545,6 @@ declare const AgentConfig: z.ZodObject<{
1538
1545
  normal?: number | undefined;
1539
1546
  } | undefined;
1540
1547
  };
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;
1556
1548
  triggers?: Record<string, {
1557
1549
  then: {
1558
1550
  kind: "handoff";
@@ -1563,12 +1555,12 @@ declare const AgentConfig: z.ZodObject<{
1563
1555
  kind: "say";
1564
1556
  };
1565
1557
  on: {
1566
- kind: "regex";
1567
1558
  pattern: string;
1559
+ kind: "regex";
1568
1560
  flags?: string | undefined;
1569
1561
  } | {
1570
- kind: "signal";
1571
1562
  name: string;
1563
+ kind: "signal";
1572
1564
  };
1573
1565
  onlyWhile?: string | undefined;
1574
1566
  }> | undefined;
@@ -1576,6 +1568,21 @@ declare const AgentConfig: z.ZodObject<{
1576
1568
  toolName: string;
1577
1569
  defaultArgs?: Record<string, unknown> | undefined;
1578
1570
  }[] | undefined;
1571
+ stt?: {
1572
+ provider: "deepgram" | "cartesia" | "assemblyai";
1573
+ model?: string | undefined;
1574
+ language?: string | undefined;
1575
+ endOfTurnConfidence?: number | undefined;
1576
+ endOfTurnTimeoutMs?: number | undefined;
1577
+ keywords?: string[] | undefined;
1578
+ } | undefined;
1579
+ realtime?: {
1580
+ provider: "openai" | "google";
1581
+ model: string;
1582
+ voice?: string | undefined;
1583
+ temperature?: number | undefined;
1584
+ } | undefined;
1585
+ source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
1579
1586
  mode?: "realtime" | "cascade" | undefined;
1580
1587
  language?: string | undefined;
1581
1588
  systemPrompt?: string | undefined;
@@ -1583,8 +1590,8 @@ declare const AgentConfig: z.ZodObject<{
1583
1590
  process?: {
1584
1591
  backendAck?: {
1585
1592
  url: string;
1586
- headers?: Record<string, string> | undefined;
1587
1593
  timeoutMs?: number | undefined;
1594
+ headers?: Record<string, string> | undefined;
1588
1595
  } | undefined;
1589
1596
  collect?: Record<string, {
1590
1597
  type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
@@ -1608,10 +1615,11 @@ declare const AgentConfig: z.ZodObject<{
1608
1615
  enum?: string[] | undefined;
1609
1616
  description?: string | undefined;
1610
1617
  }[] | undefined;
1618
+ draftUpdatedAt?: string | undefined;
1611
1619
  }>;
1612
1620
  type AgentConfig = z.infer<typeof AgentConfig>;
1613
1621
 
1614
- 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:worker_identity_refused", ...("flow_boot:schema_fetch_failed" | "flow_boot:no_process_schema" | "flow_boot:missing_agent_id" | "flow_boot:no_api_key" | "flow_boot:worker_identity_refused")[]]>;
1622
+ 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:worker_identity_refused" | "flow_boot:provider_unavailable", ...("flow_boot:schema_fetch_failed" | "flow_boot:no_process_schema" | "flow_boot:missing_agent_id" | "flow_boot:no_api_key" | "flow_boot:worker_identity_refused" | "flow_boot:provider_unavailable")[]]>;
1615
1623
  type AgentEndReason = z.infer<typeof AgentEndReason>;
1616
1624
 
1617
1625
  interface ApiCredential {
@@ -1810,8 +1818,8 @@ declare class AgentsClient {
1810
1818
  agents: {
1811
1819
  status: "online" | "offline" | "degraded";
1812
1820
  id: string;
1813
- projectId: string;
1814
1821
  name: string;
1822
+ projectId: string;
1815
1823
  createdAt: string;
1816
1824
  updatedAt: string;
1817
1825
  version: string;
@@ -1851,7 +1859,7 @@ declare class AgentsClient {
1851
1859
  routes?: Record<string, string> | undefined;
1852
1860
  } | undefined;
1853
1861
  memory?: {
1854
- scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
1862
+ scope?: "call" | "caller" | "participant" | "account" | "platform" | undefined;
1855
1863
  retentionDays?: number | undefined;
1856
1864
  piiFields?: string[] | undefined;
1857
1865
  } | undefined;
@@ -1867,8 +1875,8 @@ declare class AgentsClient {
1867
1875
  } | undefined;
1868
1876
  } | undefined;
1869
1877
  prompts?: {
1870
- text: string;
1871
1878
  id: string;
1879
+ text: string;
1872
1880
  }[] | undefined;
1873
1881
  triggers?: {
1874
1882
  then: string;
@@ -1878,31 +1886,32 @@ declare class AgentsClient {
1878
1886
  }[] | undefined;
1879
1887
  tools?: {
1880
1888
  name: string;
1889
+ url: string;
1881
1890
  description: string;
1882
1891
  input: Record<string, "string" | "number" | "boolean">;
1883
- url: string;
1884
1892
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1885
1893
  auth: "none" | "connection";
1894
+ allowPrivateNetwork?: boolean | undefined;
1886
1895
  headers?: Record<string, string> | undefined;
1887
1896
  connectionRef?: string | undefined;
1888
- allowPrivateNetwork?: boolean | undefined;
1897
+ sendRealValues?: boolean | undefined;
1889
1898
  }[] | undefined;
1890
1899
  displayName?: string | undefined;
1891
1900
  program?: {
1901
+ v: 1;
1892
1902
  id: string;
1903
+ entry: string[];
1893
1904
  nodes: Record<string, {
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";
1905
+ type: "code" | "set" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "subflow" | "llm" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
1895
1906
  id: string;
1896
1907
  config: Record<string, unknown>;
1897
1908
  out: {
1898
1909
  to: string;
1910
+ condition?: string | undefined;
1899
1911
  sourceHandle?: string | undefined;
1900
1912
  label?: string | undefined;
1901
- condition?: string | undefined;
1902
1913
  }[];
1903
1914
  }>;
1904
- v: 1;
1905
- entry: string[];
1906
1915
  completionGate: {
1907
1916
  requiredFields: string[];
1908
1917
  };
@@ -1982,6 +1991,8 @@ interface CallUsageReport {
1982
1991
  readonly model: string;
1983
1992
  readonly inputTokens: number;
1984
1993
  readonly outputTokens: number;
1994
+ /** Whose key paid, when the worker knows (its own helper calls): true waives the line, false bills it. */
1995
+ readonly byok?: boolean;
1985
1996
  }[];
1986
1997
  readonly tts: readonly {
1987
1998
  readonly provider: string;
@@ -2184,8 +2195,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2184
2195
  baseUrl: string;
2185
2196
  }>>>;
2186
2197
  }, "strip", z.ZodTypeAny, {
2187
- enabled: boolean;
2188
2198
  id: string;
2199
+ enabled: boolean;
2189
2200
  mode: "tunnel" | "direct";
2190
2201
  defaultModel: string | null;
2191
2202
  connectionId: string | null;
@@ -2195,8 +2206,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2195
2206
  baseUrl: string;
2196
2207
  } | null | undefined;
2197
2208
  }, {
2198
- enabled: boolean;
2199
2209
  id: string;
2210
+ enabled: boolean;
2200
2211
  mode: "tunnel" | "direct";
2201
2212
  defaultModel: string | null;
2202
2213
  connectionId: string | null;
@@ -2208,8 +2219,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2208
2219
  }>;
2209
2220
  }, "strip", z.ZodTypeAny, {
2210
2221
  connector: {
2211
- enabled: boolean;
2212
2222
  id: string;
2223
+ enabled: boolean;
2213
2224
  mode: "tunnel" | "direct";
2214
2225
  defaultModel: string | null;
2215
2226
  connectionId: string | null;
@@ -2221,8 +2232,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
2221
2232
  };
2222
2233
  }, {
2223
2234
  connector: {
2224
- enabled: boolean;
2225
2235
  id: string;
2236
+ enabled: boolean;
2226
2237
  mode: "tunnel" | "direct";
2227
2238
  defaultModel: string | null;
2228
2239
  connectionId: string | null;
@@ -2284,14 +2295,6 @@ declare function mergeMetadata(user: Record<string, unknown> | undefined, defaul
2284
2295
  type ShorthandPrimitive = 'string' | 'number' | 'boolean';
2285
2296
  /** What the user passes for a tool's input shape. */
2286
2297
  type ToolInputShape = Record<string, ShorthandPrimitive> | z.ZodTypeAny;
2287
- interface ToolDefinition<I = unknown, R = unknown> {
2288
- readonly description: string;
2289
- readonly input: ToolInputShape;
2290
- /** Implementation. Receives parsed input and the agent context. */
2291
- readonly run: (input: I, ctx: AgentContext) => Promise<R> | R;
2292
- /** Capability required for Action Guard. Defaults to `tool.<name>`. */
2293
- readonly capability?: string;
2294
- }
2295
2298
 
2296
2299
  interface ResendCredentials {
2297
2300
  /** Resend API key — find under "API Keys" in the Resend dashboard. */
@@ -2574,7 +2577,7 @@ interface CompiledAgentParts {
2574
2577
  readonly triggers?: Record<string, TriggerDefinition>;
2575
2578
  readonly handoff?: HandoffConfig;
2576
2579
  readonly memory?: MemoryConfig;
2577
- readonly tools?: Record<string, ToolDefinition$1>;
2580
+ readonly tools?: Record<string, ToolDefinition>;
2578
2581
  /** Voice turn-taking from the flow's speech capability (schema.speech →
2579
2582
  * AgentConfig.speech → applySpeechTurnHandling). */
2580
2583
  readonly speech?: SpeechConfig;
@@ -2720,7 +2723,9 @@ declare abstract class BaseTool<I = unknown, R = unknown> {
2720
2723
  abstract readonly description: string;
2721
2724
  abstract readonly input: ToolInputShape;
2722
2725
  readonly capability?: string;
2723
- abstract run(input: I, ctx: AgentContext): Promise<R> | R;
2726
+ /** `false`: this tool gets the call's PII tokens, not the caller's real values (see ToolDefinition.sendRealValues). */
2727
+ readonly sendRealValues?: boolean;
2728
+ abstract run(input: I, ctx: AgentContext, info?: ToolRunInfo): Promise<R> | R;
2724
2729
  /** The ToolDefinition the runtime consumes. */
2725
2730
  toDefinition(): ToolDefinition<I, R>;
2726
2731
  /** `{ [name]: definition }` — spread straight into `defineAgent({ tools })`. */
@@ -2732,7 +2737,9 @@ declare function defineTool<I = unknown, R = unknown>(spec: {
2732
2737
  readonly description: string;
2733
2738
  readonly input: ToolInputShape;
2734
2739
  readonly capability?: string;
2735
- readonly run: (input: I, ctx: AgentContext) => Promise<R> | R;
2740
+ /** `false`: this tool gets the call's PII tokens, not the caller's real values (see ToolDefinition.sendRealValues). */
2741
+ readonly sendRealValues?: boolean;
2742
+ readonly run: (input: I, ctx: AgentContext, info?: ToolRunInfo) => Promise<R> | R;
2736
2743
  }): Record<string, ToolDefinition>;
2737
2744
  interface HttpToolResult {
2738
2745
  readonly ok: boolean;
@@ -2763,17 +2770,13 @@ interface HttpToolSpec {
2763
2770
  * sets it, and its server-side executor has no such switch.
2764
2771
  */
2765
2772
  readonly allowPrivateNetwork?: boolean;
2773
+ /**
2774
+ * The model reads the caller's PII as tokens (`<PII_PHONE_1>`). `true`: this endpoint gets the caller's real values
2775
+ * instead — only when `url` fixes the host (a `{placeholder}` in the host keeps the tokens), and a redirect to another
2776
+ * origin is then refused. Otherwise it gets the tokens. (burn-down G-33 — test/tool-detokenise.test.ts)
2777
+ */
2778
+ readonly sendRealValues?: boolean;
2766
2779
  }
2767
- /**
2768
- * A config-only HTTP tool — no subclass needed for the common "call an API"
2769
- * case. Use this for public/no-auth endpoints (e.g. an n8n webhook). Secrets
2770
- * should NOT be inlined here; vault-backed credentials resolve server-side.
2771
- *
2772
- * Safe by default (runtime/safe-fetch.ts): http(s) only, never a private /
2773
- * loopback / link-local / metadata address (checked again after DNS and on every
2774
- * redirect hop), a timeout, and a capped body. A refused request is a failed
2775
- * result `{ ok: false, status: 0, data: { kind: 'blocked', reason } }`, never a throw.
2776
- */
2777
2780
  declare function httpTool(spec: HttpToolSpec): Record<string, ToolDefinition>;
2778
2781
 
2779
- export { Agent, AgentConfig$1 as AgentConfig, AgentContext, AgentEventEmitter, AgentLifecycleEvent, type ApiCredential, type AppendDtmfEventInput, type AppendTranscriptInput, BaseTool, BrainTransport, type CallAttributeValue, type CallLegInput, type CallParticipantInput, type CallStatus, type CallSummary, CallsClient, type CompiledAgentParts, ConnectorInstance, type ConnectorLLMConfig, type CreateClientOptions, type CreatedFormSession, type DefaultMetadata, type DtmfDirection, EmailClient, type SendEmailInput as EmailSendInput, type EnsureCallByRoomInput, type ExchangeWorkerTokenInput, type CreateFormSessionInput as FormCreateInput, type FormToolsOptions, FormsClient, HandoffConfig, type HttpToolResult, type HttpToolSpec, LLMProvider, MemoryConfig, ModelConfig, OnQuery, type PipelineConfig, PlansClient, ProcessDefinition, ProcessField, type PronunciationDict, ProviderFactory, type PublicFormSessionView, ReadinessProbe, RealtimeProvider, type RegisterInput, type RegisterOptions, type RegisteredAgent, type ResendCredentials, type ResendEmailToolOptions, STTProvider, type SentEmail, SpeechConfig, StaleRouteError, type SyncCallStateInput, TTSProvider, ToolDefinition$1 as ToolDefinition, TriggerDefinition, TurnDetectorProvider, VADProvider, type VoiceLayerClient, type WebhookApi, type WebhookConfig, type WorkerIdentity, type WorkerIdentityResolution, type WrapOptions, admitCallIdentity, applyPronunciations, assemblyai, cartesia, collectDefaultMetadata, connector, createClient, createNoOpLLM, deepgram, defineAgent, defineFlowRuntime, defineTool, elevenlabs, exchangeWorkerToken, formTools, google, httpTool, livekitTurn, mergeMetadata, openai, processSchemaToAgentParts, processSchemaToDefinition, resendEmailTool, resolveWorkerClient, resolveWorkerIdentity, silero, webhook, wrap };
2782
+ export { Agent, AgentConfig$1 as AgentConfig, AgentContext, AgentEventEmitter, AgentLifecycleEvent, type ApiCredential, type AppendDtmfEventInput, type AppendTranscriptInput, BaseTool, BrainTransport, type CallAttributeValue, type CallLegInput, type CallParticipantInput, type CallStatus, type CallSummary, CallsClient, type CompiledAgentParts, ConnectorInstance, type ConnectorLLMConfig, type CreateClientOptions, type CreatedFormSession, type DefaultMetadata, type DtmfDirection, EmailClient, type SendEmailInput as EmailSendInput, type EnsureCallByRoomInput, type ExchangeWorkerTokenInput, type CreateFormSessionInput as FormCreateInput, type FormToolsOptions, FormsClient, HandoffConfig, type HttpToolResult, type HttpToolSpec, LLMProvider, MemoryConfig, ModelConfig, OnQuery, type PipelineConfig, PlansClient, ProcessDefinition, ProcessField, type PronunciationDict, ProviderFactory, type PublicFormSessionView, ReadinessProbe, RealtimeProvider, type RegisterInput, type RegisterOptions, type RegisteredAgent, type ResendCredentials, type ResendEmailToolOptions, STTProvider, type SentEmail, SpeechConfig, StaleRouteError, type SyncCallStateInput, TTSProvider, ToolDefinition, ToolRunInfo, TriggerDefinition, TurnDetectorProvider, VADProvider, type VoiceLayerClient, type WebhookApi, type WebhookConfig, type WorkerIdentity, type WorkerIdentityResolution, type WrapOptions, admitCallIdentity, applyPronunciations, assemblyai, cartesia, collectDefaultMetadata, connector, createClient, createNoOpLLM, deepgram, defineAgent, defineFlowRuntime, defineTool, elevenlabs, exchangeWorkerToken, formTools, google, httpTool, livekitTurn, mergeMetadata, openai, processSchemaToAgentParts, processSchemaToDefinition, resendEmailTool, resolveWorkerClient, resolveWorkerIdentity, silero, webhook, wrap };