@coval/sdk 0.4.4 → 0.4.6

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 (141) hide show
  1. package/dist/CovalClient.d.ts +3 -2
  2. package/dist/CovalClient.d.ts.map +1 -1
  3. package/dist/CovalClient.js +4 -1
  4. package/dist/CovalClient.js.map +1 -1
  5. package/dist/generated/apis/MetricsApi.d.ts +4 -4
  6. package/dist/generated/apis/MetricsApi.js +2 -2
  7. package/dist/generated/apis/RunsApi.d.ts +11 -10
  8. package/dist/generated/apis/RunsApi.d.ts.map +1 -1
  9. package/dist/generated/apis/RunsApi.js +4 -3
  10. package/dist/generated/apis/RunsApi.js.map +1 -1
  11. package/dist/generated/apis/SimulationsApi.d.ts +4 -4
  12. package/dist/generated/apis/SimulationsApi.js +2 -2
  13. package/dist/generated/apis/WorkspacesApi.d.ts +256 -0
  14. package/dist/generated/apis/WorkspacesApi.d.ts.map +1 -0
  15. package/dist/generated/apis/WorkspacesApi.js +254 -0
  16. package/dist/generated/apis/WorkspacesApi.js.map +1 -0
  17. package/dist/generated/apis/index.d.ts +1 -0
  18. package/dist/generated/apis/index.d.ts.map +1 -1
  19. package/dist/generated/apis/index.js +1 -0
  20. package/dist/generated/apis/index.js.map +1 -1
  21. package/dist/generated/models/CovalAgentsAPICreateAgentRequest.d.ts +5 -6
  22. package/dist/generated/models/CovalAgentsAPICreateAgentRequest.d.ts.map +1 -1
  23. package/dist/generated/models/CovalAgentsAPICreateAgentRequest.js.map +1 -1
  24. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.d.ts +62 -3
  25. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.d.ts.map +1 -1
  26. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.js +26 -0
  27. package/dist/generated/models/CovalMetricsAPICreateMetricRequest.js.map +1 -1
  28. package/dist/generated/models/CovalMetricsAPIMetricResource.d.ts +51 -3
  29. package/dist/generated/models/CovalMetricsAPIMetricResource.d.ts.map +1 -1
  30. package/dist/generated/models/CovalMetricsAPIMetricResource.js +26 -0
  31. package/dist/generated/models/CovalMetricsAPIMetricResource.js.map +1 -1
  32. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts +3 -0
  33. package/dist/generated/models/CovalMetricsAPIMetricType.d.ts.map +1 -1
  34. package/dist/generated/models/CovalMetricsAPIMetricType.js +4 -1
  35. package/dist/generated/models/CovalMetricsAPIMetricType.js.map +1 -1
  36. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.d.ts +52 -0
  37. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.d.ts.map +1 -0
  38. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.js +53 -0
  39. package/dist/generated/models/CovalMetricsAPITestMetricBatchItemResult.js.map +1 -0
  40. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.d.ts +34 -0
  41. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.d.ts.map +1 -0
  42. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.js +52 -0
  43. package/dist/generated/models/CovalMetricsAPITestMetricItemStatus.js.map +1 -0
  44. package/dist/generated/models/CovalMetricsAPITestMetricRequest.d.ts +10 -3
  45. package/dist/generated/models/CovalMetricsAPITestMetricRequest.d.ts.map +1 -1
  46. package/dist/generated/models/CovalMetricsAPITestMetricRequest.js +3 -3
  47. package/dist/generated/models/CovalMetricsAPITestMetricRequest.js.map +1 -1
  48. package/dist/generated/models/CovalMetricsAPITestMetricResponse.d.ts +10 -2
  49. package/dist/generated/models/CovalMetricsAPITestMetricResponse.d.ts.map +1 -1
  50. package/dist/generated/models/CovalMetricsAPITestMetricResponse.js +5 -0
  51. package/dist/generated/models/CovalMetricsAPITestMetricResponse.js.map +1 -1
  52. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.d.ts +51 -1
  53. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.d.ts.map +1 -1
  54. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.js +26 -0
  55. package/dist/generated/models/CovalMetricsAPIUpdateMetricRequest.js.map +1 -1
  56. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.d.ts +6 -0
  57. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.d.ts.map +1 -1
  58. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.js +2 -0
  59. package/dist/generated/models/CovalReviewsAPICreateReviewProjectRequest.js.map +1 -1
  60. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.d.ts +6 -0
  61. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.d.ts.map +1 -1
  62. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.js +2 -0
  63. package/dist/generated/models/CovalReviewsAPIReviewProjectResource.js.map +1 -1
  64. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.d.ts +20 -0
  65. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.d.ts.map +1 -1
  66. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.js +11 -0
  67. package/dist/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.js.map +1 -1
  68. package/dist/generated/models/CovalRunsAPIMonitoringRunTagUpdateResource.d.ts +45 -0
  69. package/dist/generated/models/CovalRunsAPIMonitoringRunTagUpdateResource.d.ts.map +1 -0
  70. package/dist/generated/models/CovalRunsAPIMonitoringRunTagUpdateResource.js +52 -0
  71. package/dist/generated/models/CovalRunsAPIMonitoringRunTagUpdateResource.js.map +1 -0
  72. package/dist/generated/models/CovalWorkspacesAPICreateWorkspaceRequest.d.ts +39 -0
  73. package/dist/generated/models/CovalWorkspacesAPICreateWorkspaceRequest.d.ts.map +1 -0
  74. package/dist/generated/models/CovalWorkspacesAPICreateWorkspaceRequest.js +48 -0
  75. package/dist/generated/models/CovalWorkspacesAPICreateWorkspaceRequest.js.map +1 -0
  76. package/dist/generated/models/CovalWorkspacesAPIErrorResponse.d.ts +34 -0
  77. package/dist/generated/models/CovalWorkspacesAPIErrorResponse.d.ts.map +1 -0
  78. package/dist/generated/models/CovalWorkspacesAPIErrorResponse.js +45 -0
  79. package/dist/generated/models/CovalWorkspacesAPIErrorResponse.js.map +1 -0
  80. package/dist/generated/models/CovalWorkspacesAPIErrorResponseError.d.ts +58 -0
  81. package/dist/generated/models/CovalWorkspacesAPIErrorResponseError.d.ts.map +1 -0
  82. package/dist/generated/models/CovalWorkspacesAPIErrorResponseError.js +64 -0
  83. package/dist/generated/models/CovalWorkspacesAPIErrorResponseError.js.map +1 -0
  84. package/dist/generated/models/CovalWorkspacesAPIListWorkspacesResponse.d.ts +34 -0
  85. package/dist/generated/models/CovalWorkspacesAPIListWorkspacesResponse.d.ts.map +1 -0
  86. package/dist/generated/models/CovalWorkspacesAPIListWorkspacesResponse.js +45 -0
  87. package/dist/generated/models/CovalWorkspacesAPIListWorkspacesResponse.js.map +1 -0
  88. package/dist/generated/models/CovalWorkspacesAPIUpdateWorkspaceRequest.d.ts +33 -0
  89. package/dist/generated/models/CovalWorkspacesAPIUpdateWorkspaceRequest.d.ts.map +1 -0
  90. package/dist/generated/models/CovalWorkspacesAPIUpdateWorkspaceRequest.js +44 -0
  91. package/dist/generated/models/CovalWorkspacesAPIUpdateWorkspaceRequest.js.map +1 -0
  92. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResource.d.ts +86 -0
  93. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResource.d.ts.map +1 -0
  94. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResource.js +83 -0
  95. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResource.js.map +1 -0
  96. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResponse.d.ts +34 -0
  97. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResponse.d.ts.map +1 -0
  98. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResponse.js +45 -0
  99. package/dist/generated/models/CovalWorkspacesAPIWorkspaceResponse.js.map +1 -0
  100. package/dist/generated/models/UpdateRun200Response.d.ts +34 -0
  101. package/dist/generated/models/UpdateRun200Response.d.ts.map +1 -0
  102. package/dist/generated/models/UpdateRun200Response.js +45 -0
  103. package/dist/generated/models/UpdateRun200Response.js.map +1 -0
  104. package/dist/generated/models/UpdateRun200ResponseRun.d.ts +24 -0
  105. package/dist/generated/models/UpdateRun200ResponseRun.d.ts.map +1 -0
  106. package/dist/generated/models/UpdateRun200ResponseRun.js +52 -0
  107. package/dist/generated/models/UpdateRun200ResponseRun.js.map +1 -0
  108. package/dist/generated/models/index.d.ts +12 -0
  109. package/dist/generated/models/index.d.ts.map +1 -1
  110. package/dist/generated/models/index.js +12 -0
  111. package/dist/generated/models/index.js.map +1 -1
  112. package/package.json +1 -1
  113. package/src/CovalClient.ts +4 -0
  114. package/src/generated/apis/MetricsApi.ts +4 -4
  115. package/src/generated/apis/RunsApi.ts +16 -11
  116. package/src/generated/apis/SimulationsApi.ts +4 -4
  117. package/src/generated/apis/WorkspacesApi.ts +531 -0
  118. package/src/generated/apis/index.ts +1 -0
  119. package/src/generated/models/CovalAgentsAPICreateAgentRequest.ts +5 -6
  120. package/src/generated/models/CovalMetricsAPICreateMetricRequest.ts +74 -3
  121. package/src/generated/models/CovalMetricsAPIMetricResource.ts +63 -3
  122. package/src/generated/models/CovalMetricsAPIMetricType.ts +4 -1
  123. package/src/generated/models/CovalMetricsAPITestMetricBatchItemResult.ts +101 -0
  124. package/src/generated/models/CovalMetricsAPITestMetricItemStatus.ts +61 -0
  125. package/src/generated/models/CovalMetricsAPITestMetricRequest.ts +13 -5
  126. package/src/generated/models/CovalMetricsAPITestMetricResponse.ts +20 -2
  127. package/src/generated/models/CovalMetricsAPIUpdateMetricRequest.ts +63 -1
  128. package/src/generated/models/CovalReviewsAPICreateReviewProjectRequest.ts +8 -0
  129. package/src/generated/models/CovalReviewsAPIReviewProjectResource.ts +8 -0
  130. package/src/generated/models/CovalReviewsAPIUpdateReviewProjectRequest.ts +27 -0
  131. package/src/generated/models/CovalRunsAPIMonitoringRunTagUpdateResource.ts +84 -0
  132. package/src/generated/models/CovalWorkspacesAPICreateWorkspaceRequest.ts +75 -0
  133. package/src/generated/models/CovalWorkspacesAPIErrorResponse.ts +74 -0
  134. package/src/generated/models/CovalWorkspacesAPIErrorResponseError.ts +107 -0
  135. package/src/generated/models/CovalWorkspacesAPIListWorkspacesResponse.ts +74 -0
  136. package/src/generated/models/CovalWorkspacesAPIUpdateWorkspaceRequest.ts +66 -0
  137. package/src/generated/models/CovalWorkspacesAPIWorkspaceResource.ts +141 -0
  138. package/src/generated/models/CovalWorkspacesAPIWorkspaceResponse.ts +74 -0
  139. package/src/generated/models/UpdateRun200Response.ts +74 -0
  140. package/src/generated/models/UpdateRun200ResponseRun.ts +76 -0
  141. package/src/generated/models/index.ts +12 -0
