@voicelayer/sdk 0.5.0 → 0.6.0
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/brain/index.d.ts +2 -2
- package/dist/brain/index.js +122 -16
- package/dist/index.d.ts +338 -320
- package/dist/index.js +3034 -1791
- package/dist/runtime/text-session.d.ts +1 -1
- package/dist/runtime/text-session.js +655 -101
- package/dist/{text-session-Bf4Jni7H.d.ts → text-session-CoyEcdmg.d.ts} +238 -124
- package/package.json +8 -4
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,
|
|
2
|
-
export {
|
|
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-CoyEcdmg.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-CoyEcdmg.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" | "
|
|
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" | "
|
|
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" | "
|
|
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" | "
|
|
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,41 @@ 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" | "
|
|
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" | "
|
|
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
|
+
draftUpdatedAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
473
474
|
}, "strip", z.ZodTypeAny, {
|
|
475
|
+
stt?: {
|
|
476
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
477
|
+
model?: string | undefined;
|
|
478
|
+
language?: string | undefined;
|
|
479
|
+
endOfTurnConfidence?: number | undefined;
|
|
480
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
481
|
+
keywords?: string[] | undefined;
|
|
482
|
+
} | undefined;
|
|
483
|
+
realtime?: {
|
|
484
|
+
provider: "openai" | "google";
|
|
485
|
+
model: string;
|
|
486
|
+
voice?: string | undefined;
|
|
487
|
+
temperature?: number | undefined;
|
|
488
|
+
} | undefined;
|
|
489
|
+
voice?: {
|
|
490
|
+
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
491
|
+
voiceId: string;
|
|
492
|
+
model?: string | undefined;
|
|
493
|
+
rate?: number | undefined;
|
|
494
|
+
} | undefined;
|
|
495
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
474
496
|
name?: string | undefined;
|
|
475
497
|
triggers?: Record<string, {
|
|
476
498
|
then: {
|
|
@@ -482,12 +504,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
482
504
|
kind: "say";
|
|
483
505
|
};
|
|
484
506
|
on: {
|
|
485
|
-
pattern: string;
|
|
486
507
|
kind: "regex";
|
|
508
|
+
pattern: string;
|
|
487
509
|
flags?: string | undefined;
|
|
488
510
|
} | {
|
|
489
|
-
name: string;
|
|
490
511
|
kind: "signal";
|
|
512
|
+
name: string;
|
|
491
513
|
};
|
|
492
514
|
onlyWhile?: string | undefined;
|
|
493
515
|
}> | undefined;
|
|
@@ -495,27 +517,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
495
517
|
toolName: string;
|
|
496
518
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
497
519
|
}[] | 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
520
|
mode?: "realtime" | "cascade" | undefined;
|
|
520
521
|
model?: {
|
|
521
522
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -543,7 +544,7 @@ declare const CallPlan: z.ZodObject<{
|
|
|
543
544
|
} | undefined;
|
|
544
545
|
process?: {
|
|
545
546
|
collect: Record<string, {
|
|
546
|
-
type: "string" | "number" | "boolean" | "
|
|
547
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
547
548
|
ask?: string | undefined;
|
|
548
549
|
required?: boolean | undefined;
|
|
549
550
|
pattern?: string | undefined;
|
|
@@ -555,21 +556,43 @@ declare const CallPlan: z.ZodObject<{
|
|
|
555
556
|
completeWhen: "all-required-captured" | "all-captured";
|
|
556
557
|
backendAck?: {
|
|
557
558
|
url: string;
|
|
558
|
-
timeoutMs?: number | undefined;
|
|
559
559
|
headers?: Record<string, string> | undefined;
|
|
560
|
+
timeoutMs?: number | undefined;
|
|
560
561
|
} | undefined;
|
|
561
562
|
} | undefined;
|
|
562
563
|
tags?: string[] | undefined;
|
|
563
564
|
brainConnectorId?: string | null | undefined;
|
|
564
565
|
modeLocked?: boolean | undefined;
|
|
565
566
|
requiredInfo?: {
|
|
566
|
-
type: "string" | "number" | "boolean" | "
|
|
567
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
567
568
|
name: string;
|
|
568
569
|
required: boolean;
|
|
569
570
|
enum?: string[] | undefined;
|
|
570
571
|
description?: string | undefined;
|
|
571
572
|
}[] | undefined;
|
|
573
|
+
draftUpdatedAt?: string | undefined;
|
|
572
574
|
}, {
|
|
575
|
+
stt?: {
|
|
576
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
577
|
+
model?: string | undefined;
|
|
578
|
+
language?: string | undefined;
|
|
579
|
+
endOfTurnConfidence?: number | undefined;
|
|
580
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
581
|
+
keywords?: string[] | undefined;
|
|
582
|
+
} | undefined;
|
|
583
|
+
realtime?: {
|
|
584
|
+
provider: "openai" | "google";
|
|
585
|
+
model: string;
|
|
586
|
+
voice?: string | undefined;
|
|
587
|
+
temperature?: number | undefined;
|
|
588
|
+
} | undefined;
|
|
589
|
+
voice?: {
|
|
590
|
+
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
591
|
+
voiceId: string;
|
|
592
|
+
model?: string | undefined;
|
|
593
|
+
rate?: number | undefined;
|
|
594
|
+
} | undefined;
|
|
595
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
573
596
|
name?: string | undefined;
|
|
574
597
|
triggers?: Record<string, {
|
|
575
598
|
then: {
|
|
@@ -581,12 +604,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
581
604
|
kind: "say";
|
|
582
605
|
};
|
|
583
606
|
on: {
|
|
584
|
-
pattern: string;
|
|
585
607
|
kind: "regex";
|
|
608
|
+
pattern: string;
|
|
586
609
|
flags?: string | undefined;
|
|
587
610
|
} | {
|
|
588
|
-
name: string;
|
|
589
611
|
kind: "signal";
|
|
612
|
+
name: string;
|
|
590
613
|
};
|
|
591
614
|
onlyWhile?: string | undefined;
|
|
592
615
|
}> | undefined;
|
|
@@ -594,27 +617,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
594
617
|
toolName: string;
|
|
595
618
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
596
619
|
}[] | 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
620
|
mode?: "realtime" | "cascade" | undefined;
|
|
619
621
|
model?: {
|
|
620
622
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -643,11 +645,11 @@ declare const CallPlan: z.ZodObject<{
|
|
|
643
645
|
process?: {
|
|
644
646
|
backendAck?: {
|
|
645
647
|
url: string;
|
|
646
|
-
timeoutMs?: number | undefined;
|
|
647
648
|
headers?: Record<string, string> | undefined;
|
|
649
|
+
timeoutMs?: number | undefined;
|
|
648
650
|
} | undefined;
|
|
649
651
|
collect?: Record<string, {
|
|
650
|
-
type: "string" | "number" | "boolean" | "
|
|
652
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
651
653
|
ask?: string | undefined;
|
|
652
654
|
required?: boolean | undefined;
|
|
653
655
|
pattern?: string | undefined;
|
|
@@ -662,12 +664,13 @@ declare const CallPlan: z.ZodObject<{
|
|
|
662
664
|
brainConnectorId?: string | null | undefined;
|
|
663
665
|
modeLocked?: boolean | undefined;
|
|
664
666
|
requiredInfo?: {
|
|
665
|
-
type: "string" | "number" | "boolean" | "
|
|
667
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
666
668
|
name: string;
|
|
667
669
|
required: boolean;
|
|
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
|
-
id: string;
|
|
680
682
|
kind: "decision" | "auth" | "fact";
|
|
683
|
+
id: string;
|
|
681
684
|
prompt: string;
|
|
682
685
|
deferrableToCallee: boolean;
|
|
683
686
|
options?: string[] | undefined;
|
|
684
687
|
}, {
|
|
685
|
-
id: string;
|
|
686
688
|
kind: "decision" | "auth" | "fact";
|
|
689
|
+
id: string;
|
|
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
|
-
id: string;
|
|
699
701
|
kind: "decision" | "auth" | "fact";
|
|
702
|
+
id: string;
|
|
700
703
|
prompt: string;
|
|
701
704
|
deferrableToCallee: boolean;
|
|
702
705
|
options?: string[] | undefined;
|
|
703
706
|
}, {
|
|
704
|
-
id: string;
|
|
705
707
|
kind: "decision" | "auth" | "fact";
|
|
708
|
+
id: string;
|
|
706
709
|
prompt: string;
|
|
707
710
|
options?: string[] | undefined;
|
|
708
711
|
deferrableToCallee?: boolean | undefined;
|
|
@@ -740,30 +743,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
740
743
|
e164?: string | undefined;
|
|
741
744
|
};
|
|
742
745
|
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
746
|
stt?: {
|
|
768
747
|
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
769
748
|
model?: string | undefined;
|
|
@@ -785,6 +764,30 @@ declare const CallPlan: z.ZodObject<{
|
|
|
785
764
|
rate?: number | undefined;
|
|
786
765
|
} | undefined;
|
|
787
766
|
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
767
|
+
name?: string | undefined;
|
|
768
|
+
triggers?: Record<string, {
|
|
769
|
+
then: {
|
|
770
|
+
kind: "handoff";
|
|
771
|
+
} | {
|
|
772
|
+
kind: "endCall";
|
|
773
|
+
} | {
|
|
774
|
+
text: string;
|
|
775
|
+
kind: "say";
|
|
776
|
+
};
|
|
777
|
+
on: {
|
|
778
|
+
kind: "regex";
|
|
779
|
+
pattern: string;
|
|
780
|
+
flags?: string | undefined;
|
|
781
|
+
} | {
|
|
782
|
+
kind: "signal";
|
|
783
|
+
name: string;
|
|
784
|
+
};
|
|
785
|
+
onlyWhile?: string | undefined;
|
|
786
|
+
}> | undefined;
|
|
787
|
+
tools?: {
|
|
788
|
+
toolName: string;
|
|
789
|
+
defaultArgs?: Record<string, unknown> | undefined;
|
|
790
|
+
}[] | undefined;
|
|
788
791
|
mode?: "realtime" | "cascade" | undefined;
|
|
789
792
|
model?: {
|
|
790
793
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -812,7 +815,7 @@ declare const CallPlan: z.ZodObject<{
|
|
|
812
815
|
} | undefined;
|
|
813
816
|
process?: {
|
|
814
817
|
collect: Record<string, {
|
|
815
|
-
type: "string" | "number" | "boolean" | "
|
|
818
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
816
819
|
ask?: string | undefined;
|
|
817
820
|
required?: boolean | undefined;
|
|
818
821
|
pattern?: string | undefined;
|
|
@@ -824,31 +827,32 @@ declare const CallPlan: z.ZodObject<{
|
|
|
824
827
|
completeWhen: "all-required-captured" | "all-captured";
|
|
825
828
|
backendAck?: {
|
|
826
829
|
url: string;
|
|
827
|
-
timeoutMs?: number | undefined;
|
|
828
830
|
headers?: Record<string, string> | undefined;
|
|
831
|
+
timeoutMs?: number | undefined;
|
|
829
832
|
} | undefined;
|
|
830
833
|
} | undefined;
|
|
831
834
|
tags?: string[] | undefined;
|
|
832
835
|
brainConnectorId?: string | null | undefined;
|
|
833
836
|
modeLocked?: boolean | undefined;
|
|
834
837
|
requiredInfo?: {
|
|
835
|
-
type: "string" | "number" | "boolean" | "
|
|
838
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
836
839
|
name: string;
|
|
837
840
|
required: boolean;
|
|
838
841
|
enum?: string[] | undefined;
|
|
839
842
|
description?: string | undefined;
|
|
840
843
|
}[] | undefined;
|
|
844
|
+
draftUpdatedAt?: string | undefined;
|
|
841
845
|
};
|
|
842
846
|
openQuestions: {
|
|
843
|
-
id: string;
|
|
844
847
|
kind: "decision" | "auth" | "fact";
|
|
848
|
+
id: string;
|
|
845
849
|
prompt: string;
|
|
846
850
|
deferrableToCallee: boolean;
|
|
847
851
|
options?: string[] | undefined;
|
|
848
852
|
}[];
|
|
849
853
|
unresolvedQuestions: {
|
|
850
|
-
id: string;
|
|
851
854
|
kind: "decision" | "auth" | "fact";
|
|
855
|
+
id: string;
|
|
852
856
|
prompt: string;
|
|
853
857
|
deferrableToCallee: boolean;
|
|
854
858
|
options?: string[] | undefined;
|
|
@@ -880,6 +884,27 @@ declare const CallPlan: z.ZodObject<{
|
|
|
880
884
|
secondary?: "ask_callee" | "fallback_phrase" | undefined;
|
|
881
885
|
};
|
|
882
886
|
draftConfig?: {
|
|
887
|
+
stt?: {
|
|
888
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
889
|
+
model?: string | undefined;
|
|
890
|
+
language?: string | undefined;
|
|
891
|
+
endOfTurnConfidence?: number | undefined;
|
|
892
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
893
|
+
keywords?: string[] | undefined;
|
|
894
|
+
} | undefined;
|
|
895
|
+
realtime?: {
|
|
896
|
+
provider: "openai" | "google";
|
|
897
|
+
model: string;
|
|
898
|
+
voice?: string | undefined;
|
|
899
|
+
temperature?: number | undefined;
|
|
900
|
+
} | undefined;
|
|
901
|
+
voice?: {
|
|
902
|
+
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
903
|
+
voiceId: string;
|
|
904
|
+
model?: string | undefined;
|
|
905
|
+
rate?: number | undefined;
|
|
906
|
+
} | undefined;
|
|
907
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
883
908
|
name?: string | undefined;
|
|
884
909
|
triggers?: Record<string, {
|
|
885
910
|
then: {
|
|
@@ -891,12 +916,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
891
916
|
kind: "say";
|
|
892
917
|
};
|
|
893
918
|
on: {
|
|
894
|
-
pattern: string;
|
|
895
919
|
kind: "regex";
|
|
920
|
+
pattern: string;
|
|
896
921
|
flags?: string | undefined;
|
|
897
922
|
} | {
|
|
898
|
-
name: string;
|
|
899
923
|
kind: "signal";
|
|
924
|
+
name: string;
|
|
900
925
|
};
|
|
901
926
|
onlyWhile?: string | undefined;
|
|
902
927
|
}> | undefined;
|
|
@@ -904,27 +929,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
904
929
|
toolName: string;
|
|
905
930
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
906
931
|
}[] | 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
932
|
mode?: "realtime" | "cascade" | undefined;
|
|
929
933
|
model?: {
|
|
930
934
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -953,11 +957,11 @@ declare const CallPlan: z.ZodObject<{
|
|
|
953
957
|
process?: {
|
|
954
958
|
backendAck?: {
|
|
955
959
|
url: string;
|
|
956
|
-
timeoutMs?: number | undefined;
|
|
957
960
|
headers?: Record<string, string> | undefined;
|
|
961
|
+
timeoutMs?: number | undefined;
|
|
958
962
|
} | undefined;
|
|
959
963
|
collect?: Record<string, {
|
|
960
|
-
type: "string" | "number" | "boolean" | "
|
|
964
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
961
965
|
ask?: string | undefined;
|
|
962
966
|
required?: boolean | undefined;
|
|
963
967
|
pattern?: string | undefined;
|
|
@@ -972,23 +976,24 @@ declare const CallPlan: z.ZodObject<{
|
|
|
972
976
|
brainConnectorId?: string | null | undefined;
|
|
973
977
|
modeLocked?: boolean | undefined;
|
|
974
978
|
requiredInfo?: {
|
|
975
|
-
type: "string" | "number" | "boolean" | "
|
|
979
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
976
980
|
name: string;
|
|
977
981
|
required: boolean;
|
|
978
982
|
enum?: string[] | undefined;
|
|
979
983
|
description?: string | undefined;
|
|
980
984
|
}[] | undefined;
|
|
985
|
+
draftUpdatedAt?: string | undefined;
|
|
981
986
|
} | undefined;
|
|
982
987
|
openQuestions?: {
|
|
983
|
-
id: string;
|
|
984
988
|
kind: "decision" | "auth" | "fact";
|
|
989
|
+
id: string;
|
|
985
990
|
prompt: string;
|
|
986
991
|
options?: string[] | undefined;
|
|
987
992
|
deferrableToCallee?: boolean | undefined;
|
|
988
993
|
}[] | undefined;
|
|
989
994
|
unresolvedQuestions?: {
|
|
990
|
-
id: string;
|
|
991
995
|
kind: "decision" | "auth" | "fact";
|
|
996
|
+
id: string;
|
|
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
|
-
call: Record<string, unknown>;
|
|
1010
1014
|
caller: Record<string, unknown>;
|
|
1015
|
+
call: Record<string, unknown>;
|
|
1011
1016
|
account: Record<string, unknown>;
|
|
1012
1017
|
platform: Record<string, unknown>;
|
|
1013
1018
|
}, {
|
|
1014
|
-
call: Record<string, unknown>;
|
|
1015
1019
|
caller: Record<string, unknown>;
|
|
1020
|
+
call: 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;
|
|
1031
|
-
displayName: string | null;
|
|
1032
1036
|
projectId: string;
|
|
1033
1037
|
createdAt: string;
|
|
1034
1038
|
updatedAt: string;
|
|
1039
|
+
displayName: string | null;
|
|
1035
1040
|
metadata: Record<string, unknown>;
|
|
1036
1041
|
externalKey: string;
|
|
1037
1042
|
}, {
|
|
1038
1043
|
id: string;
|
|
1039
|
-
displayName: string | null;
|
|
1040
1044
|
projectId: string;
|
|
1041
1045
|
createdAt: string;
|
|
1042
1046
|
updatedAt: string;
|
|
1047
|
+
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;
|
|
1049
|
-
displayName: string | null;
|
|
1050
1054
|
projectId: string;
|
|
1051
1055
|
createdAt: string;
|
|
1052
1056
|
updatedAt: string;
|
|
1057
|
+
displayName: string | null;
|
|
1053
1058
|
metadata: Record<string, unknown>;
|
|
1054
1059
|
externalKey: string;
|
|
1055
1060
|
};
|
|
1056
1061
|
}, {
|
|
1057
1062
|
caller: {
|
|
1058
1063
|
id: string;
|
|
1059
|
-
displayName: string | null;
|
|
1060
1064
|
projectId: string;
|
|
1061
1065
|
createdAt: string;
|
|
1062
1066
|
updatedAt: string;
|
|
1067
|
+
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: ("
|
|
1078
|
+
scopesPurged: ("caller" | "call" | "account" | "platform")[];
|
|
1074
1079
|
}, {
|
|
1075
1080
|
ok: true;
|
|
1076
|
-
scopesPurged: ("
|
|
1081
|
+
scopesPurged: ("caller" | "call" | "account" | "platform")[];
|
|
1077
1082
|
}>;
|
|
1078
1083
|
type DeleteCallerResponse = z.infer<typeof DeleteCallerResponse>;
|
|
1079
1084
|
|
|
@@ -1227,7 +1232,7 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1227
1232
|
ask: z.ZodOptional<z.ZodString>;
|
|
1228
1233
|
extract: z.ZodOptional<z.ZodString>;
|
|
1229
1234
|
}, "strip", z.ZodTypeAny, {
|
|
1230
|
-
type: "string" | "number" | "boolean" | "
|
|
1235
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1231
1236
|
ask?: string | undefined;
|
|
1232
1237
|
required?: boolean | undefined;
|
|
1233
1238
|
pattern?: string | undefined;
|
|
@@ -1236,7 +1241,7 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1236
1241
|
enum?: string[] | undefined;
|
|
1237
1242
|
extract?: string | undefined;
|
|
1238
1243
|
}, {
|
|
1239
|
-
type: "string" | "number" | "boolean" | "
|
|
1244
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1240
1245
|
ask?: string | undefined;
|
|
1241
1246
|
required?: boolean | undefined;
|
|
1242
1247
|
pattern?: string | undefined;
|
|
@@ -1252,16 +1257,16 @@ 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
|
-
timeoutMs?: number | undefined;
|
|
1256
1260
|
headers?: Record<string, string> | undefined;
|
|
1261
|
+
timeoutMs?: number | undefined;
|
|
1257
1262
|
}, {
|
|
1258
1263
|
url: string;
|
|
1259
|
-
timeoutMs?: number | undefined;
|
|
1260
1264
|
headers?: Record<string, string> | undefined;
|
|
1265
|
+
timeoutMs?: number | undefined;
|
|
1261
1266
|
}>>;
|
|
1262
1267
|
}, "strip", z.ZodTypeAny, {
|
|
1263
1268
|
collect: Record<string, {
|
|
1264
|
-
type: "string" | "number" | "boolean" | "
|
|
1269
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1265
1270
|
ask?: string | undefined;
|
|
1266
1271
|
required?: boolean | undefined;
|
|
1267
1272
|
pattern?: string | undefined;
|
|
@@ -1273,17 +1278,17 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1273
1278
|
completeWhen: "all-required-captured" | "all-captured";
|
|
1274
1279
|
backendAck?: {
|
|
1275
1280
|
url: string;
|
|
1276
|
-
timeoutMs?: number | undefined;
|
|
1277
1281
|
headers?: Record<string, string> | undefined;
|
|
1282
|
+
timeoutMs?: number | undefined;
|
|
1278
1283
|
} | undefined;
|
|
1279
1284
|
}, {
|
|
1280
1285
|
backendAck?: {
|
|
1281
1286
|
url: string;
|
|
1282
|
-
timeoutMs?: number | undefined;
|
|
1283
1287
|
headers?: Record<string, string> | undefined;
|
|
1288
|
+
timeoutMs?: number | undefined;
|
|
1284
1289
|
} | undefined;
|
|
1285
1290
|
collect?: Record<string, {
|
|
1286
|
-
type: "string" | "number" | "boolean" | "
|
|
1291
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1287
1292
|
ask?: string | undefined;
|
|
1288
1293
|
required?: boolean | undefined;
|
|
1289
1294
|
pattern?: string | undefined;
|
|
@@ -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
|
-
pattern: string;
|
|
1304
1308
|
kind: "regex";
|
|
1309
|
+
pattern: string;
|
|
1305
1310
|
flags?: string | undefined;
|
|
1306
1311
|
}, {
|
|
1307
|
-
pattern: string;
|
|
1308
1312
|
kind: "regex";
|
|
1313
|
+
pattern: string;
|
|
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
|
-
name: string;
|
|
1315
1319
|
kind: "signal";
|
|
1316
|
-
}, {
|
|
1317
1320
|
name: string;
|
|
1321
|
+
}, {
|
|
1318
1322
|
kind: "signal";
|
|
1323
|
+
name: string;
|
|
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
|
-
pattern: string;
|
|
1354
1358
|
kind: "regex";
|
|
1359
|
+
pattern: string;
|
|
1355
1360
|
flags?: string | undefined;
|
|
1356
1361
|
} | {
|
|
1357
|
-
name: string;
|
|
1358
1362
|
kind: "signal";
|
|
1363
|
+
name: string;
|
|
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
|
-
pattern: string;
|
|
1372
1376
|
kind: "regex";
|
|
1377
|
+
pattern: string;
|
|
1373
1378
|
flags?: string | undefined;
|
|
1374
1379
|
} | {
|
|
1375
|
-
name: string;
|
|
1376
1380
|
kind: "signal";
|
|
1381
|
+
name: string;
|
|
1377
1382
|
};
|
|
1378
1383
|
onlyWhile?: string | undefined;
|
|
1379
1384
|
}>>>;
|
|
@@ -1388,13 +1393,13 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1388
1393
|
description: z.ZodOptional<z.ZodString>;
|
|
1389
1394
|
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1390
1395
|
}, "strip", z.ZodTypeAny, {
|
|
1391
|
-
type: "string" | "number" | "boolean" | "
|
|
1396
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1392
1397
|
name: string;
|
|
1393
1398
|
required: boolean;
|
|
1394
1399
|
enum?: string[] | undefined;
|
|
1395
1400
|
description?: string | undefined;
|
|
1396
1401
|
}, {
|
|
1397
|
-
type: "string" | "number" | "boolean" | "
|
|
1402
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1398
1403
|
name: string;
|
|
1399
1404
|
required: boolean;
|
|
1400
1405
|
enum?: string[] | undefined;
|
|
@@ -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, {
|
|
1406
|
-
id: string;
|
|
1407
|
-
name: string;
|
|
1408
|
-
tools: {
|
|
1409
|
-
toolName: string;
|
|
1410
|
-
defaultArgs?: Record<string, unknown> | undefined;
|
|
1411
|
-
}[];
|
|
1412
1412
|
voice: {
|
|
1413
1413
|
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
1414
1414
|
voiceId: string;
|
|
1415
1415
|
model?: string | undefined;
|
|
1416
1416
|
rate?: number | undefined;
|
|
1417
1417
|
};
|
|
1418
|
+
id: string;
|
|
1418
1419
|
projectId: string;
|
|
1420
|
+
name: string;
|
|
1419
1421
|
createdAt: string;
|
|
1420
1422
|
updatedAt: string;
|
|
1423
|
+
tools: {
|
|
1424
|
+
toolName: string;
|
|
1425
|
+
defaultArgs?: Record<string, unknown> | undefined;
|
|
1426
|
+
}[];
|
|
1421
1427
|
mode: "realtime" | "cascade";
|
|
1422
1428
|
model: {
|
|
1423
1429
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -1442,12 +1448,27 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1442
1448
|
} | undefined;
|
|
1443
1449
|
};
|
|
1444
1450
|
requiredInfo: {
|
|
1445
|
-
type: "string" | "number" | "boolean" | "
|
|
1451
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1446
1452
|
name: string;
|
|
1447
1453
|
required: boolean;
|
|
1448
1454
|
enum?: string[] | undefined;
|
|
1449
1455
|
description?: string | undefined;
|
|
1450
1456
|
}[];
|
|
1457
|
+
stt?: {
|
|
1458
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
1459
|
+
model?: string | undefined;
|
|
1460
|
+
language?: string | undefined;
|
|
1461
|
+
endOfTurnConfidence?: number | undefined;
|
|
1462
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
1463
|
+
keywords?: string[] | undefined;
|
|
1464
|
+
} | undefined;
|
|
1465
|
+
realtime?: {
|
|
1466
|
+
provider: "openai" | "google";
|
|
1467
|
+
model: string;
|
|
1468
|
+
voice?: string | undefined;
|
|
1469
|
+
temperature?: number | undefined;
|
|
1470
|
+
} | undefined;
|
|
1471
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
1451
1472
|
triggers?: Record<string, {
|
|
1452
1473
|
then: {
|
|
1453
1474
|
kind: "handoff";
|
|
@@ -1458,35 +1479,20 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1458
1479
|
kind: "say";
|
|
1459
1480
|
};
|
|
1460
1481
|
on: {
|
|
1461
|
-
pattern: string;
|
|
1462
1482
|
kind: "regex";
|
|
1483
|
+
pattern: string;
|
|
1463
1484
|
flags?: string | undefined;
|
|
1464
1485
|
} | {
|
|
1465
|
-
name: string;
|
|
1466
1486
|
kind: "signal";
|
|
1487
|
+
name: string;
|
|
1467
1488
|
};
|
|
1468
1489
|
onlyWhile?: string | undefined;
|
|
1469
1490
|
}> | 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
1491
|
systemPrompt?: string | undefined;
|
|
1486
1492
|
routingInstructions?: string | undefined;
|
|
1487
1493
|
process?: {
|
|
1488
1494
|
collect: Record<string, {
|
|
1489
|
-
type: "string" | "number" | "boolean" | "
|
|
1495
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1490
1496
|
ask?: string | undefined;
|
|
1491
1497
|
required?: boolean | undefined;
|
|
1492
1498
|
pattern?: string | undefined;
|
|
@@ -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
|
-
timeoutMs?: number | undefined;
|
|
1502
1507
|
headers?: Record<string, string> | undefined;
|
|
1508
|
+
timeoutMs?: number | 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
|
}, {
|
|
1509
|
-
id: string;
|
|
1510
|
-
name: string;
|
|
1511
1516
|
voice: {
|
|
1512
1517
|
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
1513
1518
|
voiceId: string;
|
|
1514
1519
|
model?: string | undefined;
|
|
1515
1520
|
rate?: number | undefined;
|
|
1516
1521
|
};
|
|
1522
|
+
id: string;
|
|
1517
1523
|
projectId: string;
|
|
1524
|
+
name: string;
|
|
1518
1525
|
createdAt: string;
|
|
1519
1526
|
updatedAt: string;
|
|
1520
1527
|
model: {
|
|
@@ -1538,6 +1545,21 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1538
1545
|
normal?: number | undefined;
|
|
1539
1546
|
} | undefined;
|
|
1540
1547
|
};
|
|
1548
|
+
stt?: {
|
|
1549
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
1550
|
+
model?: string | undefined;
|
|
1551
|
+
language?: string | undefined;
|
|
1552
|
+
endOfTurnConfidence?: number | undefined;
|
|
1553
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
1554
|
+
keywords?: string[] | undefined;
|
|
1555
|
+
} | undefined;
|
|
1556
|
+
realtime?: {
|
|
1557
|
+
provider: "openai" | "google";
|
|
1558
|
+
model: string;
|
|
1559
|
+
voice?: string | undefined;
|
|
1560
|
+
temperature?: number | undefined;
|
|
1561
|
+
} | undefined;
|
|
1562
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
1541
1563
|
triggers?: Record<string, {
|
|
1542
1564
|
then: {
|
|
1543
1565
|
kind: "handoff";
|
|
@@ -1548,12 +1570,12 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1548
1570
|
kind: "say";
|
|
1549
1571
|
};
|
|
1550
1572
|
on: {
|
|
1551
|
-
pattern: string;
|
|
1552
1573
|
kind: "regex";
|
|
1574
|
+
pattern: string;
|
|
1553
1575
|
flags?: string | undefined;
|
|
1554
1576
|
} | {
|
|
1555
|
-
name: string;
|
|
1556
1577
|
kind: "signal";
|
|
1578
|
+
name: string;
|
|
1557
1579
|
};
|
|
1558
1580
|
onlyWhile?: string | undefined;
|
|
1559
1581
|
}> | undefined;
|
|
@@ -1561,21 +1583,6 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1561
1583
|
toolName: string;
|
|
1562
1584
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
1563
1585
|
}[] | 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
1586
|
mode?: "realtime" | "cascade" | undefined;
|
|
1580
1587
|
language?: string | undefined;
|
|
1581
1588
|
systemPrompt?: string | undefined;
|
|
@@ -1583,11 +1590,11 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1583
1590
|
process?: {
|
|
1584
1591
|
backendAck?: {
|
|
1585
1592
|
url: string;
|
|
1586
|
-
timeoutMs?: number | undefined;
|
|
1587
1593
|
headers?: Record<string, string> | undefined;
|
|
1594
|
+
timeoutMs?: number | undefined;
|
|
1588
1595
|
} | undefined;
|
|
1589
1596
|
collect?: Record<string, {
|
|
1590
|
-
type: "string" | "number" | "boolean" | "
|
|
1597
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1591
1598
|
ask?: string | undefined;
|
|
1592
1599
|
required?: boolean | undefined;
|
|
1593
1600
|
pattern?: string | undefined;
|
|
@@ -1602,16 +1609,17 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1602
1609
|
brainConnectorId?: string | null | undefined;
|
|
1603
1610
|
modeLocked?: boolean | undefined;
|
|
1604
1611
|
requiredInfo?: {
|
|
1605
|
-
type: "string" | "number" | "boolean" | "
|
|
1612
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1606
1613
|
name: string;
|
|
1607
1614
|
required: boolean;
|
|
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 {
|
|
@@ -1638,6 +1646,9 @@ interface RequestOptions {
|
|
|
1638
1646
|
/** Extra request headers, merged on top of the defaults (auth/content-type
|
|
1639
1647
|
* etc). Lowercase keys recommended. */
|
|
1640
1648
|
readonly headers?: Record<string, string>;
|
|
1649
|
+
/** Server-error statuses that are an answer, not a blip: never retried (e.g. an email the provider refused — a
|
|
1650
|
+
* retry could only send it twice or fail again). */
|
|
1651
|
+
readonly noRetryStatuses?: readonly number[];
|
|
1641
1652
|
}
|
|
1642
1653
|
declare class Transport {
|
|
1643
1654
|
private readonly options;
|
|
@@ -1649,6 +1660,35 @@ declare class Transport {
|
|
|
1649
1660
|
private backoffMs;
|
|
1650
1661
|
}
|
|
1651
1662
|
|
|
1663
|
+
interface SendEmailInput {
|
|
1664
|
+
readonly to: string;
|
|
1665
|
+
readonly subject: string;
|
|
1666
|
+
readonly text: string;
|
|
1667
|
+
readonly html?: string;
|
|
1668
|
+
/** An address on one of your workspace's verified sending domains (Settings → Email sending). Omitted → VoiceLayer's
|
|
1669
|
+
* sender. An unverified domain is refused (422 `from_not_verified`). */
|
|
1670
|
+
readonly from?: string;
|
|
1671
|
+
/** The display name beside the From address. */
|
|
1672
|
+
readonly fromName?: string;
|
|
1673
|
+
/** Where a reply goes — any address. */
|
|
1674
|
+
readonly replyTo?: string;
|
|
1675
|
+
/** The conversation (e.g. the call id) this email belongs to: a conversation sends at most 3 emails. */
|
|
1676
|
+
readonly conversationId?: string;
|
|
1677
|
+
}
|
|
1678
|
+
interface SentEmail {
|
|
1679
|
+
readonly emailId: string;
|
|
1680
|
+
}
|
|
1681
|
+
declare class EmailClient {
|
|
1682
|
+
private readonly transport;
|
|
1683
|
+
constructor(transport: Transport);
|
|
1684
|
+
/** `signal` aborts the request (the flow's Email step bounds its wait). A provider refusal (502), "email isn't set
|
|
1685
|
+
* up" (503) and "SES didn't answer — it may have sent" (504) are answers, never retried: a retry could only send
|
|
1686
|
+
* twice or fail again. */
|
|
1687
|
+
send(input: SendEmailInput, opts?: {
|
|
1688
|
+
readonly signal?: AbortSignal;
|
|
1689
|
+
}): Promise<SentEmail>;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1652
1692
|
interface RegisterInput {
|
|
1653
1693
|
readonly name: string;
|
|
1654
1694
|
readonly version: string;
|
|
@@ -1778,8 +1818,8 @@ declare class AgentsClient {
|
|
|
1778
1818
|
agents: {
|
|
1779
1819
|
status: "online" | "offline" | "degraded";
|
|
1780
1820
|
id: string;
|
|
1781
|
-
name: string;
|
|
1782
1821
|
projectId: string;
|
|
1822
|
+
name: string;
|
|
1783
1823
|
createdAt: string;
|
|
1784
1824
|
updatedAt: string;
|
|
1785
1825
|
version: string;
|
|
@@ -1804,7 +1844,7 @@ declare class AgentsClient {
|
|
|
1804
1844
|
} | undefined;
|
|
1805
1845
|
};
|
|
1806
1846
|
fields: {
|
|
1807
|
-
type: "string" | "number" | "boolean" | "
|
|
1847
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1808
1848
|
name: string;
|
|
1809
1849
|
required: boolean;
|
|
1810
1850
|
ask?: string | undefined;
|
|
@@ -1819,7 +1859,7 @@ declare class AgentsClient {
|
|
|
1819
1859
|
routes?: Record<string, string> | undefined;
|
|
1820
1860
|
} | undefined;
|
|
1821
1861
|
memory?: {
|
|
1822
|
-
scope?: "
|
|
1862
|
+
scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
|
|
1823
1863
|
retentionDays?: number | undefined;
|
|
1824
1864
|
piiFields?: string[] | undefined;
|
|
1825
1865
|
} | undefined;
|
|
@@ -1835,8 +1875,8 @@ declare class AgentsClient {
|
|
|
1835
1875
|
} | undefined;
|
|
1836
1876
|
} | undefined;
|
|
1837
1877
|
prompts?: {
|
|
1838
|
-
id: string;
|
|
1839
1878
|
text: string;
|
|
1879
|
+
id: string;
|
|
1840
1880
|
}[] | undefined;
|
|
1841
1881
|
triggers?: {
|
|
1842
1882
|
then: string;
|
|
@@ -1846,31 +1886,32 @@ declare class AgentsClient {
|
|
|
1846
1886
|
}[] | undefined;
|
|
1847
1887
|
tools?: {
|
|
1848
1888
|
name: string;
|
|
1849
|
-
url: string;
|
|
1850
1889
|
description: string;
|
|
1851
1890
|
input: Record<string, "string" | "number" | "boolean">;
|
|
1891
|
+
url: string;
|
|
1852
1892
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1853
1893
|
auth: "none" | "connection";
|
|
1854
|
-
allowPrivateNetwork?: boolean | undefined;
|
|
1855
1894
|
headers?: Record<string, string> | undefined;
|
|
1856
1895
|
connectionRef?: string | undefined;
|
|
1896
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1897
|
+
sendRealValues?: boolean | undefined;
|
|
1857
1898
|
}[] | undefined;
|
|
1858
1899
|
displayName?: string | undefined;
|
|
1859
1900
|
program?: {
|
|
1860
|
-
v: 1;
|
|
1861
1901
|
id: string;
|
|
1862
|
-
entry: string[];
|
|
1863
1902
|
nodes: Record<string, {
|
|
1864
|
-
type: "
|
|
1903
|
+
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
1904
|
id: string;
|
|
1866
1905
|
config: Record<string, unknown>;
|
|
1867
1906
|
out: {
|
|
1868
1907
|
to: string;
|
|
1869
|
-
condition?: string | undefined;
|
|
1870
1908
|
sourceHandle?: string | undefined;
|
|
1871
1909
|
label?: string | undefined;
|
|
1910
|
+
condition?: string | undefined;
|
|
1872
1911
|
}[];
|
|
1873
1912
|
}>;
|
|
1913
|
+
v: 1;
|
|
1914
|
+
entry: string[];
|
|
1874
1915
|
completionGate: {
|
|
1875
1916
|
requiredFields: string[];
|
|
1876
1917
|
};
|
|
@@ -2111,21 +2152,6 @@ declare class FormsClient {
|
|
|
2111
2152
|
}>;
|
|
2112
2153
|
}
|
|
2113
2154
|
|
|
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
2155
|
declare class PlansClient {
|
|
2130
2156
|
private readonly transport;
|
|
2131
2157
|
constructor(transport: Transport);
|
|
@@ -2167,8 +2193,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2167
2193
|
baseUrl: string;
|
|
2168
2194
|
}>>>;
|
|
2169
2195
|
}, "strip", z.ZodTypeAny, {
|
|
2170
|
-
id: string;
|
|
2171
2196
|
enabled: boolean;
|
|
2197
|
+
id: string;
|
|
2172
2198
|
mode: "tunnel" | "direct";
|
|
2173
2199
|
defaultModel: string | null;
|
|
2174
2200
|
connectionId: string | null;
|
|
@@ -2178,8 +2204,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2178
2204
|
baseUrl: string;
|
|
2179
2205
|
} | null | undefined;
|
|
2180
2206
|
}, {
|
|
2181
|
-
id: string;
|
|
2182
2207
|
enabled: boolean;
|
|
2208
|
+
id: string;
|
|
2183
2209
|
mode: "tunnel" | "direct";
|
|
2184
2210
|
defaultModel: string | null;
|
|
2185
2211
|
connectionId: string | null;
|
|
@@ -2191,8 +2217,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2191
2217
|
}>;
|
|
2192
2218
|
}, "strip", z.ZodTypeAny, {
|
|
2193
2219
|
connector: {
|
|
2194
|
-
id: string;
|
|
2195
2220
|
enabled: boolean;
|
|
2221
|
+
id: string;
|
|
2196
2222
|
mode: "tunnel" | "direct";
|
|
2197
2223
|
defaultModel: string | null;
|
|
2198
2224
|
connectionId: string | null;
|
|
@@ -2204,8 +2230,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2204
2230
|
};
|
|
2205
2231
|
}, {
|
|
2206
2232
|
connector: {
|
|
2207
|
-
id: string;
|
|
2208
2233
|
enabled: boolean;
|
|
2234
|
+
id: string;
|
|
2209
2235
|
mode: "tunnel" | "direct";
|
|
2210
2236
|
defaultModel: string | null;
|
|
2211
2237
|
connectionId: string | null;
|
|
@@ -2267,14 +2293,6 @@ declare function mergeMetadata(user: Record<string, unknown> | undefined, defaul
|
|
|
2267
2293
|
type ShorthandPrimitive = 'string' | 'number' | 'boolean';
|
|
2268
2294
|
/** What the user passes for a tool's input shape. */
|
|
2269
2295
|
type ToolInputShape = Record<string, ShorthandPrimitive> | z.ZodTypeAny;
|
|
2270
|
-
interface ToolDefinition<I = unknown, R = unknown> {
|
|
2271
|
-
readonly description: string;
|
|
2272
|
-
readonly input: ToolInputShape;
|
|
2273
|
-
/** Implementation. Receives parsed input and the agent context. */
|
|
2274
|
-
readonly run: (input: I, ctx: AgentContext) => Promise<R> | R;
|
|
2275
|
-
/** Capability required for Action Guard. Defaults to `tool.<name>`. */
|
|
2276
|
-
readonly capability?: string;
|
|
2277
|
-
}
|
|
2278
2296
|
|
|
2279
2297
|
interface ResendCredentials {
|
|
2280
2298
|
/** Resend API key — find under "API Keys" in the Resend dashboard. */
|
|
@@ -2315,8 +2333,8 @@ interface FormToolsOptions {
|
|
|
2315
2333
|
* platform receives a structured log event after the send instead.
|
|
2316
2334
|
*
|
|
2317
2335
|
* When omitted, sendFormLink falls back to the platform's email path
|
|
2318
|
-
* (POST /v1/forms with `sendEmail` block)
|
|
2319
|
-
*
|
|
2336
|
+
* (POST /v1/forms with `sendEmail` block): VoiceLayer's email (Amazon
|
|
2337
|
+
* SES), metered to your workspace.
|
|
2320
2338
|
*/
|
|
2321
2339
|
readonly resend?: ResendCredentials;
|
|
2322
2340
|
}
|
|
@@ -2557,7 +2575,7 @@ interface CompiledAgentParts {
|
|
|
2557
2575
|
readonly triggers?: Record<string, TriggerDefinition>;
|
|
2558
2576
|
readonly handoff?: HandoffConfig;
|
|
2559
2577
|
readonly memory?: MemoryConfig;
|
|
2560
|
-
readonly tools?: Record<string, ToolDefinition
|
|
2578
|
+
readonly tools?: Record<string, ToolDefinition>;
|
|
2561
2579
|
/** Voice turn-taking from the flow's speech capability (schema.speech →
|
|
2562
2580
|
* AgentConfig.speech → applySpeechTurnHandling). */
|
|
2563
2581
|
readonly speech?: SpeechConfig;
|
|
@@ -2703,7 +2721,9 @@ declare abstract class BaseTool<I = unknown, R = unknown> {
|
|
|
2703
2721
|
abstract readonly description: string;
|
|
2704
2722
|
abstract readonly input: ToolInputShape;
|
|
2705
2723
|
readonly capability?: string;
|
|
2706
|
-
|
|
2724
|
+
/** `false`: this tool gets the call's PII tokens, not the caller's real values (see ToolDefinition.sendRealValues). */
|
|
2725
|
+
readonly sendRealValues?: boolean;
|
|
2726
|
+
abstract run(input: I, ctx: AgentContext, info?: ToolRunInfo): Promise<R> | R;
|
|
2707
2727
|
/** The ToolDefinition the runtime consumes. */
|
|
2708
2728
|
toDefinition(): ToolDefinition<I, R>;
|
|
2709
2729
|
/** `{ [name]: definition }` — spread straight into `defineAgent({ tools })`. */
|
|
@@ -2715,7 +2735,9 @@ declare function defineTool<I = unknown, R = unknown>(spec: {
|
|
|
2715
2735
|
readonly description: string;
|
|
2716
2736
|
readonly input: ToolInputShape;
|
|
2717
2737
|
readonly capability?: string;
|
|
2718
|
-
|
|
2738
|
+
/** `false`: this tool gets the call's PII tokens, not the caller's real values (see ToolDefinition.sendRealValues). */
|
|
2739
|
+
readonly sendRealValues?: boolean;
|
|
2740
|
+
readonly run: (input: I, ctx: AgentContext, info?: ToolRunInfo) => Promise<R> | R;
|
|
2719
2741
|
}): Record<string, ToolDefinition>;
|
|
2720
2742
|
interface HttpToolResult {
|
|
2721
2743
|
readonly ok: boolean;
|
|
@@ -2746,17 +2768,13 @@ interface HttpToolSpec {
|
|
|
2746
2768
|
* sets it, and its server-side executor has no such switch.
|
|
2747
2769
|
*/
|
|
2748
2770
|
readonly allowPrivateNetwork?: boolean;
|
|
2771
|
+
/**
|
|
2772
|
+
* The model reads the caller's PII as tokens (`<PII_PHONE_1>`). `true`: this endpoint gets the caller's real values
|
|
2773
|
+
* instead — only when `url` fixes the host (a `{placeholder}` in the host keeps the tokens), and a redirect to another
|
|
2774
|
+
* origin is then refused. Otherwise it gets the tokens. (burn-down G-33 — test/tool-detokenise.test.ts)
|
|
2775
|
+
*/
|
|
2776
|
+
readonly sendRealValues?: boolean;
|
|
2749
2777
|
}
|
|
2750
|
-
/**
|
|
2751
|
-
* A config-only HTTP tool — no subclass needed for the common "call an API"
|
|
2752
|
-
* case. Use this for public/no-auth endpoints (e.g. an n8n webhook). Secrets
|
|
2753
|
-
* should NOT be inlined here; vault-backed credentials resolve server-side.
|
|
2754
|
-
*
|
|
2755
|
-
* Safe by default (runtime/safe-fetch.ts): http(s) only, never a private /
|
|
2756
|
-
* loopback / link-local / metadata address (checked again after DNS and on every
|
|
2757
|
-
* redirect hop), a timeout, and a capped body. A refused request is a failed
|
|
2758
|
-
* result `{ ok: false, status: 0, data: { kind: 'blocked', reason } }`, never a throw.
|
|
2759
|
-
*/
|
|
2760
2778
|
declare function httpTool(spec: HttpToolSpec): Record<string, ToolDefinition>;
|
|
2761
2779
|
|
|
2762
|
-
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
|
|
2780
|
+
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 };
|