@ancplua/qyl-api-schema 0.2.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.
Files changed (54) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +89 -0
  3. package/VERSIONING.md +74 -0
  4. package/api/routes.tsp +1052 -0
  5. package/api/streaming.tsp +335 -0
  6. package/common/errors.tsp +206 -0
  7. package/common/pagination.tsp +254 -0
  8. package/common/types.tsp +345 -0
  9. package/generated/README.md +26 -0
  10. package/generated/otel-keys.gen.tsp +1648 -0
  11. package/index.tsp +55 -0
  12. package/intelligence/causal-rules.tsp +34 -0
  13. package/intelligence/diagnostic-patterns.tsp +54 -0
  14. package/intelligence/investigation-strategies.tsp +37 -0
  15. package/intelligence/main.tsp +19 -0
  16. package/intelligence/seed/patterns.tsp +172 -0
  17. package/intelligence/seed/rules.tsp +44 -0
  18. package/intelligence/seed/strategies.tsp +56 -0
  19. package/intelligence/signals.tsp +60 -0
  20. package/models/agent/agent-run.tsp +154 -0
  21. package/models/agent/tool-call.tsp +122 -0
  22. package/models/agent/workflow-checkpoint.tsp +50 -0
  23. package/models/agent/workflow-execution.tsp +136 -0
  24. package/models/alerting.tsp +436 -0
  25. package/models/configurator.tsp +433 -0
  26. package/models/control-graph.tsp +197 -0
  27. package/models/db.tsp +810 -0
  28. package/models/deployment.tsp +365 -0
  29. package/models/error.tsp +433 -0
  30. package/models/genai.tsp +1368 -0
  31. package/models/http.tsp +600 -0
  32. package/models/identity.tsp +213 -0
  33. package/models/issues.tsp +484 -0
  34. package/models/log.tsp +140 -0
  35. package/models/messaging.tsp +304 -0
  36. package/models/otel-config.tsp +455 -0
  37. package/models/retention.tsp +240 -0
  38. package/models/rpc.tsp +309 -0
  39. package/models/search.tsp +243 -0
  40. package/models/session.tsp +274 -0
  41. package/models/system.tsp +400 -0
  42. package/models/test.tsp +346 -0
  43. package/models/triage.tsp +113 -0
  44. package/models/workflow.tsp +396 -0
  45. package/models/workspace.tsp +435 -0
  46. package/otel/enums.tsp +392 -0
  47. package/otel/logs.tsp +135 -0
  48. package/otel/metrics.tsp +358 -0
  49. package/otel/otel-conventions.tsp +14 -0
  50. package/otel/profiles.tsp +335 -0
  51. package/otel/resource.tsp +257 -0
  52. package/otel/span.tsp +307 -0
  53. package/package.json +88 -0
  54. package/tspconfig.yaml +49 -0
