@ancplua/qyl-api-schema 1.0.2 → 1.0.4
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/README.md +4 -0
- package/api/routes.tsp +0 -143
- package/generated/json-schema/qyl-api-schema.json +900 -4090
- package/generated/openapi/qyl.openapi.json +4283 -8430
- package/generated/otel-keys.gen.tsp +1 -1
- package/generated/ts-runtime/api.d.ts +0 -660
- package/generated/ts-runtime/api.js +0 -187
- package/index.tsp +0 -3
- package/models/runner-mcp.tsp +0 -4
- package/otel/enums.tsp +0 -119
- package/otel/otel-conventions.tsp +0 -2
- package/package.json +2 -5
- package/models/cost-etl-audit.tsp +0 -982
- package/otel/metrics.tsp +0 -237
- package/otel/profiles.tsp +0 -335
|
@@ -67,30 +67,6 @@ export const SeverityTextValues = {
|
|
|
67
67
|
"ERROR": "ERROR",
|
|
68
68
|
"FATAL": "FATAL",
|
|
69
69
|
};
|
|
70
|
-
export const MetricTypeValues = {
|
|
71
|
-
"gauge": "gauge",
|
|
72
|
-
"sum": "sum",
|
|
73
|
-
"histogram": "histogram",
|
|
74
|
-
"exponentialHistogram": "exponential_histogram",
|
|
75
|
-
"summary": "summary",
|
|
76
|
-
};
|
|
77
|
-
export const AggregationTemporalityValues = {
|
|
78
|
-
"delta": 1,
|
|
79
|
-
"cumulative": 2,
|
|
80
|
-
};
|
|
81
|
-
export const DataPointFlagsValues = {
|
|
82
|
-
"none": 0,
|
|
83
|
-
"noRecordedValue": 1,
|
|
84
|
-
};
|
|
85
|
-
export const InstrumentKindValues = {
|
|
86
|
-
"counter": "Counter",
|
|
87
|
-
"upDownCounter": "UpDownCounter",
|
|
88
|
-
"histogram": "Histogram",
|
|
89
|
-
"gauge": "Gauge",
|
|
90
|
-
"observableCounter": "ObservableCounter",
|
|
91
|
-
"observableGauge": "ObservableGauge",
|
|
92
|
-
"observableUpDownCounter": "ObservableUpDownCounter",
|
|
93
|
-
};
|
|
94
70
|
export const TelemetrySdkLanguageValues = {
|
|
95
71
|
"cpp": "cpp",
|
|
96
72
|
"dotnet": "dotnet",
|
|
@@ -127,25 +103,6 @@ export const EventDomainValues = {
|
|
|
127
103
|
"exception": "exception",
|
|
128
104
|
"log": "log",
|
|
129
105
|
};
|
|
130
|
-
export const OriginalPayloadFormatValues = {
|
|
131
|
-
"pprof": "pprof",
|
|
132
|
-
"jfr": "jfr",
|
|
133
|
-
"linuxPerf": "linux_perf",
|
|
134
|
-
};
|
|
135
|
-
export const ProfileFrameTypeValues = {
|
|
136
|
-
"beam": "beam",
|
|
137
|
-
"cpython": "cpython",
|
|
138
|
-
"dotnet": "dotnet",
|
|
139
|
-
"go": "go",
|
|
140
|
-
"jvm": "jvm",
|
|
141
|
-
"kernel": "kernel",
|
|
142
|
-
"native": "native",
|
|
143
|
-
"perl": "perl",
|
|
144
|
-
"php": "php",
|
|
145
|
-
"ruby": "ruby",
|
|
146
|
-
"rust": "rust",
|
|
147
|
-
"v8js": "v8js",
|
|
148
|
-
};
|
|
149
106
|
export const CloudProviderValues = {
|
|
150
107
|
"alibabaCloud": "alibaba_cloud",
|
|
151
108
|
"aws": "aws",
|
|
@@ -335,147 +292,3 @@ export const FetchTelemetryViewValues = {
|
|
|
335
292
|
"logs": "logs",
|
|
336
293
|
"mcpStats": "mcp_stats",
|
|
337
294
|
};
|
|
338
|
-
export const ProviderBillingSourceStatusValues = {
|
|
339
|
-
"unconfigured": "unconfigured",
|
|
340
|
-
"pending": "pending",
|
|
341
|
-
"current": "current",
|
|
342
|
-
"stale": "stale",
|
|
343
|
-
"syncFailed": "sync_failed",
|
|
344
|
-
};
|
|
345
|
-
export const ProviderBillingAttributionValues = {
|
|
346
|
-
"providerModelPeriod": "provider_model_period",
|
|
347
|
-
"providerPeriod": "provider_period",
|
|
348
|
-
"unavailable": "unavailable",
|
|
349
|
-
};
|
|
350
|
-
export const ModelCatalogSourceStatusValues = {
|
|
351
|
-
"unconfigured": "unconfigured",
|
|
352
|
-
"pending": "pending",
|
|
353
|
-
"current": "current",
|
|
354
|
-
"stale": "stale",
|
|
355
|
-
"syncFailed": "sync_failed",
|
|
356
|
-
};
|
|
357
|
-
export const ModelCatalogPriceSemanticsValues = {
|
|
358
|
-
"minimumAvailableRate": "minimum_available_rate",
|
|
359
|
-
"publishedRate": "published_rate",
|
|
360
|
-
};
|
|
361
|
-
export const ModelCatalogObservedIdentityBasisValues = {
|
|
362
|
-
"responseModel": "response_model",
|
|
363
|
-
"requestModelFallback": "request_model_fallback",
|
|
364
|
-
};
|
|
365
|
-
export const ModelCatalogMatchKindValues = {
|
|
366
|
-
"exactModelId": "exact_model_id",
|
|
367
|
-
"exactCanonicalSlug": "exact_canonical_slug",
|
|
368
|
-
};
|
|
369
|
-
export const ModelCatalogBillingModeValues = {
|
|
370
|
-
"perUnit": "per_unit",
|
|
371
|
-
"perRequest": "per_request",
|
|
372
|
-
};
|
|
373
|
-
export const GenAiEtlPromotionGateKindValues = {
|
|
374
|
-
"contractStability": "contract_stability",
|
|
375
|
-
"offlineReplay": "offline_replay",
|
|
376
|
-
"calibratedConfidence": "calibrated_confidence",
|
|
377
|
-
"shadowTraffic": "shadow_traffic",
|
|
378
|
-
"limitedServing": "limited_serving",
|
|
379
|
-
"rollbackResidualPolicy": "rollback_residual_policy",
|
|
380
|
-
};
|
|
381
|
-
export const GenAiEtlPromotionGateStateValues = {
|
|
382
|
-
"passed": "passed",
|
|
383
|
-
"failed": "failed",
|
|
384
|
-
"notEvaluated": "not_evaluated",
|
|
385
|
-
"blockedMissingEvidence": "blocked_missing_evidence",
|
|
386
|
-
};
|
|
387
|
-
export const GenAiEtlOutputContractValues = {
|
|
388
|
-
"prose": "prose",
|
|
389
|
-
"label": "label",
|
|
390
|
-
"spanList": "span_list",
|
|
391
|
-
"record": "record",
|
|
392
|
-
"vector": "vector",
|
|
393
|
-
"catalogReference": "catalog_reference",
|
|
394
|
-
"number": "number",
|
|
395
|
-
"boolean": "boolean",
|
|
396
|
-
"unknown": "unknown",
|
|
397
|
-
};
|
|
398
|
-
export const GenAiEtlTaskFamilyValues = {
|
|
399
|
-
"openReasoningGeneration": "open_reasoning_generation",
|
|
400
|
-
"classification": "classification",
|
|
401
|
-
"sequenceLabeling": "sequence_labeling",
|
|
402
|
-
"structuredExtraction": "structured_extraction",
|
|
403
|
-
"retrievalEntityResolution": "retrieval_entity_resolution",
|
|
404
|
-
"similarityClustering": "similarity_clustering",
|
|
405
|
-
"normalizationTransformation": "normalization_transformation",
|
|
406
|
-
"numericAnalytical": "numeric_analytical",
|
|
407
|
-
"unknown": "unknown",
|
|
408
|
-
};
|
|
409
|
-
export const GenAiEtlCandidateStatusValues = {
|
|
410
|
-
"hypothesisOnly": "hypothesis_only",
|
|
411
|
-
"insufficientEvidence": "insufficient_evidence",
|
|
412
|
-
};
|
|
413
|
-
export const GenAiEtlCandidatePathValues = {
|
|
414
|
-
"exactCache": "exact_cache",
|
|
415
|
-
"deterministicCode": "deterministic_code",
|
|
416
|
-
"boundedRetrieval": "bounded_retrieval",
|
|
417
|
-
"smallClassifierExtractor": "small_classifier_extractor",
|
|
418
|
-
"smallerGenerativeModel": "smaller_generative_model",
|
|
419
|
-
"frontierModel": "frontier_model",
|
|
420
|
-
"insufficientEvidence": "insufficient_evidence",
|
|
421
|
-
};
|
|
422
|
-
export const GenAiEtlValidationMetricValues = {
|
|
423
|
-
"accuracy": "accuracy",
|
|
424
|
-
"macroF1": "macro_f1",
|
|
425
|
-
"calibrationError": "calibration_error",
|
|
426
|
-
"spanPrecision": "span_precision",
|
|
427
|
-
"spanRecall": "span_recall",
|
|
428
|
-
"spanF1": "span_f1",
|
|
429
|
-
"fieldExactMatch": "field_exact_match",
|
|
430
|
-
"schemaValidity": "schema_validity",
|
|
431
|
-
"matchAccuracy": "match_accuracy",
|
|
432
|
-
"recallAtK": "recall_at_k",
|
|
433
|
-
"meanReciprocalRank": "mean_reciprocal_rank",
|
|
434
|
-
"exactMatch": "exact_match",
|
|
435
|
-
"numericTolerance": "numeric_tolerance",
|
|
436
|
-
"humanPreference": "human_preference",
|
|
437
|
-
"taskSuccess": "task_success",
|
|
438
|
-
"unavailable": "unavailable",
|
|
439
|
-
};
|
|
440
|
-
export const GenAiEtlResidualPathValues = {
|
|
441
|
-
"frontierModel": "frontier_model",
|
|
442
|
-
"humanReview": "human_review",
|
|
443
|
-
"retry": "retry",
|
|
444
|
-
"degradedResponse": "degraded_response",
|
|
445
|
-
"none": "none",
|
|
446
|
-
"undetermined": "undetermined",
|
|
447
|
-
};
|
|
448
|
-
export const GenAiEtlEvidenceSignalValues = {
|
|
449
|
-
"workflowIdentity": "workflow_identity",
|
|
450
|
-
"outputContract": "output_contract",
|
|
451
|
-
"providerModel": "provider_model",
|
|
452
|
-
"tokenUsage": "token_usage",
|
|
453
|
-
"catalogTokenEstimate": "catalog_token_estimate",
|
|
454
|
-
"recurringSchema": "recurring_schema",
|
|
455
|
-
"boundedReference": "bounded_reference",
|
|
456
|
-
"taskMetric": "task_metric",
|
|
457
|
-
"acceptedOutputReplay": "accepted_output_replay",
|
|
458
|
-
"downstreamFate": "downstream_fate",
|
|
459
|
-
"calibratedConfidence": "calibrated_confidence",
|
|
460
|
-
"shadowComparison": "shadow_comparison",
|
|
461
|
-
"fallbackPolicy": "fallback_policy",
|
|
462
|
-
};
|
|
463
|
-
export const ModelCatalogRateRelationValues = {
|
|
464
|
-
"baseRate": "base_rate",
|
|
465
|
-
"additiveSurcharge": "additive_surcharge",
|
|
466
|
-
"replacesInclusiveBaseRate": "replaces_inclusive_base_rate",
|
|
467
|
-
"replacesPublishedRate": "replaces_published_rate",
|
|
468
|
-
};
|
|
469
|
-
export const ModelCatalogTokenExclusionReasonValues = {
|
|
470
|
-
"usageNotObserved": "usage_not_observed",
|
|
471
|
-
"conditionalAdjustmentNotApplied": "conditional_adjustment_not_applied",
|
|
472
|
-
"supersededByLaterOverride": "superseded_by_later_override",
|
|
473
|
-
"outsideTokenEstimateScope": "outside_token_estimate_scope",
|
|
474
|
-
"unsupportedUsageDimension": "unsupported_usage_dimension",
|
|
475
|
-
"unsupportedBillingMode": "unsupported_billing_mode",
|
|
476
|
-
};
|
|
477
|
-
export const GenAiEtlFrontierCostBasisValues = {
|
|
478
|
-
"scenario": "scenario",
|
|
479
|
-
"catalogTokenEstimate": "catalog_token_estimate",
|
|
480
|
-
"unavailable": "unavailable",
|
|
481
|
-
};
|
package/index.tsp
CHANGED
|
@@ -16,15 +16,12 @@ import "./otel/enums.tsp";
|
|
|
16
16
|
import "./otel/resource.tsp";
|
|
17
17
|
import "./otel/span.tsp";
|
|
18
18
|
import "./otel/logs.tsp";
|
|
19
|
-
import "./otel/metrics.tsp";
|
|
20
|
-
import "./otel/profiles.tsp";
|
|
21
19
|
|
|
22
20
|
import "./models/session.tsp";
|
|
23
21
|
import "./models/health.tsp";
|
|
24
22
|
import "./models/runner.tsp";
|
|
25
23
|
import "./models/runner-mcp.tsp";
|
|
26
24
|
import "./models/mcp-tools.tsp";
|
|
27
|
-
import "./models/cost-etl-audit.tsp";
|
|
28
25
|
|
|
29
26
|
import "./api/routes.tsp";
|
|
30
27
|
import "./api/streaming.tsp";
|
package/models/runner-mcp.tsp
CHANGED
|
@@ -3,14 +3,12 @@ import "@typespec/openapi3";
|
|
|
3
3
|
|
|
4
4
|
import "../common/types.tsp";
|
|
5
5
|
import "../otel/logs.tsp";
|
|
6
|
-
import "../otel/metrics.tsp";
|
|
7
6
|
import "../otel/span.tsp";
|
|
8
7
|
|
|
9
8
|
using TypeSpec.Http;
|
|
10
9
|
using TypeSpec.OpenAPI;
|
|
11
10
|
using Qyl.Api.Contracts.Common;
|
|
12
11
|
using Qyl.Api.Contracts.OTel.Logs;
|
|
13
|
-
using Qyl.Api.Contracts.OTel.Metrics;
|
|
14
12
|
using Qyl.Api.Contracts.OTel.Traces;
|
|
15
13
|
|
|
16
14
|
namespace Qyl.Api.Contracts.Runner.Mcp;
|
|
@@ -578,7 +576,6 @@ model RunnerMcpTelemetrySignalAvailability {
|
|
|
578
576
|
model RunnerMcpTelemetrySignalSummary {
|
|
579
577
|
traces: RunnerMcpTelemetrySignalAvailability;
|
|
580
578
|
logs: RunnerMcpTelemetrySignalAvailability;
|
|
581
|
-
metrics: RunnerMcpTelemetrySignalAvailability;
|
|
582
579
|
exceptions: RunnerMcpTelemetrySignalAvailability;
|
|
583
580
|
toolCallEvents: RunnerMcpTelemetrySignalAvailability;
|
|
584
581
|
}
|
|
@@ -589,7 +586,6 @@ model RunnerMcpExecutionTelemetryResponse {
|
|
|
589
586
|
correlation: RunnerMcpTelemetryCorrelation;
|
|
590
587
|
traces: Trace[];
|
|
591
588
|
logs: LogRecord[];
|
|
592
|
-
metrics: MetricPoint[];
|
|
593
589
|
queriedAt: utcDateTime;
|
|
594
590
|
|
|
595
591
|
@doc("Confirms that workbench telemetry querying is excluded from workbench export instrumentation.")
|
package/otel/enums.tsp
CHANGED
|
@@ -158,70 +158,6 @@ enum SeverityText {
|
|
|
158
158
|
FATAL: "FATAL",
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
// =============================================================================
|
|
162
|
-
// Metric Enumerations
|
|
163
|
-
// =============================================================================
|
|
164
|
-
|
|
165
|
-
@doc("Metric data type")
|
|
166
|
-
enum MetricType {
|
|
167
|
-
@doc("Gauge - instantaneous value")
|
|
168
|
-
gauge: "gauge",
|
|
169
|
-
|
|
170
|
-
@doc("Sum - monotonic or non-monotonic counter")
|
|
171
|
-
sum: "sum",
|
|
172
|
-
|
|
173
|
-
@doc("Histogram - distribution of values")
|
|
174
|
-
histogram: "histogram",
|
|
175
|
-
|
|
176
|
-
@doc("Exponential histogram - distribution with exponential buckets")
|
|
177
|
-
exponentialHistogram: "exponential_histogram",
|
|
178
|
-
|
|
179
|
-
@doc("Summary - pre-aggregated quantiles")
|
|
180
|
-
summary: "summary",
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
@doc("Aggregation temporality for metrics")
|
|
184
|
-
enum AggregationTemporality {
|
|
185
|
-
@doc("Delta - values since last report")
|
|
186
|
-
delta: 1,
|
|
187
|
-
|
|
188
|
-
@doc("Cumulative - values since start")
|
|
189
|
-
cumulative: 2,
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@doc("Data point flags")
|
|
193
|
-
enum DataPointFlags {
|
|
194
|
-
@doc("No flags set")
|
|
195
|
-
none: 0,
|
|
196
|
-
|
|
197
|
-
@doc("Value is absent (no measurement)")
|
|
198
|
-
noRecordedValue: 1,
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
@doc("Metric instrument kinds per OTel specification")
|
|
202
|
-
enum InstrumentKind {
|
|
203
|
-
@doc("Counter - monotonically increasing cumulative sum")
|
|
204
|
-
counter: "Counter",
|
|
205
|
-
|
|
206
|
-
@doc("UpDownCounter - can increase or decrease")
|
|
207
|
-
upDownCounter: "UpDownCounter",
|
|
208
|
-
|
|
209
|
-
@doc("Histogram - distribution of values with buckets")
|
|
210
|
-
histogram: "Histogram",
|
|
211
|
-
|
|
212
|
-
@doc("Gauge - instantaneous value at read time")
|
|
213
|
-
gauge: "Gauge",
|
|
214
|
-
|
|
215
|
-
@doc("Observable counter - async counter with callback")
|
|
216
|
-
observableCounter: "ObservableCounter",
|
|
217
|
-
|
|
218
|
-
@doc("Observable gauge - async gauge with callback")
|
|
219
|
-
observableGauge: "ObservableGauge",
|
|
220
|
-
|
|
221
|
-
@doc("Observable up-down counter - async up-down with callback")
|
|
222
|
-
observableUpDownCounter: "ObservableUpDownCounter",
|
|
223
|
-
}
|
|
224
|
-
|
|
225
161
|
// =============================================================================
|
|
226
162
|
// Resource Enumerations
|
|
227
163
|
// =============================================================================
|
|
@@ -332,58 +268,3 @@ enum EventDomain {
|
|
|
332
268
|
@doc("Log events")
|
|
333
269
|
log: "log",
|
|
334
270
|
}
|
|
335
|
-
|
|
336
|
-
// =============================================================================
|
|
337
|
-
// Profile Enumerations (v1development, Development stability)
|
|
338
|
-
// =============================================================================
|
|
339
|
-
|
|
340
|
-
@doc("Original payload format for profile data")
|
|
341
|
-
enum OriginalPayloadFormat {
|
|
342
|
-
@doc("Google pprof format (original_payload SHOULD NOT be populated — lossless mapping)")
|
|
343
|
-
pprof: "pprof",
|
|
344
|
-
|
|
345
|
-
@doc("Java Flight Recorder")
|
|
346
|
-
jfr: "jfr",
|
|
347
|
-
|
|
348
|
-
@doc("Linux perf.data format")
|
|
349
|
-
linuxPerf: "linux_perf",
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
@doc("Profile frame type — interpreter or compiler of a single frame")
|
|
353
|
-
enum ProfileFrameType {
|
|
354
|
-
@doc("Erlang (BEAM VM)")
|
|
355
|
-
beam: "beam",
|
|
356
|
-
|
|
357
|
-
@doc("Python (CPython)")
|
|
358
|
-
cpython: "cpython",
|
|
359
|
-
|
|
360
|
-
@doc(".NET")
|
|
361
|
-
dotnet: "dotnet",
|
|
362
|
-
|
|
363
|
-
@doc("Go")
|
|
364
|
-
go: "go",
|
|
365
|
-
|
|
366
|
-
@doc("JVM")
|
|
367
|
-
jvm: "jvm",
|
|
368
|
-
|
|
369
|
-
@doc("OS Kernel")
|
|
370
|
-
kernel: "kernel",
|
|
371
|
-
|
|
372
|
-
@doc("C, C++, Go, Rust (use more precise value if possible)")
|
|
373
|
-
native: "native",
|
|
374
|
-
|
|
375
|
-
@doc("Perl")
|
|
376
|
-
perl: "perl",
|
|
377
|
-
|
|
378
|
-
@doc("PHP")
|
|
379
|
-
php: "php",
|
|
380
|
-
|
|
381
|
-
@doc("Ruby")
|
|
382
|
-
ruby: "ruby",
|
|
383
|
-
|
|
384
|
-
@doc("Rust")
|
|
385
|
-
rust: "rust",
|
|
386
|
-
|
|
387
|
-
@doc("V8 JavaScript engine")
|
|
388
|
-
v8js: "v8js",
|
|
389
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancplua/qyl-api-schema",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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": {
|
|
@@ -58,12 +58,9 @@
|
|
|
58
58
|
"models/runner.tsp",
|
|
59
59
|
"models/mcp-tools.tsp",
|
|
60
60
|
"models/session.tsp",
|
|
61
|
-
"models/cost-etl-audit.tsp",
|
|
62
61
|
"otel/enums.tsp",
|
|
63
62
|
"otel/logs.tsp",
|
|
64
|
-
"otel/metrics.tsp",
|
|
65
63
|
"otel/otel-conventions.tsp",
|
|
66
|
-
"otel/profiles.tsp",
|
|
67
64
|
"otel/resource.tsp",
|
|
68
65
|
"otel/span.tsp",
|
|
69
66
|
"generated/otel-keys.gen.tsp",
|
|
@@ -126,7 +123,7 @@
|
|
|
126
123
|
"@ancplua/typespec-emit-csharp": "file:./emitters/csharp",
|
|
127
124
|
"@ancplua/typespec-emit-ts-types": "file:./emitters/ts-types",
|
|
128
125
|
"@types/node": "25.9.5",
|
|
129
|
-
"@typespec/compiler": "1.
|
|
126
|
+
"@typespec/compiler": "1.14.0",
|
|
130
127
|
"@typespec/events": "0.83.0",
|
|
131
128
|
"@typespec/http": "1.13.0",
|
|
132
129
|
"@typespec/openapi": "1.13.0",
|