@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.
- package/CHANGELOG.md +12 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-draft.d.mts +1311 -0
- package/resources/agent-draft.d.mts.map +1 -0
- package/resources/agent-draft.d.ts +1311 -0
- package/resources/agent-draft.d.ts.map +1 -0
- package/resources/agent-draft.js +83 -0
- package/resources/agent-draft.js.map +1 -0
- package/resources/agent-draft.mjs +79 -0
- package/resources/agent-draft.mjs.map +1 -0
- package/resources/agent-version.d.mts +767 -0
- package/resources/agent-version.d.mts.map +1 -0
- package/resources/agent-version.d.ts +767 -0
- package/resources/agent-version.d.ts.map +1 -0
- package/resources/agent-version.js +59 -0
- package/resources/agent-version.js.map +1 -0
- package/resources/agent-version.mjs +55 -0
- package/resources/agent-version.mjs.map +1 -0
- package/resources/agent.d.mts +2 -3
- package/resources/agent.d.mts.map +1 -1
- package/resources/agent.d.ts +2 -3
- package/resources/agent.d.ts.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +46 -0
- package/src/resources/agent-draft.ts +1846 -0
- package/src/resources/agent-version.ts +1065 -0
- package/src/resources/agent.ts +2 -3
- package/src/resources/index.ts +20 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,1311 @@
|
|
|
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 AgentDraft extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Opens the agent's one shared draft, a copy of the live version or of an older
|
|
7
|
+
* published version. Fails with 409 when a draft is already open.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const agentDraft = await client.agentDraft.create(
|
|
12
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
13
|
+
* );
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(agentID: string, body?: AgentDraftCreateParams | null | undefined, options?: RequestOptions): APIPromise<AgentDraftCreateResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Changes settings on the draft. Omitted settings stay as they are. Pass the
|
|
19
|
+
* revision you read as expectedRevision to fail with 409 if anyone edited the
|
|
20
|
+
* draft since, instead of applying on top of their edit.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const agentDraft = await client.agentDraft.update(
|
|
25
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
26
|
+
* { settings: {} },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
update(agentID: string, body: AgentDraftUpdateParams, options?: RequestOptions): APIPromise<AgentDraftUpdateResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Throws the open draft away and returns it. The live version is unchanged.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const agentDraft = await client.agentDraft.delete(
|
|
37
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
38
|
+
* );
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
delete(agentID: string, options?: RequestOptions): APIPromise<AgentDraftDeleteResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* The agent's open draft, with the issues that would stop it from being published.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const agentDraft = await client.agentDraft.get(
|
|
48
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
get(agentID: string, options?: RequestOptions): APIPromise<AgentDraftGetResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Makes the draft the live version, numbered v1, v2, ... Fails with 409 if the
|
|
55
|
+
* draft was edited after expectedRevision, if another version was published since
|
|
56
|
+
* the draft started, or if it changes nothing; with 400 and the issues if the
|
|
57
|
+
* version cannot run.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const response = await client.agentDraft.publish(
|
|
62
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
63
|
+
* { expectedRevision: 1 },
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
publish(agentID: string, body: AgentDraftPublishParams, options?: RequestOptions): APIPromise<AgentDraftPublishResponse>;
|
|
68
|
+
}
|
|
69
|
+
export interface AgentDraftCreateResponse {
|
|
70
|
+
/**
|
|
71
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
72
|
+
* runtime default.
|
|
73
|
+
*/
|
|
74
|
+
data: AgentDraftCreateResponse.Data;
|
|
75
|
+
}
|
|
76
|
+
export declare namespace AgentDraftCreateResponse {
|
|
77
|
+
/**
|
|
78
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
79
|
+
* runtime default.
|
|
80
|
+
*/
|
|
81
|
+
interface Data {
|
|
82
|
+
id: string;
|
|
83
|
+
agentId: string;
|
|
84
|
+
/**
|
|
85
|
+
* A background preset.
|
|
86
|
+
*/
|
|
87
|
+
backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
|
|
88
|
+
/**
|
|
89
|
+
* A custom background recording, instead of a preset.
|
|
90
|
+
*/
|
|
91
|
+
backgroundNoiseUrl: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* 0 to 1.
|
|
94
|
+
*/
|
|
95
|
+
backgroundNoiseVolume: number | null;
|
|
96
|
+
/**
|
|
97
|
+
* The published version a draft started from.
|
|
98
|
+
*/
|
|
99
|
+
baseVersionId: string | null;
|
|
100
|
+
callMaxDurationSeconds: number | null;
|
|
101
|
+
callSilenceTimeoutSeconds: number | null;
|
|
102
|
+
chatInactivityTimeoutSeconds: number | null;
|
|
103
|
+
chatMaxDurationSeconds: number | null;
|
|
104
|
+
/**
|
|
105
|
+
* ISO 8601.
|
|
106
|
+
*/
|
|
107
|
+
createdAt: string;
|
|
108
|
+
createdById: string | null;
|
|
109
|
+
createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
|
|
110
|
+
endCallGoodbyeMessage: string | null;
|
|
111
|
+
/**
|
|
112
|
+
* Phrases that end the call when the caller says them, matched anywhere in what
|
|
113
|
+
* they say.
|
|
114
|
+
*/
|
|
115
|
+
endDetectionPhrases: Array<string>;
|
|
116
|
+
/**
|
|
117
|
+
* When the agent may decide to end the call itself.
|
|
118
|
+
*/
|
|
119
|
+
endDetectionReasons: Array<string>;
|
|
120
|
+
/**
|
|
121
|
+
* What the agent says first, with firstMessageMode SPEAK_TEXT.
|
|
122
|
+
*/
|
|
123
|
+
firstMessage: string | null;
|
|
124
|
+
/**
|
|
125
|
+
* The audio a call opens with, with firstMessageMode PLAY_AUDIO.
|
|
126
|
+
*/
|
|
127
|
+
firstMessageAudioUrl: string | null;
|
|
128
|
+
firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
|
|
129
|
+
idleMaxCount: number | null;
|
|
130
|
+
idleMessages: Array<string>;
|
|
131
|
+
idleTimeoutSeconds: number | null;
|
|
132
|
+
interruptionMode: 'ALLOW' | 'BLOCK' | null;
|
|
133
|
+
/**
|
|
134
|
+
* ISO 639-1, e.g. en.
|
|
135
|
+
*/
|
|
136
|
+
language: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
139
|
+
*/
|
|
140
|
+
llmBackendModel: string | null;
|
|
141
|
+
llmMaxTokens: number | null;
|
|
142
|
+
/**
|
|
143
|
+
* Any model id the provider accepts. One model serves every speaker.
|
|
144
|
+
*/
|
|
145
|
+
llmModel: string | null;
|
|
146
|
+
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
147
|
+
/**
|
|
148
|
+
* 0 to 2.
|
|
149
|
+
*/
|
|
150
|
+
llmTemperature: number | null;
|
|
151
|
+
/**
|
|
152
|
+
* Speech-to-speech models only: the model's own voice.
|
|
153
|
+
*/
|
|
154
|
+
llmVoice: string | null;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the agent takes calls, chats, or both.
|
|
157
|
+
*/
|
|
158
|
+
modalities: Array<'call' | 'chat'>;
|
|
159
|
+
/**
|
|
160
|
+
* ISO 8601.
|
|
161
|
+
*/
|
|
162
|
+
publishedAt: string | null;
|
|
163
|
+
publishedById: string | null;
|
|
164
|
+
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
165
|
+
/**
|
|
166
|
+
* Set when this version restores an older one.
|
|
167
|
+
*/
|
|
168
|
+
restoredFromVersionId: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
171
|
+
* publish.
|
|
172
|
+
*/
|
|
173
|
+
revision: number;
|
|
174
|
+
/**
|
|
175
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
176
|
+
*/
|
|
177
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
178
|
+
sttEndpointingMs: number | null;
|
|
179
|
+
/**
|
|
180
|
+
* Words and phrases the transcriber should listen for.
|
|
181
|
+
*/
|
|
182
|
+
sttKeyterms: Array<string>;
|
|
183
|
+
sttModel: string | null;
|
|
184
|
+
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
185
|
+
sttSmartFormat: boolean | null;
|
|
186
|
+
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
187
|
+
/**
|
|
188
|
+
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
189
|
+
*/
|
|
190
|
+
subAgents: Array<Data.SubAgent>;
|
|
191
|
+
/**
|
|
192
|
+
* What changed, written on publish.
|
|
193
|
+
*/
|
|
194
|
+
summary: string | null;
|
|
195
|
+
/**
|
|
196
|
+
* ISO 8601.
|
|
197
|
+
*/
|
|
198
|
+
updatedAt: string;
|
|
199
|
+
vadStartSecs: number | null;
|
|
200
|
+
vadStopSecs: number | null;
|
|
201
|
+
/**
|
|
202
|
+
* v1, v2, ... assigned on publish; null on a draft.
|
|
203
|
+
*/
|
|
204
|
+
versionNumber: number | null;
|
|
205
|
+
/**
|
|
206
|
+
* Why this version cannot run; empty when it can be published. Returned when
|
|
207
|
+
* reading one version.
|
|
208
|
+
*/
|
|
209
|
+
issues?: Array<Data.Issue>;
|
|
210
|
+
}
|
|
211
|
+
namespace Data {
|
|
212
|
+
/**
|
|
213
|
+
* A speaker in the conversation. On a sub-agent, null voice settings use the main
|
|
214
|
+
* agent's.
|
|
215
|
+
*/
|
|
216
|
+
interface SubAgent {
|
|
217
|
+
handoffs: Array<SubAgent.Handoff>;
|
|
218
|
+
/**
|
|
219
|
+
* The call opens as this sub-agent instead of the main agent.
|
|
220
|
+
*/
|
|
221
|
+
isInitial: boolean;
|
|
222
|
+
/**
|
|
223
|
+
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
224
|
+
*/
|
|
225
|
+
key: string;
|
|
226
|
+
/**
|
|
227
|
+
* How the agent refers to this speaker.
|
|
228
|
+
*/
|
|
229
|
+
name: string | null;
|
|
230
|
+
/**
|
|
231
|
+
* The speaker's prompt.
|
|
232
|
+
*/
|
|
233
|
+
systemPrompt: string | null;
|
|
234
|
+
tools: Array<SubAgent.Tool>;
|
|
235
|
+
ttsModel: string | null;
|
|
236
|
+
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
237
|
+
/**
|
|
238
|
+
* 0 to 1, ElevenLabs.
|
|
239
|
+
*/
|
|
240
|
+
ttsSimilarityBoost: number | null;
|
|
241
|
+
/**
|
|
242
|
+
* 0.5 to 2.
|
|
243
|
+
*/
|
|
244
|
+
ttsSpeed: number | null;
|
|
245
|
+
/**
|
|
246
|
+
* 0 to 1, ElevenLabs.
|
|
247
|
+
*/
|
|
248
|
+
ttsStability: number | null;
|
|
249
|
+
/**
|
|
250
|
+
* Any voice id the provider accepts, including your own voices.
|
|
251
|
+
*/
|
|
252
|
+
ttsVoiceId: string | null;
|
|
253
|
+
}
|
|
254
|
+
namespace SubAgent {
|
|
255
|
+
interface Handoff {
|
|
256
|
+
/**
|
|
257
|
+
* When to hand off, in the words the model is given.
|
|
258
|
+
*/
|
|
259
|
+
description: string;
|
|
260
|
+
/**
|
|
261
|
+
* SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
|
|
262
|
+
*/
|
|
263
|
+
history: 'SHARED' | 'NONE';
|
|
264
|
+
/**
|
|
265
|
+
* Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
|
|
266
|
+
*/
|
|
267
|
+
note: string | null;
|
|
268
|
+
/**
|
|
269
|
+
* At most once per call.
|
|
270
|
+
*/
|
|
271
|
+
once: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* The key of the sub-agent that takes over; `main` for the main agent.
|
|
274
|
+
*/
|
|
275
|
+
to: string;
|
|
276
|
+
}
|
|
277
|
+
interface Tool {
|
|
278
|
+
/**
|
|
279
|
+
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
280
|
+
*/
|
|
281
|
+
pinnedVersion: number | null;
|
|
282
|
+
toolDefinitionId: string;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Something that stops a version from running.
|
|
287
|
+
*/
|
|
288
|
+
interface Issue {
|
|
289
|
+
/**
|
|
290
|
+
* The setting the issue is about.
|
|
291
|
+
*/
|
|
292
|
+
field: string;
|
|
293
|
+
message: string;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
export interface AgentDraftUpdateResponse {
|
|
298
|
+
/**
|
|
299
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
300
|
+
* runtime default.
|
|
301
|
+
*/
|
|
302
|
+
data: AgentDraftUpdateResponse.Data;
|
|
303
|
+
}
|
|
304
|
+
export declare namespace AgentDraftUpdateResponse {
|
|
305
|
+
/**
|
|
306
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
307
|
+
* runtime default.
|
|
308
|
+
*/
|
|
309
|
+
interface Data {
|
|
310
|
+
id: string;
|
|
311
|
+
agentId: string;
|
|
312
|
+
/**
|
|
313
|
+
* A background preset.
|
|
314
|
+
*/
|
|
315
|
+
backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
|
|
316
|
+
/**
|
|
317
|
+
* A custom background recording, instead of a preset.
|
|
318
|
+
*/
|
|
319
|
+
backgroundNoiseUrl: string | null;
|
|
320
|
+
/**
|
|
321
|
+
* 0 to 1.
|
|
322
|
+
*/
|
|
323
|
+
backgroundNoiseVolume: number | null;
|
|
324
|
+
/**
|
|
325
|
+
* The published version a draft started from.
|
|
326
|
+
*/
|
|
327
|
+
baseVersionId: string | null;
|
|
328
|
+
callMaxDurationSeconds: number | null;
|
|
329
|
+
callSilenceTimeoutSeconds: number | null;
|
|
330
|
+
chatInactivityTimeoutSeconds: number | null;
|
|
331
|
+
chatMaxDurationSeconds: number | null;
|
|
332
|
+
/**
|
|
333
|
+
* ISO 8601.
|
|
334
|
+
*/
|
|
335
|
+
createdAt: string;
|
|
336
|
+
createdById: string | null;
|
|
337
|
+
createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
|
|
338
|
+
endCallGoodbyeMessage: string | null;
|
|
339
|
+
/**
|
|
340
|
+
* Phrases that end the call when the caller says them, matched anywhere in what
|
|
341
|
+
* they say.
|
|
342
|
+
*/
|
|
343
|
+
endDetectionPhrases: Array<string>;
|
|
344
|
+
/**
|
|
345
|
+
* When the agent may decide to end the call itself.
|
|
346
|
+
*/
|
|
347
|
+
endDetectionReasons: Array<string>;
|
|
348
|
+
/**
|
|
349
|
+
* What the agent says first, with firstMessageMode SPEAK_TEXT.
|
|
350
|
+
*/
|
|
351
|
+
firstMessage: string | null;
|
|
352
|
+
/**
|
|
353
|
+
* The audio a call opens with, with firstMessageMode PLAY_AUDIO.
|
|
354
|
+
*/
|
|
355
|
+
firstMessageAudioUrl: string | null;
|
|
356
|
+
firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
|
|
357
|
+
idleMaxCount: number | null;
|
|
358
|
+
idleMessages: Array<string>;
|
|
359
|
+
idleTimeoutSeconds: number | null;
|
|
360
|
+
interruptionMode: 'ALLOW' | 'BLOCK' | null;
|
|
361
|
+
/**
|
|
362
|
+
* ISO 639-1, e.g. en.
|
|
363
|
+
*/
|
|
364
|
+
language: string | null;
|
|
365
|
+
/**
|
|
366
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
367
|
+
*/
|
|
368
|
+
llmBackendModel: string | null;
|
|
369
|
+
llmMaxTokens: number | null;
|
|
370
|
+
/**
|
|
371
|
+
* Any model id the provider accepts. One model serves every speaker.
|
|
372
|
+
*/
|
|
373
|
+
llmModel: string | null;
|
|
374
|
+
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
375
|
+
/**
|
|
376
|
+
* 0 to 2.
|
|
377
|
+
*/
|
|
378
|
+
llmTemperature: number | null;
|
|
379
|
+
/**
|
|
380
|
+
* Speech-to-speech models only: the model's own voice.
|
|
381
|
+
*/
|
|
382
|
+
llmVoice: string | null;
|
|
383
|
+
/**
|
|
384
|
+
* Whether the agent takes calls, chats, or both.
|
|
385
|
+
*/
|
|
386
|
+
modalities: Array<'call' | 'chat'>;
|
|
387
|
+
/**
|
|
388
|
+
* ISO 8601.
|
|
389
|
+
*/
|
|
390
|
+
publishedAt: string | null;
|
|
391
|
+
publishedById: string | null;
|
|
392
|
+
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
393
|
+
/**
|
|
394
|
+
* Set when this version restores an older one.
|
|
395
|
+
*/
|
|
396
|
+
restoredFromVersionId: string | null;
|
|
397
|
+
/**
|
|
398
|
+
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
399
|
+
* publish.
|
|
400
|
+
*/
|
|
401
|
+
revision: number;
|
|
402
|
+
/**
|
|
403
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
404
|
+
*/
|
|
405
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
406
|
+
sttEndpointingMs: number | null;
|
|
407
|
+
/**
|
|
408
|
+
* Words and phrases the transcriber should listen for.
|
|
409
|
+
*/
|
|
410
|
+
sttKeyterms: Array<string>;
|
|
411
|
+
sttModel: string | null;
|
|
412
|
+
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
413
|
+
sttSmartFormat: boolean | null;
|
|
414
|
+
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
415
|
+
/**
|
|
416
|
+
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
417
|
+
*/
|
|
418
|
+
subAgents: Array<Data.SubAgent>;
|
|
419
|
+
/**
|
|
420
|
+
* What changed, written on publish.
|
|
421
|
+
*/
|
|
422
|
+
summary: string | null;
|
|
423
|
+
/**
|
|
424
|
+
* ISO 8601.
|
|
425
|
+
*/
|
|
426
|
+
updatedAt: string;
|
|
427
|
+
vadStartSecs: number | null;
|
|
428
|
+
vadStopSecs: number | null;
|
|
429
|
+
/**
|
|
430
|
+
* v1, v2, ... assigned on publish; null on a draft.
|
|
431
|
+
*/
|
|
432
|
+
versionNumber: number | null;
|
|
433
|
+
/**
|
|
434
|
+
* Why this version cannot run; empty when it can be published. Returned when
|
|
435
|
+
* reading one version.
|
|
436
|
+
*/
|
|
437
|
+
issues?: Array<Data.Issue>;
|
|
438
|
+
}
|
|
439
|
+
namespace Data {
|
|
440
|
+
/**
|
|
441
|
+
* A speaker in the conversation. On a sub-agent, null voice settings use the main
|
|
442
|
+
* agent's.
|
|
443
|
+
*/
|
|
444
|
+
interface SubAgent {
|
|
445
|
+
handoffs: Array<SubAgent.Handoff>;
|
|
446
|
+
/**
|
|
447
|
+
* The call opens as this sub-agent instead of the main agent.
|
|
448
|
+
*/
|
|
449
|
+
isInitial: boolean;
|
|
450
|
+
/**
|
|
451
|
+
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
452
|
+
*/
|
|
453
|
+
key: string;
|
|
454
|
+
/**
|
|
455
|
+
* How the agent refers to this speaker.
|
|
456
|
+
*/
|
|
457
|
+
name: string | null;
|
|
458
|
+
/**
|
|
459
|
+
* The speaker's prompt.
|
|
460
|
+
*/
|
|
461
|
+
systemPrompt: string | null;
|
|
462
|
+
tools: Array<SubAgent.Tool>;
|
|
463
|
+
ttsModel: string | null;
|
|
464
|
+
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
465
|
+
/**
|
|
466
|
+
* 0 to 1, ElevenLabs.
|
|
467
|
+
*/
|
|
468
|
+
ttsSimilarityBoost: number | null;
|
|
469
|
+
/**
|
|
470
|
+
* 0.5 to 2.
|
|
471
|
+
*/
|
|
472
|
+
ttsSpeed: number | null;
|
|
473
|
+
/**
|
|
474
|
+
* 0 to 1, ElevenLabs.
|
|
475
|
+
*/
|
|
476
|
+
ttsStability: number | null;
|
|
477
|
+
/**
|
|
478
|
+
* Any voice id the provider accepts, including your own voices.
|
|
479
|
+
*/
|
|
480
|
+
ttsVoiceId: string | null;
|
|
481
|
+
}
|
|
482
|
+
namespace SubAgent {
|
|
483
|
+
interface Handoff {
|
|
484
|
+
/**
|
|
485
|
+
* When to hand off, in the words the model is given.
|
|
486
|
+
*/
|
|
487
|
+
description: string;
|
|
488
|
+
/**
|
|
489
|
+
* SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
|
|
490
|
+
*/
|
|
491
|
+
history: 'SHARED' | 'NONE';
|
|
492
|
+
/**
|
|
493
|
+
* Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
|
|
494
|
+
*/
|
|
495
|
+
note: string | null;
|
|
496
|
+
/**
|
|
497
|
+
* At most once per call.
|
|
498
|
+
*/
|
|
499
|
+
once: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* The key of the sub-agent that takes over; `main` for the main agent.
|
|
502
|
+
*/
|
|
503
|
+
to: string;
|
|
504
|
+
}
|
|
505
|
+
interface Tool {
|
|
506
|
+
/**
|
|
507
|
+
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
508
|
+
*/
|
|
509
|
+
pinnedVersion: number | null;
|
|
510
|
+
toolDefinitionId: string;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Something that stops a version from running.
|
|
515
|
+
*/
|
|
516
|
+
interface Issue {
|
|
517
|
+
/**
|
|
518
|
+
* The setting the issue is about.
|
|
519
|
+
*/
|
|
520
|
+
field: string;
|
|
521
|
+
message: string;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
export interface AgentDraftDeleteResponse {
|
|
526
|
+
/**
|
|
527
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
528
|
+
* runtime default.
|
|
529
|
+
*/
|
|
530
|
+
data: AgentDraftDeleteResponse.Data;
|
|
531
|
+
}
|
|
532
|
+
export declare namespace AgentDraftDeleteResponse {
|
|
533
|
+
/**
|
|
534
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
535
|
+
* runtime default.
|
|
536
|
+
*/
|
|
537
|
+
interface Data {
|
|
538
|
+
id: string;
|
|
539
|
+
agentId: string;
|
|
540
|
+
/**
|
|
541
|
+
* A background preset.
|
|
542
|
+
*/
|
|
543
|
+
backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
|
|
544
|
+
/**
|
|
545
|
+
* A custom background recording, instead of a preset.
|
|
546
|
+
*/
|
|
547
|
+
backgroundNoiseUrl: string | null;
|
|
548
|
+
/**
|
|
549
|
+
* 0 to 1.
|
|
550
|
+
*/
|
|
551
|
+
backgroundNoiseVolume: number | null;
|
|
552
|
+
/**
|
|
553
|
+
* The published version a draft started from.
|
|
554
|
+
*/
|
|
555
|
+
baseVersionId: string | null;
|
|
556
|
+
callMaxDurationSeconds: number | null;
|
|
557
|
+
callSilenceTimeoutSeconds: number | null;
|
|
558
|
+
chatInactivityTimeoutSeconds: number | null;
|
|
559
|
+
chatMaxDurationSeconds: number | null;
|
|
560
|
+
/**
|
|
561
|
+
* ISO 8601.
|
|
562
|
+
*/
|
|
563
|
+
createdAt: string;
|
|
564
|
+
createdById: string | null;
|
|
565
|
+
createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
|
|
566
|
+
endCallGoodbyeMessage: string | null;
|
|
567
|
+
/**
|
|
568
|
+
* Phrases that end the call when the caller says them, matched anywhere in what
|
|
569
|
+
* they say.
|
|
570
|
+
*/
|
|
571
|
+
endDetectionPhrases: Array<string>;
|
|
572
|
+
/**
|
|
573
|
+
* When the agent may decide to end the call itself.
|
|
574
|
+
*/
|
|
575
|
+
endDetectionReasons: Array<string>;
|
|
576
|
+
/**
|
|
577
|
+
* What the agent says first, with firstMessageMode SPEAK_TEXT.
|
|
578
|
+
*/
|
|
579
|
+
firstMessage: string | null;
|
|
580
|
+
/**
|
|
581
|
+
* The audio a call opens with, with firstMessageMode PLAY_AUDIO.
|
|
582
|
+
*/
|
|
583
|
+
firstMessageAudioUrl: string | null;
|
|
584
|
+
firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
|
|
585
|
+
idleMaxCount: number | null;
|
|
586
|
+
idleMessages: Array<string>;
|
|
587
|
+
idleTimeoutSeconds: number | null;
|
|
588
|
+
interruptionMode: 'ALLOW' | 'BLOCK' | null;
|
|
589
|
+
/**
|
|
590
|
+
* ISO 639-1, e.g. en.
|
|
591
|
+
*/
|
|
592
|
+
language: string | null;
|
|
593
|
+
/**
|
|
594
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
595
|
+
*/
|
|
596
|
+
llmBackendModel: string | null;
|
|
597
|
+
llmMaxTokens: number | null;
|
|
598
|
+
/**
|
|
599
|
+
* Any model id the provider accepts. One model serves every speaker.
|
|
600
|
+
*/
|
|
601
|
+
llmModel: string | null;
|
|
602
|
+
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
603
|
+
/**
|
|
604
|
+
* 0 to 2.
|
|
605
|
+
*/
|
|
606
|
+
llmTemperature: number | null;
|
|
607
|
+
/**
|
|
608
|
+
* Speech-to-speech models only: the model's own voice.
|
|
609
|
+
*/
|
|
610
|
+
llmVoice: string | null;
|
|
611
|
+
/**
|
|
612
|
+
* Whether the agent takes calls, chats, or both.
|
|
613
|
+
*/
|
|
614
|
+
modalities: Array<'call' | 'chat'>;
|
|
615
|
+
/**
|
|
616
|
+
* ISO 8601.
|
|
617
|
+
*/
|
|
618
|
+
publishedAt: string | null;
|
|
619
|
+
publishedById: string | null;
|
|
620
|
+
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
621
|
+
/**
|
|
622
|
+
* Set when this version restores an older one.
|
|
623
|
+
*/
|
|
624
|
+
restoredFromVersionId: string | null;
|
|
625
|
+
/**
|
|
626
|
+
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
627
|
+
* publish.
|
|
628
|
+
*/
|
|
629
|
+
revision: number;
|
|
630
|
+
/**
|
|
631
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
632
|
+
*/
|
|
633
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
634
|
+
sttEndpointingMs: number | null;
|
|
635
|
+
/**
|
|
636
|
+
* Words and phrases the transcriber should listen for.
|
|
637
|
+
*/
|
|
638
|
+
sttKeyterms: Array<string>;
|
|
639
|
+
sttModel: string | null;
|
|
640
|
+
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
641
|
+
sttSmartFormat: boolean | null;
|
|
642
|
+
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
643
|
+
/**
|
|
644
|
+
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
645
|
+
*/
|
|
646
|
+
subAgents: Array<Data.SubAgent>;
|
|
647
|
+
/**
|
|
648
|
+
* What changed, written on publish.
|
|
649
|
+
*/
|
|
650
|
+
summary: string | null;
|
|
651
|
+
/**
|
|
652
|
+
* ISO 8601.
|
|
653
|
+
*/
|
|
654
|
+
updatedAt: string;
|
|
655
|
+
vadStartSecs: number | null;
|
|
656
|
+
vadStopSecs: number | null;
|
|
657
|
+
/**
|
|
658
|
+
* v1, v2, ... assigned on publish; null on a draft.
|
|
659
|
+
*/
|
|
660
|
+
versionNumber: number | null;
|
|
661
|
+
/**
|
|
662
|
+
* Why this version cannot run; empty when it can be published. Returned when
|
|
663
|
+
* reading one version.
|
|
664
|
+
*/
|
|
665
|
+
issues?: Array<Data.Issue>;
|
|
666
|
+
}
|
|
667
|
+
namespace Data {
|
|
668
|
+
/**
|
|
669
|
+
* A speaker in the conversation. On a sub-agent, null voice settings use the main
|
|
670
|
+
* agent's.
|
|
671
|
+
*/
|
|
672
|
+
interface SubAgent {
|
|
673
|
+
handoffs: Array<SubAgent.Handoff>;
|
|
674
|
+
/**
|
|
675
|
+
* The call opens as this sub-agent instead of the main agent.
|
|
676
|
+
*/
|
|
677
|
+
isInitial: boolean;
|
|
678
|
+
/**
|
|
679
|
+
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
680
|
+
*/
|
|
681
|
+
key: string;
|
|
682
|
+
/**
|
|
683
|
+
* How the agent refers to this speaker.
|
|
684
|
+
*/
|
|
685
|
+
name: string | null;
|
|
686
|
+
/**
|
|
687
|
+
* The speaker's prompt.
|
|
688
|
+
*/
|
|
689
|
+
systemPrompt: string | null;
|
|
690
|
+
tools: Array<SubAgent.Tool>;
|
|
691
|
+
ttsModel: string | null;
|
|
692
|
+
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
693
|
+
/**
|
|
694
|
+
* 0 to 1, ElevenLabs.
|
|
695
|
+
*/
|
|
696
|
+
ttsSimilarityBoost: number | null;
|
|
697
|
+
/**
|
|
698
|
+
* 0.5 to 2.
|
|
699
|
+
*/
|
|
700
|
+
ttsSpeed: number | null;
|
|
701
|
+
/**
|
|
702
|
+
* 0 to 1, ElevenLabs.
|
|
703
|
+
*/
|
|
704
|
+
ttsStability: number | null;
|
|
705
|
+
/**
|
|
706
|
+
* Any voice id the provider accepts, including your own voices.
|
|
707
|
+
*/
|
|
708
|
+
ttsVoiceId: string | null;
|
|
709
|
+
}
|
|
710
|
+
namespace SubAgent {
|
|
711
|
+
interface Handoff {
|
|
712
|
+
/**
|
|
713
|
+
* When to hand off, in the words the model is given.
|
|
714
|
+
*/
|
|
715
|
+
description: string;
|
|
716
|
+
/**
|
|
717
|
+
* SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
|
|
718
|
+
*/
|
|
719
|
+
history: 'SHARED' | 'NONE';
|
|
720
|
+
/**
|
|
721
|
+
* Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
|
|
722
|
+
*/
|
|
723
|
+
note: string | null;
|
|
724
|
+
/**
|
|
725
|
+
* At most once per call.
|
|
726
|
+
*/
|
|
727
|
+
once: boolean;
|
|
728
|
+
/**
|
|
729
|
+
* The key of the sub-agent that takes over; `main` for the main agent.
|
|
730
|
+
*/
|
|
731
|
+
to: string;
|
|
732
|
+
}
|
|
733
|
+
interface Tool {
|
|
734
|
+
/**
|
|
735
|
+
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
736
|
+
*/
|
|
737
|
+
pinnedVersion: number | null;
|
|
738
|
+
toolDefinitionId: string;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Something that stops a version from running.
|
|
743
|
+
*/
|
|
744
|
+
interface Issue {
|
|
745
|
+
/**
|
|
746
|
+
* The setting the issue is about.
|
|
747
|
+
*/
|
|
748
|
+
field: string;
|
|
749
|
+
message: string;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
export interface AgentDraftGetResponse {
|
|
754
|
+
/**
|
|
755
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
756
|
+
* runtime default.
|
|
757
|
+
*/
|
|
758
|
+
data: AgentDraftGetResponse.Data;
|
|
759
|
+
}
|
|
760
|
+
export declare namespace AgentDraftGetResponse {
|
|
761
|
+
/**
|
|
762
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
763
|
+
* runtime default.
|
|
764
|
+
*/
|
|
765
|
+
interface Data {
|
|
766
|
+
id: string;
|
|
767
|
+
agentId: string;
|
|
768
|
+
/**
|
|
769
|
+
* A background preset.
|
|
770
|
+
*/
|
|
771
|
+
backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
|
|
772
|
+
/**
|
|
773
|
+
* A custom background recording, instead of a preset.
|
|
774
|
+
*/
|
|
775
|
+
backgroundNoiseUrl: string | null;
|
|
776
|
+
/**
|
|
777
|
+
* 0 to 1.
|
|
778
|
+
*/
|
|
779
|
+
backgroundNoiseVolume: number | null;
|
|
780
|
+
/**
|
|
781
|
+
* The published version a draft started from.
|
|
782
|
+
*/
|
|
783
|
+
baseVersionId: string | null;
|
|
784
|
+
callMaxDurationSeconds: number | null;
|
|
785
|
+
callSilenceTimeoutSeconds: number | null;
|
|
786
|
+
chatInactivityTimeoutSeconds: number | null;
|
|
787
|
+
chatMaxDurationSeconds: number | null;
|
|
788
|
+
/**
|
|
789
|
+
* ISO 8601.
|
|
790
|
+
*/
|
|
791
|
+
createdAt: string;
|
|
792
|
+
createdById: string | null;
|
|
793
|
+
createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
|
|
794
|
+
endCallGoodbyeMessage: string | null;
|
|
795
|
+
/**
|
|
796
|
+
* Phrases that end the call when the caller says them, matched anywhere in what
|
|
797
|
+
* they say.
|
|
798
|
+
*/
|
|
799
|
+
endDetectionPhrases: Array<string>;
|
|
800
|
+
/**
|
|
801
|
+
* When the agent may decide to end the call itself.
|
|
802
|
+
*/
|
|
803
|
+
endDetectionReasons: Array<string>;
|
|
804
|
+
/**
|
|
805
|
+
* What the agent says first, with firstMessageMode SPEAK_TEXT.
|
|
806
|
+
*/
|
|
807
|
+
firstMessage: string | null;
|
|
808
|
+
/**
|
|
809
|
+
* The audio a call opens with, with firstMessageMode PLAY_AUDIO.
|
|
810
|
+
*/
|
|
811
|
+
firstMessageAudioUrl: string | null;
|
|
812
|
+
firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
|
|
813
|
+
idleMaxCount: number | null;
|
|
814
|
+
idleMessages: Array<string>;
|
|
815
|
+
idleTimeoutSeconds: number | null;
|
|
816
|
+
interruptionMode: 'ALLOW' | 'BLOCK' | null;
|
|
817
|
+
/**
|
|
818
|
+
* ISO 639-1, e.g. en.
|
|
819
|
+
*/
|
|
820
|
+
language: string | null;
|
|
821
|
+
/**
|
|
822
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
823
|
+
*/
|
|
824
|
+
llmBackendModel: string | null;
|
|
825
|
+
llmMaxTokens: number | null;
|
|
826
|
+
/**
|
|
827
|
+
* Any model id the provider accepts. One model serves every speaker.
|
|
828
|
+
*/
|
|
829
|
+
llmModel: string | null;
|
|
830
|
+
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
831
|
+
/**
|
|
832
|
+
* 0 to 2.
|
|
833
|
+
*/
|
|
834
|
+
llmTemperature: number | null;
|
|
835
|
+
/**
|
|
836
|
+
* Speech-to-speech models only: the model's own voice.
|
|
837
|
+
*/
|
|
838
|
+
llmVoice: string | null;
|
|
839
|
+
/**
|
|
840
|
+
* Whether the agent takes calls, chats, or both.
|
|
841
|
+
*/
|
|
842
|
+
modalities: Array<'call' | 'chat'>;
|
|
843
|
+
/**
|
|
844
|
+
* ISO 8601.
|
|
845
|
+
*/
|
|
846
|
+
publishedAt: string | null;
|
|
847
|
+
publishedById: string | null;
|
|
848
|
+
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
849
|
+
/**
|
|
850
|
+
* Set when this version restores an older one.
|
|
851
|
+
*/
|
|
852
|
+
restoredFromVersionId: string | null;
|
|
853
|
+
/**
|
|
854
|
+
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
855
|
+
* publish.
|
|
856
|
+
*/
|
|
857
|
+
revision: number;
|
|
858
|
+
/**
|
|
859
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
860
|
+
*/
|
|
861
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
862
|
+
sttEndpointingMs: number | null;
|
|
863
|
+
/**
|
|
864
|
+
* Words and phrases the transcriber should listen for.
|
|
865
|
+
*/
|
|
866
|
+
sttKeyterms: Array<string>;
|
|
867
|
+
sttModel: string | null;
|
|
868
|
+
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
869
|
+
sttSmartFormat: boolean | null;
|
|
870
|
+
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
871
|
+
/**
|
|
872
|
+
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
873
|
+
*/
|
|
874
|
+
subAgents: Array<Data.SubAgent>;
|
|
875
|
+
/**
|
|
876
|
+
* What changed, written on publish.
|
|
877
|
+
*/
|
|
878
|
+
summary: string | null;
|
|
879
|
+
/**
|
|
880
|
+
* ISO 8601.
|
|
881
|
+
*/
|
|
882
|
+
updatedAt: string;
|
|
883
|
+
vadStartSecs: number | null;
|
|
884
|
+
vadStopSecs: number | null;
|
|
885
|
+
/**
|
|
886
|
+
* v1, v2, ... assigned on publish; null on a draft.
|
|
887
|
+
*/
|
|
888
|
+
versionNumber: number | null;
|
|
889
|
+
/**
|
|
890
|
+
* Why this version cannot run; empty when it can be published. Returned when
|
|
891
|
+
* reading one version.
|
|
892
|
+
*/
|
|
893
|
+
issues?: Array<Data.Issue>;
|
|
894
|
+
}
|
|
895
|
+
namespace Data {
|
|
896
|
+
/**
|
|
897
|
+
* A speaker in the conversation. On a sub-agent, null voice settings use the main
|
|
898
|
+
* agent's.
|
|
899
|
+
*/
|
|
900
|
+
interface SubAgent {
|
|
901
|
+
handoffs: Array<SubAgent.Handoff>;
|
|
902
|
+
/**
|
|
903
|
+
* The call opens as this sub-agent instead of the main agent.
|
|
904
|
+
*/
|
|
905
|
+
isInitial: boolean;
|
|
906
|
+
/**
|
|
907
|
+
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
908
|
+
*/
|
|
909
|
+
key: string;
|
|
910
|
+
/**
|
|
911
|
+
* How the agent refers to this speaker.
|
|
912
|
+
*/
|
|
913
|
+
name: string | null;
|
|
914
|
+
/**
|
|
915
|
+
* The speaker's prompt.
|
|
916
|
+
*/
|
|
917
|
+
systemPrompt: string | null;
|
|
918
|
+
tools: Array<SubAgent.Tool>;
|
|
919
|
+
ttsModel: string | null;
|
|
920
|
+
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
921
|
+
/**
|
|
922
|
+
* 0 to 1, ElevenLabs.
|
|
923
|
+
*/
|
|
924
|
+
ttsSimilarityBoost: number | null;
|
|
925
|
+
/**
|
|
926
|
+
* 0.5 to 2.
|
|
927
|
+
*/
|
|
928
|
+
ttsSpeed: number | null;
|
|
929
|
+
/**
|
|
930
|
+
* 0 to 1, ElevenLabs.
|
|
931
|
+
*/
|
|
932
|
+
ttsStability: number | null;
|
|
933
|
+
/**
|
|
934
|
+
* Any voice id the provider accepts, including your own voices.
|
|
935
|
+
*/
|
|
936
|
+
ttsVoiceId: string | null;
|
|
937
|
+
}
|
|
938
|
+
namespace SubAgent {
|
|
939
|
+
interface Handoff {
|
|
940
|
+
/**
|
|
941
|
+
* When to hand off, in the words the model is given.
|
|
942
|
+
*/
|
|
943
|
+
description: string;
|
|
944
|
+
/**
|
|
945
|
+
* SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
|
|
946
|
+
*/
|
|
947
|
+
history: 'SHARED' | 'NONE';
|
|
948
|
+
/**
|
|
949
|
+
* Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
|
|
950
|
+
*/
|
|
951
|
+
note: string | null;
|
|
952
|
+
/**
|
|
953
|
+
* At most once per call.
|
|
954
|
+
*/
|
|
955
|
+
once: boolean;
|
|
956
|
+
/**
|
|
957
|
+
* The key of the sub-agent that takes over; `main` for the main agent.
|
|
958
|
+
*/
|
|
959
|
+
to: string;
|
|
960
|
+
}
|
|
961
|
+
interface Tool {
|
|
962
|
+
/**
|
|
963
|
+
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
964
|
+
*/
|
|
965
|
+
pinnedVersion: number | null;
|
|
966
|
+
toolDefinitionId: string;
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* Something that stops a version from running.
|
|
971
|
+
*/
|
|
972
|
+
interface Issue {
|
|
973
|
+
/**
|
|
974
|
+
* The setting the issue is about.
|
|
975
|
+
*/
|
|
976
|
+
field: string;
|
|
977
|
+
message: string;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
export interface AgentDraftPublishResponse {
|
|
982
|
+
/**
|
|
983
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
984
|
+
* runtime default.
|
|
985
|
+
*/
|
|
986
|
+
data: AgentDraftPublishResponse.Data;
|
|
987
|
+
}
|
|
988
|
+
export declare namespace AgentDraftPublishResponse {
|
|
989
|
+
/**
|
|
990
|
+
* One version of a Roark-hosted agent's configuration. Null settings use the
|
|
991
|
+
* runtime default.
|
|
992
|
+
*/
|
|
993
|
+
interface Data {
|
|
994
|
+
id: string;
|
|
995
|
+
agentId: string;
|
|
996
|
+
/**
|
|
997
|
+
* A background preset.
|
|
998
|
+
*/
|
|
999
|
+
backgroundNoise: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
|
|
1000
|
+
/**
|
|
1001
|
+
* A custom background recording, instead of a preset.
|
|
1002
|
+
*/
|
|
1003
|
+
backgroundNoiseUrl: string | null;
|
|
1004
|
+
/**
|
|
1005
|
+
* 0 to 1.
|
|
1006
|
+
*/
|
|
1007
|
+
backgroundNoiseVolume: number | null;
|
|
1008
|
+
/**
|
|
1009
|
+
* The published version a draft started from.
|
|
1010
|
+
*/
|
|
1011
|
+
baseVersionId: string | null;
|
|
1012
|
+
callMaxDurationSeconds: number | null;
|
|
1013
|
+
callSilenceTimeoutSeconds: number | null;
|
|
1014
|
+
chatInactivityTimeoutSeconds: number | null;
|
|
1015
|
+
chatMaxDurationSeconds: number | null;
|
|
1016
|
+
/**
|
|
1017
|
+
* ISO 8601.
|
|
1018
|
+
*/
|
|
1019
|
+
createdAt: string;
|
|
1020
|
+
createdById: string | null;
|
|
1021
|
+
createdByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM';
|
|
1022
|
+
endCallGoodbyeMessage: string | null;
|
|
1023
|
+
/**
|
|
1024
|
+
* Phrases that end the call when the caller says them, matched anywhere in what
|
|
1025
|
+
* they say.
|
|
1026
|
+
*/
|
|
1027
|
+
endDetectionPhrases: Array<string>;
|
|
1028
|
+
/**
|
|
1029
|
+
* When the agent may decide to end the call itself.
|
|
1030
|
+
*/
|
|
1031
|
+
endDetectionReasons: Array<string>;
|
|
1032
|
+
/**
|
|
1033
|
+
* What the agent says first, with firstMessageMode SPEAK_TEXT.
|
|
1034
|
+
*/
|
|
1035
|
+
firstMessage: string | null;
|
|
1036
|
+
/**
|
|
1037
|
+
* The audio a call opens with, with firstMessageMode PLAY_AUDIO.
|
|
1038
|
+
*/
|
|
1039
|
+
firstMessageAudioUrl: string | null;
|
|
1040
|
+
firstMessageMode: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
|
|
1041
|
+
idleMaxCount: number | null;
|
|
1042
|
+
idleMessages: Array<string>;
|
|
1043
|
+
idleTimeoutSeconds: number | null;
|
|
1044
|
+
interruptionMode: 'ALLOW' | 'BLOCK' | null;
|
|
1045
|
+
/**
|
|
1046
|
+
* ISO 639-1, e.g. en.
|
|
1047
|
+
*/
|
|
1048
|
+
language: string | null;
|
|
1049
|
+
/**
|
|
1050
|
+
* OpenAI Live models only: the text model they delegate to.
|
|
1051
|
+
*/
|
|
1052
|
+
llmBackendModel: string | null;
|
|
1053
|
+
llmMaxTokens: number | null;
|
|
1054
|
+
/**
|
|
1055
|
+
* Any model id the provider accepts. One model serves every speaker.
|
|
1056
|
+
*/
|
|
1057
|
+
llmModel: string | null;
|
|
1058
|
+
llmProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
1059
|
+
/**
|
|
1060
|
+
* 0 to 2.
|
|
1061
|
+
*/
|
|
1062
|
+
llmTemperature: number | null;
|
|
1063
|
+
/**
|
|
1064
|
+
* Speech-to-speech models only: the model's own voice.
|
|
1065
|
+
*/
|
|
1066
|
+
llmVoice: string | null;
|
|
1067
|
+
/**
|
|
1068
|
+
* Whether the agent takes calls, chats, or both.
|
|
1069
|
+
*/
|
|
1070
|
+
modalities: Array<'call' | 'chat'>;
|
|
1071
|
+
/**
|
|
1072
|
+
* ISO 8601.
|
|
1073
|
+
*/
|
|
1074
|
+
publishedAt: string | null;
|
|
1075
|
+
publishedById: string | null;
|
|
1076
|
+
publishedByType: 'USER' | 'API' | 'CONFIG' | 'AUTOIMPROVE' | 'INTEGRATION' | 'SYSTEM' | null;
|
|
1077
|
+
/**
|
|
1078
|
+
* Set when this version restores an older one.
|
|
1079
|
+
*/
|
|
1080
|
+
restoredFromVersionId: string | null;
|
|
1081
|
+
/**
|
|
1082
|
+
* Increases with every edit to a draft. Send it back as expectedRevision when you
|
|
1083
|
+
* publish.
|
|
1084
|
+
*/
|
|
1085
|
+
revision: number;
|
|
1086
|
+
/**
|
|
1087
|
+
* DRAFT while being edited, PUBLISHED once it has been live.
|
|
1088
|
+
*/
|
|
1089
|
+
status: 'DRAFT' | 'PUBLISHED' | 'DISCARDED';
|
|
1090
|
+
sttEndpointingMs: number | null;
|
|
1091
|
+
/**
|
|
1092
|
+
* Words and phrases the transcriber should listen for.
|
|
1093
|
+
*/
|
|
1094
|
+
sttKeyterms: Array<string>;
|
|
1095
|
+
sttModel: string | null;
|
|
1096
|
+
sttProvider: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
1097
|
+
sttSmartFormat: boolean | null;
|
|
1098
|
+
sttTurnDetection: 'pipeline' | 'provider' | null;
|
|
1099
|
+
/**
|
|
1100
|
+
* The main agent (key `main`) first, then the sub-agents it can hand the call to.
|
|
1101
|
+
*/
|
|
1102
|
+
subAgents: Array<Data.SubAgent>;
|
|
1103
|
+
/**
|
|
1104
|
+
* What changed, written on publish.
|
|
1105
|
+
*/
|
|
1106
|
+
summary: string | null;
|
|
1107
|
+
/**
|
|
1108
|
+
* ISO 8601.
|
|
1109
|
+
*/
|
|
1110
|
+
updatedAt: string;
|
|
1111
|
+
vadStartSecs: number | null;
|
|
1112
|
+
vadStopSecs: number | null;
|
|
1113
|
+
/**
|
|
1114
|
+
* v1, v2, ... assigned on publish; null on a draft.
|
|
1115
|
+
*/
|
|
1116
|
+
versionNumber: number | null;
|
|
1117
|
+
/**
|
|
1118
|
+
* Why this version cannot run; empty when it can be published. Returned when
|
|
1119
|
+
* reading one version.
|
|
1120
|
+
*/
|
|
1121
|
+
issues?: Array<Data.Issue>;
|
|
1122
|
+
}
|
|
1123
|
+
namespace Data {
|
|
1124
|
+
/**
|
|
1125
|
+
* A speaker in the conversation. On a sub-agent, null voice settings use the main
|
|
1126
|
+
* agent's.
|
|
1127
|
+
*/
|
|
1128
|
+
interface SubAgent {
|
|
1129
|
+
handoffs: Array<SubAgent.Handoff>;
|
|
1130
|
+
/**
|
|
1131
|
+
* The call opens as this sub-agent instead of the main agent.
|
|
1132
|
+
*/
|
|
1133
|
+
isInitial: boolean;
|
|
1134
|
+
/**
|
|
1135
|
+
* `main` for the main agent; otherwise letters, digits, `_` or `-`.
|
|
1136
|
+
*/
|
|
1137
|
+
key: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* How the agent refers to this speaker.
|
|
1140
|
+
*/
|
|
1141
|
+
name: string | null;
|
|
1142
|
+
/**
|
|
1143
|
+
* The speaker's prompt.
|
|
1144
|
+
*/
|
|
1145
|
+
systemPrompt: string | null;
|
|
1146
|
+
tools: Array<SubAgent.Tool>;
|
|
1147
|
+
ttsModel: string | null;
|
|
1148
|
+
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
1149
|
+
/**
|
|
1150
|
+
* 0 to 1, ElevenLabs.
|
|
1151
|
+
*/
|
|
1152
|
+
ttsSimilarityBoost: number | null;
|
|
1153
|
+
/**
|
|
1154
|
+
* 0.5 to 2.
|
|
1155
|
+
*/
|
|
1156
|
+
ttsSpeed: number | null;
|
|
1157
|
+
/**
|
|
1158
|
+
* 0 to 1, ElevenLabs.
|
|
1159
|
+
*/
|
|
1160
|
+
ttsStability: number | null;
|
|
1161
|
+
/**
|
|
1162
|
+
* Any voice id the provider accepts, including your own voices.
|
|
1163
|
+
*/
|
|
1164
|
+
ttsVoiceId: string | null;
|
|
1165
|
+
}
|
|
1166
|
+
namespace SubAgent {
|
|
1167
|
+
interface Handoff {
|
|
1168
|
+
/**
|
|
1169
|
+
* When to hand off, in the words the model is given.
|
|
1170
|
+
*/
|
|
1171
|
+
description: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* SHARED: the new speaker hears the conversation so far. NONE: it starts fresh.
|
|
1174
|
+
*/
|
|
1175
|
+
history: 'SHARED' | 'NONE';
|
|
1176
|
+
/**
|
|
1177
|
+
* Added to the new speaker's prompt at the handoff, such as a warm-transfer brief.
|
|
1178
|
+
*/
|
|
1179
|
+
note: string | null;
|
|
1180
|
+
/**
|
|
1181
|
+
* At most once per call.
|
|
1182
|
+
*/
|
|
1183
|
+
once: boolean;
|
|
1184
|
+
/**
|
|
1185
|
+
* The key of the sub-agent that takes over; `main` for the main agent.
|
|
1186
|
+
*/
|
|
1187
|
+
to: string;
|
|
1188
|
+
}
|
|
1189
|
+
interface Tool {
|
|
1190
|
+
/**
|
|
1191
|
+
* The tool version the agent runs; null runs the tool's latest declared version.
|
|
1192
|
+
*/
|
|
1193
|
+
pinnedVersion: number | null;
|
|
1194
|
+
toolDefinitionId: string;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
/**
|
|
1198
|
+
* Something that stops a version from running.
|
|
1199
|
+
*/
|
|
1200
|
+
interface Issue {
|
|
1201
|
+
/**
|
|
1202
|
+
* The setting the issue is about.
|
|
1203
|
+
*/
|
|
1204
|
+
field: string;
|
|
1205
|
+
message: string;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
export interface AgentDraftCreateParams {
|
|
1210
|
+
/**
|
|
1211
|
+
* Start from this published version instead of the live one.
|
|
1212
|
+
*/
|
|
1213
|
+
fromVersionId?: string;
|
|
1214
|
+
}
|
|
1215
|
+
export interface AgentDraftUpdateParams {
|
|
1216
|
+
/**
|
|
1217
|
+
* The settings to change. Omitted settings stay as they are; null clears one to
|
|
1218
|
+
* the runtime default. subAgents replaces every speaker and must include `main`.
|
|
1219
|
+
*/
|
|
1220
|
+
settings: AgentDraftUpdateParams.Settings;
|
|
1221
|
+
/**
|
|
1222
|
+
* The draft's revision when you read it. When sent, the edit is refused if the
|
|
1223
|
+
* draft changed since; when omitted, it applies on top of the latest edit.
|
|
1224
|
+
*/
|
|
1225
|
+
expectedRevision?: number;
|
|
1226
|
+
}
|
|
1227
|
+
export declare namespace AgentDraftUpdateParams {
|
|
1228
|
+
/**
|
|
1229
|
+
* The settings to change. Omitted settings stay as they are; null clears one to
|
|
1230
|
+
* the runtime default. subAgents replaces every speaker and must include `main`.
|
|
1231
|
+
*/
|
|
1232
|
+
interface Settings {
|
|
1233
|
+
backgroundNoise?: 'NONE' | 'AIRPORT' | 'CHILDREN_PLAYING' | 'CITY' | 'COFFEE_SHOP' | 'CONSTRUCTION' | 'CRYING_BABY' | 'DRIVING' | 'LIBRARY' | 'OFFICE' | 'THUNDERSTORM' | 'TRAIN' | null;
|
|
1234
|
+
backgroundNoiseUrl?: string | null;
|
|
1235
|
+
backgroundNoiseVolume?: number | null;
|
|
1236
|
+
callMaxDurationSeconds?: number | null;
|
|
1237
|
+
callSilenceTimeoutSeconds?: number | null;
|
|
1238
|
+
chatInactivityTimeoutSeconds?: number | null;
|
|
1239
|
+
chatMaxDurationSeconds?: number | null;
|
|
1240
|
+
endCallGoodbyeMessage?: string | null;
|
|
1241
|
+
endDetectionPhrases?: Array<string>;
|
|
1242
|
+
endDetectionReasons?: Array<string>;
|
|
1243
|
+
firstMessage?: string | null;
|
|
1244
|
+
firstMessageAudioUrl?: string | null;
|
|
1245
|
+
firstMessageMode?: 'SPEAK_TEXT' | 'PLAY_AUDIO' | 'WAIT_FOR_CALLER' | null;
|
|
1246
|
+
idleMaxCount?: number | null;
|
|
1247
|
+
idleMessages?: Array<string>;
|
|
1248
|
+
idleTimeoutSeconds?: number | null;
|
|
1249
|
+
interruptionMode?: 'ALLOW' | 'BLOCK' | null;
|
|
1250
|
+
language?: string | null;
|
|
1251
|
+
llmBackendModel?: string | null;
|
|
1252
|
+
llmMaxTokens?: number | null;
|
|
1253
|
+
llmModel?: string | null;
|
|
1254
|
+
llmProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'XAI' | 'ULTRAVOX' | 'AWS' | 'ELEVENLABS' | null;
|
|
1255
|
+
llmTemperature?: number | null;
|
|
1256
|
+
llmVoice?: string | null;
|
|
1257
|
+
modalities?: Array<'call' | 'chat'>;
|
|
1258
|
+
sttEndpointingMs?: number | null;
|
|
1259
|
+
sttKeyterms?: Array<string>;
|
|
1260
|
+
sttModel?: string | null;
|
|
1261
|
+
sttProvider?: 'DEEPGRAM' | 'OPENAI_WHISPER' | 'SPEECHMATICS' | 'ASSEMBLYAI' | 'ELEVENLABS' | null;
|
|
1262
|
+
sttSmartFormat?: boolean | null;
|
|
1263
|
+
sttTurnDetection?: 'pipeline' | 'provider' | null;
|
|
1264
|
+
subAgents?: Array<Settings.SubAgent>;
|
|
1265
|
+
vadStartSecs?: number | null;
|
|
1266
|
+
vadStopSecs?: number | null;
|
|
1267
|
+
}
|
|
1268
|
+
namespace Settings {
|
|
1269
|
+
interface SubAgent {
|
|
1270
|
+
handoffs: Array<SubAgent.Handoff>;
|
|
1271
|
+
isInitial: boolean;
|
|
1272
|
+
key: 'main' | string;
|
|
1273
|
+
name: string | null;
|
|
1274
|
+
systemPrompt: string | null;
|
|
1275
|
+
tools: Array<SubAgent.Tool>;
|
|
1276
|
+
ttsModel: string | null;
|
|
1277
|
+
ttsProvider: 'CARTESIA' | 'ELEVENLABS' | 'OPENAI' | 'RIME' | null;
|
|
1278
|
+
ttsSimilarityBoost: number | null;
|
|
1279
|
+
ttsSpeed: number | null;
|
|
1280
|
+
ttsStability: number | null;
|
|
1281
|
+
ttsVoiceId: string | null;
|
|
1282
|
+
}
|
|
1283
|
+
namespace SubAgent {
|
|
1284
|
+
interface Handoff {
|
|
1285
|
+
description: string;
|
|
1286
|
+
history: 'SHARED' | 'NONE';
|
|
1287
|
+
note: string | null;
|
|
1288
|
+
once: boolean;
|
|
1289
|
+
to: 'main' | string;
|
|
1290
|
+
}
|
|
1291
|
+
interface Tool {
|
|
1292
|
+
pinnedVersion: number | null;
|
|
1293
|
+
toolDefinitionId: string;
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
export interface AgentDraftPublishParams {
|
|
1299
|
+
/**
|
|
1300
|
+
* The draft revision you reviewed.
|
|
1301
|
+
*/
|
|
1302
|
+
expectedRevision: number;
|
|
1303
|
+
/**
|
|
1304
|
+
* What changed.
|
|
1305
|
+
*/
|
|
1306
|
+
summary?: string;
|
|
1307
|
+
}
|
|
1308
|
+
export declare namespace AgentDraft {
|
|
1309
|
+
export { type AgentDraftCreateResponse as AgentDraftCreateResponse, type AgentDraftUpdateResponse as AgentDraftUpdateResponse, type AgentDraftDeleteResponse as AgentDraftDeleteResponse, type AgentDraftGetResponse as AgentDraftGetResponse, type AgentDraftPublishResponse as AgentDraftPublishResponse, type AgentDraftCreateParams as AgentDraftCreateParams, type AgentDraftUpdateParams as AgentDraftUpdateParams, type AgentDraftPublishParams as AgentDraftPublishParams, };
|
|
1310
|
+
}
|
|
1311
|
+
//# sourceMappingURL=agent-draft.d.ts.map
|