@@ -0,0 +1,254 @@
1
+ // =============================================================================
2
+ // ANcpLua v2.0 - Pagination Templates
3
+ // =============================================================================
4
+ // Reusable pagination patterns for list operations.
5
+ // =============================================================================
6
+
7
+ import "@typespec/http";
8
+ import "./types.tsp";
9
+
10
+ using TypeSpec.Http;
11
+
12
+ namespace Qyl.Api.Contracts.Common.Pagination;
13
+
14
+ // =============================================================================
15
+ // Cursor-Based Pagination (Preferred for Large Datasets)
16
+ // =============================================================================
17
+
18
+ @doc("Cursor-based pagination parameters")
19
+ model CursorPaginationParams {
20
+ @doc("Opaque cursor for fetching the next page")
21
+ @query
22
+ cursor?: string;
23
+
24
+ @doc("Maximum number of items to return (1-1000)")
25
+ @query
26
+ @minValue(1)
27
+ @maxValue(1000)
28
+ limit?: int32 = 100;
29
+
30
+ @doc("Sort direction")
31
+ @query
32
+ order?: SortOrder = SortOrder.desc;
33
+ }
34
+
35
+ @doc("Sort order")
36
+ enum SortOrder {
37
+ @doc("Ascending order (oldest first)")
38
+ asc,
39
+
40
+ @doc("Descending order (newest first)")
41
+ desc,
42
+ }
43
+
44
+ @doc("Cursor-based paginated response wrapper")
45
+ model CursorPage<T> {
46
+ @doc("List of items in this page")
47
+ @pageItems
48
+ items: T[];
49
+
50
+ @doc("Cursor for the next page (null if no more pages)")
51
+ @encodedName("application/json", "next_cursor")
52
+ @nextLink
53
+ nextCursor?: string;
54
+
55
+ @doc("Cursor for the previous page (null if first page)")
56
+ @encodedName("application/json", "prev_cursor")
57
+ prevCursor?: string;
58
+
59
+ @doc("Whether there are more items available")
60
+ @encodedName("application/json", "has_more")
61
+ hasMore: boolean;
62
+ }
63
+
64
+ // =============================================================================
65
+ // Offset-Based Pagination (For Small/Medium Datasets)
66
+ // =============================================================================
67
+
68
+ @doc("Offset-based pagination parameters")
69
+ model OffsetPaginationParams {
70
+ @doc("Page number (1-indexed)")
71
+ @query
72
+ @pageIndex
73
+ @minValue(1)
74
+ page?: int32 = 1;
75
+
76
+ @doc("Items per page (1-1000)")
77
+ @query
78
+ @pageSize
79
+ @minValue(1)
80
+ @maxValue(1000)
81
+ @encodedName("application/json", "page_size")
82
+ pageSize?: int32 = 100;
83
+ }
84
+
85
+ @doc("Offset-based paginated response wrapper")
86
+ model OffsetPage<T> {
87
+ @doc("List of items in this page")
88
+ @pageItems
89
+ items: T[];
90
+
91
+ @doc("Current page number")
92
+ page: int32;
93
+
94
+ @doc("Items per page")
95
+ @encodedName("application/json", "page_size")
96
+ pageSize: int32;
97
+
98
+ @doc("Total number of items across all pages")
99
+ @encodedName("application/json", "total_count")
100
+ totalCount: int64;
101
+
102
+ @doc("Total number of pages")
103
+ @encodedName("application/json", "total_pages")
104
+ totalPages: int32;
105
+
106
+ @doc("Whether there is a next page")
107
+ @encodedName("application/json", "has_next")
108
+ hasNext: boolean;
109
+
110
+ @doc("Whether there is a previous page")
111
+ @encodedName("application/json", "has_prev")
112
+ hasPrev: boolean;
113
+ }
114
+
115
+ // =============================================================================
116
+ // Time-Range Pagination (For Time-Series Data)
117
+ // =============================================================================
118
+
119
+ @doc("Time-range based query parameters")
120
+ model TimeRangeParams {
121
+ @doc("Start of time range (inclusive)")
122
+ @query
123
+ @encodedName("application/json", "start_time")
124
+ startTime?: utcDateTime;
125
+
126
+ @doc("End of time range (exclusive)")
127
+ @query
128
+ @encodedName("application/json", "end_time")
129
+ endTime?: utcDateTime;
130
+
131
+ @doc("Maximum number of items to return")
132
+ @query
133
+ @minValue(1)
134
+ @maxValue(10000)
135
+ limit?: int32 = 1000;
136
+ }
137
+
138
+ @doc("Time-range paginated response with continuation")
139
+ model TimeRangePage<T> {
140
+ @doc("List of items in this page")
141
+ @pageItems
142
+ items: T[];
143
+
144
+ @doc("Actual start time of returned data")
145
+ @encodedName("application/json", "start_time")
146
+ startTime: utcDateTime;
147
+
148
+ @doc("Actual end time of returned data")
149
+ @encodedName("application/json", "end_time")
150
+ endTime: utcDateTime;
151
+
152
+ @doc("Continuation token for next time window")
153
+ @encodedName("application/json", "continuation_token")
154
+ @continuationToken
155
+ continuationToken?: string;
156
+
157
+ @doc("Whether there is more data in the time range")
158
+ @encodedName("application/json", "has_more")
159
+ hasMore: boolean;
160
+
161
+ @doc("Number of items returned")
162
+ count: int32;
163
+ }
164
+
165
+ // =============================================================================
166
+ // Streaming Pagination (For Real-Time Data)
167
+ // =============================================================================
168
+
169
+ @doc("Streaming parameters for SSE endpoints")
170
+ model StreamParams {
171
+ @doc("Include historical data from this timestamp")
172
+ @query
173
+ since?: utcDateTime;
174
+
175
+ @doc("Filter by trace ID")
176
+ @query
177
+ @encodedName("application/json", "trace_id")
178
+ traceId?: string;
179
+
180
+ @doc("Filter by service name")
181
+ @query
182
+ @encodedName("application/json", "service_name")
183
+ serviceName?: string;
184
+
185
+ @doc("Maximum events per second (rate limiting)")
186
+ @query
187
+ @encodedName("application/json", "max_events_per_second")
188
+ @minValue(1)
189
+ @maxValue(1000)
190
+ maxEventsPerSecond?: int32 = 100;
191
+ }
192
+
193
+ @doc("SSE event wrapper for streaming")
194
+ model StreamEvent<T> {
195
+ @doc("Event ID for resumption")
196
+ id: string;
197
+
198
+ @doc("Event type")
199
+ @encodedName("application/json", "event_type")
200
+ eventType: string;
201
+
202
+ @doc("Event timestamp")
203
+ timestamp: utcDateTime;
204
+
205
+ @doc("Event data payload")
206
+ data: T;
207
+
208
+ @doc("Retry interval hint in milliseconds")
209
+ retry?: int32;
210
+ }
211
+
212
+ // =============================================================================
213
+ // Aggregation Parameters
214
+ // =============================================================================
215
+
216
+ @doc("Time bucket size for aggregations")
217
+ enum TimeBucket {
218
+ @doc("1 minute buckets")
219
+ minute: "1m",
220
+
221
+ @doc("5 minute buckets")
222
+ fiveMinutes: "5m",
223
+
224
+ @doc("15 minute buckets")
225
+ fifteenMinutes: "15m",
226
+
227
+ @doc("1 hour buckets")
228
+ hour: "1h",
229
+
230
+ @doc("1 day buckets")
231
+ day: "1d",
232
+
233
+ @doc("1 week buckets")
234
+ week: "1w",
235
+
236
+ @doc("Auto-select based on time range")
237
+ auto: "auto",
238
+ }
239
+
240
+ @doc("Aggregation query parameters")
241
+ model AggregationParams {
242
+ @doc("Time bucket size")
243
+ @query
244
+ bucket?: TimeBucket = TimeBucket.auto;
245
+
246
+ @doc("Group by these dimensions")
247
+ @query
248
+ @encodedName("application/json", "group_by")
249
+ groupBy?: string[];
250
+
251
+ @doc("Filter expression")
252
+ @query
253
+ filter?: string;
254
+ }
@@ -0,0 +1,345 @@
1
+ // =============================================================================
2
+ // qyl common types and scalars
3
+ // =============================================================================
4
+ // Foundational types used across qyl API contracts and OTel-compatible models.
5
+ // OpenTelemetry semantic-convention references are pinned to v1.41.0.
6
+ // =============================================================================
7
+
8
+ import "@typespec/versioning";
9
+ import "@typespec/json-schema";
10
+ import "@typespec/openapi";
11
+
12
+ using TypeSpec.Versioning;
13
+ using TypeSpec.JsonSchema;
14
+ using TypeSpec.OpenAPI;
15
+
16
+ namespace Qyl.Api.Contracts.Common;
17
+
18
+ // =============================================================================
19
+ // Version Enum - OTel Semantic Convention Versions
20
+ // =============================================================================
21
+
22
+ @doc("OpenTelemetry semantic-convention versions supported by qyl compatibility models")
23
+ enum OTelVersion {
24
+ @doc("OTel Semconv v1.27 - Base version")
25
+ v1_27: "1.27.0",
26
+
27
+ @doc("OTel Semconv v1.28 - GenAI additions")
28
+ v1_28: "1.28.0",
29
+
30
+ @doc("OTel Semconv v1.29 - HTTP improvements")
31
+ v1_29: "1.29.0",
32
+
33
+ @doc("OTel Semconv v1.30 - Database updates")
34
+ v1_30: "1.30.0",
35
+
36
+ @doc("OTel Semconv v1.38 - GenAI.Agent support")
37
+ v1_38: "1.38.0",
38
+
39
+ @doc("OTel Semconv v1.39 - RPC metadata consolidation")
40
+ v1_39: "1.39.0",
41
+
42
+ @doc("OTel Semconv v1.40 - Oracle DB split, RPC cleanup, GenAI cache tokens")
43
+ v1_40: "1.40.0",
44
+
45
+ @doc("OTel Semconv v1.41 - Current compatibility pin")
46
+ v1_41: "1.41.0",
47
+ }
48
+
49
+ // =============================================================================
50
+ // Identifier Scalars - Strongly Typed IDs
51
+ // =============================================================================
52
+
53
+ @jsonSchema
54
+ @doc("Unique trace identifier (32 lowercase hex characters)")
55
+ @pattern("^[a-f0-9]{32}$")
56
+ @minLength(32)
57
+ @maxLength(32)
58
+ @example("0af7651916cd43dd8448eb211c80319c")
59
+ @TypeSpec.OpenAPI.extension("x-csharp-struct", true)
60
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "TraceId")
61
+ scalar TraceId extends string;
62
+
63
+ @jsonSchema
64
+ @doc("Unique span identifier (16 lowercase hex characters)")
65
+ @pattern("^[a-f0-9]{16}$")
66
+ @minLength(16)
67
+ @maxLength(16)
68
+ @example("b7ad6b7169203331")
69
+ @TypeSpec.OpenAPI.extension("x-csharp-struct", true)
70
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "SpanId")
71
+ scalar SpanId extends string;
72
+
73
+ @jsonSchema
74
+ @doc("W3C Trace Context traceparent header format")
75
+ @pattern("^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$")
76
+ @example("00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01")
77
+ scalar TraceParent extends string;
78
+
79
+ @jsonSchema
80
+ @doc("W3C Trace Context tracestate header (vendor-specific key-value pairs)")
81
+ @example("rojo=00f067aa0ba902b7,congo=t61rcWkgMzE")
82
+ scalar TraceState extends string;
83
+
84
+ @jsonSchema
85
+ @doc("Unique session identifier")
86
+ @minLength(1)
87
+ @maxLength(128)
88
+ @TypeSpec.OpenAPI.extension("x-csharp-struct", true)
89
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "SessionId")
90
+ scalar SessionId extends string;
91
+
92
+ @jsonSchema
93
+ @doc("User identifier (pseudonymized for privacy)")
94
+ @minLength(1)
95
+ @maxLength(256)
96
+ scalar UserId extends string;
97
+
98
+ // =============================================================================
99
+ // Temporal Scalars - Timestamps & Durations
100
+ // =============================================================================
101
+
102
+ @jsonSchema
103
+ @doc("ISO 8601 timestamp with nanosecond precision (RFC 3339)")
104
+ @encode(DateTimeKnownEncoding.rfc3339)
105
+ scalar Timestamp extends utcDateTime;
106
+
107
+ @jsonSchema
108
+ @doc("Unsigned Unix timestamp in nanoseconds since epoch")
109
+ @minValue(0)
110
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "ulong")
111
+ scalar UnixNanos extends uint64;
112
+
113
+ @jsonSchema
114
+ @doc("Duration in nanoseconds")
115
+ @minValue(0)
116
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "ulong")
117
+ scalar DurationNs extends uint64;
118
+
119
+ @jsonSchema
120
+ @doc("Duration in milliseconds")
121
+ @minValue(0)
122
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "double")
123
+ scalar DurationMs extends float64;
124
+
125
+ @jsonSchema
126
+ @doc("Duration in seconds")
127
+ @minValue(0)
128
+ scalar DurationS extends float64;
129
+
130
+ @jsonSchema
131
+ @doc("ISO 8601 duration format (e.g., PT1H30M)")
132
+ @encode(DurationKnownEncoding.ISO8601)
133
+ scalar IsoDuration extends duration;
134
+
135
+ // =============================================================================
136
+ // Network Scalars - IP Addresses & Ports
137
+ // =============================================================================
138
+
139
+ @jsonSchema
140
+ @doc("IPv4 address in dotted-decimal notation")
141
+ @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]?)$")
142
+ @example("192.168.1.1")
143
+ scalar IPv4Address extends string;
144
+
145
+ @jsonSchema
146
+ @doc("IPv6 address in standard notation")
147
+ @example("2001:0db8:85a3:0000:0000:8a2e:0370:7334")
148
+ scalar IPv6Address extends string;
149
+
150
+ @jsonSchema
151
+ @doc("IP address (IPv4 or IPv6)")
152
+ scalar IpAddress extends string;
153
+
154
+ @jsonSchema
155
+ @doc("Network port number (1-65535)")
156
+ @minValue(1)
157
+ @maxValue(65535)
158
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "int")
159
+ scalar Port extends int32;
160
+
161
+ @jsonSchema
162
+ @doc("MAC address in colon-separated hex notation")
163
+ @pattern("^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$")
164
+ @example("00:1A:2B:3C:4D:5E")
165
+ scalar MacAddress extends string;
166
+
167
+ // =============================================================================
168
+ // Size & Count Scalars
169
+ // =============================================================================
170
+
171
+ @jsonSchema
172
+ @doc("Size in bytes")
173
+ @minValue(0)
174
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "long")
175
+ scalar ByteSize extends int64;
176
+
177
+ @jsonSchema
178
+ @doc("Token count (for LLM operations)")
179
+ @minValue(0)
180
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "long")
181
+ scalar TokenCount extends int64;
182
+
183
+ @jsonSchema
184
+ @doc("Generic non-negative counter")
185
+ @minValue(0)
186
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "long")
187
+ scalar Count extends int64;
188
+
189
+ @jsonSchema
190
+ @doc("Percentage value (0.0 to 100.0)")
191
+ @minValue(0.0)
192
+ @maxValue(100.0)
193
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "double")
194
+ scalar Percentage extends float64;
195
+
196
+ @jsonSchema
197
+ @doc("Ratio value (0.0 to 1.0)")
198
+ @minValue(0.0)
199
+ @maxValue(1.0)
200
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "double")
201
+ scalar Ratio extends float64;
202
+
203
+ // =============================================================================
204
+ // GenAI-Specific Scalars
205
+ // =============================================================================
206
+
207
+ @jsonSchema
208
+ @doc("Cost in USD (floating point)")
209
+ @minValue(0)
210
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "double")
211
+ scalar CostUsd extends float64;
212
+
213
+ @jsonSchema
214
+ @doc("Temperature setting for LLM requests (0.0-2.0)")
215
+ @minValue(0)
216
+ @maxValue(2)
217
+ @TypeSpec.OpenAPI.extension("x-csharp-type", "double")
218
+ scalar Temperature extends float64;
219
+
220
+ // =============================================================================
221
+ // Semantic Scalars - Special Purpose Types
222
+ // =============================================================================
223
+
224
+ @jsonSchema
225
+ @doc("SHA-256 hash in lowercase hex")
226
+ @pattern("^[a-f0-9]{64}$")
227
+ @minLength(64)
228
+ @maxLength(64)
229
+ scalar Sha256Hash extends string;
230
+
231
+ @jsonSchema
232
+ @doc("Semantic version string (e.g., 1.2.3)")
233
+ @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-]+)*))?$")
234
+ @example("2.1.0")
235
+ scalar SemVer extends string;
236
+
237
+ @jsonSchema
238
+ @doc("URL string (absolute)")
239
+ @format("uri")
240
+ scalar UrlString extends string;
241
+
242
+ @jsonSchema
243
+ @doc("URL path component")
244
+ @example("/api/v1/users")
245
+ scalar UrlPath extends string;
246
+
247
+ @jsonSchema
248
+ @doc("URL query string (without leading ?)")
249
+ @example("page=1&limit=100")
250
+ scalar UrlQuery extends string;
251
+
252
+ @jsonSchema
253
+ @doc("HTTP method name (uppercase)")
254
+ @example("GET")
255
+ scalar HttpMethod extends string;
256
+
257
+ @jsonSchema
258
+ @doc("MIME content type")
259
+ @example("application/json")
260
+ scalar ContentType extends string;
261
+
262
+ @jsonSchema
263
+ @doc("User agent string")
264
+ @example("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36")
265
+ scalar UserAgent extends string;
266
+
267
+ @jsonSchema
268
+ @doc("Language/locale code (BCP 47)")
269
+ @pattern("^[a-z]{2,3}(-[A-Z]{2})?$")
270
+ @example("en-US")
271
+ scalar LanguageCode extends string;
272
+
273
+ // =============================================================================
274
+ // OpenTelemetry Attribute Value Types
275
+ // =============================================================================
276
+
277
+ @doc("Primitive attribute value types supported by OpenTelemetry")
278
+ union AttributeValue {
279
+ @doc("String value")
280
+ stringValue: string,
281
+
282
+ @doc("Boolean value")
283
+ boolValue: boolean,
284
+
285
+ @doc("64-bit integer value")
286
+ intValue: int64,
287
+
288
+ @doc("64-bit floating point value")
289
+ doubleValue: float64,
290
+
291
+ @doc("Array of strings")
292
+ stringArrayValue: string[],
293
+
294
+ @doc("Array of booleans")
295
+ boolArrayValue: boolean[],
296
+
297
+ @doc("Array of integers")
298
+ intArrayValue: int64[],
299
+
300
+ @doc("Array of doubles")
301
+ doubleArrayValue: float64[],
302
+
303
+ @doc("Bytes value (base64 encoded)")
304
+ bytesValue: bytes,
305
+ }
306
+
307
+ @doc("Key-value attribute pair following OTel conventions")
308
+ model Attribute {
309
+ @doc("Attribute key (dot-separated namespace)")
310
+ @minLength(1)
311
+ @maxLength(256)
312
+ key: string;
313
+
314
+ @doc("Attribute value")
315
+ value: AttributeValue;
316
+ }
317
+
318
+ @doc("Collection of attributes")
319
+ model Attributes {
320
+ @doc("List of key-value attributes")
321
+ items: Attribute[];
322
+ }
323
+
324
+ // =============================================================================
325
+ // Instrumentation Scope
326
+ // =============================================================================
327
+
328
+ @doc("Instrumentation scope identifying the library/component emitting telemetry")
329
+ model InstrumentationScope {
330
+ @doc("Name of the instrumentation scope (library name)")
331
+ @encodedName("application/json", "name")
332
+ scopeName: string;
333
+
334
+ @doc("Version of the instrumentation scope")
335
+ @encodedName("application/json", "version")
336
+ scopeVersion?: SemVer;
337
+
338
+ @doc("Additional attributes for the scope")
339
+ @encodedName("application/json", "attributes")
340
+ scopeAttributes?: Attribute[];
341
+
342
+ @doc("Dropped attributes count")
343
+ @encodedName("application/json", "dropped_attributes_count")
344
+ droppedAttributesCount?: Count;
345
+ }
@@ -0,0 +1,26 @@
1
+ # generated
2
+
3
+ This directory holds Weaver-generated TypeSpec files. **Do not edit by hand.**
4
+
5
+ ## Files
6
+
7
+ | File | Source | Regenerate via |
8
+ | --- | --- | --- |
9
+ | `otel-keys.gen.tsp` | OpenTelemetry semantic-conventions v1.41.0 YAML model, converted by the upstream generator [`ANcpLua/typespec-otel-semconv`](https://github.com/ANcpLua/typespec-otel-semconv) (Weaver-based) | Re-run that generator's pipeline (`scripts/generate.mjs`) and replace this checked-in TypeSpec projection. Lockstep flip planned: this directory becomes a dep on `@ancplua/typespec-otel-semconv@<semconv-version>-<N>` and stops being a checked-in artifact. |
10
+
11
+ ## What `otel-keys.gen.tsp` provides
12
+
13
+ One TypeSpec namespace per OpenTelemetry root group, each declaring `const <Name>: string = "<dotted.key>"`. Extracted `.tsp` models reference these consts inside `@encodedName(...)` instead of hand-typing dotted attribute keys.
14
+
15
+ ```tsp
16
+ @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.GenAi.System)
17
+ system?: string;
18
+ ```
19
+
20
+ Deprecated upstream attributes are emitted with `#deprecated "..."` so models that reference them produce a TypeSpec compiler warning matching upstream's own deprecation notes.
21
+
22
+ ## Pin
23
+
24
+ The checked-in projection is pinned to upstream OpenTelemetry semantic-conventions v1.41.0.
25
+
26
+ Bumping the pin requires regenerating this file from the upstream YAML model with Weaver — done in [`ANcpLua/typespec-otel-semconv`](https://github.com/ANcpLua/typespec-otel-semconv) — before updating this repository. Direction is one-way: this repo never invokes Weaver directly.