@ancplua/qyl-api-schema 0.5.13 → 0.5.14

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.
package/api/routes.tsp CHANGED
@@ -183,7 +183,9 @@ interface GenAiEtlAuditApi {
183
183
  @get
184
184
  report(
185
185
  ...ProjectScopeHeader,
186
+ @doc("Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
186
187
  @query startTime?: utcDateTime,
188
+ @doc("Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
187
189
  @query endTime?: utcDateTime,
188
190
  @query @minValue(1) @maxValue(100) limit?: int32 = 25,
189
191
  ): GenAiEtlAuditReport | ValidationError | UnauthorizedError | InternalServerError;
@@ -192,7 +194,9 @@ interface GenAiEtlAuditApi {
192
194
  @route("/evaluate")
193
195
  evaluate(
194
196
  ...ProjectScopeHeader,
197
+ @doc("Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
195
198
  @query startTime?: utcDateTime,
199
+ @doc("Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
196
200
  @query endTime?: utcDateTime,
197
201
  @body request: GenAiEtlAuditEvaluationRequest,
198
202
  ): GenAiEtlAuditEvaluationResponse | ValidationError | UnauthorizedError | InternalServerError;
@@ -862,7 +862,7 @@
862
862
  "p95_latency_ms",
863
863
  "cost_attribution",
864
864
  "candidate_path",
865
- "validation_metric",
865
+ "validation_metrics",
866
866
  "residual_path",
867
867
  "evidence_signals",
868
868
  "missing_evidence",
@@ -970,8 +970,13 @@
970
970
  "candidate_path": {
971
971
  "$ref": "#/$defs/Cost.GenAiEtlCandidatePath"
972
972
  },
973
- "validation_metric": {
974
- "$ref": "#/$defs/Cost.GenAiEtlValidationMetric"
973
+ "validation_metrics": {
974
+ "type": "array",
975
+ "items": {
976
+ "$ref": "#/$defs/Cost.GenAiEtlValidationMetric"
977
+ },
978
+ "minItems": 1,
979
+ "description": "Task-specific metrics required to falsify the proposed replacement."
975
980
  },
976
981
  "residual_path": {
977
982
  "$ref": "#/$defs/Cost.GenAiEtlResidualPath"
@@ -1389,6 +1394,9 @@
1389
1394
  "enum": [
1390
1395
  "accuracy",
1391
1396
  "macro_f1",
1397
+ "calibration_error",
1398
+ "span_precision",
1399
+ "span_recall",
1392
1400
  "span_f1",
1393
1401
  "field_exact_match",
1394
1402
  "schema_validity",
@@ -1401,7 +1409,7 @@
1401
1409
  "task_success",
1402
1410
  "unavailable"
1403
1411
  ],
1404
- "description": "Task-specific metric that can falsify a proposed replacement."
1412
+ "description": "Task-specific metrics that can falsify a proposed replacement."
1405
1413
  },
1406
1414
  "Cost.ProviderCostAttribution": {
1407
1415
  "type": "string",
@@ -76,6 +76,7 @@
76
76
  "name": "startTime",
77
77
  "in": "query",
78
78
  "required": false,
79
+ "description": "Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.",
79
80
  "schema": {
80
81
  "type": "string",
81
82
  "format": "date-time"
@@ -86,6 +87,7 @@
86
87
  "name": "endTime",
87
88
  "in": "query",
88
89
  "required": false,
90
+ "description": "Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.",
89
91
  "schema": {
90
92
  "type": "string",
91
93
  "format": "date-time"
@@ -224,6 +226,7 @@
224
226
  "name": "startTime",
225
227
  "in": "query",
226
228
  "required": false,
229
+ "description": "Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.",
227
230
  "schema": {
228
231
  "type": "string",
229
232
  "format": "date-time"
@@ -234,6 +237,7 @@
234
237
  "name": "endTime",
235
238
  "in": "query",
236
239
  "required": false,
240
+ "description": "Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.",
237
241
  "schema": {
238
242
  "type": "string",
239
243
  "format": "date-time"
@@ -4858,7 +4862,7 @@
4858
4862
  "p95_latency_ms",
4859
4863
  "cost_attribution",
4860
4864
  "candidate_path",
4861
- "validation_metric",
4865
+ "validation_metrics",
4862
4866
  "residual_path",
4863
4867
  "evidence_signals",
4864
4868
  "missing_evidence",
@@ -4966,8 +4970,13 @@
4966
4970
  "candidate_path": {
4967
4971
  "$ref": "#/components/schemas/Cost.GenAiEtlCandidatePath"
4968
4972
  },
4969
- "validation_metric": {
4970
- "$ref": "#/components/schemas/Cost.GenAiEtlValidationMetric"
4973
+ "validation_metrics": {
4974
+ "type": "array",
4975
+ "items": {
4976
+ "$ref": "#/components/schemas/Cost.GenAiEtlValidationMetric"
4977
+ },
4978
+ "minItems": 1,
4979
+ "description": "Task-specific metrics required to falsify the proposed replacement."
4971
4980
  },
4972
4981
  "residual_path": {
4973
4982
  "$ref": "#/components/schemas/Cost.GenAiEtlResidualPath"
@@ -5385,6 +5394,9 @@
5385
5394
  "enum": [
5386
5395
  "accuracy",
5387
5396
  "macro_f1",
5397
+ "calibration_error",
5398
+ "span_precision",
5399
+ "span_recall",
5388
5400
  "span_f1",
5389
5401
  "field_exact_match",
5390
5402
  "schema_validity",
@@ -5397,7 +5409,7 @@
5397
5409
  "task_success",
5398
5410
  "unavailable"
5399
5411
  ],
5400
- "description": "Task-specific metric that can falsify a proposed replacement."
5412
+ "description": "Task-specific metrics that can falsify a proposed replacement."
5401
5413
  },
5402
5414
  "Cost.ProviderCostAttribution": {
5403
5415
  "type": "string",
@@ -363,6 +363,9 @@ export type GenAiEtlCandidatePath = typeof GenAiEtlCandidatePathValues[keyof typ
363
363
  export declare const GenAiEtlValidationMetricValues: {
364
364
  readonly accuracy: "accuracy";
365
365
  readonly macroF1: "macro_f1";
366
+ readonly calibrationError: "calibration_error";
367
+ readonly spanPrecision: "span_precision";
368
+ readonly spanRecall: "span_recall";
366
369
  readonly spanF1: "span_f1";
367
370
  readonly fieldExactMatch: "field_exact_match";
368
371
  readonly schemaValidity: "schema_validity";
@@ -1101,7 +1104,7 @@ export interface GenAiEtlAuditCluster {
1101
1104
  "measurable_coverage"?: number;
1102
1105
  "safe_deferral_coverage"?: number;
1103
1106
  "candidate_path": GenAiEtlCandidatePath;
1104
- "validation_metric": GenAiEtlValidationMetric;
1107
+ "validation_metrics": GenAiEtlValidationMetric[];
1105
1108
  "residual_path": GenAiEtlResidualPath;
1106
1109
  "evidence_signals": GenAiEtlEvidenceSignal[];
1107
1110
  "missing_evidence": GenAiEtlEvidenceSignal[];
@@ -314,6 +314,9 @@ export const GenAiEtlCandidatePathValues = {
314
314
  export const GenAiEtlValidationMetricValues = {
315
315
  "accuracy": "accuracy",
316
316
  "macroF1": "macro_f1",
317
+ "calibrationError": "calibration_error",
318
+ "spanPrecision": "span_precision",
319
+ "spanRecall": "span_recall",
317
320
  "spanF1": "span_f1",
318
321
  "fieldExactMatch": "field_exact_match",
319
322
  "schemaValidity": "schema_validity",
@@ -143,10 +143,13 @@ enum GenAiEtlCandidatePath {
143
143
  insufficientEvidence: "insufficient_evidence",
144
144
  }
145
145
 
146
- @doc("Task-specific metric that can falsify a proposed replacement.")
146
+ @doc("Task-specific metrics that can falsify a proposed replacement.")
147
147
  enum GenAiEtlValidationMetric {
148
148
  accuracy: "accuracy",
149
149
  macroF1: "macro_f1",
150
+ calibrationError: "calibration_error",
151
+ spanPrecision: "span_precision",
152
+ spanRecall: "span_recall",
150
153
  spanF1: "span_f1",
151
154
  fieldExactMatch: "field_exact_match",
152
155
  schemaValidity: "schema_validity",
@@ -300,8 +303,10 @@ model GenAiEtlAuditCluster {
300
303
  @encodedName("application/json", "candidate_path")
301
304
  candidatePath: GenAiEtlCandidatePath;
302
305
 
303
- @encodedName("application/json", "validation_metric")
304
- validationMetric: GenAiEtlValidationMetric;
306
+ @doc("Task-specific metrics required to falsify the proposed replacement.")
307
+ @encodedName("application/json", "validation_metrics")
308
+ @minItems(1)
309
+ validationMetrics: GenAiEtlValidationMetric[];
305
310
 
306
311
  @encodedName("application/json", "residual_path")
307
312
  residualPath: GenAiEtlResidualPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancplua/qyl-api-schema",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "TypeSpec source of truth for qyl API contracts. Emits OpenAPI, JSON Schema, Qyl.Api.Contracts DTOs, and TypeScript contract types; not an OpenTelemetry package, storage schema, or server implementation.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {