@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.
Files changed (61) hide show
  1. package/README.md +52 -64
  2. package/api/routes.tsp +90 -943
  3. package/api/runner.tsp +99 -0
  4. package/api/streaming.tsp +13 -299
  5. package/common/errors.tsp +14 -1
  6. package/common/pagination.tsp +1 -1
  7. package/common/types.tsp +2 -41
  8. package/generated/json-schema/qyl-api-schema.json +3868 -0
  9. package/generated/openapi/qyl.openapi.json +6919 -0
  10. package/generated/ts-runtime/api.d.ts +886 -0
  11. package/generated/ts-runtime/api.js +237 -0
  12. package/index.tsp +8 -34
  13. package/models/health.tsp +22 -0
  14. package/models/mcp-tools.tsp +217 -0
  15. package/models/runner-mcp.tsp +76 -0
  16. package/models/runner.tsp +67 -0
  17. package/models/session.tsp +1 -1
  18. package/otel/enums.tsp +1 -1
  19. package/otel/logs.tsp +1 -1
  20. package/otel/otel-conventions.tsp +0 -1
  21. package/otel/profiles.tsp +1 -1
  22. package/otel/resource.tsp +1 -1
  23. package/otel/span.tsp +9 -6
  24. package/package.json +56 -36
  25. package/VERSIONING.md +0 -88
  26. package/generated/README.md +0 -35
  27. package/intelligence/causal-rules.tsp +0 -34
  28. package/intelligence/diagnostic-patterns.tsp +0 -54
  29. package/intelligence/investigation-strategies.tsp +0 -37
  30. package/intelligence/main.tsp +0 -17
  31. package/intelligence/seed/patterns.tsp +0 -171
  32. package/intelligence/seed/rules.tsp +0 -43
  33. package/intelligence/seed/strategies.tsp +0 -55
  34. package/intelligence/signals.tsp +0 -60
  35. package/models/agent/agent-run.tsp +0 -154
  36. package/models/agent/tool-call.tsp +0 -122
  37. package/models/agent/workflow-checkpoint.tsp +0 -50
  38. package/models/agent/workflow-execution.tsp +0 -136
  39. package/models/alerting.tsp +0 -436
  40. package/models/configurator.tsp +0 -433
  41. package/models/control-graph.tsp +0 -197
  42. package/models/db.tsp +0 -767
  43. package/models/deployment.tsp +0 -365
  44. package/models/error.tsp +0 -433
  45. package/models/genai.tsp +0 -1305
  46. package/models/http.tsp +0 -547
  47. package/models/identity.tsp +0 -213
  48. package/models/issues.tsp +0 -484
  49. package/models/log.tsp +0 -140
  50. package/models/messaging.tsp +0 -304
  51. package/models/otel-config.tsp +0 -455
  52. package/models/retention.tsp +0 -240
  53. package/models/rpc.tsp +0 -309
  54. package/models/search.tsp +0 -243
  55. package/models/system.tsp +0 -400
  56. package/models/test.tsp +0 -346
  57. package/models/triage.tsp +0 -113
  58. package/models/workflow.tsp +0 -396
  59. package/models/workspace.tsp +0 -435
  60. package/otel/metrics.tsp +0 -358
  61. package/tspconfig.yaml +0 -49
