@roarkanalytics/sdk 5.21.0 → 5.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-draft.d.mts +1311 -0
  12. package/resources/agent-draft.d.mts.map +1 -0
  13. package/resources/agent-draft.d.ts +1311 -0
  14. package/resources/agent-draft.d.ts.map +1 -0
  15. package/resources/agent-draft.js +83 -0
  16. package/resources/agent-draft.js.map +1 -0
  17. package/resources/agent-draft.mjs +79 -0
  18. package/resources/agent-draft.mjs.map +1 -0
  19. package/resources/agent-version.d.mts +767 -0
  20. package/resources/agent-version.d.mts.map +1 -0
  21. package/resources/agent-version.d.ts +767 -0
  22. package/resources/agent-version.d.ts.map +1 -0
  23. package/resources/agent-version.js +59 -0
  24. package/resources/agent-version.js.map +1 -0
  25. package/resources/agent-version.mjs +55 -0
  26. package/resources/agent-version.mjs.map +1 -0
  27. package/resources/agent.d.mts +2 -3
  28. package/resources/agent.d.mts.map +1 -1
  29. package/resources/agent.d.ts +2 -3
  30. package/resources/agent.d.ts.map +1 -1
  31. package/resources/index.d.mts +2 -0
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +2 -0
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +5 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +2 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/src/client.ts +46 -0
  40. package/src/resources/agent-draft.ts +1846 -0
  41. package/src/resources/agent-version.ts +1065 -0
  42. package/src/resources/agent.ts +2 -3
  43. package/src/resources/index.ts +20 -0
  44. package/src/version.ts +1 -1
  45. package/version.d.mts +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.js +1 -1
  48. package/version.mjs +1 -1
