@eigenpal/sdk 0.9.1 → 0.10.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.
@@ -227,72 +227,86 @@ export type RunStartMultipartRequest = {
227
227
  };
228
228
 
229
229
  /**
230
- * Partial update for run feedback. Omitted fields are preserved; pass null to clear a field.
230
+ * Create or update a dataset example from the run input, actual output, and review corrections.
231
231
  */
232
- export type RunFeedbackRequest = {
232
+ export type PromoteRunRequest = {
233
+ /**
234
+ * Dataset example name to create or update. Defaults to a generated name when omitted.
235
+ */
236
+ name?: string;
237
+ };
238
+
239
+ /**
240
+ * Create or replace review metadata for a run. Attribution fields (`reviewedBy`, `closedBy`, and their emails) are read-only and populated from the authenticated user or API key creator.
241
+ */
242
+ export type RunReviewRequest = {
233
243
  /**
234
- * Human feedback text. Pass null to clear the text.
244
+ * Reviewer verdict. Omit or send null for feedback without a ranking (nit). Defaults are applied client-side only; any verdict/status combination is accepted.
235
245
  */
236
- body?: string | null;
246
+ verdict?: 'correct' | 'incorrect' | null;
237
247
  /**
238
- * Human verdict for this run: `pass`, `fail`, or `partial`. Pass null to clear it.
248
+ * Review lifecycle. Defaults from verdict (`correct` `closed`, otherwise `open`). Use `closed` or `wont_fix` to close an open review.
239
249
  */
240
- rating?: 'pass' | 'fail' | 'partial' | null;
250
+ status?: 'open' | 'closed' | 'wont_fix';
241
251
  /**
242
- * Review lifecycle status: `open`, `resolved`, or `ignored`. Pass null to clear it.
252
+ * Reviewer note.
243
253
  */
244
- status?: 'open' | 'resolved' | 'ignored' | null;
254
+ note?: string | null;
245
255
  /**
246
- * Expected JSON output for this run. Pass null to clear it.
256
+ * Corrected JSON output for this run. Send `null` to clear a previously stored correction.
247
257
  */
248
- expected?: unknown | null;
258
+ correctedOutput?: unknown | null;
259
+ /**
260
+ * Field and file corrections. When present, replaces the entire correction set for this review. Omit to leave existing corrections unchanged.
261
+ */
262
+ corrections?: Array<{
263
+ id?: string;
264
+ kind: 'field' | 'file';
265
+ path: string;
266
+ label?: string | null;
267
+ originalValue?: unknown;
268
+ correctedValue?: unknown;
269
+ note?: string | null;
270
+ fileVerdict?: 'correct' | 'wrong' | 'replaced' | null;
271
+ correctedArtifactPath?: string | null;
272
+ }>;
249
273
  };
250
274
 
251
275
  /**
252
- * JSON request body for copying one run output file into the expected artifact set.
276
+ * JSON request body for copying one run output file into the corrected artifact set.
253
277
  */
254
- export type RunExpectedFileCopyRequest = {
278
+ export type RunReviewExpectedFileCopyRequest = {
255
279
  /**
256
- * Name of an existing run output file to copy into expected artifacts.
280
+ * Name of an existing run output file to copy into corrected artifacts.
257
281
  */
258
282
  outputFileName: string;
259
283
  /**
260
- * Optional name for the copied expected file. Defaults to the original output file name.
284
+ * Optional name for the copied corrected file. Defaults to the original output file name.
261
285
  */
262
286
  expectedName?: string;
263
287
  };
264
288
 
265
- export type RunExpectedFileUploadRequest = {
289
+ export type RunReviewExpectedFileUploadRequest = {
266
290
  /**
267
- * Expected artifact file to upload.
291
+ * Corrected artifact file to upload.
268
292
  */
269
293
  file: Blob | File;
270
294
  /**
271
- * Optional stored expected file name. Defaults to the uploaded filename.
295
+ * Optional stored corrected file name. Defaults to the uploaded filename.
272
296
  */
273
297
  name?: string;
274
298
  };
275
299
 
276
300
  /**
277
- * Rename one expected file.
301
+ * Rename one corrected file.
278
302
  */
279
- export type RunExpectedFileUpdateRequest = {
303
+ export type RunReviewExpectedFileUpdateRequest = {
280
304
  /**
281
- * New expected file name.
305
+ * New corrected file name.
282
306
  */
283
307
  name: string;
284
308
  };
285
309
 
286
- /**
287
- * Create or update a dataset example from the run input, actual output, and feedback expected artifacts.
288
- */
289
- export type PromoteRunRequest = {
290
- /**
291
- * Dataset example name to create or update. Defaults to a generated name when omitted.
292
- */
293
- name?: string;
294
- };
295
-
296
310
  export type AuthCheckResponse = {
297
311
  ok: true;
298
312
  tenantId: string;
@@ -747,7 +761,7 @@ export type EvalResult = {
747
761
  */
748
762
  evaluatorType: string;
749
763
  /**
750
- * Automated evaluator score. Do not confuse this with human feedback `rating`.
764
+ * Automated evaluator score. Do not confuse this with a human review verdict.
751
765
  */
752
766
  score: number | null;
753
767
  /**
@@ -781,6 +795,85 @@ export type EvalResult = {
781
795
  createdAt: string;
782
796
  };
783
797
 
798
+ export type RunReviewHealthResponse = {
799
+ timeRange: {
800
+ from: string;
801
+ to: string;
802
+ };
803
+ granularity: {
804
+ bucket: 'day' | 'week' | 'month';
805
+ rollingWindow: number;
806
+ minRollingReviews: number;
807
+ };
808
+ summary: RunReviewHealthSummary;
809
+ buckets: Array<RunReviewHealthBucket>;
810
+ rolling: Array<RunReviewHealthRollingPoint>;
811
+ };
812
+
813
+ export type RunReviewHealthSummary = {
814
+ totalRuns: number;
815
+ /**
816
+ * Runs with a ranked verdict (`correct` or `incorrect`). Null verdict (nit) is excluded.
817
+ */
818
+ reviewedRuns: number;
819
+ reviewCoverage: number | null;
820
+ correctReviews: number;
821
+ incorrectReviews: number;
822
+ /**
823
+ * Runs with a review row and null verdict (nit). Excluded from review coverage and accuracy.
824
+ */
825
+ nitReviews: number;
826
+ reviewedCorrectness: number | null;
827
+ confidence: RunReviewHealthConfidence;
828
+ };
829
+
830
+ /**
831
+ * Wilson score confidence interval for reviewed correctness. Null bounds mean there are no reviewed runs in the sample.
832
+ */
833
+ export type RunReviewHealthConfidence = {
834
+ lower: number | null;
835
+ upper: number | null;
836
+ method: 'wilson';
837
+ };
838
+
839
+ export type RunReviewHealthBucket = {
840
+ start: string;
841
+ end: string;
842
+ totalRuns: number;
843
+ /**
844
+ * Runs with a ranked verdict (`correct` or `incorrect`). Null verdict (nit) is excluded.
845
+ */
846
+ reviewedRuns: number;
847
+ reviewCoverage: number | null;
848
+ correctReviews: number;
849
+ incorrectReviews: number;
850
+ /**
851
+ * Runs with a review row and null verdict (nit). Excluded from review coverage and accuracy.
852
+ */
853
+ nitReviews: number;
854
+ reviewedCorrectness: number | null;
855
+ };
856
+
857
+ export type RunReviewHealthRollingPoint = {
858
+ at: string;
859
+ /**
860
+ * Runs with a ranked verdict (`correct` or `incorrect`). Null verdict (nit) is excluded.
861
+ */
862
+ reviewedRuns: number;
863
+ correctReviews: number;
864
+ reviewedCorrectness: number;
865
+ confidenceLower: number;
866
+ confidenceUpper: number;
867
+ /**
868
+ * Total production runs in the rolling window ending at this point.
869
+ */
870
+ totalRunsInWindow: number;
871
+ /**
872
+ * Share of runs in the rolling window that were reviewed (0-1). Uses the same window size as rolling accuracy, applied to all runs.
873
+ */
874
+ reviewCoverage: number;
875
+ };
876
+
784
877
  export type AutomationTriggersResponse = {
785
878
  automationId: string;
786
879
  type: AutomationType;
@@ -833,6 +926,10 @@ export type RunListItem = {
833
926
  * True when the run has reached a terminal status.
834
927
  */
835
928
  finished: boolean;
929
+ /**
930
+ * Deterministic pseudo-random rank in [0, 1) for this run within the tenant. Use with a sample rate threshold to review a stable subset.
931
+ */
932
+ sampleRank: number;
836
933
  timing: RunTiming;
837
934
  source: RunSource;
838
935
  trigger: RunTrigger;
@@ -944,6 +1041,10 @@ export type RunExecutionMeta = {
944
1041
  */
945
1042
  batchId: string | null;
946
1043
  retry: RunExecutionRetry;
1044
+ /**
1045
+ * Lightweight review state for run list rows.
1046
+ */
1047
+ review?: RunReviewSummary | null;
947
1048
  };
948
1049
 
949
1050
  export type ExecutionStatus = 'created' | 'pending' | 'running' | 'waiting' | 'finalizing' | 'completed' | 'failed' | 'cancelled' | 'rejected';
@@ -966,6 +1067,19 @@ export type RunExecutionRetry = {
966
1067
  } | null;
967
1068
  };
968
1069
 
1070
+ export type RunReviewSummary = {
1071
+ verdict: 'correct' | 'incorrect' | null;
1072
+ status: 'open' | 'closed' | 'wont_fix';
1073
+ /**
1074
+ * True when review notes were left.
1075
+ */
1076
+ hasNote: boolean;
1077
+ /**
1078
+ * Number of field/file corrections.
1079
+ */
1080
+ correctionCount: number;
1081
+ };
1082
+
969
1083
  export type RunStartResponse = RunAccepted | Run;
970
1084
 
971
1085
  export type RunAccepted = {
@@ -982,6 +1096,10 @@ export type Run = {
982
1096
  * True when the run has reached a terminal status.
983
1097
  */
984
1098
  finished: boolean;
1099
+ /**
1100
+ * Deterministic pseudo-random rank in [0, 1) for this run within the tenant. Use with a sample rate threshold to review a stable subset.
1101
+ */
1102
+ sampleRank: number;
985
1103
  timing: RunTiming;
986
1104
  source: RunSource;
987
1105
  trigger: RunTrigger;
@@ -1054,13 +1172,7 @@ export type RunInput = {
1054
1172
  metadata?: unknown;
1055
1173
  };
1056
1174
 
1057
- /**
1058
- * A file attached to a run input, output, or expected artifact set.
1059
- */
1060
1175
  export type RunFile = {
1061
- /**
1062
- * File name or slash-delimited artifact path.
1063
- */
1064
1176
  name: string;
1065
1177
  };
1066
1178
 
@@ -1100,6 +1212,7 @@ export type WorkflowRunExecution = {
1100
1212
  */
1101
1213
  batchId: string | null;
1102
1214
  retry: RunExecutionRetry;
1215
+ review?: RunReview | null;
1103
1216
  /**
1104
1217
  * Per-step executions of the workflow run.
1105
1218
  */
@@ -1108,7 +1221,6 @@ export type WorkflowRunExecution = {
1108
1221
  * Workflow definition snapshot captured when the run was created.
1109
1222
  */
1110
1223
  definitionSnapshot?: unknown | null;
1111
- feedback?: RunFeedback | null;
1112
1224
  /**
1113
1225
  * Ground-truth expected output and files.
1114
1226
  */
@@ -1118,58 +1230,51 @@ export type WorkflowRunExecution = {
1118
1230
  };
1119
1231
  };
1120
1232
 
1121
- /**
1122
- * Canonical human feedback object for a run. Use feedback endpoints to read, update, clear, or promote it to a dataset example.
1123
- */
1124
- export type RunFeedback = {
1125
- /**
1126
- * Human verdict for the run: `pass`, `fail`, or `partial`. This is separate from evaluator `score` values.
1127
- */
1128
- rating: string | null;
1129
- /**
1130
- * Review lifecycle status: `open` needs attention, `resolved` was addressed, and `ignored` was acknowledged but intentionally not acted on.
1131
- */
1132
- status: string | null;
1133
- /**
1134
- * Human feedback text written for this run.
1135
- */
1136
- body: string;
1137
- /**
1138
- * When feedback was first created.
1139
- */
1140
- createdAt: string | null;
1141
- /**
1142
- * User id that created the feedback.
1143
- */
1144
- createdBy: string | null;
1145
- /**
1146
- * Email of the user that created the feedback.
1147
- */
1148
- createdByEmail: string | null;
1149
- /**
1150
- * When feedback was last changed.
1151
- */
1152
- updatedAt: string | null;
1233
+ export type RunReview = {
1234
+ id: string;
1235
+ verdict: 'correct' | 'incorrect' | null;
1236
+ status: 'open' | 'closed' | 'wont_fix';
1237
+ note: string;
1238
+ correctedOutput?: unknown | null;
1153
1239
  /**
1154
- * When feedback was marked resolved or ignored.
1240
+ * User id of the last reviewer. Read-only; set from the authenticated user or API key creator.
1155
1241
  */
1156
- resolvedAt: string | null;
1242
+ reviewedBy: string | null;
1157
1243
  /**
1158
- * User id that resolved or ignored the feedback.
1244
+ * Email of the last reviewer. Read-only; set from the authenticated user or API key creator.
1159
1245
  */
1160
- resolvedBy: string | null;
1246
+ reviewedByEmail: string | null;
1247
+ reviewedAt: string;
1161
1248
  /**
1162
- * Email of the user that resolved or ignored the feedback.
1249
+ * User id recorded when the review was closed. Read-only; set when status becomes closed or wont_fix.
1163
1250
  */
1164
- resolvedByEmail: string | null;
1251
+ closedBy: string | null;
1165
1252
  /**
1166
- * Agent session id that resolved the feedback, when applicable.
1253
+ * Email recorded when the review was closed. Read-only; set when status becomes closed or wont_fix.
1167
1254
  */
1168
- resolvedBySessionId: string | null;
1255
+ closedByEmail: string | null;
1256
+ closedAt: string | null;
1257
+ closedNote: string | null;
1258
+ createdAt: string;
1259
+ updatedAt: string;
1260
+ corrections: Array<RunReviewCorrection>;
1261
+ };
1262
+
1263
+ export type RunReviewCorrection = {
1264
+ id: string;
1265
+ kind: 'field' | 'file';
1169
1266
  /**
1170
- * Dataset example name created from this feedback, if promoted.
1267
+ * JSON Pointer for field corrections, or canonical artifact path for file reviews.
1171
1268
  */
1172
- promotedExampleName: string | null;
1269
+ path: string;
1270
+ label: string | null;
1271
+ originalValue?: unknown | null;
1272
+ correctedValue?: unknown | null;
1273
+ note: string;
1274
+ fileVerdict?: 'correct' | 'wrong' | 'replaced' | null;
1275
+ correctedArtifactPath?: string | null;
1276
+ createdAt: string;
1277
+ updatedAt: string;
1173
1278
  };
1174
1279
 
1175
1280
  export type AgentRunExecution = {
@@ -1183,13 +1288,13 @@ export type AgentRunExecution = {
1183
1288
  */
1184
1289
  batchId: string | null;
1185
1290
  retry: RunExecutionRetry;
1291
+ review?: RunReview | null;
1186
1292
  files: {
1187
1293
  /**
1188
1294
  * Output artifacts the agent produced.
1189
1295
  */
1190
1296
  output: Array<RunFile>;
1191
1297
  };
1192
- feedback?: RunFeedback | null;
1193
1298
  /**
1194
1299
  * Ground-truth expected output and files.
1195
1300
  */
@@ -1254,48 +1359,6 @@ export type RunEvent = {
1254
1359
  };
1255
1360
  };
1256
1361
 
1257
- /**
1258
- * Complete feedback state for a run: human feedback, expected JSON output, and expected files.
1259
- */
1260
- export type RunFeedbackDetail = {
1261
- /**
1262
- * Human feedback object for the run, or null when no feedback exists.
1263
- */
1264
- feedback: RunFeedback | null;
1265
- /**
1266
- * Expected JSON output for the run, or null when none is set.
1267
- */
1268
- expected: unknown | null;
1269
- /**
1270
- * Expected output files attached to this run feedback record.
1271
- */
1272
- expectedFiles: Array<RunFile>;
1273
- };
1274
-
1275
- /**
1276
- * Expected JSON output and expected files attached to run feedback.
1277
- */
1278
- export type RunExpectedArtifacts = {
1279
- /**
1280
- * Expected JSON output for the run, or null when none is set.
1281
- */
1282
- expected: unknown | null;
1283
- /**
1284
- * Expected output files attached to this run feedback record.
1285
- */
1286
- files: Array<RunFile>;
1287
- };
1288
-
1289
- /**
1290
- * Expected file created or renamed by the request.
1291
- */
1292
- export type RunExpectedFileMutationResponse = RunFile;
1293
-
1294
- /**
1295
- * Expected file after the rename.
1296
- */
1297
- export type RunExpectedFileUpdateResponse = RunFile;
1298
-
1299
1362
  export type PromoteRunResponse = {
1300
1363
  /**
1301
1364
  * Automation that owns the promoted example.
@@ -1317,12 +1380,36 @@ export type PromoteRunResponse = {
1317
1380
 
1318
1381
  export type RunRerunResponse = RunStartResponse;
1319
1382
 
1383
+ export type RunReviewDetail = {
1384
+ /**
1385
+ * Review metadata and corrections. Corrected files are listed separately at GET /runs/{id}/reviews/expected.
1386
+ */
1387
+ review: RunReview | null;
1388
+ };
1389
+
1390
+ export type RunReviewExpectedArtifacts = {
1391
+ /**
1392
+ * Corrected artifact files attached to the run review. Corrected JSON output lives on the review object at GET /runs/{id}/reviews.
1393
+ */
1394
+ files: Array<RunFile>;
1395
+ };
1396
+
1397
+ /**
1398
+ * Corrected file created or renamed by the request.
1399
+ */
1400
+ export type RunReviewExpectedFileMutationResponse = RunFile;
1401
+
1402
+ /**
1403
+ * Corrected file after the rename.
1404
+ */
1405
+ export type RunReviewExpectedFileUpdateResponse = RunFile;
1406
+
1320
1407
  /**
1321
1408
  * Automated evaluator results attached to a run.
1322
1409
  */
1323
1410
  export type RunScoresResponse = {
1324
1411
  /**
1325
- * Automated evaluator scores for the run. These are separate from human feedback `rating` values.
1412
+ * Automated evaluator scores for the run. These are separate from human review verdicts.
1326
1413
  */
1327
1414
  scores: Array<EvalResult>;
1328
1415
  };
@@ -3120,6 +3207,107 @@ export type AutomationsExperimentsCreateStreamResponses = {
3120
3207
 
3121
3208
  export type AutomationsExperimentsCreateStreamResponse = AutomationsExperimentsCreateStreamResponses[keyof AutomationsExperimentsCreateStreamResponses];
3122
3209
 
3210
+ export type AutomationsReviewsHealthData = {
3211
+ body?: never;
3212
+ path: {
3213
+ /**
3214
+ * Workflow id, agent id, or typed alias like workflows.slug / agents.slug.
3215
+ */
3216
+ id: string;
3217
+ };
3218
+ query?: {
3219
+ /**
3220
+ * Comma-separated: workflow,agent.
3221
+ */
3222
+ type?: string;
3223
+ /**
3224
+ * Comma-separated execution statuses.
3225
+ */
3226
+ status?: string;
3227
+ /**
3228
+ * Comma-separated trigger types.
3229
+ */
3230
+ trigger?: string;
3231
+ /**
3232
+ * Comma-separated user ids, or __system__ for system-triggered runs.
3233
+ */
3234
+ triggeredBy?: string;
3235
+ sourceRef?: string;
3236
+ batchId?: string;
3237
+ exampleId?: string;
3238
+ exampleIdContains?: string;
3239
+ /**
3240
+ * Start of the run-created time range. Defaults to now-30d.
3241
+ */
3242
+ from?: string;
3243
+ /**
3244
+ * End of the run-created time range.
3245
+ */
3246
+ to?: string;
3247
+ completedAfter?: string;
3248
+ completedBefore?: string;
3249
+ /**
3250
+ * Set to false to exclude experiment batch runs.
3251
+ */
3252
+ experiments?: string;
3253
+ /**
3254
+ * Calendar bucket size for the bar chart series. Defaults to day.
3255
+ */
3256
+ bucket?: 'day' | 'week' | 'month';
3257
+ /**
3258
+ * Number of reviewed runs per rolling correctness point. Defaults to 100.
3259
+ */
3260
+ rollingWindow?: number;
3261
+ /**
3262
+ * Minimum reviewed runs required before emitting rolling points. Defaults to 1.
3263
+ */
3264
+ minRollingReviews?: number;
3265
+ };
3266
+ url: '/api/v1/automations/{id}/reviews/health';
3267
+ };
3268
+
3269
+ export type AutomationsReviewsHealthErrors = {
3270
+ /**
3271
+ * Validation error. Request shape did not match the spec.
3272
+ */
3273
+ 400: ApiErrorEnvelope;
3274
+ /**
3275
+ * Missing or invalid API key
3276
+ */
3277
+ 401: ApiErrorEnvelope;
3278
+ /**
3279
+ * API key lacks required scope
3280
+ */
3281
+ 403: ApiErrorEnvelope;
3282
+ /**
3283
+ * Resource not found
3284
+ */
3285
+ 404: ApiErrorEnvelope;
3286
+ /**
3287
+ * Payload too large. Upload exceeded the per-request size cap.
3288
+ */
3289
+ 413: ApiErrorEnvelope;
3290
+ /**
3291
+ * Rate limit exceeded
3292
+ */
3293
+ 429: ApiErrorEnvelope;
3294
+ /**
3295
+ * Internal server error
3296
+ */
3297
+ 500: ApiErrorEnvelope;
3298
+ };
3299
+
3300
+ export type AutomationsReviewsHealthError = AutomationsReviewsHealthErrors[keyof AutomationsReviewsHealthErrors];
3301
+
3302
+ export type AutomationsReviewsHealthResponses = {
3303
+ /**
3304
+ * Automation review health metrics.
3305
+ */
3306
+ 200: RunReviewHealthResponse;
3307
+ };
3308
+
3309
+ export type AutomationsReviewsHealthResponse = AutomationsReviewsHealthResponses[keyof AutomationsReviewsHealthResponses];
3310
+
3123
3311
  export type AutomationsSyncData = {
3124
3312
  body?: never;
3125
3313
  path: {
@@ -3606,6 +3794,26 @@ export type RunsListData = {
3606
3794
  offset?: number;
3607
3795
  limit?: number;
3608
3796
  ids?: string;
3797
+ experiments?: string;
3798
+ sort?: string;
3799
+ order?: string;
3800
+ reviewStatus?: string;
3801
+ reviewVerdict?: string;
3802
+ hasReview?: string;
3803
+ noReview?: string;
3804
+ hasCorrections?: string;
3805
+ reviewNoteContains?: string;
3806
+ reviewCreatedAfter?: string;
3807
+ reviewCreatedBefore?: string;
3808
+ reviewUpdatedAfter?: string;
3809
+ reviewUpdatedBefore?: string;
3810
+ reviewClosedAfter?: string;
3811
+ reviewClosedBefore?: string;
3812
+ sinceLastClosed?: string;
3813
+ /**
3814
+ * Keep runs whose `sampleRank` is below this threshold (0–1). Pages may return fewer than `limit` rows when filtered.
3815
+ */
3816
+ sampleRate?: string;
3609
3817
  };
3610
3818
  url: '/api/v1/runs';
3611
3819
  };
@@ -3790,6 +3998,10 @@ export type RunsArtifactsListData = {
3790
3998
  * When `1`, download output files as a ZIP instead of listing paths. Does not include trace, scores, or input — use `GET /runs/{id}/scores` and `GET /runs/{id}/trace` for those.
3791
3999
  */
3792
4000
  zip?: '1';
4001
+ /**
4002
+ * With `zip=1`, use `review` to download a ZIP with `output/` and `expected/` folders (corrected review artifacts).
4003
+ */
4004
+ bundle?: 'review';
3793
4005
  /**
3794
4006
  * Signed email download token (zip only; no Bearer required).
3795
4007
  */
@@ -3995,8 +4207,8 @@ export type RunsEventsListResponses = {
3995
4207
 
3996
4208
  export type RunsEventsListResponse = RunsEventsListResponses[keyof RunsEventsListResponses];
3997
4209
 
3998
- export type RunsFeedbackClearData = {
3999
- body?: never;
4210
+ export type RunsPromoteData = {
4211
+ body: PromoteRunRequest;
4000
4212
  path: {
4001
4213
  /**
4002
4214
  * Run id.
@@ -4004,10 +4216,10 @@ export type RunsFeedbackClearData = {
4004
4216
  id: string;
4005
4217
  };
4006
4218
  query?: never;
4007
- url: '/api/v1/runs/{id}/feedback';
4219
+ url: '/api/v1/runs/{id}/promote';
4008
4220
  };
4009
4221
 
4010
- export type RunsFeedbackClearErrors = {
4222
+ export type RunsPromoteErrors = {
4011
4223
  /**
4012
4224
  * Validation error. Request shape did not match the spec.
4013
4225
  */
@@ -4038,30 +4250,39 @@ export type RunsFeedbackClearErrors = {
4038
4250
  500: ApiErrorEnvelope;
4039
4251
  };
4040
4252
 
4041
- export type RunsFeedbackClearError = RunsFeedbackClearErrors[keyof RunsFeedbackClearErrors];
4253
+ export type RunsPromoteError = RunsPromoteErrors[keyof RunsPromoteErrors];
4042
4254
 
4043
- export type RunsFeedbackClearResponses = {
4255
+ export type RunsPromoteResponses = {
4044
4256
  /**
4045
- * Empty complete run feedback state.
4257
+ * Created or updated a dataset example from the run
4046
4258
  */
4047
- 200: RunFeedbackDetail;
4259
+ 200: PromoteRunResponse;
4048
4260
  };
4049
4261
 
4050
- export type RunsFeedbackClearResponse = RunsFeedbackClearResponses[keyof RunsFeedbackClearResponses];
4262
+ export type RunsPromoteResponse = RunsPromoteResponses[keyof RunsPromoteResponses];
4051
4263
 
4052
- export type RunsFeedbackGetData = {
4264
+ export type RunsRerunData = {
4053
4265
  body?: never;
4054
4266
  path: {
4055
4267
  /**
4056
- * Run id.
4268
+ * Source run id to retry.
4057
4269
  */
4058
4270
  id: string;
4059
4271
  };
4060
- query?: never;
4061
- url: '/api/v1/runs/{id}/feedback';
4272
+ query?: {
4273
+ /**
4274
+ * Version for the new run. `original` pins the source run. Defaults to latest.
4275
+ */
4276
+ version?: string;
4277
+ /**
4278
+ * Seconds to wait before returning (max 600). Omit for async.
4279
+ */
4280
+ wait_for_completion?: number;
4281
+ };
4282
+ url: '/api/v1/runs/{id}/rerun';
4062
4283
  };
4063
4284
 
4064
- export type RunsFeedbackGetErrors = {
4285
+ export type RunsRerunErrors = {
4065
4286
  /**
4066
4287
  * Validation error. Request shape did not match the spec.
4067
4288
  */
@@ -4092,19 +4313,27 @@ export type RunsFeedbackGetErrors = {
4092
4313
  500: ApiErrorEnvelope;
4093
4314
  };
4094
4315
 
4095
- export type RunsFeedbackGetError = RunsFeedbackGetErrors[keyof RunsFeedbackGetErrors];
4316
+ export type RunsRerunError = RunsRerunErrors[keyof RunsRerunErrors];
4096
4317
 
4097
- export type RunsFeedbackGetResponses = {
4318
+ export type RunsRerunResponses = {
4319
+ /**
4320
+ * Rerun completed while waiting
4321
+ */
4322
+ 200: RunStartResponse;
4323
+ /**
4324
+ * Rerun accepted (async)
4325
+ */
4326
+ 201: RunStartResponse;
4098
4327
  /**
4099
- * Complete run feedback state.
4328
+ * Wait expired with a non-terminal status — poll GET /api/v1/runs/:id
4100
4329
  */
4101
- 200: RunFeedbackDetail;
4330
+ 202: RunStartResponse;
4102
4331
  };
4103
4332
 
4104
- export type RunsFeedbackGetResponse = RunsFeedbackGetResponses[keyof RunsFeedbackGetResponses];
4333
+ export type RunsRerunResponse = RunsRerunResponses[keyof RunsRerunResponses];
4105
4334
 
4106
- export type RunsFeedbackUpdateData = {
4107
- body: RunFeedbackRequest;
4335
+ export type RunsReviewsClearData = {
4336
+ body?: never;
4108
4337
  path: {
4109
4338
  /**
4110
4339
  * Run id.
@@ -4112,10 +4341,10 @@ export type RunsFeedbackUpdateData = {
4112
4341
  id: string;
4113
4342
  };
4114
4343
  query?: never;
4115
- url: '/api/v1/runs/{id}/feedback';
4344
+ url: '/api/v1/runs/{id}/reviews';
4116
4345
  };
4117
4346
 
4118
- export type RunsFeedbackUpdateErrors = {
4347
+ export type RunsReviewsClearErrors = {
4119
4348
  /**
4120
4349
  * Validation error. Request shape did not match the spec.
4121
4350
  */
@@ -4146,18 +4375,18 @@ export type RunsFeedbackUpdateErrors = {
4146
4375
  500: ApiErrorEnvelope;
4147
4376
  };
4148
4377
 
4149
- export type RunsFeedbackUpdateError = RunsFeedbackUpdateErrors[keyof RunsFeedbackUpdateErrors];
4378
+ export type RunsReviewsClearError = RunsReviewsClearErrors[keyof RunsReviewsClearErrors];
4150
4379
 
4151
- export type RunsFeedbackUpdateResponses = {
4380
+ export type RunsReviewsClearResponses = {
4152
4381
  /**
4153
- * Updated complete run feedback state.
4382
+ * Empty run review state.
4154
4383
  */
4155
- 200: RunFeedbackDetail;
4384
+ 200: RunReviewDetail;
4156
4385
  };
4157
4386
 
4158
- export type RunsFeedbackUpdateResponse = RunsFeedbackUpdateResponses[keyof RunsFeedbackUpdateResponses];
4387
+ export type RunsReviewsClearResponse = RunsReviewsClearResponses[keyof RunsReviewsClearResponses];
4159
4388
 
4160
- export type RunsFeedbackExpectedGetData = {
4389
+ export type RunsReviewsGetData = {
4161
4390
  body?: never;
4162
4391
  path: {
4163
4392
  /**
@@ -4166,10 +4395,10 @@ export type RunsFeedbackExpectedGetData = {
4166
4395
  id: string;
4167
4396
  };
4168
4397
  query?: never;
4169
- url: '/api/v1/runs/{id}/feedback/expected';
4398
+ url: '/api/v1/runs/{id}/reviews';
4170
4399
  };
4171
4400
 
4172
- export type RunsFeedbackExpectedGetErrors = {
4401
+ export type RunsReviewsGetErrors = {
4173
4402
  /**
4174
4403
  * Validation error. Request shape did not match the spec.
4175
4404
  */
@@ -4200,19 +4429,19 @@ export type RunsFeedbackExpectedGetErrors = {
4200
4429
  500: ApiErrorEnvelope;
4201
4430
  };
4202
4431
 
4203
- export type RunsFeedbackExpectedGetError = RunsFeedbackExpectedGetErrors[keyof RunsFeedbackExpectedGetErrors];
4432
+ export type RunsReviewsGetError = RunsReviewsGetErrors[keyof RunsReviewsGetErrors];
4204
4433
 
4205
- export type RunsFeedbackExpectedGetResponses = {
4434
+ export type RunsReviewsGetResponses = {
4206
4435
  /**
4207
- * Expected JSON output and files.
4436
+ * Run review metadata.
4208
4437
  */
4209
- 200: RunExpectedArtifacts;
4438
+ 200: RunReviewDetail;
4210
4439
  };
4211
4440
 
4212
- export type RunsFeedbackExpectedGetResponse = RunsFeedbackExpectedGetResponses[keyof RunsFeedbackExpectedGetResponses];
4441
+ export type RunsReviewsGetResponse = RunsReviewsGetResponses[keyof RunsReviewsGetResponses];
4213
4442
 
4214
- export type RunsFeedbackExpectedCreateData = {
4215
- body: RunExpectedFileCopyRequest | RunExpectedFileUploadRequest;
4443
+ export type RunsReviewsUpdateData = {
4444
+ body: RunReviewRequest;
4216
4445
  path: {
4217
4446
  /**
4218
4447
  * Run id.
@@ -4220,10 +4449,10 @@ export type RunsFeedbackExpectedCreateData = {
4220
4449
  id: string;
4221
4450
  };
4222
4451
  query?: never;
4223
- url: '/api/v1/runs/{id}/feedback/expected';
4452
+ url: '/api/v1/runs/{id}/reviews';
4224
4453
  };
4225
4454
 
4226
- export type RunsFeedbackExpectedCreateErrors = {
4455
+ export type RunsReviewsUpdateErrors = {
4227
4456
  /**
4228
4457
  * Validation error. Request shape did not match the spec.
4229
4458
  */
@@ -4254,34 +4483,30 @@ export type RunsFeedbackExpectedCreateErrors = {
4254
4483
  500: ApiErrorEnvelope;
4255
4484
  };
4256
4485
 
4257
- export type RunsFeedbackExpectedCreateError = RunsFeedbackExpectedCreateErrors[keyof RunsFeedbackExpectedCreateErrors];
4486
+ export type RunsReviewsUpdateError = RunsReviewsUpdateErrors[keyof RunsReviewsUpdateErrors];
4258
4487
 
4259
- export type RunsFeedbackExpectedCreateResponses = {
4488
+ export type RunsReviewsUpdateResponses = {
4260
4489
  /**
4261
- * Expected file created.
4490
+ * Updated run review metadata.
4262
4491
  */
4263
- 201: RunExpectedFileMutationResponse;
4492
+ 200: RunReviewDetail;
4264
4493
  };
4265
4494
 
4266
- export type RunsFeedbackExpectedCreateResponse = RunsFeedbackExpectedCreateResponses[keyof RunsFeedbackExpectedCreateResponses];
4495
+ export type RunsReviewsUpdateResponse = RunsReviewsUpdateResponses[keyof RunsReviewsUpdateResponses];
4267
4496
 
4268
- export type RunsFeedbackExpectedFileDeleteData = {
4497
+ export type RunsReviewsExpectedGetData = {
4269
4498
  body?: never;
4270
4499
  path: {
4271
4500
  /**
4272
4501
  * Run id.
4273
4502
  */
4274
4503
  id: string;
4275
- /**
4276
- * Expected artifact file name or slash-delimited path, as returned by `GET /runs/{id}/feedback/expected`.
4277
- */
4278
- filename: string;
4279
4504
  };
4280
4505
  query?: never;
4281
- url: '/api/v1/runs/{id}/feedback/expected/{filename}';
4506
+ url: '/api/v1/runs/{id}/reviews/expected';
4282
4507
  };
4283
4508
 
4284
- export type RunsFeedbackExpectedFileDeleteErrors = {
4509
+ export type RunsReviewsExpectedGetErrors = {
4285
4510
  /**
4286
4511
  * Validation error. Request shape did not match the spec.
4287
4512
  */
@@ -4312,34 +4537,30 @@ export type RunsFeedbackExpectedFileDeleteErrors = {
4312
4537
  500: ApiErrorEnvelope;
4313
4538
  };
4314
4539
 
4315
- export type RunsFeedbackExpectedFileDeleteError = RunsFeedbackExpectedFileDeleteErrors[keyof RunsFeedbackExpectedFileDeleteErrors];
4540
+ export type RunsReviewsExpectedGetError = RunsReviewsExpectedGetErrors[keyof RunsReviewsExpectedGetErrors];
4316
4541
 
4317
- export type RunsFeedbackExpectedFileDeleteResponses = {
4542
+ export type RunsReviewsExpectedGetResponses = {
4318
4543
  /**
4319
- * Expected file deleted; no response body.
4544
+ * Corrected artifact files.
4320
4545
  */
4321
- 204: void;
4546
+ 200: RunReviewExpectedArtifacts;
4322
4547
  };
4323
4548
 
4324
- export type RunsFeedbackExpectedFileDeleteResponse = RunsFeedbackExpectedFileDeleteResponses[keyof RunsFeedbackExpectedFileDeleteResponses];
4549
+ export type RunsReviewsExpectedGetResponse = RunsReviewsExpectedGetResponses[keyof RunsReviewsExpectedGetResponses];
4325
4550
 
4326
- export type RunsFeedbackExpectedFileGetData = {
4327
- body?: never;
4551
+ export type RunsReviewsExpectedCreateData = {
4552
+ body: RunReviewExpectedFileCopyRequest | RunReviewExpectedFileUploadRequest;
4328
4553
  path: {
4329
4554
  /**
4330
4555
  * Run id.
4331
4556
  */
4332
4557
  id: string;
4333
- /**
4334
- * Expected artifact file name or slash-delimited path, as returned by `GET /runs/{id}/feedback/expected`.
4335
- */
4336
- filename: string;
4337
4558
  };
4338
4559
  query?: never;
4339
- url: '/api/v1/runs/{id}/feedback/expected/{filename}';
4560
+ url: '/api/v1/runs/{id}/reviews/expected';
4340
4561
  };
4341
4562
 
4342
- export type RunsFeedbackExpectedFileGetErrors = {
4563
+ export type RunsReviewsExpectedCreateErrors = {
4343
4564
  /**
4344
4565
  * Validation error. Request shape did not match the spec.
4345
4566
  */
@@ -4370,34 +4591,34 @@ export type RunsFeedbackExpectedFileGetErrors = {
4370
4591
  500: ApiErrorEnvelope;
4371
4592
  };
4372
4593
 
4373
- export type RunsFeedbackExpectedFileGetError = RunsFeedbackExpectedFileGetErrors[keyof RunsFeedbackExpectedFileGetErrors];
4594
+ export type RunsReviewsExpectedCreateError = RunsReviewsExpectedCreateErrors[keyof RunsReviewsExpectedCreateErrors];
4374
4595
 
4375
- export type RunsFeedbackExpectedFileGetResponses = {
4596
+ export type RunsReviewsExpectedCreateResponses = {
4376
4597
  /**
4377
- * Expected file bytes.
4598
+ * Corrected file created.
4378
4599
  */
4379
- 200: Blob | File;
4600
+ 201: RunReviewExpectedFileMutationResponse;
4380
4601
  };
4381
4602
 
4382
- export type RunsFeedbackExpectedFileGetResponse = RunsFeedbackExpectedFileGetResponses[keyof RunsFeedbackExpectedFileGetResponses];
4603
+ export type RunsReviewsExpectedCreateResponse = RunsReviewsExpectedCreateResponses[keyof RunsReviewsExpectedCreateResponses];
4383
4604
 
4384
- export type RunsFeedbackExpectedFileUpdateData = {
4385
- body: RunExpectedFileUpdateRequest;
4605
+ export type RunsReviewsExpectedFileDeleteData = {
4606
+ body?: never;
4386
4607
  path: {
4387
4608
  /**
4388
4609
  * Run id.
4389
4610
  */
4390
4611
  id: string;
4391
4612
  /**
4392
- * Expected artifact file name or slash-delimited path, as returned by `GET /runs/{id}/feedback/expected`.
4613
+ * Corrected artifact file name or slash-delimited path, as returned by `GET /runs/{id}/reviews/expected`.
4393
4614
  */
4394
4615
  filename: string;
4395
4616
  };
4396
4617
  query?: never;
4397
- url: '/api/v1/runs/{id}/feedback/expected/{filename}';
4618
+ url: '/api/v1/runs/{id}/reviews/expected/{filename}';
4398
4619
  };
4399
4620
 
4400
- export type RunsFeedbackExpectedFileUpdateErrors = {
4621
+ export type RunsReviewsExpectedFileDeleteErrors = {
4401
4622
  /**
4402
4623
  * Validation error. Request shape did not match the spec.
4403
4624
  */
@@ -4428,30 +4649,34 @@ export type RunsFeedbackExpectedFileUpdateErrors = {
4428
4649
  500: ApiErrorEnvelope;
4429
4650
  };
4430
4651
 
4431
- export type RunsFeedbackExpectedFileUpdateError = RunsFeedbackExpectedFileUpdateErrors[keyof RunsFeedbackExpectedFileUpdateErrors];
4652
+ export type RunsReviewsExpectedFileDeleteError = RunsReviewsExpectedFileDeleteErrors[keyof RunsReviewsExpectedFileDeleteErrors];
4432
4653
 
4433
- export type RunsFeedbackExpectedFileUpdateResponses = {
4654
+ export type RunsReviewsExpectedFileDeleteResponses = {
4434
4655
  /**
4435
- * Renamed expected file.
4656
+ * Corrected file deleted; no response body.
4436
4657
  */
4437
- 200: RunExpectedFileUpdateResponse;
4658
+ 204: void;
4438
4659
  };
4439
4660
 
4440
- export type RunsFeedbackExpectedFileUpdateResponse = RunsFeedbackExpectedFileUpdateResponses[keyof RunsFeedbackExpectedFileUpdateResponses];
4661
+ export type RunsReviewsExpectedFileDeleteResponse = RunsReviewsExpectedFileDeleteResponses[keyof RunsReviewsExpectedFileDeleteResponses];
4441
4662
 
4442
- export type RunsPromoteData = {
4443
- body: PromoteRunRequest;
4663
+ export type RunsReviewsExpectedFileGetData = {
4664
+ body?: never;
4444
4665
  path: {
4445
4666
  /**
4446
4667
  * Run id.
4447
4668
  */
4448
4669
  id: string;
4670
+ /**
4671
+ * Corrected artifact file name or slash-delimited path, as returned by `GET /runs/{id}/reviews/expected`.
4672
+ */
4673
+ filename: string;
4449
4674
  };
4450
4675
  query?: never;
4451
- url: '/api/v1/runs/{id}/promote';
4676
+ url: '/api/v1/runs/{id}/reviews/expected/{filename}';
4452
4677
  };
4453
4678
 
4454
- export type RunsPromoteErrors = {
4679
+ export type RunsReviewsExpectedFileGetErrors = {
4455
4680
  /**
4456
4681
  * Validation error. Request shape did not match the spec.
4457
4682
  */
@@ -4482,39 +4707,34 @@ export type RunsPromoteErrors = {
4482
4707
  500: ApiErrorEnvelope;
4483
4708
  };
4484
4709
 
4485
- export type RunsPromoteError = RunsPromoteErrors[keyof RunsPromoteErrors];
4710
+ export type RunsReviewsExpectedFileGetError = RunsReviewsExpectedFileGetErrors[keyof RunsReviewsExpectedFileGetErrors];
4486
4711
 
4487
- export type RunsPromoteResponses = {
4712
+ export type RunsReviewsExpectedFileGetResponses = {
4488
4713
  /**
4489
- * Created or updated a dataset example from the run
4714
+ * Corrected file bytes.
4490
4715
  */
4491
- 200: PromoteRunResponse;
4716
+ 200: Blob | File;
4492
4717
  };
4493
4718
 
4494
- export type RunsPromoteResponse = RunsPromoteResponses[keyof RunsPromoteResponses];
4719
+ export type RunsReviewsExpectedFileGetResponse = RunsReviewsExpectedFileGetResponses[keyof RunsReviewsExpectedFileGetResponses];
4495
4720
 
4496
- export type RunsRerunData = {
4497
- body?: never;
4721
+ export type RunsReviewsExpectedFileUpdateData = {
4722
+ body: RunReviewExpectedFileUpdateRequest;
4498
4723
  path: {
4499
4724
  /**
4500
- * Source run id to retry.
4725
+ * Run id.
4501
4726
  */
4502
4727
  id: string;
4503
- };
4504
- query?: {
4505
- /**
4506
- * Version for the new run. `original` pins the source run. Defaults to latest.
4507
- */
4508
- version?: string;
4509
4728
  /**
4510
- * Seconds to wait before returning (max 600). Omit for async.
4729
+ * Corrected artifact file name or slash-delimited path, as returned by `GET /runs/{id}/reviews/expected`.
4511
4730
  */
4512
- wait_for_completion?: number;
4731
+ filename: string;
4513
4732
  };
4514
- url: '/api/v1/runs/{id}/rerun';
4733
+ query?: never;
4734
+ url: '/api/v1/runs/{id}/reviews/expected/{filename}';
4515
4735
  };
4516
4736
 
4517
- export type RunsRerunErrors = {
4737
+ export type RunsReviewsExpectedFileUpdateErrors = {
4518
4738
  /**
4519
4739
  * Validation error. Request shape did not match the spec.
4520
4740
  */
@@ -4545,24 +4765,16 @@ export type RunsRerunErrors = {
4545
4765
  500: ApiErrorEnvelope;
4546
4766
  };
4547
4767
 
4548
- export type RunsRerunError = RunsRerunErrors[keyof RunsRerunErrors];
4768
+ export type RunsReviewsExpectedFileUpdateError = RunsReviewsExpectedFileUpdateErrors[keyof RunsReviewsExpectedFileUpdateErrors];
4549
4769
 
4550
- export type RunsRerunResponses = {
4770
+ export type RunsReviewsExpectedFileUpdateResponses = {
4551
4771
  /**
4552
- * Rerun completed while waiting
4772
+ * Renamed corrected file.
4553
4773
  */
4554
- 200: RunStartResponse;
4555
- /**
4556
- * Rerun accepted (async)
4557
- */
4558
- 201: RunStartResponse;
4559
- /**
4560
- * Wait expired with a non-terminal status — poll GET /api/v1/runs/:id
4561
- */
4562
- 202: RunStartResponse;
4774
+ 200: RunReviewExpectedFileUpdateResponse;
4563
4775
  };
4564
4776
 
4565
- export type RunsRerunResponse = RunsRerunResponses[keyof RunsRerunResponses];
4777
+ export type RunsReviewsExpectedFileUpdateResponse = RunsReviewsExpectedFileUpdateResponses[keyof RunsReviewsExpectedFileUpdateResponses];
4566
4778
 
4567
4779
  export type RunsScoresListData = {
4568
4780
  body?: never;