@voicelayer/sdk 0.6.1 → 0.6.3
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 +155 -162
- package/dist/index.d.ts +706 -258
- package/dist/index.js +1735 -909
- package/dist/runtime/text-session.d.ts +1 -1
- package/dist/runtime/text-session.js +646 -271
- package/dist/{text-session-C4Z59gG4.d.ts → text-session-B928dhkB.d.ts} +116 -110
- package/package.json +7 -7
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, 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-
|
|
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-
|
|
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-B928dhkB.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-B928dhkB.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"]>;
|
|
@@ -406,12 +406,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
406
406
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
407
407
|
}, "strip", z.ZodTypeAny, {
|
|
408
408
|
url: string;
|
|
409
|
-
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, {
|
|
@@ -427,14 +427,14 @@ declare const CallPlan: z.ZodObject<{
|
|
|
427
427
|
completeWhen: "all-required-captured" | "all-captured";
|
|
428
428
|
backendAck?: {
|
|
429
429
|
url: string;
|
|
430
|
-
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
440
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -450,6 +450,58 @@ declare const CallPlan: z.ZodObject<{
|
|
|
450
450
|
}>>>;
|
|
451
451
|
tags: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
452
452
|
brainConnectorId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
453
|
+
callLimits: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
454
|
+
maxDurationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
455
|
+
wrapUpWarningSeconds: z.ZodOptional<z.ZodNumber>;
|
|
456
|
+
wrapUpMessage: z.ZodOptional<z.ZodString>;
|
|
457
|
+
goodbyeMessage: z.ZodOptional<z.ZodString>;
|
|
458
|
+
callerRateLimit: z.ZodOptional<z.ZodObject<{
|
|
459
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
perTenMinutes: z.ZodOptional<z.ZodNumber>;
|
|
461
|
+
perDay: z.ZodOptional<z.ZodNumber>;
|
|
462
|
+
withheldPerTenMinutes: z.ZodOptional<z.ZodNumber>;
|
|
463
|
+
withheldPerDay: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
}, "strip", z.ZodTypeAny, {
|
|
465
|
+
enabled?: boolean | undefined;
|
|
466
|
+
perTenMinutes?: number | undefined;
|
|
467
|
+
perDay?: number | undefined;
|
|
468
|
+
withheldPerTenMinutes?: number | undefined;
|
|
469
|
+
withheldPerDay?: number | undefined;
|
|
470
|
+
}, {
|
|
471
|
+
enabled?: boolean | undefined;
|
|
472
|
+
perTenMinutes?: number | undefined;
|
|
473
|
+
perDay?: number | undefined;
|
|
474
|
+
withheldPerTenMinutes?: number | undefined;
|
|
475
|
+
withheldPerDay?: number | undefined;
|
|
476
|
+
}>>;
|
|
477
|
+
rateLimitedMessage: z.ZodOptional<z.ZodString>;
|
|
478
|
+
}, "strip", z.ZodTypeAny, {
|
|
479
|
+
maxDurationMinutes?: number | undefined;
|
|
480
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
481
|
+
wrapUpMessage?: string | undefined;
|
|
482
|
+
goodbyeMessage?: string | undefined;
|
|
483
|
+
callerRateLimit?: {
|
|
484
|
+
enabled?: boolean | undefined;
|
|
485
|
+
perTenMinutes?: number | undefined;
|
|
486
|
+
perDay?: number | undefined;
|
|
487
|
+
withheldPerTenMinutes?: number | undefined;
|
|
488
|
+
withheldPerDay?: number | undefined;
|
|
489
|
+
} | undefined;
|
|
490
|
+
rateLimitedMessage?: string | undefined;
|
|
491
|
+
}, {
|
|
492
|
+
maxDurationMinutes?: number | undefined;
|
|
493
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
494
|
+
wrapUpMessage?: string | undefined;
|
|
495
|
+
goodbyeMessage?: string | undefined;
|
|
496
|
+
callerRateLimit?: {
|
|
497
|
+
enabled?: boolean | undefined;
|
|
498
|
+
perTenMinutes?: number | undefined;
|
|
499
|
+
perDay?: number | undefined;
|
|
500
|
+
withheldPerTenMinutes?: number | undefined;
|
|
501
|
+
withheldPerDay?: number | undefined;
|
|
502
|
+
} | undefined;
|
|
503
|
+
rateLimitedMessage?: string | undefined;
|
|
504
|
+
}>>>;
|
|
453
505
|
modeLocked: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
454
506
|
requiredInfo: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
455
507
|
name: z.ZodString;
|
|
@@ -472,6 +524,27 @@ declare const CallPlan: z.ZodObject<{
|
|
|
472
524
|
}>, "many">>>;
|
|
473
525
|
draftUpdatedAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
474
526
|
}, "strip", z.ZodTypeAny, {
|
|
527
|
+
stt?: {
|
|
528
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
529
|
+
model?: string | undefined;
|
|
530
|
+
language?: string | undefined;
|
|
531
|
+
endOfTurnConfidence?: number | undefined;
|
|
532
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
533
|
+
keywords?: string[] | undefined;
|
|
534
|
+
} | undefined;
|
|
535
|
+
realtime?: {
|
|
536
|
+
provider: "openai" | "google";
|
|
537
|
+
model: string;
|
|
538
|
+
voice?: string | undefined;
|
|
539
|
+
temperature?: number | undefined;
|
|
540
|
+
} | undefined;
|
|
541
|
+
voice?: {
|
|
542
|
+
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
543
|
+
voiceId: string;
|
|
544
|
+
model?: string | undefined;
|
|
545
|
+
rate?: number | undefined;
|
|
546
|
+
} | undefined;
|
|
547
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
475
548
|
name?: string | undefined;
|
|
476
549
|
triggers?: Record<string, {
|
|
477
550
|
then: {
|
|
@@ -483,12 +556,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
483
556
|
kind: "say";
|
|
484
557
|
};
|
|
485
558
|
on: {
|
|
486
|
-
pattern: string;
|
|
487
559
|
kind: "regex";
|
|
560
|
+
pattern: string;
|
|
488
561
|
flags?: string | undefined;
|
|
489
562
|
} | {
|
|
490
|
-
name: string;
|
|
491
563
|
kind: "signal";
|
|
564
|
+
name: string;
|
|
492
565
|
};
|
|
493
566
|
onlyWhile?: string | undefined;
|
|
494
567
|
}> | undefined;
|
|
@@ -496,27 +569,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
496
569
|
toolName: string;
|
|
497
570
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
498
571
|
}[] | undefined;
|
|
499
|
-
stt?: {
|
|
500
|
-
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
501
|
-
model?: string | undefined;
|
|
502
|
-
language?: string | undefined;
|
|
503
|
-
endOfTurnConfidence?: number | undefined;
|
|
504
|
-
endOfTurnTimeoutMs?: number | undefined;
|
|
505
|
-
keywords?: string[] | undefined;
|
|
506
|
-
} | undefined;
|
|
507
|
-
realtime?: {
|
|
508
|
-
provider: "openai" | "google";
|
|
509
|
-
model: string;
|
|
510
|
-
voice?: string | undefined;
|
|
511
|
-
temperature?: number | undefined;
|
|
512
|
-
} | undefined;
|
|
513
|
-
voice?: {
|
|
514
|
-
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
515
|
-
voiceId: string;
|
|
516
|
-
model?: string | undefined;
|
|
517
|
-
rate?: number | undefined;
|
|
518
|
-
} | undefined;
|
|
519
|
-
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
520
572
|
mode?: "realtime" | "cascade" | undefined;
|
|
521
573
|
model?: {
|
|
522
574
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -556,12 +608,26 @@ declare const CallPlan: z.ZodObject<{
|
|
|
556
608
|
completeWhen: "all-required-captured" | "all-captured";
|
|
557
609
|
backendAck?: {
|
|
558
610
|
url: string;
|
|
559
|
-
timeoutMs?: number | undefined;
|
|
560
611
|
headers?: Record<string, string> | undefined;
|
|
612
|
+
timeoutMs?: number | undefined;
|
|
561
613
|
} | undefined;
|
|
562
614
|
} | undefined;
|
|
563
615
|
tags?: string[] | undefined;
|
|
564
616
|
brainConnectorId?: string | null | undefined;
|
|
617
|
+
callLimits?: {
|
|
618
|
+
maxDurationMinutes?: number | undefined;
|
|
619
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
620
|
+
wrapUpMessage?: string | undefined;
|
|
621
|
+
goodbyeMessage?: string | undefined;
|
|
622
|
+
callerRateLimit?: {
|
|
623
|
+
enabled?: boolean | undefined;
|
|
624
|
+
perTenMinutes?: number | undefined;
|
|
625
|
+
perDay?: number | undefined;
|
|
626
|
+
withheldPerTenMinutes?: number | undefined;
|
|
627
|
+
withheldPerDay?: number | undefined;
|
|
628
|
+
} | undefined;
|
|
629
|
+
rateLimitedMessage?: string | undefined;
|
|
630
|
+
} | undefined;
|
|
565
631
|
modeLocked?: boolean | undefined;
|
|
566
632
|
requiredInfo?: {
|
|
567
633
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -572,6 +638,27 @@ declare const CallPlan: z.ZodObject<{
|
|
|
572
638
|
}[] | undefined;
|
|
573
639
|
draftUpdatedAt?: string | undefined;
|
|
574
640
|
}, {
|
|
641
|
+
stt?: {
|
|
642
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
643
|
+
model?: string | undefined;
|
|
644
|
+
language?: string | undefined;
|
|
645
|
+
endOfTurnConfidence?: number | undefined;
|
|
646
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
647
|
+
keywords?: string[] | undefined;
|
|
648
|
+
} | undefined;
|
|
649
|
+
realtime?: {
|
|
650
|
+
provider: "openai" | "google";
|
|
651
|
+
model: string;
|
|
652
|
+
voice?: string | undefined;
|
|
653
|
+
temperature?: number | undefined;
|
|
654
|
+
} | undefined;
|
|
655
|
+
voice?: {
|
|
656
|
+
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
657
|
+
voiceId: string;
|
|
658
|
+
model?: string | undefined;
|
|
659
|
+
rate?: number | undefined;
|
|
660
|
+
} | undefined;
|
|
661
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
575
662
|
name?: string | undefined;
|
|
576
663
|
triggers?: Record<string, {
|
|
577
664
|
then: {
|
|
@@ -583,12 +670,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
583
670
|
kind: "say";
|
|
584
671
|
};
|
|
585
672
|
on: {
|
|
586
|
-
pattern: string;
|
|
587
673
|
kind: "regex";
|
|
674
|
+
pattern: string;
|
|
588
675
|
flags?: string | undefined;
|
|
589
676
|
} | {
|
|
590
|
-
name: string;
|
|
591
677
|
kind: "signal";
|
|
678
|
+
name: string;
|
|
592
679
|
};
|
|
593
680
|
onlyWhile?: string | undefined;
|
|
594
681
|
}> | undefined;
|
|
@@ -596,27 +683,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
596
683
|
toolName: string;
|
|
597
684
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
598
685
|
}[] | undefined;
|
|
599
|
-
stt?: {
|
|
600
|
-
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
601
|
-
model?: string | undefined;
|
|
602
|
-
language?: string | undefined;
|
|
603
|
-
endOfTurnConfidence?: number | undefined;
|
|
604
|
-
endOfTurnTimeoutMs?: number | undefined;
|
|
605
|
-
keywords?: string[] | undefined;
|
|
606
|
-
} | undefined;
|
|
607
|
-
realtime?: {
|
|
608
|
-
provider: "openai" | "google";
|
|
609
|
-
model: string;
|
|
610
|
-
voice?: string | undefined;
|
|
611
|
-
temperature?: number | undefined;
|
|
612
|
-
} | undefined;
|
|
613
|
-
voice?: {
|
|
614
|
-
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
615
|
-
voiceId: string;
|
|
616
|
-
model?: string | undefined;
|
|
617
|
-
rate?: number | undefined;
|
|
618
|
-
} | undefined;
|
|
619
|
-
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
620
686
|
mode?: "realtime" | "cascade" | undefined;
|
|
621
687
|
model?: {
|
|
622
688
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -645,8 +711,8 @@ declare const CallPlan: z.ZodObject<{
|
|
|
645
711
|
process?: {
|
|
646
712
|
backendAck?: {
|
|
647
713
|
url: string;
|
|
648
|
-
timeoutMs?: number | undefined;
|
|
649
714
|
headers?: Record<string, string> | undefined;
|
|
715
|
+
timeoutMs?: number | undefined;
|
|
650
716
|
} | undefined;
|
|
651
717
|
collect?: Record<string, {
|
|
652
718
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -662,6 +728,20 @@ declare const CallPlan: z.ZodObject<{
|
|
|
662
728
|
} | undefined;
|
|
663
729
|
tags?: string[] | undefined;
|
|
664
730
|
brainConnectorId?: string | null | undefined;
|
|
731
|
+
callLimits?: {
|
|
732
|
+
maxDurationMinutes?: number | undefined;
|
|
733
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
734
|
+
wrapUpMessage?: string | undefined;
|
|
735
|
+
goodbyeMessage?: string | undefined;
|
|
736
|
+
callerRateLimit?: {
|
|
737
|
+
enabled?: boolean | undefined;
|
|
738
|
+
perTenMinutes?: number | undefined;
|
|
739
|
+
perDay?: number | undefined;
|
|
740
|
+
withheldPerTenMinutes?: number | undefined;
|
|
741
|
+
withheldPerDay?: number | undefined;
|
|
742
|
+
} | undefined;
|
|
743
|
+
rateLimitedMessage?: string | undefined;
|
|
744
|
+
} | undefined;
|
|
665
745
|
modeLocked?: boolean | undefined;
|
|
666
746
|
requiredInfo?: {
|
|
667
747
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -679,14 +759,14 @@ declare const CallPlan: z.ZodObject<{
|
|
|
679
759
|
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
680
760
|
deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
|
|
681
761
|
}, "strip", z.ZodTypeAny, {
|
|
682
|
-
id: string;
|
|
683
762
|
kind: "decision" | "auth" | "fact";
|
|
763
|
+
id: string;
|
|
684
764
|
prompt: string;
|
|
685
765
|
deferrableToCallee: boolean;
|
|
686
766
|
options?: string[] | undefined;
|
|
687
767
|
}, {
|
|
688
|
-
id: string;
|
|
689
768
|
kind: "decision" | "auth" | "fact";
|
|
769
|
+
id: string;
|
|
690
770
|
prompt: string;
|
|
691
771
|
options?: string[] | undefined;
|
|
692
772
|
deferrableToCallee?: boolean | undefined;
|
|
@@ -698,14 +778,14 @@ declare const CallPlan: z.ZodObject<{
|
|
|
698
778
|
options: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
699
779
|
deferrableToCallee: z.ZodDefault<z.ZodBoolean>;
|
|
700
780
|
}, "strip", z.ZodTypeAny, {
|
|
701
|
-
id: string;
|
|
702
781
|
kind: "decision" | "auth" | "fact";
|
|
782
|
+
id: string;
|
|
703
783
|
prompt: string;
|
|
704
784
|
deferrableToCallee: boolean;
|
|
705
785
|
options?: string[] | undefined;
|
|
706
786
|
}, {
|
|
707
|
-
id: string;
|
|
708
787
|
kind: "decision" | "auth" | "fact";
|
|
788
|
+
id: string;
|
|
709
789
|
prompt: string;
|
|
710
790
|
options?: string[] | undefined;
|
|
711
791
|
deferrableToCallee?: boolean | undefined;
|
|
@@ -743,6 +823,27 @@ declare const CallPlan: z.ZodObject<{
|
|
|
743
823
|
e164?: string | undefined;
|
|
744
824
|
};
|
|
745
825
|
draftConfig: {
|
|
826
|
+
stt?: {
|
|
827
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
828
|
+
model?: string | undefined;
|
|
829
|
+
language?: string | undefined;
|
|
830
|
+
endOfTurnConfidence?: number | undefined;
|
|
831
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
832
|
+
keywords?: string[] | undefined;
|
|
833
|
+
} | undefined;
|
|
834
|
+
realtime?: {
|
|
835
|
+
provider: "openai" | "google";
|
|
836
|
+
model: string;
|
|
837
|
+
voice?: string | undefined;
|
|
838
|
+
temperature?: number | undefined;
|
|
839
|
+
} | undefined;
|
|
840
|
+
voice?: {
|
|
841
|
+
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
842
|
+
voiceId: string;
|
|
843
|
+
model?: string | undefined;
|
|
844
|
+
rate?: number | undefined;
|
|
845
|
+
} | undefined;
|
|
846
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
746
847
|
name?: string | undefined;
|
|
747
848
|
triggers?: Record<string, {
|
|
748
849
|
then: {
|
|
@@ -754,12 +855,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
754
855
|
kind: "say";
|
|
755
856
|
};
|
|
756
857
|
on: {
|
|
757
|
-
pattern: string;
|
|
758
858
|
kind: "regex";
|
|
859
|
+
pattern: string;
|
|
759
860
|
flags?: string | undefined;
|
|
760
861
|
} | {
|
|
761
|
-
name: string;
|
|
762
862
|
kind: "signal";
|
|
863
|
+
name: string;
|
|
763
864
|
};
|
|
764
865
|
onlyWhile?: string | undefined;
|
|
765
866
|
}> | undefined;
|
|
@@ -767,27 +868,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
767
868
|
toolName: string;
|
|
768
869
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
769
870
|
}[] | undefined;
|
|
770
|
-
stt?: {
|
|
771
|
-
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
772
|
-
model?: string | undefined;
|
|
773
|
-
language?: string | undefined;
|
|
774
|
-
endOfTurnConfidence?: number | undefined;
|
|
775
|
-
endOfTurnTimeoutMs?: number | undefined;
|
|
776
|
-
keywords?: string[] | undefined;
|
|
777
|
-
} | undefined;
|
|
778
|
-
realtime?: {
|
|
779
|
-
provider: "openai" | "google";
|
|
780
|
-
model: string;
|
|
781
|
-
voice?: string | undefined;
|
|
782
|
-
temperature?: number | undefined;
|
|
783
|
-
} | undefined;
|
|
784
|
-
voice?: {
|
|
785
|
-
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
786
|
-
voiceId: string;
|
|
787
|
-
model?: string | undefined;
|
|
788
|
-
rate?: number | undefined;
|
|
789
|
-
} | undefined;
|
|
790
|
-
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
791
871
|
mode?: "realtime" | "cascade" | undefined;
|
|
792
872
|
model?: {
|
|
793
873
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -827,12 +907,26 @@ declare const CallPlan: z.ZodObject<{
|
|
|
827
907
|
completeWhen: "all-required-captured" | "all-captured";
|
|
828
908
|
backendAck?: {
|
|
829
909
|
url: string;
|
|
830
|
-
timeoutMs?: number | undefined;
|
|
831
910
|
headers?: Record<string, string> | undefined;
|
|
911
|
+
timeoutMs?: number | undefined;
|
|
832
912
|
} | undefined;
|
|
833
913
|
} | undefined;
|
|
834
914
|
tags?: string[] | undefined;
|
|
835
915
|
brainConnectorId?: string | null | undefined;
|
|
916
|
+
callLimits?: {
|
|
917
|
+
maxDurationMinutes?: number | undefined;
|
|
918
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
919
|
+
wrapUpMessage?: string | undefined;
|
|
920
|
+
goodbyeMessage?: string | undefined;
|
|
921
|
+
callerRateLimit?: {
|
|
922
|
+
enabled?: boolean | undefined;
|
|
923
|
+
perTenMinutes?: number | undefined;
|
|
924
|
+
perDay?: number | undefined;
|
|
925
|
+
withheldPerTenMinutes?: number | undefined;
|
|
926
|
+
withheldPerDay?: number | undefined;
|
|
927
|
+
} | undefined;
|
|
928
|
+
rateLimitedMessage?: string | undefined;
|
|
929
|
+
} | undefined;
|
|
836
930
|
modeLocked?: boolean | undefined;
|
|
837
931
|
requiredInfo?: {
|
|
838
932
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -844,15 +938,15 @@ declare const CallPlan: z.ZodObject<{
|
|
|
844
938
|
draftUpdatedAt?: string | undefined;
|
|
845
939
|
};
|
|
846
940
|
openQuestions: {
|
|
847
|
-
id: string;
|
|
848
941
|
kind: "decision" | "auth" | "fact";
|
|
942
|
+
id: string;
|
|
849
943
|
prompt: string;
|
|
850
944
|
deferrableToCallee: boolean;
|
|
851
945
|
options?: string[] | undefined;
|
|
852
946
|
}[];
|
|
853
947
|
unresolvedQuestions: {
|
|
854
|
-
id: string;
|
|
855
948
|
kind: "decision" | "auth" | "fact";
|
|
949
|
+
id: string;
|
|
856
950
|
prompt: string;
|
|
857
951
|
deferrableToCallee: boolean;
|
|
858
952
|
options?: string[] | undefined;
|
|
@@ -884,6 +978,27 @@ declare const CallPlan: z.ZodObject<{
|
|
|
884
978
|
secondary?: "ask_callee" | "fallback_phrase" | undefined;
|
|
885
979
|
};
|
|
886
980
|
draftConfig?: {
|
|
981
|
+
stt?: {
|
|
982
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
983
|
+
model?: string | undefined;
|
|
984
|
+
language?: string | undefined;
|
|
985
|
+
endOfTurnConfidence?: number | undefined;
|
|
986
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
987
|
+
keywords?: string[] | undefined;
|
|
988
|
+
} | undefined;
|
|
989
|
+
realtime?: {
|
|
990
|
+
provider: "openai" | "google";
|
|
991
|
+
model: string;
|
|
992
|
+
voice?: string | undefined;
|
|
993
|
+
temperature?: number | undefined;
|
|
994
|
+
} | undefined;
|
|
995
|
+
voice?: {
|
|
996
|
+
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
997
|
+
voiceId: string;
|
|
998
|
+
model?: string | undefined;
|
|
999
|
+
rate?: number | undefined;
|
|
1000
|
+
} | undefined;
|
|
1001
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
887
1002
|
name?: string | undefined;
|
|
888
1003
|
triggers?: Record<string, {
|
|
889
1004
|
then: {
|
|
@@ -895,12 +1010,12 @@ declare const CallPlan: z.ZodObject<{
|
|
|
895
1010
|
kind: "say";
|
|
896
1011
|
};
|
|
897
1012
|
on: {
|
|
898
|
-
pattern: string;
|
|
899
1013
|
kind: "regex";
|
|
1014
|
+
pattern: string;
|
|
900
1015
|
flags?: string | undefined;
|
|
901
1016
|
} | {
|
|
902
|
-
name: string;
|
|
903
1017
|
kind: "signal";
|
|
1018
|
+
name: string;
|
|
904
1019
|
};
|
|
905
1020
|
onlyWhile?: string | undefined;
|
|
906
1021
|
}> | undefined;
|
|
@@ -908,27 +1023,6 @@ declare const CallPlan: z.ZodObject<{
|
|
|
908
1023
|
toolName: string;
|
|
909
1024
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
910
1025
|
}[] | undefined;
|
|
911
|
-
stt?: {
|
|
912
|
-
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
913
|
-
model?: string | undefined;
|
|
914
|
-
language?: string | undefined;
|
|
915
|
-
endOfTurnConfidence?: number | undefined;
|
|
916
|
-
endOfTurnTimeoutMs?: number | undefined;
|
|
917
|
-
keywords?: string[] | undefined;
|
|
918
|
-
} | undefined;
|
|
919
|
-
realtime?: {
|
|
920
|
-
provider: "openai" | "google";
|
|
921
|
-
model: string;
|
|
922
|
-
voice?: string | undefined;
|
|
923
|
-
temperature?: number | undefined;
|
|
924
|
-
} | undefined;
|
|
925
|
-
voice?: {
|
|
926
|
-
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
927
|
-
voiceId: string;
|
|
928
|
-
model?: string | undefined;
|
|
929
|
-
rate?: number | undefined;
|
|
930
|
-
} | undefined;
|
|
931
|
-
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
932
1026
|
mode?: "realtime" | "cascade" | undefined;
|
|
933
1027
|
model?: {
|
|
934
1028
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -957,8 +1051,8 @@ declare const CallPlan: z.ZodObject<{
|
|
|
957
1051
|
process?: {
|
|
958
1052
|
backendAck?: {
|
|
959
1053
|
url: string;
|
|
960
|
-
timeoutMs?: number | undefined;
|
|
961
1054
|
headers?: Record<string, string> | undefined;
|
|
1055
|
+
timeoutMs?: number | undefined;
|
|
962
1056
|
} | undefined;
|
|
963
1057
|
collect?: Record<string, {
|
|
964
1058
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -974,6 +1068,20 @@ declare const CallPlan: z.ZodObject<{
|
|
|
974
1068
|
} | undefined;
|
|
975
1069
|
tags?: string[] | undefined;
|
|
976
1070
|
brainConnectorId?: string | null | undefined;
|
|
1071
|
+
callLimits?: {
|
|
1072
|
+
maxDurationMinutes?: number | undefined;
|
|
1073
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
1074
|
+
wrapUpMessage?: string | undefined;
|
|
1075
|
+
goodbyeMessage?: string | undefined;
|
|
1076
|
+
callerRateLimit?: {
|
|
1077
|
+
enabled?: boolean | undefined;
|
|
1078
|
+
perTenMinutes?: number | undefined;
|
|
1079
|
+
perDay?: number | undefined;
|
|
1080
|
+
withheldPerTenMinutes?: number | undefined;
|
|
1081
|
+
withheldPerDay?: number | undefined;
|
|
1082
|
+
} | undefined;
|
|
1083
|
+
rateLimitedMessage?: string | undefined;
|
|
1084
|
+
} | undefined;
|
|
977
1085
|
modeLocked?: boolean | undefined;
|
|
978
1086
|
requiredInfo?: {
|
|
979
1087
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -985,15 +1093,15 @@ declare const CallPlan: z.ZodObject<{
|
|
|
985
1093
|
draftUpdatedAt?: string | undefined;
|
|
986
1094
|
} | undefined;
|
|
987
1095
|
openQuestions?: {
|
|
988
|
-
id: string;
|
|
989
1096
|
kind: "decision" | "auth" | "fact";
|
|
1097
|
+
id: string;
|
|
990
1098
|
prompt: string;
|
|
991
1099
|
options?: string[] | undefined;
|
|
992
1100
|
deferrableToCallee?: boolean | undefined;
|
|
993
1101
|
}[] | undefined;
|
|
994
1102
|
unresolvedQuestions?: {
|
|
995
|
-
id: string;
|
|
996
1103
|
kind: "decision" | "auth" | "fact";
|
|
1104
|
+
id: string;
|
|
997
1105
|
prompt: string;
|
|
998
1106
|
options?: string[] | undefined;
|
|
999
1107
|
deferrableToCallee?: boolean | undefined;
|
|
@@ -1011,13 +1119,13 @@ declare const RelevantContext: z.ZodObject<{
|
|
|
1011
1119
|
account: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1012
1120
|
platform: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1013
1121
|
}, "strip", z.ZodTypeAny, {
|
|
1014
|
-
call: Record<string, unknown>;
|
|
1015
1122
|
caller: Record<string, unknown>;
|
|
1123
|
+
call: Record<string, unknown>;
|
|
1016
1124
|
account: Record<string, unknown>;
|
|
1017
1125
|
platform: Record<string, unknown>;
|
|
1018
1126
|
}, {
|
|
1019
|
-
call: Record<string, unknown>;
|
|
1020
1127
|
caller: Record<string, unknown>;
|
|
1128
|
+
call: Record<string, unknown>;
|
|
1021
1129
|
account: Record<string, unknown>;
|
|
1022
1130
|
platform: Record<string, unknown>;
|
|
1023
1131
|
}>;
|
|
@@ -1033,38 +1141,38 @@ declare const ResolveCallerResponse: z.ZodObject<{
|
|
|
1033
1141
|
updatedAt: z.ZodString;
|
|
1034
1142
|
}, "strip", z.ZodTypeAny, {
|
|
1035
1143
|
id: string;
|
|
1036
|
-
displayName: string | null;
|
|
1037
1144
|
projectId: string;
|
|
1038
1145
|
createdAt: string;
|
|
1039
1146
|
updatedAt: string;
|
|
1147
|
+
displayName: string | null;
|
|
1040
1148
|
metadata: Record<string, unknown>;
|
|
1041
1149
|
externalKey: string;
|
|
1042
1150
|
}, {
|
|
1043
1151
|
id: string;
|
|
1044
|
-
displayName: string | null;
|
|
1045
1152
|
projectId: string;
|
|
1046
1153
|
createdAt: string;
|
|
1047
1154
|
updatedAt: string;
|
|
1155
|
+
displayName: string | null;
|
|
1048
1156
|
metadata: Record<string, unknown>;
|
|
1049
1157
|
externalKey: string;
|
|
1050
1158
|
}>;
|
|
1051
1159
|
}, "strip", z.ZodTypeAny, {
|
|
1052
1160
|
caller: {
|
|
1053
1161
|
id: string;
|
|
1054
|
-
displayName: string | null;
|
|
1055
1162
|
projectId: string;
|
|
1056
1163
|
createdAt: string;
|
|
1057
1164
|
updatedAt: string;
|
|
1165
|
+
displayName: string | null;
|
|
1058
1166
|
metadata: Record<string, unknown>;
|
|
1059
1167
|
externalKey: string;
|
|
1060
1168
|
};
|
|
1061
1169
|
}, {
|
|
1062
1170
|
caller: {
|
|
1063
1171
|
id: string;
|
|
1064
|
-
displayName: string | null;
|
|
1065
1172
|
projectId: string;
|
|
1066
1173
|
createdAt: string;
|
|
1067
1174
|
updatedAt: string;
|
|
1175
|
+
displayName: string | null;
|
|
1068
1176
|
metadata: Record<string, unknown>;
|
|
1069
1177
|
externalKey: string;
|
|
1070
1178
|
};
|
|
@@ -1075,10 +1183,10 @@ declare const DeleteCallerResponse: z.ZodObject<{
|
|
|
1075
1183
|
scopesPurged: z.ZodArray<z.ZodEnum<["call", "caller", "account", "platform"]>, "many">;
|
|
1076
1184
|
}, "strip", z.ZodTypeAny, {
|
|
1077
1185
|
ok: true;
|
|
1078
|
-
scopesPurged: ("
|
|
1186
|
+
scopesPurged: ("caller" | "call" | "account" | "platform")[];
|
|
1079
1187
|
}, {
|
|
1080
1188
|
ok: true;
|
|
1081
|
-
scopesPurged: ("
|
|
1189
|
+
scopesPurged: ("caller" | "call" | "account" | "platform")[];
|
|
1082
1190
|
}>;
|
|
1083
1191
|
type DeleteCallerResponse = z.infer<typeof DeleteCallerResponse>;
|
|
1084
1192
|
|
|
@@ -1257,12 +1365,12 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1257
1365
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1258
1366
|
}, "strip", z.ZodTypeAny, {
|
|
1259
1367
|
url: string;
|
|
1260
|
-
timeoutMs?: number | undefined;
|
|
1261
1368
|
headers?: Record<string, string> | undefined;
|
|
1369
|
+
timeoutMs?: number | undefined;
|
|
1262
1370
|
}, {
|
|
1263
1371
|
url: string;
|
|
1264
|
-
timeoutMs?: number | undefined;
|
|
1265
1372
|
headers?: Record<string, string> | undefined;
|
|
1373
|
+
timeoutMs?: number | undefined;
|
|
1266
1374
|
}>>;
|
|
1267
1375
|
}, "strip", z.ZodTypeAny, {
|
|
1268
1376
|
collect: Record<string, {
|
|
@@ -1278,14 +1386,14 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1278
1386
|
completeWhen: "all-required-captured" | "all-captured";
|
|
1279
1387
|
backendAck?: {
|
|
1280
1388
|
url: string;
|
|
1281
|
-
timeoutMs?: number | undefined;
|
|
1282
1389
|
headers?: Record<string, string> | undefined;
|
|
1390
|
+
timeoutMs?: number | undefined;
|
|
1283
1391
|
} | undefined;
|
|
1284
1392
|
}, {
|
|
1285
1393
|
backendAck?: {
|
|
1286
1394
|
url: string;
|
|
1287
|
-
timeoutMs?: number | undefined;
|
|
1288
1395
|
headers?: Record<string, string> | undefined;
|
|
1396
|
+
timeoutMs?: number | undefined;
|
|
1289
1397
|
} | undefined;
|
|
1290
1398
|
collect?: Record<string, {
|
|
1291
1399
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -1305,22 +1413,22 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1305
1413
|
pattern: z.ZodString;
|
|
1306
1414
|
flags: z.ZodOptional<z.ZodString>;
|
|
1307
1415
|
}, "strip", z.ZodTypeAny, {
|
|
1308
|
-
pattern: string;
|
|
1309
1416
|
kind: "regex";
|
|
1417
|
+
pattern: string;
|
|
1310
1418
|
flags?: string | undefined;
|
|
1311
1419
|
}, {
|
|
1312
|
-
pattern: string;
|
|
1313
1420
|
kind: "regex";
|
|
1421
|
+
pattern: string;
|
|
1314
1422
|
flags?: string | undefined;
|
|
1315
1423
|
}>, z.ZodObject<{
|
|
1316
1424
|
kind: z.ZodLiteral<"signal">;
|
|
1317
1425
|
name: z.ZodString;
|
|
1318
1426
|
}, "strip", z.ZodTypeAny, {
|
|
1319
|
-
name: string;
|
|
1320
1427
|
kind: "signal";
|
|
1321
|
-
}, {
|
|
1322
1428
|
name: string;
|
|
1429
|
+
}, {
|
|
1323
1430
|
kind: "signal";
|
|
1431
|
+
name: string;
|
|
1324
1432
|
}>]>;
|
|
1325
1433
|
then: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1326
1434
|
kind: z.ZodLiteral<"handoff">;
|
|
@@ -1355,12 +1463,12 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1355
1463
|
kind: "say";
|
|
1356
1464
|
};
|
|
1357
1465
|
on: {
|
|
1358
|
-
pattern: string;
|
|
1359
1466
|
kind: "regex";
|
|
1467
|
+
pattern: string;
|
|
1360
1468
|
flags?: string | undefined;
|
|
1361
1469
|
} | {
|
|
1362
|
-
name: string;
|
|
1363
1470
|
kind: "signal";
|
|
1471
|
+
name: string;
|
|
1364
1472
|
};
|
|
1365
1473
|
onlyWhile?: string | undefined;
|
|
1366
1474
|
}, {
|
|
@@ -1373,17 +1481,69 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1373
1481
|
kind: "say";
|
|
1374
1482
|
};
|
|
1375
1483
|
on: {
|
|
1376
|
-
pattern: string;
|
|
1377
1484
|
kind: "regex";
|
|
1485
|
+
pattern: string;
|
|
1378
1486
|
flags?: string | undefined;
|
|
1379
1487
|
} | {
|
|
1380
|
-
name: string;
|
|
1381
1488
|
kind: "signal";
|
|
1489
|
+
name: string;
|
|
1382
1490
|
};
|
|
1383
1491
|
onlyWhile?: string | undefined;
|
|
1384
1492
|
}>>>;
|
|
1385
1493
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1386
1494
|
brainConnectorId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1495
|
+
callLimits: z.ZodOptional<z.ZodObject<{
|
|
1496
|
+
maxDurationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
1497
|
+
wrapUpWarningSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1498
|
+
wrapUpMessage: z.ZodOptional<z.ZodString>;
|
|
1499
|
+
goodbyeMessage: z.ZodOptional<z.ZodString>;
|
|
1500
|
+
callerRateLimit: z.ZodOptional<z.ZodObject<{
|
|
1501
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
1502
|
+
perTenMinutes: z.ZodOptional<z.ZodNumber>;
|
|
1503
|
+
perDay: z.ZodOptional<z.ZodNumber>;
|
|
1504
|
+
withheldPerTenMinutes: z.ZodOptional<z.ZodNumber>;
|
|
1505
|
+
withheldPerDay: z.ZodOptional<z.ZodNumber>;
|
|
1506
|
+
}, "strip", z.ZodTypeAny, {
|
|
1507
|
+
enabled?: boolean | undefined;
|
|
1508
|
+
perTenMinutes?: number | undefined;
|
|
1509
|
+
perDay?: number | undefined;
|
|
1510
|
+
withheldPerTenMinutes?: number | undefined;
|
|
1511
|
+
withheldPerDay?: number | undefined;
|
|
1512
|
+
}, {
|
|
1513
|
+
enabled?: boolean | undefined;
|
|
1514
|
+
perTenMinutes?: number | undefined;
|
|
1515
|
+
perDay?: number | undefined;
|
|
1516
|
+
withheldPerTenMinutes?: number | undefined;
|
|
1517
|
+
withheldPerDay?: number | undefined;
|
|
1518
|
+
}>>;
|
|
1519
|
+
rateLimitedMessage: z.ZodOptional<z.ZodString>;
|
|
1520
|
+
}, "strip", z.ZodTypeAny, {
|
|
1521
|
+
maxDurationMinutes?: number | undefined;
|
|
1522
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
1523
|
+
wrapUpMessage?: string | undefined;
|
|
1524
|
+
goodbyeMessage?: string | undefined;
|
|
1525
|
+
callerRateLimit?: {
|
|
1526
|
+
enabled?: boolean | undefined;
|
|
1527
|
+
perTenMinutes?: number | undefined;
|
|
1528
|
+
perDay?: number | undefined;
|
|
1529
|
+
withheldPerTenMinutes?: number | undefined;
|
|
1530
|
+
withheldPerDay?: number | undefined;
|
|
1531
|
+
} | undefined;
|
|
1532
|
+
rateLimitedMessage?: string | undefined;
|
|
1533
|
+
}, {
|
|
1534
|
+
maxDurationMinutes?: number | undefined;
|
|
1535
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
1536
|
+
wrapUpMessage?: string | undefined;
|
|
1537
|
+
goodbyeMessage?: string | undefined;
|
|
1538
|
+
callerRateLimit?: {
|
|
1539
|
+
enabled?: boolean | undefined;
|
|
1540
|
+
perTenMinutes?: number | undefined;
|
|
1541
|
+
perDay?: number | undefined;
|
|
1542
|
+
withheldPerTenMinutes?: number | undefined;
|
|
1543
|
+
withheldPerDay?: number | undefined;
|
|
1544
|
+
} | undefined;
|
|
1545
|
+
rateLimitedMessage?: string | undefined;
|
|
1546
|
+
}>>;
|
|
1387
1547
|
source: z.ZodOptional<z.ZodEnum<["sdk", "flow", "playbook", "connector"]>>;
|
|
1388
1548
|
modeLocked: z.ZodOptional<z.ZodBoolean>;
|
|
1389
1549
|
requiredInfo: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -1409,21 +1569,21 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1409
1569
|
updatedAt: z.ZodString;
|
|
1410
1570
|
draftUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
1411
1571
|
}, "strip", z.ZodTypeAny, {
|
|
1412
|
-
id: string;
|
|
1413
|
-
name: string;
|
|
1414
|
-
tools: {
|
|
1415
|
-
toolName: string;
|
|
1416
|
-
defaultArgs?: Record<string, unknown> | undefined;
|
|
1417
|
-
}[];
|
|
1418
1572
|
voice: {
|
|
1419
1573
|
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
1420
1574
|
voiceId: string;
|
|
1421
1575
|
model?: string | undefined;
|
|
1422
1576
|
rate?: number | undefined;
|
|
1423
1577
|
};
|
|
1578
|
+
id: string;
|
|
1424
1579
|
projectId: string;
|
|
1580
|
+
name: string;
|
|
1425
1581
|
createdAt: string;
|
|
1426
1582
|
updatedAt: string;
|
|
1583
|
+
tools: {
|
|
1584
|
+
toolName: string;
|
|
1585
|
+
defaultArgs?: Record<string, unknown> | undefined;
|
|
1586
|
+
}[];
|
|
1427
1587
|
mode: "realtime" | "cascade";
|
|
1428
1588
|
model: {
|
|
1429
1589
|
provider: "openai" | "anthropic" | "gemini";
|
|
@@ -1454,6 +1614,21 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1454
1614
|
enum?: string[] | undefined;
|
|
1455
1615
|
description?: string | undefined;
|
|
1456
1616
|
}[];
|
|
1617
|
+
stt?: {
|
|
1618
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
1619
|
+
model?: string | undefined;
|
|
1620
|
+
language?: string | undefined;
|
|
1621
|
+
endOfTurnConfidence?: number | undefined;
|
|
1622
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
1623
|
+
keywords?: string[] | undefined;
|
|
1624
|
+
} | undefined;
|
|
1625
|
+
realtime?: {
|
|
1626
|
+
provider: "openai" | "google";
|
|
1627
|
+
model: string;
|
|
1628
|
+
voice?: string | undefined;
|
|
1629
|
+
temperature?: number | undefined;
|
|
1630
|
+
} | undefined;
|
|
1631
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
1457
1632
|
triggers?: Record<string, {
|
|
1458
1633
|
then: {
|
|
1459
1634
|
kind: "handoff";
|
|
@@ -1464,30 +1639,15 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1464
1639
|
kind: "say";
|
|
1465
1640
|
};
|
|
1466
1641
|
on: {
|
|
1467
|
-
pattern: string;
|
|
1468
1642
|
kind: "regex";
|
|
1643
|
+
pattern: string;
|
|
1469
1644
|
flags?: string | undefined;
|
|
1470
1645
|
} | {
|
|
1471
|
-
name: string;
|
|
1472
1646
|
kind: "signal";
|
|
1647
|
+
name: string;
|
|
1473
1648
|
};
|
|
1474
1649
|
onlyWhile?: string | undefined;
|
|
1475
1650
|
}> | undefined;
|
|
1476
|
-
stt?: {
|
|
1477
|
-
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
1478
|
-
model?: string | undefined;
|
|
1479
|
-
language?: string | undefined;
|
|
1480
|
-
endOfTurnConfidence?: number | undefined;
|
|
1481
|
-
endOfTurnTimeoutMs?: number | undefined;
|
|
1482
|
-
keywords?: string[] | undefined;
|
|
1483
|
-
} | undefined;
|
|
1484
|
-
realtime?: {
|
|
1485
|
-
provider: "openai" | "google";
|
|
1486
|
-
model: string;
|
|
1487
|
-
voice?: string | undefined;
|
|
1488
|
-
temperature?: number | undefined;
|
|
1489
|
-
} | undefined;
|
|
1490
|
-
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
1491
1651
|
systemPrompt?: string | undefined;
|
|
1492
1652
|
routingInstructions?: string | undefined;
|
|
1493
1653
|
process?: {
|
|
@@ -1504,24 +1664,38 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1504
1664
|
completeWhen: "all-required-captured" | "all-captured";
|
|
1505
1665
|
backendAck?: {
|
|
1506
1666
|
url: string;
|
|
1507
|
-
timeoutMs?: number | undefined;
|
|
1508
1667
|
headers?: Record<string, string> | undefined;
|
|
1668
|
+
timeoutMs?: number | undefined;
|
|
1509
1669
|
} | undefined;
|
|
1510
1670
|
} | undefined;
|
|
1511
1671
|
tags?: string[] | undefined;
|
|
1512
1672
|
brainConnectorId?: string | null | undefined;
|
|
1673
|
+
callLimits?: {
|
|
1674
|
+
maxDurationMinutes?: number | undefined;
|
|
1675
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
1676
|
+
wrapUpMessage?: string | undefined;
|
|
1677
|
+
goodbyeMessage?: string | undefined;
|
|
1678
|
+
callerRateLimit?: {
|
|
1679
|
+
enabled?: boolean | undefined;
|
|
1680
|
+
perTenMinutes?: number | undefined;
|
|
1681
|
+
perDay?: number | undefined;
|
|
1682
|
+
withheldPerTenMinutes?: number | undefined;
|
|
1683
|
+
withheldPerDay?: number | undefined;
|
|
1684
|
+
} | undefined;
|
|
1685
|
+
rateLimitedMessage?: string | undefined;
|
|
1686
|
+
} | undefined;
|
|
1513
1687
|
modeLocked?: boolean | undefined;
|
|
1514
1688
|
draftUpdatedAt?: string | undefined;
|
|
1515
1689
|
}, {
|
|
1516
|
-
id: string;
|
|
1517
|
-
name: string;
|
|
1518
1690
|
voice: {
|
|
1519
1691
|
provider: "deepgram" | "elevenlabs" | "openai" | "cartesia";
|
|
1520
1692
|
voiceId: string;
|
|
1521
1693
|
model?: string | undefined;
|
|
1522
1694
|
rate?: number | undefined;
|
|
1523
1695
|
};
|
|
1696
|
+
id: string;
|
|
1524
1697
|
projectId: string;
|
|
1698
|
+
name: string;
|
|
1525
1699
|
createdAt: string;
|
|
1526
1700
|
updatedAt: string;
|
|
1527
1701
|
model: {
|
|
@@ -1545,6 +1719,21 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1545
1719
|
normal?: number | undefined;
|
|
1546
1720
|
} | undefined;
|
|
1547
1721
|
};
|
|
1722
|
+
stt?: {
|
|
1723
|
+
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
1724
|
+
model?: string | undefined;
|
|
1725
|
+
language?: string | undefined;
|
|
1726
|
+
endOfTurnConfidence?: number | undefined;
|
|
1727
|
+
endOfTurnTimeoutMs?: number | undefined;
|
|
1728
|
+
keywords?: string[] | undefined;
|
|
1729
|
+
} | undefined;
|
|
1730
|
+
realtime?: {
|
|
1731
|
+
provider: "openai" | "google";
|
|
1732
|
+
model: string;
|
|
1733
|
+
voice?: string | undefined;
|
|
1734
|
+
temperature?: number | undefined;
|
|
1735
|
+
} | undefined;
|
|
1736
|
+
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
1548
1737
|
triggers?: Record<string, {
|
|
1549
1738
|
then: {
|
|
1550
1739
|
kind: "handoff";
|
|
@@ -1555,12 +1744,12 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1555
1744
|
kind: "say";
|
|
1556
1745
|
};
|
|
1557
1746
|
on: {
|
|
1558
|
-
pattern: string;
|
|
1559
1747
|
kind: "regex";
|
|
1748
|
+
pattern: string;
|
|
1560
1749
|
flags?: string | undefined;
|
|
1561
1750
|
} | {
|
|
1562
|
-
name: string;
|
|
1563
1751
|
kind: "signal";
|
|
1752
|
+
name: string;
|
|
1564
1753
|
};
|
|
1565
1754
|
onlyWhile?: string | undefined;
|
|
1566
1755
|
}> | undefined;
|
|
@@ -1568,21 +1757,6 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1568
1757
|
toolName: string;
|
|
1569
1758
|
defaultArgs?: Record<string, unknown> | undefined;
|
|
1570
1759
|
}[] | undefined;
|
|
1571
|
-
stt?: {
|
|
1572
|
-
provider: "deepgram" | "cartesia" | "assemblyai";
|
|
1573
|
-
model?: string | undefined;
|
|
1574
|
-
language?: string | undefined;
|
|
1575
|
-
endOfTurnConfidence?: number | undefined;
|
|
1576
|
-
endOfTurnTimeoutMs?: number | undefined;
|
|
1577
|
-
keywords?: string[] | undefined;
|
|
1578
|
-
} | undefined;
|
|
1579
|
-
realtime?: {
|
|
1580
|
-
provider: "openai" | "google";
|
|
1581
|
-
model: string;
|
|
1582
|
-
voice?: string | undefined;
|
|
1583
|
-
temperature?: number | undefined;
|
|
1584
|
-
} | undefined;
|
|
1585
|
-
source?: "playbook" | "sdk" | "flow" | "connector" | undefined;
|
|
1586
1760
|
mode?: "realtime" | "cascade" | undefined;
|
|
1587
1761
|
language?: string | undefined;
|
|
1588
1762
|
systemPrompt?: string | undefined;
|
|
@@ -1590,8 +1764,8 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1590
1764
|
process?: {
|
|
1591
1765
|
backendAck?: {
|
|
1592
1766
|
url: string;
|
|
1593
|
-
timeoutMs?: number | undefined;
|
|
1594
1767
|
headers?: Record<string, string> | undefined;
|
|
1768
|
+
timeoutMs?: number | undefined;
|
|
1595
1769
|
} | undefined;
|
|
1596
1770
|
collect?: Record<string, {
|
|
1597
1771
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -1607,6 +1781,20 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1607
1781
|
} | undefined;
|
|
1608
1782
|
tags?: string[] | undefined;
|
|
1609
1783
|
brainConnectorId?: string | null | undefined;
|
|
1784
|
+
callLimits?: {
|
|
1785
|
+
maxDurationMinutes?: number | undefined;
|
|
1786
|
+
wrapUpWarningSeconds?: number | undefined;
|
|
1787
|
+
wrapUpMessage?: string | undefined;
|
|
1788
|
+
goodbyeMessage?: string | undefined;
|
|
1789
|
+
callerRateLimit?: {
|
|
1790
|
+
enabled?: boolean | undefined;
|
|
1791
|
+
perTenMinutes?: number | undefined;
|
|
1792
|
+
perDay?: number | undefined;
|
|
1793
|
+
withheldPerTenMinutes?: number | undefined;
|
|
1794
|
+
withheldPerDay?: number | undefined;
|
|
1795
|
+
} | undefined;
|
|
1796
|
+
rateLimitedMessage?: string | undefined;
|
|
1797
|
+
} | undefined;
|
|
1610
1798
|
modeLocked?: boolean | undefined;
|
|
1611
1799
|
requiredInfo?: {
|
|
1612
1800
|
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
@@ -1619,9 +1807,246 @@ declare const AgentConfig: z.ZodObject<{
|
|
|
1619
1807
|
}>;
|
|
1620
1808
|
type AgentConfig = z.infer<typeof AgentConfig>;
|
|
1621
1809
|
|
|
1622
|
-
|
|
1810
|
+
/** POST /v1/calls/:id/finalize — sent once, at the session's close, after the worker's last write for the call. */
|
|
1811
|
+
declare const CallFinalizeInput: z.ZodEffects<z.ZodObject<{
|
|
1812
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
1813
|
+
name: z.ZodString;
|
|
1814
|
+
type: z.ZodEnum<["string", "string[]", "number", "boolean", "datetime", "email", "phone"]>;
|
|
1815
|
+
required: z.ZodBoolean;
|
|
1816
|
+
filled: z.ZodBoolean;
|
|
1817
|
+
value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">, z.ZodNull]>;
|
|
1818
|
+
}, "strip", z.ZodTypeAny, {
|
|
1819
|
+
value: string | number | boolean | string[] | null;
|
|
1820
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1821
|
+
name: string;
|
|
1822
|
+
required: boolean;
|
|
1823
|
+
filled: boolean;
|
|
1824
|
+
}, {
|
|
1825
|
+
value: string | number | boolean | string[] | null;
|
|
1826
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1827
|
+
name: string;
|
|
1828
|
+
required: boolean;
|
|
1829
|
+
filled: boolean;
|
|
1830
|
+
}>, "many">;
|
|
1831
|
+
}, "strip", z.ZodTypeAny, {
|
|
1832
|
+
fields: {
|
|
1833
|
+
value: string | number | boolean | string[] | null;
|
|
1834
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1835
|
+
name: string;
|
|
1836
|
+
required: boolean;
|
|
1837
|
+
filled: boolean;
|
|
1838
|
+
}[];
|
|
1839
|
+
}, {
|
|
1840
|
+
fields: {
|
|
1841
|
+
value: string | number | boolean | string[] | null;
|
|
1842
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1843
|
+
name: string;
|
|
1844
|
+
required: boolean;
|
|
1845
|
+
filled: boolean;
|
|
1846
|
+
}[];
|
|
1847
|
+
}>, {
|
|
1848
|
+
fields: {
|
|
1849
|
+
value: string | number | boolean | string[] | null;
|
|
1850
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1851
|
+
name: string;
|
|
1852
|
+
required: boolean;
|
|
1853
|
+
filled: boolean;
|
|
1854
|
+
}[];
|
|
1855
|
+
}, {
|
|
1856
|
+
fields: {
|
|
1857
|
+
value: string | number | boolean | string[] | null;
|
|
1858
|
+
type: "string" | "number" | "boolean" | "email" | "string[]" | "datetime" | "phone";
|
|
1859
|
+
name: string;
|
|
1860
|
+
required: boolean;
|
|
1861
|
+
filled: boolean;
|
|
1862
|
+
}[];
|
|
1863
|
+
}>;
|
|
1864
|
+
type CallFinalizeInput = z.infer<typeof CallFinalizeInput>;
|
|
1865
|
+
|
|
1866
|
+
declare const FLOW_BOOT_FAILURES: readonly ["schema_fetch_failed", "no_process_schema", "missing_agent_id", "no_api_key", "worker_identity_refused", "provider_unavailable"];
|
|
1867
|
+
type FlowBootFailure = (typeof FLOW_BOOT_FAILURES)[number];
|
|
1868
|
+
type AgentEndReasonValue = `flow_boot:${FlowBootFailure}` | 'max_duration';
|
|
1869
|
+
declare const AgentEndReason: z.ZodEnum<[AgentEndReasonValue, ...AgentEndReasonValue[]]>;
|
|
1623
1870
|
type AgentEndReason = z.infer<typeof AgentEndReason>;
|
|
1624
1871
|
|
|
1872
|
+
declare const CallAdmissionRequest: z.ZodObject<{
|
|
1873
|
+
roomName: z.ZodString;
|
|
1874
|
+
/** From the dispatch metadata: lets the API admit (gate) a room whose call row doesn't exist yet. */
|
|
1875
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
1876
|
+
phoneNumberId: z.ZodOptional<z.ZodString>;
|
|
1877
|
+
caller: z.ZodObject<{
|
|
1878
|
+
channel: z.ZodEnum<["phone", "web"]>;
|
|
1879
|
+
/** The caller's number as the carrier presented it; null / absent / not E.164 ⇒ the withheld bucket. */
|
|
1880
|
+
number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1881
|
+
}, "strip", z.ZodTypeAny, {
|
|
1882
|
+
channel: "phone" | "web";
|
|
1883
|
+
number?: string | null | undefined;
|
|
1884
|
+
}, {
|
|
1885
|
+
channel: "phone" | "web";
|
|
1886
|
+
number?: string | null | undefined;
|
|
1887
|
+
}>;
|
|
1888
|
+
}, "strip", z.ZodTypeAny, {
|
|
1889
|
+
caller: {
|
|
1890
|
+
channel: "phone" | "web";
|
|
1891
|
+
number?: string | null | undefined;
|
|
1892
|
+
};
|
|
1893
|
+
roomName: string;
|
|
1894
|
+
agentId?: string | undefined;
|
|
1895
|
+
phoneNumberId?: string | undefined;
|
|
1896
|
+
}, {
|
|
1897
|
+
caller: {
|
|
1898
|
+
channel: "phone" | "web";
|
|
1899
|
+
number?: string | null | undefined;
|
|
1900
|
+
};
|
|
1901
|
+
roomName: string;
|
|
1902
|
+
agentId?: string | undefined;
|
|
1903
|
+
phoneNumberId?: string | undefined;
|
|
1904
|
+
}>;
|
|
1905
|
+
type CallAdmissionRequest = z.infer<typeof CallAdmissionRequest>;
|
|
1906
|
+
declare const CallAdmissionResponse: z.ZodDiscriminatedUnion<"admitted", [z.ZodObject<{
|
|
1907
|
+
admitted: z.ZodLiteral<true>;
|
|
1908
|
+
limits: z.ZodObject<{
|
|
1909
|
+
/** The agent's own ceiling (already clamped to the plan), or null when it set none. */
|
|
1910
|
+
agentMaxSeconds: z.ZodNullable<z.ZodNumber>;
|
|
1911
|
+
/** The plan ceiling — the platform bound no call outlives. */
|
|
1912
|
+
ceilingSeconds: z.ZodNumber;
|
|
1913
|
+
wrapUpWarningSeconds: z.ZodNumber;
|
|
1914
|
+
wrapUpMessage: z.ZodString;
|
|
1915
|
+
goodbyeMessage: z.ZodString;
|
|
1916
|
+
}, "strip", z.ZodTypeAny, {
|
|
1917
|
+
wrapUpWarningSeconds: number;
|
|
1918
|
+
wrapUpMessage: string;
|
|
1919
|
+
goodbyeMessage: string;
|
|
1920
|
+
agentMaxSeconds: number | null;
|
|
1921
|
+
ceilingSeconds: number;
|
|
1922
|
+
}, {
|
|
1923
|
+
wrapUpWarningSeconds: number;
|
|
1924
|
+
wrapUpMessage: string;
|
|
1925
|
+
goodbyeMessage: string;
|
|
1926
|
+
agentMaxSeconds: number | null;
|
|
1927
|
+
ceilingSeconds: number;
|
|
1928
|
+
}>;
|
|
1929
|
+
}, "strip", z.ZodTypeAny, {
|
|
1930
|
+
admitted: true;
|
|
1931
|
+
limits: {
|
|
1932
|
+
wrapUpWarningSeconds: number;
|
|
1933
|
+
wrapUpMessage: string;
|
|
1934
|
+
goodbyeMessage: string;
|
|
1935
|
+
agentMaxSeconds: number | null;
|
|
1936
|
+
ceilingSeconds: number;
|
|
1937
|
+
};
|
|
1938
|
+
}, {
|
|
1939
|
+
admitted: true;
|
|
1940
|
+
limits: {
|
|
1941
|
+
wrapUpWarningSeconds: number;
|
|
1942
|
+
wrapUpMessage: string;
|
|
1943
|
+
goodbyeMessage: string;
|
|
1944
|
+
agentMaxSeconds: number | null;
|
|
1945
|
+
ceilingSeconds: number;
|
|
1946
|
+
};
|
|
1947
|
+
}>, z.ZodObject<{
|
|
1948
|
+
admitted: z.ZodLiteral<false>;
|
|
1949
|
+
/** 'rate_limited:caller' | 'inbound_refused:<code>' — already recorded as the call's end reason. */
|
|
1950
|
+
endReason: z.ZodString;
|
|
1951
|
+
/** The fixed line to speak before hanging up. */
|
|
1952
|
+
message: z.ZodString;
|
|
1953
|
+
}, "strip", z.ZodTypeAny, {
|
|
1954
|
+
message: string;
|
|
1955
|
+
admitted: false;
|
|
1956
|
+
endReason: string;
|
|
1957
|
+
}, {
|
|
1958
|
+
message: string;
|
|
1959
|
+
admitted: false;
|
|
1960
|
+
endReason: string;
|
|
1961
|
+
}>]>;
|
|
1962
|
+
type CallAdmissionResponse = z.infer<typeof CallAdmissionResponse>;
|
|
1963
|
+
|
|
1964
|
+
declare const PipelineKeys: z.ZodObject<{
|
|
1965
|
+
llm: z.ZodOptional<z.ZodObject<{
|
|
1966
|
+
/** The provider as the slot reports it (LiveKit's label: `openai`, `api.openai.com`, `Deepgram`, …). */
|
|
1967
|
+
provider: z.ZodString;
|
|
1968
|
+
/** true = the workspace's own key built it; false = the platform's. */
|
|
1969
|
+
byok: z.ZodBoolean;
|
|
1970
|
+
}, "strip", z.ZodTypeAny, {
|
|
1971
|
+
provider: string;
|
|
1972
|
+
byok: boolean;
|
|
1973
|
+
}, {
|
|
1974
|
+
provider: string;
|
|
1975
|
+
byok: boolean;
|
|
1976
|
+
}>>;
|
|
1977
|
+
stt: z.ZodOptional<z.ZodObject<{
|
|
1978
|
+
/** The provider as the slot reports it (LiveKit's label: `openai`, `api.openai.com`, `Deepgram`, …). */
|
|
1979
|
+
provider: z.ZodString;
|
|
1980
|
+
/** true = the workspace's own key built it; false = the platform's. */
|
|
1981
|
+
byok: z.ZodBoolean;
|
|
1982
|
+
}, "strip", z.ZodTypeAny, {
|
|
1983
|
+
provider: string;
|
|
1984
|
+
byok: boolean;
|
|
1985
|
+
}, {
|
|
1986
|
+
provider: string;
|
|
1987
|
+
byok: boolean;
|
|
1988
|
+
}>>;
|
|
1989
|
+
tts: z.ZodOptional<z.ZodObject<{
|
|
1990
|
+
/** The provider as the slot reports it (LiveKit's label: `openai`, `api.openai.com`, `Deepgram`, …). */
|
|
1991
|
+
provider: z.ZodString;
|
|
1992
|
+
/** true = the workspace's own key built it; false = the platform's. */
|
|
1993
|
+
byok: z.ZodBoolean;
|
|
1994
|
+
}, "strip", z.ZodTypeAny, {
|
|
1995
|
+
provider: string;
|
|
1996
|
+
byok: boolean;
|
|
1997
|
+
}, {
|
|
1998
|
+
provider: string;
|
|
1999
|
+
byok: boolean;
|
|
2000
|
+
}>>;
|
|
2001
|
+
realtime: z.ZodOptional<z.ZodObject<{
|
|
2002
|
+
/** The provider as the slot reports it (LiveKit's label: `openai`, `api.openai.com`, `Deepgram`, …). */
|
|
2003
|
+
provider: z.ZodString;
|
|
2004
|
+
/** true = the workspace's own key built it; false = the platform's. */
|
|
2005
|
+
byok: z.ZodBoolean;
|
|
2006
|
+
}, "strip", z.ZodTypeAny, {
|
|
2007
|
+
provider: string;
|
|
2008
|
+
byok: boolean;
|
|
2009
|
+
}, {
|
|
2010
|
+
provider: string;
|
|
2011
|
+
byok: boolean;
|
|
2012
|
+
}>>;
|
|
2013
|
+
}, "strip", z.ZodTypeAny, {
|
|
2014
|
+
llm?: {
|
|
2015
|
+
provider: string;
|
|
2016
|
+
byok: boolean;
|
|
2017
|
+
} | undefined;
|
|
2018
|
+
stt?: {
|
|
2019
|
+
provider: string;
|
|
2020
|
+
byok: boolean;
|
|
2021
|
+
} | undefined;
|
|
2022
|
+
tts?: {
|
|
2023
|
+
provider: string;
|
|
2024
|
+
byok: boolean;
|
|
2025
|
+
} | undefined;
|
|
2026
|
+
realtime?: {
|
|
2027
|
+
provider: string;
|
|
2028
|
+
byok: boolean;
|
|
2029
|
+
} | undefined;
|
|
2030
|
+
}, {
|
|
2031
|
+
llm?: {
|
|
2032
|
+
provider: string;
|
|
2033
|
+
byok: boolean;
|
|
2034
|
+
} | undefined;
|
|
2035
|
+
stt?: {
|
|
2036
|
+
provider: string;
|
|
2037
|
+
byok: boolean;
|
|
2038
|
+
} | undefined;
|
|
2039
|
+
tts?: {
|
|
2040
|
+
provider: string;
|
|
2041
|
+
byok: boolean;
|
|
2042
|
+
} | undefined;
|
|
2043
|
+
realtime?: {
|
|
2044
|
+
provider: string;
|
|
2045
|
+
byok: boolean;
|
|
2046
|
+
} | undefined;
|
|
2047
|
+
}>;
|
|
2048
|
+
type PipelineKeys = z.infer<typeof PipelineKeys>;
|
|
2049
|
+
|
|
1625
2050
|
interface ApiCredential {
|
|
1626
2051
|
readonly apiKey: string;
|
|
1627
2052
|
readonly baseUrl: string;
|
|
@@ -1818,8 +2243,8 @@ declare class AgentsClient {
|
|
|
1818
2243
|
agents: {
|
|
1819
2244
|
status: "online" | "offline" | "degraded";
|
|
1820
2245
|
id: string;
|
|
1821
|
-
name: string;
|
|
1822
2246
|
projectId: string;
|
|
2247
|
+
name: string;
|
|
1823
2248
|
createdAt: string;
|
|
1824
2249
|
updatedAt: string;
|
|
1825
2250
|
version: string;
|
|
@@ -1859,7 +2284,7 @@ declare class AgentsClient {
|
|
|
1859
2284
|
routes?: Record<string, string> | undefined;
|
|
1860
2285
|
} | undefined;
|
|
1861
2286
|
memory?: {
|
|
1862
|
-
scope?: "
|
|
2287
|
+
scope?: "caller" | "call" | "account" | "participant" | "platform" | undefined;
|
|
1863
2288
|
retentionDays?: number | undefined;
|
|
1864
2289
|
piiFields?: string[] | undefined;
|
|
1865
2290
|
} | undefined;
|
|
@@ -1875,8 +2300,8 @@ declare class AgentsClient {
|
|
|
1875
2300
|
} | undefined;
|
|
1876
2301
|
} | undefined;
|
|
1877
2302
|
prompts?: {
|
|
1878
|
-
id: string;
|
|
1879
2303
|
text: string;
|
|
2304
|
+
id: string;
|
|
1880
2305
|
}[] | undefined;
|
|
1881
2306
|
triggers?: {
|
|
1882
2307
|
then: string;
|
|
@@ -1886,32 +2311,32 @@ declare class AgentsClient {
|
|
|
1886
2311
|
}[] | undefined;
|
|
1887
2312
|
tools?: {
|
|
1888
2313
|
name: string;
|
|
1889
|
-
url: string;
|
|
1890
2314
|
description: string;
|
|
1891
2315
|
input: Record<string, "string" | "number" | "boolean">;
|
|
2316
|
+
url: string;
|
|
1892
2317
|
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
1893
2318
|
auth: "none" | "connection";
|
|
1894
|
-
allowPrivateNetwork?: boolean | undefined;
|
|
1895
2319
|
headers?: Record<string, string> | undefined;
|
|
1896
2320
|
connectionRef?: string | undefined;
|
|
2321
|
+
allowPrivateNetwork?: boolean | undefined;
|
|
1897
2322
|
sendRealValues?: boolean | undefined;
|
|
1898
2323
|
}[] | undefined;
|
|
1899
2324
|
displayName?: string | undefined;
|
|
1900
2325
|
program?: {
|
|
1901
|
-
v: 1;
|
|
1902
2326
|
id: string;
|
|
1903
|
-
entry: string[];
|
|
1904
2327
|
nodes: Record<string, {
|
|
1905
|
-
type: "
|
|
2328
|
+
type: "llm" | "code" | "start" | "say" | "ask" | "confirm" | "tool" | "email" | "decision" | "handoff" | "end" | "trigger" | "gate" | "playbook" | "menu" | "set" | "subflow" | "rag" | "memory" | "speech" | "classify" | "router" | "note";
|
|
1906
2329
|
id: string;
|
|
1907
2330
|
config: Record<string, unknown>;
|
|
1908
2331
|
out: {
|
|
1909
2332
|
to: string;
|
|
1910
|
-
condition?: string | undefined;
|
|
1911
2333
|
sourceHandle?: string | undefined;
|
|
1912
2334
|
label?: string | undefined;
|
|
2335
|
+
condition?: string | undefined;
|
|
1913
2336
|
}[];
|
|
1914
2337
|
}>;
|
|
2338
|
+
v: 1;
|
|
2339
|
+
entry: string[];
|
|
1915
2340
|
completionGate: {
|
|
1916
2341
|
requiredFields: string[];
|
|
1917
2342
|
};
|
|
@@ -1991,16 +2416,18 @@ interface CallUsageReport {
|
|
|
1991
2416
|
readonly model: string;
|
|
1992
2417
|
readonly inputTokens: number;
|
|
1993
2418
|
readonly outputTokens: number;
|
|
1994
|
-
/** Whose key paid
|
|
2419
|
+
/** Whose key paid: true = the customer's (passed through at $0), false or absent = the platform's (at cost). */
|
|
1995
2420
|
readonly byok?: boolean;
|
|
1996
2421
|
}[];
|
|
1997
2422
|
readonly tts: readonly {
|
|
1998
2423
|
readonly provider: string;
|
|
1999
2424
|
readonly chars: number;
|
|
2425
|
+
readonly byok?: boolean;
|
|
2000
2426
|
}[];
|
|
2001
2427
|
readonly stt: readonly {
|
|
2002
2428
|
readonly provider: string;
|
|
2003
2429
|
readonly seconds: number;
|
|
2430
|
+
readonly byok?: boolean;
|
|
2004
2431
|
}[];
|
|
2005
2432
|
}
|
|
2006
2433
|
interface AppendTranscriptInput {
|
|
@@ -2028,6 +2455,11 @@ interface EnsureCallByRoomInput {
|
|
|
2028
2455
|
readonly participants?: CallParticipantInput[];
|
|
2029
2456
|
readonly legs?: CallLegInput[];
|
|
2030
2457
|
readonly startedAt?: string;
|
|
2458
|
+
/** Whose key each pipeline slot runs on (metering F-16). The API pins it on the call only from the call's own worker
|
|
2459
|
+
* token; every billing path prices from it. */
|
|
2460
|
+
readonly pipelineKeys?: PipelineKeys;
|
|
2461
|
+
/** This worker will finalize the call at its close (POST /v1/calls/:id/finalize); `call.ended` waits for it. */
|
|
2462
|
+
readonly finalizes?: boolean;
|
|
2031
2463
|
}
|
|
2032
2464
|
interface CallParticipantInput {
|
|
2033
2465
|
readonly participantKey: string;
|
|
@@ -2065,9 +2497,25 @@ declare class CallsClient {
|
|
|
2065
2497
|
constructor(transport: Transport);
|
|
2066
2498
|
getByRoom(roomName: string): Promise<CallSummary>;
|
|
2067
2499
|
ensureByRoom(input: EnsureCallByRoomInput): Promise<CallSummary>;
|
|
2500
|
+
/**
|
|
2501
|
+
* The call's admission (burn-down G-41/G-42/G-43), asked once right after the caller joins and before the agent
|
|
2502
|
+
* speaks: admitted with its duration limits, or refused with the end reason the platform recorded and the line to
|
|
2503
|
+
* speak before hanging up. Throws on a transport / server error — the runtime retries, then refuses (fail closed).
|
|
2504
|
+
*/
|
|
2505
|
+
admit(input: CallAdmissionRequest): Promise<CallAdmissionResponse>;
|
|
2068
2506
|
syncState(callId: string, input: SyncCallStateInput): Promise<void>;
|
|
2069
2507
|
appendTranscriptSegment(callId: string, input: AppendTranscriptInput): Promise<void>;
|
|
2070
|
-
reportUsage(callId: string, report: CallUsageReport
|
|
2508
|
+
reportUsage(callId: string, report: CallUsageReport, opts?: {
|
|
2509
|
+
readonly signal?: AbortSignal;
|
|
2510
|
+
}): Promise<void>;
|
|
2511
|
+
/**
|
|
2512
|
+
* The worker's last word on a call (burn-down G-20): what the call captured — every declared field — sent at the
|
|
2513
|
+
* session's close after the worker's other writes for the call have landed. The API keeps the fields on the call
|
|
2514
|
+
* and releases the call's held `call.ended` webhook. Idempotent.
|
|
2515
|
+
*/
|
|
2516
|
+
finalize(callId: string, input: CallFinalizeInput, opts?: {
|
|
2517
|
+
readonly signal?: AbortSignal;
|
|
2518
|
+
}): Promise<void>;
|
|
2071
2519
|
appendDtmfEvent(callId: string, input: AppendDtmfEventInput): Promise<void>;
|
|
2072
2520
|
/**
|
|
2073
2521
|
* Append a structured call event — consultation lifecycle kinds, or the
|
|
@@ -2081,7 +2529,7 @@ declare class CallsClient {
|
|
|
2081
2529
|
* is visible in the dashboard, not just the spoken transcript.
|
|
2082
2530
|
*/
|
|
2083
2531
|
appendEvent(callId: string, input: {
|
|
2084
|
-
readonly kind: 'consultation.requested' | 'consultation.resolved' | `tool.${string}` | `handoff.${string}` | `lookup.${string}` | `record.${string}` | `notify.${string}`;
|
|
2532
|
+
readonly kind: 'consultation.requested' | 'consultation.resolved' | 'turn.latency' | `tool.${string}` | `handoff.${string}` | `lookup.${string}` | `record.${string}` | `notify.${string}`;
|
|
2085
2533
|
readonly payload: Record<string, unknown>;
|
|
2086
2534
|
}): Promise<void>;
|
|
2087
2535
|
}
|
|
@@ -2195,8 +2643,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2195
2643
|
baseUrl: string;
|
|
2196
2644
|
}>>>;
|
|
2197
2645
|
}, "strip", z.ZodTypeAny, {
|
|
2198
|
-
id: string;
|
|
2199
2646
|
enabled: boolean;
|
|
2647
|
+
id: string;
|
|
2200
2648
|
mode: "tunnel" | "direct";
|
|
2201
2649
|
defaultModel: string | null;
|
|
2202
2650
|
connectionId: string | null;
|
|
@@ -2206,8 +2654,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2206
2654
|
baseUrl: string;
|
|
2207
2655
|
} | null | undefined;
|
|
2208
2656
|
}, {
|
|
2209
|
-
id: string;
|
|
2210
2657
|
enabled: boolean;
|
|
2658
|
+
id: string;
|
|
2211
2659
|
mode: "tunnel" | "direct";
|
|
2212
2660
|
defaultModel: string | null;
|
|
2213
2661
|
connectionId: string | null;
|
|
@@ -2219,8 +2667,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2219
2667
|
}>;
|
|
2220
2668
|
}, "strip", z.ZodTypeAny, {
|
|
2221
2669
|
connector: {
|
|
2222
|
-
id: string;
|
|
2223
2670
|
enabled: boolean;
|
|
2671
|
+
id: string;
|
|
2224
2672
|
mode: "tunnel" | "direct";
|
|
2225
2673
|
defaultModel: string | null;
|
|
2226
2674
|
connectionId: string | null;
|
|
@@ -2232,8 +2680,8 @@ declare const BrainConnectorConfig: z.ZodObject<{
|
|
|
2232
2680
|
};
|
|
2233
2681
|
}, {
|
|
2234
2682
|
connector: {
|
|
2235
|
-
id: string;
|
|
2236
2683
|
enabled: boolean;
|
|
2684
|
+
id: string;
|
|
2237
2685
|
mode: "tunnel" | "direct";
|
|
2238
2686
|
defaultModel: string | null;
|
|
2239
2687
|
connectionId: string | null;
|