package/models/system.tsp DELETED
@@ -1,400 +0,0 @@
1
- // =============================================================================
2
- // ANcpLua v2.0 - System Semantic Conventions
3
- // =============================================================================
4
- // Operating system telemetry attributes.
5
- // =============================================================================
6
-
7
- import "../common/types.tsp";
8
- import "../otel/resource.tsp";
9
-
10
- using Qyl.Api.Contracts.Common;
11
- using Qyl.Api.Contracts.OTel.Resource;
12
-
13
- namespace Qyl.Api.Contracts.Domains.Runtime.System;
14
-
15
- // =============================================================================
16
- // OS Resource Attributes
17
- // =============================================================================
18
-
19
- @doc("Operating system resource attributes")
20
- model OsAttributes {
21
- @doc("Operating system type")
22
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Os.Type)
23
- osType?: OsType;
24
-
25
- @doc("Operating system description")
26
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Os.Description)
27
- description?: string;
28
-
29
- @doc("Operating system name")
30
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Os.Name)
31
- name?: string;
32
-
33
- @doc("Operating system version")
34
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Os.Version)
35
- version?: string;
36
-
37
- @doc("Operating system build ID")
38
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Os.BuildId)
39
- buildId?: string;
40
- }
41
-
42
- // =============================================================================
43
- // System Metrics
44
- // =============================================================================
45
-
46
- @doc("System CPU utilization metric")
47
- model SystemCpuUtilizationMetric {
48
- @doc("Metric name")
49
- name: "system.cpu.utilization";
50
-
51
- @doc("Metric unit (ratio)")
52
- unit: "1";
53
-
54
- @doc("CPU state")
55
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.CpuState)
56
- cpuState: SystemCpuState;
57
-
58
- @doc("CPU logical number")
59
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.CpuLogicalNumber)
60
- cpuLogicalNumber?: int32;
61
- }
62
-
63
- @doc("System CPU time metric")
64
- model SystemCpuTimeMetric {
65
- @doc("Metric name")
66
- name: "system.cpu.time";
67
-
68
- @doc("Metric unit (seconds)")
69
- unit: "s";
70
-
71
- @doc("CPU state")
72
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.CpuState)
73
- cpuState: SystemCpuState;
74
-
75
- @doc("CPU logical number")
76
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.CpuLogicalNumber)
77
- cpuLogicalNumber?: int32;
78
- }
79
-
80
- @doc("System CPU frequency metric")
81
- model SystemCpuFrequencyMetric {
82
- @doc("Metric name")
83
- name: "system.cpu.frequency";
84
-
85
- @doc("Metric unit (Hz)")
86
- unit: "Hz";
87
-
88
- @doc("CPU logical number")
89
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.CpuLogicalNumber)
90
- cpuLogicalNumber?: int32;
91
- }
92
-
93
- @doc("System memory usage metric")
94
- model SystemMemoryUsageMetric {
95
- @doc("Metric name")
96
- name: "system.memory.usage";
97
-
98
- @doc("Metric unit (bytes)")
99
- unit: "By";
100
-
101
- @doc("Memory state")
102
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.MemoryState)
103
- memoryState: SystemMemoryState;
104
- }
105
-
106
- @doc("System memory utilization metric")
107
- model SystemMemoryUtilizationMetric {
108
- @doc("Metric name")
109
- name: "system.memory.utilization";
110
-
111
- @doc("Metric unit (ratio)")
112
- unit: "1";
113
-
114
- @doc("Memory state")
115
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.MemoryState)
116
- memoryState: SystemMemoryState;
117
- }
118
-
119
- @doc("System disk IO metric")
120
- model SystemDiskIoMetric {
121
- @doc("Metric name")
122
- name: "system.disk.io";
123
-
124
- @doc("Metric unit (bytes)")
125
- unit: "By";
126
-
127
- @doc("Disk device")
128
- @encodedName("application/json", "system.disk.device")
129
- diskDevice: string;
130
-
131
- @doc("IO direction")
132
- @encodedName("application/json", "system.disk.direction")
133
- diskDirection: string;
134
- }
135
-
136
- @doc("System disk operations metric")
137
- model SystemDiskOperationsMetric {
138
- @doc("Metric name")
139
- name: "system.disk.operations";
140
-
141
- @doc("Metric unit")
142
- unit: "{operation}";
143
-
144
- @doc("Disk device")
145
- @encodedName("application/json", "system.disk.device")
146
- diskDevice: string;
147
-
148
- @doc("IO direction")
149
- @encodedName("application/json", "system.disk.direction")
150
- diskDirection: string;
151
- }
152
-
153
- @doc("System disk IO time metric")
154
- model SystemDiskIoTimeMetric {
155
- @doc("Metric name")
156
- name: "system.disk.io_time";
157
-
158
- @doc("Metric unit (seconds)")
159
- unit: "s";
160
-
161
- @doc("Disk device")
162
- @encodedName("application/json", "system.disk.device")
163
- diskDevice: string;
164
- }
165
-
166
- @doc("System filesystem usage metric")
167
- model SystemFilesystemUsageMetric {
168
- @doc("Metric name")
169
- name: "system.filesystem.usage";
170
-
171
- @doc("Metric unit (bytes)")
172
- unit: "By";
173
-
174
- @doc("Filesystem device")
175
- @encodedName("application/json", "system.filesystem.device")
176
- device: string;
177
-
178
- @doc("Filesystem mount point")
179
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.FilesystemMountpoint)
180
- mountpoint: string;
181
-
182
- @doc("Filesystem type")
183
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.FilesystemType)
184
- fsType: string;
185
-
186
- @doc("Filesystem state")
187
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.FilesystemState)
188
- state: SystemFilesystemState;
189
- }
190
-
191
- @doc("System network IO metric")
192
- model SystemNetworkIoMetric {
193
- @doc("Metric name")
194
- name: "system.network.io";
195
-
196
- @doc("Metric unit (bytes)")
197
- unit: "By";
198
-
199
- @doc("Network device")
200
- @encodedName("application/json", "system.network.device")
201
- networkDevice: string;
202
-
203
- @doc("IO direction")
204
- @encodedName("application/json", "system.network.direction")
205
- networkDirection: string;
206
- }
207
-
208
- @doc("System network connections metric")
209
- model SystemNetworkConnectionsMetric {
210
- @doc("Metric name")
211
- name: "system.network.connections";
212
-
213
- @doc("Metric unit")
214
- unit: "{connection}";
215
-
216
- @doc("Network protocol")
217
- @encodedName("application/json", "system.network.protocol")
218
- protocol: string;
219
-
220
- @doc("Network state")
221
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.Network.ConnectionState)
222
- state: SystemNetworkState;
223
- }
224
-
225
- @doc("System paging usage metric")
226
- model SystemPagingUsageMetric {
227
- @doc("Metric name")
228
- name: "system.paging.usage";
229
-
230
- @doc("Metric unit (bytes)")
231
- unit: "By";
232
-
233
- @doc("Paging state")
234
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.PagingState)
235
- pagingState: SystemPagingState;
236
-
237
- @doc("Paging device")
238
- @encodedName("application/json", "system.paging.device")
239
- device?: string;
240
- }
241
-
242
- @doc("System paging operations metric")
243
- model SystemPagingOperationsMetric {
244
- @doc("Metric name")
245
- name: "system.paging.operations";
246
-
247
- @doc("Metric unit")
248
- unit: "{operation}";
249
-
250
- @doc("Paging type")
251
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.PagingType)
252
- pagingType: SystemPagingType;
253
-
254
- @doc("Paging direction")
255
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.PagingDirection)
256
- pagingDirection: string;
257
- }
258
-
259
- @doc("System process count metric")
260
- model SystemProcessCountMetric {
261
- @doc("Metric name")
262
- name: "system.process.count";
263
-
264
- @doc("Metric unit")
265
- unit: "{process}";
266
-
267
- @doc("Process status")
268
- @encodedName("application/json", ANcpLua.OpenTelemetry.SemanticConventions.Keys.System.ProcessStatus)
269
- processStatus: SystemProcessStatus;
270
- }
271
-
272
- // =============================================================================
273
- // System Enumerations
274
- // =============================================================================
275
-
276
- @doc("System CPU states")
277
- enum SystemCpuState {
278
- @doc("User mode")
279
- user: "user",
280
-
281
- @doc("System mode")
282
- system: "system",
283
-
284
- @doc("Nice mode")
285
- nice: "nice",
286
-
287
- @doc("Idle")
288
- idle: "idle",
289
-
290
- @doc("I/O wait")
291
- iowait: "iowait",
292
-
293
- @doc("Interrupt")
294
- interrupt: "interrupt",
295
-
296
- @doc("Steal")
297
- steal: "steal",
298
- }
299
-
300
- @doc("System memory states")
301
- enum SystemMemoryState {
302
- @doc("Used memory")
303
- used: "used",
304
-
305
- @doc("Free memory")
306
- free: "free",
307
-
308
- @doc("Buffered memory")
309
- buffered: "buffered",
310
-
311
- @doc("Cached memory")
312
- cached: "cached",
313
-
314
- @doc("Shared memory")
315
- shared: "shared",
316
- }
317
-
318
- @doc("System filesystem states")
319
- enum SystemFilesystemState {
320
- @doc("Used space")
321
- used: "used",
322
-
323
- @doc("Free space")
324
- free: "free",
325
-
326
- @doc("Reserved space")
327
- reserved: "reserved",
328
- }
329
-
330
- @doc("System network states")
331
- enum SystemNetworkState {
332
- @doc("CLOSE state")
333
- close: "close",
334
-
335
- @doc("CLOSE_WAIT state")
336
- closeWait: "close_wait",
337
-
338
- @doc("CLOSING state")
339
- closing: "closing",
340
-
341
- @doc("DELETE state")
342
- delete: "delete",
343
-
344
- @doc("ESTABLISHED state")
345
- established: "established",
346
-
347
- @doc("FIN_WAIT_1 state")
348
- finWait1: "fin_wait_1",
349
-
350
- @doc("FIN_WAIT_2 state")
351
- finWait2: "fin_wait_2",
352
-
353
- @doc("LAST_ACK state")
354
- lastAck: "last_ack",
355
-
356
- @doc("LISTEN state")
357
- listen: "listen",
358
-
359
- @doc("SYN_RECV state")
360
- synRecv: "syn_recv",
361
-
362
- @doc("SYN_SENT state")
363
- synSent: "syn_sent",
364
-
365
- @doc("TIME_WAIT state")
366
- timeWait: "time_wait",
367
- }
368
-
369
- @doc("System paging states")
370
- enum SystemPagingState {
371
- @doc("Used")
372
- used: "used",
373
-
374
- @doc("Free")
375
- free: "free",
376
- }
377
-
378
- @doc("System paging types")
379
- enum SystemPagingType {
380
- @doc("Major page fault")
381
- major: "major",
382
-
383
- @doc("Minor page fault")
384
- minor: "minor",
385
- }
386
-
387
- @doc("System process status")
388
- enum SystemProcessStatus {
389
- @doc("Running")
390
- running: "running",
391
-
392
- @doc("Sleeping")
393
- sleeping: "sleeping",
394
-
395
- @doc("Stopped")
396
- stopped: "stopped",
397
-
398
- @doc("Defunct/zombie")
399
- defunct: "defunct",
400
- }