@roarkanalytics/sdk 3.12.0 → 3.14.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 (83) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/benchmark.d.mts +547 -0
  12. package/resources/benchmark.d.mts.map +1 -0
  13. package/resources/benchmark.d.ts +547 -0
  14. package/resources/benchmark.d.ts.map +1 -0
  15. package/resources/benchmark.js +110 -0
  16. package/resources/benchmark.js.map +1 -0
  17. package/resources/benchmark.mjs +106 -0
  18. package/resources/benchmark.mjs.map +1 -0
  19. package/resources/config.d.mts +6 -6
  20. package/resources/config.d.mts.map +1 -1
  21. package/resources/config.d.ts +6 -6
  22. package/resources/config.d.ts.map +1 -1
  23. package/resources/customer-flow-edge-case.d.mts +45 -36
  24. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  25. package/resources/customer-flow-edge-case.d.ts +45 -36
  26. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  27. package/resources/customer-flow.d.mts +189 -144
  28. package/resources/customer-flow.d.mts.map +1 -1
  29. package/resources/customer-flow.d.ts +189 -144
  30. package/resources/customer-flow.d.ts.map +1 -1
  31. package/resources/index.d.mts +2 -1
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +2 -1
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +3 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/simulation-environment.d.mts +6 -6
  40. package/resources/simulation-environment.d.mts.map +1 -1
  41. package/resources/simulation-environment.d.ts +6 -6
  42. package/resources/simulation-environment.d.ts.map +1 -1
  43. package/resources/simulation-job.d.mts +8 -6
  44. package/resources/simulation-job.d.mts.map +1 -1
  45. package/resources/simulation-job.d.ts +8 -6
  46. package/resources/simulation-job.d.ts.map +1 -1
  47. package/resources/simulation-persona.d.mts +24 -18
  48. package/resources/simulation-persona.d.mts.map +1 -1
  49. package/resources/simulation-persona.d.ts +24 -18
  50. package/resources/simulation-persona.d.ts.map +1 -1
  51. package/resources/simulation-run-plan-job.d.mts +142 -4
  52. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  53. package/resources/simulation-run-plan-job.d.ts +142 -4
  54. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  55. package/resources/simulation-run-plan-job.js +16 -0
  56. package/resources/simulation-run-plan-job.js.map +1 -1
  57. package/resources/simulation-run-plan-job.mjs +16 -0
  58. package/resources/simulation-run-plan-job.mjs.map +1 -1
  59. package/resources/simulation-run-plan.d.mts +38 -0
  60. package/resources/simulation-run-plan.d.mts.map +1 -1
  61. package/resources/simulation-run-plan.d.ts +38 -0
  62. package/resources/simulation-run-plan.d.ts.map +1 -1
  63. package/resources/simulation.d.mts +9 -0
  64. package/resources/simulation.d.mts.map +1 -1
  65. package/resources/simulation.d.ts +9 -0
  66. package/resources/simulation.d.ts.map +1 -1
  67. package/src/client.ts +33 -0
  68. package/src/resources/benchmark.ts +740 -0
  69. package/src/resources/config.ts +18 -6
  70. package/src/resources/customer-flow-edge-case.ts +117 -36
  71. package/src/resources/customer-flow.ts +480 -145
  72. package/src/resources/index.ts +15 -0
  73. package/src/resources/simulation-environment.ts +30 -6
  74. package/src/resources/simulation-job.ts +16 -6
  75. package/src/resources/simulation-persona.ts +48 -18
  76. package/src/resources/simulation-run-plan-job.ts +206 -3
  77. package/src/resources/simulation-run-plan.ts +44 -0
  78. package/src/resources/simulation.ts +10 -0
  79. package/src/version.ts +1 -1
  80. package/version.d.mts +1 -1
  81. package/version.d.ts +1 -1
  82. package/version.js +1 -1
  83. package/version.mjs +1 -1
@@ -28,6 +28,20 @@ export {
28
28
  type AgentPromptUpdateParams,
29
29
  type AgentPromptListVersionsParams,
30
30
  } from './agent-prompt';
