@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.
Files changed (48) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/config.d.mts +416 -8
  12. package/resources/config.d.mts.map +1 -1
  13. package/resources/config.d.ts +416 -8
  14. package/resources/config.d.ts.map +1 -1
  15. package/resources/index.d.mts +2 -0
  16. package/resources/index.d.mts.map +1 -1
  17. package/resources/index.d.ts +2 -0
  18. package/resources/index.d.ts.map +1 -1
  19. package/resources/index.js +5 -1
  20. package/resources/index.js.map +1 -1
  21. package/resources/index.mjs +2 -0
  22. package/resources/index.mjs.map +1 -1
  23. package/resources/simulation-group.d.mts +777 -0
  24. package/resources/simulation-group.d.mts.map +1 -0
  25. package/resources/simulation-group.d.ts +777 -0
  26. package/resources/simulation-group.d.ts.map +1 -0
  27. package/resources/simulation-group.js +116 -0
  28. package/resources/simulation-group.js.map +1 -0
  29. package/resources/simulation-group.mjs +112 -0
  30. package/resources/simulation-group.mjs.map +1 -0
  31. package/resources/simulation-run-group.d.mts +890 -0
  32. package/resources/simulation-run-group.d.mts.map +1 -0
  33. package/resources/simulation-run-group.d.ts +890 -0
  34. package/resources/simulation-run-group.d.ts.map +1 -0
  35. package/resources/simulation-run-group.js +91 -0
  36. package/resources/simulation-run-group.js.map +1 -0
  37. package/resources/simulation-run-group.mjs +87 -0
  38. package/resources/simulation-run-group.mjs.map +1 -0
  39. package/src/client.ts +50 -0
  40. package/src/resources/config.ts +759 -31
  41. package/src/resources/index.ts +22 -0
  42. package/src/resources/simulation-group.ts +1105 -0
  43. package/src/resources/simulation-run-group.ts +1489 -0
  44. package/src/version.ts +1 -1
  45. package/version.d.mts +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.js +1 -1
  48. package/version.mjs +1 -1
