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