@ancplua/qyl-api-schema 11.5.0 → 11.6.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.
- package/README.md +48 -6
- package/api/routes.tsp +293 -5
- package/api/runner.tsp +2 -0
- package/common/auth.tsp +20 -0
- package/common/errors.tsp +28 -0
- package/common/resource.tsp +106 -0
- package/generated/json-schema/qyl-api-schema.json +1989 -149
- package/generated/openapi/qyl.openapi.json +7823 -3927
- package/generated/ts-runtime/api.d.ts +315 -3
- package/generated/ts-runtime/api.js +25 -1
- package/generated/ts-runtime/schemas.d.ts +130 -2
- package/generated/ts-runtime/schemas.js +128 -0
- package/models/annotations.tsp +83 -0
- package/models/mcp-tools.tsp +436 -7
- package/models/metrics.tsp +198 -0
- package/models/saved-queries.tsp +212 -0
- package/package.json +6 -1
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
/** The same names at runtime, so a consumer can prove the published surface is covered. */
|
|
2
2
|
export const contractDefinitionKeys = [
|
|
3
|
+
"Annotations.Annotation",
|
|
4
|
+
"Annotations.AnnotationCreateRequest",
|
|
5
|
+
"Annotations.AnnotationTarget",
|
|
6
|
+
"Annotations.AnnotationUpdateRequest",
|
|
7
|
+
"Annotations.SessionAnnotationTarget",
|
|
8
|
+
"Annotations.SpanAnnotationTarget",
|
|
9
|
+
"Annotations.TraceAnnotationTarget",
|
|
3
10
|
"Common.Attribute",
|
|
4
11
|
"Common.AttributeBytesValue",
|
|
5
12
|
"Common.AttributeDouble",
|
|
@@ -11,13 +18,16 @@ export const contractDefinitionKeys = [
|
|
|
11
18
|
"Common.AttributeValue",
|
|
12
19
|
"Common.Attributes",
|
|
13
20
|
"Common.ByteSize",
|
|
21
|
+
"Common.CollectorKeyRole",
|
|
14
22
|
"Common.ContentType",
|
|
15
23
|
"Common.ContractRevision",
|
|
16
24
|
"Common.CostUsd",
|
|
17
25
|
"Common.Count",
|
|
26
|
+
"Common.Cursor",
|
|
18
27
|
"Common.DurationMs",
|
|
19
28
|
"Common.DurationNs",
|
|
20
29
|
"Common.DurationS",
|
|
30
|
+
"Common.ETag",
|
|
21
31
|
"Common.EntityAttributeKey",
|
|
22
32
|
"Common.EntityRef",
|
|
23
33
|
"Common.Errors.ApiError",
|
|
@@ -26,6 +36,8 @@ export const contractDefinitionKeys = [
|
|
|
26
36
|
"Common.Errors.ForbiddenError",
|
|
27
37
|
"Common.Errors.InternalServerError",
|
|
28
38
|
"Common.Errors.NotFoundError",
|
|
39
|
+
"Common.Errors.PreconditionFailedError",
|
|
40
|
+
"Common.Errors.PreconditionRequiredError",
|
|
29
41
|
"Common.Errors.ProblemDetails",
|
|
30
42
|
"Common.Errors.RateLimitError",
|
|
31
43
|
"Common.Errors.ServiceUnavailableError",
|
|
@@ -50,6 +62,8 @@ export const contractDefinitionKeys = [
|
|
|
50
62
|
"Common.Percentage",
|
|
51
63
|
"Common.Port",
|
|
52
64
|
"Common.Ratio",
|
|
65
|
+
"Common.ResourceBase",
|
|
66
|
+
"Common.ResourceId",
|
|
53
67
|
"Common.SemVer",
|
|
54
68
|
"Common.SessionId",
|
|
55
69
|
"Common.Sha256Hash",
|
|
@@ -79,20 +93,36 @@ export const contractDefinitionKeys = [
|
|
|
79
93
|
"Health.HealthCheckEntry",
|
|
80
94
|
"Health.HealthReport",
|
|
81
95
|
"Health.HealthStatus",
|
|
96
|
+
"Mcp.Tools.AnnotationOutput",
|
|
82
97
|
"Mcp.Tools.CiLogInput",
|
|
83
98
|
"Mcp.Tools.CiLogOutput",
|
|
84
99
|
"Mcp.Tools.CiPhase",
|
|
85
100
|
"Mcp.Tools.CiPhaseStatus",
|
|
86
101
|
"Mcp.Tools.CiRunSummary",
|
|
102
|
+
"Mcp.Tools.CreateAnnotationInput",
|
|
103
|
+
"Mcp.Tools.CreateSavedQueryInput",
|
|
104
|
+
"Mcp.Tools.DeletableKind",
|
|
105
|
+
"Mcp.Tools.DeleteInput",
|
|
106
|
+
"Mcp.Tools.DeleteOutput",
|
|
87
107
|
"Mcp.Tools.DisplayMcpDashboardInput",
|
|
88
108
|
"Mcp.Tools.DisplayMcpDashboardOutput",
|
|
89
109
|
"Mcp.Tools.DisplayTracesInput",
|
|
90
110
|
"Mcp.Tools.DisplayTracesOutput",
|
|
91
111
|
"Mcp.Tools.FetchTelemetryInput",
|
|
112
|
+
"Mcp.Tools.FetchTelemetryLogsInput",
|
|
113
|
+
"Mcp.Tools.FetchTelemetryMcpStatsInput",
|
|
92
114
|
"Mcp.Tools.FetchTelemetryOutput",
|
|
115
|
+
"Mcp.Tools.FetchTelemetryTraceInput",
|
|
116
|
+
"Mcp.Tools.FetchTelemetryTracesInput",
|
|
93
117
|
"Mcp.Tools.FetchTelemetryView",
|
|
118
|
+
"Mcp.Tools.GetMetricSeriesInput",
|
|
119
|
+
"Mcp.Tools.GetMetricSeriesOutput",
|
|
94
120
|
"Mcp.Tools.GetTraceInput",
|
|
95
121
|
"Mcp.Tools.GetTraceOutput",
|
|
122
|
+
"Mcp.Tools.ListMetricsInput",
|
|
123
|
+
"Mcp.Tools.ListMetricsOutput",
|
|
124
|
+
"Mcp.Tools.ListSavedQueriesInput",
|
|
125
|
+
"Mcp.Tools.ListSavedQueriesOutput",
|
|
96
126
|
"Mcp.Tools.ListSessionsInput",
|
|
97
127
|
"Mcp.Tools.ListSessionsOutput",
|
|
98
128
|
"Mcp.Tools.ListTracesInput",
|
|
@@ -103,9 +133,21 @@ export const contractDefinitionKeys = [
|
|
|
103
133
|
"Mcp.Tools.McpDashboardWindow",
|
|
104
134
|
"Mcp.Tools.McpDataMode",
|
|
105
135
|
"Mcp.Tools.McpNameRequestCount",
|
|
136
|
+
"Mcp.Tools.McpScope",
|
|
106
137
|
"Mcp.Tools.McpToolStats",
|
|
138
|
+
"Mcp.Tools.QueryMetricInput",
|
|
139
|
+
"Mcp.Tools.QueryMetricOutput",
|
|
140
|
+
"Mcp.Tools.RunSavedQueryInput",
|
|
141
|
+
"Mcp.Tools.RunSavedQueryOutput",
|
|
142
|
+
"Mcp.Tools.SavedQueryOutput",
|
|
107
143
|
"Mcp.Tools.SearchLogsInput",
|
|
108
144
|
"Mcp.Tools.SearchLogsOutput",
|
|
145
|
+
"Mcp.Tools.ToolError",
|
|
146
|
+
"Mcp.Tools.ToolErrorCode",
|
|
147
|
+
"Mcp.Tools.ToolPage",
|
|
148
|
+
"Mcp.Tools.ToolTimeRange",
|
|
149
|
+
"Mcp.Tools.UpdateAnnotationInput",
|
|
150
|
+
"Mcp.Tools.UpdateSavedQueryInput",
|
|
109
151
|
"OTel.Enums.ErrorType",
|
|
110
152
|
"OTel.Enums.EventDomain",
|
|
111
153
|
"OTel.Enums.SeverityNumber",
|
|
@@ -117,9 +159,11 @@ export const contractDefinitionKeys = [
|
|
|
117
159
|
"OTel.Logs.LogRecord",
|
|
118
160
|
"OTel.Logs.LogTemplate",
|
|
119
161
|
"OTel.Metrics.MetricAggregation",
|
|
162
|
+
"OTel.Metrics.MetricAttributeMatcher",
|
|
120
163
|
"OTel.Metrics.MetricBucket",
|
|
121
164
|
"OTel.Metrics.MetricDescriptor",
|
|
122
165
|
"OTel.Metrics.MetricKind",
|
|
166
|
+
"OTel.Metrics.MetricMatcherOp",
|
|
123
167
|
"OTel.Metrics.MetricQueryResult",
|
|
124
168
|
"OTel.Metrics.MetricSeries",
|
|
125
169
|
"OTel.Metrics.MetricSeriesResult",
|
|
@@ -137,6 +181,37 @@ export const contractDefinitionKeys = [
|
|
|
137
181
|
"OTel.Traces.SpanStatus",
|
|
138
182
|
"OTel.Traces.Trace",
|
|
139
183
|
"OTel.Traces.TraceSummary",
|
|
184
|
+
"Operations.AnnotationsApi_create.Request",
|
|
185
|
+
"Operations.AnnotationsApi_create.Response.201",
|
|
186
|
+
"Operations.AnnotationsApi_create.Response.400",
|
|
187
|
+
"Operations.AnnotationsApi_create.Response.401",
|
|
188
|
+
"Operations.AnnotationsApi_create.Response.403",
|
|
189
|
+
"Operations.AnnotationsApi_create.Response.404",
|
|
190
|
+
"Operations.AnnotationsApi_create.Response.409",
|
|
191
|
+
"Operations.AnnotationsApi_create.Response.500",
|
|
192
|
+
"Operations.AnnotationsApi_delete.Response.401",
|
|
193
|
+
"Operations.AnnotationsApi_delete.Response.403",
|
|
194
|
+
"Operations.AnnotationsApi_delete.Response.404",
|
|
195
|
+
"Operations.AnnotationsApi_delete.Response.412",
|
|
196
|
+
"Operations.AnnotationsApi_delete.Response.428",
|
|
197
|
+
"Operations.AnnotationsApi_delete.Response.500",
|
|
198
|
+
"Operations.AnnotationsApi_get.Response.200",
|
|
199
|
+
"Operations.AnnotationsApi_get.Response.401",
|
|
200
|
+
"Operations.AnnotationsApi_get.Response.404",
|
|
201
|
+
"Operations.AnnotationsApi_get.Response.500",
|
|
202
|
+
"Operations.AnnotationsApi_list.Response.200",
|
|
203
|
+
"Operations.AnnotationsApi_list.Response.400",
|
|
204
|
+
"Operations.AnnotationsApi_list.Response.401",
|
|
205
|
+
"Operations.AnnotationsApi_list.Response.500",
|
|
206
|
+
"Operations.AnnotationsApi_update.Request",
|
|
207
|
+
"Operations.AnnotationsApi_update.Response.200",
|
|
208
|
+
"Operations.AnnotationsApi_update.Response.400",
|
|
209
|
+
"Operations.AnnotationsApi_update.Response.401",
|
|
210
|
+
"Operations.AnnotationsApi_update.Response.403",
|
|
211
|
+
"Operations.AnnotationsApi_update.Response.404",
|
|
212
|
+
"Operations.AnnotationsApi_update.Response.412",
|
|
213
|
+
"Operations.AnnotationsApi_update.Response.428",
|
|
214
|
+
"Operations.AnnotationsApi_update.Response.500",
|
|
140
215
|
"Operations.LogsApi_list.Response.200",
|
|
141
216
|
"Operations.LogsApi_list.Response.400",
|
|
142
217
|
"Operations.LogsApi_list.Response.401",
|
|
@@ -181,6 +256,43 @@ export const contractDefinitionKeys = [
|
|
|
181
256
|
"Operations.RunnerResourcesApi_streamLogs.Response.404",
|
|
182
257
|
"Operations.RunnerResourcesApi_streamLogs.Response.500",
|
|
183
258
|
"Operations.RunnerResourcesApi_streamLogs.Response.503",
|
|
259
|
+
"Operations.SavedQueriesApi_create.Request",
|
|
260
|
+
"Operations.SavedQueriesApi_create.Response.201",
|
|
261
|
+
"Operations.SavedQueriesApi_create.Response.400",
|
|
262
|
+
"Operations.SavedQueriesApi_create.Response.401",
|
|
263
|
+
"Operations.SavedQueriesApi_create.Response.403",
|
|
264
|
+
"Operations.SavedQueriesApi_create.Response.409",
|
|
265
|
+
"Operations.SavedQueriesApi_create.Response.500",
|
|
266
|
+
"Operations.SavedQueriesApi_delete.Response.401",
|
|
267
|
+
"Operations.SavedQueriesApi_delete.Response.403",
|
|
268
|
+
"Operations.SavedQueriesApi_delete.Response.404",
|
|
269
|
+
"Operations.SavedQueriesApi_delete.Response.412",
|
|
270
|
+
"Operations.SavedQueriesApi_delete.Response.428",
|
|
271
|
+
"Operations.SavedQueriesApi_delete.Response.500",
|
|
272
|
+
"Operations.SavedQueriesApi_get.Response.200",
|
|
273
|
+
"Operations.SavedQueriesApi_get.Response.401",
|
|
274
|
+
"Operations.SavedQueriesApi_get.Response.404",
|
|
275
|
+
"Operations.SavedQueriesApi_get.Response.500",
|
|
276
|
+
"Operations.SavedQueriesApi_list.Response.200",
|
|
277
|
+
"Operations.SavedQueriesApi_list.Response.400",
|
|
278
|
+
"Operations.SavedQueriesApi_list.Response.401",
|
|
279
|
+
"Operations.SavedQueriesApi_list.Response.500",
|
|
280
|
+
"Operations.SavedQueriesApi_run.Request",
|
|
281
|
+
"Operations.SavedQueriesApi_run.Response.200",
|
|
282
|
+
"Operations.SavedQueriesApi_run.Response.400",
|
|
283
|
+
"Operations.SavedQueriesApi_run.Response.401",
|
|
284
|
+
"Operations.SavedQueriesApi_run.Response.404",
|
|
285
|
+
"Operations.SavedQueriesApi_run.Response.500",
|
|
286
|
+
"Operations.SavedQueriesApi_update.Request",
|
|
287
|
+
"Operations.SavedQueriesApi_update.Response.200",
|
|
288
|
+
"Operations.SavedQueriesApi_update.Response.400",
|
|
289
|
+
"Operations.SavedQueriesApi_update.Response.401",
|
|
290
|
+
"Operations.SavedQueriesApi_update.Response.403",
|
|
291
|
+
"Operations.SavedQueriesApi_update.Response.404",
|
|
292
|
+
"Operations.SavedQueriesApi_update.Response.409",
|
|
293
|
+
"Operations.SavedQueriesApi_update.Response.412",
|
|
294
|
+
"Operations.SavedQueriesApi_update.Response.428",
|
|
295
|
+
"Operations.SavedQueriesApi_update.Response.500",
|
|
184
296
|
"Operations.SessionsApi_get.Response.200",
|
|
185
297
|
"Operations.SessionsApi_get.Response.401",
|
|
186
298
|
"Operations.SessionsApi_get.Response.404",
|
|
@@ -190,6 +302,7 @@ export const contractDefinitionKeys = [
|
|
|
190
302
|
"Operations.SessionsApi_getStats.Response.401",
|
|
191
303
|
"Operations.SessionsApi_getStats.Response.500",
|
|
192
304
|
"Operations.SessionsApi_getTraces.Response.200",
|
|
305
|
+
"Operations.SessionsApi_getTraces.Response.400",
|
|
193
306
|
"Operations.SessionsApi_getTraces.Response.401",
|
|
194
307
|
"Operations.SessionsApi_getTraces.Response.404",
|
|
195
308
|
"Operations.SessionsApi_getTraces.Response.500",
|
|
@@ -206,6 +319,7 @@ export const contractDefinitionKeys = [
|
|
|
206
319
|
"Operations.TracesApi_get.Response.404",
|
|
207
320
|
"Operations.TracesApi_get.Response.500",
|
|
208
321
|
"Operations.TracesApi_getSpans.Response.200",
|
|
322
|
+
"Operations.TracesApi_getSpans.Response.400",
|
|
209
323
|
"Operations.TracesApi_getSpans.Response.401",
|
|
210
324
|
"Operations.TracesApi_getSpans.Response.404",
|
|
211
325
|
"Operations.TracesApi_getSpans.Response.500",
|
|
@@ -549,6 +663,20 @@ export const contractDefinitionKeys = [
|
|
|
549
663
|
"Runner.RunnerResourceKind",
|
|
550
664
|
"Runner.RunnerResourceLifecycle",
|
|
551
665
|
"Runner.RunnerResourceState",
|
|
666
|
+
"SavedQueries.SavedLogQueryFilter",
|
|
667
|
+
"SavedQueries.SavedLogQueryRun",
|
|
668
|
+
"SavedQueries.SavedMetricQueryFilter",
|
|
669
|
+
"SavedQueries.SavedMetricQueryRun",
|
|
670
|
+
"SavedQueries.SavedQuery",
|
|
671
|
+
"SavedQueries.SavedQueryCreateRequest",
|
|
672
|
+
"SavedQueries.SavedQueryFilter",
|
|
673
|
+
"SavedQueries.SavedQueryRunRequest",
|
|
674
|
+
"SavedQueries.SavedQueryRunResult",
|
|
675
|
+
"SavedQueries.SavedQuerySignal",
|
|
676
|
+
"SavedQueries.SavedQueryUpdateRequest",
|
|
677
|
+
"SavedQueries.SavedQueryWindow",
|
|
678
|
+
"SavedQueries.SavedTraceQueryFilter",
|
|
679
|
+
"SavedQueries.SavedTraceQueryRun",
|
|
552
680
|
"Streaming.HeartbeatEvent",
|
|
553
681
|
"Streaming.LogEvents",
|
|
554
682
|
"Streaming.LogStreamEvent",
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// Annotations: user notes on a trace, span or session
|
|
3
|
+
// =============================================================================
|
|
4
|
+
// A note the user writes inside the verified subject's qyl project. It never
|
|
5
|
+
// changes the telemetry it points at. get_trace and list_sessions read
|
|
6
|
+
// annotations back, so there is no annotation listing tool.
|
|
7
|
+
// =============================================================================
|
|
8
|
+
|
|
9
|
+
import "@typespec/http";
|
|
10
|
+
import "@typespec/openapi";
|
|
11
|
+
import "../common/types.tsp";
|
|
12
|
+
import "../common/resource.tsp";
|
|
13
|
+
|
|
14
|
+
using TypeSpec.OpenAPI;
|
|
15
|
+
using Qyl.Api.Contracts.Common;
|
|
16
|
+
|
|
17
|
+
namespace Qyl.Api.Contracts.Annotations;
|
|
18
|
+
|
|
19
|
+
@doc("An annotation on one whole trace.")
|
|
20
|
+
model TraceAnnotationTarget {
|
|
21
|
+
kind: "trace";
|
|
22
|
+
|
|
23
|
+
@encodedName("application/json", "trace_id")
|
|
24
|
+
traceId: TraceId;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@doc("An annotation on one span of a trace.")
|
|
28
|
+
model SpanAnnotationTarget {
|
|
29
|
+
kind: "span";
|
|
30
|
+
|
|
31
|
+
@encodedName("application/json", "trace_id")
|
|
32
|
+
traceId: TraceId;
|
|
33
|
+
|
|
34
|
+
@encodedName("application/json", "span_id")
|
|
35
|
+
spanId: SpanId;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@doc("An annotation on one session.")
|
|
39
|
+
model SessionAnnotationTarget {
|
|
40
|
+
kind: "session";
|
|
41
|
+
|
|
42
|
+
@encodedName("application/json", "session_id")
|
|
43
|
+
sessionId: SessionId;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@doc("Exactly one telemetry object an annotation is attached to.")
|
|
47
|
+
@oneOf
|
|
48
|
+
union AnnotationTarget {
|
|
49
|
+
trace: TraceAnnotationTarget,
|
|
50
|
+
span: SpanAnnotationTarget,
|
|
51
|
+
session: SessionAnnotationTarget,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@doc("A user note attached to a trace, span or session.")
|
|
55
|
+
model Annotation extends ResourceBase {
|
|
56
|
+
@doc("What the note is attached to. Fixed at creation.")
|
|
57
|
+
@visibility(Lifecycle.Read, Lifecycle.Create)
|
|
58
|
+
target: AnnotationTarget;
|
|
59
|
+
|
|
60
|
+
@doc("The note, plain text, at most 2000 characters.")
|
|
61
|
+
@minLength(1)
|
|
62
|
+
@maxLength(2000)
|
|
63
|
+
text: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@doc("Body of POST /api/v1/annotations: the `Lifecycle.Create` members of Annotation.")
|
|
67
|
+
model AnnotationCreateRequest {
|
|
68
|
+
@doc("What the note is attached to. Fixed at creation.")
|
|
69
|
+
target: AnnotationTarget;
|
|
70
|
+
|
|
71
|
+
@doc("The note, plain text, at most 2000 characters.")
|
|
72
|
+
@minLength(1)
|
|
73
|
+
@maxLength(2000)
|
|
74
|
+
text: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@doc("Body of PATCH /api/v1/annotations/{annotation_id}: the `Lifecycle.Update` members of Annotation.")
|
|
78
|
+
model AnnotationUpdateRequest {
|
|
79
|
+
@doc("The new note, plain text, at most 2000 characters.")
|
|
80
|
+
@minLength(1)
|
|
81
|
+
@maxLength(2000)
|
|
82
|
+
text: string;
|
|
83
|
+
}
|