@@ -0,0 +1,767 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class AgentVersion extends APIResource {
5
+ /**
6
+ * The open draft first, if there is one, then published versions newest first.
7
+ * Paginated: pass `pagination.nextCursor` as `after` for the next page.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const agentVersions =
12
+ * await client.agentVersion.list('agentId');
13
+ * ```
14
+ */
15
+ list(agentID: string, query?: AgentVersionListParams | null | undefined, options?: RequestOptions): APIPromise<AgentVersionListResponse>;
16
+ /**
17
+ * One version with every setting, plus the issues that stop it from running, if
18
+ * any.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const response = await client.agentVersion.getByID(
23
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
24
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
25
+ * );
26
+ * ```
27
+ */
28
+ getByID(versionID: string, params: AgentVersionGetByIDParams, options?: RequestOptions): APIPromise<AgentVersionGetByIDResponse>;
29
+ /**
30
+ * Roll back: publishes a new version, numbered after the latest, with this
31
+ * version's settings and makes it live. History stays append-only. An open draft
32
+ * started before this is kept but can no longer be published (409
33
+ * `agent_draft_base_changed`); discard it or start a new one. Pass
34
+ * `expectedLiveVersionId` to be refused (409 `agent_live_version_changed`) if
35
+ * another version went live since you read it.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const response = await client.agentVersion.restore(
40
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
41
+ * { agentId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
42
+ * );
43
+ * ```
44
+ */
45
+ restore(versionID: string, params: AgentVersionRestoreParams, options?: RequestOptions): APIPromise<AgentVersionRestoreResponse>;
46
+ }
47
+ export interface AgentVersionListResponse {
48
+ data: Array<AgentVersionListResponse.Data>;
49
+ pagination: AgentVersionListResponse.Pagination;
50
+ }
51
+ export declare namespace AgentVersionListResponse {
52
+ /**
53
+ * One version of a Roark-hosted agent's configuration. Null settings use the
54
+ * runtime default.
55
+ */
56
+ interface Data {
57
+ id: string;
58
+ agentId: string;
59
+ /**
60
+ * A background preset.
61
+ */
62
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
63
+ /**
64
+ * A custom background recording, instead of a preset.
65
+ */
66
+ backgroundNoiseUrl: string | null;
67
+ /**
68
+ * 0 to 1.
69
+ */
70
+ backgroundNoiseVolume: number | null;
71
+ /**
72
+ * The published version a draft started from.
73
+ */
74
+ baseVersionId: string | null;
75
+ callMaxDurationSeconds: number | null;
76
+ callSilenceTimeoutSeconds: number | null;
77
+ chatInactivityTimeoutSeconds: number | null;
78
+ chatMaxDurationSeconds: number | null;
79
+ /**
80
+ * ISO 8601.
81
+ */
82
+ createdAt: string;
83
+ createdById: string | null;
84
+ createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
85
+ endCallGoodbyeMessage: string | null;
86
+ /**
87
+ * Phrases that end the call when the caller says them, matched anywhere in what
88
+ * they say.
89
+ */
90
+ endDetectionPhrases: Array<string>;
91
+ /**
92
+ * When the agent may decide to end the call itself.
93
+ */
94
+ endDetectionReasons: Array<string>;
95
+ /**
96
+ * What the agent says first, with firstMessageMode SPEAK_TEXT.
97
+ */
98
+ firstMessage: string | null;
99
+ /**
100
+ * The audio a call opens with, with firstMessageMode PLAY_AUDIO.
101
+ */
102
+ firstMessageAudioUrl: string | null;
103
+ firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
104
+ idleMaxCount: number | null;
105
+ idleMessages: Array<string>;
106
+ idleTimeoutSeconds: number | null;
107
+ interruptionMode: 'ALLOW' | 'BLOCK' | null;
108
+ /**
109
+ * ISO 639-1, e.g. en.
110
+ */
111
+ language: string | null;
112
+ /**
113
+ * OpenAI Live models only: the text model they delegate to.
114
+ */
115
+ llmBackendModel: string | null;
116
+ llmMaxTokens: number | null;
117
+ /**
118
+ * Any model id the provider accepts. One model serves every speaker.
119
+ */
120
+ llmModel: string | null;
121
+ llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
122
+ /**
123
+ * 0 to 2.
124
+ */
125
+ llmTemperature: number | null;
126
+ /**
127
+ * Speech-to-speech models only: the model's own voice.
128
+ */
129
+ llmVoice: string | null;
130
+ /**
131
+ * Whether the agent takes calls, chats, or both.
132
+ */
133
+ modalities: Array<'call' | 'chat'>;
134
+ /**
135
+ * ISO 8601.
136
+ */
137
+ publishedAt: string | null;
138
+ publishedById: string | null;
139
+ publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
140
+ /**
141
+ * Set when this version restores an older one.
142
+ */
143
+ restoredFromVersionId: string | null;
144
+ /**
145
+ * Increases with every edit to a draft. Send it back as expectedRevision when you
146
+ * publish.
147
+ */
148
+ revision: number;
149
+ /**
150
+ * DRAFT while being edited, PUBLISHED once it has been live.
151
+ */
152
+ status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
153
+ sttEndpointingMs: number | null;
154
+ /**
155
+ * Words and phrases the transcriber should listen for.
156
+ */
157
+ sttKeyterms: Array<string>;
158
+ sttModel: string | null;
159
+ sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
160
+ sttSmartFormat: boolean | null;
161
+ sttTurnDetection: 'pipeline' | 'provider' | null;
162
+ /**
163
+ * The main agent (key `main`) first, then the sub-agents it can hand the call to.
164
+ */
165
+ subAgents: Array<Data.SubAgent>;
166
+ /**
167
+ * What changed, written on publish.
168
+ */
169
+ summary: string | null;
170
+ /**
171
+ * ISO 8601.
172
+ */
173
+ updatedAt: string;
174
+ vadStartSecs: number | null;
175
+ vadStopSecs: number | null;
176
+ /**
177
+ * v1, v2, ... assigned on publish; null on a draft.
178
+ */
179
+ versionNumber: number | null;
180
+ /**
181
+ * Why this version cannot run; empty when it can be published. Returned when
182
+ * reading one version.
183
+ */
184
+ issues?: Array<Data.Issue>;
185
+ }
186
+ namespace Data {
187
+ /**
188
+ * A speaker in the conversation. On a sub-agent, null voice settings use the main
189
+ * agent's.
190
+ */
191
+ interface SubAgent {
192
+ handoffs: Array<SubAgent.Handoff>;
193
+ /**
194
+ * The call opens as this sub-agent instead of the main agent.
195
+ */
196
+ isInitial: boolean;
197
+ /**
198
+ * `main` for the main agent; otherwise letters, digits, `_` or `-`.
199
+ */
200
+ key: string;
201
+ /**
202
+ * How the agent refers to this speaker.
203
+ */
204
+ name: string | null;
205
+ /**
206
+ * The speaker's prompt.
207
+ */
208
+ systemPrompt: string | null;
209
+ tools: Array<SubAgent.Tool>;
210
+ ttsModel: string | null;
211
+ ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
212
+ /**
213
+ * 0 to 1, ElevenLabs.
214
+ */
215
+ ttsSimilarityBoost: number | null;
216
+ /**
217
+ * 0.5 to 2.
218
+ */
219
+ ttsSpeed: number | null;
220
+ /**
221
+ * 0 to 1, ElevenLabs.
222
+ */
223
+ ttsStability: number | null;
224
+ /**
225
+ * Any voice id the provider accepts, including your own voices.
226
+ */
227
+ ttsVoiceId: string | null;
228
+ }
229
+ namespace SubAgent {
230
+ interface Handoff {
231
+ /**
232
+ * When to hand off, in the words the model is given.
233
+ */
234
+ description: string;
235
+ /**
236
+ * SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
237
+ */
238
+ history: 'SHARED' | 'NONE';
239
+ /**
240
+ * Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
241
+ */
242
+ note: string | null;
243
+ /**
244
+ * At most once per call.
245
+ */
246
+ once: boolean;
247
+ /**
248
+ * The key of the sub-agent that takes over; `main` for the main agent.
249
+ */
250
+ to: string;
251
+ }
252
+ interface Tool {
253
+ /**
254
+ * The tool version the agent runs; null runs the tool's latest declared version.
255
+ */
256
+ pinnedVersion: number | null;
257
+ toolDefinitionId: string;
258
+ }
259
+ }
260
+ /**
261
+ * Something that stops a version from running.
262
+ */
263
+ interface Issue {
264
+ /**
265
+ * The setting the issue is about.
266
+ */
267
+ field: string;
268
+ message: string;
269
+ }
270
+ }
271
+ interface Pagination {
272
+ /**
273
+ * Whether there are more items to fetch
274
+ */
275
+ hasMore: boolean;
276
+ /**
277
+ * Cursor for the next page of items
278
+ */
279
+ nextCursor: string | null;
280
+ /**
281
+ * Total number of items
282
+ */
283
+ total: number;
284
+ }
285
+ }
286
+ export interface AgentVersionGetByIDResponse {
287
+ /**
288
+ * One version of a Roark-hosted agent's configuration. Null settings use the
289
+ * runtime default.
290
+ */
291
+ data: AgentVersionGetByIDResponse.Data;
292
+ }
293
+ export declare namespace AgentVersionGetByIDResponse {
294
+ /**
295
+ * One version of a Roark-hosted agent's configuration. Null settings use the
296
+ * runtime default.
297
+ */
298
+ interface Data {
299
+ id: string;
300
+ agentId: string;
301
+ /**
302
+ * A background preset.
303
+ */
304
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
305
+ /**
306
+ * A custom background recording, instead of a preset.
307
+ */
308
+ backgroundNoiseUrl: string | null;
309
+ /**
310
+ * 0 to 1.
311
+ */
312
+ backgroundNoiseVolume: number | null;
313
+ /**
314
+ * The published version a draft started from.
315
+ */
316
+ baseVersionId: string | null;
317
+ callMaxDurationSeconds: number | null;
318
+ callSilenceTimeoutSeconds: number | null;
319
+ chatInactivityTimeoutSeconds: number | null;
320
+ chatMaxDurationSeconds: number | null;
321
+ /**
322
+ * ISO 8601.
323
+ */
324
+ createdAt: string;
325
+ createdById: string | null;
326
+ createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
327
+ endCallGoodbyeMessage: string | null;
328
+ /**
329
+ * Phrases that end the call when the caller says them, matched anywhere in what
330
+ * they say.
331
+ */
332
+ endDetectionPhrases: Array<string>;
333
+ /**
334
+ * When the agent may decide to end the call itself.
335
+ */
336
+ endDetectionReasons: Array<string>;
337
+ /**
338
+ * What the agent says first, with firstMessageMode SPEAK_TEXT.
339
+ */
340
+ firstMessage: string | null;
341
+ /**
342
+ * The audio a call opens with, with firstMessageMode PLAY_AUDIO.
343
+ */
344
+ firstMessageAudioUrl: string | null;
345
+ firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
346
+ idleMaxCount: number | null;
347
+ idleMessages: Array<string>;
348
+ idleTimeoutSeconds: number | null;
349
+ interruptionMode: 'ALLOW' | 'BLOCK' | null;
350
+ /**
351
+ * ISO 639-1, e.g. en.
352
+ */
353
+ language: string | null;
354
+ /**
355
+ * OpenAI Live models only: the text model they delegate to.
356
+ */
357
+ llmBackendModel: string | null;
358
+ llmMaxTokens: number | null;
359
+ /**
360
+ * Any model id the provider accepts. One model serves every speaker.
361
+ */
362
+ llmModel: string | null;
363
+ llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
364
+ /**
365
+ * 0 to 2.
366
+ */
367
+ llmTemperature: number | null;
368
+ /**
369
+ * Speech-to-speech models only: the model's own voice.
370
+ */
371
+ llmVoice: string | null;
372
+ /**
373
+ * Whether the agent takes calls, chats, or both.
374
+ */
375
+ modalities: Array<'call' | 'chat'>;
376
+ /**
377
+ * ISO 8601.
378
+ */
379
+ publishedAt: string | null;
380
+ publishedById: string | null;
381
+ publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
382
+ /**
383
+ * Set when this version restores an older one.
384
+ */
385
+ restoredFromVersionId: string | null;
386
+ /**
387
+ * Increases with every edit to a draft. Send it back as expectedRevision when you
388
+ * publish.
389
+ */
390
+ revision: number;
391
+ /**
392
+ * DRAFT while being edited, PUBLISHED once it has been live.
393
+ */
394
+ status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
395
+ sttEndpointingMs: number | null;
396
+ /**
397
+ * Words and phrases the transcriber should listen for.
398
+ */
399
+ sttKeyterms: Array<string>;
400
+ sttModel: string | null;
401
+ sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
402
+ sttSmartFormat: boolean | null;
403
+ sttTurnDetection: 'pipeline' | 'provider' | null;
404
+ /**
405
+ * The main agent (key `main`) first, then the sub-agents it can hand the call to.
406
+ */
407
+ subAgents: Array<Data.SubAgent>;
408
+ /**
409
+ * What changed, written on publish.
410
+ */
411
+ summary: string | null;
412
+ /**
413
+ * ISO 8601.
414
+ */
415
+ updatedAt: string;
416
+ vadStartSecs: number | null;
417
+ vadStopSecs: number | null;
418
+ /**
419
+ * v1, v2, ... assigned on publish; null on a draft.
420
+ */
421
+ versionNumber: number | null;
422
+ /**
423
+ * Why this version cannot run; empty when it can be published. Returned when
424
+ * reading one version.
425
+ */
426
+ issues?: Array<Data.Issue>;
427
+ }
428
+ namespace Data {
429
+ /**
430
+ * A speaker in the conversation. On a sub-agent, null voice settings use the main
431
+ * agent's.
432
+ */
433
+ interface SubAgent {
434
+ handoffs: Array<SubAgent.Handoff>;
435
+ /**
436
+ * The call opens as this sub-agent instead of the main agent.
437
+ */
438
+ isInitial: boolean;
439
+ /**
440
+ * `main` for the main agent; otherwise letters, digits, `_` or `-`.
441
+ */
442
+ key: string;
443
+ /**
444
+ * How the agent refers to this speaker.
445
+ */
446
+ name: string | null;
447
+ /**
448
+ * The speaker's prompt.
449
+ */
450
+ systemPrompt: string | null;
451
+ tools: Array<SubAgent.Tool>;
452
+ ttsModel: string | null;
453
+ ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
454
+ /**
455
+ * 0 to 1, ElevenLabs.
456
+ */
457
+ ttsSimilarityBoost: number | null;
458
+ /**
459
+ * 0.5 to 2.
460
+ */
461
+ ttsSpeed: number | null;
462
+ /**
463
+ * 0 to 1, ElevenLabs.
464
+ */
465
+ ttsStability: number | null;
466
+ /**
467
+ * Any voice id the provider accepts, including your own voices.
468
+ */
469
+ ttsVoiceId: string | null;
470
+ }
471
+ namespace SubAgent {
472
+ interface Handoff {
473
+ /**
474
+ * When to hand off, in the words the model is given.
475
+ */
476
+ description: string;
477
+ /**
478
+ * SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
479
+ */
480
+ history: 'SHARED' | 'NONE';
481
+ /**
482
+ * Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
483
+ */
484
+ note: string | null;
485
+ /**
486
+ * At most once per call.
487
+ */
488
+ once: boolean;
489
+ /**
490
+ * The key of the sub-agent that takes over; `main` for the main agent.
491
+ */
492
+ to: string;
493
+ }
494
+ interface Tool {
495
+ /**
496
+ * The tool version the agent runs; null runs the tool's latest declared version.
497
+ */
498
+ pinnedVersion: number | null;
499
+ toolDefinitionId: string;
500
+ }
501
+ }
502
+ /**
503
+ * Something that stops a version from running.
504
+ */
505
+ interface Issue {
506
+ /**
507
+ * The setting the issue is about.
508
+ */
509
+ field: string;
510
+ message: string;
511
+ }
512
+ }
513
+ }
514
+ export interface AgentVersionRestoreResponse {
515
+ /**
516
+ * One version of a Roark-hosted agent's configuration. Null settings use the
517
+ * runtime default.
518
+ */
519
+ data: AgentVersionRestoreResponse.Data;
520
+ }
521
+ export declare namespace AgentVersionRestoreResponse {
522
+ /**
523
+ * One version of a Roark-hosted agent's configuration. Null settings use the
524
+ * runtime default.
525
+ */
526
+ interface Data {
527
+ id: string;
528
+ agentId: string;
529
+ /**
530
+ * A background preset.
531
+ */
532
+ backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
533
+ /**
534
+ * A custom background recording, instead of a preset.
535
+ */
536
+ backgroundNoiseUrl: string | null;
537
+ /**
538
+ * 0 to 1.
539
+ */
540
+ backgroundNoiseVolume: number | null;
541
+ /**
542
+ * The published version a draft started from.
543
+ */
544
+ baseVersionId: string | null;
545
+ callMaxDurationSeconds: number | null;
546
+ callSilenceTimeoutSeconds: number | null;
547
+ chatInactivityTimeoutSeconds: number | null;
548
+ chatMaxDurationSeconds: number | null;
549
+ /**
550
+ * ISO 8601.
551
+ */
552
+ createdAt: string;
553
+ createdById: string | null;
554
+ createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
555
+ endCallGoodbyeMessage: string | null;
556
+ /**
557
+ * Phrases that end the call when the caller says them, matched anywhere in what
558
+ * they say.
559
+ */
560
+ endDetectionPhrases: Array<string>;
561
+ /**
562
+ * When the agent may decide to end the call itself.
563
+ */
564
+ endDetectionReasons: Array<string>;
565
+ /**
566
+ * What the agent says first, with firstMessageMode SPEAK_TEXT.
567
+ */
568
+ firstMessage: string | null;
569
+ /**
570
+ * The audio a call opens with, with firstMessageMode PLAY_AUDIO.
571
+ */
572
+ firstMessageAudioUrl: string | null;
573
+ firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
574
+ idleMaxCount: number | null;
575
+ idleMessages: Array<string>;
576
+ idleTimeoutSeconds: number | null;
577
+ interruptionMode: 'ALLOW' | 'BLOCK' | null;
578
+ /**
579
+ * ISO 639-1, e.g. en.
580
+ */
581
+ language: string | null;
582
+ /**
583
+ * OpenAI Live models only: the text model they delegate to.
584
+ */
585
+ llmBackendModel: string | null;
586
+ llmMaxTokens: number | null;
587
+ /**
588
+ * Any model id the provider accepts. One model serves every speaker.
589
+ */
590
+ llmModel: string | null;
591
+ llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
592
+ /**
593
+ * 0 to 2.
594
+ */
595
+ llmTemperature: number | null;
596
+ /**
597
+ * Speech-to-speech models only: the model's own voice.
598
+ */
599
+ llmVoice: string | null;
600
+ /**
601
+ * Whether the agent takes calls, chats, or both.
602
+ */
603
+ modalities: Array<'call' | 'chat'>;
604
+ /**
605
+ * ISO 8601.
606
+ */
607
+ publishedAt: string | null;
608
+ publishedById: string | null;
609
+ publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
610
+ /**
611
+ * Set when this version restores an older one.
612
+ */
613
+ restoredFromVersionId: string | null;
614
+ /**
615
+ * Increases with every edit to a draft. Send it back as expectedRevision when you
616
+ * publish.
617
+ */
618
+ revision: number;
619
+ /**
620
+ * DRAFT while being edited, PUBLISHED once it has been live.
621
+ */
622
+ status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
623
+ sttEndpointingMs: number | null;
624
+ /**
625
+ * Words and phrases the transcriber should listen for.
626
+ */
627
+ sttKeyterms: Array<string>;
628
+ sttModel: string | null;
629
+ sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
630
+ sttSmartFormat: boolean | null;
631
+ sttTurnDetection: 'pipeline' | 'provider' | null;
632
+ /**
633
+ * The main agent (key `main`) first, then the sub-agents it can hand the call to.
634
+ */
635
+ subAgents: Array<Data.SubAgent>;
636
+ /**
637
+ * What changed, written on publish.
638
+ */
639
+ summary: string | null;
640
+ /**
641
+ * ISO 8601.
642
+ */
643
+ updatedAt: string;
644
+ vadStartSecs: number | null;
645
+ vadStopSecs: number | null;
646
+ /**
647
+ * v1, v2, ... assigned on publish; null on a draft.
648
+ */
649
+ versionNumber: number | null;
650
+ /**
651
+ * Why this version cannot run; empty when it can be published. Returned when
652
+ * reading one version.
653
+ */
654
+ issues?: Array<Data.Issue>;
655
+ }
656
+ namespace Data {
657
+ /**
658
+ * A speaker in the conversation. On a sub-agent, null voice settings use the main
659
+ * agent's.
660
+ */
661
+ interface SubAgent {
662
+ handoffs: Array<SubAgent.Handoff>;
663
+ /**
664
+ * The call opens as this sub-agent instead of the main agent.
665
+ */
666
+ isInitial: boolean;
667
+ /**
668
+ * `main` for the main agent; otherwise letters, digits, `_` or `-`.
669
+ */
670
+ key: string;
671
+ /**
672
+ * How the agent refers to this speaker.
673
+ */
674
+ name: string | null;
675
+ /**
676
+ * The speaker's prompt.
677
+ */
678
+ systemPrompt: string | null;
679
+ tools: Array<SubAgent.Tool>;
680
+ ttsModel: string | null;
681
+ ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
682
+ /**
683
+ * 0 to 1, ElevenLabs.
684
+ */
685
+ ttsSimilarityBoost: number | null;
686
+ /**
687
+ * 0.5 to 2.
688
+ */
689
+ ttsSpeed: number | null;
690
+ /**
691
+ * 0 to 1, ElevenLabs.
692
+ */
693
+ ttsStability: number | null;
694
+ /**
695
+ * Any voice id the provider accepts, including your own voices.
696
+ */
697
+ ttsVoiceId: string | null;
698
+ }
699
+ namespace SubAgent {
700
+ interface Handoff {
701
+ /**
702
+ * When to hand off, in the words the model is given.
703
+ */
704
+ description: string;
705
+ /**
706
+ * SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
707
+ */
708
+ history: 'SHARED' | 'NONE';
709
+ /**
710
+ * Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
711
+ */
712
+ note: string | null;
713
+ /**
714
+ * At most once per call.
715
+ */
716
+ once: boolean;
717
+ /**
718
+ * The key of the sub-agent that takes over; `main` for the main agent.
719
+ */
720
+ to: string;
721
+ }
722
+ interface Tool {
723
+ /**
724
+ * The tool version the agent runs; null runs the tool's latest declared version.
725
+ */
726
+ pinnedVersion: number | null;
727
+ toolDefinitionId: string;
728
+ }
729
+ }
730
+ /**
731
+ * Something that stops a version from running.
732
+ */
733
+ interface Issue {
734
+ /**
735
+ * The setting the issue is about.
736
+ */
737
+ field: string;
738
+ message: string;
739
+ }
740
+ }
741
+ }
742
+ export interface AgentVersionListParams {
743
+ after?: string;
744
+ limit?: number;
745
+ }
746
+ export interface AgentVersionGetByIDParams {
747
+ agentId: string;
748
+ }
749
+ export interface AgentVersionRestoreParams {
750
+ /**
751
+ * Path param
752
+ */
753
+ agentId: string;
754
+ /**
755
+ * Body param: The live version when you decided to restore. When sent, the restore
756
+ * is refused with 409 if another version went live since.
757
+ */
758
+ expectedLiveVersionId?: string;
759
+ /**
760
+ * Body param
761
+ */
762
+ summary?: string;
763
+ }
764
+ export declare namespace AgentVersion {
765
+ export { type AgentVersionListResponse as AgentVersionListResponse, type AgentVersionGetByIDResponse as AgentVersionGetByIDResponse, type AgentVersionRestoreResponse as AgentVersionRestoreResponse, type AgentVersionListParams as AgentVersionListParams, type AgentVersionGetByIDParams as AgentVersionGetByIDParams, type AgentVersionRestoreParams as AgentVersionRestoreParams, };
766
+ }
767
+ //# sourceMappingURL=agent-version.d.ts.map