@ancplua/qyl-api-schema 3.0.0 → 5.0.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.
@@ -34,6 +34,30 @@ export type WorkbenchSuiteId = string & {
34
34
  export type WorkbenchEvaluationExportId = string & {
35
35
  readonly __brand: "WorkbenchEvaluationExportId";
36
36
  };
37
+ export type WorkflowRunId = string & {
38
+ readonly __brand: "WorkflowRunId";
39
+ };
40
+ export type WorkflowAttemptId = string & {
41
+ readonly __brand: "WorkflowAttemptId";
42
+ };
43
+ export type WorkflowContentRef = string & {
44
+ readonly __brand: "WorkflowContentRef";
45
+ };
46
+ export type WorkflowEventId = string & {
47
+ readonly __brand: "WorkflowEventId";
48
+ };
49
+ export type WorkflowAgentId = string & {
50
+ readonly __brand: "WorkflowAgentId";
51
+ };
52
+ export type WorkflowToolCallId = string & {
53
+ readonly __brand: "WorkflowToolCallId";
54
+ };
55
+ export type WorkflowNodeId = string & {
56
+ readonly __brand: "WorkflowNodeId";
57
+ };
58
+ export type WorkflowCommandId = string & {
59
+ readonly __brand: "WorkflowCommandId";
60
+ };
37
61
  export declare const ProblemDetailsMediaType: "application/problem+json";
38
62
  export type ProblemDetailsMediaType = typeof ProblemDetailsMediaType;
39
63
  export declare const SortOrderValues: {
@@ -351,11 +375,122 @@ export declare const WorkbenchTransportKindValues: {
351
375
  readonly builtin: "builtin";
352
376
  };
353
377
  export type WorkbenchTransportKind = typeof WorkbenchTransportKindValues[keyof typeof WorkbenchTransportKindValues];
378
+ export declare const WorkflowRunStatusValues: {
379
+ readonly active: "active";
380
+ readonly completed: "completed";
381
+ readonly failed: "failed";
382
+ readonly interrupted: "interrupted";
383
+ };
384
+ export type WorkflowRunStatus = typeof WorkflowRunStatusValues[keyof typeof WorkflowRunStatusValues];
385
+ export declare const WorkflowContentEncodingValues: {
386
+ readonly utf8: "utf8";
387
+ readonly base64: "base64";
388
+ };
389
+ export type WorkflowContentEncoding = typeof WorkflowContentEncodingValues[keyof typeof WorkflowContentEncodingValues];
390
+ export declare const WorkflowJournalEventKindValues: {
391
+ readonly runCreated: "run_created";
392
+ readonly runCompleted: "run_completed";
393
+ readonly threadStarted: "thread_started";
394
+ readonly threadResumed: "thread_resumed";
395
+ readonly turnStarted: "turn_started";
396
+ readonly turnCompleted: "turn_completed";
397
+ readonly turnInterrupted: "turn_interrupted";
398
+ readonly attemptStarted: "attempt_started";
399
+ readonly attemptCompleted: "attempt_completed";
400
+ readonly agentSpawned: "agent_spawned";
401
+ readonly agentStarted: "agent_started";
402
+ readonly agentCompleted: "agent_completed";
403
+ readonly messageSent: "message_sent";
404
+ readonly messageReceived: "message_received";
405
+ readonly waitStarted: "wait_started";
406
+ readonly waitCompleted: "wait_completed";
407
+ readonly joined: "joined";
408
+ readonly itemStarted: "item_started";
409
+ readonly itemCompleted: "item_completed";
410
+ readonly toolStarted: "tool_started";
411
+ readonly toolCompleted: "tool_completed";
412
+ readonly approvalRequested: "approval_requested";
413
+ readonly approvalResolved: "approval_resolved";
414
+ readonly contentCaptured: "content_captured";
415
+ readonly fileWritten: "file_written";
416
+ readonly controlRequested: "control_requested";
417
+ readonly controlAccepted: "control_accepted";
418
+ readonly controlApplied: "control_applied";
419
+ readonly controlRejected: "control_rejected";
420
+ readonly controlFailed: "control_failed";
421
+ };
422
+ export type WorkflowJournalEventKind = typeof WorkflowJournalEventKindValues[keyof typeof WorkflowJournalEventKindValues];
423
+ export declare const WorkflowNodeKindValues: {
424
+ readonly run: "run";
425
+ readonly attempt: "attempt";
426
+ readonly turn: "turn";
427
+ readonly agent: "agent";
428
+ readonly toolCall: "tool_call";
429
+ readonly message: "message";
430
+ readonly wait: "wait";
431
+ readonly gate: "gate";
432
+ readonly resource: "resource";
433
+ };
434
+ export type WorkflowNodeKind = typeof WorkflowNodeKindValues[keyof typeof WorkflowNodeKindValues];
435
+ export declare const WorkflowEdgeKindValues: {
436
+ readonly data: "data";
437
+ readonly control: "control";
438
+ readonly conflict: "conflict";
439
+ readonly resource: "resource";
440
+ readonly gate: "gate";
441
+ readonly temporal: "temporal";
442
+ };
443
+ export type WorkflowEdgeKind = typeof WorkflowEdgeKindValues[keyof typeof WorkflowEdgeKindValues];
444
+ export declare const WorkflowControlActionValues: {
445
+ readonly steer: "steer";
446
+ readonly interrupt: "interrupt";
447
+ readonly resume: "resume";
448
+ };
449
+ export type WorkflowControlAction = typeof WorkflowControlActionValues[keyof typeof WorkflowControlActionValues];
450
+ export declare const WorkflowControlStatusValues: {
451
+ readonly requested: "requested";
452
+ readonly accepted: "accepted";
453
+ readonly applied: "applied";
454
+ readonly rejected: "rejected";
455
+ readonly failed: "failed";
456
+ };
457
+ export type WorkflowControlStatus = typeof WorkflowControlStatusValues[keyof typeof WorkflowControlStatusValues];
458
+ export declare const WorkflowAttemptStatusValues: {
459
+ readonly pending: "pending";
460
+ readonly running: "running";
461
+ readonly succeeded: "succeeded";
462
+ readonly failed: "failed";
463
+ readonly interrupted: "interrupted";
464
+ };
465
+ export type WorkflowAttemptStatus = typeof WorkflowAttemptStatusValues[keyof typeof WorkflowAttemptStatusValues];
466
+ export declare const WorkflowAgentStatusValues: {
467
+ readonly pending: "pending";
468
+ readonly running: "running";
469
+ readonly waiting: "waiting";
470
+ readonly succeeded: "succeeded";
471
+ readonly failed: "failed";
472
+ readonly interrupted: "interrupted";
473
+ };
474
+ export type WorkflowAgentStatus = typeof WorkflowAgentStatusValues[keyof typeof WorkflowAgentStatusValues];
475
+ export declare const WorkflowToolCallStatusValues: {
476
+ readonly requested: "requested";
477
+ readonly running: "running";
478
+ readonly succeeded: "succeeded";
479
+ readonly failed: "failed";
480
+ readonly rejected: "rejected";
481
+ };
482
+ export type WorkflowToolCallStatus = typeof WorkflowToolCallStatusValues[keyof typeof WorkflowToolCallStatusValues];
354
483
  export declare const McpDataModeValues: {
355
484
  readonly live: "live";
356
485
  readonly demo: "demo";
357
486
  };
358
487
  export type McpDataMode = typeof McpDataModeValues[keyof typeof McpDataModeValues];
488
+ export declare const CiPhaseStatusValues: {
489
+ readonly ok: "ok";
490
+ readonly error: "error";
491
+ readonly unset: "unset";
492
+ };
493
+ export type CiPhaseStatus = typeof CiPhaseStatusValues[keyof typeof CiPhaseStatusValues];
359
494
  export declare const FetchTelemetryViewValues: {
360
495
  readonly traces: "traces";
361
496
  readonly trace: "trace";
@@ -374,6 +509,8 @@ export type WorkbenchTestAssertion = WorkbenchStatusAssertion | WorkbenchExactAs
374
509
  export type WorkbenchEvaluationExportPayload = WorkbenchEvaluationJsonExportPayload | WorkbenchEvaluationReportExportPayload;
375
510
  export type WorkbenchProtocolEvents = WorkbenchProtocolEvent;
376
511
  export type WorkbenchExecutionUpdateEvents = WorkbenchExecutionRecord;
512
+ export type WorkflowEdgeProvenance = RecordedWorkflowEdgeProvenance | DerivedWorkflowEdgeProvenance;
513
+ export type WorkflowStreamEvents = WorkflowJournalEvent | WorkflowHeartbeatEvent | WorkflowCursorGapEvent;
377
514
  export type LogEvents = LogStreamEvent | HeartbeatEvent;
378
515
  export interface AttributeBytesValue {
379
516
  "type": "bytes";
@@ -703,6 +840,7 @@ export interface HealthReport {
703
840
  "status": HealthStatus;
704
841
  "total_duration_ms": number;
705
842
  "entries": Record<string, HealthCheckEntry>;
843
+ "contract_revision": string;
706
844
  }
707
845
  export interface RunnerResourceState {
708
846
  "name": string;
@@ -1217,6 +1355,169 @@ export interface WorkbenchEvaluationExportArtifact {
1217
1355
  export interface WorkbenchEvaluationExportAccepted {
1218
1356
  "export": WorkbenchEvaluationExport;
1219
1357
  }
1358
+ export interface WorkflowRun {
1359
+ "run_id": WorkflowRunId;
1360
+ "thread_id"?: string;
1361
+ "title"?: string;
1362
+ "status": WorkflowRunStatus;
1363
+ "started_at": string;
1364
+ "ended_at"?: string;
1365
+ "latest_journal_sequence": string;
1366
+ "active_attempt_id"?: WorkflowAttemptId;
1367
+ "metadata"?: Record<string, unknown>;
1368
+ }
1369
+ export interface WorkflowRunCreateRequest {
1370
+ "run_id": WorkflowRunId;
1371
+ "thread_id"?: string;
1372
+ "title"?: string;
1373
+ "started_at": string;
1374
+ "metadata"?: Record<string, unknown>;
1375
+ }
1376
+ export interface WorkflowRunPage {
1377
+ "items": WorkflowRun[];
1378
+ "next_cursor"?: string;
1379
+ "has_more": boolean;
1380
+ }
1381
+ export interface WorkflowContentChunk {
1382
+ "content_ref": WorkflowContentRef;
1383
+ "content_type": string;
1384
+ "encoding": WorkflowContentEncoding;
1385
+ "content": string;
1386
+ }
1387
+ export interface WorkflowEventAppend {
1388
+ "event_id": WorkflowEventId;
1389
+ "source_sequence": string;
1390
+ "timestamp": string;
1391
+ "kind": WorkflowJournalEventKind;
1392
+ "thread_id"?: string;
1393
+ "turn_id"?: string;
1394
+ "attempt_id"?: WorkflowAttemptId;
1395
+ "agent_id"?: WorkflowAgentId;
1396
+ "parent_agent_id"?: WorkflowAgentId;
1397
+ "receiver_agent_id"?: WorkflowAgentId;
1398
+ "tool_call_id"?: WorkflowToolCallId;
1399
+ "content_refs"?: WorkflowContentRef[];
1400
+ "data"?: Record<string, unknown>;
1401
+ }
1402
+ export interface WorkflowEventBatchAppendRequest {
1403
+ "client_id": string;
1404
+ "events": WorkflowEventAppend[];
1405
+ "content"?: WorkflowContentChunk[];
1406
+ }
1407
+ export interface WorkflowEventBatchAppendResponse {
1408
+ "accepted_count": number;
1409
+ "duplicate_count": number;
1410
+ "acknowledged_source_sequence": string;
1411
+ "first_journal_sequence"?: string;
1412
+ "last_journal_sequence"?: string;
1413
+ }
1414
+ export interface WorkflowJournalEvent extends WorkflowEventAppend {
1415
+ "run_id": WorkflowRunId;
1416
+ "client_id": string;
1417
+ "journal_sequence": string;
1418
+ }
1419
+ export interface WorkflowEventPage {
1420
+ "events": WorkflowJournalEvent[];
1421
+ "next_sequence": string;
1422
+ "high_water_mark": string;
1423
+ "cursor_gap": boolean;
1424
+ }
1425
+ export interface RecordedWorkflowEdgeProvenance {
1426
+ "type": "recorded";
1427
+ "event_ids": WorkflowEventId[];
1428
+ }
1429
+ export interface DerivedWorkflowEdgeProvenance {
1430
+ "type": "derived";
1431
+ "event_ids": WorkflowEventId[];
1432
+ "evidence": string;
1433
+ "confidence": number;
1434
+ }
1435
+ export interface WorkflowGraphNode {
1436
+ "node_id": WorkflowNodeId;
1437
+ "kind": WorkflowNodeKind;
1438
+ "label": string;
1439
+ "status": string;
1440
+ "attempt_id"?: WorkflowAttemptId;
1441
+ "agent_id"?: WorkflowAgentId;
1442
+ "parent_node_id"?: WorkflowNodeId;
1443
+ "started_at"?: string;
1444
+ "ended_at"?: string;
1445
+ "duration_ms"?: number;
1446
+ "content_refs"?: WorkflowContentRef[];
1447
+ "attributes"?: Record<string, unknown>;
1448
+ }
1449
+ export interface WorkflowGraphEdge {
1450
+ "edge_id": string;
1451
+ "source_node_id": WorkflowNodeId;
1452
+ "target_node_id": WorkflowNodeId;
1453
+ "kind": WorkflowEdgeKind;
1454
+ "provenance": WorkflowEdgeProvenance;
1455
+ }
1456
+ export interface WorkflowGraphStatistics {
1457
+ "t1_ms": number;
1458
+ "t_infinity_ms": number;
1459
+ "wall_time_ms": number;
1460
+ "peak_concurrency": number;
1461
+ "worker_count": number;
1462
+ "parallel_lower_bound_ms": number;
1463
+ "critical_path_node_ids": WorkflowNodeId[];
1464
+ }
1465
+ export interface WorkflowGraphSnapshot {
1466
+ "run": WorkflowRun;
1467
+ "nodes": WorkflowGraphNode[];
1468
+ "edges": WorkflowGraphEdge[];
1469
+ "statistics": WorkflowGraphStatistics;
1470
+ "journal_sequence": string;
1471
+ "next_node_cursor"?: string;
1472
+ "next_edge_cursor"?: string;
1473
+ "has_more_nodes": boolean;
1474
+ "has_more_edges": boolean;
1475
+ "total_node_count": number;
1476
+ "total_edge_count": number;
1477
+ }
1478
+ export interface WorkflowContent {
1479
+ "content_ref": WorkflowContentRef;
1480
+ "content_type": string;
1481
+ "encoding": WorkflowContentEncoding;
1482
+ "content": string;
1483
+ "size_bytes": number;
1484
+ }
1485
+ export interface WorkflowControlRequest {
1486
+ "action": WorkflowControlAction;
1487
+ "idempotency_key": string;
1488
+ "input"?: string;
1489
+ }
1490
+ export interface WorkflowControlCommand {
1491
+ "command_id": WorkflowCommandId;
1492
+ "run_id": WorkflowRunId;
1493
+ "action": WorkflowControlAction;
1494
+ "status": WorkflowControlStatus;
1495
+ "idempotency_key": string;
1496
+ "input"?: string;
1497
+ "requested_at": string;
1498
+ "updated_at": string;
1499
+ "command_sequence": string;
1500
+ "error"?: string;
1501
+ }
1502
+ export interface WorkflowControlCommandPage {
1503
+ "commands": WorkflowControlCommand[];
1504
+ "next_sequence": string;
1505
+ }
1506
+ export interface WorkflowControlStatusUpdateRequest {
1507
+ "status": WorkflowControlStatus;
1508
+ "error"?: string;
1509
+ }
1510
+ export interface WorkflowHeartbeatEvent {
1511
+ "type": "heartbeat";
1512
+ "high_water_mark": string;
1513
+ "timestamp": string;
1514
+ }
1515
+ export interface WorkflowCursorGapEvent {
1516
+ "type": "cursor_gap";
1517
+ "oldest_available_sequence": string;
1518
+ "high_water_mark": string;
1519
+ "timestamp": string;
1520
+ }
1220
1521
  export interface DisplayTracesInput {
1221
1522
  "trace_id"?: TraceId;
1222
1523
  "session_id"?: SessionId;
@@ -1305,6 +1606,31 @@ export interface SearchLogsOutput {
1305
1606
  "logs": LogRecord[];
1306
1607
  "mode": McpDataMode;
1307
1608
  }
1609
+ export interface CiLogInput {
1610
+ "run_id"?: SessionId;
1611
+ "limit"?: number;
1612
+ }
1613
+ export interface CiRunSummary {
1614
+ "run_id": SessionId;
1615
+ "state": SessionState;
1616
+ "start_time": string;
1617
+ "duration_ms"?: number;
1618
+ "error_count": number;
1619
+ "services": string[];
1620
+ }
1621
+ export interface CiPhase {
1622
+ "leg": string;
1623
+ "phase": string;
1624
+ "status": CiPhaseStatus;
1625
+ "duration_ms": number;
1626
+ "message"?: string;
1627
+ }
1628
+ export interface CiLogOutput {
1629
+ "runs"?: CiRunSummary[];
1630
+ "run_id"?: SessionId;
1631
+ "phases"?: CiPhase[];
1632
+ "mode": McpDataMode;
1633
+ }
1308
1634
  export interface FetchTelemetryInput {
1309
1635
  "view": FetchTelemetryView;
1310
1636
  "trace_id"?: TraceId;
@@ -1321,6 +1647,66 @@ export interface FetchTelemetryOutput {
1321
1647
  "stats"?: McpDashboardStats;
1322
1648
  "mode": McpDataMode;
1323
1649
  }
1650
+ export interface ListWorkflowRunsInput {
1651
+ "status"?: WorkflowRunStatus;
1652
+ "cursor"?: string;
1653
+ "limit"?: number;
1654
+ }
1655
+ export interface ListWorkflowRunsOutput {
1656
+ "runs": WorkflowRun[];
1657
+ "next_cursor"?: string;
1658
+ "has_more": boolean;
1659
+ "mode": McpDataMode;
1660
+ }
1661
+ export interface GetWorkflowGraphInput {
1662
+ "run_id": WorkflowRunId;
1663
+ "node_cursor"?: string;
1664
+ "node_limit"?: number;
1665
+ "edge_cursor"?: string;
1666
+ "edge_limit"?: number;
1667
+ }
1668
+ export interface GetWorkflowGraphOutput {
1669
+ "graph": WorkflowGraphSnapshot;
1670
+ "mode": McpDataMode;
1671
+ }
1672
+ export interface DisplayWorkflowGraphInput {
1673
+ "run_id"?: WorkflowRunId;
1674
+ "node_cursor"?: string;
1675
+ "node_limit"?: number;
1676
+ "edge_cursor"?: string;
1677
+ "edge_limit"?: number;
1678
+ }
1679
+ export interface DisplayWorkflowGraphOutput {
1680
+ "graph": WorkflowGraphSnapshot;
1681
+ "live_controls_available": boolean;
1682
+ "mode": McpDataMode;
1683
+ }
1684
+ export interface FetchWorkflowGraphUpdatesInput {
1685
+ "run_id": WorkflowRunId;
1686
+ "after_sequence": string;
1687
+ "limit"?: number;
1688
+ "wait_ms"?: number;
1689
+ "node_cursor"?: string;
1690
+ "node_limit"?: number;
1691
+ "edge_cursor"?: string;
1692
+ "edge_limit"?: number;
1693
+ "content_ref"?: WorkflowContentRef;
1694
+ }
1695
+ export interface FetchWorkflowGraphUpdatesOutput {
1696
+ "page": WorkflowEventPage;
1697
+ "graph"?: WorkflowGraphSnapshot;
1698
+ "content"?: WorkflowContent;
1699
+ "mode": McpDataMode;
1700
+ }
1701
+ export interface ControlWorkflowRunInput {
1702
+ "run_id": WorkflowRunId;
1703
+ "action": WorkflowControlAction;
1704
+ "idempotency_key": string;
1705
+ "input"?: string;
1706
+ }
1707
+ export interface ControlWorkflowRunOutput {
1708
+ "command": WorkflowControlCommand;
1709
+ }
1324
1710
  export interface LogStreamEvent {
1325
1711
  "type": "log";
1326
1712
  "data": LogRecord;
@@ -1354,3 +1740,5 @@ export interface CursorPageSessionEntity {
1354
1740
  "prev_cursor"?: string;
1355
1741
  "has_more": boolean;
1356
1742
  }
1743
+ /** Revision of the API contract these types were emitted from; compare against HealthReport.contract_revision. */
1744
+ export declare const CONTRACT_REVISION: string;
@@ -280,13 +280,116 @@ export const WorkbenchTransportKindValues = {
280
280
  "streamableHttp": "streamable_http",
281
281
  "builtin": "builtin",
282
282
  };
283
+ export const WorkflowRunStatusValues = {
284
+ "active": "active",
285
+ "completed": "completed",
286
+ "failed": "failed",
287
+ "interrupted": "interrupted",
288
+ };
289
+ export const WorkflowContentEncodingValues = {
290
+ "utf8": "utf8",
291
+ "base64": "base64",
292
+ };
293
+ export const WorkflowJournalEventKindValues = {
294
+ "runCreated": "run_created",
295
+ "runCompleted": "run_completed",
296
+ "threadStarted": "thread_started",
297
+ "threadResumed": "thread_resumed",
298
+ "turnStarted": "turn_started",
299
+ "turnCompleted": "turn_completed",
300
+ "turnInterrupted": "turn_interrupted",
301
+ "attemptStarted": "attempt_started",
302
+ "attemptCompleted": "attempt_completed",
303
+ "agentSpawned": "agent_spawned",
304
+ "agentStarted": "agent_started",
305
+ "agentCompleted": "agent_completed",
306
+ "messageSent": "message_sent",
307
+ "messageReceived": "message_received",
308
+ "waitStarted": "wait_started",
309
+ "waitCompleted": "wait_completed",
310
+ "joined": "joined",
311
+ "itemStarted": "item_started",
312
+ "itemCompleted": "item_completed",
313
+ "toolStarted": "tool_started",
314
+ "toolCompleted": "tool_completed",
315
+ "approvalRequested": "approval_requested",
316
+ "approvalResolved": "approval_resolved",
317
+ "contentCaptured": "content_captured",
318
+ "fileWritten": "file_written",
319
+ "controlRequested": "control_requested",
320
+ "controlAccepted": "control_accepted",
321
+ "controlApplied": "control_applied",
322
+ "controlRejected": "control_rejected",
323
+ "controlFailed": "control_failed",
324
+ };
325
+ export const WorkflowNodeKindValues = {
326
+ "run": "run",
327
+ "attempt": "attempt",
328
+ "turn": "turn",
329
+ "agent": "agent",
330
+ "toolCall": "tool_call",
331
+ "message": "message",
332
+ "wait": "wait",
333
+ "gate": "gate",
334
+ "resource": "resource",
335
+ };
336
+ export const WorkflowEdgeKindValues = {
337
+ "data": "data",
338
+ "control": "control",
339
+ "conflict": "conflict",
340
+ "resource": "resource",
341
+ "gate": "gate",
342
+ "temporal": "temporal",
343
+ };
344
+ export const WorkflowControlActionValues = {
345
+ "steer": "steer",
346
+ "interrupt": "interrupt",
347
+ "resume": "resume",
348
+ };
349
+ export const WorkflowControlStatusValues = {
350
+ "requested": "requested",
351
+ "accepted": "accepted",
352
+ "applied": "applied",
353
+ "rejected": "rejected",
354
+ "failed": "failed",
355
+ };
356
+ export const WorkflowAttemptStatusValues = {
357
+ "pending": "pending",
358
+ "running": "running",
359
+ "succeeded": "succeeded",
360
+ "failed": "failed",
361
+ "interrupted": "interrupted",
362
+ };
363
+ export const WorkflowAgentStatusValues = {
364
+ "pending": "pending",
365
+ "running": "running",
366
+ "waiting": "waiting",
367
+ "succeeded": "succeeded",
368
+ "failed": "failed",
369
+ "interrupted": "interrupted",
370
+ };
371
+ export const WorkflowToolCallStatusValues = {
372
+ "requested": "requested",
373
+ "running": "running",
374
+ "succeeded": "succeeded",
375
+ "failed": "failed",
376
+ "rejected": "rejected",
377
+ };
283
378
  export const McpDataModeValues = {
284
379
  "live": "live",
285
380
  "demo": "demo",
286
381
  };
382
+ export const CiPhaseStatusValues = {
383
+ "ok": "ok",
384
+ "error": "error",
385
+ "unset": "unset",
386
+ };
287
387
  export const FetchTelemetryViewValues = {
288
388
  "traces": "traces",
289
389
  "trace": "trace",
290
390
  "logs": "logs",
291
391
  "mcpStats": "mcp_stats",
292
392
  };
393
+ // --- contract revision (scripts/emit-contract-revision.mjs) ---
394
+ /** Revision of the API contract these types were emitted from; compare against HealthReport.contract_revision. */
395
+ export const CONTRACT_REVISION = "sha256:c4b86d761cbd7299";
package/index.tsp CHANGED
@@ -21,9 +21,11 @@ import "./models/session.tsp";
21
21
  import "./models/health.tsp";
22
22
  import "./models/runner.tsp";
23
23
  import "./models/workbench.tsp";
24
+ import "./models/workflow.tsp";
24
25
  import "./models/mcp-tools.tsp";
25
26
 
26
27
  import "./api/routes.tsp";
27
28
  import "./api/streaming.tsp";
28
29
  import "./api/runner.tsp";
29
30
  import "./api/workbench.tsp";
31
+ import "./api/workflow.tsp";
package/models/health.tsp CHANGED
@@ -1,3 +1,7 @@
1
+ import "../common/types.tsp";
2
+
3
+ using Qyl.Api.Contracts.Common;
4
+
1
5
  namespace Qyl.Api.Contracts.Health;
2
6
 
3
7
  @doc("Health state reported by a qyl-managed process.")
@@ -21,4 +25,12 @@ model HealthReport {
21
25
  @encodedName("application/json", "total_duration_ms")
22
26
  totalDurationMs: float64;
23
27
  entries: Record<HealthCheckEntry>;
28
+
29
+ // The meta surface of the contract loop: first-party clients compare this to
30
+ // the revision baked into their own generated artifacts and refuse to run on
31
+ // a mismatch, so a redeployed collector cannot silently serve a contract its
32
+ // clients were not generated from.
33
+ @doc("Revision of the API contract this process serves, for the client-side startup handshake.")
34
+ @encodedName("application/json", "contract_revision")
35
+ contractRevision: ContractRevision;
24
36
  }