@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
@@ -0,0 +1,886 @@
1
+ export type TraceId = string & {
2
+ readonly __brand: "TraceId";
3
+ };
4
+ export type SpanId = string & {
5
+ readonly __brand: "SpanId";
6
+ };
7
+ export type SessionId = string & {
8
+ readonly __brand: "SessionId";
9
+ };
10
+ export type UserId = string & {
11
+ readonly __brand: "UserId";
12
+ };
13
+ export declare const SortOrderValues: {
14
+ readonly asc: "asc";
15
+ readonly desc: "desc";
16
+ };
17
+ export type SortOrder = typeof SortOrderValues[keyof typeof SortOrderValues];
18
+ export declare const TimeBucketValues: {
19
+ readonly minute: "1m";
20
+ readonly fiveMinutes: "5m";
21
+ readonly fifteenMinutes: "15m";
22
+ readonly hour: "1h";
23
+ readonly day: "1d";
24
+ readonly week: "1w";
25
+ readonly auto: "auto";
26
+ };
27
+ export type TimeBucket = typeof TimeBucketValues[keyof typeof TimeBucketValues];
28
+ export declare const SpanKindValues: {
29
+ readonly unspecified: 0;
30
+ readonly internal: 1;
31
+ readonly server: 2;
32
+ readonly client: 3;
33
+ readonly producer: 4;
34
+ readonly consumer: 5;
35
+ };
36
+ export type SpanKind = typeof SpanKindValues[keyof typeof SpanKindValues];
37
+ export declare const SpanStatusCodeValues: {
38
+ readonly unset: 0;
39
+ readonly ok: 1;
40
+ readonly error: 2;
41
+ };
42
+ export type SpanStatusCode = typeof SpanStatusCodeValues[keyof typeof SpanStatusCodeValues];
43
+ export declare const SpanFlagsValues: {
44
+ readonly none: 0;
45
+ readonly sampled: 1;
46
+ readonly random: 2;
47
+ };
48
+ export type SpanFlags = typeof SpanFlagsValues[keyof typeof SpanFlagsValues];
49
+ export declare const SeverityNumberValues: {
50
+ readonly unspecified: 0;
51
+ readonly trace: 1;
52
+ readonly trace2: 2;
53
+ readonly trace3: 3;
54
+ readonly trace4: 4;
55
+ readonly debug: 5;
56
+ readonly debug2: 6;
57
+ readonly debug3: 7;
58
+ readonly debug4: 8;
59
+ readonly info: 9;
60
+ readonly info2: 10;
61
+ readonly info3: 11;
62
+ readonly info4: 12;
63
+ readonly warn: 13;
64
+ readonly warn2: 14;
65
+ readonly warn3: 15;
66
+ readonly warn4: 16;
67
+ readonly error: 17;
68
+ readonly error2: 18;
69
+ readonly error3: 19;
70
+ readonly error4: 20;
71
+ readonly fatal: 21;
72
+ readonly fatal2: 22;
73
+ readonly fatal3: 23;
74
+ readonly fatal4: 24;
75
+ };
76
+ export type SeverityNumber = typeof SeverityNumberValues[keyof typeof SeverityNumberValues];
77
+ export declare const SeverityTextValues: {
78
+ readonly TRACE: "TRACE";
79
+ readonly DEBUG: "DEBUG";
80
+ readonly INFO: "INFO";
81
+ readonly WARN: "WARN";
82
+ readonly ERROR: "ERROR";
83
+ readonly FATAL: "FATAL";
84
+ };
85
+ export type SeverityText = typeof SeverityTextValues[keyof typeof SeverityTextValues];
86
+ export declare const MetricTypeValues: {
87
+ readonly gauge: "gauge";
88
+ readonly sum: "sum";
89
+ readonly histogram: "histogram";
90
+ readonly exponentialHistogram: "exponential_histogram";
91
+ readonly summary: "summary";
92
+ };
93
+ export type MetricType = typeof MetricTypeValues[keyof typeof MetricTypeValues];
94
+ export declare const AggregationTemporalityValues: {
95
+ readonly unspecified: 0;
96
+ readonly delta: 1;
97
+ readonly cumulative: 2;
98
+ };
99
+ export type AggregationTemporality = typeof AggregationTemporalityValues[keyof typeof AggregationTemporalityValues];
100
+ export declare const DataPointFlagsValues: {
101
+ readonly none: 0;
102
+ readonly noRecordedValue: 1;
103
+ };
104
+ export type DataPointFlags = typeof DataPointFlagsValues[keyof typeof DataPointFlagsValues];
105
+ export declare const InstrumentKindValues: {
106
+ readonly counter: "Counter";
107
+ readonly upDownCounter: "UpDownCounter";
108
+ readonly histogram: "Histogram";
109
+ readonly gauge: "Gauge";
110
+ readonly observableCounter: "ObservableCounter";
111
+ readonly observableGauge: "ObservableGauge";
112
+ readonly observableUpDownCounter: "ObservableUpDownCounter";
113
+ };
114
+ export type InstrumentKind = typeof InstrumentKindValues[keyof typeof InstrumentKindValues];
115
+ export declare const TelemetrySdkLanguageValues: {
116
+ readonly cpp: "cpp";
117
+ readonly dotnet: "dotnet";
118
+ readonly erlang: "erlang";
119
+ readonly go: "go";
120
+ readonly java: "java";
121
+ readonly nodejs: "nodejs";
122
+ readonly php: "php";
123
+ readonly python: "python";
124
+ readonly ruby: "ruby";
125
+ readonly rust: "rust";
126
+ readonly swift: "swift";
127
+ readonly webjs: "webjs";
128
+ };
129
+ export type TelemetrySdkLanguage = typeof TelemetrySdkLanguageValues[keyof typeof TelemetrySdkLanguageValues];
130
+ export declare const ErrorTypeValues: {
131
+ readonly error: "_OTHER";
132
+ readonly timeout: "TIMEOUT";
133
+ readonly connectionRefused: "CONNECTION_REFUSED";
134
+ readonly dnsError: "DNS_ERROR";
135
+ readonly tlsError: "TLS_ERROR";
136
+ readonly authError: "AUTH_ERROR";
137
+ readonly permissionDenied: "PERMISSION_DENIED";
138
+ readonly notFound: "NOT_FOUND";
139
+ readonly resourceExhausted: "RESOURCE_EXHAUSTED";
140
+ readonly invalidArgument: "INVALID_ARGUMENT";
141
+ readonly cancelled: "CANCELLED";
142
+ };
143
+ export type ErrorType = typeof ErrorTypeValues[keyof typeof ErrorTypeValues];
144
+ export declare const EventDomainValues: {
145
+ readonly browser: "browser";
146
+ readonly device: "device";
147
+ readonly k8s: "k8s";
148
+ readonly session: "session";
149
+ readonly genAi: "gen_ai";
150
+ readonly exception: "exception";
151
+ readonly log: "log";
152
+ };
153
+ export type EventDomain = typeof EventDomainValues[keyof typeof EventDomainValues];
154
+ export declare const OriginalPayloadFormatValues: {
155
+ readonly pprof: "pprof";
156
+ readonly jfr: "jfr";
157
+ readonly linuxPerf: "linux_perf";
158
+ };
159
+ export type OriginalPayloadFormat = typeof OriginalPayloadFormatValues[keyof typeof OriginalPayloadFormatValues];
160
+ export declare const ProfileFrameTypeValues: {
161
+ readonly beam: "beam";
162
+ readonly cpython: "cpython";
163
+ readonly dotnet: "dotnet";
164
+ readonly go: "go";
165
+ readonly jvm: "jvm";
166
+ readonly kernel: "kernel";
167
+ readonly native: "native";
168
+ readonly perl: "perl";
169
+ readonly php: "php";
170
+ readonly ruby: "ruby";
171
+ readonly rust: "rust";
172
+ readonly v8js: "v8js";
173
+ };
174
+ export type ProfileFrameType = typeof ProfileFrameTypeValues[keyof typeof ProfileFrameTypeValues];
175
+ export declare const CloudProviderValues: {
176
+ readonly alibabaCloud: "alibaba_cloud";
177
+ readonly aws: "aws";
178
+ readonly azure: "azure";
179
+ readonly gcp: "gcp";
180
+ readonly heroku: "heroku";
181
+ readonly ibmCloud: "ibm_cloud";
182
+ readonly tencentCloud: "tencent_cloud";
183
+ };
184
+ export type CloudProvider = typeof CloudProviderValues[keyof typeof CloudProviderValues];
185
+ export declare const HostArchValues: {
186
+ readonly amd64: "amd64";
187
+ readonly arm32: "arm32";
188
+ readonly arm64: "arm64";
189
+ readonly ia64: "ia64";
190
+ readonly ppc32: "ppc32";
191
+ readonly ppc64: "ppc64";
192
+ readonly s390x: "s390x";
193
+ readonly x86: "x86";
194
+ };
195
+ export type HostArch = typeof HostArchValues[keyof typeof HostArchValues];
196
+ export declare const OsTypeValues: {
197
+ readonly windows: "windows";
198
+ readonly linux: "linux";
199
+ readonly darwin: "darwin";
200
+ readonly freebsd: "freebsd";
201
+ readonly netbsd: "netbsd";
202
+ readonly openbsd: "openbsd";
203
+ readonly dragonflybsd: "dragonflybsd";
204
+ readonly hpux: "hpux";
205
+ readonly aix: "aix";
206
+ readonly solaris: "solaris";
207
+ readonly zOs: "z_os";
208
+ };
209
+ export type OsType = typeof OsTypeValues[keyof typeof OsTypeValues];
210
+ export declare const SessionEventNameValues: {
211
+ readonly sessionStart: "session.start";
212
+ readonly sessionEnd: "session.end";
213
+ };
214
+ export type SessionEventName = typeof SessionEventNameValues[keyof typeof SessionEventNameValues];
215
+ export declare const SessionStateValues: {
216
+ readonly active: "active";
217
+ readonly idle: "idle";
218
+ readonly ended: "ended";
219
+ readonly timedOut: "timed_out";
220
+ readonly invalidated: "invalidated";
221
+ };
222
+ export type SessionState = typeof SessionStateValues[keyof typeof SessionStateValues];
223
+ export declare const DeviceTypeValues: {
224
+ readonly desktop: "desktop";
225
+ readonly mobile: "mobile";
226
+ readonly tablet: "tablet";
227
+ readonly tv: "tv";
228
+ readonly console: "console";
229
+ readonly wearable: "wearable";
230
+ readonly iot: "iot";
231
+ readonly bot: "bot";
232
+ readonly unknown: "unknown";
233
+ };
234
+ export type DeviceType = typeof DeviceTypeValues[keyof typeof DeviceTypeValues];
235
+ export declare const HealthStatusValues: {
236
+ readonly healthy: "healthy";
237
+ readonly degraded: "degraded";
238
+ readonly unhealthy: "unhealthy";
239
+ };
240
+ export type HealthStatus = typeof HealthStatusValues[keyof typeof HealthStatusValues];
241
+ export declare const RunnerResourceLifecycleValues: {
242
+ readonly pending: "pending";
243
+ readonly starting: "starting";
244
+ readonly ready: "ready";
245
+ readonly stopping: "stopping";
246
+ readonly stopped: "stopped";
247
+ readonly failed: "failed";
248
+ };
249
+ export type RunnerResourceLifecycle = typeof RunnerResourceLifecycleValues[keyof typeof RunnerResourceLifecycleValues];
250
+ export declare const RunnerResourceKindValues: {
251
+ readonly collector: "collector";
252
+ readonly project: "project";
253
+ readonly command: "command";
254
+ readonly stdio: "stdio";
255
+ readonly http: "http";
256
+ readonly inproc: "inproc";
257
+ };
258
+ export type RunnerResourceKind = typeof RunnerResourceKindValues[keyof typeof RunnerResourceKindValues];
259
+ export declare const RunnerLogStreamValues: {
260
+ readonly stdout: "out";
261
+ readonly stderr: "err";
262
+ };
263
+ export type RunnerLogStream = typeof RunnerLogStreamValues[keyof typeof RunnerLogStreamValues];
264
+ export declare const McpDataModeValues: {
265
+ readonly live: "live";
266
+ readonly demo: "demo";
267
+ };
268
+ export type McpDataMode = typeof McpDataModeValues[keyof typeof McpDataModeValues];
269
+ export declare const FetchTelemetryViewValues: {
270
+ readonly traces: "traces";
271
+ readonly trace: "trace";
272
+ readonly logs: "logs";
273
+ readonly mcpStats: "mcp_stats";
274
+ };
275
+ export type FetchTelemetryView = typeof FetchTelemetryViewValues[keyof typeof FetchTelemetryViewValues];
276
+ export type AttributeValue = string | boolean | number | string[] | boolean[] | number[];
277
+ export type ApiError = NotFoundError | ValidationError | UnauthorizedError | ForbiddenError | ConflictError | RateLimitError | InternalServerError | BadGatewayError | ServiceUnavailableError;
278
+ export type LogBody = LogBodyString | LogBodyKvList | LogBodyArray | LogBodyBytes;
279
+ export type RunnerResourceEvents = RunnerResourceState;
280
+ export type RunnerLogEvents = RunnerLogLine;
281
+ export type LogEvents = LogStreamEvent | HeartbeatEvent;
282
+ export interface Attribute {
283
+ "key": string;
284
+ "value": AttributeValue;
285
+ }
286
+ export interface Attributes {
287
+ "items": Attribute[];
288
+ }
289
+ export interface InstrumentationScope {
290
+ "name": string;
291
+ "version"?: string;
292
+ "attributes"?: Attribute[];
293
+ "dropped_attributes_count"?: number;
294
+ }
295
+ export interface ProblemDetails {
296
+ "type": string;
297
+ "title": string;
298
+ "status": number;
299
+ "detail"?: string;
300
+ "instance"?: string;
301
+ "timestamp"?: string;
302
+ }
303
+ export interface NotFoundError extends ProblemDetails {
304
+ "title": "Not Found";
305
+ "resource_type"?: string;
306
+ "resource_id"?: string;
307
+ }
308
+ export interface ValidationError extends ProblemDetails {
309
+ "title": "Validation Failed";
310
+ "errors": ValidationErrorDetail[];
311
+ }
312
+ export interface ValidationErrorDetail {
313
+ "field": string;
314
+ "message": string;
315
+ "code": string;
316
+ "rejected_value"?: string;
317
+ }
318
+ export interface UnauthorizedError extends ProblemDetails {
319
+ "title": "Unauthorized";
320
+ }
321
+ export interface ForbiddenError extends ProblemDetails {
322
+ "title": "Forbidden";
323
+ "required_permission"?: string;
324
+ }
325
+ export interface ConflictError extends ProblemDetails {
326
+ "title": "Conflict";
327
+ "conflicting_resource"?: string;
328
+ }
329
+ export interface RateLimitError extends ProblemDetails {
330
+ "title": "Too Many Requests";
331
+ }
332
+ export interface InternalServerError extends ProblemDetails {
333
+ "title": "Internal Server Error";
334
+ "error_code"?: string;
335
+ }
336
+ export interface BadGatewayError extends ProblemDetails {
337
+ "title": "Bad Gateway";
338
+ "dependency"?: string;
339
+ }
340
+ export interface ServiceUnavailableError extends ProblemDetails {
341
+ "title": "Service Unavailable";
342
+ "reason"?: "maintenance" | "overloaded" | "dependency_failure";
343
+ }
344
+ export interface CursorPaginationParams {
345
+ "cursor"?: string;
346
+ "limit"?: number;
347
+ "order"?: SortOrder;
348
+ }
349
+ export interface OffsetPaginationParams {
350
+ "page"?: number;
351
+ "page_size"?: number;
352
+ }
353
+ export interface TimeRangeParams {
354
+ "start_time"?: string;
355
+ "end_time"?: string;
356
+ "limit"?: number;
357
+ }
358
+ export interface StreamParams {
359
+ "since"?: string;
360
+ "trace_id"?: string;
361
+ "service_name"?: string;
362
+ "max_events_per_second"?: number;
363
+ }
364
+ export interface AggregationParams {
365
+ "bucket"?: TimeBucket;
366
+ "group_by"?: string[];
367
+ "filter"?: string;
368
+ }
369
+ export interface Resource {
370
+ "service.name": string;
371
+ "service.namespace"?: string;
372
+ "service.instance.id"?: string;
373
+ "service.version"?: string;
374
+ "telemetry.sdk.name"?: string;
375
+ "telemetry.sdk.language"?: TelemetrySdkLanguage;
376
+ "telemetry.sdk.version"?: string;
377
+ "telemetry.auto.version"?: string;
378
+ "deployment.environment.name"?: string;
379
+ "cloud.provider"?: CloudProvider;
380
+ "cloud.region"?: string;
381
+ "cloud.availability_zone"?: string;
382
+ "cloud.account.id"?: string;
383
+ "cloud.platform"?: string;
384
+ "host.name"?: string;
385
+ "host.id"?: string;
386
+ "host.type"?: string;
387
+ "host.arch"?: HostArch;
388
+ "os.type"?: OsType;
389
+ "os.description"?: string;
390
+ "os.version"?: string;
391
+ "process.pid"?: number;
392
+ "process.executable.name"?: string;
393
+ "process.command_line"?: string;
394
+ "process.runtime.name"?: string;
395
+ "process.runtime.version"?: string;
396
+ "container.id"?: string;
397
+ "container.name"?: string;
398
+ "container.image.name"?: string;
399
+ "container.image.tag"?: string;
400
+ "k8s.cluster.name"?: string;
401
+ "k8s.namespace.name"?: string;
402
+ "k8s.pod.name"?: string;
403
+ "k8s.pod.uid"?: string;
404
+ "k8s.deployment.name"?: string;
405
+ "attributes"?: Attribute[];
406
+ "dropped_attributes_count"?: number;
407
+ }
408
+ export interface Span {
409
+ "span_id": SpanId;
410
+ "trace_id": TraceId;
411
+ "parent_span_id"?: SpanId;
412
+ "trace_state"?: string;
413
+ "name": string;
414
+ "kind": SpanKind;
415
+ "start_time_unix_nano": number;
416
+ "end_time_unix_nano": number;
417
+ "attributes"?: Attribute[];
418
+ "dropped_attributes_count"?: number;
419
+ "events"?: SpanEvent[];
420
+ "dropped_events_count"?: number;
421
+ "links"?: SpanLink[];
422
+ "dropped_links_count"?: number;
423
+ "status": SpanStatus;
424
+ "flags"?: number;
425
+ "resource": Resource;
426
+ "instrumentation_scope"?: InstrumentationScope;
427
+ }
428
+ export interface SpanEvent {
429
+ "name": string;
430
+ "time_unix_nano": number;
431
+ "attributes"?: Attribute[];
432
+ "dropped_attributes_count"?: number;
433
+ }
434
+ export interface SpanLink {
435
+ "trace_id": TraceId;
436
+ "span_id": SpanId;
437
+ "trace_state"?: string;
438
+ "attributes"?: Attribute[];
439
+ "dropped_attributes_count"?: number;
440
+ "flags"?: number;
441
+ }
442
+ export interface SpanStatus {
443
+ "code": SpanStatusCode;
444
+ "message"?: string;
445
+ }
446
+ export interface TraceSummary {
447
+ "trace_id": TraceId;
448
+ "root_span"?: Span;
449
+ "span_count": number;
450
+ "duration_ns": number;
451
+ "start_time": string;
452
+ "end_time": string;
453
+ "services": string[];
454
+ "has_error": boolean;
455
+ }
456
+ export interface Trace extends TraceSummary {
457
+ "spans": Span[];
458
+ }
459
+ export interface SpanQueryFilters {
460
+ "trace_id"?: TraceId;
461
+ "parent_span_id"?: SpanId;
462
+ "name"?: string;
463
+ "kind"?: SpanKind;
464
+ "service_name"?: string;
465
+ "status_code"?: SpanStatusCode;
466
+ "min_duration_ns"?: number;
467
+ "max_duration_ns"?: number;
468
+ "attribute"?: string;
469
+ }
470
+ export interface SpanStats {
471
+ "total_count": number;
472
+ "error_count": number;
473
+ "error_rate": number;
474
+ "avg_duration_ns": number;
475
+ "p50_duration_ns": number;
476
+ "p90_duration_ns": number;
477
+ "p99_duration_ns": number;
478
+ "min_duration_ns": number;
479
+ "max_duration_ns": number;
480
+ "throughput_per_second": number;
481
+ "by_service"?: SpanStatsByDimension[];
482
+ "by_operation"?: SpanStatsByDimension[];
483
+ }
484
+ export interface SpanStatsByDimension {
485
+ "dimension": string;
486
+ "count": number;
487
+ "avg_duration_ns": number;
488
+ "error_rate": number;
489
+ }
490
+ export interface LogRecord {
491
+ "time_unix_nano": number;
492
+ "observed_time_unix_nano": number;
493
+ "severity_number": SeverityNumber;
494
+ "severity_text"?: SeverityText;
495
+ "body": LogBody;
496
+ "attributes"?: Attribute[];
497
+ "dropped_attributes_count"?: number;
498
+ "flags"?: number;
499
+ "trace_id"?: TraceId;
500
+ "span_id"?: SpanId;
501
+ "resource": Resource;
502
+ "instrumentation_scope"?: InstrumentationScope;
503
+ }
504
+ export interface LogBodyString {
505
+ "string_value": string;
506
+ }
507
+ export interface LogBodyKvList {
508
+ "kv_list_value": Attribute[];
509
+ }
510
+ export interface LogBodyArray {
511
+ "array_value": AttributeValue[];
512
+ }
513
+ export interface LogBodyBytes {
514
+ "bytes_value": string;
515
+ }
516
+ export interface LogTemplate {
517
+ "template": string;
518
+ "parameters": Attribute[];
519
+ "rendered_message"?: string;
520
+ }
521
+ export interface Profile {
522
+ "profile_id": string;
523
+ "sample_type"?: ProfileValueType;
524
+ "samples"?: ProfileSample[];
525
+ "time_unix_nano": number;
526
+ "duration_nano": number;
527
+ "period_type"?: ProfileValueType;
528
+ "period"?: number;
529
+ "original_payload_format"?: OriginalPayloadFormat;
530
+ "original_payload"?: string;
531
+ "attributes"?: Attribute[];
532
+ "dropped_attributes_count"?: number;
533
+ "resource": Resource;
534
+ "instrumentation_scope"?: InstrumentationScope;
535
+ "string_table"?: string[];
536
+ "function_table"?: ProfileFunction[];
537
+ "location_table"?: ProfileLocation[];
538
+ "mapping_table"?: ProfileMapping[];
539
+ "link_table"?: ProfileLink[];
540
+ "stack_table"?: ProfileStack[];
541
+ }
542
+ export interface ProfileValueType {
543
+ "type_strindex"?: number;
544
+ "unit_strindex"?: number;
545
+ }
546
+ export interface ProfileSample {
547
+ "stack_index"?: number;
548
+ "attribute_indices"?: number[];
549
+ "link_index"?: number;
550
+ "values"?: number[];
551
+ "timestamps_unix_nano"?: number[];
552
+ }
553
+ export interface ProfileFunction {
554
+ "name_strindex"?: number;
555
+ "system_name_strindex"?: number;
556
+ "filename_strindex"?: number;
557
+ "start_line"?: number;
558
+ }
559
+ export interface ProfileLocation {
560
+ "mapping_index"?: number;
561
+ "address"?: number;
562
+ "lines"?: ProfileLine[];
563
+ "attribute_indices"?: number[];
564
+ }
565
+ export interface ProfileLine {
566
+ "function_index"?: number;
567
+ "line"?: number;
568
+ "column"?: number;
569
+ }
570
+ export interface ProfileMapping {
571
+ "memory_start"?: number;
572
+ "memory_limit"?: number;
573
+ "file_offset"?: number;
574
+ "filename_strindex"?: number;
575
+ "attribute_indices"?: number[];
576
+ }
577
+ export interface ProfileLink {
578
+ "trace_id"?: TraceId;
579
+ "span_id"?: SpanId;
580
+ }
581
+ export interface ProfileStack {
582
+ "location_indices"?: number[];
583
+ }
584
+ export interface ProfileQueryFilters {
585
+ "trace_id"?: TraceId;
586
+ "span_id"?: SpanId;
587
+ "session_id"?: SessionId;
588
+ "service_name"?: string;
589
+ "sample_type"?: string;
590
+ "profile_frame_type"?: string;
591
+ "original_payload_format"?: OriginalPayloadFormat;
592
+ "min_duration_nano"?: number;
593
+ "time_from"?: string;
594
+ "time_to"?: string;
595
+ }
596
+ export interface ProfileStats {
597
+ "total_count": number;
598
+ "total_sample_count": number;
599
+ "avg_duration_nano": number;
600
+ "by_sample_type"?: ProfileStatsByDimension[];
601
+ "by_service"?: ProfileStatsByDimension[];
602
+ "by_frame_type"?: ProfileStatsByDimension[];
603
+ }
604
+ export interface ProfileStatsByDimension {
605
+ "dimension": string;
606
+ "count": number;
607
+ "sample_count": number;
608
+ "avg_duration_nano": number;
609
+ }
610
+ export interface SessionAttributes {
611
+ "session.id": SessionId;
612
+ "session.previous_id"?: SessionId;
613
+ }
614
+ export interface SessionEvent {
615
+ "event.name": SessionEventName;
616
+ "session.id": SessionId;
617
+ "timestamp": string;
618
+ "event.domain": "session";
619
+ }
620
+ export interface SessionEntity {
621
+ "session.id": SessionId;
622
+ "user.id"?: UserId;
623
+ "start_time": string;
624
+ "end_time"?: string;
625
+ "duration_ms"?: number;
626
+ "trace_count": number;
627
+ "span_count": number;
628
+ "error_count": number;
629
+ "services": string[];
630
+ "state": SessionState;
631
+ "client"?: SessionClientInfo;
632
+ "geo"?: SessionGeoInfo;
633
+ "genai_usage"?: SessionGenAiUsage;
634
+ }
635
+ export interface SessionClientInfo {
636
+ "ip"?: string;
637
+ "user_agent"?: string;
638
+ "device_type"?: DeviceType;
639
+ "os"?: string;
640
+ "browser"?: string;
641
+ "browser_version"?: string;
642
+ }
643
+ export interface SessionGeoInfo {
644
+ "country_code"?: string;
645
+ "country_name"?: string;
646
+ "region"?: string;
647
+ "city"?: string;
648
+ "postal_code"?: string;
649
+ "timezone"?: string;
650
+ }
651
+ export interface SessionGenAiUsage {
652
+ "request_count": number;
653
+ "total_input_tokens": number;
654
+ "total_output_tokens": number;
655
+ "models_used": string[];
656
+ "providers_used": string[];
657
+ "estimated_cost_usd"?: number;
658
+ }
659
+ export interface SessionStats {
660
+ "active_sessions": number;
661
+ "total_sessions": number;
662
+ "avg_duration_ms": number;
663
+ "sessions_with_errors": number;
664
+ "sessions_with_genai": number;
665
+ "bounce_rate": number;
666
+ }
667
+ export interface HealthCheckEntry {
668
+ "status": HealthStatus;
669
+ "description"?: string;
670
+ "durationMs": number;
671
+ }
672
+ export interface HealthReport {
673
+ "status": HealthStatus;
674
+ "totalDurationMs": number;
675
+ "entries": Record<string, HealthCheckEntry>;
676
+ }
677
+ export interface RunnerMcpServerInfo {
678
+ "name": string;
679
+ "version": string;
680
+ }
681
+ export interface RunnerResourceState {
682
+ "name": string;
683
+ "lifecycle": RunnerResourceLifecycle;
684
+ "timestamp": string;
685
+ "kind"?: RunnerResourceKind;
686
+ "allocatedPort"?: number;
687
+ "endpoint"?: string;
688
+ "lastError"?: string;
689
+ "serverInfo"?: RunnerMcpServerInfo;
690
+ "toolCount"?: number;
691
+ "restarts"?: number;
692
+ }
693
+ export interface RunnerLogLine {
694
+ "resource": string;
695
+ "stream": RunnerLogStream;
696
+ "line": string;
697
+ }
698
+ export interface RunnerMcpTool {
699
+ "name": string;
700
+ "title"?: string;
701
+ "description"?: string;
702
+ "inputSchema": Record<string, unknown>;
703
+ "outputSchema"?: Record<string, unknown>;
704
+ "annotations"?: Record<string, unknown>;
705
+ "_meta"?: Record<string, unknown>;
706
+ }
707
+ export interface RunnerMcpToolsResponse {
708
+ "tools": RunnerMcpTool[];
709
+ "nextCursor"?: string;
710
+ "_meta"?: Record<string, unknown>;
711
+ }
712
+ export interface RunnerMcpToolCallRequest {
713
+ "name": string;
714
+ "arguments"?: Record<string, unknown>;
715
+ }
716
+ export interface RunnerMcpContent {
717
+ "type": string;
718
+ "text"?: string;
719
+ "data"?: string;
720
+ "mimeType"?: string;
721
+ "uri"?: string;
722
+ "name"?: string;
723
+ "title"?: string;
724
+ "description"?: string;
725
+ "size"?: number;
726
+ "resource"?: Record<string, unknown>;
727
+ "annotations"?: Record<string, unknown>;
728
+ "_meta"?: Record<string, unknown>;
729
+ }
730
+ export interface RunnerMcpToolCallResponse {
731
+ "content": RunnerMcpContent[];
732
+ "structuredContent"?: Record<string, unknown>;
733
+ "isError": boolean;
734
+ "_meta"?: Record<string, unknown>;
735
+ }
736
+ export interface RunnerMcpResourceReadRequest {
737
+ "uri": string;
738
+ }
739
+ export interface RunnerMcpResourceContent {
740
+ "uri": string;
741
+ "mimeType"?: string;
742
+ "text"?: string;
743
+ "blob"?: string;
744
+ "_meta"?: Record<string, unknown>;
745
+ }
746
+ export interface RunnerMcpResourceReadResponse {
747
+ "contents": RunnerMcpResourceContent[];
748
+ "_meta"?: Record<string, unknown>;
749
+ }
750
+ export interface DisplayTracesInput {
751
+ "trace_id"?: TraceId;
752
+ "session_id"?: SessionId;
753
+ "limit"?: number;
754
+ }
755
+ export interface DisplayTracesOutput {
756
+ "traces": Trace[];
757
+ "selected_trace_id"?: TraceId;
758
+ "mode": McpDataMode;
759
+ }
760
+ export interface DisplayMcpDashboardInput {
761
+ "hours"?: number;
762
+ }
763
+ export interface DisplayMcpDashboardOutput {
764
+ "stats": McpDashboardStats;
765
+ }
766
+ export interface McpDashboardStats {
767
+ "window": McpDashboardWindow;
768
+ "buckets": McpDashboardBucket[];
769
+ "totals": McpDashboardTotals;
770
+ "by_server": McpNameRequestCount[];
771
+ "by_transport": McpNameRequestCount[];
772
+ "by_method": McpNameRequestCount[];
773
+ "tools": McpToolStats[];
774
+ "span_count_analyzed": number;
775
+ "truncated": boolean;
776
+ "mode": McpDataMode;
777
+ }
778
+ export interface McpDashboardWindow {
779
+ "start": string;
780
+ "end": string;
781
+ "bucket_ms": number;
782
+ }
783
+ export interface McpDashboardBucket {
784
+ "start": string;
785
+ "requests": number;
786
+ "errors": number;
787
+ }
788
+ export interface McpDashboardTotals {
789
+ "requests": number;
790
+ "errors": number;
791
+ "error_rate": number;
792
+ }
793
+ export interface McpNameRequestCount {
794
+ "name": string;
795
+ "requests": number;
796
+ }
797
+ export interface McpToolStats {
798
+ "name": string;
799
+ "requests": number;
800
+ "errors": number;
801
+ "error_rate": number;
802
+ "avg_ms": number;
803
+ "p95_ms": number;
804
+ }
805
+ export interface ListTracesInput {
806
+ "limit"?: number;
807
+ }
808
+ export interface ListTracesOutput {
809
+ "traces": TraceSummary[];
810
+ "mode": McpDataMode;
811
+ }
812
+ export interface GetTraceInput {
813
+ "trace_id": TraceId;
814
+ }
815
+ export interface GetTraceOutput {
816
+ "trace": Trace;
817
+ "mode": McpDataMode;
818
+ }
819
+ export interface ListSessionsInput {
820
+ "limit"?: number;
821
+ "active_only"?: boolean;
822
+ }
823
+ export interface ListSessionsOutput {
824
+ "sessions": SessionEntity[];
825
+ "mode": McpDataMode;
826
+ }
827
+ export interface SearchLogsInput {
828
+ "trace_id"?: TraceId;
829
+ "service_name"?: string;
830
+ "severity_min"?: number;
831
+ "query"?: string;
832
+ "limit"?: number;
833
+ }
834
+ export interface SearchLogsOutput {
835
+ "logs": LogRecord[];
836
+ "mode": McpDataMode;
837
+ }
838
+ export interface FetchTelemetryInput {
839
+ "view": FetchTelemetryView;
840
+ "trace_id"?: TraceId;
841
+ "service_name"?: string;
842
+ "severity_min"?: number;
843
+ "query"?: string;
844
+ "limit"?: number;
845
+ "hours"?: number;
846
+ }
847
+ export interface FetchTelemetryOutput {
848
+ "traces"?: Trace[];
849
+ "trace"?: Trace;
850
+ "logs"?: LogRecord[];
851
+ "stats"?: McpDashboardStats;
852
+ "mode": McpDataMode;
853
+ }
854
+ export interface LogStreamEvent {
855
+ "type": "log";
856
+ "data": LogRecord;
857
+ "timestamp": string;
858
+ }
859
+ export interface HeartbeatEvent {
860
+ "type": "heartbeat";
861
+ "timestamp": string;
862
+ }
863
+ export interface CursorPageTrace {
864
+ "items": Trace[];
865
+ "next_cursor"?: string;
866
+ "prev_cursor"?: string;
867
+ "has_more": boolean;
868
+ }
869
+ export interface CursorPageSpan {
870
+ "items": Span[];
871
+ "next_cursor"?: string;
872
+ "prev_cursor"?: string;
873
+ "has_more": boolean;
874
+ }
875
+ export interface CursorPageLogRecord {
876
+ "items": LogRecord[];
877
+ "next_cursor"?: string;
878
+ "prev_cursor"?: string;
879
+ "has_more": boolean;
880
+ }
881
+ export interface CursorPageSessionEntity {
882
+ "items": SessionEntity[];
883
+ "next_cursor"?: string;
884
+ "prev_cursor"?: string;
885
+ "has_more": boolean;
886
+ }