@roarkanalytics/sdk 5.1.0 → 5.3.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 (43) 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/index.d.mts +2 -1
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +2 -1
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/simulation-run-group.d.mts +890 -0
  20. package/resources/simulation-run-group.d.mts.map +1 -0
  21. package/resources/simulation-run-group.d.ts +890 -0
  22. package/resources/simulation-run-group.d.ts.map +1 -0
  23. package/resources/simulation-run-group.js +91 -0
  24. package/resources/simulation-run-group.js.map +1 -0
  25. package/resources/simulation-run-group.mjs +87 -0
  26. package/resources/simulation-run-group.mjs.map +1 -0
  27. package/resources/simulation-run-plan-job.d.mts +1062 -43
  28. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  29. package/resources/simulation-run-plan-job.d.ts +1062 -43
  30. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  31. package/resources/simulation-run-plan-job.js +43 -0
  32. package/resources/simulation-run-plan-job.js.map +1 -1
  33. package/resources/simulation-run-plan-job.mjs +43 -0
  34. package/resources/simulation-run-plan-job.mjs.map +1 -1
  35. package/src/client.ts +31 -0
  36. package/src/resources/index.ts +14 -0
  37. package/src/resources/simulation-run-group.ts +1489 -0
  38. package/src/resources/simulation-run-plan-job.ts +1482 -66
  39. package/src/version.ts +1 -1
  40. package/version.d.mts +1 -1
  41. package/version.d.ts +1 -1
  42. package/version.js +1 -1
  43. package/version.mjs +1 -1
@@ -27,6 +27,25 @@ export declare class SimulationRunPlanJob extends APIResource {
27
27
  * ```
28
28
  */
29
29
  cancel(jobID: string, options?: RequestOptions): APIPromise<SimulationRunPlanJobCancelResponse>;
30
+ /**
31
+ * Request the written debrief for a settled run: executive summary, failure themes
32
+ * and recommendations. Runs with graded calls get one automatically, so this is
33
+ * for regenerating one (`regenerate: true`) or retrying one that failed.
34
+ *
35
+ * Returns immediately. Generation takes a few minutes: poll GET
36
+ * /v1/simulation/plan/job/{jobId}/results until `debrief.status` is READY or
37
+ * FAILED. Without `regenerate`, a debrief that is ready or already being written
38
+ * is returned as-is.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const response =
43
+ * await client.simulationRunPlanJob.createDebrief(
44
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
45
+ * );
46
+ * ```
47
+ */
48
+ createDebrief(jobID: string, body?: SimulationRunPlanJobCreateDebriefParams | null | undefined, options?: RequestOptions): APIPromise<SimulationRunPlanJobCreateDebriefResponse>;
30
49
  /**
31
50
  * Retrieve details of a simulation plan job including all associated simulation
32
51
  * jobs (calls)
@@ -39,6 +58,26 @@ export declare class SimulationRunPlanJob extends APIResource {
39
58
  * ```
40
59
  */
41
60
  getByID(jobID: string, options?: RequestOptions): APIPromise<SimulationRunPlanJobGetByIDResponse>;
61
+ /**
62
+ * Everything the run report shows, in one request: the summary and score, the
63
+ * pass/fail verdict, per-metric aggregates, every simulation with its check
64
+ * results, breakdowns by agent and persona, the comparison against the previous
65
+ * run (or `compareToJobId`), the sweep attribution, and the written debrief with
66
+ * its executive summary, failure themes and recommendations.
67
+ *
68
+ * Safe to call while the run is in progress: counts reflect what has landed so
69
+ * far. `verdict` and `sweepAttribution` stay null until the run ends. The debrief
70
+ * is generated automatically a few minutes after a run with graded calls settles;
71
+ * poll until `debrief.status` is READY, or request one with POST
72
+ * /v1/simulation/plan/job/{jobId}/debrief.
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const response =
77
+ * await client.simulationRunPlanJob.getResults('jobId');
78
+ * ```
79
+ */
80
+ getResults(jobID: string, query?: SimulationRunPlanJobGetResultsParams | null | undefined, options?: RequestOptions): APIPromise<SimulationRunPlanJobGetResultsResponse>;
42
81
  /**
43
82
  * Deprecated: use POST /v1/simulation/run, which does the same thing and can also
44
83
  * take the plan configuration inline, so a one-off run does not have to create a
@@ -137,6 +176,133 @@ export declare namespace SimulationRunPlanJobCancelResponse {
137
176
  status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
138
177
  }
139
178
  }
179
+ export interface SimulationRunPlanJobCreateDebriefResponse {
180
+ /**
181
+ * The run’s written debrief: executive summary, failure themes and
182
+ * recommendations. Generated automatically when a run with graded calls settles.
183
+ */
184
+ data: SimulationRunPlanJobCreateDebriefResponse.Data;
185
+ }
186
+ export declare namespace SimulationRunPlanJobCreateDebriefResponse {
187
+ /**
188
+ * The run’s written debrief: executive summary, failure themes and
189
+ * recommendations. Generated automatically when a run with graded calls settles.
190
+ */
191
+ interface Data {
192
+ completedAt: string | null;
193
+ createdAt: string;
194
+ debriefId: string;
195
+ errorMessage: string | null;
196
+ /**
197
+ * Present once READY.
198
+ */
199
+ report: Data.Report | null;
200
+ /**
201
+ * PENDING and GENERATING while it is written (usually a few minutes), then READY
202
+ * or FAILED.
203
+ */
204
+ status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
205
+ }
206
+ namespace Data {
207
+ /**
208
+ * Present once READY.
209
+ */
210
+ interface Report {
211
+ executiveSummary: Report.ExecutiveSummary;
212
+ generatedAt: string;
213
+ keyFindings: Array<Report.KeyFinding>;
214
+ recommendations: Array<Report.Recommendation>;
215
+ /**
216
+ * Failure themes, clustered across the run’s failing calls.
217
+ */
218
+ themes: Array<Report.Theme>;
219
+ /**
220
+ * The checks against the previous run, as of generation.
221
+ */
222
+ trend: Report.Trend | null;
223
+ verdict: 'PASSED' | 'THRESHOLD_FAILED';
224
+ /**
225
+ * One-paragraph verdict, e.g. "Not ready to promote. ..."
226
+ */
227
+ verdictSummary: string;
228
+ wentWell: Array<Report.WentWell>;
229
+ }
230
+ namespace Report {
231
+ interface ExecutiveSummary {
232
+ paragraphs: Array<string>;
233
+ sections: Array<ExecutiveSummary.Section>;
234
+ }
235
+ namespace ExecutiveSummary {
236
+ interface Section {
237
+ body: string;
238
+ heading: string | null;
239
+ }
240
+ }
241
+ interface KeyFinding {
242
+ body: string;
243
+ /**
244
+ * The calls the finding is about.
245
+ */
246
+ callIds: Array<string>;
247
+ title: string;
248
+ }
249
+ interface Recommendation {
250
+ body: string;
251
+ channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
252
+ /**
253
+ * For a prompt fix: the text to replace.
254
+ */
255
+ currentText: string | null;
256
+ order: number;
257
+ severity: 'HIGH' | 'MEDIUM' | 'LOW' | null;
258
+ /**
259
+ * For a prompt fix: the replacement.
260
+ */
261
+ suggestedText: string | null;
262
+ themeSlugs: Array<string>;
263
+ title: string;
264
+ }
265
+ interface Theme {
266
+ affectedCallCount: number;
267
+ analysis: string;
268
+ callIds: Array<string>;
269
+ checkNames: Array<string>;
270
+ impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | null;
271
+ lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED' | null;
272
+ prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED' | null;
273
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
274
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
275
+ slug: string;
276
+ title: string;
277
+ totalCallCount: number;
278
+ }
279
+ /**
280
+ * The checks against the previous run, as of generation.
281
+ */
282
+ interface Trend {
283
+ baselineRunNumber: number | null;
284
+ baselineRunPlanJobId: string;
285
+ rows: Array<Trend.Row>;
286
+ }
287
+ namespace Trend {
288
+ interface Row {
289
+ checkName: string;
290
+ currentPassRate: number | null;
291
+ lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED' | null;
292
+ previousPassRate: number | null;
293
+ }
294
+ }
295
+ interface WentWell {
296
+ body: string;
297
+ /**
298
+ * The calls the finding is about.
299
+ */
300
+ callIds: Array<string>;
301
+ title: string;
302
+ }
303
+ }
304
+ }
305
+ }
140
306
  export interface SimulationRunPlanJobGetByIDResponse {
141
307
  /**
142
308
  * Simulation run plan job with all associated simulation jobs
@@ -931,63 +1097,916 @@ export declare namespace SimulationRunPlanJobGetByIDResponse {
931
1097
  }
932
1098
  }
933
1099
  }
934
- export interface SimulationRunPlanJobStartResponse {
1100
+ export interface SimulationRunPlanJobGetResultsResponse {
935
1101
  /**
936
- * Response when triggering a simulation run plan
1102
+ * Everything the run report shows, in one response.
937
1103
  */
938
- data: SimulationRunPlanJobStartResponse.Data;
1104
+ data: SimulationRunPlanJobGetResultsResponse.Data;
939
1105
  }
