@roarkanalytics/sdk 5.2.0 → 5.4.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 +24 -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/config.d.mts +416 -8
- package/resources/config.d.mts.map +1 -1
- package/resources/config.d.ts +416 -8
- package/resources/config.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/resources/simulation-group.d.mts +777 -0
- package/resources/simulation-group.d.mts.map +1 -0
- package/resources/simulation-group.d.ts +777 -0
- package/resources/simulation-group.d.ts.map +1 -0
- package/resources/simulation-group.js +116 -0
- package/resources/simulation-group.js.map +1 -0
- package/resources/simulation-group.mjs +112 -0
- package/resources/simulation-group.mjs.map +1 -0
- package/resources/simulation-run-group.d.mts +890 -0
- package/resources/simulation-run-group.d.mts.map +1 -0
- package/resources/simulation-run-group.d.ts +890 -0
- package/resources/simulation-run-group.d.ts.map +1 -0
- package/resources/simulation-run-group.js +91 -0
- package/resources/simulation-run-group.js.map +1 -0
- package/resources/simulation-run-group.mjs +87 -0
- package/resources/simulation-run-group.mjs.map +1 -0
- package/src/client.ts +50 -0
- package/src/resources/config.ts +759 -31
- package/src/resources/index.ts +22 -0
- package/src/resources/simulation-group.ts +1105 -0
- package/src/resources/simulation-run-group.ts +1489 -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,1489 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
import { path } from '../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class SimulationRunGroup extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Groups several simulation runs so they read as one, and starts generating the
|
|
11
|
+
* group report: one document across every run, with a scorecard summed across them
|
|
12
|
+
* and the issues found, each merged from the per-run debriefs.
|
|
13
|
+
*
|
|
14
|
+
* Send `simulationRunPlanJobIds` to group runs that already exist (runs still in
|
|
15
|
+
* progress are fine: the report waits for them). Send `simulationRunPlanIds` to
|
|
16
|
+
* start one run of each plan and group those; this places real calls, exactly as
|
|
17
|
+
* starting each plan would.
|
|
18
|
+
*
|
|
19
|
+
* Poll GET /v1/simulation/run-group/{groupId} until `latestReport.status` is
|
|
20
|
+
* READY.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const simulationRunGroup =
|
|
25
|
+
* await client.simulationRunGroup.create();
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
create(
|
|
29
|
+
body: SimulationRunGroupCreateParams | null | undefined = {},
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<SimulationRunGroupCreateResponse> {
|
|
32
|
+
return this._client.post('/v1/simulation/run-group', { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Returns the run groups in the project, newest first, with their runs and where
|
|
37
|
+
* each group report stands. Read a report document from GET
|
|
38
|
+
* /v1/simulation/run-group/{groupId}.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const simulationRunGroups =
|
|
43
|
+
* await client.simulationRunGroup.list();
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
list(
|
|
47
|
+
query: SimulationRunGroupListParams | null | undefined = {},
|
|
48
|
+
options?: RequestOptions,
|
|
49
|
+
): APIPromise<SimulationRunGroupListResponse> {
|
|
50
|
+
return this._client.get('/v1/simulation/run-group', { query, ...options });
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Deletes a run group. Its runs, and their results, are untouched.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const simulationRunGroup =
|
|
59
|
+
* await client.simulationRunGroup.delete(
|
|
60
|
+
* '5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
delete(groupID: string, options?: RequestOptions): APIPromise<SimulationRunGroupDeleteResponse> {
|
|
65
|
+
return this._client.delete(path`/v1/simulation/run-group/${groupID}`, options);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns a run group with its runs in group order and its latest group report,
|
|
70
|
+
* including the report document once READY.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const response = await client.simulationRunGroup.getByID(
|
|
75
|
+
* '5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
|
|
76
|
+
* );
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
getByID(groupID: string, options?: RequestOptions): APIPromise<SimulationRunGroupGetByIDResponse> {
|
|
80
|
+
return this._client.get(path`/v1/simulation/run-group/${groupID}`, options);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Generates the group report again over the latest state of its runs. Returns the
|
|
85
|
+
* report generation; if one is already in flight it is returned instead of
|
|
86
|
+
* starting another. Poll GET /v1/simulation/run-group/{groupId} until
|
|
87
|
+
* `latestReport.status` is READY.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const response =
|
|
92
|
+
* await client.simulationRunGroup.regenerateReport(
|
|
93
|
+
* '5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
regenerateReport(
|
|
98
|
+
groupID: string,
|
|
99
|
+
options?: RequestOptions,
|
|
100
|
+
): APIPromise<SimulationRunGroupRegenerateReportResponse> {
|
|
101
|
+
return this._client.post(path`/v1/simulation/run-group/${groupID}/report`, options);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface SimulationRunGroupCreateResponse {
|
|
106
|
+
/**
|
|
107
|
+
* Several simulation runs read as one.
|
|
108
|
+
*/
|
|
109
|
+
data: SimulationRunGroupCreateResponse.Data;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export namespace SimulationRunGroupCreateResponse {
|
|
113
|
+
/**
|
|
114
|
+
* Several simulation runs read as one.
|
|
115
|
+
*/
|
|
116
|
+
export interface Data {
|
|
117
|
+
id: string;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* ISO 8601
|
|
121
|
+
*/
|
|
122
|
+
createdAt: string;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* One generation of the group report.
|
|
126
|
+
*/
|
|
127
|
+
latestReport: Data.LatestReport | null;
|
|
128
|
+
|
|
129
|
+
name: string;
|
|
130
|
+
|
|
131
|
+
runCount: number;
|
|
132
|
+
|
|
133
|
+
runs: Array<Data.Run>;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export namespace Data {
|
|
137
|
+
/**
|
|
138
|
+
* One generation of the group report.
|
|
139
|
+
*/
|
|
140
|
+
export interface LatestReport {
|
|
141
|
+
id: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* ISO 8601. Null until the report settles.
|
|
145
|
+
*/
|
|
146
|
+
completedAt: string | null;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* ISO 8601
|
|
150
|
+
*/
|
|
151
|
+
createdAt: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The group report: the runs it covers, a scorecard summed across them, what went
|
|
155
|
+
* well, and the issues found, each merged from the per-run debriefs with
|
|
156
|
+
* call-level evidence. Every figure is computed from the runs; the prose is
|
|
157
|
+
* AI-written around those facts.
|
|
158
|
+
*/
|
|
159
|
+
document: LatestReport.Document | null;
|
|
160
|
+
|
|
161
|
+
errorMessage: string | null;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* PENDING and GENERATING are in flight; READY carries the document; FAILED carries
|
|
165
|
+
* errorMessage.
|
|
166
|
+
*/
|
|
167
|
+
status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export namespace LatestReport {
|
|
171
|
+
/**
|
|
172
|
+
* The group report: the runs it covers, a scorecard summed across them, what went
|
|
173
|
+
* well, and the issues found, each merged from the per-run debriefs with
|
|
174
|
+
* call-level evidence. Every figure is computed from the runs; the prose is
|
|
175
|
+
* AI-written around those facts.
|
|
176
|
+
*/
|
|
177
|
+
export interface Document {
|
|
178
|
+
aggregates: Array<Document.Aggregate>;
|
|
179
|
+
|
|
180
|
+
executiveSummary: Array<Document.ExecutiveSummary>;
|
|
181
|
+
|
|
182
|
+
generatedAtIso: string;
|
|
183
|
+
|
|
184
|
+
headline: Document.Headline;
|
|
185
|
+
|
|
186
|
+
issues: Array<Document.Issue>;
|
|
187
|
+
|
|
188
|
+
methodology: string;
|
|
189
|
+
|
|
190
|
+
model: string;
|
|
191
|
+
|
|
192
|
+
recommendations: Array<Document.Recommendation>;
|
|
193
|
+
|
|
194
|
+
runs: Array<Document.Run>;
|
|
195
|
+
|
|
196
|
+
scorecard: Array<Document.Scorecard>;
|
|
197
|
+
|
|
198
|
+
simulationRunGroupId: string;
|
|
199
|
+
|
|
200
|
+
smallerItems: Array<Document.SmallerItem>;
|
|
201
|
+
|
|
202
|
+
version: 1;
|
|
203
|
+
|
|
204
|
+
wentWell: Array<Document.WentWell>;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export namespace Document {
|
|
208
|
+
export interface Aggregate {
|
|
209
|
+
averageLabel: string | null;
|
|
210
|
+
|
|
211
|
+
evaluatedCount: number;
|
|
212
|
+
|
|
213
|
+
medianLabel: string | null;
|
|
214
|
+
|
|
215
|
+
metricName: string;
|
|
216
|
+
|
|
217
|
+
p95Label: string | null;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface ExecutiveSummary {
|
|
221
|
+
body: string;
|
|
222
|
+
|
|
223
|
+
heading: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface Headline {
|
|
227
|
+
callCount: number;
|
|
228
|
+
|
|
229
|
+
completedAtIso: string | null;
|
|
230
|
+
|
|
231
|
+
groupName: string;
|
|
232
|
+
|
|
233
|
+
passedRunCount: number;
|
|
234
|
+
|
|
235
|
+
reportedRunCount: number;
|
|
236
|
+
|
|
237
|
+
runCount: number;
|
|
238
|
+
|
|
239
|
+
statTiles: Array<Headline.StatTile>;
|
|
240
|
+
|
|
241
|
+
verdict: 'PASSED' | 'THRESHOLD_FAILED';
|
|
242
|
+
|
|
243
|
+
verdictProse: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export namespace Headline {
|
|
247
|
+
export interface StatTile {
|
|
248
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
249
|
+
|
|
250
|
+
label: string;
|
|
251
|
+
|
|
252
|
+
sub: string | null;
|
|
253
|
+
|
|
254
|
+
value: string;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface Issue {
|
|
259
|
+
affectedCallCount: number;
|
|
260
|
+
|
|
261
|
+
body: string;
|
|
262
|
+
|
|
263
|
+
calls: Array<Issue.Call>;
|
|
264
|
+
|
|
265
|
+
checkNames: Array<string>;
|
|
266
|
+
|
|
267
|
+
evidence: Array<Issue.Evidence>;
|
|
268
|
+
|
|
269
|
+
order: number;
|
|
270
|
+
|
|
271
|
+
rootCauseChannel:
|
|
272
|
+
| 'PROMPT'
|
|
273
|
+
| 'VOICE_CONFIG'
|
|
274
|
+
| 'STT'
|
|
275
|
+
| 'SPEECH_MODEL'
|
|
276
|
+
| 'LLM_MODEL'
|
|
277
|
+
| 'INFRA'
|
|
278
|
+
| 'EXTERNAL'
|
|
279
|
+
| null;
|
|
280
|
+
|
|
281
|
+
runLabels: Array<string>;
|
|
282
|
+
|
|
283
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
284
|
+
|
|
285
|
+
sourceThemes: Array<Issue.SourceTheme>;
|
|
286
|
+
|
|
287
|
+
title: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export namespace Issue {
|
|
291
|
+
export interface Call {
|
|
292
|
+
callId: string | null;
|
|
293
|
+
|
|
294
|
+
conversationId: string;
|
|
295
|
+
|
|
296
|
+
cueMs: number | null;
|
|
297
|
+
|
|
298
|
+
personaName: string | null;
|
|
299
|
+
|
|
300
|
+
simulationRunPlanJobId: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface Evidence {
|
|
304
|
+
callId: string | null;
|
|
305
|
+
|
|
306
|
+
conversationId: string;
|
|
307
|
+
|
|
308
|
+
cueMs: number | null;
|
|
309
|
+
|
|
310
|
+
personaName: string | null;
|
|
311
|
+
|
|
312
|
+
simulationRunPlanJobId: string;
|
|
313
|
+
|
|
314
|
+
text: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface SourceTheme {
|
|
318
|
+
simulationRunPlanJobId: string;
|
|
319
|
+
|
|
320
|
+
slug: string;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
export interface Recommendation {
|
|
325
|
+
body: string;
|
|
326
|
+
|
|
327
|
+
channel:
|
|
328
|
+
| 'PROMPT'
|
|
329
|
+
| 'VOICE_CONFIG'
|
|
330
|
+
| 'STT'
|
|
331
|
+
| 'SPEECH_MODEL'
|
|
332
|
+
| 'LLM_MODEL'
|
|
333
|
+
| 'INFRA'
|
|
334
|
+
| 'EXTERNAL'
|
|
335
|
+
| null;
|
|
336
|
+
|
|
337
|
+
issueOrders: Array<number>;
|
|
338
|
+
|
|
339
|
+
order: number;
|
|
340
|
+
|
|
341
|
+
title: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export interface Run {
|
|
345
|
+
callCount: number;
|
|
346
|
+
|
|
347
|
+
checksPassed: number;
|
|
348
|
+
|
|
349
|
+
checksTotal: number;
|
|
350
|
+
|
|
351
|
+
completedAtIso: string | null;
|
|
352
|
+
|
|
353
|
+
runLabel: string;
|
|
354
|
+
|
|
355
|
+
runNumber: number | null;
|
|
356
|
+
|
|
357
|
+
simulationRunPlanJobId: string;
|
|
358
|
+
|
|
359
|
+
status:
|
|
360
|
+
| 'PENDING'
|
|
361
|
+
| 'QUEUED'
|
|
362
|
+
| 'CREATING_SNAPSHOTS'
|
|
363
|
+
| 'CREATING_SIMULATIONS'
|
|
364
|
+
| 'PREPARING_CAPACITY'
|
|
365
|
+
| 'RUNNING_SIMULATIONS'
|
|
366
|
+
| 'COMPLETED'
|
|
367
|
+
| 'FAILED'
|
|
368
|
+
| 'TIMED_OUT'
|
|
369
|
+
| 'CANCELLED'
|
|
370
|
+
| 'CANCELLING'
|
|
371
|
+
| 'ENDING_SIMULATIONS';
|
|
372
|
+
|
|
373
|
+
summary: string | null;
|
|
374
|
+
|
|
375
|
+
themeCount: number;
|
|
376
|
+
|
|
377
|
+
verdict: 'PASSED' | 'THRESHOLD_FAILED' | null;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export interface Scorecard {
|
|
381
|
+
checkName: string;
|
|
382
|
+
|
|
383
|
+
evaluatedCount: number;
|
|
384
|
+
|
|
385
|
+
failedCount: number;
|
|
386
|
+
|
|
387
|
+
failedRunCount: number;
|
|
388
|
+
|
|
389
|
+
passRatePct: number | null;
|
|
390
|
+
|
|
391
|
+
runCount: number;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export interface SmallerItem {
|
|
395
|
+
affectedCallCount: number;
|
|
396
|
+
|
|
397
|
+
body: string;
|
|
398
|
+
|
|
399
|
+
calls: Array<SmallerItem.Call>;
|
|
400
|
+
|
|
401
|
+
checkNames: Array<string>;
|
|
402
|
+
|
|
403
|
+
evidence: Array<SmallerItem.Evidence>;
|
|
404
|
+
|
|
405
|
+
order: number;
|
|
406
|
+
|
|
407
|
+
rootCauseChannel:
|
|
408
|
+
| 'PROMPT'
|
|
409
|
+
| 'VOICE_CONFIG'
|
|
410
|
+
| 'STT'
|
|
411
|
+
| 'SPEECH_MODEL'
|
|
412
|
+
| 'LLM_MODEL'
|
|
413
|
+
| 'INFRA'
|
|
414
|
+
| 'EXTERNAL'
|
|
415
|
+
| null;
|
|
416
|
+
|
|
417
|
+
runLabels: Array<string>;
|
|
418
|
+
|
|
419
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
420
|
+
|
|
421
|
+
sourceThemes: Array<SmallerItem.SourceTheme>;
|
|
422
|
+
|
|
423
|
+
title: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export namespace SmallerItem {
|
|
427
|
+
export interface Call {
|
|
428
|
+
callId: string | null;
|
|
429
|
+
|
|
430
|
+
conversationId: string;
|
|
431
|
+
|
|
432
|
+
cueMs: number | null;
|
|
433
|
+
|
|
434
|
+
personaName: string | null;
|
|
435
|
+
|
|
436
|
+
simulationRunPlanJobId: string;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export interface Evidence {
|
|
440
|
+
callId: string | null;
|
|
441
|
+
|
|
442
|
+
conversationId: string;
|
|
443
|
+
|
|
444
|
+
cueMs: number | null;
|
|
445
|
+
|
|
446
|
+
personaName: string | null;
|
|
447
|
+
|
|
448
|
+
simulationRunPlanJobId: string;
|
|
449
|
+
|
|
450
|
+
text: string;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export interface SourceTheme {
|
|
454
|
+
simulationRunPlanJobId: string;
|
|
455
|
+
|
|
456
|
+
slug: string;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
export interface WentWell {
|
|
461
|
+
body: string;
|
|
462
|
+
|
|
463
|
+
evidence: Array<WentWell.Evidence>;
|
|
464
|
+
|
|
465
|
+
title: string;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
export namespace WentWell {
|
|
469
|
+
export interface Evidence {
|
|
470
|
+
callId: string | null;
|
|
471
|
+
|
|
472
|
+
conversationId: string;
|
|
473
|
+
|
|
474
|
+
cueMs: number | null;
|
|
475
|
+
|
|
476
|
+
personaName: string | null;
|
|
477
|
+
|
|
478
|
+
simulationRunPlanJobId: string;
|
|
479
|
+
|
|
480
|
+
text: string;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* One run in the group, in group order.
|
|
488
|
+
*/
|
|
489
|
+
export interface Run {
|
|
490
|
+
/**
|
|
491
|
+
* ISO 8601
|
|
492
|
+
*/
|
|
493
|
+
createdAt: string;
|
|
494
|
+
|
|
495
|
+
endedAt: string | null;
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* The name of the plan the run ran. Null when the plan was deleted.
|
|
499
|
+
*/
|
|
500
|
+
planName: string | null;
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Per-project run number, shown as SR-42 in the app.
|
|
504
|
+
*/
|
|
505
|
+
runNumber: number | null;
|
|
506
|
+
|
|
507
|
+
simulationRunPlanId: string;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* The run, readable at GET /v1/simulation/plan/job/{jobId}
|
|
511
|
+
*/
|
|
512
|
+
simulationRunPlanJobId: string;
|
|
513
|
+
|
|
514
|
+
startedAt: string | null;
|
|
515
|
+
|
|
516
|
+
status:
|
|
517
|
+
| 'PENDING'
|
|
518
|
+
| 'QUEUED'
|
|
519
|
+
| 'CREATING_SNAPSHOTS'
|
|
520
|
+
| 'CREATING_SIMULATIONS'
|
|
521
|
+
| 'PREPARING_CAPACITY'
|
|
522
|
+
| 'RUNNING_SIMULATIONS'
|
|
523
|
+
| 'COMPLETED'
|
|
524
|
+
| 'FAILED'
|
|
525
|
+
| 'TIMED_OUT'
|
|
526
|
+
| 'CANCELLED'
|
|
527
|
+
| 'CANCELLING'
|
|
528
|
+
| 'ENDING_SIMULATIONS';
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export interface SimulationRunGroupListResponse {
|
|
534
|
+
data: Array<SimulationRunGroupListResponse.Data>;
|
|
535
|
+
|
|
536
|
+
pagination: SimulationRunGroupListResponse.Pagination;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export namespace SimulationRunGroupListResponse {
|
|
540
|
+
export interface Data {
|
|
541
|
+
id: string;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* ISO 8601
|
|
545
|
+
*/
|
|
546
|
+
createdAt: string;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Where the group report stands, without its document.
|
|
550
|
+
*/
|
|
551
|
+
latestReport: Data.LatestReport | null;
|
|
552
|
+
|
|
553
|
+
name: string;
|
|
554
|
+
|
|
555
|
+
runCount: number;
|
|
556
|
+
|
|
557
|
+
runs: Array<Data.Run>;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
export namespace Data {
|
|
561
|
+
/**
|
|
562
|
+
* Where the group report stands, without its document.
|
|
563
|
+
*/
|
|
564
|
+
export interface LatestReport {
|
|
565
|
+
id: string;
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* ISO 8601. Null until the report settles.
|
|
569
|
+
*/
|
|
570
|
+
completedAt: string | null;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* ISO 8601
|
|
574
|
+
*/
|
|
575
|
+
createdAt: string;
|
|
576
|
+
|
|
577
|
+
errorMessage: string | null;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* PENDING and GENERATING are in flight; READY carries the document; FAILED carries
|
|
581
|
+
* errorMessage.
|
|
582
|
+
*/
|
|
583
|
+
status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* One run in the group, in group order.
|
|
588
|
+
*/
|
|
589
|
+
export interface Run {
|
|
590
|
+
/**
|
|
591
|
+
* ISO 8601
|
|
592
|
+
*/
|
|
593
|
+
createdAt: string;
|
|
594
|
+
|
|
595
|
+
endedAt: string | null;
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* The name of the plan the run ran. Null when the plan was deleted.
|
|
599
|
+
*/
|
|
600
|
+
planName: string | null;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Per-project run number, shown as SR-42 in the app.
|
|
604
|
+
*/
|
|
605
|
+
runNumber: number | null;
|
|
606
|
+
|
|
607
|
+
simulationRunPlanId: string;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* The run, readable at GET /v1/simulation/plan/job/{jobId}
|
|
611
|
+
*/
|
|
612
|
+
simulationRunPlanJobId: string;
|
|
613
|
+
|
|
614
|
+
startedAt: string | null;
|
|
615
|
+
|
|
616
|
+
status:
|
|
617
|
+
| 'PENDING'
|
|
618
|
+
| 'QUEUED'
|
|
619
|
+
| 'CREATING_SNAPSHOTS'
|
|
620
|
+
| 'CREATING_SIMULATIONS'
|
|
621
|
+
| 'PREPARING_CAPACITY'
|
|
622
|
+
| 'RUNNING_SIMULATIONS'
|
|
623
|
+
| 'COMPLETED'
|
|
624
|
+
| 'FAILED'
|
|
625
|
+
| 'TIMED_OUT'
|
|
626
|
+
| 'CANCELLED'
|
|
627
|
+
| 'CANCELLING'
|
|
628
|
+
| 'ENDING_SIMULATIONS';
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export interface Pagination {
|
|
633
|
+
hasMore: boolean;
|
|
634
|
+
|
|
635
|
+
limit: number;
|
|
636
|
+
|
|
637
|
+
offset: number;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Total run groups in the project, ignoring this page.
|
|
641
|
+
*/
|
|
642
|
+
total: number;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export interface SimulationRunGroupDeleteResponse {
|
|
647
|
+
data: SimulationRunGroupDeleteResponse.Data;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export namespace SimulationRunGroupDeleteResponse {
|
|
651
|
+
export interface Data {
|
|
652
|
+
/**
|
|
653
|
+
* Whether the run group was deleted
|
|
654
|
+
*/
|
|
655
|
+
deleted: boolean;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export interface SimulationRunGroupGetByIDResponse {
|
|
660
|
+
/**
|
|
661
|
+
* Several simulation runs read as one.
|
|
662
|
+
*/
|
|
663
|
+
data: SimulationRunGroupGetByIDResponse.Data;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
export namespace SimulationRunGroupGetByIDResponse {
|
|
667
|
+
/**
|
|
668
|
+
* Several simulation runs read as one.
|
|
669
|
+
*/
|
|
670
|
+
export interface Data {
|
|
671
|
+
id: string;
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* ISO 8601
|
|
675
|
+
*/
|
|
676
|
+
createdAt: string;
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* One generation of the group report.
|
|
680
|
+
*/
|
|
681
|
+
latestReport: Data.LatestReport | null;
|
|
682
|
+
|
|
683
|
+
name: string;
|
|
684
|
+
|
|
685
|
+
runCount: number;
|
|
686
|
+
|
|
687
|
+
runs: Array<Data.Run>;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
export namespace Data {
|
|
691
|
+
/**
|
|
692
|
+
* One generation of the group report.
|
|
693
|
+
*/
|
|
694
|
+
export interface LatestReport {
|
|
695
|
+
id: string;
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* ISO 8601. Null until the report settles.
|
|
699
|
+
*/
|
|
700
|
+
completedAt: string | null;
|
|
701
|
+
|
|
702
|
+
/**
|
|
703
|
+
* ISO 8601
|
|
704
|
+
*/
|
|
705
|
+
createdAt: string;
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* The group report: the runs it covers, a scorecard summed across them, what went
|
|
709
|
+
* well, and the issues found, each merged from the per-run debriefs with
|
|
710
|
+
* call-level evidence. Every figure is computed from the runs; the prose is
|
|
711
|
+
* AI-written around those facts.
|
|
712
|
+
*/
|
|
713
|
+
document: LatestReport.Document | null;
|
|
714
|
+
|
|
715
|
+
errorMessage: string | null;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* PENDING and GENERATING are in flight; READY carries the document; FAILED carries
|
|
719
|
+
* errorMessage.
|
|
720
|
+
*/
|
|
721
|
+
status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export namespace LatestReport {
|
|
725
|
+
/**
|
|
726
|
+
* The group report: the runs it covers, a scorecard summed across them, what went
|
|
727
|
+
* well, and the issues found, each merged from the per-run debriefs with
|
|
728
|
+
* call-level evidence. Every figure is computed from the runs; the prose is
|
|
729
|
+
* AI-written around those facts.
|
|
730
|
+
*/
|
|
731
|
+
export interface Document {
|
|
732
|
+
aggregates: Array<Document.Aggregate>;
|
|
733
|
+
|
|
734
|
+
executiveSummary: Array<Document.ExecutiveSummary>;
|
|
735
|
+
|
|
736
|
+
generatedAtIso: string;
|
|
737
|
+
|
|
738
|
+
headline: Document.Headline;
|
|
739
|
+
|
|
740
|
+
issues: Array<Document.Issue>;
|
|
741
|
+
|
|
742
|
+
methodology: string;
|
|
743
|
+
|
|
744
|
+
model: string;
|
|
745
|
+
|
|
746
|
+
recommendations: Array<Document.Recommendation>;
|
|
747
|
+
|
|
748
|
+
runs: Array<Document.Run>;
|
|
749
|
+
|
|
750
|
+
scorecard: Array<Document.Scorecard>;
|
|
751
|
+
|
|
752
|
+
simulationRunGroupId: string;
|
|
753
|
+
|
|
754
|
+
smallerItems: Array<Document.SmallerItem>;
|
|
755
|
+
|
|
756
|
+
version: 1;
|
|
757
|
+
|
|
758
|
+
wentWell: Array<Document.WentWell>;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
export namespace Document {
|
|
762
|
+
export interface Aggregate {
|
|
763
|
+
averageLabel: string | null;
|
|
764
|
+
|
|
765
|
+
evaluatedCount: number;
|
|
766
|
+
|
|
767
|
+
medianLabel: string | null;
|
|
768
|
+
|
|
769
|
+
metricName: string;
|
|
770
|
+
|
|
771
|
+
p95Label: string | null;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
export interface ExecutiveSummary {
|
|
775
|
+
body: string;
|
|
776
|
+
|
|
777
|
+
heading: string;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
export interface Headline {
|
|
781
|
+
callCount: number;
|
|
782
|
+
|
|
783
|
+
completedAtIso: string | null;
|
|
784
|
+
|
|
785
|
+
groupName: string;
|
|
786
|
+
|
|
787
|
+
passedRunCount: number;
|
|
788
|
+
|
|
789
|
+
reportedRunCount: number;
|
|
790
|
+
|
|
791
|
+
runCount: number;
|
|
792
|
+
|
|
793
|
+
statTiles: Array<Headline.StatTile>;
|
|
794
|
+
|
|
795
|
+
verdict: 'PASSED' | 'THRESHOLD_FAILED';
|
|
796
|
+
|
|
797
|
+
verdictProse: string;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
export namespace Headline {
|
|
801
|
+
export interface StatTile {
|
|
802
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
803
|
+
|
|
804
|
+
label: string;
|
|
805
|
+
|
|
806
|
+
sub: string | null;
|
|
807
|
+
|
|
808
|
+
value: string;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
export interface Issue {
|
|
813
|
+
affectedCallCount: number;
|
|
814
|
+
|
|
815
|
+
body: string;
|
|
816
|
+
|
|
817
|
+
calls: Array<Issue.Call>;
|
|
818
|
+
|
|
819
|
+
checkNames: Array<string>;
|
|
820
|
+
|
|
821
|
+
evidence: Array<Issue.Evidence>;
|
|
822
|
+
|
|
823
|
+
order: number;
|
|
824
|
+
|
|
825
|
+
rootCauseChannel:
|
|
826
|
+
| 'PROMPT'
|
|
827
|
+
| 'VOICE_CONFIG'
|
|
828
|
+
| 'STT'
|
|
829
|
+
| 'SPEECH_MODEL'
|
|
830
|
+
| 'LLM_MODEL'
|
|
831
|
+
| 'INFRA'
|
|
832
|
+
| 'EXTERNAL'
|
|
833
|
+
| null;
|
|
834
|
+
|
|
835
|
+
runLabels: Array<string>;
|
|
836
|
+
|
|
837
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
838
|
+
|
|
839
|
+
sourceThemes: Array<Issue.SourceTheme>;
|
|
840
|
+
|
|
841
|
+
title: string;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
export namespace Issue {
|
|
845
|
+
export interface Call {
|
|
846
|
+
callId: string | null;
|
|
847
|
+
|
|
848
|
+
conversationId: string;
|
|
849
|
+
|
|
850
|
+
cueMs: number | null;
|
|
851
|
+
|
|
852
|
+
personaName: string | null;
|
|
853
|
+
|
|
854
|
+
simulationRunPlanJobId: string;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
export interface Evidence {
|
|
858
|
+
callId: string | null;
|
|
859
|
+
|
|
860
|
+
conversationId: string;
|
|
861
|
+
|
|
862
|
+
cueMs: number | null;
|
|
863
|
+
|
|
864
|
+
personaName: string | null;
|
|
865
|
+
|
|
866
|
+
simulationRunPlanJobId: string;
|
|
867
|
+
|
|
868
|
+
text: string;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
export interface SourceTheme {
|
|
872
|
+
simulationRunPlanJobId: string;
|
|
873
|
+
|
|
874
|
+
slug: string;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
export interface Recommendation {
|
|
879
|
+
body: string;
|
|
880
|
+
|
|
881
|
+
channel:
|
|
882
|
+
| 'PROMPT'
|
|
883
|
+
| 'VOICE_CONFIG'
|
|
884
|
+
| 'STT'
|
|
885
|
+
| 'SPEECH_MODEL'
|
|
886
|
+
| 'LLM_MODEL'
|
|
887
|
+
| 'INFRA'
|
|
888
|
+
| 'EXTERNAL'
|
|
889
|
+
| null;
|
|
890
|
+
|
|
891
|
+
issueOrders: Array<number>;
|
|
892
|
+
|
|
893
|
+
order: number;
|
|
894
|
+
|
|
895
|
+
title: string;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
export interface Run {
|
|
899
|
+
callCount: number;
|
|
900
|
+
|
|
901
|
+
checksPassed: number;
|
|
902
|
+
|
|
903
|
+
checksTotal: number;
|
|
904
|
+
|
|
905
|
+
completedAtIso: string | null;
|
|
906
|
+
|
|
907
|
+
runLabel: string;
|
|
908
|
+
|
|
909
|
+
runNumber: number | null;
|
|
910
|
+
|
|
911
|
+
simulationRunPlanJobId: string;
|
|
912
|
+
|
|
913
|
+
status:
|
|
914
|
+
| 'PENDING'
|
|
915
|
+
| 'QUEUED'
|
|
916
|
+
| 'CREATING_SNAPSHOTS'
|
|
917
|
+
| 'CREATING_SIMULATIONS'
|
|
918
|
+
| 'PREPARING_CAPACITY'
|
|
919
|
+
| 'RUNNING_SIMULATIONS'
|
|
920
|
+
| 'COMPLETED'
|
|
921
|
+
| 'FAILED'
|
|
922
|
+
| 'TIMED_OUT'
|
|
923
|
+
| 'CANCELLED'
|
|
924
|
+
| 'CANCELLING'
|
|
925
|
+
| 'ENDING_SIMULATIONS';
|
|
926
|
+
|
|
927
|
+
summary: string | null;
|
|
928
|
+
|
|
929
|
+
themeCount: number;
|
|
930
|
+
|
|
931
|
+
verdict: 'PASSED' | 'THRESHOLD_FAILED' | null;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export interface Scorecard {
|
|
935
|
+
checkName: string;
|
|
936
|
+
|
|
937
|
+
evaluatedCount: number;
|
|
938
|
+
|
|
939
|
+
failedCount: number;
|
|
940
|
+
|
|
941
|
+
failedRunCount: number;
|
|
942
|
+
|
|
943
|
+
passRatePct: number | null;
|
|
944
|
+
|
|
945
|
+
runCount: number;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
export interface SmallerItem {
|
|
949
|
+
affectedCallCount: number;
|
|
950
|
+
|
|
951
|
+
body: string;
|
|
952
|
+
|
|
953
|
+
calls: Array<SmallerItem.Call>;
|
|
954
|
+
|
|
955
|
+
checkNames: Array<string>;
|
|
956
|
+
|
|
957
|
+
evidence: Array<SmallerItem.Evidence>;
|
|
958
|
+
|
|
959
|
+
order: number;
|
|
960
|
+
|
|
961
|
+
rootCauseChannel:
|
|
962
|
+
| 'PROMPT'
|
|
963
|
+
| 'VOICE_CONFIG'
|
|
964
|
+
| 'STT'
|
|
965
|
+
| 'SPEECH_MODEL'
|
|
966
|
+
| 'LLM_MODEL'
|
|
967
|
+
| 'INFRA'
|
|
968
|
+
| 'EXTERNAL'
|
|
969
|
+
| null;
|
|
970
|
+
|
|
971
|
+
runLabels: Array<string>;
|
|
972
|
+
|
|
973
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
974
|
+
|
|
975
|
+
sourceThemes: Array<SmallerItem.SourceTheme>;
|
|
976
|
+
|
|
977
|
+
title: string;
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export namespace SmallerItem {
|
|
981
|
+
export interface Call {
|
|
982
|
+
callId: string | null;
|
|
983
|
+
|
|
984
|
+
conversationId: string;
|
|
985
|
+
|
|
986
|
+
cueMs: number | null;
|
|
987
|
+
|
|
988
|
+
personaName: string | null;
|
|
989
|
+
|
|
990
|
+
simulationRunPlanJobId: string;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
export interface Evidence {
|
|
994
|
+
callId: string | null;
|
|
995
|
+
|
|
996
|
+
conversationId: string;
|
|
997
|
+
|
|
998
|
+
cueMs: number | null;
|
|
999
|
+
|
|
1000
|
+
personaName: string | null;
|
|
1001
|
+
|
|
1002
|
+
simulationRunPlanJobId: string;
|
|
1003
|
+
|
|
1004
|
+
text: string;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
export interface SourceTheme {
|
|
1008
|
+
simulationRunPlanJobId: string;
|
|
1009
|
+
|
|
1010
|
+
slug: string;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
export interface WentWell {
|
|
1015
|
+
body: string;
|
|
1016
|
+
|
|
1017
|
+
evidence: Array<WentWell.Evidence>;
|
|
1018
|
+
|
|
1019
|
+
title: string;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
export namespace WentWell {
|
|
1023
|
+
export interface Evidence {
|
|
1024
|
+
callId: string | null;
|
|
1025
|
+
|
|
1026
|
+
conversationId: string;
|
|
1027
|
+
|
|
1028
|
+
cueMs: number | null;
|
|
1029
|
+
|
|
1030
|
+
personaName: string | null;
|
|
1031
|
+
|
|
1032
|
+
simulationRunPlanJobId: string;
|
|
1033
|
+
|
|
1034
|
+
text: string;
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* One run in the group, in group order.
|
|
1042
|
+
*/
|
|
1043
|
+
export interface Run {
|
|
1044
|
+
/**
|
|
1045
|
+
* ISO 8601
|
|
1046
|
+
*/
|
|
1047
|
+
createdAt: string;
|
|
1048
|
+
|
|
1049
|
+
endedAt: string | null;
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* The name of the plan the run ran. Null when the plan was deleted.
|
|
1053
|
+
*/
|
|
1054
|
+
planName: string | null;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* Per-project run number, shown as SR-42 in the app.
|
|
1058
|
+
*/
|
|
1059
|
+
runNumber: number | null;
|
|
1060
|
+
|
|
1061
|
+
simulationRunPlanId: string;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* The run, readable at GET /v1/simulation/plan/job/{jobId}
|
|
1065
|
+
*/
|
|
1066
|
+
simulationRunPlanJobId: string;
|
|
1067
|
+
|
|
1068
|
+
startedAt: string | null;
|
|
1069
|
+
|
|
1070
|
+
status:
|
|
1071
|
+
| 'PENDING'
|
|
1072
|
+
| 'QUEUED'
|
|
1073
|
+
| 'CREATING_SNAPSHOTS'
|
|
1074
|
+
| 'CREATING_SIMULATIONS'
|
|
1075
|
+
| 'PREPARING_CAPACITY'
|
|
1076
|
+
| 'RUNNING_SIMULATIONS'
|
|
1077
|
+
| 'COMPLETED'
|
|
1078
|
+
| 'FAILED'
|
|
1079
|
+
| 'TIMED_OUT'
|
|
1080
|
+
| 'CANCELLED'
|
|
1081
|
+
| 'CANCELLING'
|
|
1082
|
+
| 'ENDING_SIMULATIONS';
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
export interface SimulationRunGroupRegenerateReportResponse {
|
|
1088
|
+
/**
|
|
1089
|
+
* One generation of the group report.
|
|
1090
|
+
*/
|
|
1091
|
+
data: SimulationRunGroupRegenerateReportResponse.Data;
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
export namespace SimulationRunGroupRegenerateReportResponse {
|
|
1095
|
+
/**
|
|
1096
|
+
* One generation of the group report.
|
|
1097
|
+
*/
|
|
1098
|
+
export interface Data {
|
|
1099
|
+
id: string;
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* ISO 8601. Null until the report settles.
|
|
1103
|
+
*/
|
|
1104
|
+
completedAt: string | null;
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* ISO 8601
|
|
1108
|
+
*/
|
|
1109
|
+
createdAt: string;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* The group report: the runs it covers, a scorecard summed across them, what went
|
|
1113
|
+
* well, and the issues found, each merged from the per-run debriefs with
|
|
1114
|
+
* call-level evidence. Every figure is computed from the runs; the prose is
|
|
1115
|
+
* AI-written around those facts.
|
|
1116
|
+
*/
|
|
1117
|
+
document: Data.Document | null;
|
|
1118
|
+
|
|
1119
|
+
errorMessage: string | null;
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* PENDING and GENERATING are in flight; READY carries the document; FAILED carries
|
|
1123
|
+
* errorMessage.
|
|
1124
|
+
*/
|
|
1125
|
+
status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
export namespace Data {
|
|
1129
|
+
/**
|
|
1130
|
+
* The group report: the runs it covers, a scorecard summed across them, what went
|
|
1131
|
+
* well, and the issues found, each merged from the per-run debriefs with
|
|
1132
|
+
* call-level evidence. Every figure is computed from the runs; the prose is
|
|
1133
|
+
* AI-written around those facts.
|
|
1134
|
+
*/
|
|
1135
|
+
export interface Document {
|
|
1136
|
+
aggregates: Array<Document.Aggregate>;
|
|
1137
|
+
|
|
1138
|
+
executiveSummary: Array<Document.ExecutiveSummary>;
|
|
1139
|
+
|
|
1140
|
+
generatedAtIso: string;
|
|
1141
|
+
|
|
1142
|
+
headline: Document.Headline;
|
|
1143
|
+
|
|
1144
|
+
issues: Array<Document.Issue>;
|
|
1145
|
+
|
|
1146
|
+
methodology: string;
|
|
1147
|
+
|
|
1148
|
+
model: string;
|
|
1149
|
+
|
|
1150
|
+
recommendations: Array<Document.Recommendation>;
|
|
1151
|
+
|
|
1152
|
+
runs: Array<Document.Run>;
|
|
1153
|
+
|
|
1154
|
+
scorecard: Array<Document.Scorecard>;
|
|
1155
|
+
|
|
1156
|
+
simulationRunGroupId: string;
|
|
1157
|
+
|
|
1158
|
+
smallerItems: Array<Document.SmallerItem>;
|
|
1159
|
+
|
|
1160
|
+
version: 1;
|
|
1161
|
+
|
|
1162
|
+
wentWell: Array<Document.WentWell>;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
export namespace Document {
|
|
1166
|
+
export interface Aggregate {
|
|
1167
|
+
averageLabel: string | null;
|
|
1168
|
+
|
|
1169
|
+
evaluatedCount: number;
|
|
1170
|
+
|
|
1171
|
+
medianLabel: string | null;
|
|
1172
|
+
|
|
1173
|
+
metricName: string;
|
|
1174
|
+
|
|
1175
|
+
p95Label: string | null;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
export interface ExecutiveSummary {
|
|
1179
|
+
body: string;
|
|
1180
|
+
|
|
1181
|
+
heading: string;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
export interface Headline {
|
|
1185
|
+
callCount: number;
|
|
1186
|
+
|
|
1187
|
+
completedAtIso: string | null;
|
|
1188
|
+
|
|
1189
|
+
groupName: string;
|
|
1190
|
+
|
|
1191
|
+
passedRunCount: number;
|
|
1192
|
+
|
|
1193
|
+
reportedRunCount: number;
|
|
1194
|
+
|
|
1195
|
+
runCount: number;
|
|
1196
|
+
|
|
1197
|
+
statTiles: Array<Headline.StatTile>;
|
|
1198
|
+
|
|
1199
|
+
verdict: 'PASSED' | 'THRESHOLD_FAILED';
|
|
1200
|
+
|
|
1201
|
+
verdictProse: string;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
export namespace Headline {
|
|
1205
|
+
export interface StatTile {
|
|
1206
|
+
deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
|
|
1207
|
+
|
|
1208
|
+
label: string;
|
|
1209
|
+
|
|
1210
|
+
sub: string | null;
|
|
1211
|
+
|
|
1212
|
+
value: string;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
export interface Issue {
|
|
1217
|
+
affectedCallCount: number;
|
|
1218
|
+
|
|
1219
|
+
body: string;
|
|
1220
|
+
|
|
1221
|
+
calls: Array<Issue.Call>;
|
|
1222
|
+
|
|
1223
|
+
checkNames: Array<string>;
|
|
1224
|
+
|
|
1225
|
+
evidence: Array<Issue.Evidence>;
|
|
1226
|
+
|
|
1227
|
+
order: number;
|
|
1228
|
+
|
|
1229
|
+
rootCauseChannel:
|
|
1230
|
+
| 'PROMPT'
|
|
1231
|
+
| 'VOICE_CONFIG'
|
|
1232
|
+
| 'STT'
|
|
1233
|
+
| 'SPEECH_MODEL'
|
|
1234
|
+
| 'LLM_MODEL'
|
|
1235
|
+
| 'INFRA'
|
|
1236
|
+
| 'EXTERNAL'
|
|
1237
|
+
| null;
|
|
1238
|
+
|
|
1239
|
+
runLabels: Array<string>;
|
|
1240
|
+
|
|
1241
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1242
|
+
|
|
1243
|
+
sourceThemes: Array<Issue.SourceTheme>;
|
|
1244
|
+
|
|
1245
|
+
title: string;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
export namespace Issue {
|
|
1249
|
+
export interface Call {
|
|
1250
|
+
callId: string | null;
|
|
1251
|
+
|
|
1252
|
+
conversationId: string;
|
|
1253
|
+
|
|
1254
|
+
cueMs: number | null;
|
|
1255
|
+
|
|
1256
|
+
personaName: string | null;
|
|
1257
|
+
|
|
1258
|
+
simulationRunPlanJobId: string;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
export interface Evidence {
|
|
1262
|
+
callId: string | null;
|
|
1263
|
+
|
|
1264
|
+
conversationId: string;
|
|
1265
|
+
|
|
1266
|
+
cueMs: number | null;
|
|
1267
|
+
|
|
1268
|
+
personaName: string | null;
|
|
1269
|
+
|
|
1270
|
+
simulationRunPlanJobId: string;
|
|
1271
|
+
|
|
1272
|
+
text: string;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
export interface SourceTheme {
|
|
1276
|
+
simulationRunPlanJobId: string;
|
|
1277
|
+
|
|
1278
|
+
slug: string;
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
export interface Recommendation {
|
|
1283
|
+
body: string;
|
|
1284
|
+
|
|
1285
|
+
channel:
|
|
1286
|
+
| 'PROMPT'
|
|
1287
|
+
| 'VOICE_CONFIG'
|
|
1288
|
+
| 'STT'
|
|
1289
|
+
| 'SPEECH_MODEL'
|
|
1290
|
+
| 'LLM_MODEL'
|
|
1291
|
+
| 'INFRA'
|
|
1292
|
+
| 'EXTERNAL'
|
|
1293
|
+
| null;
|
|
1294
|
+
|
|
1295
|
+
issueOrders: Array<number>;
|
|
1296
|
+
|
|
1297
|
+
order: number;
|
|
1298
|
+
|
|
1299
|
+
title: string;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
export interface Run {
|
|
1303
|
+
callCount: number;
|
|
1304
|
+
|
|
1305
|
+
checksPassed: number;
|
|
1306
|
+
|
|
1307
|
+
checksTotal: number;
|
|
1308
|
+
|
|
1309
|
+
completedAtIso: string | null;
|
|
1310
|
+
|
|
1311
|
+
runLabel: string;
|
|
1312
|
+
|
|
1313
|
+
runNumber: number | null;
|
|
1314
|
+
|
|
1315
|
+
simulationRunPlanJobId: string;
|
|
1316
|
+
|
|
1317
|
+
status:
|
|
1318
|
+
| 'PENDING'
|
|
1319
|
+
| 'QUEUED'
|
|
1320
|
+
| 'CREATING_SNAPSHOTS'
|
|
1321
|
+
| 'CREATING_SIMULATIONS'
|
|
1322
|
+
| 'PREPARING_CAPACITY'
|
|
1323
|
+
| 'RUNNING_SIMULATIONS'
|
|
1324
|
+
| 'COMPLETED'
|
|
1325
|
+
| 'FAILED'
|
|
1326
|
+
| 'TIMED_OUT'
|
|
1327
|
+
| 'CANCELLED'
|
|
1328
|
+
| 'CANCELLING'
|
|
1329
|
+
| 'ENDING_SIMULATIONS';
|
|
1330
|
+
|
|
1331
|
+
summary: string | null;
|
|
1332
|
+
|
|
1333
|
+
themeCount: number;
|
|
1334
|
+
|
|
1335
|
+
verdict: 'PASSED' | 'THRESHOLD_FAILED' | null;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export interface Scorecard {
|
|
1339
|
+
checkName: string;
|
|
1340
|
+
|
|
1341
|
+
evaluatedCount: number;
|
|
1342
|
+
|
|
1343
|
+
failedCount: number;
|
|
1344
|
+
|
|
1345
|
+
failedRunCount: number;
|
|
1346
|
+
|
|
1347
|
+
passRatePct: number | null;
|
|
1348
|
+
|
|
1349
|
+
runCount: number;
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
export interface SmallerItem {
|
|
1353
|
+
affectedCallCount: number;
|
|
1354
|
+
|
|
1355
|
+
body: string;
|
|
1356
|
+
|
|
1357
|
+
calls: Array<SmallerItem.Call>;
|
|
1358
|
+
|
|
1359
|
+
checkNames: Array<string>;
|
|
1360
|
+
|
|
1361
|
+
evidence: Array<SmallerItem.Evidence>;
|
|
1362
|
+
|
|
1363
|
+
order: number;
|
|
1364
|
+
|
|
1365
|
+
rootCauseChannel:
|
|
1366
|
+
| 'PROMPT'
|
|
1367
|
+
| 'VOICE_CONFIG'
|
|
1368
|
+
| 'STT'
|
|
1369
|
+
| 'SPEECH_MODEL'
|
|
1370
|
+
| 'LLM_MODEL'
|
|
1371
|
+
| 'INFRA'
|
|
1372
|
+
| 'EXTERNAL'
|
|
1373
|
+
| null;
|
|
1374
|
+
|
|
1375
|
+
runLabels: Array<string>;
|
|
1376
|
+
|
|
1377
|
+
severity: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1378
|
+
|
|
1379
|
+
sourceThemes: Array<SmallerItem.SourceTheme>;
|
|
1380
|
+
|
|
1381
|
+
title: string;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
export namespace SmallerItem {
|
|
1385
|
+
export interface Call {
|
|
1386
|
+
callId: string | null;
|
|
1387
|
+
|
|
1388
|
+
conversationId: string;
|
|
1389
|
+
|
|
1390
|
+
cueMs: number | null;
|
|
1391
|
+
|
|
1392
|
+
personaName: string | null;
|
|
1393
|
+
|
|
1394
|
+
simulationRunPlanJobId: string;
|
|
1395
|
+
}
|
|
1396
|
+
|
|
1397
|
+
export interface Evidence {
|
|
1398
|
+
callId: string | null;
|
|
1399
|
+
|
|
1400
|
+
conversationId: string;
|
|
1401
|
+
|
|
1402
|
+
cueMs: number | null;
|
|
1403
|
+
|
|
1404
|
+
personaName: string | null;
|
|
1405
|
+
|
|
1406
|
+
simulationRunPlanJobId: string;
|
|
1407
|
+
|
|
1408
|
+
text: string;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
export interface SourceTheme {
|
|
1412
|
+
simulationRunPlanJobId: string;
|
|
1413
|
+
|
|
1414
|
+
slug: string;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
export interface WentWell {
|
|
1419
|
+
body: string;
|
|
1420
|
+
|
|
1421
|
+
evidence: Array<WentWell.Evidence>;
|
|
1422
|
+
|
|
1423
|
+
title: string;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
export namespace WentWell {
|
|
1427
|
+
export interface Evidence {
|
|
1428
|
+
callId: string | null;
|
|
1429
|
+
|
|
1430
|
+
conversationId: string;
|
|
1431
|
+
|
|
1432
|
+
cueMs: number | null;
|
|
1433
|
+
|
|
1434
|
+
personaName: string | null;
|
|
1435
|
+
|
|
1436
|
+
simulationRunPlanJobId: string;
|
|
1437
|
+
|
|
1438
|
+
text: string;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
export interface SimulationRunGroupCreateParams {
|
|
1446
|
+
/**
|
|
1447
|
+
* What to call the group. Defaults to the plans' names when starting plans, and to
|
|
1448
|
+
* the runs' plan names when grouping existing runs.
|
|
1449
|
+
*/
|
|
1450
|
+
name?: string;
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* Plans to run once each, in display order (2 to 20). Each plan starts a run,
|
|
1454
|
+
* exactly as POST /v1/simulation/plan/{planId}/job would. Send this or
|
|
1455
|
+
* `simulationRunPlanJobIds`, not both.
|
|
1456
|
+
*/
|
|
1457
|
+
simulationRunPlanIds?: Array<string>;
|
|
1458
|
+
|
|
1459
|
+
/**
|
|
1460
|
+
* Runs that already exist, in display order (2 to 20). Runs still in progress are
|
|
1461
|
+
* fine: the group report waits for them. Send this or `simulationRunPlanIds`, not
|
|
1462
|
+
* both.
|
|
1463
|
+
*/
|
|
1464
|
+
simulationRunPlanJobIds?: Array<string>;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
export interface SimulationRunGroupListParams {
|
|
1468
|
+
/**
|
|
1469
|
+
* Maximum number of run groups to return (default: 20, max: 100)
|
|
1470
|
+
*/
|
|
1471
|
+
limit?: number;
|
|
1472
|
+
|
|
1473
|
+
/**
|
|
1474
|
+
* Pagination offset
|
|
1475
|
+
*/
|
|
1476
|
+
offset?: number;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
export declare namespace SimulationRunGroup {
|
|
1480
|
+
export {
|
|
1481
|
+
type SimulationRunGroupCreateResponse as SimulationRunGroupCreateResponse,
|
|
1482
|
+
type SimulationRunGroupListResponse as SimulationRunGroupListResponse,
|
|
1483
|
+
type SimulationRunGroupDeleteResponse as SimulationRunGroupDeleteResponse,
|
|
1484
|
+
type SimulationRunGroupGetByIDResponse as SimulationRunGroupGetByIDResponse,
|
|
1485
|
+
type SimulationRunGroupRegenerateReportResponse as SimulationRunGroupRegenerateReportResponse,
|
|
1486
|
+
type SimulationRunGroupCreateParams as SimulationRunGroupCreateParams,
|
|
1487
|
+
type SimulationRunGroupListParams as SimulationRunGroupListParams,
|
|
1488
|
+
};
|
|
1489
|
+
}
|