@roarkanalytics/sdk 3.11.0 → 3.12.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 (97) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  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/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/call.d.mts +1 -1
  20. package/resources/call.d.mts.map +1 -1
  21. package/resources/call.d.ts +1 -1
  22. package/resources/call.d.ts.map +1 -1
  23. package/resources/config.d.mts +166 -18
  24. package/resources/config.d.mts.map +1 -1
  25. package/resources/config.d.ts +166 -18
  26. package/resources/config.d.ts.map +1 -1
  27. package/resources/customer-flow-edge-case.d.mts +72 -9
  28. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  29. package/resources/customer-flow-edge-case.d.ts +72 -9
  30. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  31. package/resources/customer-flow.d.mts +2005 -78
  32. package/resources/customer-flow.d.mts.map +1 -1
  33. package/resources/customer-flow.d.ts +2005 -78
  34. package/resources/customer-flow.d.ts.map +1 -1
  35. package/resources/customer-flow.js +18 -0
  36. package/resources/customer-flow.js.map +1 -1
  37. package/resources/customer-flow.mjs +18 -0
  38. package/resources/customer-flow.mjs.map +1 -1
  39. package/resources/index.d.mts +3 -2
  40. package/resources/index.d.mts.map +1 -1
  41. package/resources/index.d.ts +3 -2
  42. package/resources/index.d.ts.map +1 -1
  43. package/resources/index.js +3 -1
  44. package/resources/index.js.map +1 -1
  45. package/resources/index.mjs +1 -0
  46. package/resources/index.mjs.map +1 -1
  47. package/resources/simulation-environment.d.mts +163 -1
  48. package/resources/simulation-environment.d.mts.map +1 -1
  49. package/resources/simulation-environment.d.ts +163 -1
  50. package/resources/simulation-environment.d.ts.map +1 -1
  51. package/resources/simulation-environment.js +51 -0
  52. package/resources/simulation-environment.js.map +1 -1
  53. package/resources/simulation-environment.mjs +51 -0
  54. package/resources/simulation-environment.mjs.map +1 -1
  55. package/resources/simulation-job.d.mts +62 -2
  56. package/resources/simulation-job.d.mts.map +1 -1
  57. package/resources/simulation-job.d.ts +62 -2
  58. package/resources/simulation-job.d.ts.map +1 -1
  59. package/resources/simulation-persona.d.mts +42 -6
  60. package/resources/simulation-persona.d.mts.map +1 -1
  61. package/resources/simulation-persona.d.ts +42 -6
  62. package/resources/simulation-persona.d.ts.map +1 -1
  63. package/resources/simulation-run-plan-job.d.mts +31 -1
  64. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  65. package/resources/simulation-run-plan-job.d.ts +31 -1
  66. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  67. package/resources/simulation-run-plan.d.mts +64 -0
  68. package/resources/simulation-run-plan.d.mts.map +1 -1
  69. package/resources/simulation-run-plan.d.ts +64 -0
  70. package/resources/simulation-run-plan.d.ts.map +1 -1
  71. package/resources/simulation-template.d.mts +10 -0
  72. package/resources/simulation-template.d.mts.map +1 -1
  73. package/resources/simulation-template.d.ts +10 -0
  74. package/resources/simulation-template.d.ts.map +1 -1
  75. package/resources/simulation.d.mts +17 -1
  76. package/resources/simulation.d.mts.map +1 -1
  77. package/resources/simulation.d.ts +17 -1
  78. package/resources/simulation.d.ts.map +1 -1
  79. package/src/client.ts +33 -0
  80. package/src/resources/agent-prompt.ts +183 -0
  81. package/src/resources/call.ts +1 -1
  82. package/src/resources/config.ts +310 -20
  83. package/src/resources/customer-flow-edge-case.ts +180 -9
  84. package/src/resources/customer-flow.ts +3091 -63
  85. package/src/resources/index.ts +15 -0
  86. package/src/resources/simulation-environment.ts +244 -0
  87. package/src/resources/simulation-job.ts +92 -2
  88. package/src/resources/simulation-persona.ts +108 -6
  89. package/src/resources/simulation-run-plan-job.ts +39 -1
  90. package/src/resources/simulation-run-plan.ts +74 -0
  91. package/src/resources/simulation-template.ts +11 -0
  92. package/src/resources/simulation.ts +18 -1
  93. package/src/version.ts +1 -1
  94. package/version.d.mts +1 -1
  95. package/version.d.ts +1 -1
  96. package/version.js +1 -1
  97. package/version.mjs +1 -1