940
- export declare namespace SimulationRunPlanJobStartResponse {
1106
+ export declare namespace SimulationRunPlanJobGetResultsResponse {
941
1107
  /**
942
- * Response when triggering a simulation run plan
1108
+ * Everything the run report shows, in one response.
943
1109
  */
944
1110
  interface Data {
945
1111
  /**
946
- * When the job was created
1112
+ * The run’s simulations against its test cases. Differs from a plain job count
1113
+ * only when the plan retries simulations your agent never spoke on.
947
1114
  */
948
- createdAt: string;
1115
+ attemptSummary: Data.AttemptSummary;
1116
+ breakdowns: Data.Breakdowns;
1117
+ calls: Array<Data.Call>;
949
1118
  /**
950
- * ID of the simulation run plan that was executed
1119
+ * Null when there is no earlier run of the plan to compare against.
951
1120
  */
952
- simulationRunPlanId: string;
1121
+ comparison: Data.Comparison | null;
953
1122
  /**
954
- * ID of the simulation run plan job that was created
1123
+ * The run’s written debrief: executive summary, failure themes and
1124
+ * recommendations. Generated automatically when a run with graded calls settles.
955
1125
  */
956
- simulationRunPlanJobId: string;
1126
+ debrief: Data.Debrief | null;
957
1127
  /**
958
- * Initial status of the job
1128
+ * Checks first, then other metrics.
959
1129
  */
960
- status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
1130
+ metrics: Array<Data.Metric>;
1131
+ run: Data.Run;
1132
+ summary: Data.Summary;
1133
+ /**
1134
+ * For a run that swept a property (accent, background noise, speech pace and so
1135
+ * on): which check failures the property caused.
1136
+ *
1137
+ * Each value is compared with every other value combined using a one-sided Fisher
1138
+ * exact test, and every comparison in the run is corrected together with
1139
+ * Benjamini-Hochberg. A value is only called worse when the difference is
1140
+ * statistically significant, so a value that happened to fail a few more
1141
+ * simulations by chance is not reported as a problem. Invalidated simulations and
1142
+ * simulations that failed on the Roark platform are left out.
1143
+ */
1144
+ sweepAttribution: Data.SweepAttribution | null;
1145
+ /**
1146
+ * Pass/fail verdict for the run, judged against the success criteria pinned on the
1147
+ * run plan when the run started.
1148
+ */
1149
+ verdict: Data.Verdict | null;
961
1150
  }
962
- }
963
- export interface SimulationRunPlanJobListParams {
964
- /**
965
- * Cursor for pagination - use the nextCursor value from a previous response
966
- */
967
- after?: string;
968
- /**
969
- * Filter by label ID attached to the plan job. Use this if you know the label ID.
970
- */
971
- labelId?: string;
972
- /**
973
- * Filter by label name attached to the plan job. More user-friendly alternative to
974
- * labelId. Case-insensitive.
975
- */
976
- labelName?: string;
977
- /**
978
- * Maximum number of plan jobs to return (default: 20, max: 50)
979
- */
980
- limit?: number;
981
- /**
982
- * Filter by simulation run plan ID
983
- */
984
- simulationRunPlanId?: string;
985
- /**
986
- * Filter by plan job status (PENDING, QUEUED, CREATING_SNAPSHOTS,
987
- * CREATING_SIMULATIONS, PREPARING_CAPACITY, RUNNING_SIMULATIONS, COMPLETED,
988
- * FAILED, TIMED_OUT, CANCELLED, CANCELLING, ENDING_SIMULATIONS)
989
- */
990
- status?: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
1151
+ namespace Data {
1152
+ /**
1153
+ * The run’s simulations against its test cases. Differs from a plain job count
1154
+ * only when the plan retries simulations your agent never spoke on.
1155
+ */
1156
+ interface AttemptSummary {
1157
+ /**
1158
+ * Every simulation placed, retries included. Each is a separate, billed call.
1159
+ */
1160
+ attemptCount: number;
1161
+ /**
1162
+ * Simulations placed as a retry of one your agent never spoke on.
1163
+ */
1164
+ retryCount: number;
1165
+ /**
1166
+ * Simulations your agent never spoke on, including the ones a retry replaced.
1167
+ */
1168
+ silentAttemptCount: number;
1169
+ /**
1170
+ * Test cases whose final attempt your agent still never spoke on. This is what the
1171
+ * `AGENT_NEVER_SPOKE` verdict failure counts.
1172
+ */
1173
+ stillSilentTestCaseCount: number;
1174
+ /**
1175
+ * Test cases in the run. Each one has a single final attempt that its result is
1176
+ * read from.
1177
+ */
1178
+ testCaseCount: number;
1179
+ }
1180
+ interface Breakdowns {
1181
+ byAgent: Array<Breakdowns.ByAgent>;
1182
+ byPersona: Array<Breakdowns.ByPersona>;
1183
+ }
1184
+ namespace Breakdowns {
1185
+ interface ByAgent {
1186
+ /**
1187
+ * 0-100. Null when nothing was evaluated.
1188
+ */
1189
+ callPassRate: number | null;
1190
+ /**
1191
+ * Counted simulations in the group.
1192
+ */
1193
+ calls: number;
1194
+ evaluatedCalls: number;
1195
+ /**
1196
+ * The agent or persona ID.
1197
+ */
1198
+ key: string;
1199
+ label: string;
1200
+ passedCalls: number;
1201
+ /**
1202
+ * The group’s own score. 0-100. Null when nothing was evaluated.
1203
+ */
1204
+ score: number | null;
1205
+ }
1206
+ interface ByPersona {
1207
+ /**
1208
+ * 0-100. Null when nothing was evaluated.
1209
+ */
1210
+ callPassRate: number | null;
1211
+ /**
1212
+ * Counted simulations in the group.
1213
+ */
1214
+ calls: number;
1215
+ evaluatedCalls: number;
1216
+ /**
1217
+ * The agent or persona ID.
1218
+ */
1219
+ key: string;
1220
+ label: string;
1221
+ passedCalls: number;
1222
+ /**
1223
+ * The group’s own score. 0-100. Null when nothing was evaluated.
1224
+ */
1225
+ score: number | null;
1226
+ }
1227
+ }
1228
+ interface Call {
1229
+ agentName: string | null;
1230
+ attemptNumber: number;
1231
+ /**
1232
+ * Use with GET /v1/call/{callId} for the transcript, recording and every metric
1233
+ * value.
1234
+ */
1235
+ callId: string | null;
1236
+ checks: Array<Call.Check>;
1237
+ /**
1238
+ * False for an invalidated simulation: listed, never scored.
1239
+ */
1240
+ counted: boolean;
1241
+ durationMs: number | null;
1242
+ /**
1243
+ * Passed every check that graded it. Null when no check graded it, or it does not
1244
+ * count.
1245
+ */
1246
+ passed: boolean | null;
1247
+ personaName: string | null;
1248
+ retryOfSimulationJobId: string | null;
1249
+ simulationJobId: string;
1250
+ /**
1251
+ * QUEUED, CONNECTING, IN_CALL and PROCESSING while the simulation runs. Once
1252
+ * settled: COMPLETED, TIMED_OUT (ran to the maximum duration, still graded), ERROR
1253
+ * (failed on the agent’s side), NOT_RUN (failed on Roark’s side), CANCELLED, or
1254
+ * INVALIDATED (ran, but does not count).
1255
+ */
1256
+ status: 'QUEUED' | 'CONNECTING' | 'IN_CALL' | 'PROCESSING' | 'COMPLETED' | 'ERROR' | 'TIMED_OUT' | 'CANCELLED' | 'INVALIDATED' | 'NOT_RUN';
1257
+ /**
1258
+ * Call-level values of the run’s other metrics. Empty without the `metric:read`
1259
+ * permission. Per-turn values are on GET /v1/call/{callId}/metrics.
1260
+ */
1261
+ values: Array<Call.Value>;
1262
+ }
1263
+ namespace Call {
1264
+ interface Check {
1265
+ metricDefinitionId: string;
1266
+ metricName: string;
1267
+ passed: boolean;
1268
+ }
1269
+ interface Value {
1270
+ metricDefinitionId: string;
1271
+ metricName: string;
1272
+ outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
1273
+ participantRole: 'AGENT' | 'CUSTOMER' | 'SIMULATED_CUSTOMER' | 'BACKGROUND_SPEAKER' | null;
1274
+ reasoning: string | null;
1275
+ value: number | boolean | string | null;
1276
+ }
1277
+ }
1278
+ /**
1279
+ * Null when there is no earlier run of the plan to compare against.
1280
+ */
1281
+ interface Comparison {
1282
+ baselineCallPassRate: number | null;
1283
+ baselineRun: Comparison.BaselineRun;
1284
+ baselineScore: number | null;
1285
+ /**
1286
+ * REQUESTED when `compareToJobId` picked the baseline, PREVIOUS_RUN otherwise.
1287
+ */
1288
+ baselineSource: 'PREVIOUS_RUN' | 'REQUESTED';
1289
+ callPassRateDelta: number | null;
1290
+ /**
1291
+ * Every check either run was graded on. A side that did not grade it reads null.
1292
+ */
1293
+ checks: Array<Comparison.Check>;
1294
+ currentCallPassRate: number | null;
1295
+ currentScore: number | null;
1296
+ /**
1297
+ * Current minus baseline, in points.
1298
+ */
1299
+ scoreDelta: number | null;
1300
+ }
1301
+ namespace Comparison {
1302
+ interface BaselineRun {
1303
+ endedAt: string | null;
1304
+ runNumber: number | null;
1305
+ simulationRunPlanJobId: string;
1306
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
1307
+ }
1308
+ interface Check {
1309
+ baselinePassRate: number | null;
1310
+ currentPassRate: number | null;
1311
+ delta: number | null;
1312
+ metricDefinitionId: string;
1313
+ metricName: string;
1314
+ }
1315
+ }
1316
+ /**
1317
+ * The run’s written debrief: executive summary, failure themes and
1318
+ * recommendations. Generated automatically when a run with graded calls settles.
1319
+ */
1320
+ interface Debrief {
1321
+ completedAt: string | null;
1322
+ createdAt: string;
1323
+ debriefId: string;
1324
+ errorMessage: string | null;
1325
+ /**
1326
+ * Present once READY.
1327
+ */
1328
+ report: Debrief.Report | null;
1329
+ /**
1330
+ * PENDING and GENERATING while it is written (usually a few minutes), then READY
1331
+ * or FAILED.
1332
+ */
1333
+ status: 'PENDING' | 'GENERATING' | 'READY' | 'FAILED';
1334
+ }
1335
+ namespace Debrief {
1336
+ /**
1337
+ * Present once READY.
1338
+ */
1339
+ interface Report {
1340
+ executiveSummary: Report.ExecutiveSummary;
1341
+ generatedAt: string;
1342
+ keyFindings: Array<Report.KeyFinding>;
1343
+ recommendations: Array<Report.Recommendation>;
1344
+ /**
1345
+ * Failure themes, clustered across the run’s failing calls.
1346
+ */
1347
+ themes: Array<Report.Theme>;
1348
+ /**
1349
+ * The checks against the previous run, as of generation.
1350
+ */
1351
+ trend: Report.Trend | null;
1352
+ verdict: 'PASSED' | 'THRESHOLD_FAILED';
1353
+ /**
1354
+ * One-paragraph verdict, e.g. "Not ready to promote. ..."
1355
+ */
1356
+ verdictSummary: string;
1357
+ wentWell: Array<Report.WentWell>;
1358
+ }
1359
+ namespace Report {
1360
+ interface ExecutiveSummary {
1361
+ paragraphs: Array<string>;
1362
+ sections: Array<ExecutiveSummary.Section>;
1363
+ }
1364
+ namespace ExecutiveSummary {
1365
+ interface Section {
1366
+ body: string;
1367
+ heading: string | null;
1368
+ }
1369
+ }
1370
+ interface KeyFinding {
1371
+ body: string;
1372
+ /**
1373
+ * The calls the finding is about.
1374
+ */
1375
+ callIds: Array<string>;
1376
+ title: string;
1377
+ }
1378
+ interface Recommendation {
1379
+ body: string;
1380
+ channel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
1381
+ /**
1382
+ * For a prompt fix: the text to replace.
1383
+ */
1384
+ currentText: string | null;
1385
+ order: number;
1386
+ severity: 'HIGH' | 'MEDIUM' | 'LOW' | null;
1387
+ /**
1388
+ * For a prompt fix: the replacement.
1389
+ */
1390
+ suggestedText: string | null;
1391
+ themeSlugs: Array<string>;
1392
+ title: string;
1393
+ }
1394
+ interface Theme {
1395
+ affectedCallCount: number;
1396
+ analysis: string;
1397
+ callIds: Array<string>;
1398
+ checkNames: Array<string>;
1399
+ impact: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | null;
1400
+ lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED' | null;
1401
+ prevalence: 'WIDESPREAD' | 'RECURRING' | 'ISOLATED' | null;
1402
+ rootCauseChannel: 'PROMPT' | 'VOICE_CONFIG' | 'STT' | 'SPEECH_MODEL' | 'LLM_MODEL' | 'INFRA' | 'EXTERNAL' | null;
1403
+ severity: 'HIGH' | 'MEDIUM' | 'LOW';
1404
+ slug: string;
1405
+ title: string;
1406
+ totalCallCount: number;
1407
+ }
1408
+ /**
1409
+ * The checks against the previous run, as of generation.
1410
+ */
1411
+ interface Trend {
1412
+ baselineRunNumber: number | null;
1413
+ baselineRunPlanJobId: string;
1414
+ rows: Array<Trend.Row>;
1415
+ }
1416
+ namespace Trend {
1417
+ interface Row {
1418
+ checkName: string;
1419
+ currentPassRate: number | null;
1420
+ lifecycle: 'NEW' | 'PERSISTENT' | 'IMPROVING' | 'FIXED' | null;
1421
+ previousPassRate: number | null;
1422
+ }
1423
+ }
1424
+ interface WentWell {
1425
+ body: string;
1426
+ /**
1427
+ * The calls the finding is about.
1428
+ */
1429
+ callIds: Array<string>;
1430
+ title: string;
1431
+ }
1432
+ }
1433
+ }
1434
+ interface Metric {
1435
+ /**
1436
+ * The check’s tally. Null for a metric that is not a check.
1437
+ */
1438
+ check: Metric.Check | null;
1439
+ /**
1440
+ * How many values took each reading, for BOOLEAN, SCALE and CLASSIFICATION
1441
+ * metrics. Null without the `metric:read` permission.
1442
+ */
1443
+ distribution: Array<Metric.Distribution> | null;
1444
+ /**
1445
+ * Counted simulations with at least one value.
1446
+ */
1447
+ evaluatedCalls: number;
1448
+ /**
1449
+ * A threshold: one of the checks the run is judged on.
1450
+ */
1451
+ isCheck: boolean;
1452
+ metricDefinitionId: string;
1453
+ /**
1454
+ * The metric’s slug.
1455
+ */
1456
+ metricId: string;
1457
+ name: string;
1458
+ /**
1459
+ * For NUMERIC, SCALE, COUNT and OFFSET metrics. Null when nothing was captured, or
1460
+ * without the `metric:read` permission.
1461
+ */
1462
+ numeric: Metric.Numeric | null;
1463
+ outputType: 'COUNT' | 'NUMERIC' | 'BOOLEAN' | 'SCALE' | 'TEXT' | 'CLASSIFICATION' | 'OFFSET';
1464
+ /**
1465
+ * Values across those simulations. A per-turn metric has several per call.
1466
+ */
1467
+ sampleSize: number;
1468
+ /**
1469
+ * Unit of `numeric`, e.g. `ms`.
1470
+ */
1471
+ unitSymbol: string | null;
1472
+ }
1473
+ namespace Metric {
1474
+ /**
1475
+ * The check’s tally. Null for a metric that is not a check.
1476
+ */
1477
+ interface Check {
1478
+ evaluatedCalls: number;
1479
+ failedCalls: number;
1480
+ /**
1481
+ * 0-100. Null when nothing was evaluated.
1482
+ */
1483
+ passRate: number | null;
1484
+ passedCalls: number;
1485
+ }
1486
+ interface Distribution {
1487
+ count: number;
1488
+ value: string;
1489
+ }
1490
+ /**
1491
+ * For NUMERIC, SCALE, COUNT and OFFSET metrics. Null when nothing was captured, or
1492
+ * without the `metric:read` permission.
1493
+ */
1494
+ interface Numeric {
1495
+ average: number;
1496
+ max: number;
1497
+ median: number;
1498
+ min: number;
1499
+ p95: number;
1500
+ }
1501
+ }
1502
+ interface Run {
1503
+ createdAt: string;
1504
+ /**
1505
+ * Wall-clock run time. Null until the run ends.
1506
+ */
1507
+ durationMs: number | null;
1508
+ endedAt: string | null;
1509
+ /**
1510
+ * Per-project run number, shown as SR-42 in the app.
1511
+ */
1512
+ runNumber: number | null;
1513
+ simulationRunPlanId: string;
1514
+ simulationRunPlanJobId: string;
1515
+ /**
1516
+ * The run plan’s name. Null when the plan has since been deleted.
1517
+ */
1518
+ simulationRunPlanName: string | null;
1519
+ startedAt: string | null;
1520
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
1521
+ triggeredBy: 'SCHEDULED' | 'USER_TRIGGERED_FROM_UI' | 'RE_RUN' | 'TRIGGERED_FROM_API' | 'SYSTEM';
1522
+ }
1523
+ interface Summary {
1524
+ /**
1525
+ * passedCalls / evaluatedCalls, 0-100. Null when nothing was evaluated.
1526
+ */
1527
+ callPassRate: number | null;
1528
+ /**
1529
+ * Every (check, simulation) verdict pooled. 0-100. Null when nothing was
1530
+ * evaluated.
1531
+ */
1532
+ checkPassRate: number | null;
1533
+ /**
1534
+ * Counted simulations that connected and produced a conversation.
1535
+ */
1536
+ completedCalls: number;
1537
+ /**
1538
+ * Simulations whose results count: all but the invalidated ones.
1539
+ */
1540
+ countedCalls: number;
1541
+ /**
1542
+ * Counted simulations at least one check graded.
1543
+ */
1544
+ evaluatedCalls: number;
1545
+ /**
1546
+ * Evaluated simulations that failed at least one check.
1547
+ */
1548
+ failedCalls: number;
1549
+ /**
1550
+ * Evaluated simulations that passed every check.
1551
+ */
1552
+ passedCalls: number;
1553
+ /**
1554
+ * The run’s score: the mean of each check’s pass rate, the same number as
1555
+ * `verdict.score`. 0-100. Null when nothing was evaluated.
1556
+ */
1557
+ score: number | null;
1558
+ /**
1559
+ * Every simulation of the run, retries included.
1560
+ */
1561
+ totalCalls: number;
1562
+ }
1563
+ /**
1564
+ * For a run that swept a property (accent, background noise, speech pace and so
1565
+ * on): which check failures the property caused.
1566
+ *
1567
+ * Each value is compared with every other value combined using a one-sided Fisher
1568
+ * exact test, and every comparison in the run is corrected together with
1569
+ * Benjamini-Hochberg. A value is only called worse when the difference is
1570
+ * statistically significant, so a value that happened to fail a few more
1571
+ * simulations by chance is not reported as a problem. Invalidated simulations and
1572
+ * simulations that failed on the Roark platform are left out.
1573
+ */
1574
+ interface SweepAttribution {
1575
+ /**
1576
+ * Plain sentences on what this run could not see, ready to show to a reader.
1577
+ */
1578
+ caveats: Array<string>;
1579
+ /**
1580
+ * Every check the run was graded on: `PROPERTY_ATTRIBUTABLE` first, then
1581
+ * `FOUND_UNATTRIBUTED`, then `WITHIN_NOISE`.
1582
+ */
1583
+ checks: Array<SweepAttribution.Check>;
1584
+ /**
1585
+ * The Benjamini-Hochberg false discovery rate the comparisons are held to.
1586
+ */
1587
+ falseDiscoveryRate: number;
1588
+ /**
1589
+ * The overall failure rate, 0-100, at which a check with no standout value is
1590
+ * reported as `FOUND_UNATTRIBUTED`.
1591
+ */
1592
+ foundUnattributedFailureRate: number;
1593
+ /**
1594
+ * Counted simulations a value needs before it is compared.
1595
+ */
1596
+ minArmCalls: number;
1597
+ /**
1598
+ * Roughly how many percentage points more often a value would need to fail than
1599
+ * the rest of the run to be flagged at this sample size. Optimistic: it uses
1600
+ * simulation counts rather than the verdicts on each check and ignores the
1601
+ * correction, so checks graded on fewer simulations need larger gaps. Large when
1602
+ * few simulations ran per value: finding no significant difference then means the
1603
+ * run could not see one, not that none exists.
1604
+ */
1605
+ minimumDetectableGap: number | null;
1606
+ /**
1607
+ * The values your agent never spoke on significantly more often than the rest of
1608
+ * the run, most significant first, tested the same way as `worseValues`. Empty on
1609
+ * a run with no silent simulations.
1610
+ */
1611
+ neverSpokeValues: Array<SweepAttribution.NeverSpokeValue>;
1612
+ /**
1613
+ * How many values had enough counted simulations to be compared.
1614
+ */
1615
+ testableValueCount: number;
1616
+ /**
1617
+ * How many value and check pairs were actually tested. A value can have enough
1618
+ * simulations and still go untested (no other value graded that check, or too few
1619
+ * verdicts on it). When this is 0 no comparison ran, so an empty `worseValues`
1620
+ * everywhere means nothing was tested, not that no value did worse.
1621
+ */
1622
+ testedComparisonCount: number;
1623
+ /**
1624
+ * Every value of the swept property, baseline first.
1625
+ */
1626
+ values: Array<SweepAttribution.Value>;
1627
+ }
1628
+ namespace SweepAttribution {
1629
+ /**
1630
+ * How one check's failures relate to the swept property.
1631
+ */
1632
+ interface Check {
1633
+ /**
1634
+ * How this check relates to the swept property:
1635
+ *
1636
+ * - `PROPERTY_ATTRIBUTABLE`: at least one value failed it significantly more often
1637
+ * than every other value combined. `worseValues` names them. This is the only
1638
+ * case in which a value is called worse.
1639
+ * - `FOUND_UNATTRIBUTED`: no value stands out, but the check failed on at least
1640
+ * `foundUnattributedFailureRate`% of counted simulations overall. A real issue
1641
+ * with the agent on which no value stood out, so the run cannot tie it to the
1642
+ * property. It does not show the property had no effect: a small run may be
1643
+ * unable to see one.
1644
+ * - `WITHIN_NOISE`: neither. Any differences between values are within what chance
1645
+ * produces.
1646
+ */
1647
+ attribution: 'PROPERTY_ATTRIBUTABLE' | 'FOUND_UNATTRIBUTED' | 'WITHIN_NOISE';
1648
+ evaluated: number;
1649
+ failed: number;
1650
+ /**
1651
+ * Share of counted simulations across every value that failed the check, 0-100.
1652
+ */
1653
+ failureRate: number | null;
1654
+ metricDefinitionId: string;
1655
+ metricName: string;
1656
+ /**
1657
+ * The values significantly worse than the rest, most significant first. Empty
1658
+ * unless `attribution` is `PROPERTY_ATTRIBUTABLE`.
1659
+ */
1660
+ worseValues: Array<Check.WorseValue>;
1661
+ }
1662
+ namespace Check {
1663
+ /**
1664
+ * A value that failed a check significantly more often than the rest of the run.
1665
+ */
1666
+ interface WorseValue {
1667
+ /**
1668
+ * How likely a difference at least this large would be by chance alone, after
1669
+ * correcting for every comparison in the run (Benjamini-Hochberg). The value is
1670
+ * called worse only when this is at most `falseDiscoveryRate`.
1671
+ */
1672
+ adjustedPValue: number;
1673
+ evaluated: number;
1674
+ failed: number;
1675
+ /**
1676
+ * Share of the counted simulations at this value that failed the check, 0-100.
1677
+ */
1678
+ failureRate: number | null;
1679
+ /**
1680
+ * The arm's identity: the override signature its calls ran with, e.g.
1681
+ * `BACKGROUND_NOISE=DRIVING;BACKGROUND_NOISE_VOLUME=0.7`. Join on this rather than
1682
+ * on `value`: a sweep can run one value as several arms (Driving at 70% and at
1683
+ * 100%), and those share a value.
1684
+ */
1685
+ key: string;
1686
+ label: string;
1687
+ /**
1688
+ * The same share across every other value combined, 0-100. This is what the value
1689
+ * is compared with.
1690
+ */
1691
+ restFailureRate: number | null;
1692
+ value: string;
1693
+ }
1694
+ }
1695
+ /**
1696
+ * A value your agent never spoke on significantly more often than the rest of the
1697
+ * run.
1698
+ */
1699
+ interface NeverSpokeValue {
1700
+ /**
1701
+ * How likely a difference at least this large would be by chance alone, after
1702
+ * correcting across the values (Benjamini-Hochberg).
1703
+ */
1704
+ adjustedPValue: number;
1705
+ /**
1706
+ * Simulations run at this value.
1707
+ */
1708
+ attempted: number;
1709
+ /**
1710
+ * The arm's identity: the override signature its calls ran with, e.g.
1711
+ * `BACKGROUND_NOISE=DRIVING;BACKGROUND_NOISE_VOLUME=0.7`. Join on this rather than
1712
+ * on `value`: a sweep can run one value as several arms (Driving at 70% and at
1713
+ * 100%), and those share a value.
1714
+ */
1715
+ key: string;
1716
+ label: string;
1717
+ /**
1718
+ * Simulations run across every other value combined.
1719
+ */
1720
+ restAttempted: number;
1721
+ /**
1722
+ * Simulations your agent never spoke on across every other value combined.
1723
+ */
1724
+ restSilentAttempts: number;
1725
+ /**
1726
+ * Retries placed at this value because your agent never spoke.
1727
+ */
1728
+ retries: number;
1729
+ /**
1730
+ * Simulations at this value your agent never spoke on, retried or not.
1731
+ */
1732
+ silentAttempts: number;
1733
+ value: string;
1734
+ }
1735
+ /**
1736
+ * One value of the swept property.
1737
+ */
1738
+ interface Value {
1739
+ /**
1740
+ * Simulations run at this value. Simulations that failed on the Roark platform are
1741
+ * left out, since they say nothing about your agent.
1742
+ */
1743
+ attempted: number;
1744
+ /**
1745
+ * Simulations that actually tested the property: not invalidated, and graded by at
1746
+ * least one check. Only these are used in the comparison.
1747
+ */
1748
+ counted: number;
1749
+ /**
1750
+ * Whether this is the baseline the plan named.
1751
+ */
1752
+ isBaseline: boolean;
1753
+ /**
1754
+ * The arm's identity: the override signature its calls ran with, e.g.
1755
+ * `BACKGROUND_NOISE=DRIVING;BACKGROUND_NOISE_VOLUME=0.7`. Join on this rather than
1756
+ * on `value`: a sweep can run one value as several arms (Driving at 70% and at
1757
+ * 100%), and those share a value.
1758
+ */
1759
+ key: string;
1760
+ /**
1761
+ * The value in words, with what else the arm pinned, e.g. `American` or
1762
+ * `Driving (70% noise)`.
1763
+ */
1764
+ label: string;
1765
+ /**
1766
+ * Of `attempted`, the retries of simulations your agent never spoke on. Zero
1767
+ * unless the plan retries silent simulations.
1768
+ */
1769
+ retries: number;
1770
+ /**
1771
+ * The mean of each check's pass rate at this value, 0-100, the same rule as the
1772
+ * run's `score`. Descriptive only: a lower score alone never makes a value worse.
1773
+ * Null when nothing counted.
1774
+ */
1775
+ score: number | null;
1776
+ /**
1777
+ * Of `attempted`, the simulations your agent never spoke on, whether or not a
1778
+ * retry followed. They are invalidated, so they are never in `counted`.
1779
+ */
1780
+ silentAttempts: number;
1781
+ /**
1782
+ * Whether this value had at least `minArmCalls` counted simulations. A value below
1783
+ * that is "insufficient data": it is reported with its numbers but never compared
1784
+ * or ranked, because a rate from one or two calls cannot be told apart from luck.
1785
+ */
1786
+ testable: boolean;
1787
+ /**
1788
+ * The stored value of the swept property, e.g. `US`.
1789
+ */
1790
+ value: string;
1791
+ }
1792
+ }
1793
+ /**
1794
+ * Pass/fail verdict for the run, judged against the success criteria pinned on the
1795
+ * run plan when the run started.
1796
+ */
1797
+ interface Verdict {
1798
+ /**
1799
+ * Every check the run was judged on, with its rate and the minimum it had to
1800
+ * reach.
1801
+ *
1802
+ * Thresholds and authored yes/no metrics only. See `SimulationRunPlanJobCheck` for
1803
+ * why a provider reading is not one.
1804
+ */
1805
+ checks: Array<Verdict.Check>;
1806
+ /**
1807
+ * Every criterion the run missed. Empty when it passed.
1808
+ */
1809
+ failures: Array<Verdict.UnionMember0 | Verdict.UnionMember1 | Verdict.UnionMember2 | Verdict.UnionMember3 | Verdict.UnionMember4>;
1810
+ /**
1811
+ * Whether every check cleared its own `minPassRate` (and the run completed with
1812
+ * full coverage). Use this as the CI exit status.
1813
+ *
1814
+ * Never derived from `score`: a run can score 95 and still fail, or score 40 and
1815
+ * still pass.
1816
+ */
1817
+ passed: boolean;
1818
+ /**
1819
+ * The run's headline quality number, 0-100: the mean of each check's own pass
1820
+ * rate.
1821
+ *
1822
+ * Every check weighs the same, however many simulations it evaluated, which is the
1823
+ * same way `passed` treats them. It is the number the Roark dashboard shows for
1824
+ * this run.
1825
+ *
1826
+ * REPORTING ONLY, for dashboards and trend lines. Nothing is judged against it.
1827
+ * Null when nothing was evaluated.
1828
+ */
1829
+ score: number | null;
1830
+ }
1831
+ namespace Verdict {
1832
+ /**
1833
+ * How one check did. Present for every check the run was judged on, passing or
1834
+ * not.
1835
+ *
1836
+ * A check is a metric that yields a pass/fail: a threshold
1837
+ * (`Silence Duration <= 2s`) or a yes/no metric you authored. Provider readings
1838
+ * such as `Comprehension Failure` are observations, not checks: their `true` is
1839
+ * whatever the underlying field happens to mean, so they carry no passing side and
1840
+ * never appear here. Put a threshold on one to judge it.
1841
+ */
1842
+ interface Check {
1843
+ evaluatedSims: number;
1844
+ /**
1845
+ * Whether `minPassRate` is the 80% default (`true`) or a minimum this metric set
1846
+ * for itself.
1847
+ */
1848
+ inherited: boolean;
1849
+ metricDefinitionId: string;
1850
+ /**
1851
+ * THE BAR it was judged against: the share of the run's simulations it had to
1852
+ * pass.
1853
+ */
1854
+ minPassRate: number;
1855
+ /**
1856
+ * This check's own pass rate, 0-100: the share of sims it evaluated that passed
1857
+ * it. Null when it evaluated nothing.
1858
+ */
1859
+ passRate: number | null;
1860
+ /**
1861
+ * `passRate >= minPassRate`.
1862
+ */
1863
+ passed: boolean;
1864
+ passedSims: number;
1865
+ metricName?: string | null;
1866
+ }
1867
+ interface UnionMember0 {
1868
+ /**
1869
+ * The status the run actually ended in.
1870
+ */
1871
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
1872
+ type: 'RUN_NOT_COMPLETED';
1873
+ }
1874
+ interface UnionMember1 {
1875
+ evaluatedCalls: number;
1876
+ expectedCalls: number;
1877
+ type: 'INCOMPLETE_COVERAGE';
1878
+ }
1879
+ /**
1880
+ * Your agent never spoke on more than `maxShare` percent of the run. Those
1881
+ * simulations are left out of every check, so the run fails on them whatever the
1882
+ * checks say.
1883
+ */
1884
+ interface UnionMember2 {
1885
+ /**
1886
+ * The largest share of simulations, 0-100, your agent may never speak on while the
1887
+ * run can pass.
1888
+ */
1889
+ maxShare: number;
1890
+ /**
1891
+ * Test cases your agent never spoke on, judged on each test case’s last attempt: a
1892
+ * silent simulation a retry later reached your agent on does not count here.
1893
+ */
1894
+ neverSpokeCalls: number;
1895
+ /**
1896
+ * Every test case of the run whose last attempt reached your agent.
1897
+ */
1898
+ totalCalls: number;
1899
+ type: 'AGENT_NEVER_SPOKE';
1900
+ /**
1901
+ * The agent as the run tested it. Null when the simulations tested more than one
1902
+ * agent.
1903
+ */
1904
+ agentName?: string | null;
1905
+ /**
1906
+ * Every simulation your agent never spoke on, including the ones a retry replaced.
1907
+ * Above `neverSpokeCalls` only when the plan retries silent simulations
1908
+ * (`maxNoResponseRetries`).
1909
+ */
1910
+ silentAttempts?: number;
1911
+ }
1912
+ interface UnionMember3 {
1913
+ metricDefinitionId: string;
1914
+ type: 'METRIC_NOT_EVALUATED';
1915
+ /**
1916
+ * The check’s name, for rendering the failure.
1917
+ */
1918
+ metricName?: string | null;
1919
+ }
1920
+ interface UnionMember4 {
1921
+ /**
1922
+ * Whether the missed minimum was the 80% default (`true`) or this metric's own.
1923
+ */
1924
+ inherited: boolean;
1925
+ metricDefinitionId: string;
1926
+ minPassRate: number;
1927
+ passRate: number;
1928
+ type: 'METRIC_BELOW_MIN_PASS_RATE';
1929
+ /**
1930
+ * The check’s name, for rendering the failure.
1931
+ */
1932
+ metricName?: string | null;
1933
+ }
1934
+ }
1935
+ }
1936
+ }
1937
+ export interface SimulationRunPlanJobStartResponse {
1938
+ /**
1939
+ * Response when triggering a simulation run plan
1940
+ */
1941
+ data: SimulationRunPlanJobStartResponse.Data;
1942
+ }
1943
+ export declare namespace SimulationRunPlanJobStartResponse {
1944
+ /**
1945
+ * Response when triggering a simulation run plan
1946
+ */
1947
+ interface Data {
1948
+ /**
1949
+ * When the job was created
1950
+ */
1951
+ createdAt: string;
1952
+ /**
1953
+ * ID of the simulation run plan that was executed
1954
+ */
1955
+ simulationRunPlanId: string;
1956
+ /**
1957
+ * ID of the simulation run plan job that was created
1958
+ */
1959
+ simulationRunPlanJobId: string;
1960
+ /**
1961
+ * Initial status of the job
1962
+ */
1963
+ status: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
1964
+ }
1965
+ }
1966
+ export interface SimulationRunPlanJobListParams {
1967
+ /**
1968
+ * Cursor for pagination - use the nextCursor value from a previous response
1969
+ */
1970
+ after?: string;
1971
+ /**
1972
+ * Filter by label ID attached to the plan job. Use this if you know the label ID.
1973
+ */
1974
+ labelId?: string;
1975
+ /**
1976
+ * Filter by label name attached to the plan job. More user-friendly alternative to
1977
+ * labelId. Case-insensitive.
1978
+ */
1979
+ labelName?: string;
1980
+ /**
1981
+ * Maximum number of plan jobs to return (default: 20, max: 50)
1982
+ */
1983
+ limit?: number;
1984
+ /**
1985
+ * Filter by simulation run plan ID
1986
+ */
1987
+ simulationRunPlanId?: string;
1988
+ /**
1989
+ * Filter by plan job status (PENDING, QUEUED, CREATING_SNAPSHOTS,
1990
+ * CREATING_SIMULATIONS, PREPARING_CAPACITY, RUNNING_SIMULATIONS, COMPLETED,
1991
+ * FAILED, TIMED_OUT, CANCELLED, CANCELLING, ENDING_SIMULATIONS)
1992
+ */
1993
+ status?: 'PENDING' | 'QUEUED' | 'CREATING_SNAPSHOTS' | 'CREATING_SIMULATIONS' | 'PREPARING_CAPACITY' | 'RUNNING_SIMULATIONS' | 'COMPLETED' | 'FAILED' | 'TIMED_OUT' | 'CANCELLED' | 'CANCELLING' | 'ENDING_SIMULATIONS';
1994
+ }
1995
+ export interface SimulationRunPlanJobCreateDebriefParams {
1996
+ /**
1997
+ * Generate a new debrief even when a ready one exists. Without it, an existing
1998
+ * ready or in-progress debrief is returned as-is.
1999
+ */
2000
+ regenerate?: boolean;
2001
+ }
2002
+ export interface SimulationRunPlanJobGetResultsParams {
2003
+ /**
2004
+ * Simulation run plan job to compare this run against, e.g. the last run on your
2005
+ * main branch. Defaults to the plan's previous settled run. Any run in the project
2006
+ * works, including another plan's: checks are matched by metric, and a check only
2007
+ * one run graded reads null on the other side.
2008
+ */
2009
+ compareToJobId?: string;
991
2010
  }
992
2011
  export interface SimulationRunPlanJobStartParams {
993
2012
  /**
@@ -1054,6 +2073,6 @@ export declare namespace SimulationRunPlanJobStartParams {
1054
2073
  }
1055
2074
  }
1056
2075
  export declare namespace SimulationRunPlanJob {
1057
- export { type SimulationRunPlanJobListResponse as SimulationRunPlanJobListResponse, type SimulationRunPlanJobCancelResponse as SimulationRunPlanJobCancelResponse, type SimulationRunPlanJobGetByIDResponse as SimulationRunPlanJobGetByIDResponse, type SimulationRunPlanJobStartResponse as SimulationRunPlanJobStartResponse, type SimulationRunPlanJobListParams as SimulationRunPlanJobListParams, type SimulationRunPlanJobStartParams as SimulationRunPlanJobStartParams, };
2076
+ export { type SimulationRunPlanJobListResponse as SimulationRunPlanJobListResponse, type SimulationRunPlanJobCancelResponse as SimulationRunPlanJobCancelResponse, type SimulationRunPlanJobCreateDebriefResponse as SimulationRunPlanJobCreateDebriefResponse, type SimulationRunPlanJobGetByIDResponse as SimulationRunPlanJobGetByIDResponse, type SimulationRunPlanJobGetResultsResponse as SimulationRunPlanJobGetResultsResponse, type SimulationRunPlanJobStartResponse as SimulationRunPlanJobStartResponse, type SimulationRunPlanJobListParams as SimulationRunPlanJobListParams, type SimulationRunPlanJobCreateDebriefParams as SimulationRunPlanJobCreateDebriefParams, type SimulationRunPlanJobGetResultsParams as SimulationRunPlanJobGetResultsParams, type SimulationRunPlanJobStartParams as SimulationRunPlanJobStartParams, };
1058
2077
  }
1059
2078
  //# sourceMappingURL=simulation-run-plan-job.d.ts.map