@ancplua/qyl-api-schema 4.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,6 +375,111 @@ 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";
@@ -380,6 +509,8 @@ export type WorkbenchTestAssertion = WorkbenchStatusAssertion | WorkbenchExactAs
380
509
  export type WorkbenchEvaluationExportPayload = WorkbenchEvaluationJsonExportPayload | WorkbenchEvaluationReportExportPayload;
381
510
  export type WorkbenchProtocolEvents = WorkbenchProtocolEvent;
382
511
  export type WorkbenchExecutionUpdateEvents = WorkbenchExecutionRecord;
512
+ export type WorkflowEdgeProvenance = RecordedWorkflowEdgeProvenance | DerivedWorkflowEdgeProvenance;
513
+ export type WorkflowStreamEvents = WorkflowJournalEvent | WorkflowHeartbeatEvent | WorkflowCursorGapEvent;
383
514
  export type LogEvents = LogStreamEvent | HeartbeatEvent;
384
515
  export interface AttributeBytesValue {
385
516
  "type": "bytes";
@@ -1224,6 +1355,169 @@ export interface WorkbenchEvaluationExportArtifact {
1224
1355
  export interface WorkbenchEvaluationExportAccepted {
1225
1356
  "export": WorkbenchEvaluationExport;
1226
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
+ }
1227
1521
  export interface DisplayTracesInput {
1228
1522
  "trace_id"?: TraceId;
1229
1523
  "session_id"?: SessionId;
@@ -1353,6 +1647,66 @@ export interface FetchTelemetryOutput {
1353
1647
  "stats"?: McpDashboardStats;
1354
1648
  "mode": McpDataMode;
1355
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
+ }
1356
1710
  export interface LogStreamEvent {
1357
1711
  "type": "log";
1358
1712
  "data": LogRecord;
@@ -280,6 +280,101 @@ 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",
@@ -297,4 +392,4 @@ export const FetchTelemetryViewValues = {
297
392
  };
298
393
  // --- contract revision (scripts/emit-contract-revision.mjs) ---
299
394
  /** Revision of the API contract these types were emitted from; compare against HealthReport.contract_revision. */
300
- export const CONTRACT_REVISION = "sha256:9ba787d0bd3269a9";
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";
@@ -2,11 +2,13 @@ import "../common/types.tsp";
2
2
  import "../otel/logs.tsp";
3
3
  import "../otel/span.tsp";
4
4
  import "./session.tsp";
5
+ import "./workflow.tsp";
5
6
 
6
7
  using Qyl.Api.Contracts.Common;
7
8
  using Qyl.Api.Contracts.Domains.Observe.Session;
8
9
  using Qyl.Api.Contracts.OTel.Logs;
9
10
  using Qyl.Api.Contracts.OTel.Traces;
11
+ using Qyl.Api.Contracts.Workflow;
10
12
 
11
13
  namespace Qyl.Api.Contracts.Mcp.Tools;
12
14
 
@@ -216,6 +218,157 @@ model FetchTelemetryOutput {
216
218
  mode: McpDataMode;
217
219
  }
218
220
 
221
+ @doc("Input for list_workflow_runs.")
222
+ model ListWorkflowRunsInput {
223
+ status?: WorkflowRunStatus;
224
+
225
+ cursor?: string;
226
+
227
+ @minValue(1)
228
+ @maxValue(100)
229
+ limit?: int32 = 20;
230
+ }
231
+
232
+ @doc("Structured output for list_workflow_runs.")
233
+ model ListWorkflowRunsOutput {
234
+ runs: WorkflowRun[];
235
+
236
+ @encodedName("application/json", "next_cursor")
237
+ nextCursor?: string;
238
+
239
+ @encodedName("application/json", "has_more")
240
+ hasMore: boolean;
241
+
242
+ mode: McpDataMode;
243
+ }
244
+
245
+ @doc("Input for get_workflow_graph.")
246
+ model GetWorkflowGraphInput {
247
+ @encodedName("application/json", "run_id")
248
+ runId: WorkflowRunId;
249
+
250
+ @encodedName("application/json", "node_cursor")
251
+ nodeCursor?: string;
252
+
253
+ @encodedName("application/json", "node_limit")
254
+ @minValue(1)
255
+ @maxValue(1000)
256
+ nodeLimit?: int32 = 250;
257
+
258
+ @encodedName("application/json", "edge_cursor")
259
+ edgeCursor?: string;
260
+
261
+ @encodedName("application/json", "edge_limit")
262
+ @minValue(1)
263
+ @maxValue(2000)
264
+ edgeLimit?: int32 = 500;
265
+ }
266
+
267
+ @doc("Structured output for get_workflow_graph.")
268
+ model GetWorkflowGraphOutput {
269
+ graph: WorkflowGraphSnapshot;
270
+ mode: McpDataMode;
271
+ }
272
+
273
+ @doc("Input for display_workflow_graph. Omit run_id to select the most recent run.")
274
+ model DisplayWorkflowGraphInput {
275
+ @encodedName("application/json", "run_id")
276
+ runId?: WorkflowRunId;
277
+
278
+ @encodedName("application/json", "node_cursor")
279
+ nodeCursor?: string;
280
+
281
+ @encodedName("application/json", "node_limit")
282
+ @minValue(1)
283
+ @maxValue(1000)
284
+ nodeLimit?: int32 = 250;
285
+
286
+ @encodedName("application/json", "edge_cursor")
287
+ edgeCursor?: string;
288
+
289
+ @encodedName("application/json", "edge_limit")
290
+ @minValue(1)
291
+ @maxValue(2000)
292
+ edgeLimit?: int32 = 500;
293
+ }
294
+
295
+ @doc("Structured output for display_workflow_graph.")
296
+ model DisplayWorkflowGraphOutput {
297
+ graph: WorkflowGraphSnapshot;
298
+
299
+ @encodedName("application/json", "live_controls_available")
300
+ liveControlsAvailable: boolean;
301
+
302
+ mode: McpDataMode;
303
+ }
304
+
305
+ @doc("Input for the app-only fetch_workflow_graph_updates tool.")
306
+ model FetchWorkflowGraphUpdatesInput {
307
+ @encodedName("application/json", "run_id")
308
+ runId: WorkflowRunId;
309
+
310
+ @encodedName("application/json", "after_sequence")
311
+ afterSequence: WorkflowSequence;
312
+
313
+ @minValue(1)
314
+ @maxValue(1000)
315
+ limit?: int32 = 250;
316
+
317
+ @encodedName("application/json", "wait_ms")
318
+ @minValue(0)
319
+ @maxValue(30000)
320
+ waitMs?: int32 = 20000;
321
+
322
+ @encodedName("application/json", "node_cursor")
323
+ nodeCursor?: string;
324
+
325
+ @encodedName("application/json", "node_limit")
326
+ @minValue(1)
327
+ @maxValue(1000)
328
+ nodeLimit?: int32 = 250;
329
+
330
+ @encodedName("application/json", "edge_cursor")
331
+ edgeCursor?: string;
332
+
333
+ @encodedName("application/json", "edge_limit")
334
+ @minValue(1)
335
+ @maxValue(2000)
336
+ edgeLimit?: int32 = 500;
337
+
338
+ @doc("Optional captured payload to retrieve lazily for the selected run.")
339
+ @encodedName("application/json", "content_ref")
340
+ contentRef?: WorkflowContentRef;
341
+ }
342
+
343
+ @doc("Structured output for the app-only fetch_workflow_graph_updates tool.")
344
+ model FetchWorkflowGraphUpdatesOutput {
345
+ page: WorkflowEventPage;
346
+ graph?: WorkflowGraphSnapshot;
347
+ content?: WorkflowContent;
348
+ mode: McpDataMode;
349
+ }
350
+
351
+ @doc("Input for control_workflow_run.")
352
+ model ControlWorkflowRunInput {
353
+ @encodedName("application/json", "run_id")
354
+ runId: WorkflowRunId;
355
+
356
+ action: WorkflowControlAction;
357
+
358
+ @encodedName("application/json", "idempotency_key")
359
+ @minLength(1)
360
+ @maxLength(160)
361
+ idempotencyKey: string;
362
+
363
+ @maxLength(32768)
364
+ input?: string;
365
+ }
366
+
367
+ @doc("Structured output for control_workflow_run.")
368
+ model ControlWorkflowRunOutput {
369
+ command: WorkflowControlCommand;
370
+ }
371
+
219
372
  @doc("Aggregate MCP traffic statistics shown by qyl.mcp.")
220
373
  model McpDashboardStats {
221
374
  window: McpDashboardWindow;