@ancplua/qyl-api-schema 12.0.0 → 12.1.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.
@@ -68,6 +68,31 @@ export declare const ProblemCodeValues: {
68
68
  readonly serviceUnavailable: "service_unavailable";
69
69
  };
70
70
  export type ProblemCode = typeof ProblemCodeValues[keyof typeof ProblemCodeValues];
71
+ export declare const FailureStatusValues: {
72
+ readonly open: "open";
73
+ readonly resolved: "resolved";
74
+ readonly ignored: "ignored";
75
+ };
76
+ export type FailureStatus = typeof FailureStatusValues[keyof typeof FailureStatusValues];
77
+ export declare const MatcherOpValues: {
78
+ readonly eq: "eq";
79
+ readonly neq: "neq";
80
+ readonly in: "in";
81
+ readonly prefix: "prefix";
82
+ readonly contains: "contains";
83
+ readonly exists: "exists";
84
+ readonly gt: "gt";
85
+ readonly gte: "gte";
86
+ readonly lt: "lt";
87
+ readonly lte: "lte";
88
+ };
89
+ export type MatcherOp = typeof MatcherOpValues[keyof typeof MatcherOpValues];
90
+ export declare const MatcherScopeValues: {
91
+ readonly span: "span";
92
+ readonly resource: "resource";
93
+ readonly log: "log";
94
+ };
95
+ export type MatcherScope = typeof MatcherScopeValues[keyof typeof MatcherScopeValues];
71
96
  export declare const CollectorKeyRoleValues: {
72
97
  readonly ingest: "ingest";
73
98
  readonly read: "read";
@@ -207,19 +232,6 @@ export declare const OsTypeValues: {
207
232
  readonly zOs: "z_os";
208
233
  };
209
234
  export type OsType = typeof OsTypeValues[keyof typeof OsTypeValues];
210
- export declare const MetricKindValues: {
211
- readonly gauge: "gauge";
212
- readonly sum: "sum";
213
- readonly histogram: "histogram";
214
- readonly exponential_histogram: "exponential_histogram";
215
- };
216
- export type MetricKind = typeof MetricKindValues[keyof typeof MetricKindValues];
217
- export declare const MetricTemporalityValues: {
218
- readonly unspecified: "unspecified";
219
- readonly delta: "delta";
220
- readonly cumulative: "cumulative";
221
- };
222
- export type MetricTemporality = typeof MetricTemporalityValues[keyof typeof MetricTemporalityValues];
223
235
  export declare const MetricAggregationValues: {
224
236
  readonly avg: "avg";
225
237
  readonly min: "min";
@@ -233,9 +245,30 @@ export declare const MetricAggregationValues: {
233
245
  readonly p99: "p99";
234
246
  };
235
247
  export type MetricAggregation = typeof MetricAggregationValues[keyof typeof MetricAggregationValues];
248
+ export declare const MetricKindValues: {
249
+ readonly gauge: "gauge";
250
+ readonly sum: "sum";
251
+ readonly histogram: "histogram";
252
+ readonly exponential_histogram: "exponential_histogram";
253
+ };
254
+ export type MetricKind = typeof MetricKindValues[keyof typeof MetricKindValues];
255
+ export declare const MetricTemporalityValues: {
256
+ readonly unspecified: "unspecified";
257
+ readonly delta: "delta";
258
+ readonly cumulative: "cumulative";
259
+ };
260
+ export type MetricTemporality = typeof MetricTemporalityValues[keyof typeof MetricTemporalityValues];
236
261
  export declare const MetricMatcherOpValues: {
237
262
  readonly eq: "eq";
263
+ readonly neq: "neq";
264
+ readonly in: "in";
238
265
  readonly prefix: "prefix";
266
+ readonly contains: "contains";
267
+ readonly exists: "exists";
268
+ readonly gt: "gt";
269
+ readonly gte: "gte";
270
+ readonly lt: "lt";
271
+ readonly lte: "lte";
239
272
  };
240
273
  export type MetricMatcherOp = typeof MetricMatcherOpValues[keyof typeof MetricMatcherOpValues];
241
274
  export declare const SessionEventNameValues: {
@@ -406,11 +439,27 @@ export declare const WorkbenchTransportKindValues: {
406
439
  readonly builtin: "builtin";
407
440
  };
408
441
  export type WorkbenchTransportKind = typeof WorkbenchTransportKindValues[keyof typeof WorkbenchTransportKindValues];
442
+ export declare const McpFailureClassValues: {
443
+ readonly transport: "transport";
444
+ readonly protocol: "protocol";
445
+ readonly tool_result: "tool_result";
446
+ readonly authentication: "authentication";
447
+ readonly cancellation: "cancellation";
448
+ readonly timeout: "timeout";
449
+ };
450
+ export type McpFailureClass = typeof McpFailureClassValues[keyof typeof McpFailureClassValues];
409
451
  export declare const McpDataModeValues: {
410
452
  readonly live: "live";
411
453
  readonly demo: "demo";
412
454
  };
413
455
  export type McpDataMode = typeof McpDataModeValues[keyof typeof McpDataModeValues];
456
+ export declare const AnnotationClassificationValues: {
457
+ readonly note: "note";
458
+ readonly hypothesis: "hypothesis";
459
+ readonly finding: "finding";
460
+ readonly rejected: "rejected";
461
+ };
462
+ export type AnnotationClassification = typeof AnnotationClassificationValues[keyof typeof AnnotationClassificationValues];
414
463
  export declare const CiPhaseStatusValues: {
415
464
  readonly ok: "ok";
416
465
  readonly error: "error";
@@ -428,6 +477,14 @@ export declare const DeletableKindValues: {
428
477
  readonly savedQuery: "saved_query";
429
478
  };
430
479
  export type DeletableKind = typeof DeletableKindValues[keyof typeof DeletableKindValues];
480
+ export declare const FailureChangeValues: {
481
+ readonly new: "new";
482
+ readonly worsening: "worsening";
483
+ readonly ongoing: "ongoing";
484
+ readonly recovering: "recovering";
485
+ readonly regressed: "regressed";
486
+ };
487
+ export type FailureChange = typeof FailureChangeValues[keyof typeof FailureChangeValues];
431
488
  export declare const McpScopeValues: {
432
489
  readonly read: "qyl:read";
433
490
  readonly write: "qyl:write";
@@ -439,11 +496,13 @@ export declare const FetchTelemetryViewValues: {
439
496
  readonly trace: "trace";
440
497
  readonly logs: "logs";
441
498
  readonly mcpStats: "mcp_stats";
499
+ readonly compare: "compare";
442
500
  };
443
501
  export type FetchTelemetryView = typeof FetchTelemetryViewValues[keyof typeof FetchTelemetryViewValues];
444
502
  export type AttributeDouble = number | "NaN" | "Infinity" | "-Infinity";
445
503
  export type AttributeValue = null | string | boolean | AttributeValue[] | AttributeObjectValue;
446
504
  export type AttributeObjectValue = AttributeIntValue | AttributeDoubleValue | AttributeBytesValue | AttributeKeyValueListValue;
505
+ export type MatcherValue = string | number | boolean;
447
506
  export type RunnerResourceEvents = RunnerResourceState;
448
507
  export type RunnerLogEvents = RunnerLogLine;
449
508
  export type WorkbenchServerConfiguration = WorkbenchStdioServerConfiguration | WorkbenchStreamableHttpServerConfiguration | WorkbenchBuiltinServerConfiguration;
@@ -452,10 +511,14 @@ export type WorkbenchEvaluationExportPayload = WorkbenchEvaluationJsonExportPayl
452
511
  export type WorkbenchProtocolEvents = WorkbenchProtocolEvent;
453
512
  export type WorkbenchExecutionUpdateEvents = WorkbenchExecutionRecord;
454
513
  export type ToolErrorCode = "invalid_argument" | "not_found" | "no_project_access" | "collector_unreachable" | "collector_timeout" | "cancelled" | "collector_unauthorized" | "collector_rate_limited" | "collector_rejected" | "collector_error" | "contract_mismatch" | "insufficient_scope" | "conflict" | "precondition_failed" | "precondition_required" | "internal";
455
- export type AnnotationTarget = TraceAnnotationTarget | SpanAnnotationTarget | SessionAnnotationTarget;
514
+ export type McpStatsComparison = "previous_window" | McpComparisonOffset | McpComparisonVersion | string;
515
+ export type AnnotationTarget = TraceAnnotationTarget | SpanAnnotationTarget | SessionAnnotationTarget | FailureAnnotationTarget;
516
+ export type MetricComparison = "previous_window" | MetricComparisonOffset;
456
517
  export type SavedQueryFilter = SavedTraceQueryFilter | SavedLogQueryFilter | SavedMetricQueryFilter;
457
518
  export type SavedQueryRunResult = SavedTraceQueryRun | SavedLogQueryRun | SavedMetricQueryRun;
458
- export type FetchTelemetryInput = FetchTelemetryTracesInput | FetchTelemetryTraceInput | FetchTelemetryLogsInput | FetchTelemetryMcpStatsInput;
519
+ export type AnalysisBaseline = "previous_window" | ToolWindow | BaselineOffset;
520
+ export type FailureStatusFilter = FailureStatus | "all";
521
+ export type FetchTelemetryInput = FetchTelemetryTracesInput | FetchTelemetryTraceInput | FetchTelemetryLogsInput | FetchTelemetryMcpStatsInput | FetchTelemetryCompareInput;
459
522
  export type LogEvents = LogStreamEvent | HeartbeatEvent;
460
523
  export interface InternalServerError extends ProblemDetails {
461
524
  "type": "https://qyl.at/problems/internal-error";
@@ -470,6 +533,11 @@ export interface ProblemDetails {
470
533
  "instance"?: string;
471
534
  "code": ProblemCode;
472
535
  }
536
+ export interface UpdateFailureStatusRequest {
537
+ "status": FailureStatus;
538
+ "ignore_until"?: string;
539
+ "assignee"?: string;
540
+ }
473
541
  export interface AttributeBytesValue {
474
542
  "type": "bytes";
475
543
  "base64": string;
@@ -505,6 +573,29 @@ export interface InstrumentationScope {
505
573
  "attributes"?: Attribute[];
506
574
  "dropped_attributes_count"?: number;
507
575
  }
576
+ export interface TelemetryMatcher {
577
+ "key": string;
578
+ "op": MatcherOp;
579
+ "value"?: MatcherValue;
580
+ "values"?: MatcherValue[];
581
+ "scope"?: MatcherScope;
582
+ }
583
+ export interface ToolWindow {
584
+ "start_time": string;
585
+ "end_time": string;
586
+ }
587
+ export interface ToolCoverage {
588
+ "examined": number | null;
589
+ "matched": number | null;
590
+ "returned": number | null;
591
+ "truncated": boolean;
592
+ "scan_complete": boolean;
593
+ "as_of": string;
594
+ }
595
+ export interface ToolReadContext {
596
+ "window": ToolWindow;
597
+ "coverage": ToolCoverage;
598
+ }
508
599
  export interface ResourceBase {
509
600
  "id": string;
510
601
  "created_at": string;
@@ -703,6 +794,9 @@ export interface LogTemplate {
703
794
  "rendered_message"?: string;
704
795
  }
705
796
  export interface MetricDescriptor {
797
+ "supported_aggregations"?: MetricAggregation[];
798
+ "services"?: string[];
799
+ "conflicts"?: MetricDescriptorConflict[];
706
800
  "name": string;
707
801
  "kind": MetricKind;
708
802
  "temporality": MetricTemporality;
@@ -712,7 +806,14 @@ export interface MetricDescriptor {
712
806
  "series_count": number;
713
807
  "last_seen": string;
714
808
  }
809
+ export interface MetricDescriptorConflict {
810
+ "kind": MetricKind;
811
+ "unit"?: string;
812
+ "services": string[];
813
+ }
715
814
  export interface MetricSeries {
815
+ "new"?: boolean;
816
+ "stale"?: boolean;
716
817
  "series_id": string;
717
818
  "name": string;
718
819
  "kind": MetricKind;
@@ -744,8 +845,10 @@ export interface MetricQueryResult {
744
845
  }
745
846
  export interface MetricAttributeMatcher {
746
847
  "key": string;
747
- "op": MetricMatcherOp;
748
- "value": string;
848
+ "op": MatcherOp;
849
+ "value"?: MatcherValue;
850
+ "values"?: MatcherValue[];
851
+ "scope"?: MatcherScope;
749
852
  }
750
853
  export interface SessionAttributes {
751
854
  "session_id": SessionId;
@@ -1328,6 +1431,8 @@ export interface WorkbenchEvaluationExportAccepted {
1328
1431
  "export": WorkbenchEvaluationExport;
1329
1432
  }
1330
1433
  export interface ToolError {
1434
+ "fields"?: ValidationErrorDetail[];
1435
+ "problem_type"?: ProblemType;
1331
1436
  "code": ToolErrorCode;
1332
1437
  "message": string;
1333
1438
  "retryable": boolean;
@@ -1337,28 +1442,115 @@ export interface ToolPage {
1337
1442
  "next_cursor"?: string;
1338
1443
  }
1339
1444
  export interface ToolTimeRange {
1445
+ "lookback_minutes"?: number;
1340
1446
  "start_time"?: string;
1341
1447
  "end_time"?: string;
1342
1448
  }
1343
1449
  export interface DisplayTracesInput {
1450
+ "failure_class"?: McpFailureClass;
1451
+ "server_name"?: string;
1452
+ "tool_name"?: string;
1453
+ "transport"?: string;
1454
+ "failure_id"?: string;
1455
+ "compare_to"?: TraceId;
1456
+ "selected_span_id"?: SpanId;
1457
+ "cursor"?: string;
1458
+ "matchers"?: TelemetryMatcher[];
1459
+ "lookback_minutes"?: number;
1460
+ "start_time"?: string;
1461
+ "end_time"?: string;
1344
1462
  "trace_id"?: TraceId;
1345
1463
  "session_id"?: SessionId;
1346
1464
  "limit"?: number;
1347
1465
  }
1348
1466
  export interface DisplayTracesOutput {
1349
- "traces": Trace[];
1467
+ "selected_span_id"?: SpanId;
1468
+ "comparison"?: CompareTracesOutput;
1469
+ "window": ToolWindow;
1470
+ "coverage": ToolCoverage;
1471
+ "traces": ToolTrace[];
1350
1472
  "selected_trace_id"?: TraceId;
1351
1473
  "mode": McpDataMode;
1352
1474
  "error"?: ToolError;
1353
1475
  }
1476
+ export interface CompareTracesOutput {
1477
+ "window": ToolWindow;
1478
+ "coverage": ToolCoverage;
1479
+ "first_divergence": TraceDivergence | null;
1480
+ "aligned": AlignedSpans[];
1481
+ "after_divergence": TraceDivergence[];
1482
+ "unmatched": EvidenceSpan[];
1483
+ "comparable": boolean;
1484
+ "reason"?: string;
1485
+ "error"?: ToolError;
1486
+ }
1487
+ export interface TraceDivergence {
1488
+ "a_span": EvidenceSpan | null;
1489
+ "b_span": EvidenceSpan | null;
1490
+ "kind": "missing" | "extra" | "status" | "attribute" | "duration";
1491
+ "attribute"?: string;
1492
+ }
1493
+ export interface EvidenceSpan {
1494
+ "start_time"?: string;
1495
+ "end_time"?: string;
1496
+ "trace_id": TraceId;
1497
+ "span_id": SpanId;
1498
+ "parent_span_id"?: SpanId;
1499
+ "session_id"?: SessionId;
1500
+ "service": string;
1501
+ "name": string;
1502
+ "status": string;
1503
+ "status_message"?: string;
1504
+ "exception"?: RecordedException;
1505
+ "key_attributes": Attribute[];
1506
+ "duration_ms": number;
1507
+ "role": "matched" | "context";
1508
+ }
1509
+ export interface RecordedException {
1510
+ "type"?: string;
1511
+ "message"?: string;
1512
+ "stacktrace"?: string;
1513
+ }
1514
+ export interface AlignedSpans {
1515
+ "a_span": EvidenceSpan;
1516
+ "b_span": EvidenceSpan;
1517
+ "differences": TraceDivergence[];
1518
+ }
1519
+ export interface ToolTrace extends TraceSummary {
1520
+ "spans": ToolSpan[];
1521
+ }
1522
+ export interface ToolSpan extends Span {
1523
+ "role": "matched" | "context";
1524
+ "self_time_ms"?: number;
1525
+ "self_time_share"?: number;
1526
+ }
1354
1527
  export interface DisplayMcpDashboardInput {
1528
+ "server_name"?: string;
1529
+ "tool_name"?: string;
1530
+ "transport"?: string;
1531
+ "compare_to"?: McpStatsComparison;
1532
+ "lookback_minutes"?: number;
1533
+ "start_time"?: string;
1534
+ "end_time"?: string;
1355
1535
  "hours"?: number;
1356
1536
  }
1537
+ export interface McpComparisonOffset {
1538
+ "offset_minutes": number;
1539
+ }
1540
+ export interface McpComparisonVersion {
1541
+ "server_version": string;
1542
+ }
1357
1543
  export interface DisplayMcpDashboardOutput {
1544
+ "window": ToolWindow;
1545
+ "coverage": ToolCoverage;
1358
1546
  "stats": McpDashboardStats;
1359
1547
  "error"?: ToolError;
1360
1548
  }
1361
1549
  export interface McpDashboardStats {
1550
+ "groups"?: McpTrafficGroup[];
1551
+ "failure_classes"?: McpFailureClasses;
1552
+ "comparison"?: McpStatsComparisonResult;
1553
+ "coverage"?: ToolCoverage;
1362
1554
  "window": McpDashboardWindow;
1363
1555
  "buckets": McpDashboardBucket[];
1364
1556
  "totals": McpDashboardTotals;
@@ -1370,6 +1562,38 @@ export interface McpDashboardStats {
1370
1562
  "truncated": boolean;
1371
1563
  "mode": McpDataMode;
1372
1564
  }
1565
+ export interface McpTrafficGroup {
1566
+ "requests": number;
1567
+ "errors": number;
1568
+ "error_rate": number;
1569
+ "p50_ms": number | null;
1570
+ "p95_ms": number | null;
1571
+ "unit": "requests";
1572
+ "name": string;
1573
+ "example_trace_ids": TraceId[];
1574
+ }
1575
+ export interface McpFailureClasses {
1576
+ "transport": number;
1577
+ "protocol": number;
1578
+ "tool_result": number;
1579
+ "authentication": number;
1580
+ "cancellation": number;
1581
+ "timeout": number;
1582
+ }
1583
+ export interface McpStatsComparisonResult {
1584
+ "window": ToolWindow;
1585
+ "totals": McpTrafficTotals;
1586
+ "groups": McpTrafficGroup[];
1587
+ "failure_classes": McpFailureClasses;
1588
+ }
1589
+ export interface McpTrafficTotals {
1590
+ "requests": number;
1591
+ "errors": number;
1592
+ "error_rate": number;
1593
+ "p50_ms": number | null;
1594
+ "p95_ms": number | null;
1595
+ "unit": "requests";
1596
+ }
1373
1597
  export interface McpDashboardWindow {
1374
1598
  "start": string;
1375
1599
  "end": string;
@@ -1381,6 +1605,8 @@ export interface McpDashboardBucket {
1381
1605
  "errors": number;
1382
1606
  }
1383
1607
  export interface McpDashboardTotals {
1608
+ "p50_ms"?: number;
1609
+ "p95_ms"?: number;
1384
1610
  "requests": number;
1385
1611
  "errors": number;
1386
1612
  "error_rate": number;
@@ -1398,7 +1624,23 @@ export interface McpToolStats {
1398
1624
  "p95_ms": number;
1399
1625
  }
1400
1626
  export interface ListTracesInput {
1627
+ "failure_class"?: McpFailureClass;
1628
+ "server_name"?: string;
1629
+ "tool_name"?: string;
1630
+ "transport"?: string;
1631
+ "session_id"?: SessionId;
1632
+ "root_span_name"?: string;
1633
+ "min_duration_ms"?: number;
1634
+ "max_duration_ms"?: number;
1635
+ "release"?: string;
1636
+ "failure_id"?: string;
1637
+ "error_scope"?: "any" | "root";
1638
+ "annotation_label"?: string;
1639
+ "group_by"?: "failure_id" | "root_span" | "service";
1640
+ "sort_by"?: "start_time" | "duration" | "errors";
1641
+ "matchers"?: TelemetryMatcher[];
1401
1642
  "limit"?: number;
1643
+ "lookback_minutes"?: number;
1402
1644
  "start_time"?: string;
1403
1645
  "end_time"?: string;
1404
1646
  "service_name"?: string;
@@ -1406,25 +1648,78 @@ export interface ListTracesInput {
1406
1648
  "cursor"?: string;
1407
1649
  }
1408
1650
  export interface ListTracesOutput {
1409
- "traces": TraceSummary[];
1651
+ "groups"?: TraceGroup[];
1652
+ "window": ToolWindow;
1653
+ "coverage": ToolCoverage;
1654
+ "traces": ToolTraceSummary[];
1410
1655
  "mode": McpDataMode;
1411
1656
  "has_more": boolean;
1412
1657
  "next_cursor"?: string;
1413
1658
  "error"?: ToolError;
1414
1659
  }
1660
+ export interface TraceGroup {
1661
+ "key": string;
1662
+ "count": number;
1663
+ "example_trace_ids": TraceId[];
1664
+ }
1665
+ export interface ToolTraceSummary {
1666
+ "trace_id": TraceId;
1667
+ "root_span"?: Span;
1668
+ "span_count": number;
1669
+ "duration_ns": string;
1670
+ "start_time": string;
1671
+ "end_time": string;
1672
+ "services": string[];
1673
+ "has_error": boolean;
1674
+ "root_error": boolean;
1675
+ "contained_error": boolean;
1676
+ "failure_ids": string[];
1677
+ "annotation_labels": string[];
1678
+ }
1415
1679
  export interface GetTraceInput {
1680
+ "selection"?: "all" | "errors" | "errors_with_ancestors" | "critical_path";
1681
+ "attributes"?: string[];
1682
+ "include_logs"?: number;
1683
+ "lookback_minutes"?: number;
1684
+ "start_time"?: string;
1685
+ "end_time"?: string;
1416
1686
  "trace_id": TraceId;
1417
1687
  "errors_only"?: boolean;
1418
1688
  "max_spans"?: number;
1419
1689
  "include_attributes"?: boolean;
1420
1690
  }
1421
1691
  export interface GetTraceOutput {
1422
- "trace": Trace;
1692
+ "span_roles"?: SpanEvidenceRole[];
1693
+ "omitted"?: TraceOmitted;
1694
+ "missing_parent_span_ids"?: SpanId[];
1695
+ "links"?: TraceLinkAvailability[];
1696
+ "logs"?: LogRecord[];
1697
+ "settled"?: boolean;
1698
+ "window": ToolWindow;
1699
+ "coverage": ToolCoverage;
1700
+ "trace": ToolTrace;
1423
1701
  "mode": McpDataMode;
1424
1702
  "annotations"?: Annotation[];
1425
1703
  "error"?: ToolError;
1426
1704
  }
1705
+ export interface SpanEvidenceRole {
1706
+ "span_id": SpanId;
1707
+ "role": "matched" | "context";
1708
+ "self_time_ms"?: number;
1709
+ "self_time_share"?: number;
1710
+ }
1711
+ export interface TraceOmitted {
1712
+ "matched": number;
1713
+ "context": number;
1714
+ }
1715
+ export interface TraceLinkAvailability {
1716
+ "trace_id": TraceId;
1717
+ "span_id": SpanId;
1718
+ "available": boolean;
1719
+ }
1427
1720
  export interface Annotation extends ResourceBase {
1721
+ "labels"?: string[];
1722
+ "classification"?: AnnotationClassification;
1428
1723
  "target": AnnotationTarget;
1429
1724
  "text": string;
1430
1725
  }
@@ -1441,45 +1736,123 @@ export interface SessionAnnotationTarget {
1441
1736
  "kind": "session";
1442
1737
  "session_id": SessionId;
1443
1738
  }
1739
+ export interface FailureAnnotationTarget {
1740
+ "kind": "failure";
1741
+ "failure_id": string;
1742
+ }
1444
1743
  export interface ListSessionsInput {
1744
+ "has_error"?: boolean;
1745
+ "min_errors"?: number;
1746
+ "service_name"?: string;
1747
+ "agent_name"?: string;
1748
+ "model"?: string;
1749
+ "min_tokens"?: number;
1750
+ "min_duration_ms"?: number;
1751
+ "annotation_label"?: string;
1752
+ "sort_by"?: "last_activity" | "errors" | "duration" | "tokens";
1753
+ "matchers"?: TelemetryMatcher[];
1445
1754
  "limit"?: number;
1446
1755
  "active_only"?: boolean;
1756
+ "lookback_minutes"?: number;
1447
1757
  "start_time"?: string;
1448
1758
  "end_time"?: string;
1449
1759
  "cursor"?: string;
1450
1760
  }
1451
1761
  export interface ListSessionsOutput {
1452
- "sessions": SessionEntity[];
1762
+ "window": ToolWindow;
1763
+ "coverage": ToolCoverage;
1764
+ "sessions": ToolSession[];
1453
1765
  "mode": McpDataMode;
1454
1766
  "has_more": boolean;
1455
1767
  "next_cursor"?: string;
1456
1768
  "annotations"?: Annotation[];
1457
1769
  "error"?: ToolError;
1458
1770
  }
1771
+ export interface ToolSession {
1772
+ "session_id": SessionId;
1773
+ "user_id"?: UserId;
1774
+ "start_time": string;
1775
+ "end_time"?: string;
1776
+ "duration_ms"?: number;
1777
+ "trace_count": number;
1778
+ "span_count": number;
1779
+ "error_count": number;
1780
+ "services": string[];
1781
+ "state": SessionState;
1782
+ "client"?: SessionClientInfo;
1783
+ "geo"?: SessionGeoInfo;
1784
+ "genai_usage"?: SessionGenAiUsage;
1785
+ "failure_ids"?: string[];
1786
+ "agent_name"?: string;
1787
+ "models"?: string[];
1788
+ "tokens_by_model"?: Record<string, AgentTokens>;
1789
+ "annotations"?: Annotation[];
1790
+ }
1791
+ export interface AgentTokens {
1792
+ "input": number | null;
1793
+ "output": number | null;
1794
+ "cache_read": number | null;
1795
+ "cache_write": number | null;
1796
+ "reasoning": number | null;
1797
+ }
1459
1798
  export interface SearchLogsInput {
1799
+ "span_id"?: SpanId;
1800
+ "group_by"?: "pattern";
1801
+ "context"?: number;
1802
+ "matchers"?: TelemetryMatcher[];
1460
1803
  "trace_id"?: TraceId;
1461
1804
  "service_name"?: string;
1462
1805
  "severity_min"?: number;
1463
1806
  "query"?: string;
1464
1807
  "limit"?: number;
1465
1808
  "session_id"?: SessionId;
1809
+ "lookback_minutes"?: number;
1466
1810
  "start_time"?: string;
1467
1811
  "end_time"?: string;
1468
1812
  "cursor"?: string;
1469
1813
  }
1470
1814
  export interface SearchLogsOutput {
1815
+ "total_matched"?: number;
1816
+ "patterns"?: LogPattern[];
1817
+ "window": ToolWindow;
1818
+ "coverage": ToolCoverage;
1471
1819
  "logs": LogRecord[];
1472
1820
  "mode": McpDataMode;
1473
1821
  "has_more": boolean;
1474
1822
  "next_cursor"?: string;
1475
1823
  "error"?: ToolError;
1476
1824
  }
1825
+ export interface LogPattern {
1826
+ "template": string;
1827
+ "count": number;
1828
+ "severity": number;
1829
+ "first_seen": string;
1830
+ "last_seen": string;
1831
+ "example_ids": string[];
1832
+ }
1477
1833
  export interface CiLogInput {
1834
+ "cursor"?: string;
1835
+ "branch"?: string;
1836
+ "commit"?: string;
1837
+ "leg"?: string;
1838
+ "phase"?: string;
1839
+ "phase_cursor"?: string;
1840
+ "outcome"?: "failed" | "passed" | "all";
1841
+ "compare_to"?: string;
1842
+ "matchers"?: TelemetryMatcher[];
1843
+ "lookback_minutes"?: number;
1844
+ "start_time"?: string;
1845
+ "end_time"?: string;
1478
1846
  "run_id"?: SessionId;
1479
1847
  "service_prefix"?: string;
1480
1848
  "limit"?: number;
1481
1849
  }
1482
1850
  export interface CiRunSummary {
1851
+ "session_id"?: SessionId;
1852
+ "provider_run_id"?: string;
1853
+ "provider_run_url"?: string;
1854
+ "attempt"?: number;
1855
+ "attempts"?: CiAttempt[];
1483
1856
  "run_id": SessionId;
1484
1857
  "state": SessionState;
1485
1858
  "start_time": string;
@@ -1487,30 +1860,95 @@ export interface CiRunSummary {
1487
1860
  "error_count": number;
1488
1861
  "services": string[];
1489
1862
  }
1863
+ export interface CiAttempt {
1864
+ "run_id": SessionId;
1865
+ "attempt": number;
1866
+ "provider_run_id"?: string;
1867
+ "provider_run_url"?: string;
1868
+ }
1490
1869
  export interface CiPhase {
1870
+ "span_id"?: SpanId;
1871
+ "trace_ids"?: TraceId[];
1872
+ "error_log_count"?: number;
1873
+ "error_logs"?: CiErrorExcerpt[];
1491
1874
  "leg": string;
1492
1875
  "phase": string;
1493
1876
  "status": CiPhaseStatus;
1494
1877
  "duration_ms": number;
1495
1878
  "message"?: string;
1496
1879
  }
1880
+ export interface CiErrorExcerpt {
1881
+ "id": string;
1882
+ "body": string;
1883
+ "trace_id"?: TraceId;
1884
+ "span_id"?: SpanId;
1885
+ }
1497
1886
  export interface CiLogOutput {
1887
+ "has_more": boolean;
1888
+ "next_cursor"?: string;
1889
+ "comparison"?: CiComparison;
1890
+ "window": ToolWindow;
1891
+ "coverage": ToolCoverage;
1498
1892
  "runs"?: CiRunSummary[];
1499
1893
  "run_id"?: SessionId;
1500
1894
  "phases"?: CiPhase[];
1501
1895
  "mode": McpDataMode;
1502
1896
  "error"?: ToolError;
1503
1897
  }
1898
+ export interface CiComparison {
1899
+ "baseline_run_id"?: SessionId;
1900
+ "new_failures": CiPhaseChange[];
1901
+ "fixed": CiPhaseChange[];
1902
+ "duration_regressions": CiPhaseChange[];
1903
+ }
1904
+ export interface CiPhaseChange {
1905
+ "leg": string;
1906
+ "phase": string;
1907
+ "current_duration_ms"?: number;
1908
+ "baseline_duration_ms"?: number;
1909
+ "ratio"?: number;
1910
+ "trace_ids"?: TraceId[];
1911
+ }
1504
1912
  export interface FetchTelemetryTracesInput {
1913
+ "failure_class"?: McpFailureClass;
1914
+ "server_name"?: string;
1915
+ "tool_name"?: string;
1916
+ "transport"?: string;
1917
+ "session_id"?: SessionId;
1918
+ "failure_id"?: string;
1919
+ "compare_to"?: TraceId;
1920
+ "selected_span_id"?: SpanId;
1921
+ "cursor"?: string;
1922
+ "lookback_minutes"?: number;
1923
+ "start_time"?: string;
1924
+ "end_time"?: string;
1925
+ "since_cursor"?: string;
1926
+ "fields"?: string[];
1927
+ "matchers"?: TelemetryMatcher[];
1505
1928
  "view": "traces";
1506
1929
  "trace_id"?: TraceId;
1507
1930
  "limit"?: number;
1508
1931
  }
1509
1932
  export interface FetchTelemetryTraceInput {
1933
+ "selection"?: "all" | "errors" | "errors_with_ancestors" | "critical_path";
1934
+ "attributes"?: string[];
1935
+ "include_logs"?: number;
1936
+ "lookback_minutes"?: number;
1937
+ "start_time"?: string;
1938
+ "end_time"?: string;
1939
+ "since_cursor"?: string;
1940
+ "fields"?: string[];
1941
+ "matchers"?: TelemetryMatcher[];
1510
1942
  "view": "trace";
1511
1943
  "trace_id": TraceId;
1512
1944
  }
1513
1945
  export interface FetchTelemetryLogsInput {
1946
+ "lookback_minutes"?: number;
1947
+ "start_time"?: string;
1948
+ "end_time"?: string;
1949
+ "since_cursor"?: string;
1950
+ "fields"?: string[];
1951
+ "matchers"?: TelemetryMatcher[];
1514
1952
  "view": "logs";
1515
1953
  "trace_id"?: TraceId;
1516
1954
  "service_name"?: string;
@@ -1519,51 +1957,148 @@ export interface FetchTelemetryLogsInput {
1519
1957
  "limit"?: number;
1520
1958
  }
1521
1959
  export interface FetchTelemetryMcpStatsInput {
1960
+ "server_name"?: string;
1961
+ "tool_name"?: string;
1962
+ "transport"?: string;
1963
+ "compare_to"?: McpStatsComparison;
1964
+ "lookback_minutes"?: number;
1965
+ "start_time"?: string;
1966
+ "end_time"?: string;
1967
+ "since_cursor"?: string;
1968
+ "fields"?: string[];
1969
+ "matchers"?: TelemetryMatcher[];
1522
1970
  "view": "mcp_stats";
1523
1971
  "hours"?: number;
1524
1972
  }
1973
+ export interface AnalysisInput {
1974
+ "lookback_minutes"?: number;
1975
+ "start_time"?: string;
1976
+ "end_time"?: string;
1977
+ "matchers"?: TelemetryMatcher[];
1978
+ "limit"?: number;
1979
+ "cursor"?: string;
1980
+ }
1981
+ export interface CompareTracesInput {
1982
+ "lookback_minutes"?: number;
1983
+ "start_time"?: string;
1984
+ "end_time"?: string;
1985
+ "matchers"?: TelemetryMatcher[];
1986
+ "limit"?: number;
1987
+ "cursor"?: string;
1988
+ "a": ExecutionReference;
1989
+ "b": ExecutionReference;
1990
+ }
1991
+ export interface ExecutionReference {
1992
+ "trace_id"?: TraceId;
1993
+ "session_id"?: SessionId;
1994
+ }
1995
+ export interface FetchTelemetryCompareInput {
1996
+ "lookback_minutes"?: number;
1997
+ "start_time"?: string;
1998
+ "end_time"?: string;
1999
+ "matchers"?: TelemetryMatcher[];
2000
+ "limit"?: number;
2001
+ "cursor"?: string;
2002
+ "a": ExecutionReference;
2003
+ "b": ExecutionReference;
2004
+ "view": "compare";
2005
+ "since_cursor"?: string;
2006
+ "fields"?: string[];
2007
+ }
1525
2008
  export interface FetchTelemetryOutput {
1526
- "traces"?: Trace[];
1527
- "trace"?: Trace;
2009
+ "comparison"?: CompareTracesOutput;
2010
+ "since_cursor"?: string;
2011
+ "next_cursor"?: string;
2012
+ "window": ToolWindow;
2013
+ "coverage": ToolCoverage;
2014
+ "traces"?: ToolTrace[];
2015
+ "trace"?: ToolTrace;
1528
2016
  "logs"?: LogRecord[];
1529
2017
  "stats"?: McpDashboardStats;
1530
2018
  "mode": McpDataMode;
1531
2019
  "error"?: ToolError;
1532
2020
  }
1533
2021
  export interface ListMetricsInput {
2022
+ "text"?: string;
2023
+ "service_name"?: string;
2024
+ "kind"?: MetricKind;
2025
+ "unit"?: string;
2026
+ "matchers"?: TelemetryMatcher[];
2027
+ "lookback_minutes"?: number;
2028
+ "start_time"?: string;
2029
+ "end_time"?: string;
1534
2030
  "name_prefix"?: string;
1535
2031
  "limit"?: number;
1536
2032
  "cursor"?: string;
1537
2033
  }
1538
2034
  export interface ListMetricsOutput {
2035
+ "window": ToolWindow;
2036
+ "coverage": ToolCoverage;
1539
2037
  "items": MetricDescriptor[];
1540
2038
  "has_more": boolean;
1541
2039
  "next_cursor"?: string;
1542
2040
  "error"?: ToolError;
1543
2041
  }
1544
2042
  export interface GetMetricSeriesInput {
2043
+ "lookback_minutes"?: number;
2044
+ "start_time"?: string;
2045
+ "end_time"?: string;
1545
2046
  "metric_name": string;
1546
2047
  "matchers"?: MetricAttributeMatcher[];
1547
2048
  "limit"?: number;
1548
2049
  "cursor"?: string;
1549
2050
  }
1550
2051
  export interface GetMetricSeriesOutput {
2052
+ "keys"?: MetricKeySummary[];
2053
+ "suggested_group_by"?: string[];
2054
+ "window": ToolWindow;
2055
+ "coverage": ToolCoverage;
1551
2056
  "items": MetricSeries[];
1552
2057
  "has_more": boolean;
1553
2058
  "next_cursor"?: string;
1554
2059
  "error"?: ToolError;
1555
2060
  }
2061
+ export interface MetricKeySummary {
2062
+ "key": string;
2063
+ "cardinality": number;
2064
+ "cardinality_exact": boolean;
2065
+ "top_values": AttributeValueCount[];
2066
+ "coverage_share": number;
2067
+ }
2068
+ export interface AttributeValueCount {
2069
+ "value": MatcherValue;
2070
+ "count": number;
2071
+ "share": number;
2072
+ }
1556
2073
  export interface QueryMetricInput {
2074
+ "lookback_minutes"?: number;
2075
+ "function"?: "none" | "rate" | "increase" | "delta";
2076
+ "compare_to"?: MetricComparison;
2077
+ "ratio_of"?: MetricRatio;
1557
2078
  "metric_name": string;
1558
- "start_time": string;
1559
- "end_time": string;
2079
+ "start_time"?: string;
2080
+ "end_time"?: string;
1560
2081
  "step_ms"?: number;
1561
2082
  "aggregation"?: MetricAggregation;
1562
2083
  "group_by"?: string[];
1563
2084
  "matchers"?: MetricAttributeMatcher[];
1564
2085
  "series_limit"?: number;
1565
2086
  }
2087
+ export interface MetricComparisonOffset {
2088
+ "offset_ms": number;
2089
+ }
2090
+ export interface MetricRatio {
2091
+ "metric_name": string;
2092
+ "aggregation"?: MetricAggregation;
2093
+ "matchers"?: TelemetryMatcher[];
2094
+ }
1566
2095
  export interface QueryMetricOutput {
2096
+ "method"?: string;
2097
+ "approximate"?: boolean;
2098
+ "exemplar_trace_ids"?: TraceId[];
2099
+ "comparison"?: MetricComparisonResult;
2100
+ "window": ToolWindow;
2101
+ "coverage": ToolCoverage;
1567
2102
  "name": string;
1568
2103
  "kind": MetricKind;
1569
2104
  "unit"?: string;
@@ -1575,31 +2110,43 @@ export interface QueryMetricOutput {
1575
2110
  "truncated": boolean;
1576
2111
  "error"?: ToolError;
1577
2112
  }
2113
+ export interface MetricComparisonResult {
2114
+ "window": ToolWindow;
2115
+ "series": MetricSeriesResult[];
2116
+ }
1578
2117
  export interface CreateAnnotationInput {
2118
+ "idempotency_key"?: string;
2119
+ "labels"?: string[];
2120
+ "classification"?: AnnotationClassification;
1579
2121
  "target": AnnotationTarget;
1580
2122
  "text": string;
1581
2123
  }
1582
2124
  export interface UpdateAnnotationInput {
1583
2125
  "id": string;
1584
2126
  "etag": string;
1585
- "text": string;
2127
+ "labels"?: string[];
2128
+ "classification"?: AnnotationClassification;
2129
+ "text"?: string;
1586
2130
  }
1587
2131
  export interface AnnotationOutput {
1588
2132
  "annotation"?: Annotation;
1589
2133
  "error"?: ToolError;
1590
2134
  }
1591
2135
  export interface CreateSavedQueryInput {
2136
+ "idempotency_key"?: string;
1592
2137
  "name": string;
1593
2138
  "description"?: string;
1594
2139
  "filter": SavedQueryFilter;
1595
2140
  }
1596
2141
  export interface SavedTraceQueryFilter {
2142
+ "matchers"?: TelemetryMatcher[];
1597
2143
  "signal": "traces";
1598
2144
  "lookback_minutes"?: number;
1599
2145
  "service_name"?: string;
1600
2146
  "errors_only"?: boolean;
1601
2147
  }
1602
2148
  export interface SavedLogQueryFilter {
2149
+ "matchers"?: TelemetryMatcher[];
1603
2150
  "signal": "logs";
1604
2151
  "lookback_minutes"?: number;
1605
2152
  "service_name"?: string;
@@ -1634,17 +2181,24 @@ export interface SavedQuery extends ResourceBase {
1634
2181
  "filter": SavedQueryFilter;
1635
2182
  }
1636
2183
  export interface ListSavedQueriesInput {
2184
+ "matchers"?: TelemetryMatcher[];
2185
+ "lookback_minutes"?: number;
2186
+ "start_time"?: string;
2187
+ "end_time"?: string;
1637
2188
  "signal"?: SavedQuerySignal;
1638
2189
  "limit"?: number;
1639
2190
  "cursor"?: string;
1640
2191
  }
1641
2192
  export interface ListSavedQueriesOutput {
2193
+ "window": ToolWindow;
2194
+ "coverage": ToolCoverage;
1642
2195
  "saved_queries": SavedQuery[];
1643
2196
  "has_more": boolean;
1644
2197
  "next_cursor"?: string;
1645
2198
  "error"?: ToolError;
1646
2199
  }
1647
2200
  export interface RunSavedQueryInput {
2201
+ "lookback_minutes"?: number;
1648
2202
  "id": string;
1649
2203
  "start_time"?: string;
1650
2204
  "end_time"?: string;
@@ -1652,6 +2206,8 @@ export interface RunSavedQueryInput {
1652
2206
  "cursor"?: string;
1653
2207
  }
1654
2208
  export interface RunSavedQueryOutput {
2209
+ "window": ToolWindow;
2210
+ "coverage": ToolCoverage;
1655
2211
  "result"?: SavedQueryRunResult;
1656
2212
  "mode"?: McpDataMode;
1657
2213
  "error"?: ToolError;
@@ -1681,12 +2237,594 @@ export interface DeleteOutput {
1681
2237
  "deleted": boolean;
1682
2238
  "error"?: ToolError;
1683
2239
  }
2240
+ export interface BaselineOffset {
2241
+ "offset_minutes": number;
2242
+ }
2243
+ export interface ServiceAnalysisInput {
2244
+ "lookback_minutes"?: number;
2245
+ "start_time"?: string;
2246
+ "end_time"?: string;
2247
+ "matchers"?: TelemetryMatcher[];
2248
+ "limit"?: number;
2249
+ "cursor"?: string;
2250
+ "service_name"?: string;
2251
+ "environment"?: string;
2252
+ }
2253
+ export interface FailureRelease {
2254
+ "service": string;
2255
+ "version": string;
2256
+ "first_seen": string;
2257
+ "revision"?: string;
2258
+ }
2259
+ export interface FailureOccurrence {
2260
+ "trace_id": TraceId;
2261
+ "span_id": SpanId;
2262
+ "session_id"?: SessionId;
2263
+ "timestamp": string;
2264
+ "message"?: string;
2265
+ "release"?: string;
2266
+ }
2267
+ export interface FailureReleaseCount {
2268
+ "release": string;
2269
+ "count": number;
2270
+ }
2271
+ export interface AttributeAssociation {
2272
+ "key": string;
2273
+ "value": MatcherValue;
2274
+ "share_a": number;
2275
+ "share_b": number;
2276
+ "count_a": number;
2277
+ "count_b": number;
2278
+ "lift": number | null;
2279
+ }
2280
+ export interface FailureSummary {
2281
+ "failure_id": string;
2282
+ "etag": string;
2283
+ "signature": string;
2284
+ "exception_type"?: string;
2285
+ "normalized_message": string;
2286
+ "operation": string;
2287
+ "service": string;
2288
+ "first_seen": string;
2289
+ "last_seen": string;
2290
+ "count": number;
2291
+ "affected_traces": number;
2292
+ "affected_sessions": number;
2293
+ "releases_seen": string[];
2294
+ "status": FailureStatus;
2295
+ "ignore_until"?: string;
2296
+ "assignee"?: string;
2297
+ "annotation_count": number;
2298
+ "example_trace_ids": TraceId[];
2299
+ }
2300
+ export interface FailureDetail {
2301
+ "failure_id": string;
2302
+ "etag": string;
2303
+ "signature": string;
2304
+ "exception_type"?: string;
2305
+ "normalized_message": string;
2306
+ "operation": string;
2307
+ "service": string;
2308
+ "first_seen": string;
2309
+ "last_seen": string;
2310
+ "count": number;
2311
+ "affected_traces": number;
2312
+ "affected_sessions": number;
2313
+ "releases_seen": string[];
2314
+ "status": FailureStatus;
2315
+ "ignore_until"?: string;
2316
+ "assignee"?: string;
2317
+ "annotation_count": number;
2318
+ "example_trace_ids": TraceId[];
2319
+ "counts_per_release"?: FailureReleaseCount[];
2320
+ "discriminators"?: AttributeAssociation[];
2321
+ "recent_occurrences"?: FailureOccurrence[];
2322
+ "raw_messages"?: string[];
2323
+ }
2324
+ export interface TriageInput {
2325
+ "lookback_minutes"?: number;
2326
+ "start_time"?: string;
2327
+ "end_time"?: string;
2328
+ "matchers"?: TelemetryMatcher[];
2329
+ "limit"?: number;
2330
+ "cursor"?: string;
2331
+ "service_name"?: string;
2332
+ "environment"?: string;
2333
+ "baseline"?: AnalysisBaseline;
2334
+ }
2335
+ export interface TriageFailure {
2336
+ "failure_id": string;
2337
+ "signature": string;
2338
+ "change": FailureChange;
2339
+ "count": number;
2340
+ "baseline_count": number;
2341
+ "affected_traces": number;
2342
+ "services": string[];
2343
+ "first_seen": string;
2344
+ "example_trace_id"?: TraceId;
2345
+ "coinciding_release"?: FailureRelease;
2346
+ }
2347
+ export interface TriageRegression {
2348
+ "service": string;
2349
+ "operation": string;
2350
+ "measure": "error_rate" | "p95_ms" | "throughput";
2351
+ "value": number;
2352
+ "baseline_value": number;
2353
+ "denominator": number;
2354
+ "unit": string;
2355
+ }
2356
+ export interface SilentService {
2357
+ "service": string;
2358
+ "last_seen": string;
2359
+ "usual_rate": number | null;
2360
+ "unit": string;
2361
+ }
2362
+ export interface TriageOutput {
2363
+ "window": ToolWindow;
2364
+ "coverage": ToolCoverage;
2365
+ "failures": TriageFailure[];
2366
+ "regressions": TriageRegression[];
2367
+ "releases": FailureRelease[];
2368
+ "silent_services": SilentService[];
2369
+ "error"?: ToolError;
2370
+ }
2371
+ export interface ListFailuresInput {
2372
+ "lookback_minutes"?: number;
2373
+ "start_time"?: string;
2374
+ "end_time"?: string;
2375
+ "matchers"?: TelemetryMatcher[];
2376
+ "limit"?: number;
2377
+ "cursor"?: string;
2378
+ "service_name"?: string;
2379
+ "environment"?: string;
2380
+ "release"?: string;
2381
+ "status"?: FailureStatusFilter;
2382
+ "sort_by"?: "count" | "last_seen" | "first_seen" | "affected_traces";
2383
+ "failure_id"?: string;
2384
+ }
2385
+ export interface ListFailuresOutput {
2386
+ "window": ToolWindow;
2387
+ "coverage": ToolCoverage;
2388
+ "has_more": boolean;
2389
+ "next_cursor"?: string;
2390
+ "failures": FailureDetail[];
2391
+ "error"?: ToolError;
2392
+ }
2393
+ export interface GetFailureContextInput {
2394
+ "lookback_minutes"?: number;
2395
+ "start_time"?: string;
2396
+ "end_time"?: string;
2397
+ "matchers"?: TelemetryMatcher[];
2398
+ "limit"?: number;
2399
+ "cursor"?: string;
2400
+ "trace_id"?: TraceId;
2401
+ "session_id"?: SessionId;
2402
+ "failure_id"?: string;
2403
+ "ci_run_id"?: SessionId;
2404
+ "max_spans"?: number;
2405
+ "max_logs"?: number;
2406
+ }
2407
+ export interface FailurePropagation {
2408
+ "from": EvidenceSpan;
2409
+ "to": EvidenceSpan;
2410
+ }
2411
+ export interface RetryEvidence {
2412
+ "name": string;
2413
+ "attempts": number;
2414
+ "spans": EvidenceSpan[];
2415
+ }
2416
+ export interface FanoutEvidence {
2417
+ "name": string;
2418
+ "count": number;
2419
+ "parent_span_id"?: SpanId;
2420
+ "trace_id": TraceId;
2421
+ }
2422
+ export interface FailureObserved {
2423
+ "root_cause_span": EvidenceSpan | null;
2424
+ "error_spans": EvidenceSpan[];
2425
+ "propagation": FailurePropagation[];
2426
+ "logs": LogRecord[];
2427
+ "retries": RetryEvidence[];
2428
+ "fanout": FanoutEvidence[];
2429
+ }
2430
+ export interface FailureComparison {
2431
+ "nearest_success_trace_id"?: TraceId;
2432
+ "first_divergence": TraceDivergence | null;
2433
+ }
2434
+ export interface SimilarFailure {
2435
+ "failure_id": string;
2436
+ "count": number;
2437
+ "first_seen": string;
2438
+ "releases": string[];
2439
+ }
2440
+ export interface FailureContext {
2441
+ "similar_failures": SimilarFailure[];
2442
+ "changes": TriageRegression[];
2443
+ "annotations": Annotation[];
2444
+ }
2445
+ export interface GetFailureContextOutput {
2446
+ "window": ToolWindow;
2447
+ "coverage": ToolCoverage;
2448
+ "observed": FailureObserved;
2449
+ "comparison": FailureComparison;
2450
+ "context": FailureContext;
2451
+ "settled": boolean;
2452
+ "unknowns": string[];
2453
+ "error"?: ToolError;
2454
+ }
2455
+ export interface CompareGroup {
2456
+ "matchers"?: TelemetryMatcher[];
2457
+ "window"?: ToolWindow;
2458
+ "failure_id"?: string;
2459
+ }
2460
+ export interface CompareGroupsInput {
2461
+ "lookback_minutes"?: number;
2462
+ "start_time"?: string;
2463
+ "end_time"?: string;
2464
+ "matchers"?: TelemetryMatcher[];
2465
+ "limit"?: number;
2466
+ "cursor"?: string;
2467
+ "signal": "spans" | "logs";
2468
+ "group_a": CompareGroup;
2469
+ "group_b": CompareGroup | "rest" | "before";
2470
+ "attribute_scope"?: "span" | "resource" | "both";
2471
+ }
2472
+ export interface GroupStructure {
2473
+ "name": string;
2474
+ "share_a": number;
2475
+ "share_b": number;
2476
+ }
2477
+ export interface DurationPercentiles {
2478
+ "p50_ms": number | null;
2479
+ "p95_ms": number | null;
2480
+ "p99_ms": number | null;
2481
+ }
2482
+ export interface GroupDurations {
2483
+ "a": DurationPercentiles;
2484
+ "b": DurationPercentiles;
2485
+ }
2486
+ export interface GroupComposition {
2487
+ "changed": boolean;
2488
+ "traffic_mix_changed": boolean;
2489
+ "same_traffic_changed": boolean;
2490
+ "summary": string;
2491
+ }
2492
+ export interface CompareGroupsOutput {
2493
+ "window": ToolWindow;
2494
+ "coverage": ToolCoverage;
2495
+ "discriminators": AttributeAssociation[];
2496
+ "structural": GroupStructure[];
2497
+ "durations": GroupDurations;
2498
+ "composition": GroupComposition;
2499
+ "size_a": number;
2500
+ "size_b": number;
2501
+ "excluded_keys": string[];
2502
+ "error"?: ToolError;
2503
+ }
2504
+ export interface VerifyFixInput {
2505
+ "lookback_minutes"?: number;
2506
+ "start_time"?: string;
2507
+ "end_time"?: string;
2508
+ "matchers"?: TelemetryMatcher[];
2509
+ "limit"?: number;
2510
+ "cursor"?: string;
2511
+ "failure_id"?: string;
2512
+ "since"?: string;
2513
+ "release"?: string;
2514
+ "min_requests"?: number;
2515
+ "min_minutes"?: number;
2516
+ "verify_id"?: string;
2517
+ }
2518
+ export interface VerificationPeriod {
2519
+ "window": ToolWindow;
2520
+ "occurrences": number;
2521
+ "requests": number;
2522
+ "rate": number | null;
2523
+ "unit": "requests";
2524
+ }
2525
+ export interface VerificationNeeds {
2526
+ "requests": number;
2527
+ "minutes": number;
2528
+ }
2529
+ export interface VerifyFixOutput {
2530
+ "window": ToolWindow;
2531
+ "coverage": ToolCoverage;
2532
+ "verdict": "passed" | "failed" | "pending" | "inconclusive";
2533
+ "before": VerificationPeriod;
2534
+ "after": VerificationPeriod;
2535
+ "needs"?: VerificationNeeds;
2536
+ "recurrences": TraceId[];
2537
+ "guardrails": TriageFailure[];
2538
+ "verify_id": string;
2539
+ "error"?: ToolError;
2540
+ }
2541
+ export interface AggregateTelemetryInput {
2542
+ "lookback_minutes"?: number;
2543
+ "start_time"?: string;
2544
+ "end_time"?: string;
2545
+ "matchers"?: TelemetryMatcher[];
2546
+ "limit"?: number;
2547
+ "cursor"?: string;
2548
+ "signal": "spans" | "logs";
2549
+ "group_by"?: string[];
2550
+ "measures": string[];
2551
+ "step_ms"?: number;
2552
+ "order_by"?: string;
2553
+ }
2554
+ export interface AggregateBucket {
2555
+ "start_time": string;
2556
+ "measures": Record<string, number | null>;
2557
+ }
2558
+ export interface AggregateGroup {
2559
+ "key": Record<string, MatcherValue>;
2560
+ "measures": Record<string, number | null>;
2561
+ "buckets"?: AggregateBucket[];
2562
+ }
2563
+ export interface AggregateOther {
2564
+ "groups": number;
2565
+ "count": number;
2566
+ }
2567
+ export interface AggregateTelemetryOutput {
2568
+ "window": ToolWindow;
2569
+ "coverage": ToolCoverage;
2570
+ "groups": AggregateGroup[];
2571
+ "other": AggregateOther;
2572
+ "units": Record<string, string>;
2573
+ "error"?: ToolError;
2574
+ }
2575
+ export interface DiscoverAttributesInput {
2576
+ "lookback_minutes"?: number;
2577
+ "start_time"?: string;
2578
+ "end_time"?: string;
2579
+ "matchers"?: TelemetryMatcher[];
2580
+ "limit"?: number;
2581
+ "cursor"?: string;
2582
+ "signal": "spans" | "logs" | "resources";
2583
+ "key_prefix"?: string;
2584
+ "key"?: string;
2585
+ }
2586
+ export interface AttributeSemconv {
2587
+ "brief": string;
2588
+ "stability": string;
2589
+ "requirement_level": string;
2590
+ }
2591
+ export interface DiscoveredAttribute {
2592
+ "key": string;
2593
+ "scope": MatcherScope;
2594
+ "type": string;
2595
+ "coverage_share": number;
2596
+ "cardinality": number;
2597
+ "cardinality_exact": boolean;
2598
+ "top_values": AttributeValueCount[];
2599
+ "semconv": AttributeSemconv | null;
2600
+ }
2601
+ export interface DiscoverAttributesOutput {
2602
+ "window": ToolWindow;
2603
+ "coverage": ToolCoverage;
2604
+ "attributes": DiscoveredAttribute[];
2605
+ "error"?: ToolError;
2606
+ }
2607
+ export interface GetAgentRunInput {
2608
+ "lookback_minutes"?: number;
2609
+ "start_time"?: string;
2610
+ "end_time"?: string;
2611
+ "matchers"?: TelemetryMatcher[];
2612
+ "limit"?: number;
2613
+ "cursor"?: string;
2614
+ "session_id"?: SessionId;
2615
+ "trace_id"?: TraceId;
2616
+ "max_steps"?: number;
2617
+ }
2618
+ export interface AgentRun {
2619
+ "agent_name"?: string;
2620
+ "models": string[];
2621
+ "started": string;
2622
+ "duration_ms": number;
2623
+ "tokens": AgentTokens;
2624
+ "errors": number;
2625
+ "session_id"?: SessionId;
2626
+ "trace_id"?: TraceId;
2627
+ }
2628
+ export interface AgentStep {
2629
+ "index": number;
2630
+ "kind": "llm_call" | "tool_call" | "agent" | "retrieval";
2631
+ "name": string;
2632
+ "mcp_method"?: string;
2633
+ "mcp_server"?: string;
2634
+ "duration_ms": number;
2635
+ "tokens": AgentTokens;
2636
+ "status": string;
2637
+ "error"?: string;
2638
+ "trace_id": TraceId;
2639
+ "span_id": SpanId;
2640
+ }
2641
+ export interface RepeatedCall {
2642
+ "tool": string;
2643
+ "argument_hash": string;
2644
+ "count": number;
2645
+ }
2646
+ export interface AgentTokenShare {
2647
+ "name": string;
2648
+ "tokens": number;
2649
+ "share": number;
2650
+ }
2651
+ export interface AgentFindings {
2652
+ "repeated_calls": RepeatedCall[];
2653
+ "failed_tool_calls": AgentStep[];
2654
+ "slowest_steps": AgentStep[];
2655
+ "token_share": AgentTokenShare[];
2656
+ }
2657
+ export interface GetAgentRunOutput {
2658
+ "window": ToolWindow;
2659
+ "coverage": ToolCoverage;
2660
+ "run": AgentRun;
2661
+ "steps": AgentStep[];
2662
+ "findings": AgentFindings;
2663
+ "unknowns": string[];
2664
+ "error"?: ToolError;
2665
+ }
2666
+ export interface ListReleasesInput {
2667
+ "lookback_minutes"?: number;
2668
+ "start_time"?: string;
2669
+ "end_time"?: string;
2670
+ "matchers"?: TelemetryMatcher[];
2671
+ "limit"?: number;
2672
+ "cursor"?: string;
2673
+ "service_name"?: string;
2674
+ "environment"?: string;
2675
+ }
2676
+ export interface ReleasePerformance {
2677
+ "error_rate": number | null;
2678
+ "p95_ms": number | null;
2679
+ }
2680
+ export interface ReleaseSummary {
2681
+ "service": string;
2682
+ "environment"?: string;
2683
+ "version": string;
2684
+ "revision"?: string;
2685
+ "first_seen": string;
2686
+ "last_seen": string;
2687
+ "current": boolean;
2688
+ "concurrent": boolean;
2689
+ "traffic_share": number;
2690
+ "before": ReleasePerformance;
2691
+ "after": ReleasePerformance;
2692
+ "new_failure_ids": string[];
2693
+ }
2694
+ export interface ListReleasesOutput {
2695
+ "window": ToolWindow;
2696
+ "coverage": ToolCoverage;
2697
+ "has_more": boolean;
2698
+ "next_cursor"?: string;
2699
+ "releases": ReleaseSummary[];
2700
+ "error"?: ToolError;
2701
+ }
2702
+ export interface GetServiceMapInput {
2703
+ "lookback_minutes"?: number;
2704
+ "start_time"?: string;
2705
+ "end_time"?: string;
2706
+ "matchers"?: TelemetryMatcher[];
2707
+ "limit"?: number;
2708
+ "cursor"?: string;
2709
+ "service_name"?: string;
2710
+ "environment"?: string;
2711
+ "depth"?: number;
2712
+ "include_external"?: boolean;
2713
+ }
2714
+ export interface ServiceMapNode {
2715
+ "name": string;
2716
+ "kind": "service" | "database" | "external" | "messaging";
2717
+ "calls": number;
2718
+ "error_rate": number;
2719
+ "p95_ms": number | null;
2720
+ "unit": "spans";
2721
+ }
2722
+ export interface ServiceMapEdge {
2723
+ "from": string;
2724
+ "to": string;
2725
+ "calls": number;
2726
+ "error_rate": number;
2727
+ "p95_ms": number | null;
2728
+ "example_operations": string[];
2729
+ "unit": "spans";
2730
+ }
2731
+ export interface GetServiceMapOutput {
2732
+ "window": ToolWindow;
2733
+ "coverage": ToolCoverage;
2734
+ "nodes": ServiceMapNode[];
2735
+ "edges": ServiceMapEdge[];
2736
+ "unknown_callers": number;
2737
+ "error"?: ToolError;
2738
+ }
2739
+ export interface CheckTelemetryHealthInput {
2740
+ "lookback_minutes"?: number;
2741
+ "start_time"?: string;
2742
+ "end_time"?: string;
2743
+ "matchers"?: TelemetryMatcher[];
2744
+ "limit"?: number;
2745
+ "cursor"?: string;
2746
+ "service_name"?: string;
2747
+ "environment"?: string;
2748
+ }
2749
+ export interface OrphanSpans {
2750
+ "count": number;
2751
+ "share": number;
2752
+ "services": string[];
2753
+ "unit": "spans";
2754
+ }
2755
+ export interface SemconvGap {
2756
+ "service": string;
2757
+ "operation": string;
2758
+ "attribute": string;
2759
+ "requirement_level": string;
2760
+ "missing_share": number;
2761
+ }
2762
+ export interface TelemetryRetention {
2763
+ "oldest": string | null;
2764
+ "days": number | null;
2765
+ }
2766
+ export interface CheckTelemetryHealthOutput {
2767
+ "window": ToolWindow;
2768
+ "coverage": ToolCoverage;
2769
+ "silent_services": SilentService[];
2770
+ "orphan_spans": OrphanSpans;
2771
+ "semconv_gaps": SemconvGap[];
2772
+ "unknown_service_share": number;
2773
+ "schema_urls": string[];
2774
+ "retention": TelemetryRetention;
2775
+ "ingestion_lag_ms"?: number;
2776
+ "error"?: ToolError;
2777
+ }
2778
+ export interface GetMcpStatsInput {
2779
+ "lookback_minutes"?: number;
2780
+ "start_time"?: string;
2781
+ "end_time"?: string;
2782
+ "matchers"?: TelemetryMatcher[];
2783
+ "limit"?: number;
2784
+ "cursor"?: string;
2785
+ "server_name"?: string;
2786
+ "server_version"?: string;
2787
+ "tool_name"?: string;
2788
+ "transport"?: string;
2789
+ "compare_to"?: McpStatsComparison;
2790
+ "group_by"?: "server" | "tool" | "method" | "transport" | "failure_class";
2791
+ }
2792
+ export interface GetMcpStatsOutput {
2793
+ "window": ToolWindow;
2794
+ "coverage": ToolCoverage;
2795
+ "totals": McpTrafficTotals;
2796
+ "groups": McpTrafficGroup[];
2797
+ "failure_classes": McpFailureClasses;
2798
+ "comparison"?: McpStatsComparisonResult;
2799
+ "error"?: ToolError;
2800
+ }
2801
+ export interface UpdateFailureStatusInput {
2802
+ "failure_id": string;
2803
+ "etag": string;
2804
+ "status": FailureStatus;
2805
+ "ignore_until"?: string;
2806
+ "assignee"?: string;
2807
+ }
2808
+ export interface UpdateFailureStatusOutput {
2809
+ "failure": FailureSummary;
2810
+ "error"?: ToolError;
2811
+ }
2812
+ export interface ToolFieldError {
2813
+ "field": string;
2814
+ "code": string;
2815
+ "message": string;
2816
+ "change": string;
2817
+ }
1684
2818
  export interface AnnotationCreateRequest {
2819
+ "labels"?: string[];
2820
+ "classification"?: AnnotationClassification;
1685
2821
  "target": AnnotationTarget;
1686
2822
  "text": string;
1687
2823
  }
1688
2824
  export interface AnnotationUpdateRequest {
1689
- "text": string;
2825
+ "labels"?: string[];
2826
+ "classification"?: AnnotationClassification;
2827
+ "text"?: string;
1690
2828
  }
1691
2829
  export interface SavedQueryCreateRequest {
1692
2830
  "name": string;