@roarkanalytics/sdk 3.11.0 → 3.13.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 (110) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/client.d.mts +12 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +12 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-prompt.d.mts +129 -0
  12. package/resources/agent-prompt.d.mts.map +1 -0
  13. package/resources/agent-prompt.d.ts +129 -0
  14. package/resources/agent-prompt.d.ts.map +1 -0
  15. package/resources/agent-prompt.js +58 -0
  16. package/resources/agent-prompt.js.map +1 -0
  17. package/resources/agent-prompt.mjs +54 -0
  18. package/resources/agent-prompt.mjs.map +1 -0
  19. package/resources/benchmark.d.mts +547 -0
  20. package/resources/benchmark.d.mts.map +1 -0
  21. package/resources/benchmark.d.ts +547 -0
  22. package/resources/benchmark.d.ts.map +1 -0
  23. package/resources/benchmark.js +110 -0
  24. package/resources/benchmark.js.map +1 -0
  25. package/resources/benchmark.mjs +106 -0
  26. package/resources/benchmark.mjs.map +1 -0
  27. package/resources/call.d.mts +1 -1
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +1 -1
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/config.d.mts +169 -21
  32. package/resources/config.d.mts.map +1 -1
  33. package/resources/config.d.ts +169 -21
  34. package/resources/config.d.ts.map +1 -1
  35. package/resources/customer-flow-edge-case.d.mts +99 -27
  36. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  37. package/resources/customer-flow-edge-case.d.ts +99 -27
  38. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  39. package/resources/customer-flow.d.mts +2110 -138
  40. package/resources/customer-flow.d.mts.map +1 -1
  41. package/resources/customer-flow.d.ts +2110 -138
  42. package/resources/customer-flow.d.ts.map +1 -1
  43. package/resources/customer-flow.js +18 -0
  44. package/resources/customer-flow.js.map +1 -1
  45. package/resources/customer-flow.mjs +18 -0
  46. package/resources/customer-flow.mjs.map +1 -1
  47. package/resources/index.d.mts +5 -3
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +5 -3
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js +5 -1
  52. package/resources/index.js.map +1 -1
  53. package/resources/index.mjs +2 -0
  54. package/resources/index.mjs.map +1 -1
  55. package/resources/simulation-environment.d.mts +163 -1
  56. package/resources/simulation-environment.d.mts.map +1 -1
  57. package/resources/simulation-environment.d.ts +163 -1
  58. package/resources/simulation-environment.d.ts.map +1 -1
  59. package/resources/simulation-environment.js +51 -0
  60. package/resources/simulation-environment.js.map +1 -1
  61. package/resources/simulation-environment.mjs +51 -0
  62. package/resources/simulation-environment.mjs.map +1 -1
  63. package/resources/simulation-job.d.mts +68 -6
  64. package/resources/simulation-job.d.mts.map +1 -1
  65. package/resources/simulation-job.d.ts +68 -6
  66. package/resources/simulation-job.d.ts.map +1 -1
  67. package/resources/simulation-persona.d.mts +60 -18
  68. package/resources/simulation-persona.d.mts.map +1 -1
  69. package/resources/simulation-persona.d.ts +60 -18
  70. package/resources/simulation-persona.d.ts.map +1 -1
  71. package/resources/simulation-run-plan-job.d.mts +172 -4
  72. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  73. package/resources/simulation-run-plan-job.d.ts +172 -4
  74. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  75. package/resources/simulation-run-plan-job.js +16 -0
  76. package/resources/simulation-run-plan-job.js.map +1 -1
  77. package/resources/simulation-run-plan-job.mjs +16 -0
  78. package/resources/simulation-run-plan-job.mjs.map +1 -1
  79. package/resources/simulation-run-plan.d.mts +102 -0
  80. package/resources/simulation-run-plan.d.mts.map +1 -1
  81. package/resources/simulation-run-plan.d.ts +102 -0
  82. package/resources/simulation-run-plan.d.ts.map +1 -1
  83. package/resources/simulation-template.d.mts +10 -0
  84. package/resources/simulation-template.d.mts.map +1 -1
  85. package/resources/simulation-template.d.ts +10 -0
  86. package/resources/simulation-template.d.ts.map +1 -1
  87. package/resources/simulation.d.mts +26 -1
  88. package/resources/simulation.d.mts.map +1 -1
  89. package/resources/simulation.d.ts +26 -1
  90. package/resources/simulation.d.ts.map +1 -1
  91. package/src/client.ts +66 -0
  92. package/src/resources/agent-prompt.ts +183 -0
  93. package/src/resources/benchmark.ts +740 -0
  94. package/src/resources/call.ts +1 -1
  95. package/src/resources/config.ts +313 -23
  96. package/src/resources/customer-flow-edge-case.ts +207 -27
  97. package/src/resources/customer-flow.ts +3198 -123
  98. package/src/resources/index.ts +30 -0
  99. package/src/resources/simulation-environment.ts +244 -0
  100. package/src/resources/simulation-job.ts +98 -6
  101. package/src/resources/simulation-persona.ts +126 -18
  102. package/src/resources/simulation-run-plan-job.ts +240 -3
  103. package/src/resources/simulation-run-plan.ts +118 -0
  104. package/src/resources/simulation-template.ts +11 -0
  105. package/src/resources/simulation.ts +28 -1
  106. package/src/version.ts +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -179,12 +179,25 @@ export namespace SimulationRunPlanCreateResponse {
179
179
  */
180
180
  flows: Array<RunPlan.Flow>;
181
181
 
182
+ /**
183
+ * Whether this plan lets a run add metrics by itself off the attached flows, on
184
+ * top of its own list. False means the `metrics` list is the whole answer.
185
+ */
186
+ includeAutomaticMetrics: boolean;
187
+
182
188
  /**
183
189
  * Whether this plan also collects each attached flow's own metrics, on top of its
184
190
  * own list.
185
191
  */
186
192
  includeFlowMetrics: boolean;
187
193
 
194
+ /**
195
+ * Whether this plan is managed by config as code. A managed plan is reconciled
196
+ * from your config: PUT and DELETE on it return 409, and changes belong in the
197
+ * config file.
198
+ */
199
+ isConfigManaged: boolean;
200
+
188
201
  /**
189
202
  * Number of iterations to run for each test case
190
203
  */
@@ -329,6 +342,12 @@ export namespace SimulationRunPlanCreateResponse {
329
342
  * default, SIMULATED.
330
343
  */
331
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;
332
351
  }
333
352
 
334
353
  export interface Persona {
@@ -448,12 +467,25 @@ export namespace SimulationRunPlanUpdateResponse {
448
467
  */
449
468
  flows: Array<Data.Flow>;
450
469
 
470
+ /**
471
+ * Whether this plan lets a run add metrics by itself off the attached flows, on
472
+ * top of its own list. False means the `metrics` list is the whole answer.
473
+ */
474
+ includeAutomaticMetrics: boolean;
475
+
451
476
  /**
452
477
  * Whether this plan also collects each attached flow's own metrics, on top of its
453
478
  * own list.
454
479
  */
455
480
  includeFlowMetrics: boolean;
456
481
 
482
+ /**
483
+ * Whether this plan is managed by config as code. A managed plan is reconciled
484
+ * from your config: PUT and DELETE on it return 409, and changes belong in the
485
+ * config file.
486
+ */
487
+ isConfigManaged: boolean;
488
+
457
489
  /**
458
490
  * Number of iterations to run for each test case
459
491
  */
@@ -598,6 +630,12 @@ export namespace SimulationRunPlanUpdateResponse {
598
630
  * default, SIMULATED.
599
631
  */
600
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;
601
639
  }
602
640
 
603
641
  export interface Persona {
@@ -681,12 +719,25 @@ export namespace SimulationRunPlanListResponse {
681
719
  */
682
720
  flows: Array<Data.Flow>;
683
721
 
722
+ /**
723
+ * Whether this plan lets a run add metrics by itself off the attached flows, on
724
+ * top of its own list. False means the `metrics` list is the whole answer.
725
+ */
726
+ includeAutomaticMetrics: boolean;
727
+
684
728
  /**
685
729
  * Whether this plan also collects each attached flow's own metrics, on top of its
686
730
  * own list.
687
731
  */
688
732
  includeFlowMetrics: boolean;
689
733
 
734
+ /**
735
+ * Whether this plan is managed by config as code. A managed plan is reconciled
736
+ * from your config: PUT and DELETE on it return 409, and changes belong in the
737
+ * config file.
738
+ */
739
+ isConfigManaged: boolean;
740
+
690
741
  /**
691
742
  * Number of iterations to run for each test case
692
743
  */
@@ -831,6 +882,12 @@ export namespace SimulationRunPlanListResponse {
831
882
  * default, SIMULATED.
832
883
  */
833
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;
834
891
  }
835
892
 
836
893
  export interface Persona {
@@ -942,12 +999,25 @@ export namespace SimulationRunPlanGetByIDResponse {
942
999
  */
943
1000
  flows: Array<Data.Flow>;
944
1001
 
1002
+ /**
1003
+ * Whether this plan lets a run add metrics by itself off the attached flows, on
1004
+ * top of its own list. False means the `metrics` list is the whole answer.
1005
+ */
1006
+ includeAutomaticMetrics: boolean;
1007
+
945
1008
  /**
946
1009
  * Whether this plan also collects each attached flow's own metrics, on top of its
947
1010
  * own list.
948
1011
  */
949
1012
  includeFlowMetrics: boolean;
950
1013
 
1014
+ /**
1015
+ * Whether this plan is managed by config as code. A managed plan is reconciled
1016
+ * from your config: PUT and DELETE on it return 409, and changes belong in the
1017
+ * config file.
1018
+ */
1019
+ isConfigManaged: boolean;
1020
+
951
1021
  /**
952
1022
  * Number of iterations to run for each test case
953
1023
  */
@@ -1092,6 +1162,12 @@ export namespace SimulationRunPlanGetByIDResponse {
1092
1162
  * default, SIMULATED.
1093
1163
  */
1094
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;
1095
1171
  }
1096
1172
 
1097
1173
  export interface Persona {
@@ -1187,6 +1263,22 @@ export interface SimulationRunPlanCreateParams {
1187
1263
  */
1188
1264
  flows?: Array<SimulationRunPlanCreateParams.Flow>;
1189
1265
 
1266
+ /**
1267
+ * Let the run add metrics by itself off the attached flows, on top of the
1268
+ * `metrics` named here.
1269
+ *
1270
+ * Two attach this way today: Agent Expectations wherever an attached flow has
1271
+ * agent expectations written on it, and Keypad Entry wherever one has steps where
1272
+ * the agent is expected to press keys. Both grade something authored on the flow
1273
+ * that nothing else measures, which is why it is on by default.
1274
+ *
1275
+ * Set false when the `metrics` list is meant to be exhaustive: a plan testing only
1276
+ * whether the caller can complete the flow may not want the agent graded on its
1277
+ * expectations as well. False also pins the plan against any automatic metric
1278
+ * Roark adds later.
1279
+ */
1280
+ includeAutomaticMetrics?: boolean;
1281
+
1190
1282
  /**
1191
1283
  * Also collect each attached flow's own metrics, on top of the `metrics` named
1192
1284
  * here.
@@ -1258,6 +1350,16 @@ export namespace SimulationRunPlanCreateParams {
1258
1350
  */
1259
1351
  metricId?: string;
1260
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
+
1261
1363
  /**
1262
1364
  * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
1263
1365
  * not both.
@@ -1397,6 +1499,12 @@ export interface SimulationRunPlanUpdateParams {
1397
1499
  */
1398
1500
  flows?: Array<SimulationRunPlanUpdateParams.Flow>;
1399
1501
 
1502
+ /**
1503
+ * Whether to let the run add metrics by itself off the attached flows. See
1504
+ * `POST /v1/simulation/plan`.
1505
+ */
1506
+ includeAutomaticMetrics?: boolean;
1507
+
1400
1508
  /**
1401
1509
  * Whether to also collect each attached flow's own metrics, on top of this plan's
1402
1510
  * list.
@@ -1555,6 +1663,16 @@ export namespace SimulationRunPlanUpdateParams {
1555
1663
  */
1556
1664
  metricId?: string;
1557
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
+
1558
1676
  /**
1559
1677
  * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
1560
1678
  * not both.
@@ -47,6 +47,17 @@ export namespace SimulationTemplateListResponse {
47
47
  */
48
48
  category: string;
49
49
 
50
+ /**
51
+ * The end-call conditions a run from this template uses unless the request sets
52
+ * its own.
53
+ *
54
+ * Empty for templates whose calls end when the agent says goodbye. Non-empty where
55
+ * the template runs scripted flows that finish on a verdict: the simulated caller
56
+ * hangs up on an end-call phrase or one of these, so a run that discards them
57
+ * would stay on the line until the duration cap.
58
+ */
59
+ defaultEndCallReasons: Array<string>;
60
+
50
61
  /**
51
62
  * The per-simulation cap a run from this template uses unless the request sets its
52
63
  * own.
@@ -219,6 +219,22 @@ export declare namespace SimulationRunParams {
219
219
  */
220
220
  flows?: Array<Plan.Flow>;
221
221
 
222
+ /**
223
+ * Let the run add metrics by itself off the attached flows, on top of the
224
+ * `metrics` named here.
225
+ *
226
+ * Two attach this way today: Agent Expectations wherever an attached flow has
227
+ * agent expectations written on it, and Keypad Entry wherever one has steps where
228
+ * the agent is expected to press keys. Both grade something authored on the flow
229
+ * that nothing else measures, which is why it is on by default.
230
+ *
231
+ * Set false when the `metrics` list is meant to be exhaustive: a plan testing only
232
+ * whether the caller can complete the flow may not want the agent graded on its
233
+ * expectations as well. False also pins the plan against any automatic metric
234
+ * Roark adds later.
235
+ */
236
+ includeAutomaticMetrics?: boolean;
237
+
222
238
  /**
223
239
  * Also collect each attached flow's own metrics, on top of the `metrics` named
224
240
  * here.
@@ -296,6 +312,16 @@ export declare namespace SimulationRunParams {
296
312
  */
297
313
  metricId?: string;
298
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
+
299
325
  /**
300
326
  * Stable metric slug (e.g. `customer_satisfaction`). Provide either this or `id`,
301
327
  * not both.
@@ -523,7 +549,8 @@ export declare namespace SimulationRunParams {
523
549
 
524
550
  /**
525
551
  * Semantic conditions that trigger end of call. The LLM evaluates the conversation
526
- * against these conditions. Empty array disables the feature.
552
+ * against these conditions. Defaults to the template's `defaultEndCallReasons`, as
553
+ * returned by GET /v1/simulation/template. Pass an empty array to run with none.
527
554
  */
528
555
  endCallReasons?: Array<string>;
529
556
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.11.0'; // x-release-please-version
1
+ export const VERSION = '3.13.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.11.0";
1
+ export declare const VERSION = "3.13.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "3.11.0";
1
+ export declare const VERSION = "3.13.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '3.11.0'; // x-release-please-version
4
+ exports.VERSION = '3.13.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '3.11.0'; // x-release-please-version
1
+ export const VERSION = '3.13.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map