@ancplua/qyl-api-schema 11.5.0 → 11.6.0-rc.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.
@@ -57,6 +57,13 @@ export declare const TimeBucketValues: {
57
57
  readonly auto: "auto";
58
58
  };
59
59
  export type TimeBucket = typeof TimeBucketValues[keyof typeof TimeBucketValues];
60
+ export declare const CollectorKeyRoleValues: {
61
+ readonly ingest: "ingest";
62
+ readonly read: "read";
63
+ readonly write: "write";
64
+ readonly delete: "delete";
65
+ };
66
+ export type CollectorKeyRole = typeof CollectorKeyRoleValues[keyof typeof CollectorKeyRoleValues];
60
67
  export declare const SpanKindValues: {
61
68
  readonly unspecified: 0;
62
69
  readonly internal: 1;
@@ -215,6 +222,11 @@ export declare const MetricAggregationValues: {
215
222
  readonly p99: "p99";
216
223
  };
217
224
  export type MetricAggregation = typeof MetricAggregationValues[keyof typeof MetricAggregationValues];
225
+ export declare const MetricMatcherOpValues: {
226
+ readonly eq: "eq";
227
+ readonly prefix: "prefix";
228
+ };
229
+ export type MetricMatcherOp = typeof MetricMatcherOpValues[keyof typeof MetricMatcherOpValues];
218
230
  export declare const SessionEventNameValues: {
219
231
  readonly sessionStart: "session.start";
220
232
  readonly sessionEnd: "session.end";
@@ -394,6 +406,23 @@ export declare const CiPhaseStatusValues: {
394
406
  readonly unset: "unset";
395
407
  };
396
408
  export type CiPhaseStatus = typeof CiPhaseStatusValues[keyof typeof CiPhaseStatusValues];
409
+ export declare const SavedQuerySignalValues: {
410
+ readonly traces: "traces";
411
+ readonly logs: "logs";
412
+ readonly metrics: "metrics";
413
+ };
414
+ export type SavedQuerySignal = typeof SavedQuerySignalValues[keyof typeof SavedQuerySignalValues];
415
+ export declare const DeletableKindValues: {
416
+ readonly annotation: "annotation";
417
+ readonly savedQuery: "saved_query";
418
+ };
419
+ export type DeletableKind = typeof DeletableKindValues[keyof typeof DeletableKindValues];
420
+ export declare const McpScopeValues: {
421
+ readonly read: "qyl:read";
422
+ readonly write: "qyl:write";
423
+ readonly delete: "qyl:delete";
424
+ };
425
+ export type McpScope = typeof McpScopeValues[keyof typeof McpScopeValues];
397
426
  export declare const FetchTelemetryViewValues: {
398
427
  readonly traces: "traces";
399
428
  readonly trace: "trace";
@@ -404,7 +433,7 @@ export type FetchTelemetryView = typeof FetchTelemetryViewValues[keyof typeof Fe
404
433
  export type AttributeDouble = number | "NaN" | "Infinity" | "-Infinity";
405
434
  export type AttributeValue = null | string | boolean | AttributeValue[] | AttributeObjectValue;
406
435
  export type AttributeObjectValue = AttributeIntValue | AttributeDoubleValue | AttributeBytesValue | AttributeKeyValueListValue;
407
- export type ApiError = NotFoundError | ValidationError | UnauthorizedError | ForbiddenError | ConflictError | RateLimitError | InternalServerError | BadGatewayError | ServiceUnavailableError;
436
+ export type ApiError = NotFoundError | ValidationError | UnauthorizedError | ForbiddenError | ConflictError | PreconditionFailedError | PreconditionRequiredError | RateLimitError | InternalServerError | BadGatewayError | ServiceUnavailableError;
408
437
  export type RunnerResourceEvents = RunnerResourceState;
409
438
  export type RunnerLogEvents = RunnerLogLine;
410
439
  export type WorkbenchServerConfiguration = WorkbenchStdioServerConfiguration | WorkbenchStreamableHttpServerConfiguration | WorkbenchBuiltinServerConfiguration;
@@ -412,6 +441,11 @@ export type WorkbenchTestAssertion = WorkbenchStatusAssertion | WorkbenchExactAs
412
441
  export type WorkbenchEvaluationExportPayload = WorkbenchEvaluationJsonExportPayload | WorkbenchEvaluationReportExportPayload;
413
442
  export type WorkbenchProtocolEvents = WorkbenchProtocolEvent;
414
443
  export type WorkbenchExecutionUpdateEvents = WorkbenchExecutionRecord;
444
+ 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";
445
+ export type AnnotationTarget = TraceAnnotationTarget | SpanAnnotationTarget | SessionAnnotationTarget;
446
+ export type SavedQueryFilter = SavedTraceQueryFilter | SavedLogQueryFilter | SavedMetricQueryFilter;
447
+ export type SavedQueryRunResult = SavedTraceQueryRun | SavedLogQueryRun | SavedMetricQueryRun;
448
+ export type FetchTelemetryInput = FetchTelemetryTracesInput | FetchTelemetryTraceInput | FetchTelemetryLogsInput | FetchTelemetryMcpStatsInput;
415
449
  export type LogEvents = LogStreamEvent | HeartbeatEvent;
416
450
  export interface AttributeBytesValue {
417
451
  "type": "bytes";
@@ -448,6 +482,12 @@ export interface InstrumentationScope {
448
482
  "attributes"?: Attribute[];
449
483
  "dropped_attributes_count"?: number;
450
484
  }
485
+ export interface ResourceBase {
486
+ "id": string;
487
+ "created_at": string;
488
+ "updated_at": string;
489
+ "etag": string;
490
+ }
451
491
  export interface ProblemDetails {
452
492
  "type": string;
453
493
  "title": string;
@@ -482,6 +522,14 @@ export interface ConflictError extends ProblemDetails {
482
522
  "title": "Conflict";
483
523
  "conflicting_resource"?: string;
484
524
  }
525
+ export interface PreconditionFailedError extends ProblemDetails {
526
+ "title": "Precondition Failed";
527
+ "current_etag"?: string;
528
+ }
529
+ export interface PreconditionRequiredError extends ProblemDetails {
530
+ "title": "Precondition Required";
531
+ "required_header"?: "If-Match";
532
+ }
485
533
  export interface RateLimitError extends ProblemDetails {
486
534
  "title": "Too Many Requests";
487
535
  }
@@ -704,6 +752,11 @@ export interface MetricQueryResult {
704
752
  "series": MetricSeriesResult[];
705
753
  "truncated": boolean;
706
754
  }
755
+ export interface MetricAttributeMatcher {
756
+ "key": string;
757
+ "op": MetricMatcherOp;
758
+ "value": string;
759
+ }
707
760
  export interface SessionAttributes {
708
761
  "session_id": SessionId;
709
762
  "previous_session_id"?: SessionId;
@@ -1284,6 +1337,19 @@ export interface WorkbenchEvaluationExportArtifact {
1284
1337
  export interface WorkbenchEvaluationExportAccepted {
1285
1338
  "export": WorkbenchEvaluationExport;
1286
1339
  }
1340
+ export interface ToolError {
1341
+ "code": ToolErrorCode;
1342
+ "message": string;
1343
+ "retryable": boolean;
1344
+ }
1345
+ export interface ToolPage {
1346
+ "has_more": boolean;
1347
+ "next_cursor"?: string;
1348
+ }
1349
+ export interface ToolTimeRange {
1350
+ "start_time"?: string;
1351
+ "end_time"?: string;
1352
+ }
1287
1353
  export interface DisplayTracesInput {
1288
1354
  "trace_id"?: TraceId;
1289
1355
  "session_id"?: SessionId;
@@ -1293,12 +1359,14 @@ export interface DisplayTracesOutput {
1293
1359
  "traces": Trace[];
1294
1360
  "selected_trace_id"?: TraceId;
1295
1361
  "mode": McpDataMode;
1362
+ "error"?: ToolError;
1296
1363
  }
1297
1364
  export interface DisplayMcpDashboardInput {
1298
1365
  "hours"?: number;
1299
1366
  }
1300
1367
  export interface DisplayMcpDashboardOutput {
1301
1368
  "stats": McpDashboardStats;
1369
+ "error"?: ToolError;
1302
1370
  }
1303
1371
  export interface McpDashboardStats {
1304
1372
  "window": McpDashboardWindow;
@@ -1341,10 +1409,18 @@ export interface McpToolStats {
1341
1409
  }
1342
1410
  export interface ListTracesInput {
1343
1411
  "limit"?: number;
1412
+ "start_time"?: string;
1413
+ "end_time"?: string;
1414
+ "service_name"?: string;
1415
+ "errors_only"?: boolean;
1416
+ "cursor"?: string;
1344
1417
  }
1345
1418
  export interface ListTracesOutput {
1346
1419
  "traces": TraceSummary[];
1347
1420
  "mode": McpDataMode;
1421
+ "has_more": boolean;
1422
+ "next_cursor"?: string;
1423
+ "error"?: ToolError;
1348
1424
  }
1349
1425
  export interface GetTraceInput {
1350
1426
  "trace_id": TraceId;
@@ -1355,14 +1431,40 @@ export interface GetTraceInput {
1355
1431
  export interface GetTraceOutput {
1356
1432
  "trace": Trace;
1357
1433
  "mode": McpDataMode;
1434
+ "annotations"?: Annotation[];
1435
+ "error"?: ToolError;
1436
+ }
1437
+ export interface Annotation extends ResourceBase {
1438
+ "target": AnnotationTarget;
1439
+ "text": string;
1440
+ }
1441
+ export interface TraceAnnotationTarget {
1442
+ "kind": "trace";
1443
+ "trace_id": TraceId;
1444
+ }
1445
+ export interface SpanAnnotationTarget {
1446
+ "kind": "span";
1447
+ "trace_id": TraceId;
1448
+ "span_id": SpanId;
1449
+ }
1450
+ export interface SessionAnnotationTarget {
1451
+ "kind": "session";
1452
+ "session_id": SessionId;
1358
1453
  }
1359
1454
  export interface ListSessionsInput {
1360
1455
  "limit"?: number;
1361
1456
  "active_only"?: boolean;
1457
+ "start_time"?: string;
1458
+ "end_time"?: string;
1459
+ "cursor"?: string;
1362
1460
  }
1363
1461
  export interface ListSessionsOutput {
1364
1462
  "sessions": SessionEntity[];
1365
1463
  "mode": McpDataMode;
1464
+ "has_more": boolean;
1465
+ "next_cursor"?: string;
1466
+ "annotations"?: Annotation[];
1467
+ "error"?: ToolError;
1366
1468
  }
1367
1469
  export interface SearchLogsInput {
1368
1470
  "trace_id"?: TraceId;
@@ -1370,10 +1472,17 @@ export interface SearchLogsInput {
1370
1472
  "severity_min"?: number;
1371
1473
  "query"?: string;
1372
1474
  "limit"?: number;
1475
+ "session_id"?: SessionId;
1476
+ "start_time"?: string;
1477
+ "end_time"?: string;
1478
+ "cursor"?: string;
1373
1479
  }
1374
1480
  export interface SearchLogsOutput {
1375
1481
  "logs": LogRecord[];
1376
1482
  "mode": McpDataMode;
1483
+ "has_more": boolean;
1484
+ "next_cursor"?: string;
1485
+ "error"?: ToolError;
1377
1486
  }
1378
1487
  export interface CiLogInput {
1379
1488
  "run_id"?: SessionId;
@@ -1400,14 +1509,27 @@ export interface CiLogOutput {
1400
1509
  "run_id"?: SessionId;
1401
1510
  "phases"?: CiPhase[];
1402
1511
  "mode": McpDataMode;
1512
+ "error"?: ToolError;
1513
+ }
1514
+ export interface FetchTelemetryTracesInput {
1515
+ "view": "traces";
1516
+ "trace_id"?: TraceId;
1517
+ "limit"?: number;
1403
1518
  }
1404
- export interface FetchTelemetryInput {
1405
- "view": FetchTelemetryView;
1519
+ export interface FetchTelemetryTraceInput {
1520
+ "view": "trace";
1521
+ "trace_id": TraceId;
1522
+ }
1523
+ export interface FetchTelemetryLogsInput {
1524
+ "view": "logs";
1406
1525
  "trace_id"?: TraceId;
1407
1526
  "service_name"?: string;
1408
1527
  "severity_min"?: number;
1409
1528
  "query"?: string;
1410
1529
  "limit"?: number;
1530
+ }
1531
+ export interface FetchTelemetryMcpStatsInput {
1532
+ "view": "mcp_stats";
1411
1533
  "hours"?: number;
1412
1534
  }
1413
1535
  export interface FetchTelemetryOutput {
@@ -1416,6 +1538,184 @@ export interface FetchTelemetryOutput {
1416
1538
  "logs"?: LogRecord[];
1417
1539
  "stats"?: McpDashboardStats;
1418
1540
  "mode": McpDataMode;
1541
+ "error"?: ToolError;
1542
+ }
1543
+ export interface ListMetricsInput {
1544
+ "name_prefix"?: string;
1545
+ "limit"?: number;
1546
+ "cursor"?: string;
1547
+ }
1548
+ export interface ListMetricsOutput {
1549
+ "items": MetricDescriptor[];
1550
+ "has_more": boolean;
1551
+ "next_cursor"?: string;
1552
+ "error"?: ToolError;
1553
+ }
1554
+ export interface GetMetricSeriesInput {
1555
+ "metric_name": string;
1556
+ "matchers"?: MetricAttributeMatcher[];
1557
+ "limit"?: number;
1558
+ "cursor"?: string;
1559
+ }
1560
+ export interface GetMetricSeriesOutput {
1561
+ "items": MetricSeries[];
1562
+ "has_more": boolean;
1563
+ "next_cursor"?: string;
1564
+ "error"?: ToolError;
1565
+ }
1566
+ export interface QueryMetricInput {
1567
+ "metric_name": string;
1568
+ "start_time": string;
1569
+ "end_time": string;
1570
+ "step_ms"?: number;
1571
+ "aggregation"?: MetricAggregation;
1572
+ "group_by"?: string[];
1573
+ "matchers"?: MetricAttributeMatcher[];
1574
+ "series_limit"?: number;
1575
+ }
1576
+ export interface QueryMetricOutput {
1577
+ "name": string;
1578
+ "kind": MetricKind;
1579
+ "unit"?: string;
1580
+ "aggregation": MetricAggregation;
1581
+ "step_ms": number;
1582
+ "start_time": string;
1583
+ "end_time": string;
1584
+ "series": MetricSeriesResult[];
1585
+ "truncated": boolean;
1586
+ "error"?: ToolError;
1587
+ }
1588
+ export interface CreateAnnotationInput {
1589
+ "target": AnnotationTarget;
1590
+ "text": string;
1591
+ }
1592
+ export interface UpdateAnnotationInput {
1593
+ "id": string;
1594
+ "etag": string;
1595
+ "text": string;
1596
+ }
1597
+ export interface AnnotationOutput {
1598
+ "annotation"?: Annotation;
1599
+ "error"?: ToolError;
1600
+ }
1601
+ export interface CreateSavedQueryInput {
1602
+ "name": string;
1603
+ "description"?: string;
1604
+ "filter": SavedQueryFilter;
1605
+ }
1606
+ export interface SavedTraceQueryFilter {
1607
+ "signal": "traces";
1608
+ "lookback_minutes"?: number;
1609
+ "service_name"?: string;
1610
+ "errors_only"?: boolean;
1611
+ }
1612
+ export interface SavedLogQueryFilter {
1613
+ "signal": "logs";
1614
+ "lookback_minutes"?: number;
1615
+ "service_name"?: string;
1616
+ "severity_min"?: SeverityNumber;
1617
+ "session_id"?: SessionId;
1618
+ "trace_id"?: TraceId;
1619
+ "query"?: string;
1620
+ }
1621
+ export interface SavedMetricQueryFilter {
1622
+ "signal": "metrics";
1623
+ "lookback_minutes"?: number;
1624
+ "metric_name": string;
1625
+ "aggregation"?: MetricAggregation;
1626
+ "step_ms"?: number;
1627
+ "group_by"?: string[];
1628
+ "matchers"?: MetricAttributeMatcher[];
1629
+ }
1630
+ export interface UpdateSavedQueryInput {
1631
+ "id": string;
1632
+ "etag": string;
1633
+ "name"?: string;
1634
+ "description"?: string;
1635
+ "filter"?: SavedQueryFilter;
1636
+ }
1637
+ export interface SavedQueryOutput {
1638
+ "saved_query"?: SavedQuery;
1639
+ "error"?: ToolError;
1640
+ }
1641
+ export interface SavedQuery extends ResourceBase {
1642
+ "name": string;
1643
+ "description"?: string;
1644
+ "filter": SavedQueryFilter;
1645
+ }
1646
+ export interface ListSavedQueriesInput {
1647
+ "signal"?: SavedQuerySignal;
1648
+ "limit"?: number;
1649
+ "cursor"?: string;
1650
+ }
1651
+ export interface ListSavedQueriesOutput {
1652
+ "saved_queries": SavedQuery[];
1653
+ "has_more": boolean;
1654
+ "next_cursor"?: string;
1655
+ "error"?: ToolError;
1656
+ }
1657
+ export interface RunSavedQueryInput {
1658
+ "id": string;
1659
+ "start_time"?: string;
1660
+ "end_time"?: string;
1661
+ "limit"?: number;
1662
+ "cursor"?: string;
1663
+ }
1664
+ export interface RunSavedQueryOutput {
1665
+ "result"?: SavedQueryRunResult;
1666
+ "mode"?: McpDataMode;
1667
+ "error"?: ToolError;
1668
+ }
1669
+ export interface SavedTraceQueryRun {
1670
+ "signal": "traces";
1671
+ "items": TraceSummary[];
1672
+ "next_cursor"?: string;
1673
+ "has_more": boolean;
1674
+ }
1675
+ export interface SavedLogQueryRun {
1676
+ "signal": "logs";
1677
+ "items": LogRecord[];
1678
+ "next_cursor"?: string;
1679
+ "has_more": boolean;
1680
+ }
1681
+ export interface SavedMetricQueryRun {
1682
+ "signal": "metrics";
1683
+ "result": MetricQueryResult;
1684
+ }
1685
+ export interface DeleteInput {
1686
+ "kind": DeletableKind;
1687
+ "id": string;
1688
+ "etag": string;
1689
+ }
1690
+ export interface DeleteOutput {
1691
+ "deleted": boolean;
1692
+ "error"?: ToolError;
1693
+ }
1694
+ export interface AnnotationCreateRequest {
1695
+ "target": AnnotationTarget;
1696
+ "text": string;
1697
+ }
1698
+ export interface AnnotationUpdateRequest {
1699
+ "text": string;
1700
+ }
1701
+ export interface SavedQueryCreateRequest {
1702
+ "name": string;
1703
+ "description"?: string;
1704
+ "filter": SavedQueryFilter;
1705
+ }
1706
+ export interface SavedQueryWindow {
1707
+ "lookback_minutes"?: number;
1708
+ }
1709
+ export interface SavedQueryUpdateRequest {
1710
+ "name"?: string;
1711
+ "description"?: string;
1712
+ "filter"?: SavedQueryFilter;
1713
+ }
1714
+ export interface SavedQueryRunRequest {
1715
+ "start_time"?: string;
1716
+ "end_time"?: string;
1717
+ "limit"?: number;
1718
+ "cursor"?: string;
1419
1719
  }
1420
1720
  export interface LogStreamEvent {
1421
1721
  "type": "log";
@@ -1462,5 +1762,17 @@ export interface CursorPageSessionEntity {
1462
1762
  "prev_cursor"?: string;
1463
1763
  "has_more": boolean;
1464
1764
  }
1765
+ export interface CursorPageAnnotation {
1766
+ "items": Annotation[];
1767
+ "next_cursor"?: string;
1768
+ "prev_cursor"?: string;
1769
+ "has_more": boolean;
1770
+ }
1771
+ export interface CursorPageSavedQuery {
1772
+ "items": SavedQuery[];
1773
+ "next_cursor"?: string;
1774
+ "prev_cursor"?: string;
1775
+ "has_more": boolean;
1776
+ }
1465
1777
  /** Revision of the API contract these types were emitted from; compare against HealthReport.contract_revision. */
1466
1778
  export declare const CONTRACT_REVISION: string;
@@ -41,6 +41,12 @@ export const TimeBucketValues = {
41
41
  "week": "1w",
42
42
  "auto": "auto",
43
43
  };
44
+ export const CollectorKeyRoleValues = {
45
+ "ingest": "ingest",
46
+ "read": "read",
47
+ "write": "write",
48
+ "delete": "delete",
49
+ };
44
50
  export const SpanKindValues = {
45
51
  "unspecified": 0,
46
52
  "internal": 1,
@@ -185,6 +191,10 @@ export const MetricAggregationValues = {
185
191
  "p95": "p95",
186
192
  "p99": "p99",
187
193
  };
194
+ export const MetricMatcherOpValues = {
195
+ "eq": "eq",
196
+ "prefix": "prefix",
197
+ };
188
198
  export const SessionEventNameValues = {
189
199
  "sessionStart": "session.start",
190
200
  "sessionEnd": "session.end",
@@ -339,6 +349,20 @@ export const CiPhaseStatusValues = {
339
349
  "error": "error",
340
350
  "unset": "unset",
341
351
  };
352
+ export const SavedQuerySignalValues = {
353
+ "traces": "traces",
354
+ "logs": "logs",
355
+ "metrics": "metrics",
356
+ };
357
+ export const DeletableKindValues = {
358
+ "annotation": "annotation",
359
+ "savedQuery": "saved_query",
360
+ };
361
+ export const McpScopeValues = {
362
+ "read": "qyl:read",
363
+ "write": "qyl:write",
364
+ "delete": "qyl:delete",
365
+ };
342
366
  export const FetchTelemetryViewValues = {
343
367
  "traces": "traces",
344
368
  "trace": "trace",
@@ -347,4 +371,4 @@ export const FetchTelemetryViewValues = {
347
371
  };
348
372
  // --- contract revision (scripts/emit-contract-revision.mjs) ---
349
373
  /** Revision of the API contract these types were emitted from; compare against HealthReport.contract_revision. */
350
- export const CONTRACT_REVISION = "sha256:3605ae27d2edf632";
374
+ export const CONTRACT_REVISION = "sha256:d926c3c6ab829cbf";