31
+ export {
32
+ Benchmark,
33
+ type BenchmarkGetLeaderboardResponse,
34
+ type BenchmarkGetTargetResponse,
35
+ type BenchmarkListMetricsResponse,
36
+ type BenchmarkListSuitesResponse,
37
+ type BenchmarkListTargetHistoryResponse,
38
+ type BenchmarkListTargetScoreSamplesResponse,
39
+ type BenchmarkGetLeaderboardParams,
40
+ type BenchmarkGetTargetParams,
41
+ type BenchmarkListMetricsParams,
42
+ type BenchmarkListTargetHistoryParams,
43
+ type BenchmarkListTargetScoreSamplesParams,
44
+ } from './benchmark';
31
45
  export {
32
46
  Call,
33
47
  type CallCreateResponse,
@@ -174,6 +188,7 @@ export {
174
188
  export {
175
189
  SimulationRunPlanJob,
176
190
  type SimulationRunPlanJobListResponse,
191
+ type SimulationRunPlanJobCancelResponse,
177
192
  type SimulationRunPlanJobGetByIDResponse,
178
193
  type SimulationRunPlanJobStartResponse,
179
194
  type SimulationRunPlanJobListParams,
@@ -124,9 +124,13 @@ export namespace SimulationEnvironmentCreateResponse {
124
124
  | 'CHILDREN_PLAYING'
125
125
  | 'CITY'
126
126
  | 'COFFEE_SHOP'
127
+ | 'CONSTRUCTION'
128
+ | 'CRYING_BABY'
127
129
  | 'DRIVING'
130
+ | 'LIBRARY'
128
131
  | 'OFFICE'
129
- | 'THUNDERSTORM';
132
+ | 'THUNDERSTORM'
133
+ | 'TRAIN';
130
134
 
131
135
  backgroundNoiseVolume: number;
132
136
 
@@ -170,9 +174,13 @@ export namespace SimulationEnvironmentUpdateResponse {
170
174
  | 'CHILDREN_PLAYING'
171
175
  | 'CITY'
172
176
  | 'COFFEE_SHOP'
177
+ | 'CONSTRUCTION'
178
+ | 'CRYING_BABY'
173
179
  | 'DRIVING'
180
+ | 'LIBRARY'
174
181
  | 'OFFICE'
175
- | 'THUNDERSTORM';
182
+ | 'THUNDERSTORM'
183
+ | 'TRAIN';
176
184
 
177
185
  backgroundNoiseVolume: number;
178
186
 
@@ -217,9 +225,13 @@ export namespace SimulationEnvironmentListResponse {
217
225
  | 'CHILDREN_PLAYING'
218
226
  | 'CITY'
219
227
  | 'COFFEE_SHOP'
228
+ | 'CONSTRUCTION'
229
+ | 'CRYING_BABY'
220
230
  | 'DRIVING'
231
+ | 'LIBRARY'
221
232
  | 'OFFICE'
222
- | 'THUNDERSTORM';
233
+ | 'THUNDERSTORM'
234
+ | 'TRAIN';
223
235
 
224
236
  backgroundNoiseVolume: number;
225
237
 
@@ -298,9 +310,13 @@ export namespace SimulationEnvironmentGetByIDResponse {
298
310
  | 'CHILDREN_PLAYING'
299
311
  | 'CITY'
300
312
  | 'COFFEE_SHOP'
313
+ | 'CONSTRUCTION'
314
+ | 'CRYING_BABY'
301
315
  | 'DRIVING'
316
+ | 'LIBRARY'
302
317
  | 'OFFICE'
303
- | 'THUNDERSTORM';
318
+ | 'THUNDERSTORM'
319
+ | 'TRAIN';
304
320
 
305
321
  backgroundNoiseVolume: number;
306
322
 
@@ -330,9 +346,13 @@ export interface SimulationEnvironmentCreateParams {
330
346
  | 'CHILDREN_PLAYING'
331
347
  | 'CITY'
332
348
  | 'COFFEE_SHOP'
349
+ | 'CONSTRUCTION'
350
+ | 'CRYING_BABY'
333
351
  | 'DRIVING'
352
+ | 'LIBRARY'
334
353
  | 'OFFICE'
335
- | 'THUNDERSTORM';
354
+ | 'THUNDERSTORM'
355
+ | 'TRAIN';
336
356
 
337
357
  /**
338
358
  * Display name, shown wherever a flow variant references the environment
@@ -362,9 +382,13 @@ export interface SimulationEnvironmentUpdateParams {
362
382
  | 'CHILDREN_PLAYING'
363
383
  | 'CITY'
364
384
  | 'COFFEE_SHOP'
385
+ | 'CONSTRUCTION'
386
+ | 'CRYING_BABY'
365
387
  | 'DRIVING'
388
+ | 'LIBRARY'
366
389
  | 'OFFICE'
367
- | 'THUNDERSTORM';
390
+ | 'THUNDERSTORM'
391
+ | 'TRAIN';
368
392
 
369
393
  /**
370
394
  * How loud the bed plays, as a gain from 0 (silent) to 1 (as loud as the caller).
@@ -273,9 +273,13 @@ export namespace SimulationJobGetByIDResponse {
273
273
  | 'CHILDREN_PLAYING'
274
274
  | 'CITY'
275
275
  | 'COFFEE_SHOP'
276
+ | 'CONSTRUCTION'
277
+ | 'CRYING_BABY'
276
278
  | 'DRIVING'
279
+ | 'LIBRARY'
277
280
  | 'OFFICE'
278
- | 'THUNDERSTORM';
281
+ | 'THUNDERSTORM'
282
+ | 'TRAIN';
279
283
 
280
284
  /**
281
285
  * Base emotional state of the persona
@@ -378,9 +382,10 @@ export namespace SimulationJobGetByIDResponse {
378
382
 
379
383
  /**
380
384
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
381
- * NORMAL, RELAXED)
385
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
386
+ * for several seconds.
382
387
  */
383
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
388
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
384
389
 
385
390
  /**
386
391
  * Speech clarity of the persona
@@ -713,9 +718,13 @@ export namespace SimulationJobLookupResponse {
713
718
  | 'CHILDREN_PLAYING'
714
719
  | 'CITY'
715
720
  | 'COFFEE_SHOP'
721
+ | 'CONSTRUCTION'
722
+ | 'CRYING_BABY'
716
723
  | 'DRIVING'
724
+ | 'LIBRARY'
717
725
  | 'OFFICE'
718
- | 'THUNDERSTORM';
726
+ | 'THUNDERSTORM'
727
+ | 'TRAIN';
719
728
 
720
729
  /**
721
730
  * Base emotional state of the persona
@@ -818,9 +827,10 @@ export namespace SimulationJobLookupResponse {
818
827
 
819
828
  /**
820
829
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
821
- * NORMAL, RELAXED)
830
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
831
+ * for several seconds.
822
832
  */
823
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
833
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
824
834
 
825
835
  /**
826
836
  * Speech clarity of the persona
@@ -129,9 +129,13 @@ export namespace SimulationPersonaCreateResponse {
129
129
  | 'CHILDREN_PLAYING'
130
130
  | 'CITY'
131
131
  | 'COFFEE_SHOP'
132
+ | 'CONSTRUCTION'
133
+ | 'CRYING_BABY'
132
134
  | 'DRIVING'
135
+ | 'LIBRARY'
133
136
  | 'OFFICE'
134
- | 'THUNDERSTORM';
137
+ | 'THUNDERSTORM'
138
+ | 'TRAIN';
135
139
 
136
140
  /**
137
141
  * Base emotional state of the persona
@@ -234,9 +238,10 @@ export namespace SimulationPersonaCreateResponse {
234
238
 
235
239
  /**
236
240
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
237
- * NORMAL, RELAXED)
241
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
242
+ * for several seconds.
238
243
  */
239
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
244
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
240
245
 
241
246
  /**
242
247
  * Speech clarity of the persona
@@ -357,9 +362,13 @@ export namespace SimulationPersonaUpdateResponse {
357
362
  | 'CHILDREN_PLAYING'
358
363
  | 'CITY'
359
364
  | 'COFFEE_SHOP'
365
+ | 'CONSTRUCTION'
366
+ | 'CRYING_BABY'
360
367
  | 'DRIVING'
368
+ | 'LIBRARY'
361
369
  | 'OFFICE'
362
- | 'THUNDERSTORM';
370
+ | 'THUNDERSTORM'
371
+ | 'TRAIN';
363
372
 
364
373
  /**
365
374
  * Base emotional state of the persona
@@ -462,9 +471,10 @@ export namespace SimulationPersonaUpdateResponse {
462
471
 
463
472
  /**
464
473
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
465
- * NORMAL, RELAXED)
474
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
475
+ * for several seconds.
466
476
  */
467
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
477
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
468
478
 
469
479
  /**
470
480
  * Speech clarity of the persona
@@ -587,9 +597,13 @@ export namespace SimulationPersonaListResponse {
587
597
  | 'CHILDREN_PLAYING'
588
598
  | 'CITY'
589
599
  | 'COFFEE_SHOP'
600
+ | 'CONSTRUCTION'
601
+ | 'CRYING_BABY'
590
602
  | 'DRIVING'
603
+ | 'LIBRARY'
591
604
  | 'OFFICE'
592
- | 'THUNDERSTORM';
605
+ | 'THUNDERSTORM'
606
+ | 'TRAIN';
593
607
 
594
608
  /**
595
609
  * Base emotional state of the persona
@@ -692,9 +706,10 @@ export namespace SimulationPersonaListResponse {
692
706
 
693
707
  /**
694
708
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
695
- * NORMAL, RELAXED)
709
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
710
+ * for several seconds.
696
711
  */
697
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
712
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
698
713
 
699
714
  /**
700
715
  * Speech clarity of the persona
@@ -832,9 +847,13 @@ export namespace SimulationPersonaGetByIDResponse {
832
847
  | 'CHILDREN_PLAYING'
833
848
  | 'CITY'
834
849
  | 'COFFEE_SHOP'
850
+ | 'CONSTRUCTION'
851
+ | 'CRYING_BABY'
835
852
  | 'DRIVING'
853
+ | 'LIBRARY'
836
854
  | 'OFFICE'
837
- | 'THUNDERSTORM';
855
+ | 'THUNDERSTORM'
856
+ | 'TRAIN';
838
857
 
839
858
  /**
840
859
  * Base emotional state of the persona
@@ -937,9 +956,10 @@ export namespace SimulationPersonaGetByIDResponse {
937
956
 
938
957
  /**
939
958
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
940
- * NORMAL, RELAXED)
959
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
960
+ * for several seconds.
941
961
  */
942
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
962
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
943
963
 
944
964
  /**
945
965
  * Speech clarity of the persona
@@ -1083,9 +1103,13 @@ export interface SimulationPersonaCreateParams {
1083
1103
  | 'CHILDREN_PLAYING'
1084
1104
  | 'CITY'
1085
1105
  | 'COFFEE_SHOP'
1106
+ | 'CONSTRUCTION'
1107
+ | 'CRYING_BABY'
1086
1108
  | 'DRIVING'
1109
+ | 'LIBRARY'
1087
1110
  | 'OFFICE'
1088
- | 'THUNDERSTORM';
1111
+ | 'THUNDERSTORM'
1112
+ | 'TRAIN';
1089
1113
 
1090
1114
  /**
1091
1115
  * Background story and behavioral patterns for the persona
@@ -1167,9 +1191,10 @@ export interface SimulationPersonaCreateParams {
1167
1191
 
1168
1192
  /**
1169
1193
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1170
- * NORMAL, RELAXED)
1194
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1195
+ * for several seconds.
1171
1196
  */
1172
- responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';
1197
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1173
1198
 
1174
1199
  /**
1175
1200
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
@@ -1257,9 +1282,13 @@ export interface SimulationPersonaUpdateParams {
1257
1282
  | 'CHILDREN_PLAYING'
1258
1283
  | 'CITY'
1259
1284
  | 'COFFEE_SHOP'
1285
+ | 'CONSTRUCTION'
1286
+ | 'CRYING_BABY'
1260
1287
  | 'DRIVING'
1288
+ | 'LIBRARY'
1261
1289
  | 'OFFICE'
1262
- | 'THUNDERSTORM';
1290
+ | 'THUNDERSTORM'
1291
+ | 'TRAIN';
1263
1292
 
1264
1293
  /**
1265
1294
  * Background story and behavioral patterns for the persona
@@ -1374,9 +1403,10 @@ export interface SimulationPersonaUpdateParams {
1374
1403
 
1375
1404
  /**
1376
1405
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
1377
- * NORMAL, RELAXED)
1406
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
1407
+ * for several seconds.
1378
1408
  */
1379
- responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK';
1409
+ responseTiming?: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
1380
1410
 
1381
1411
  /**
1382
1412
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
@@ -23,6 +23,23 @@ export class SimulationRunPlanJob extends APIResource {
23
23
  return this._client.get('/v1/simulation/plan/jobs', { query, ...options });
24
24
  }
25
25
 
26
+ /**
27
+ * Stops a run that has not finished yet. Already-finished runs are left alone.
28
+ *
29
+ * Intended for CI: when a pipeline is cancelled or superseded, cancelling the run
30
+ * stops it placing calls you no longer need. Safe to call more than once.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * const response = await client.simulationRunPlanJob.cancel(
35
+ * '7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f',
36
+ * );
37
+ * ```
38
+ */
39
+ cancel(jobID: string, options?: RequestOptions): APIPromise<SimulationRunPlanJobCancelResponse> {
40
+ return this._client.post(path`/v1/simulation/plan/job/${jobID}/cancel`, options);
41
+ }
42
+
26
43
  /**
27
44
  * Retrieve details of a simulation plan job including all associated simulation
28
45
  * jobs (calls)
@@ -144,6 +161,45 @@ export namespace SimulationRunPlanJobListResponse {
144
161
  }
145
162
  }
146
163
 
164
+ export interface SimulationRunPlanJobCancelResponse {
165
+ /**
166
+ * Result of cancelling a simulation plan job
167
+ */
168
+ data: SimulationRunPlanJobCancelResponse.Data;
169
+ }
170
+
171
+ export namespace SimulationRunPlanJobCancelResponse {
172
+ /**
173
+ * Result of cancelling a simulation plan job
174
+ */
175
+ export interface Data {
176
+ /**
177
+ * True when this request stopped the run. False when it had already finished,
178
+ * which is not an error.
179
+ */
180
+ cancelled: boolean;
181
+
182
+ simulationRunPlanJobId: string;
183
+
184
+ /**
185
+ * The job status after the request. Unchanged when the run had already finished.
186
+ */
187
+ status:
188
+ | 'PENDING'
189
+ | 'QUEUED'
190
+ | 'CREATING_SNAPSHOTS'
191
+ | 'CREATING_SIMULATIONS'
192
+ | 'PREPARING_CAPACITY'
193
+ | 'RUNNING_SIMULATIONS'
194
+ | 'COMPLETED'
195
+ | 'FAILED'
196
+ | 'TIMED_OUT'
197
+ | 'CANCELLED'
198
+ | 'CANCELLING'
199
+ | 'ENDING_SIMULATIONS';
200
+ }
201
+ }
202
+
147
203
  export interface SimulationRunPlanJobGetByIDResponse {
148
204
  /**
149
205
  * Simulation run plan job with all associated simulation jobs
@@ -202,6 +258,12 @@ export namespace SimulationRunPlanJobGetByIDResponse {
202
258
  * When the job started
203
259
  */
204
260
  startedAt?: string | null;
261
+
262
+ /**
263
+ * Pass/fail verdict for the run, judged against the success criteria pinned on the
264
+ * run plan when the run started.
265
+ */
266
+ verdict?: Data.Verdict | null;
205
267
  }
206
268
 
207
269
  export namespace Data {
@@ -391,9 +453,13 @@ export namespace SimulationRunPlanJobGetByIDResponse {
391
453
  | 'CHILDREN_PLAYING'
392
454
  | 'CITY'
393
455
  | 'COFFEE_SHOP'
456
+ | 'CONSTRUCTION'
457
+ | 'CRYING_BABY'
394
458
  | 'DRIVING'
459
+ | 'LIBRARY'
395
460
  | 'OFFICE'
396
- | 'THUNDERSTORM';
461
+ | 'THUNDERSTORM'
462
+ | 'TRAIN';
397
463
 
398
464
  /**
399
465
  * Base emotional state of the persona
@@ -496,9 +562,10 @@ export namespace SimulationRunPlanJobGetByIDResponse {
496
562
 
497
563
  /**
498
564
  * Controls how quickly the persona responds to pauses in conversation (QUICK,
499
- * NORMAL, RELAXED)
565
+ * NORMAL, RELAXED). BARGE_IN also talks over the agent once it has held the floor
566
+ * for several seconds.
500
567
  */
501
- responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK';
568
+ responseTiming: 'RELAXED' | 'NORMAL' | 'QUICK' | 'BARGE_IN';
502
569
 
503
570
  /**
504
571
  * Speech clarity of the persona
@@ -578,6 +645,141 @@ export namespace SimulationRunPlanJobGetByIDResponse {
578
645
  description?: string | null;
579
646
  }
580
647
  }
648
+
649
+ /**
650
+ * Pass/fail verdict for the run, judged against the success criteria pinned on the
651
+ * run plan when the run started.
652
+ */
653
+ export interface Verdict {
654
+ /**
655
+ * Every check the run was judged on, with its rate and the minimum it had to
656
+ * reach.
657
+ */
658
+ checks: Array<Verdict.Check>;
659
+
660
+ /**
661
+ * Every criterion the run missed. Empty when it passed.
662
+ */
663
+ failures: Array<
664
+ Verdict.UnionMember0 | Verdict.UnionMember1 | Verdict.UnionMember2 | Verdict.UnionMember3
665
+ >;
666
+
667
+ /**
668
+ * Whether every check cleared its own `minPassRate` (and the run completed with
669
+ * full coverage). Use this as the CI exit status.
670
+ *
671
+ * Never derived from `score`: a run can score 95 and still fail, or score 40 and
672
+ * still pass.
673
+ */
674
+ passed: boolean;
675
+
676
+ /**
677
+ * The run's headline quality number, 0-100: the mean of each check's own pass
678
+ * rate.
679
+ *
680
+ * REPORTING ONLY, for dashboards and trend lines. Nothing is judged against it.
681
+ * Null when nothing was evaluated.
682
+ */
683
+ score: number | null;
684
+ }
685
+
686
+ export namespace Verdict {
687
+ /**
688
+ * How one pass/fail metric did. Present for every check, passing or not.
689
+ */
690
+ export interface Check {
691
+ evaluatedSims: number;
692
+
693
+ /**
694
+ * Whether `minPassRate` is the 80% default (`true`) or a minimum this metric set
695
+ * for itself.
696
+ */
697
+ inherited: boolean;
698
+
699
+ metricDefinitionId: string;
700
+
701
+ /**
702
+ * THE BAR it was judged against: the share of the run's simulations it had to
703
+ * pass.
704
+ */
705
+ minPassRate: number;
706
+
707
+ /**
708
+ * This check's own pass rate, 0-100: the share of sims it evaluated that passed
709
+ * it. Null when it evaluated nothing.
710
+ */
711
+ passRate: number | null;
712
+
713
+ /**
714
+ * `passRate >= minPassRate`.
715
+ */
716
+ passed: boolean;
717
+
718
+ passedSims: number;
719
+
720
+ metricName?: string | null;
721
+ }
722
+
723
+ export interface UnionMember0 {
724
+ /**
725
+ * The status the run actually ended in.
726
+ */
727
+ status:
728
+ | 'PENDING'
729
+ | 'QUEUED'
730
+ | 'CREATING_SNAPSHOTS'
731
+ | 'CREATING_SIMULATIONS'
732
+ | 'PREPARING_CAPACITY'
733
+ | 'RUNNING_SIMULATIONS'
734
+ | 'COMPLETED'
735
+ | 'FAILED'
736
+ | 'TIMED_OUT'
737
+ | 'CANCELLED'
738
+ | 'CANCELLING'
739
+ | 'ENDING_SIMULATIONS';
740
+
741
+ type: 'RUN_NOT_COMPLETED';
742
+ }
743
+
744
+ export interface UnionMember1 {
745
+ evaluatedCalls: number;
746
+
747
+ expectedCalls: number;
748
+
749
+ type: 'INCOMPLETE_COVERAGE';
750
+ }
751
+
752
+ export interface UnionMember2 {
753
+ metricDefinitionId: string;
754
+
755
+ type: 'METRIC_NOT_EVALUATED';
756
+
757
+ /**
758
+ * The check’s name, for rendering the failure.
759
+ */
760
+ metricName?: string | null;
761
+ }
762
+
763
+ export interface UnionMember3 {
764
+ /**
765
+ * Whether the missed minimum was the 80% default (`true`) or this metric's own.
766
+ */
767
+ inherited: boolean;
768
+
769
+ metricDefinitionId: string;
770
+
771
+ minPassRate: number;
772
+
773
+ passRate: number;
774
+
775
+ type: 'METRIC_BELOW_MIN_PASS_RATE';
776
+
777
+ /**
778
+ * The check’s name, for rendering the failure.
779
+ */
780
+ metricName?: string | null;
781
+ }
782
+ }
581
783
  }
582
784
  }
583
785
 
@@ -745,6 +947,7 @@ export namespace SimulationRunPlanJobStartParams {
745
947
  export declare namespace SimulationRunPlanJob {
746
948
  export {
747
949
  type SimulationRunPlanJobListResponse as SimulationRunPlanJobListResponse,
950
+ type SimulationRunPlanJobCancelResponse as SimulationRunPlanJobCancelResponse,
748
951
  type SimulationRunPlanJobGetByIDResponse as SimulationRunPlanJobGetByIDResponse,
749
952
  type SimulationRunPlanJobStartResponse as SimulationRunPlanJobStartResponse,
750
953
  type SimulationRunPlanJobListParams as SimulationRunPlanJobListParams,
@@ -342,6 +342,12 @@ export namespace SimulationRunPlanCreateResponse {
342
342
  * default, SIMULATED.
343
343
  */
344
344
  conversationSource: 'SIMULATED' | 'LIVE' | null;
345
+
346
+ /**
347
+ * THE BAR. The share of the run's simulations (0-100) that must pass this check.
348
+ * `null` means the 80% default.
349
+ */
350
+ minPassRate: number | null;
345
351
  }
346
352
 
347
353
  export interface Persona {
@@ -624,6 +630,12 @@ export namespace SimulationRunPlanUpdateResponse {
624
630
  * default, SIMULATED.
625
631
  */
626
632
  conversationSource: 'SIMULATED' | 'LIVE' | null;
633
+
634
+ /**
635
+ * THE BAR. The share of the run's simulations (0-100) that must pass this check.
636
+ * `null` means the 80% default.
637
+ */
638
+ minPassRate: number | null;
627
639
  }
628
640
 
629
641
  export interface Persona {
@@ -870,6 +882,12 @@ export namespace SimulationRunPlanListResponse {
870
882
  * default, SIMULATED.
871
883
  */
872
884
  conversationSource: 'SIMULATED' | 'LIVE' | null;
885
+
886
+ /**
887
+ * THE BAR. The share of the run's simulations (0-100) that must pass this check.
888
+ * `null` means the 80% default.
889
+ */
890
+ minPassRate: number | null;
873
891
  }
874
892
 
875
893
  export interface Persona {
@@ -1144,6 +1162,12 @@ export namespace SimulationRunPlanGetByIDResponse {
1144
1162
  * default, SIMULATED.
1145
1163
  */
1146
1164
  conversationSource: 'SIMULATED' | 'LIVE' | null;
1165
+
1166
+ /**
1167
+ * THE BAR. The share of the run's simulations (0-100) that must pass this check.
1168
+ * `null` means the 80% default.
1169
+ */
1170
+ minPassRate: number | null;
1147
1171
  }
1148
1172
 
1149
1173
  export interface Persona {
@@ -1326,6 +1350,16 @@ export namespace SimulationRunPlanCreateParams {
1326
1350
  */
1327
1351
  metricId?: string;
1328
1352
 
1353
+ /**
1354
+ * THE BAR, and the only thing that decides pass/fail. The share of the run's
1355
+ * simulations that must pass this check, 0-100.
1356
+ *
1357
+ * Applied to this check alone and never pooled: silence duration at 40 and word
1358
+ * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
1359
+ * word count. Omit or `null` for the 80% default.
1360
+ */
1361
+ minPassRate?: number | null;
1362
+
1329
1363
  /**
1330
1364
  * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
1331
1365
  * not both.
@@ -1629,6 +1663,16 @@ export namespace SimulationRunPlanUpdateParams {
1629
1663
  */
1630
1664
  metricId?: string;
1631
1665
 
1666
+ /**
1667
+ * THE BAR, and the only thing that decides pass/fail. The share of the run's
1668
+ * simulations that must pass this check, 0-100.
1669
+ *
1670
+ * Applied to this check alone and never pooled: silence duration at 40 and word
1671
+ * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
1672
+ * word count. Omit or `null` for the 80% default.
1673
+ */
1674
+ minPassRate?: number | null;
1675
+
1632
1676
  /**
1633
1677
  * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
1634
1678
  * not both.
@@ -312,6 +312,16 @@ export declare namespace SimulationRunParams {
312
312
  */
313
313
  metricId?: string;
314
314
 
315
+ /**
316
+ * THE BAR, and the only thing that decides pass/fail. The share of the run's
317
+ * simulations that must pass this check, 0-100.
318
+ *
319
+ * Applied to this check alone and never pooled: silence duration at 40 and word
320
+ * count at 80 means the run fails unless 40% of sims clear silence AND 80% clear
321
+ * word count. Omit or `null` for the 80% default.
322
+ */
323
+ minPassRate?: number | null;
324
+
315
325
  /**
316
326
  * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
317
327
  * not both.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.12.0'; // x-release-please-version
1
+ export const VERSION = '3.14.0'; // x-release-please-version