@ancplua/qyl-api-schema 0.4.0 → 0.5.1
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 +52 -64
- package/api/routes.tsp +90 -943
- package/api/runner.tsp +99 -0
- package/api/streaming.tsp +13 -299
- package/common/errors.tsp +14 -1
- package/common/pagination.tsp +1 -1
- package/common/types.tsp +2 -41
- package/generated/json-schema/qyl-api-schema.json +3868 -0
- package/generated/openapi/qyl.openapi.json +6919 -0
- package/generated/ts-runtime/api.d.ts +886 -0
- package/generated/ts-runtime/api.js +237 -0
- package/index.tsp +8 -34
- package/models/health.tsp +22 -0
- package/models/mcp-tools.tsp +217 -0
- package/models/runner-mcp.tsp +76 -0
- package/models/runner.tsp +67 -0
- package/models/session.tsp +1 -1
- package/otel/enums.tsp +1 -1
- package/otel/logs.tsp +1 -1
- package/otel/otel-conventions.tsp +0 -1
- package/otel/profiles.tsp +1 -1
- package/otel/resource.tsp +1 -1
- package/otel/span.tsp +9 -6
- package/package.json +56 -36
- package/VERSIONING.md +0 -88
- package/generated/README.md +0 -35
- package/intelligence/causal-rules.tsp +0 -34
- package/intelligence/diagnostic-patterns.tsp +0 -54
- package/intelligence/investigation-strategies.tsp +0 -37
- package/intelligence/main.tsp +0 -17
- package/intelligence/seed/patterns.tsp +0 -171
- package/intelligence/seed/rules.tsp +0 -43
- package/intelligence/seed/strategies.tsp +0 -55
- package/intelligence/signals.tsp +0 -60
- package/models/agent/agent-run.tsp +0 -154
- package/models/agent/tool-call.tsp +0 -122
- package/models/agent/workflow-checkpoint.tsp +0 -50
- package/models/agent/workflow-execution.tsp +0 -136
- package/models/alerting.tsp +0 -436
- package/models/configurator.tsp +0 -433
- package/models/control-graph.tsp +0 -197
- package/models/db.tsp +0 -767
- package/models/deployment.tsp +0 -365
- package/models/error.tsp +0 -433
- package/models/genai.tsp +0 -1305
- package/models/http.tsp +0 -547
- package/models/identity.tsp +0 -213
- package/models/issues.tsp +0 -484
- package/models/log.tsp +0 -140
- package/models/messaging.tsp +0 -304
- package/models/otel-config.tsp +0 -455
- package/models/retention.tsp +0 -240
- package/models/rpc.tsp +0 -309
- package/models/search.tsp +0 -243
- package/models/system.tsp +0 -400
- package/models/test.tsp +0 -346
- package/models/triage.tsp +0 -113
- package/models/workflow.tsp +0 -396
- package/models/workspace.tsp +0 -435
- package/otel/metrics.tsp +0 -358
- package/tspconfig.yaml +0 -49
package/common/types.tsp
CHANGED
|
@@ -6,12 +6,8 @@
|
|
|
6
6
|
// (GenAI keys come from the dedicated GenAI registry since the 1.42 split).
|
|
7
7
|
// =============================================================================
|
|
8
8
|
|
|
9
|
-
import "@typespec/versioning";
|
|
10
|
-
import "@typespec/json-schema";
|
|
11
9
|
import "@typespec/openapi";
|
|
12
10
|
|
|
13
|
-
using TypeSpec.Versioning;
|
|
14
|
-
using TypeSpec.JsonSchema;
|
|
15
11
|
using TypeSpec.OpenAPI;
|
|
16
12
|
|
|
17
13
|
namespace Qyl.Api.Contracts.Common;
|
|
@@ -19,12 +15,9 @@ namespace Qyl.Api.Contracts.Common;
|
|
|
19
15
|
// =============================================================================
|
|
20
16
|
// Identifier Scalars - Strongly Typed IDs
|
|
21
17
|
// =============================================================================
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
// otel-keys.gen.tsp header and .nuke/parameters.json OtelKeysVersion, both
|
|
25
|
-
// machine-checked; a prose enum of upstream releases only rots.)
|
|
18
|
+
// The semantic-conventions pin lives in the generated keys header and is
|
|
19
|
+
// machine-checked; a hand-maintained enum of upstream releases would only drift.
|
|
26
20
|
|
|
27
|
-
@jsonSchema
|
|
28
21
|
@doc("Unique trace identifier (32 lowercase hex characters)")
|
|
29
22
|
@pattern("^[a-f0-9]{32}$")
|
|
30
23
|
@minLength(32)
|
|
@@ -34,7 +27,6 @@ namespace Qyl.Api.Contracts.Common;
|
|
|
34
27
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "TraceId")
|
|
35
28
|
scalar TraceId extends string;
|
|
36
29
|
|
|
37
|
-
@jsonSchema
|
|
38
30
|
@doc("Unique span identifier (16 lowercase hex characters)")
|
|
39
31
|
@pattern("^[a-f0-9]{16}$")
|
|
40
32
|
@minLength(16)
|
|
@@ -44,18 +36,15 @@ scalar TraceId extends string;
|
|
|
44
36
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "SpanId")
|
|
45
37
|
scalar SpanId extends string;
|
|
46
38
|
|
|
47
|
-
@jsonSchema
|
|
48
39
|
@doc("W3C Trace Context traceparent header format")
|
|
49
40
|
@pattern("^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$")
|
|
50
41
|
@example("00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01")
|
|
51
42
|
scalar TraceParent extends string;
|
|
52
43
|
|
|
53
|
-
@jsonSchema
|
|
54
44
|
@doc("W3C Trace Context tracestate header (vendor-specific key-value pairs)")
|
|
55
45
|
@example("rojo=00f067aa0ba902b7,congo=t61rcWkgMzE")
|
|
56
46
|
scalar TraceState extends string;
|
|
57
47
|
|
|
58
|
-
@jsonSchema
|
|
59
48
|
@doc("Unique session identifier")
|
|
60
49
|
@minLength(1)
|
|
61
50
|
@maxLength(128)
|
|
@@ -63,7 +52,6 @@ scalar TraceState extends string;
|
|
|
63
52
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "SessionId")
|
|
64
53
|
scalar SessionId extends string;
|
|
65
54
|
|
|
66
|
-
@jsonSchema
|
|
67
55
|
@doc("User identifier (pseudonymized for privacy)")
|
|
68
56
|
@minLength(1)
|
|
69
57
|
@maxLength(256)
|
|
@@ -73,35 +61,29 @@ scalar UserId extends string;
|
|
|
73
61
|
// Temporal Scalars - Timestamps & Durations
|
|
74
62
|
// =============================================================================
|
|
75
63
|
|
|
76
|
-
@jsonSchema
|
|
77
64
|
@doc("ISO 8601 timestamp with nanosecond precision (RFC 3339)")
|
|
78
65
|
@encode(DateTimeKnownEncoding.rfc3339)
|
|
79
66
|
scalar Timestamp extends utcDateTime;
|
|
80
67
|
|
|
81
|
-
@jsonSchema
|
|
82
68
|
@doc("Unsigned Unix timestamp in nanoseconds since epoch")
|
|
83
69
|
@minValue(0)
|
|
84
70
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "ulong")
|
|
85
71
|
scalar UnixNanos extends uint64;
|
|
86
72
|
|
|
87
|
-
@jsonSchema
|
|
88
73
|
@doc("Duration in nanoseconds")
|
|
89
74
|
@minValue(0)
|
|
90
75
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "ulong")
|
|
91
76
|
scalar DurationNs extends uint64;
|
|
92
77
|
|
|
93
|
-
@jsonSchema
|
|
94
78
|
@doc("Duration in milliseconds")
|
|
95
79
|
@minValue(0)
|
|
96
80
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "double")
|
|
97
81
|
scalar DurationMs extends float64;
|
|
98
82
|
|
|
99
|
-
@jsonSchema
|
|
100
83
|
@doc("Duration in seconds")
|
|
101
84
|
@minValue(0)
|
|
102
85
|
scalar DurationS extends float64;
|
|
103
86
|
|
|
104
|
-
@jsonSchema
|
|
105
87
|
@doc("ISO 8601 duration format (e.g., PT1H30M)")
|
|
106
88
|
@encode(DurationKnownEncoding.ISO8601)
|
|
107
89
|
scalar IsoDuration extends duration;
|
|
@@ -110,29 +92,24 @@ scalar IsoDuration extends duration;
|
|
|
110
92
|
// Network Scalars - IP Addresses & Ports
|
|
111
93
|
// =============================================================================
|
|
112
94
|
|
|
113
|
-
@jsonSchema
|
|
114
95
|
@doc("IPv4 address in dotted-decimal notation")
|
|
115
96
|
@pattern("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$")
|
|
116
97
|
@example("192.168.1.1")
|
|
117
98
|
scalar IPv4Address extends string;
|
|
118
99
|
|
|
119
|
-
@jsonSchema
|
|
120
100
|
@doc("IPv6 address in standard notation")
|
|
121
101
|
@example("2001:0db8:85a3:0000:0000:8a2e:0370:7334")
|
|
122
102
|
scalar IPv6Address extends string;
|
|
123
103
|
|
|
124
|
-
@jsonSchema
|
|
125
104
|
@doc("IP address (IPv4 or IPv6)")
|
|
126
105
|
scalar IpAddress extends string;
|
|
127
106
|
|
|
128
|
-
@jsonSchema
|
|
129
107
|
@doc("Network port number (1-65535)")
|
|
130
108
|
@minValue(1)
|
|
131
109
|
@maxValue(65535)
|
|
132
110
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "int")
|
|
133
111
|
scalar Port extends int32;
|
|
134
112
|
|
|
135
|
-
@jsonSchema
|
|
136
113
|
@doc("MAC address in colon-separated hex notation")
|
|
137
114
|
@pattern("^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$")
|
|
138
115
|
@example("00:1A:2B:3C:4D:5E")
|
|
@@ -142,32 +119,27 @@ scalar MacAddress extends string;
|
|
|
142
119
|
// Size & Count Scalars
|
|
143
120
|
// =============================================================================
|
|
144
121
|
|
|
145
|
-
@jsonSchema
|
|
146
122
|
@doc("Size in bytes")
|
|
147
123
|
@minValue(0)
|
|
148
124
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "long")
|
|
149
125
|
scalar ByteSize extends int64;
|
|
150
126
|
|
|
151
|
-
@jsonSchema
|
|
152
127
|
@doc("Token count (for LLM operations)")
|
|
153
128
|
@minValue(0)
|
|
154
129
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "long")
|
|
155
130
|
scalar TokenCount extends int64;
|
|
156
131
|
|
|
157
|
-
@jsonSchema
|
|
158
132
|
@doc("Generic non-negative counter")
|
|
159
133
|
@minValue(0)
|
|
160
134
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "long")
|
|
161
135
|
scalar Count extends int64;
|
|
162
136
|
|
|
163
|
-
@jsonSchema
|
|
164
137
|
@doc("Percentage value (0.0 to 100.0)")
|
|
165
138
|
@minValue(0.0)
|
|
166
139
|
@maxValue(100.0)
|
|
167
140
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "double")
|
|
168
141
|
scalar Percentage extends float64;
|
|
169
142
|
|
|
170
|
-
@jsonSchema
|
|
171
143
|
@doc("Ratio value (0.0 to 1.0)")
|
|
172
144
|
@minValue(0.0)
|
|
173
145
|
@maxValue(1.0)
|
|
@@ -178,13 +150,11 @@ scalar Ratio extends float64;
|
|
|
178
150
|
// GenAI-Specific Scalars
|
|
179
151
|
// =============================================================================
|
|
180
152
|
|
|
181
|
-
@jsonSchema
|
|
182
153
|
@doc("Cost in USD (floating point)")
|
|
183
154
|
@minValue(0)
|
|
184
155
|
@TypeSpec.OpenAPI.extension("x-csharp-type", "double")
|
|
185
156
|
scalar CostUsd extends float64;
|
|
186
157
|
|
|
187
|
-
@jsonSchema
|
|
188
158
|
@doc("Temperature setting for LLM requests (0.0-2.0)")
|
|
189
159
|
@minValue(0)
|
|
190
160
|
@maxValue(2)
|
|
@@ -195,50 +165,41 @@ scalar Temperature extends float64;
|
|
|
195
165
|
// Semantic Scalars - Special Purpose Types
|
|
196
166
|
// =============================================================================
|
|
197
167
|
|
|
198
|
-
@jsonSchema
|
|
199
168
|
@doc("SHA-256 hash in lowercase hex")
|
|
200
169
|
@pattern("^[a-f0-9]{64}$")
|
|
201
170
|
@minLength(64)
|
|
202
171
|
@maxLength(64)
|
|
203
172
|
scalar Sha256Hash extends string;
|
|
204
173
|
|
|
205
|
-
@jsonSchema
|
|
206
174
|
@doc("Semantic version string (e.g., 1.2.3)")
|
|
207
175
|
@pattern("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$")
|
|
208
176
|
@example("2.1.0")
|
|
209
177
|
scalar SemVer extends string;
|
|
210
178
|
|
|
211
|
-
@jsonSchema
|
|
212
179
|
@doc("URL string (absolute)")
|
|
213
180
|
@format("uri")
|
|
214
181
|
scalar UrlString extends string;
|
|
215
182
|
|
|
216
|
-
@jsonSchema
|
|
217
183
|
@doc("URL path component")
|
|
218
184
|
@example("/api/v1/users")
|
|
219
185
|
scalar UrlPath extends string;
|
|
220
186
|
|
|
221
|
-
@jsonSchema
|
|
222
187
|
@doc("URL query string (without leading ?)")
|
|
223
188
|
@example("page=1&limit=100")
|
|
224
189
|
scalar UrlQuery extends string;
|
|
225
190
|
|
|
226
|
-
@jsonSchema
|
|
227
191
|
@doc("HTTP method name (uppercase)")
|
|
228
192
|
@example("GET")
|
|
229
193
|
scalar HttpMethod extends string;
|
|
230
194
|
|
|
231
|
-
@jsonSchema
|
|
232
195
|
@doc("MIME content type")
|
|
233
196
|
@example("application/json")
|
|
234
197
|
scalar ContentType extends string;
|
|
235
198
|
|
|
236
|
-
@jsonSchema
|
|
237
199
|
@doc("User agent string")
|
|
238
200
|
@example("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36")
|
|
239
201
|
scalar UserAgent extends string;
|
|
240
202
|
|
|
241
|
-
@jsonSchema
|
|
242
203
|
@doc("Language/locale code (BCP 47)")
|
|
243
204
|
@pattern("^[a-z]{2,3}(-[A-Z]{2})?$")
|
|
244
205
|
@example("en-US")
|