@@ -137,10 +137,8 @@ export interface CovalAgentsAPICreateAgentRequest {
137
137
  * *Optional:*
138
138
  * - `generate_token_headers` - Token-request headers as a JSON object or encoded object string
139
139
  * - `token_request_payload` - Fields merged into the token request as a JSON object or encoded object string
140
- * - `sandbox_id` - Convenience value for an `X-Sandbox-ID` token-request header
141
140
  * - `content_type` - Convenience value for the token-request `Content-Type` header
142
141
  * - `livekit_agent_name` - Agent dispatch name
143
- * - `livekit_agent_metadata` - Agent dispatch metadata
144
142
  *
145
143
  * **For DAILY (Pipecat Cloud) agents:**
146
144
  *
@@ -159,7 +157,7 @@ export interface CovalAgentsAPICreateAgentRequest {
159
157
  * *Connection mode:*
160
158
  * - `connection_mode` - `direct` (default), `http_first`, or `twiml_webhook`.
161
159
  * - `http_url`, `http_method`, `http_request_body`, `http_headers`, `websocket_url_response_path` - HTTP-first setup fields when `connection_mode=http_first`.
162
- * - `voice_url`, `voice_http_method`, `voice_http_headers`, `voice_form_fields`, `twilio_account_sid`, `twilio_from_number`, `twilio_to_number` - TwiML voice-webhook fields when `connection_mode=twiml_webhook`. This mode is currently API-configured; it is not a connection-mode option in the agent editor.
160
+ * - `voice_url`, `voice_http_method`, `voice_http_headers`, `voice_form_fields`, `twilio_account_sid`, `twilio_from_number`, `twilio_to_number` - TwiML voice-webhook fields when `connection_mode=twiml_webhook`.
163
161
  *
164
162
  * *Authentication (optional):*
165
163
  * - `authorization_header` - Auth header sent during the WebSocket handshake. Supports:
@@ -188,9 +186,10 @@ export interface CovalAgentsAPICreateAgentRequest {
188
186
  * - `send_media_template` - Outbound template for image attachments. Must contain `{{media_data}}`; may also include `{{media_name}}` and `{{mime_type}}`. Set exactly to `{{media_data}}` to send raw bytes, otherwise Coval base64-encodes the image into the JSON template.
189
187
  * - `send_dtmf_template` - Outbound template for keypad digits. Must contain `{{digit}}`.
190
188
  *
191
- * *WebSocket placeholders:*
192
- * - `{{simulation_output_id}}` (legacy alias `{{simulation_id}}`) resolves only in `initialization_json`.
193
- * - `{{stream_sid}}` and `{{call_sid}}` resolve in `initialization_json` and the audio, media, and DTMF send templates. They are generated per simulation in Twilio SID format and are not Coval simulation output IDs.
189
+ * *Per-simulation placeholders:*
190
+ * - Connection setup fields support `{{run_id}}`, `{{simulation_output_id}}` (legacy alias `{{simulation_id}}`), `{{stream_sid}}`, `{{call_sid}}`, `{{agent.*}}`, `{{test_case.*}}`, `{{sim_wrapper.*}}`, and `{{run_metadata.*}}`.
191
+ * - Connection setup fields are `initialization_json` in direct and HTTP-first modes; `custom_headers` in every mode; `http_request_body` and `http_headers` in HTTP-first mode; and `voice_form_fields` and `voice_http_headers` in TwiML webhook mode.
192
+ * - `{{stream_sid}}` and `{{call_sid}}` also resolve in `send_audio_template`, `send_media_template`, and `send_dtmf_template`. Coval generates fresh Twilio-shaped values for every simulation.
194
193
  *
195
194
  * *Non-audio event capture (optional):*
196
195
  * - `non_audio_event_message_types` - List of message-type values to emit as `WebsocketEventFrame`s instead of dropping. Each match carries the message type, optional `event` name, and original payload. Useful for cart updates, transcript fragments, or session telemetry.
@@ -131,11 +131,52 @@ export interface CovalMetricsAPICreateMetricRequest {
131
131
  * @memberof CovalMetricsAPICreateMetricRequest
132
132
  */
133
133
  sql_query?: string;
134
+ /**
135
+ * Where the metric reads its criteria from. Required for METRIC_COMPOSITE_EVALUATION.
136
+ * `test_case` reads a field off each test case (most commonly its expected behaviors),
137
+ * `test_case_attribute` reads from the test case's attributes, and `metric_metadata`
138
+ * uses the fixed list in `criteria`.
139
+ *
140
+ * @type {CovalMetricsAPICreateMetricRequestCriteriaSourceEnum}
141
+ * @memberof CovalMetricsAPICreateMetricRequest
142
+ */
143
+ criteria_source?: CovalMetricsAPICreateMetricRequestCriteriaSourceEnum;
144
+ /**
145
+ * Path to the criteria on the source. Required when `criteria_source` is `test_case`
146
+ * or `test_case_attribute`.
147
+ *
148
+ * @type {string}
149
+ * @memberof CovalMetricsAPICreateMetricRequest
150
+ */
151
+ criteria_path?: string;
152
+ /**
153
+ * Literal list of criteria. Required when `criteria_source` is `metric_metadata`.
154
+ * @type {Array<string>}
155
+ * @memberof CovalMetricsAPICreateMetricRequest
156
+ */
157
+ criteria?: Array<string>;
158
+ /**
159
+ * How per-criterion verdicts aggregate into the metric's value. Each criterion is judged
160
+ * independently as met or not met; `percentage_of_criteria_met` scores the fraction met
161
+ * among the criteria the judge could evaluate.
162
+ *
163
+ * @type {CovalMetricsAPICreateMetricRequestReportingMethodEnum}
164
+ * @memberof CovalMetricsAPICreateMetricRequest
165
+ */
166
+ reporting_method?: CovalMetricsAPICreateMetricRequestReportingMethodEnum;
167
+ /**
168
+ * Custom prompt template used to evaluate each criterion. Include a `{criterion}`
169
+ * placeholder; if it is omitted the criterion is appended to the prompt.
170
+ *
171
+ * @type {string}
172
+ * @memberof CovalMetricsAPICreateMetricRequest
173
+ */
174
+ base_prompt_template?: string;
134
175
  /**
135
176
  * Inject OTel trace context into the LLM judge prompt during evaluation.
136
- * Supported for LLM judge metric types only (`METRIC_LLM_BINARY`, `METRIC_CATEGORICAL`,
137
- * `METRIC_NUMERICAL_LLM_JUDGE`, `METRIC_AUDIO_LLM_BINARY`, `METRIC_AUDIO_LLM_CATEGORICAL`,
138
- * `METRIC_AUDIO_LLM_NUMERICAL`).
177
+ * Supported for LLM judge metric types and `METRIC_COMPOSITE_EVALUATION` (`METRIC_LLM_BINARY`,
178
+ * `METRIC_CATEGORICAL`, `METRIC_NUMERICAL_LLM_JUDGE`, `METRIC_AUDIO_LLM_BINARY`,
179
+ * `METRIC_AUDIO_LLM_CATEGORICAL`, `METRIC_AUDIO_LLM_NUMERICAL`, `METRIC_COMPOSITE_EVALUATION`).
139
180
  *
140
181
  * @type {boolean}
141
182
  * @memberof CovalMetricsAPICreateMetricRequest
@@ -176,6 +217,26 @@ export const CovalMetricsAPICreateMetricRequestRoleEnum = {
176
217
  } as const;
177
218
  export type CovalMetricsAPICreateMetricRequestRoleEnum = typeof CovalMetricsAPICreateMetricRequestRoleEnum[keyof typeof CovalMetricsAPICreateMetricRequestRoleEnum];
178
219
 
220
+ /**
221
+ * @export
222
+ */
223
+ export const CovalMetricsAPICreateMetricRequestCriteriaSourceEnum = {
224
+ TestCase: 'test_case',
225
+ TestCaseAttribute: 'test_case_attribute',
226
+ MetricMetadata: 'metric_metadata'
227
+ } as const;
228
+ export type CovalMetricsAPICreateMetricRequestCriteriaSourceEnum = typeof CovalMetricsAPICreateMetricRequestCriteriaSourceEnum[keyof typeof CovalMetricsAPICreateMetricRequestCriteriaSourceEnum];
229
+
230
+ /**
231
+ * @export
232
+ */
233
+ export const CovalMetricsAPICreateMetricRequestReportingMethodEnum = {
234
+ PercentageOfCriteriaMet: 'percentage_of_criteria_met',
235
+ CountOfCriteriaMet: 'count_of_criteria_met',
236
+ AllCriteriaMet: 'all_criteria_met'
237
+ } as const;
238
+ export type CovalMetricsAPICreateMetricRequestReportingMethodEnum = typeof CovalMetricsAPICreateMetricRequestReportingMethodEnum[keyof typeof CovalMetricsAPICreateMetricRequestReportingMethodEnum];
239
+
179
240
 
180
241
  /**
181
242
  * Check if a given object implements the CovalMetricsAPICreateMetricRequest interface.
@@ -210,6 +271,11 @@ export function CovalMetricsAPICreateMetricRequestFromJSONTyped(json: any, ignor
210
271
  'role': json['role'] == null ? undefined : json['role'],
211
272
  'min_pause_duration_seconds': json['min_pause_duration_seconds'] == null ? undefined : json['min_pause_duration_seconds'],
212
273
  'sql_query': json['sql_query'] == null ? undefined : json['sql_query'],
274
+ 'criteria_source': json['criteria_source'] == null ? undefined : json['criteria_source'],
275
+ 'criteria_path': json['criteria_path'] == null ? undefined : json['criteria_path'],
276
+ 'criteria': json['criteria'] == null ? undefined : json['criteria'],
277
+ 'reporting_method': json['reporting_method'] == null ? undefined : json['reporting_method'],
278
+ 'base_prompt_template': json['base_prompt_template'] == null ? undefined : json['base_prompt_template'],
213
279
  'include_traces': json['include_traces'] == null ? undefined : json['include_traces'],
214
280
  'runtime_config': json['runtime_config'] == null ? undefined : CovalMetricsAPIMetricRuntimeConfigFromJSON(json['runtime_config']),
215
281
  'target_condition': json['target_condition'] == null ? undefined : CovalMetricsAPITargetConditionFromJSON(json['target_condition']),
@@ -241,6 +307,11 @@ export function CovalMetricsAPICreateMetricRequestToJSONTyped(value?: CovalMetri
241
307
  'role': value['role'],
242
308
  'min_pause_duration_seconds': value['min_pause_duration_seconds'],
243
309
  'sql_query': value['sql_query'],
310
+ 'criteria_source': value['criteria_source'],
311
+ 'criteria_path': value['criteria_path'],
312
+ 'criteria': value['criteria'],
313
+ 'reporting_method': value['reporting_method'],
314
+ 'base_prompt_template': value['base_prompt_template'],
244
315
  'include_traces': value['include_traces'],
245
316
  'runtime_config': CovalMetricsAPIMetricRuntimeConfigToJSON(value['runtime_config']),
246
317
  'target_condition': CovalMetricsAPITargetConditionToJSON(value['target_condition']),
@@ -145,11 +145,41 @@ export interface CovalMetricsAPIMetricResource {
145
145
  * @memberof CovalMetricsAPIMetricResource
146
146
  */
147
147
  sql_query?: string | null;
148
+ /**
149
+ * Where a METRIC_COMPOSITE_EVALUATION metric reads its criteria from.
150
+ * @type {CovalMetricsAPIMetricResourceCriteriaSourceEnum}
151
+ * @memberof CovalMetricsAPIMetricResource
152
+ */
153
+ criteria_source?: CovalMetricsAPIMetricResourceCriteriaSourceEnum | null;
154
+ /**
155
+ * Path to the criteria on the source, when `criteria_source` is `test_case` or `test_case_attribute`.
156
+ * @type {string}
157
+ * @memberof CovalMetricsAPIMetricResource
158
+ */
159
+ criteria_path?: string | null;
160
+ /**
161
+ * Literal criteria, when `criteria_source` is `metric_metadata`.
162
+ * @type {Array<string>}
163
+ * @memberof CovalMetricsAPIMetricResource
164
+ */
165
+ criteria?: Array<string> | null;
166
+ /**
167
+ * How the per-criterion verdicts are aggregated into the metric's value.
168
+ * @type {CovalMetricsAPIMetricResourceReportingMethodEnum}
169
+ * @memberof CovalMetricsAPIMetricResource
170
+ */
171
+ reporting_method?: CovalMetricsAPIMetricResourceReportingMethodEnum | null;
172
+ /**
173
+ * Custom prompt template used to evaluate each criterion.
174
+ * @type {string}
175
+ * @memberof CovalMetricsAPIMetricResource
176
+ */
177
+ base_prompt_template?: string | null;
148
178
  /**
149
179
  * Whether OTel trace context is injected into the LLM judge prompt during evaluation.
150
- * Supported for LLM judge metric types only (`METRIC_LLM_BINARY`, `METRIC_CATEGORICAL`,
151
- * `METRIC_NUMERICAL_LLM_JUDGE`, `METRIC_AUDIO_LLM_BINARY`, `METRIC_AUDIO_LLM_CATEGORICAL`,
152
- * `METRIC_AUDIO_LLM_NUMERICAL`).
180
+ * Supported for LLM judge metric types and `METRIC_COMPOSITE_EVALUATION` (`METRIC_LLM_BINARY`,
181
+ * `METRIC_CATEGORICAL`, `METRIC_NUMERICAL_LLM_JUDGE`, `METRIC_AUDIO_LLM_BINARY`,
182
+ * `METRIC_AUDIO_LLM_CATEGORICAL`, `METRIC_AUDIO_LLM_NUMERICAL`, `METRIC_COMPOSITE_EVALUATION`).
153
183
  *
154
184
  * @type {boolean}
155
185
  * @memberof CovalMetricsAPIMetricResource
@@ -213,6 +243,26 @@ export const CovalMetricsAPIMetricResourceRoleEnum = {
213
243
  } as const;
214
244
  export type CovalMetricsAPIMetricResourceRoleEnum = typeof CovalMetricsAPIMetricResourceRoleEnum[keyof typeof CovalMetricsAPIMetricResourceRoleEnum];
215
245
 
246
+ /**
247
+ * @export
248
+ */
249
+ export const CovalMetricsAPIMetricResourceCriteriaSourceEnum = {
250
+ TestCase: 'test_case',
251
+ TestCaseAttribute: 'test_case_attribute',
252
+ MetricMetadata: 'metric_metadata'
253
+ } as const;
254
+ export type CovalMetricsAPIMetricResourceCriteriaSourceEnum = typeof CovalMetricsAPIMetricResourceCriteriaSourceEnum[keyof typeof CovalMetricsAPIMetricResourceCriteriaSourceEnum];
255
+
256
+ /**
257
+ * @export
258
+ */
259
+ export const CovalMetricsAPIMetricResourceReportingMethodEnum = {
260
+ PercentageOfCriteriaMet: 'percentage_of_criteria_met',
261
+ CountOfCriteriaMet: 'count_of_criteria_met',
262
+ AllCriteriaMet: 'all_criteria_met'
263
+ } as const;
264
+ export type CovalMetricsAPIMetricResourceReportingMethodEnum = typeof CovalMetricsAPIMetricResourceReportingMethodEnum[keyof typeof CovalMetricsAPIMetricResourceReportingMethodEnum];
265
+
216
266
 
217
267
  /**
218
268
  * Check if a given object implements the CovalMetricsAPIMetricResource interface.
@@ -246,6 +296,11 @@ export function CovalMetricsAPIMetricResourceFromJSONTyped(json: any, ignoreDisc
246
296
  'role': json['role'] == null ? undefined : json['role'],
247
297
  'min_pause_duration_seconds': json['min_pause_duration_seconds'] == null ? undefined : json['min_pause_duration_seconds'],
248
298
  'sql_query': json['sql_query'] == null ? undefined : json['sql_query'],
299
+ 'criteria_source': json['criteria_source'] == null ? undefined : json['criteria_source'],
300
+ 'criteria_path': json['criteria_path'] == null ? undefined : json['criteria_path'],
301
+ 'criteria': json['criteria'] == null ? undefined : json['criteria'],
302
+ 'reporting_method': json['reporting_method'] == null ? undefined : json['reporting_method'],
303
+ 'base_prompt_template': json['base_prompt_template'] == null ? undefined : json['base_prompt_template'],
249
304
  'include_traces': json['include_traces'] == null ? undefined : json['include_traces'],
250
305
  'runtime_config': json['runtime_config'] == null ? undefined : CovalMetricsAPIMetricRuntimeConfigFromJSON(json['runtime_config']),
251
306
  'target_condition': json['target_condition'] == null ? undefined : CovalMetricsAPITargetConditionFromJSON(json['target_condition']),
@@ -283,6 +338,11 @@ export function CovalMetricsAPIMetricResourceToJSONTyped(value?: CovalMetricsAPI
283
338
  'role': value['role'],
284
339
  'min_pause_duration_seconds': value['min_pause_duration_seconds'],
285
340
  'sql_query': value['sql_query'],
341
+ 'criteria_source': value['criteria_source'],
342
+ 'criteria_path': value['criteria_path'],
343
+ 'criteria': value['criteria'],
344
+ 'reporting_method': value['reporting_method'],
345
+ 'base_prompt_template': value['base_prompt_template'],
286
346
  'include_traces': value['include_traces'],
287
347
  'runtime_config': CovalMetricsAPIMetricRuntimeConfigToJSON(value['runtime_config']),
288
348
  'target_condition': CovalMetricsAPITargetConditionToJSON(value['target_condition']),
@@ -27,6 +27,8 @@
27
27
  * - `METRIC_TRANSCRIPT_REGEX` - Regex pattern matching
28
28
  * - `METRIC_PAUSE_ANALYSIS` - Speech pause detection
29
29
  * - `METRIC_SQL_FLOAT` - Custom SQL query over the simulation's data (set `sql_query`)
30
+ * - `METRIC_COMPOSITE_EVALUATION` - Judges a list of criteria independently and reports how
31
+ * many were met (set `criteria_source`, and `criteria_path` or `criteria` to match)
30
32
  *
31
33
  * @export
32
34
  */
@@ -41,7 +43,8 @@ export const CovalMetricsAPIMetricType = {
41
43
  MetricMetadataField: 'METRIC_METADATA_FIELD',
42
44
  MetricTranscriptRegex: 'METRIC_TRANSCRIPT_REGEX',
43
45
  MetricPauseAnalysis: 'METRIC_PAUSE_ANALYSIS',
44
- MetricSqlFloat: 'METRIC_SQL_FLOAT'
46
+ MetricSqlFloat: 'METRIC_SQL_FLOAT',
47
+ MetricCompositeEvaluation: 'METRIC_COMPOSITE_EVALUATION'
45
48
  } as const;
46
49
  export type CovalMetricsAPIMetricType = typeof CovalMetricsAPIMetricType[keyof typeof CovalMetricsAPIMetricType];
47
50
 
@@ -0,0 +1,101 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime.js';
16
+ import type { CovalMetricsAPITestMetricItemStatus } from './CovalMetricsAPITestMetricItemStatus.js';
17
+ import {
18
+ CovalMetricsAPITestMetricItemStatusFromJSON,
19
+ CovalMetricsAPITestMetricItemStatusFromJSONTyped,
20
+ CovalMetricsAPITestMetricItemStatusToJSON,
21
+ CovalMetricsAPITestMetricItemStatusToJSONTyped,
22
+ } from './CovalMetricsAPITestMetricItemStatus.js';
23
+
24
+ /**
25
+ * Result for one simulation output in a test-metric request.
26
+ * @export
27
+ * @interface CovalMetricsAPITestMetricBatchItemResult
28
+ */
29
+ export interface CovalMetricsAPITestMetricBatchItemResult {
30
+ /**
31
+ * The simulation output ID this result applies to.
32
+ * @type {string}
33
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
34
+ */
35
+ simulation_output_id: string;
36
+ /**
37
+ *
38
+ * @type {CovalMetricsAPITestMetricItemStatus}
39
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
40
+ */
41
+ status: CovalMetricsAPITestMetricItemStatus;
42
+ /**
43
+ * ULID of the created metric output, used to poll for the result. Null unless `status` is `QUEUED`.
44
+ * @type {string}
45
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
46
+ */
47
+ metric_output_ulid?: string | null;
48
+ /**
49
+ * Human-readable error detail when the item was not queued.
50
+ * @type {string}
51
+ * @memberof CovalMetricsAPITestMetricBatchItemResult
52
+ */
53
+ error?: string | null;
54
+ }
55
+
56
+
57
+
58
+ /**
59
+ * Check if a given object implements the CovalMetricsAPITestMetricBatchItemResult interface.
60
+ */
61
+ export function instanceOfCovalMetricsAPITestMetricBatchItemResult(value: object): value is CovalMetricsAPITestMetricBatchItemResult {
62
+ if (!('simulation_output_id' in value) || value['simulation_output_id'] === undefined) return false;
63
+ if (!('status' in value) || value['status'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function CovalMetricsAPITestMetricBatchItemResultFromJSON(json: any): CovalMetricsAPITestMetricBatchItemResult {
68
+ return CovalMetricsAPITestMetricBatchItemResultFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function CovalMetricsAPITestMetricBatchItemResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): CovalMetricsAPITestMetricBatchItemResult {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'simulation_output_id': json['simulation_output_id'],
78
+ 'status': CovalMetricsAPITestMetricItemStatusFromJSON(json['status']),
79
+ 'metric_output_ulid': json['metric_output_ulid'] == null ? undefined : json['metric_output_ulid'],
80
+ 'error': json['error'] == null ? undefined : json['error'],
81
+ };
82
+ }
83
+
84
+ export function CovalMetricsAPITestMetricBatchItemResultToJSON(json: any): CovalMetricsAPITestMetricBatchItemResult {
85
+ return CovalMetricsAPITestMetricBatchItemResultToJSONTyped(json, false);
86
+ }
87
+
88
+ export function CovalMetricsAPITestMetricBatchItemResultToJSONTyped(value?: CovalMetricsAPITestMetricBatchItemResult | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'simulation_output_id': value['simulation_output_id'],
96
+ 'status': CovalMetricsAPITestMetricItemStatusToJSON(value['status']),
97
+ 'metric_output_ulid': value['metric_output_ulid'],
98
+ 'error': value['error'],
99
+ };
100
+ }
101
+
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Coval Agents API
5
+ * Manage configurations for simulations and evaluations.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@coval.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ /**
17
+ * Per-simulation-output outcome of a test-metric request.
18
+ *
19
+ * - `QUEUED` - Metric execution queued successfully
20
+ * - `NOT_FOUND` - Simulation output not found
21
+ * - `FORBIDDEN` - Access to the simulation output denied
22
+ * - `ENQUEUE_FAILED` - Failed to enqueue the metric execution
23
+ *
24
+ * @export
25
+ */
26
+ export const CovalMetricsAPITestMetricItemStatus = {
27
+ Queued: 'QUEUED',
28
+ NotFound: 'NOT_FOUND',
29
+ Forbidden: 'FORBIDDEN',
30
+ EnqueueFailed: 'ENQUEUE_FAILED'
31
+ } as const;
32
+ export type CovalMetricsAPITestMetricItemStatus = typeof CovalMetricsAPITestMetricItemStatus[keyof typeof CovalMetricsAPITestMetricItemStatus];
33
+
34
+
35
+ export function instanceOfCovalMetricsAPITestMetricItemStatus(value: any): boolean {
36
+ for (const key in CovalMetricsAPITestMetricItemStatus) {
37
+ if (Object.prototype.hasOwnProperty.call(CovalMetricsAPITestMetricItemStatus, key)) {
38
+ if (CovalMetricsAPITestMetricItemStatus[key as keyof typeof CovalMetricsAPITestMetricItemStatus] === value) {
39
+ return true;
40
+ }
41
+ }
42
+ }
43
+ return false;
44
+ }
45
+
46
+ export function CovalMetricsAPITestMetricItemStatusFromJSON(json: any): CovalMetricsAPITestMetricItemStatus {
47
+ return CovalMetricsAPITestMetricItemStatusFromJSONTyped(json, false);
48
+ }
49
+
50
+ export function CovalMetricsAPITestMetricItemStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): CovalMetricsAPITestMetricItemStatus {
51
+ return json as CovalMetricsAPITestMetricItemStatus;
52
+ }
53
+
54
+ export function CovalMetricsAPITestMetricItemStatusToJSON(value?: CovalMetricsAPITestMetricItemStatus | null): any {
55
+ return value as any;
56
+ }
57
+
58
+ export function CovalMetricsAPITestMetricItemStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): CovalMetricsAPITestMetricItemStatus {
59
+ return value as CovalMetricsAPITestMetricItemStatus;
60
+ }
61
+
@@ -14,17 +14,24 @@
14
14
 
15
15
  import { mapValues } from '../runtime.js';
16
16
  /**
17
- *
17
+ * Provide exactly one of `simulation_output_id` or `simulation_output_ids`.
18
18
  * @export
19
19
  * @interface CovalMetricsAPITestMetricRequest
20
20
  */
21
21
  export interface CovalMetricsAPITestMetricRequest {
22
22
  /**
23
- * The simulation output ID (22-character ShortUUID) to run the metric against
23
+ * Deprecated: a single simulation output ID (22-character ShortUUID) to run the metric against. Prefer `simulation_output_ids`.
24
24
  * @type {string}
25
25
  * @memberof CovalMetricsAPITestMetricRequest
26
+ * @deprecated
26
27
  */
27
- simulation_output_id: string;
28
+ simulation_output_id?: string;
29
+ /**
30
+ * Simulation output IDs (22-character ShortUUIDs) to run the metric against; 1–100 per call.
31
+ * @type {Array<string>}
32
+ * @memberof CovalMetricsAPITestMetricRequest
33
+ */
34
+ simulation_output_ids?: Array<string>;
28
35
  /**
29
36
  * Optional developer identifier for debugging
30
37
  * @type {string}
@@ -37,7 +44,6 @@ export interface CovalMetricsAPITestMetricRequest {
37
44
  * Check if a given object implements the CovalMetricsAPITestMetricRequest interface.
38
45
  */
39
46
  export function instanceOfCovalMetricsAPITestMetricRequest(value: object): value is CovalMetricsAPITestMetricRequest {
40
- if (!('simulation_output_id' in value) || value['simulation_output_id'] === undefined) return false;
41
47
  return true;
42
48
  }
43
49
 
@@ -51,7 +57,8 @@ export function CovalMetricsAPITestMetricRequestFromJSONTyped(json: any, ignoreD
51
57
  }
52
58
  return {
53
59
 
54
- 'simulation_output_id': json['simulation_output_id'],
60
+ 'simulation_output_id': json['simulation_output_id'] == null ? undefined : json['simulation_output_id'],
61
+ 'simulation_output_ids': json['simulation_output_ids'] == null ? undefined : json['simulation_output_ids'],
55
62
  'dev_id': json['dev_id'] == null ? undefined : json['dev_id'],
56
63
  };
57
64
  }
@@ -68,6 +75,7 @@ export function CovalMetricsAPITestMetricRequestToJSONTyped(value?: CovalMetrics
68
75
  return {
69
76
 
70
77
  'simulation_output_id': value['simulation_output_id'],
78
+ 'simulation_output_ids': value['simulation_output_ids'],
71
79
  'dev_id': value['dev_id'],
72
80
  };
73
81
  }
@@ -13,6 +13,14 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime.js';
16
+ import type { CovalMetricsAPITestMetricBatchItemResult } from './CovalMetricsAPITestMetricBatchItemResult.js';
17
+ import {
18
+ CovalMetricsAPITestMetricBatchItemResultFromJSON,
19
+ CovalMetricsAPITestMetricBatchItemResultFromJSONTyped,
20
+ CovalMetricsAPITestMetricBatchItemResultToJSON,
21
+ CovalMetricsAPITestMetricBatchItemResultToJSONTyped,
22
+ } from './CovalMetricsAPITestMetricBatchItemResult.js';
23
+
16
24
  /**
17
25
  *
18
26
  * @export
@@ -20,17 +28,25 @@ import { mapValues } from '../runtime.js';
20
28
  */
21
29
  export interface CovalMetricsAPITestMetricResponse {
22
30
  /**
23
- * The ULID of the created metric output, used to track result
31
+ * One entry per requested simulation output.
32
+ * @type {Array<CovalMetricsAPITestMetricBatchItemResult>}
33
+ * @memberof CovalMetricsAPITestMetricResponse
34
+ */
35
+ results: Array<CovalMetricsAPITestMetricBatchItemResult>;
36
+ /**
37
+ * Deprecated: the ULID of the created metric output, used to track the result. Only set for single `simulation_output_id` requests; null for batch (`simulation_output_ids`) requests, which should read `results` instead.
24
38
  * @type {string}
25
39
  * @memberof CovalMetricsAPITestMetricResponse
40
+ * @deprecated
26
41
  */
27
- metric_output_ulid?: string;
42
+ metric_output_ulid?: string | null;
28
43
  }
29
44
 
30
45
  /**
31
46
  * Check if a given object implements the CovalMetricsAPITestMetricResponse interface.
32
47
  */
33
48
  export function instanceOfCovalMetricsAPITestMetricResponse(value: object): value is CovalMetricsAPITestMetricResponse {
49
+ if (!('results' in value) || value['results'] === undefined) return false;
34
50
  return true;
35
51
  }
36
52
 
@@ -44,6 +60,7 @@ export function CovalMetricsAPITestMetricResponseFromJSONTyped(json: any, ignore
44
60
  }
45
61
  return {
46
62
 
63
+ 'results': ((json['results'] as Array<any>).map(CovalMetricsAPITestMetricBatchItemResultFromJSON)),
47
64
  'metric_output_ulid': json['metric_output_ulid'] == null ? undefined : json['metric_output_ulid'],
48
65
  };
49
66
  }
@@ -59,6 +76,7 @@ export function CovalMetricsAPITestMetricResponseToJSONTyped(value?: CovalMetric
59
76
 
60
77
  return {
61
78
 
79
+ 'results': ((value['results'] as Array<any>).map(CovalMetricsAPITestMetricBatchItemResultToJSON)),
62
80
  'metric_output_ulid': value['metric_output_ulid'],
63
81
  };
64
82
  }
@@ -126,9 +126,41 @@ export interface CovalMetricsAPIUpdateMetricRequest {
126
126
  * @memberof CovalMetricsAPIUpdateMetricRequest
127
127
  */
128
128
  sql_query?: string;
129
+ /**
130
+ * Where a METRIC_COMPOSITE_EVALUATION metric reads its criteria from.
131
+ * @type {CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum}
132
+ * @memberof CovalMetricsAPIUpdateMetricRequest
133
+ */
134
+ criteria_source?: CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum;
135
+ /**
136
+ * Path to the criteria on the source, when `criteria_source` is `test_case`
137
+ * or `test_case_attribute`.
138
+ *
139
+ * @type {string}
140
+ * @memberof CovalMetricsAPIUpdateMetricRequest
141
+ */
142
+ criteria_path?: string;
143
+ /**
144
+ * Literal list of criteria, when `criteria_source` is `metric_metadata`.
145
+ * @type {Array<string>}
146
+ * @memberof CovalMetricsAPIUpdateMetricRequest
147
+ */
148
+ criteria?: Array<string>;
149
+ /**
150
+ * How per-criterion verdicts aggregate into the metric's value.
151
+ * @type {CovalMetricsAPIUpdateMetricRequestReportingMethodEnum}
152
+ * @memberof CovalMetricsAPIUpdateMetricRequest
153
+ */
154
+ reporting_method?: CovalMetricsAPIUpdateMetricRequestReportingMethodEnum;
155
+ /**
156
+ * Custom prompt template used to evaluate each criterion.
157
+ * @type {string}
158
+ * @memberof CovalMetricsAPIUpdateMetricRequest
159
+ */
160
+ base_prompt_template?: string;
129
161
  /**
130
162
  * Inject OTel trace context into the LLM judge prompt during evaluation.
131
- * Supported for LLM judge metric types only.
163
+ * Supported for LLM judge metric types and `METRIC_COMPOSITE_EVALUATION`.
132
164
  *
133
165
  * @type {boolean}
134
166
  * @memberof CovalMetricsAPIUpdateMetricRequest
@@ -169,6 +201,26 @@ export const CovalMetricsAPIUpdateMetricRequestRoleEnum = {
169
201
  } as const;
170
202
  export type CovalMetricsAPIUpdateMetricRequestRoleEnum = typeof CovalMetricsAPIUpdateMetricRequestRoleEnum[keyof typeof CovalMetricsAPIUpdateMetricRequestRoleEnum];
171
203
 
204
+ /**
205
+ * @export
206
+ */
207
+ export const CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum = {
208
+ TestCase: 'test_case',
209
+ TestCaseAttribute: 'test_case_attribute',
210
+ MetricMetadata: 'metric_metadata'
211
+ } as const;
212
+ export type CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum = typeof CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum[keyof typeof CovalMetricsAPIUpdateMetricRequestCriteriaSourceEnum];
213
+
214
+ /**
215
+ * @export
216
+ */
217
+ export const CovalMetricsAPIUpdateMetricRequestReportingMethodEnum = {
218
+ PercentageOfCriteriaMet: 'percentage_of_criteria_met',
219
+ CountOfCriteriaMet: 'count_of_criteria_met',
220
+ AllCriteriaMet: 'all_criteria_met'
221
+ } as const;
222
+ export type CovalMetricsAPIUpdateMetricRequestReportingMethodEnum = typeof CovalMetricsAPIUpdateMetricRequestReportingMethodEnum[keyof typeof CovalMetricsAPIUpdateMetricRequestReportingMethodEnum];
223
+
172
224
 
173
225
  /**
174
226
  * Check if a given object implements the CovalMetricsAPIUpdateMetricRequest interface.
@@ -200,6 +252,11 @@ export function CovalMetricsAPIUpdateMetricRequestFromJSONTyped(json: any, ignor
200
252
  'role': json['role'] == null ? undefined : json['role'],
201
253
  'min_pause_duration_seconds': json['min_pause_duration_seconds'] == null ? undefined : json['min_pause_duration_seconds'],
202
254
  'sql_query': json['sql_query'] == null ? undefined : json['sql_query'],
255
+ 'criteria_source': json['criteria_source'] == null ? undefined : json['criteria_source'],
256
+ 'criteria_path': json['criteria_path'] == null ? undefined : json['criteria_path'],
257
+ 'criteria': json['criteria'] == null ? undefined : json['criteria'],
258
+ 'reporting_method': json['reporting_method'] == null ? undefined : json['reporting_method'],
259
+ 'base_prompt_template': json['base_prompt_template'] == null ? undefined : json['base_prompt_template'],
203
260
  'include_traces': json['include_traces'] == null ? undefined : json['include_traces'],
204
261
  'runtime_config': json['runtime_config'] == null ? undefined : CovalMetricsAPIMetricRuntimeConfigFromJSON(json['runtime_config']),
205
262
  'target_condition': json['target_condition'] == null ? undefined : CovalMetricsAPITargetConditionFromJSON(json['target_condition']),
@@ -231,6 +288,11 @@ export function CovalMetricsAPIUpdateMetricRequestToJSONTyped(value?: CovalMetri
231
288
  'role': value['role'],
232
289
  'min_pause_duration_seconds': value['min_pause_duration_seconds'],
233
290
  'sql_query': value['sql_query'],
291
+ 'criteria_source': value['criteria_source'],
292
+ 'criteria_path': value['criteria_path'],
293
+ 'criteria': value['criteria'],
294
+ 'reporting_method': value['reporting_method'],
295
+ 'base_prompt_template': value['base_prompt_template'],
234
296
  'include_traces': value['include_traces'],
235
297
  'runtime_config': CovalMetricsAPIMetricRuntimeConfigToJSON(value['runtime_config']),
236
298
  'target_condition': CovalMetricsAPITargetConditionToJSON(value['target_condition']),
@@ -88,6 +88,12 @@ export interface CovalReviewsAPICreateReviewProjectRequest {
88
88
  * @memberof CovalReviewsAPICreateReviewProjectRequest
89
89
  */
90
90
  blind_labeling_shown_metric_ids?: Array<string> | null;
91
+ /**
92
+ * Enforce claims and explicit single-author completion for collaborative projects
93
+ * @type {boolean}
94
+ * @memberof CovalReviewsAPICreateReviewProjectRequest
95
+ */
96
+ enforced_collaboration?: boolean;
91
97
  }
92
98
 
93
99
 
@@ -122,6 +128,7 @@ export function CovalReviewsAPICreateReviewProjectRequestFromJSONTyped(json: any
122
128
  'notifications': json['notifications'] == null ? undefined : json['notifications'],
123
129
  'project_rules': json['project_rules'] == null ? undefined : ((json['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleFromJSON)),
124
130
  'blind_labeling_shown_metric_ids': json['blind_labeling_shown_metric_ids'] == null ? undefined : json['blind_labeling_shown_metric_ids'],
131
+ 'enforced_collaboration': json['enforced_collaboration'] == null ? undefined : json['enforced_collaboration'],
125
132
  };
126
133
  }
127
134
 
@@ -145,6 +152,7 @@ export function CovalReviewsAPICreateReviewProjectRequestToJSONTyped(value?: Cov
145
152
  'notifications': value['notifications'],
146
153
  'project_rules': value['project_rules'] == null ? undefined : ((value['project_rules'] as Array<any>).map(CovalReviewsAPIProjectRuleToJSON)),
147
154
  'blind_labeling_shown_metric_ids': value['blind_labeling_shown_metric_ids'],
155
+ 'enforced_collaboration': value['enforced_collaboration'],
148
156
  };
149
157
  }
150
158