@@ -216,6 +216,12 @@ export namespace SimulationRunPlanJobGetByIDResponse {
216
216
  */
217
217
  createdAt: string;
218
218
 
219
+ /**
220
+ * Present when the run was invalidated: it keeps its transcript and recording, but
221
+ * nothing scored it and it is excluded from every run total.
222
+ */
223
+ invalidation: SimulationJob.Invalidation | null;
224
+
219
225
  persona: SimulationJob.Persona;
220
226
 
221
227
  /**
@@ -313,6 +319,28 @@ export namespace SimulationRunPlanJobGetByIDResponse {
313
319
  | 'DAILY';
314
320
  }
315
321
 
322
+ /**
323
+ * Present when the run was invalidated: it keeps its transcript and recording, but
324
+ * nothing scored it and it is excluded from every run total.
325
+ */
326
+ export interface Invalidation {
327
+ /**
328
+ * When the run was invalidated.
329
+ */
330
+ invalidatedAt: string;
331
+
332
+ /**
333
+ * Why the result does not count. `SCRIPT_DIVERGED`: a strict flow went off script
334
+ * at a step whose off-script policy is HANG_UP_INVALIDATE.
335
+ */
336
+ reason: 'SCRIPT_DIVERGED';
337
+
338
+ /**
339
+ * One sentence: where the script was left and what your agent did instead.
340
+ */
341
+ detail?: string | null;
342
+ }
343
+
316
344
  export interface Persona {
317
345
  /**
318
346
  * Unique identifier of the persona
@@ -377,7 +405,10 @@ export namespace SimulationRunPlanJobGetByIDResponse {
377
405
  | 'FRUSTRATED'
378
406
  | 'SKEPTICAL'
379
407
  | 'RUSHED'
380
- | 'DISTRACTED';
408
+ | 'DISTRACTED'
409
+ | 'ANGRY'
410
+ | 'ANXIOUS'
411
+ | 'SAD';
381
412
 
382
413
  /**
383
414
  * How the persona confirms information
@@ -519,6 +550,13 @@ export namespace SimulationRunPlanJobGetByIDResponse {
519
550
  */
520
551
  description?: string | null;
521
552
 
553
+ /**
554
+ * Label shown in place of the name across the dashboard (e.g. a short descriptor
555
+ * like "Irate Escalator"). The persona still identifies as `name` on calls. Omit
556
+ * or set null to display the name itself.
557
+ */
558
+ displayName?: string | null;
559
+
522
560
  /**
523
561
  * Secondary language ISO 639-1 code for code-switching (e.g., Hinglish, Spanglish)
524
562
  */
@@ -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
  */
@@ -448,12 +461,25 @@ export namespace SimulationRunPlanUpdateResponse {
448
461
  */
449
462
  flows: Array<Data.Flow>;
450
463
 
464
+ /**
465
+ * Whether this plan lets a run add metrics by itself off the attached flows, on
466
+ * top of its own list. False means the `metrics` list is the whole answer.
467
+ */
468
+ includeAutomaticMetrics: boolean;
469
+
451
470
  /**
452
471
  * Whether this plan also collects each attached flow's own metrics, on top of its
453
472
  * own list.
454
473
  */
455
474
  includeFlowMetrics: boolean;
456
475
 
476
+ /**
477
+ * Whether this plan is managed by config as code. A managed plan is reconciled
478
+ * from your config: PUT and DELETE on it return 409, and changes belong in the
479
+ * config file.
480
+ */
481
+ isConfigManaged: boolean;
482
+
457
483
  /**
458
484
  * Number of iterations to run for each test case
459
485
  */
@@ -681,12 +707,25 @@ export namespace SimulationRunPlanListResponse {
681
707
  */
682
708
  flows: Array<Data.Flow>;
683
709
 
710
+ /**
711
+ * Whether this plan lets a run add metrics by itself off the attached flows, on
712
+ * top of its own list. False means the `metrics` list is the whole answer.
713
+ */
714
+ includeAutomaticMetrics: boolean;
715
+
684
716
  /**
685
717
  * Whether this plan also collects each attached flow's own metrics, on top of its
686
718
  * own list.
687
719
  */
688
720
  includeFlowMetrics: boolean;
689
721
 
722
+ /**
723
+ * Whether this plan is managed by config as code. A managed plan is reconciled
724
+ * from your config: PUT and DELETE on it return 409, and changes belong in the
725
+ * config file.
726
+ */
727
+ isConfigManaged: boolean;
728
+
690
729
  /**
691
730
  * Number of iterations to run for each test case
692
731
  */
@@ -942,12 +981,25 @@ export namespace SimulationRunPlanGetByIDResponse {
942
981
  */
943
982
  flows: Array<Data.Flow>;
944
983
 
984
+ /**
985
+ * Whether this plan lets a run add metrics by itself off the attached flows, on
986
+ * top of its own list. False means the `metrics` list is the whole answer.
987
+ */
988
+ includeAutomaticMetrics: boolean;
989
+
945
990
  /**
946
991
  * Whether this plan also collects each attached flow's own metrics, on top of its
947
992
  * own list.
948
993
  */
949
994
  includeFlowMetrics: boolean;
950
995
 
996
+ /**
997
+ * Whether this plan is managed by config as code. A managed plan is reconciled
998
+ * from your config: PUT and DELETE on it return 409, and changes belong in the
999
+ * config file.
1000
+ */
1001
+ isConfigManaged: boolean;
1002
+
951
1003
  /**
952
1004
  * Number of iterations to run for each test case
953
1005
  */
@@ -1187,6 +1239,22 @@ export interface SimulationRunPlanCreateParams {
1187
1239
  */
1188
1240
  flows?: Array<SimulationRunPlanCreateParams.Flow>;
1189
1241
 
1242
+ /**
1243
+ * Let the run add metrics by itself off the attached flows, on top of the
1244
+ * `metrics` named here.
1245
+ *
1246
+ * Two attach this way today: Agent Expectations wherever an attached flow has
1247
+ * agent expectations written on it, and Keypad Entry wherever one has steps where
1248
+ * the agent is expected to press keys. Both grade something authored on the flow
1249
+ * that nothing else measures, which is why it is on by default.
1250
+ *
1251
+ * Set false when the `metrics` list is meant to be exhaustive: a plan testing only
1252
+ * whether the caller can complete the flow may not want the agent graded on its
1253
+ * expectations as well. False also pins the plan against any automatic metric
1254
+ * Roark adds later.
1255
+ */
1256
+ includeAutomaticMetrics?: boolean;
1257
+
1190
1258
  /**
1191
1259
  * Also collect each attached flow's own metrics, on top of the `metrics` named
1192
1260
  * here.
@@ -1397,6 +1465,12 @@ export interface SimulationRunPlanUpdateParams {
1397
1465
  */
1398
1466
  flows?: Array<SimulationRunPlanUpdateParams.Flow>;
1399
1467
 
1468
+ /**
1469
+ * Whether to let the run add metrics by itself off the attached flows. See
1470
+ * `POST /v1/simulation/plan`.
1471
+ */
1472
+ includeAutomaticMetrics?: boolean;
1473
+
1400
1474
  /**
1401
1475
  * Whether to also collect each attached flow's own metrics, on top of this plan's
1402
1476
  * list.
@@ -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.
@@ -523,7 +539,8 @@ export declare namespace SimulationRunParams {
523
539
 
524
540
  /**
525
541
  * Semantic conditions that trigger end of call. The LLM evaluates the conversation
526
- * against these conditions. Empty array disables the feature.
542
+ * against these conditions. Defaults to the template's `defaultEndCallReasons`, as
543
+ * returned by GET /v1/simulation/template. Pass an empty array to run with none.
527
544
  */
528
545
  endCallReasons?: Array<string>;
529
546
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '3.11.0'; // x-release-please-version
1
+ export const VERSION = '3.12.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.12.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.12.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.12.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.12.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map