@@ -0,0 +1,890 @@
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 SimulationRunGroup extends APIResource {
5
+ /**
6
+ * Groups several simulation runs so they read as one, and starts generating the
7
+ * group report: one document across every run, with a scorecard summed across them
8
+ * and the issues found, each merged from the per-run debriefs.
9
+ *
10
+ * Send `simulationRunPlanJobIds` to group runs that already exist (runs still in
11
+ * progress are fine: the report waits for them). Send `simulationRunPlanIds` to
12
+ * start one run of each plan and group those; this places real calls, exactly as
13
+ * starting each plan would.
14
+ *
15
+ * Poll GET /v1/simulation/run-group/{groupId} until `latestReport.status` is
16
+ * READY.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const simulationRunGroup =
21
+ * await client.simulationRunGroup.create();
22
+ * ```
23
+ */
24
+ create(body?: SimulationRunGroupCreateParams | null | undefined, options?: RequestOptions): APIPromise<SimulationRunGroupCreateResponse>;
25
+ /**
26
+ * Returns the run groups in the project, newest first, with their runs and where
27
+ * each group report stands. Read a report document from GET
28
+ * /v1/simulation/run-group/{groupId}.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const simulationRunGroups =
33
+ * await client.simulationRunGroup.list();
34
+ * ```
35
+ */
36
+ list(query?: SimulationRunGroupListParams | null | undefined, options?: RequestOptions): APIPromise<SimulationRunGroupListResponse>;
37
+ /**
38
+ * Deletes a run group. Its runs, and their results, are untouched.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const simulationRunGroup =
43
+ * await client.simulationRunGroup.delete(
44
+ * '5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
45
+ * );
46
+ * ```
47
+ */
48
+ delete(groupID: string, options?: RequestOptions): APIPromise<SimulationRunGroupDeleteResponse>;
49
+ /**
50
+ * Returns a run group with its runs in group order and its latest group report,
51
+ * including the report document once READY.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const response = await client.simulationRunGroup.getByID(
56
+ * '5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
57
+ * );
58
+ * ```
59
+ */
60
+ getByID(groupID: string, options?: RequestOptions): APIPromise<SimulationRunGroupGetByIDResponse>;
61
+ /**
62
+ * Generates the group report again over the latest state of its runs. Returns the
63
+ * report generation; if one is already in flight it is returned instead of
64
+ * starting another. Poll GET /v1/simulation/run-group/{groupId} until
65
+ * `latestReport.status` is READY.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const response =
70
+ * await client.simulationRunGroup.regenerateReport(
71
+ * '5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
72
+ * );
73
+ * ```
74
+ */
75
+ regenerateReport(groupID: string, options?: RequestOptions): APIPromise<SimulationRunGroupRegenerateReportResponse>;
76
+ }
77
+ export interface SimulationRunGroupCreateResponse {
78
+ /**
79
+ * Several simulation runs read as one.
80
+ */
81
+ data: SimulationRunGroupCreateResponse.Data;
82
+ }
83
+ export declare namespace SimulationRunGroupCreateResponse {
84
+ /**
85
+ * Several simulation runs read as one.
86
+ */
87
+ interface Data {
88
+ id: string;
89
+ /**
90
+ * ISO 8601
91
+ */
92
+ createdAt: string;
93
+ /**
94
+ * One generation of the group report.
95
+ */
96
+ latestReport: Data.LatestReport | null;
97
+ name: string;
98
+ runCount: number;
99
+ runs: Array<Data.Run>;
100
+ }
101
+ namespace Data {
102
+ /**
103
+ * One generation of the group report.
104
+ */
105
+ interface LatestReport {
106
+ id: string;
107
+ /**
108
+ * ISO 8601. Null until the report settles.
109
+ */
110
+ completedAt: string | null;
111
+ /**
112
+ * ISO 8601
113
+ */
114
+ createdAt: string;
115
+ /**
116
+ * The group report: the runs it covers, a scorecard summed across them, what went
117
+ * well, and the issues found, each merged from the per-run debriefs with
118
+ * call-level evidence. Every figure is computed from the runs; the prose is
119
+ * AI-written around those facts.
120
+ */
121
+ document: LatestReport.Document | null;
122
+ errorMessage: string | null;
123
+ /**
124
+ * PENDING and GENERATING are in flight; READY carries the document; FAILED carries
125
+ * errorMessage.
126
+ */
127
+ status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
128
+ }
129
+ namespace LatestReport {
130
+ /**
131
+ * The group report: the runs it covers, a scorecard summed across them, what went
132
+ * well, and the issues found, each merged from the per-run debriefs with
133
+ * call-level evidence. Every figure is computed from the runs; the prose is
134
+ * AI-written around those facts.
135
+ */
136
+ interface Document {
137
+ aggregates: Array<Document.Aggregate>;
138
+ executiveSummary: Array<Document.ExecutiveSummary>;
139
+ generatedAtIso: string;
140
+ headline: Document.Headline;
141
+ issues: Array<Document.Issue>;
142
+ methodology: string;
143
+ model: string;
144
+ recommendations: Array<Document.Recommendation>;
145
+ runs: Array<Document.Run>;
146
+ scorecard: Array<Document.Scorecard>;
147
+ simulationRunGroupId: string;
148
+ smallerItems: Array<Document.SmallerItem>;
149
+ version: 1;
150
+ wentWell: Array<Document.WentWell>;
151
+ }
152
+ namespace Document {
153
+ interface Aggregate {
154
+ averageLabel: string | null;
155
+ evaluatedCount: number;
156
+ medianLabel: string | null;
157
+ metricName: string;
158
+ p95Label: string | null;
159
+ }
160
+ interface ExecutiveSummary {
161
+ body: string;
162
+ heading: string;
163
+ }
164
+ interface Headline {
165
+ callCount: number;
166
+ completedAtIso: string | null;
167
+ groupName: string;
168
+ passedRunCount: number;
169
+ reportedRunCount: number;
170
+ runCount: number;
171
+ statTiles: Array<Headline.StatTile>;
172
+ verdict: 'PASSED' | 'THRESHOLD_FAILED';
173
+ verdictProse: string;
174
+ }
175
+ namespace Headline {
176
+ interface StatTile {
177
+ deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
178
+ label: string;
179
+ sub: string | null;
180
+ value: string;
181
+ }
182
+ }
183
+ interface Issue {
184
+ affectedCallCount: number;
185
+ body: string;
186
+ calls: Array<Issue.Call>;
187
+ checkNames: Array<string>;
188
+ evidence: Array<Issue.Evidence>;
189
+ order: number;
190
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
191
+ runLabels: Array<string>;
192
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
193
+ sourceThemes: Array<Issue.SourceTheme>;
194
+ title: string;
195
+ }
196
+ namespace Issue {
197
+ interface Call {
198
+ callId: string | null;
199
+ conversationId: string;
200
+ cueMs: number | null;
201
+ personaName: string | null;
202
+ simulationRunPlanJobId: string;
203
+ }
204
+ interface Evidence {
205
+ callId: string | null;
206
+ conversationId: string;
207
+ cueMs: number | null;
208
+ personaName: string | null;
209
+ simulationRunPlanJobId: string;
210
+ text: string;
211
+ }
212
+ interface SourceTheme {
213
+ simulationRunPlanJobId: string;
214
+ slug: string;
215
+ }
216
+ }
217
+ interface Recommendation {
218
+ body: string;
219
+ channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
220
+ issueOrders: Array<number>;
221
+ order: number;
222
+ title: string;
223
+ }
224
+ interface Run {
225
+ callCount: number;
226
+ checksPassed: number;
227
+ checksTotal: number;
228
+ completedAtIso: string | null;
229
+ runLabel: string;
230
+ runNumber: number | null;
231
+ simulationRunPlanJobId: string;
232
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
233
+ summary: string | null;
234
+ themeCount: number;
235
+ verdict: 'PASSED' | 'THRESHOLD_FAILED' | null;
236
+ }
237
+ interface Scorecard {
238
+ checkName: string;
239
+ evaluatedCount: number;
240
+ failedCount: number;
241
+ failedRunCount: number;
242
+ passRatePct: number | null;
243
+ runCount: number;
244
+ }
245
+ interface SmallerItem {
246
+ affectedCallCount: number;
247
+ body: string;
248
+ calls: Array<SmallerItem.Call>;
249
+ checkNames: Array<string>;
250
+ evidence: Array<SmallerItem.Evidence>;
251
+ order: number;
252
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
253
+ runLabels: Array<string>;
254
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
255
+ sourceThemes: Array<SmallerItem.SourceTheme>;
256
+ title: string;
257
+ }
258
+ namespace SmallerItem {
259
+ interface Call {
260
+ callId: string | null;
261
+ conversationId: string;
262
+ cueMs: number | null;
263
+ personaName: string | null;
264
+ simulationRunPlanJobId: string;
265
+ }
266
+ interface Evidence {
267
+ callId: string | null;
268
+ conversationId: string;
269
+ cueMs: number | null;
270
+ personaName: string | null;
271
+ simulationRunPlanJobId: string;
272
+ text: string;
273
+ }
274
+ interface SourceTheme {
275
+ simulationRunPlanJobId: string;
276
+ slug: string;
277
+ }
278
+ }
279
+ interface WentWell {
280
+ body: string;
281
+ evidence: Array<WentWell.Evidence>;
282
+ title: string;
283
+ }
284
+ namespace WentWell {
285
+ interface Evidence {
286
+ callId: string | null;
287
+ conversationId: string;
288
+ cueMs: number | null;
289
+ personaName: string | null;
290
+ simulationRunPlanJobId: string;
291
+ text: string;
292
+ }
293
+ }
294
+ }
295
+ }
296
+ /**
297
+ * One run in the group, in group order.
298
+ */
299
+ interface Run {
300
+ /**
301
+ * ISO 8601
302
+ */
303
+ createdAt: string;
304
+ endedAt: string | null;
305
+ /**
306
+ * The name of the plan the run ran. Null when the plan was deleted.
307
+ */
308
+ planName: string | null;
309
+ /**
310
+ * Per-project run number, shown as SR-42 in the app.
311
+ */
312
+ runNumber: number | null;
313
+ simulationRunPlanId: string;
314
+ /**
315
+ * The run, readable at GET /v1/simulation/plan/job/{jobId}
316
+ */
317
+ simulationRunPlanJobId: string;
318
+ startedAt: string | null;
319
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
320
+ }
321
+ }
322
+ }
323
+ export interface SimulationRunGroupListResponse {
324
+ data: Array<SimulationRunGroupListResponse.Data>;
325
+ pagination: SimulationRunGroupListResponse.Pagination;
326
+ }
327
+ export declare namespace SimulationRunGroupListResponse {
328
+ interface Data {
329
+ id: string;
330
+ /**
331
+ * ISO 8601
332
+ */
333
+ createdAt: string;
334
+ /**
335
+ * Where the group report stands, without its document.
336
+ */
337
+ latestReport: Data.LatestReport | null;
338
+ name: string;
339
+ runCount: number;
340
+ runs: Array<Data.Run>;
341
+ }
342
+ namespace Data {
343
+ /**
344
+ * Where the group report stands, without its document.
345
+ */
346
+ interface LatestReport {
347
+ id: string;
348
+ /**
349
+ * ISO 8601. Null until the report settles.
350
+ */
351
+ completedAt: string | null;
352
+ /**
353
+ * ISO 8601
354
+ */
355
+ createdAt: string;
356
+ errorMessage: string | null;
357
+ /**
358
+ * PENDING and GENERATING are in flight; READY carries the document; FAILED carries
359
+ * errorMessage.
360
+ */
361
+ status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
362
+ }
363
+ /**
364
+ * One run in the group, in group order.
365
+ */
366
+ interface Run {
367
+ /**
368
+ * ISO 8601
369
+ */
370
+ createdAt: string;
371
+ endedAt: string | null;
372
+ /**
373
+ * The name of the plan the run ran. Null when the plan was deleted.
374
+ */
375
+ planName: string | null;
376
+ /**
377
+ * Per-project run number, shown as SR-42 in the app.
378
+ */
379
+ runNumber: number | null;
380
+ simulationRunPlanId: string;
381
+ /**
382
+ * The run, readable at GET /v1/simulation/plan/job/{jobId}
383
+ */
384
+ simulationRunPlanJobId: string;
385
+ startedAt: string | null;
386
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
387
+ }
388
+ }
389
+ interface Pagination {
390
+ hasMore: boolean;
391
+ limit: number;
392
+ offset: number;
393
+ /**
394
+ * Total run groups in the project, ignoring this page.
395
+ */
396
+ total: number;
397
+ }
398
+ }
399
+ export interface SimulationRunGroupDeleteResponse {
400
+ data: SimulationRunGroupDeleteResponse.Data;
401
+ }
402
+ export declare namespace SimulationRunGroupDeleteResponse {
403
+ interface Data {
404
+ /**
405
+ * Whether the run group was deleted
406
+ */
407
+ deleted: boolean;
408
+ }
409
+ }
410
+ export interface SimulationRunGroupGetByIDResponse {
411
+ /**
412
+ * Several simulation runs read as one.
413
+ */
414
+ data: SimulationRunGroupGetByIDResponse.Data;
415
+ }
416
+ export declare namespace SimulationRunGroupGetByIDResponse {
417
+ /**
418
+ * Several simulation runs read as one.
419
+ */
420
+ interface Data {
421
+ id: string;
422
+ /**
423
+ * ISO 8601
424
+ */
425
+ createdAt: string;
426
+ /**
427
+ * One generation of the group report.
428
+ */
429
+ latestReport: Data.LatestReport | null;
430
+ name: string;
431
+ runCount: number;
432
+ runs: Array<Data.Run>;
433
+ }
434
+ namespace Data {
435
+ /**
436
+ * One generation of the group report.
437
+ */
438
+ interface LatestReport {
439
+ id: string;
440
+ /**
441
+ * ISO 8601. Null until the report settles.
442
+ */
443
+ completedAt: string | null;
444
+ /**
445
+ * ISO 8601
446
+ */
447
+ createdAt: string;
448
+ /**
449
+ * The group report: the runs it covers, a scorecard summed across them, what went
450
+ * well, and the issues found, each merged from the per-run debriefs with
451
+ * call-level evidence. Every figure is computed from the runs; the prose is
452
+ * AI-written around those facts.
453
+ */
454
+ document: LatestReport.Document | null;
455
+ errorMessage: string | null;
456
+ /**
457
+ * PENDING and GENERATING are in flight; READY carries the document; FAILED carries
458
+ * errorMessage.
459
+ */
460
+ status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
461
+ }
462
+ namespace LatestReport {
463
+ /**
464
+ * The group report: the runs it covers, a scorecard summed across them, what went
465
+ * well, and the issues found, each merged from the per-run debriefs with
466
+ * call-level evidence. Every figure is computed from the runs; the prose is
467
+ * AI-written around those facts.
468
+ */
469
+ interface Document {
470
+ aggregates: Array<Document.Aggregate>;
471
+ executiveSummary: Array<Document.ExecutiveSummary>;
472
+ generatedAtIso: string;
473
+ headline: Document.Headline;
474
+ issues: Array<Document.Issue>;
475
+ methodology: string;
476
+ model: string;
477
+ recommendations: Array<Document.Recommendation>;
478
+ runs: Array<Document.Run>;
479
+ scorecard: Array<Document.Scorecard>;
480
+ simulationRunGroupId: string;
481
+ smallerItems: Array<Document.SmallerItem>;
482
+ version: 1;
483
+ wentWell: Array<Document.WentWell>;
484
+ }
485
+ namespace Document {
486
+ interface Aggregate {
487
+ averageLabel: string | null;
488
+ evaluatedCount: number;
489
+ medianLabel: string | null;
490
+ metricName: string;
491
+ p95Label: string | null;
492
+ }
493
+ interface ExecutiveSummary {
494
+ body: string;
495
+ heading: string;
496
+ }
497
+ interface Headline {
498
+ callCount: number;
499
+ completedAtIso: string | null;
500
+ groupName: string;
501
+ passedRunCount: number;
502
+ reportedRunCount: number;
503
+ runCount: number;
504
+ statTiles: Array<Headline.StatTile>;
505
+ verdict: 'PASSED' | 'THRESHOLD_FAILED';
506
+ verdictProse: string;
507
+ }
508
+ namespace Headline {
509
+ interface StatTile {
510
+ deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
511
+ label: string;
512
+ sub: string | null;
513
+ value: string;
514
+ }
515
+ }
516
+ interface Issue {
517
+ affectedCallCount: number;
518
+ body: string;
519
+ calls: Array<Issue.Call>;
520
+ checkNames: Array<string>;
521
+ evidence: Array<Issue.Evidence>;
522
+ order: number;
523
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
524
+ runLabels: Array<string>;
525
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
526
+ sourceThemes: Array<Issue.SourceTheme>;
527
+ title: string;
528
+ }
529
+ namespace Issue {
530
+ interface Call {
531
+ callId: string | null;
532
+ conversationId: string;
533
+ cueMs: number | null;
534
+ personaName: string | null;
535
+ simulationRunPlanJobId: string;
536
+ }
537
+ interface Evidence {
538
+ callId: string | null;
539
+ conversationId: string;
540
+ cueMs: number | null;
541
+ personaName: string | null;
542
+ simulationRunPlanJobId: string;
543
+ text: string;
544
+ }
545
+ interface SourceTheme {
546
+ simulationRunPlanJobId: string;
547
+ slug: string;
548
+ }
549
+ }
550
+ interface Recommendation {
551
+ body: string;
552
+ channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
553
+ issueOrders: Array<number>;
554
+ order: number;
555
+ title: string;
556
+ }
557
+ interface Run {
558
+ callCount: number;
559
+ checksPassed: number;
560
+ checksTotal: number;
561
+ completedAtIso: string | null;
562
+ runLabel: string;
563
+ runNumber: number | null;
564
+ simulationRunPlanJobId: string;
565
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
566
+ summary: string | null;
567
+ themeCount: number;
568
+ verdict: 'PASSED' | 'THRESHOLD_FAILED' | null;
569
+ }
570
+ interface Scorecard {
571
+ checkName: string;
572
+ evaluatedCount: number;
573
+ failedCount: number;
574
+ failedRunCount: number;
575
+ passRatePct: number | null;
576
+ runCount: number;
577
+ }
578
+ interface SmallerItem {
579
+ affectedCallCount: number;
580
+ body: string;
581
+ calls: Array<SmallerItem.Call>;
582
+ checkNames: Array<string>;
583
+ evidence: Array<SmallerItem.Evidence>;
584
+ order: number;
585
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
586
+ runLabels: Array<string>;
587
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
588
+ sourceThemes: Array<SmallerItem.SourceTheme>;
589
+ title: string;
590
+ }
591
+ namespace SmallerItem {
592
+ interface Call {
593
+ callId: string | null;
594
+ conversationId: string;
595
+ cueMs: number | null;
596
+ personaName: string | null;
597
+ simulationRunPlanJobId: string;
598
+ }
599
+ interface Evidence {
600
+ callId: string | null;
601
+ conversationId: string;
602
+ cueMs: number | null;
603
+ personaName: string | null;
604
+ simulationRunPlanJobId: string;
605
+ text: string;
606
+ }
607
+ interface SourceTheme {
608
+ simulationRunPlanJobId: string;
609
+ slug: string;
610
+ }
611
+ }
612
+ interface WentWell {
613
+ body: string;
614
+ evidence: Array<WentWell.Evidence>;
615
+ title: string;
616
+ }
617
+ namespace WentWell {
618
+ interface Evidence {
619
+ callId: string | null;
620
+ conversationId: string;
621
+ cueMs: number | null;
622
+ personaName: string | null;
623
+ simulationRunPlanJobId: string;
624
+ text: string;
625
+ }
626
+ }
627
+ }
628
+ }
629
+ /**
630
+ * One run in the group, in group order.
631
+ */
632
+ interface Run {
633
+ /**
634
+ * ISO 8601
635
+ */
636
+ createdAt: string;
637
+ endedAt: string | null;
638
+ /**
639
+ * The name of the plan the run ran. Null when the plan was deleted.
640
+ */
641
+ planName: string | null;
642
+ /**
643
+ * Per-project run number, shown as SR-42 in the app.
644
+ */
645
+ runNumber: number | null;
646
+ simulationRunPlanId: string;
647
+ /**
648
+ * The run, readable at GET /v1/simulation/plan/job/{jobId}
649
+ */
650
+ simulationRunPlanJobId: string;
651
+ startedAt: string | null;
652
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
653
+ }
654
+ }
655
+ }
656
+ export interface SimulationRunGroupRegenerateReportResponse {
657
+ /**
658
+ * One generation of the group report.
659
+ */
660
+ data: SimulationRunGroupRegenerateReportResponse.Data;
661
+ }
662
+ export declare namespace SimulationRunGroupRegenerateReportResponse {
663
+ /**
664
+ * One generation of the group report.
665
+ */
666
+ interface Data {
667
+ id: string;
668
+ /**
669
+ * ISO 8601. Null until the report settles.
670
+ */
671
+ completedAt: string | null;
672
+ /**
673
+ * ISO 8601
674
+ */
675
+ createdAt: string;
676
+ /**
677
+ * The group report: the runs it covers, a scorecard summed across them, what went
678
+ * well, and the issues found, each merged from the per-run debriefs with
679
+ * call-level evidence. Every figure is computed from the runs; the prose is
680
+ * AI-written around those facts.
681
+ */
682
+ document: Data.Document | null;
683
+ errorMessage: string | null;
684
+ /**
685
+ * PENDING and GENERATING are in flight; READY carries the document; FAILED carries
686
+ * errorMessage.
687
+ */
688
+ status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
689
+ }
690
+ namespace Data {
691
+ /**
692
+ * The group report: the runs it covers, a scorecard summed across them, what went
693
+ * well, and the issues found, each merged from the per-run debriefs with
694
+ * call-level evidence. Every figure is computed from the runs; the prose is
695
+ * AI-written around those facts.
696
+ */
697
+ interface Document {
698
+ aggregates: Array<Document.Aggregate>;
699
+ executiveSummary: Array<Document.ExecutiveSummary>;
700
+ generatedAtIso: string;
701
+ headline: Document.Headline;
702
+ issues: Array<Document.Issue>;
703
+ methodology: string;
704
+ model: string;
705
+ recommendations: Array<Document.Recommendation>;
706
+ runs: Array<Document.Run>;
707
+ scorecard: Array<Document.Scorecard>;
708
+ simulationRunGroupId: string;
709
+ smallerItems: Array<Document.SmallerItem>;
710
+ version: 1;
711
+ wentWell: Array<Document.WentWell>;
712
+ }
713
+ namespace Document {
714
+ interface Aggregate {
715
+ averageLabel: string | null;
716
+ evaluatedCount: number;
717
+ medianLabel: string | null;
718
+ metricName: string;
719
+ p95Label: string | null;
720
+ }
721
+ interface ExecutiveSummary {
722
+ body: string;
723
+ heading: string;
724
+ }
725
+ interface Headline {
726
+ callCount: number;
727
+ completedAtIso: string | null;
728
+ groupName: string;
729
+ passedRunCount: number;
730
+ reportedRunCount: number;
731
+ runCount: number;
732
+ statTiles: Array<Headline.StatTile>;
733
+ verdict: 'PASSED' | 'THRESHOLD_FAILED';
734
+ verdictProse: string;
735
+ }
736
+ namespace Headline {
737
+ interface StatTile {
738
+ deltaDirection: 'POSITIVE' | 'NEGATIVE' | 'NEUTRAL' | null;
739
+ label: string;
740
+ sub: string | null;
741
+ value: string;
742
+ }
743
+ }
744
+ interface Issue {
745
+ affectedCallCount: number;
746
+ body: string;
747
+ calls: Array<Issue.Call>;
748
+ checkNames: Array<string>;
749
+ evidence: Array<Issue.Evidence>;
750
+ order: number;
751
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
752
+ runLabels: Array<string>;
753
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
754
+ sourceThemes: Array<Issue.SourceTheme>;
755
+ title: string;
756
+ }
757
+ namespace Issue {
758
+ interface Call {
759
+ callId: string | null;
760
+ conversationId: string;
761
+ cueMs: number | null;
762
+ personaName: string | null;
763
+ simulationRunPlanJobId: string;
764
+ }
765
+ interface Evidence {
766
+ callId: string | null;
767
+ conversationId: string;
768
+ cueMs: number | null;
769
+ personaName: string | null;
770
+ simulationRunPlanJobId: string;
771
+ text: string;
772
+ }
773
+ interface SourceTheme {
774
+ simulationRunPlanJobId: string;
775
+ slug: string;
776
+ }
777
+ }
778
+ interface Recommendation {
779
+ body: string;
780
+ channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
781
+ issueOrders: Array<number>;
782
+ order: number;
783
+ title: string;
784
+ }
785
+ interface Run {
786
+ callCount: number;
787
+ checksPassed: number;
788
+ checksTotal: number;
789
+ completedAtIso: string | null;
790
+ runLabel: string;
791
+ runNumber: number | null;
792
+ simulationRunPlanJobId: string;
793
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
794
+ summary: string | null;
795
+ themeCount: number;
796
+ verdict: 'PASSED' | 'THRESHOLD_FAILED' | null;
797
+ }
798
+ interface Scorecard {
799
+ checkName: string;
800
+ evaluatedCount: number;
801
+ failedCount: number;
802
+ failedRunCount: number;
803
+ passRatePct: number | null;
804
+ runCount: number;
805
+ }
806
+ interface SmallerItem {
807
+ affectedCallCount: number;
808
+ body: string;
809
+ calls: Array<SmallerItem.Call>;
810
+ checkNames: Array<string>;
811
+ evidence: Array<SmallerItem.Evidence>;
812
+ order: number;
813
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
814
+ runLabels: Array<string>;
815
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
816
+ sourceThemes: Array<SmallerItem.SourceTheme>;
817
+ title: string;
818
+ }
819
+ namespace SmallerItem {
820
+ interface Call {
821
+ callId: string | null;
822
+ conversationId: string;
823
+ cueMs: number | null;
824
+ personaName: string | null;
825
+ simulationRunPlanJobId: string;
826
+ }
827
+ interface Evidence {
828
+ callId: string | null;
829
+ conversationId: string;
830
+ cueMs: number | null;
831
+ personaName: string | null;
832
+ simulationRunPlanJobId: string;
833
+ text: string;
834
+ }
835
+ interface SourceTheme {
836
+ simulationRunPlanJobId: string;
837
+ slug: string;
838
+ }
839
+ }
840
+ interface WentWell {
841
+ body: string;
842
+ evidence: Array<WentWell.Evidence>;
843
+ title: string;
844
+ }
845
+ namespace WentWell {
846
+ interface Evidence {
847
+ callId: string | null;
848
+ conversationId: string;
849
+ cueMs: number | null;
850
+ personaName: string | null;
851
+ simulationRunPlanJobId: string;
852
+ text: string;
853
+ }
854
+ }
855
+ }
856
+ }
857
+ }
858
+ export interface SimulationRunGroupCreateParams {
859
+ /**
860
+ * What to call the group. Defaults to the plans' names when starting plans, and to
861
+ * the runs' plan names when grouping existing runs.
862
+ */
863
+ name?: string;
864
+ /**
865
+ * Plans to run once each, in display order (2 to 20). Each plan starts a run,
866
+ * exactly as POST /v1/simulation/plan/{planId}/job would. Send this or
867
+ * `simulationRunPlanJobIds`, not both.
868
+ */
869
+ simulationRunPlanIds?: Array<string>;
870
+ /**
871
+ * Runs that already exist, in display order (2 to 20). Runs still in progress are
872
+ * fine: the group report waits for them. Send this or `simulationRunPlanIds`, not
873
+ * both.
874
+ */
875
+ simulationRunPlanJobIds?: Array<string>;
876
+ }
877
+ export interface SimulationRunGroupListParams {
878
+ /**
879
+ * Maximum number of run groups to return (default: 20, max: 100)
880
+ */
881
+ limit?: number;
882
+ /**
883
+ * Pagination offset
884
+ */
885
+ offset?: number;
886
+ }
887
+ export declare namespace SimulationRunGroup {
888
+ export { type SimulationRunGroupCreateResponse as SimulationRunGroupCreateResponse, type SimulationRunGroupListResponse as SimulationRunGroupListResponse, type SimulationRunGroupDeleteResponse as SimulationRunGroupDeleteResponse, type SimulationRunGroupGetByIDResponse as SimulationRunGroupGetByIDResponse, type SimulationRunGroupRegenerateReportResponse as SimulationRunGroupRegenerateReportResponse, type SimulationRunGroupCreateParams as SimulationRunGroupCreateParams, type SimulationRunGroupListParams as SimulationRunGroupListParams, };
889
+ }
890
+ //# sourceMappingURL=simulation-run-group.d.ts.map