@ancplua/qyl-api-schema 0.5.15 → 0.6.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.
package/api/runner.tsp CHANGED
@@ -13,6 +13,12 @@ using TypeSpec.SSE;
13
13
  using Qyl.Api.Contracts.Common.Errors;
14
14
  using Qyl.Api.Contracts.Runner.Mcp;
15
15
 
16
+ namespace TypeSpec.Http {
17
+ @doc("HttpOnly local runner session cookie. The cookie value is never exposed by a product DTO.")
18
+ model RunnerMcpSessionCookieAuth
19
+ is ApiKeyAuth<ApiKeyLocation.cookie, "qyl-mcp-session">;
20
+ }
21
+
16
22
  namespace Qyl.Api.Contracts.Runner {
17
23
  @events
18
24
  union RunnerResourceEvents {
@@ -24,64 +30,267 @@ namespace Qyl.Api.Contracts.Runner {
24
30
  message: RunnerLogLine,
25
31
  }
26
32
 
33
+ @events
34
+ union RunnerMcpProtocolEvents {
35
+ message: RunnerMcpProtocolEvent,
36
+ }
37
+
38
+ @events
39
+ union RunnerMcpExecutionUpdateEvents {
40
+ message: RunnerMcpExecutionRecord,
41
+ }
42
+
43
+ @route("/runner/session")
44
+ @tag("Runner session")
45
+ interface RunnerSessionApi {
46
+ @doc("Read local session and workspace identity metadata. The session cookie value is never returned.")
47
+ @useAuth(RunnerMcpSessionCookieAuth)
48
+ @get
49
+ get():
50
+ | RunnerMcpWorkbenchSession
51
+ | UnauthorizedError
52
+ | ForbiddenError
53
+ | ServiceUnavailableError
54
+ | InternalServerError;
55
+
56
+ @doc("Bootstrap a loopback-only local session. The runtime sets qyl-mcp-session with HttpOnly and SameSite attributes, adds Secure when served over HTTPS, and never returns its value.")
57
+ @post
58
+ bootstrap():
59
+ | RunnerMcpSessionBootstrapResponse
60
+ | UnauthorizedError
61
+ | ForbiddenError
62
+ | ConflictError
63
+ | ServiceUnavailableError
64
+ | InternalServerError;
65
+ }
66
+
27
67
  @route("/runner/resources")
28
68
  @tag("Runner resources")
69
+ @useAuth(RunnerMcpSessionCookieAuth)
29
70
  interface RunnerResourcesApi {
30
- @get
31
- snapshot(): RunnerResourceState[] | ForbiddenError | ServiceUnavailableError | InternalServerError;
71
+ @get snapshot():
72
+ | RunnerResourceState[]
73
+ | UnauthorizedError
74
+ | ForbiddenError
75
+ | ServiceUnavailableError
76
+ | InternalServerError;
32
77
 
33
78
  @get
34
79
  @route("/stream")
35
- stream(): SSEStream<RunnerResourceEvents> | ForbiddenError | ServiceUnavailableError | InternalServerError;
80
+ stream():
81
+ | SSEStream<RunnerResourceEvents>
82
+ | UnauthorizedError
83
+ | ForbiddenError
84
+ | ServiceUnavailableError
85
+ | InternalServerError;
36
86
 
37
87
  @get
38
88
  @route("/{resource}/logs")
39
- logs(
40
- @path resource: string,
41
- ): RunnerLogLine[] | ForbiddenError | NotFoundError | ServiceUnavailableError | InternalServerError;
89
+ logs(@path resource: string):
90
+ | RunnerLogLine[]
91
+ | UnauthorizedError
92
+ | ForbiddenError
93
+ | NotFoundError
94
+ | ServiceUnavailableError
95
+ | InternalServerError;
42
96
 
43
97
  @get
44
98
  @route("/{resource}/logs/stream")
45
99
  streamLogs(
46
100
  @path resource: string,
47
101
  @header("Last-Event-ID") lastEventId?: string,
48
- ): SSEStream<RunnerLogEvents> | ForbiddenError | NotFoundError | ServiceUnavailableError | InternalServerError;
102
+ ):
103
+ | SSEStream<RunnerLogEvents>
104
+ | UnauthorizedError
105
+ | ForbiddenError
106
+ | NotFoundError
107
+ | ServiceUnavailableError
108
+ | InternalServerError;
49
109
 
50
110
  @post
51
111
  @route("/{resource}/restart")
52
- restart(
53
- @path resource: string,
54
- ): RunnerActionAccepted | ForbiddenError | NotFoundError | ConflictError | ServiceUnavailableError | InternalServerError;
112
+ restart(@path resource: string):
113
+ | RunnerActionAccepted
114
+ | UnauthorizedError
115
+ | ForbiddenError
116
+ | NotFoundError
117
+ | ConflictError
118
+ | ServiceUnavailableError
119
+ | InternalServerError;
55
120
 
56
121
  @post
57
122
  @route("/{resource}/stop")
58
- stop(
59
- @path resource: string,
60
- ): RunnerActionAccepted | ForbiddenError | NotFoundError | ConflictError | ServiceUnavailableError | InternalServerError;
123
+ stop(@path resource: string):
124
+ | RunnerActionAccepted
125
+ | UnauthorizedError
126
+ | ForbiddenError
127
+ | NotFoundError
128
+ | ConflictError
129
+ | ServiceUnavailableError
130
+ | InternalServerError;
61
131
  }
62
132
 
63
- @route("/runner/mcp/{resource}")
64
- @tag("Runner MCP")
65
- interface RunnerMcpApi {
133
+ @route("/runner/workspaces")
134
+ @tag("Runner workspaces")
135
+ @useAuth(RunnerMcpSessionCookieAuth)
136
+ interface RunnerWorkspacesApi {
66
137
  @get
67
- @route("/tools")
68
- listTools(
69
- @path resource: string,
70
- ): RunnerMcpToolsResponse
138
+ list():
139
+ | RunnerMcpWorkspaceListResponse
140
+ | UnauthorizedError
141
+ | ForbiddenError
142
+ | ServiceUnavailableError
143
+ | InternalServerError;
144
+
145
+ @post
146
+ create(@body request: RunnerMcpWorkspaceCreateRequest):
147
+ | RunnerMcpWorkspace
148
+ | ValidationError
149
+ | UnauthorizedError
150
+ | ForbiddenError
151
+ | ConflictError
152
+ | ServiceUnavailableError
153
+ | InternalServerError;
154
+
155
+ @get
156
+ @route("/{workspaceId}")
157
+ get(@path workspaceId: RunnerMcpWorkspaceId):
158
+ | RunnerMcpWorkspace
159
+ | UnauthorizedError
160
+ | ForbiddenError
161
+ | NotFoundError
162
+ | ServiceUnavailableError
163
+ | InternalServerError;
164
+
165
+ @patch
166
+ @route("/{workspaceId}")
167
+ update(
168
+ @path workspaceId: RunnerMcpWorkspaceId,
169
+ @body request: RunnerMcpWorkspaceUpdateRequest,
170
+ ):
171
+ | RunnerMcpWorkspace
172
+ | ValidationError
173
+ | UnauthorizedError
71
174
  | ForbiddenError
72
175
  | NotFoundError
73
176
  | ConflictError
74
- | BadGatewayError
177
+ | ServiceUnavailableError
178
+ | InternalServerError;
179
+
180
+ @delete
181
+ @route("/{workspaceId}")
182
+ delete(@path workspaceId: RunnerMcpWorkspaceId):
183
+ | RunnerMcpDeleted
184
+ | UnauthorizedError
185
+ | ForbiddenError
186
+ | NotFoundError
187
+ | ConflictError
188
+ | ServiceUnavailableError
189
+ | InternalServerError;
190
+
191
+ @get
192
+ @route("/{workspaceId}/preferences")
193
+ getPreferences(@path workspaceId: RunnerMcpWorkspaceId):
194
+ | RunnerMcpWorkspacePreferences
195
+ | UnauthorizedError
196
+ | ForbiddenError
197
+ | NotFoundError
198
+ | ServiceUnavailableError
199
+ | InternalServerError;
200
+
201
+ @put
202
+ @route("/{workspaceId}/preferences")
203
+ updatePreferences(
204
+ @path workspaceId: RunnerMcpWorkspaceId,
205
+ @body request: RunnerMcpWorkspacePreferencesUpdateRequest,
206
+ ):
207
+ | RunnerMcpWorkspacePreferences
208
+ | ValidationError
209
+ | UnauthorizedError
210
+ | ForbiddenError
211
+ | NotFoundError
212
+ | ServiceUnavailableError
213
+ | InternalServerError;
214
+ }
215
+
216
+ @route("/runner/workspaces/{workspaceId}/servers")
217
+ @tag("Runner MCP servers")
218
+ @useAuth(RunnerMcpSessionCookieAuth)
219
+ interface RunnerMcpServersApi {
220
+ @get
221
+ list(@path workspaceId: RunnerMcpWorkspaceId):
222
+ | RunnerMcpServerListResponse
223
+ | UnauthorizedError
224
+ | ForbiddenError
225
+ | NotFoundError
75
226
  | ServiceUnavailableError
76
227
  | InternalServerError;
77
228
 
78
229
  @post
79
- @route("/tools/call")
80
- callTool(
81
- @path resource: string,
82
- @body request: RunnerMcpToolCallRequest,
83
- ): RunnerMcpToolCallResponse
230
+ create(
231
+ @path workspaceId: RunnerMcpWorkspaceId,
232
+ @body request: RunnerMcpServerCreateRequest,
233
+ ):
234
+ | RunnerMcpServer
235
+ | ValidationError
236
+ | UnauthorizedError
237
+ | ForbiddenError
238
+ | NotFoundError
239
+ | ConflictError
240
+ | ServiceUnavailableError
241
+ | InternalServerError;
242
+
243
+ @get
244
+ @route("/{serverId}")
245
+ get(
246
+ @path workspaceId: RunnerMcpWorkspaceId,
247
+ @path serverId: RunnerMcpServerId,
248
+ ):
249
+ | RunnerMcpServer
250
+ | UnauthorizedError
251
+ | ForbiddenError
252
+ | NotFoundError
253
+ | ServiceUnavailableError
254
+ | InternalServerError;
255
+
256
+ @patch
257
+ @route("/{serverId}")
258
+ update(
259
+ @path workspaceId: RunnerMcpWorkspaceId,
260
+ @path serverId: RunnerMcpServerId,
261
+ @body request: RunnerMcpServerUpdateRequest,
262
+ ):
263
+ | RunnerMcpServer
84
264
  | ValidationError
265
+ | UnauthorizedError
266
+ | ForbiddenError
267
+ | NotFoundError
268
+ | ConflictError
269
+ | ServiceUnavailableError
270
+ | InternalServerError;
271
+
272
+ @delete
273
+ @route("/{serverId}")
274
+ delete(
275
+ @path workspaceId: RunnerMcpWorkspaceId,
276
+ @path serverId: RunnerMcpServerId,
277
+ ):
278
+ | RunnerMcpDeleted
279
+ | UnauthorizedError
280
+ | ForbiddenError
281
+ | NotFoundError
282
+ | ConflictError
283
+ | ServiceUnavailableError
284
+ | InternalServerError;
285
+
286
+ @post
287
+ @route("/{serverId}/connect")
288
+ connect(
289
+ @path workspaceId: RunnerMcpWorkspaceId,
290
+ @path serverId: RunnerMcpServerId,
291
+ ):
292
+ | RunnerMcpServerActionAccepted
293
+ | UnauthorizedError
85
294
  | ForbiddenError
86
295
  | NotFoundError
87
296
  | ConflictError
@@ -90,17 +299,488 @@ namespace Qyl.Api.Contracts.Runner {
90
299
  | InternalServerError;
91
300
 
92
301
  @post
93
- @route("/resources/read")
94
- readResource(
95
- @path resource: string,
96
- @body request: RunnerMcpResourceReadRequest,
97
- ): RunnerMcpResourceReadResponse
302
+ @route("/{serverId}/disconnect")
303
+ disconnect(
304
+ @path workspaceId: RunnerMcpWorkspaceId,
305
+ @path serverId: RunnerMcpServerId,
306
+ ):
307
+ | RunnerMcpServerActionAccepted
308
+ | UnauthorizedError
309
+ | ForbiddenError
310
+ | NotFoundError
311
+ | ConflictError
312
+ | ServiceUnavailableError
313
+ | InternalServerError;
314
+
315
+ @post
316
+ @route("/{serverId}/reconnect")
317
+ reconnect(
318
+ @path workspaceId: RunnerMcpWorkspaceId,
319
+ @path serverId: RunnerMcpServerId,
320
+ ):
321
+ | RunnerMcpServerActionAccepted
322
+ | UnauthorizedError
323
+ | ForbiddenError
324
+ | NotFoundError
325
+ | ConflictError
326
+ | BadGatewayError
327
+ | ServiceUnavailableError
328
+ | InternalServerError;
329
+
330
+ @get
331
+ @route("/{serverId}/discovery")
332
+ discovery(
333
+ @path workspaceId: RunnerMcpWorkspaceId,
334
+ @path serverId: RunnerMcpServerId,
335
+ ):
336
+ | RunnerMcpDiscoverySnapshot
337
+ | UnauthorizedError
338
+ | ForbiddenError
339
+ | NotFoundError
340
+ | ConflictError
341
+ | BadGatewayError
342
+ | ServiceUnavailableError
343
+ | InternalServerError;
344
+
345
+ @post
346
+ @route("/{serverId}/discovery/refresh")
347
+ refreshDiscovery(
348
+ @path workspaceId: RunnerMcpWorkspaceId,
349
+ @path serverId: RunnerMcpServerId,
350
+ ):
351
+ | RunnerMcpDiscoverySnapshot
352
+ | UnauthorizedError
353
+ | ForbiddenError
354
+ | NotFoundError
355
+ | ConflictError
356
+ | BadGatewayError
357
+ | ServiceUnavailableError
358
+ | InternalServerError;
359
+
360
+ @get
361
+ @route("/{serverId}/protocol")
362
+ protocolEvents(
363
+ @path workspaceId: RunnerMcpWorkspaceId,
364
+ @path serverId: RunnerMcpServerId,
365
+ @query cursor?: string,
366
+
367
+ @query
368
+ @minValue(1)
369
+ @maxValue(1000)
370
+ limit?: int32 = 200,
371
+ ):
372
+ | RunnerMcpProtocolEventPage
373
+ | ValidationError
374
+ | UnauthorizedError
375
+ | ForbiddenError
376
+ | NotFoundError
377
+ | ServiceUnavailableError
378
+ | InternalServerError;
379
+
380
+ @get
381
+ @route("/{serverId}/protocol/stream")
382
+ streamProtocolEvents(
383
+ @path workspaceId: RunnerMcpWorkspaceId,
384
+ @path serverId: RunnerMcpServerId,
385
+ @header("Last-Event-ID") lastEventId?: string,
386
+ ):
387
+ | SSEStream<RunnerMcpProtocolEvents>
388
+ | UnauthorizedError
389
+ | ForbiddenError
390
+ | NotFoundError
391
+ | ServiceUnavailableError
392
+ | InternalServerError;
393
+ }
394
+
395
+ @route("/runner/workspaces/{workspaceId}/servers/{serverId}/executions")
396
+ @tag("Runner MCP executions")
397
+ @useAuth(RunnerMcpSessionCookieAuth)
398
+ interface RunnerMcpExecutionsApi {
399
+ @get
400
+ @route("/stream")
401
+ streamUpdates(
402
+ @path workspaceId: RunnerMcpWorkspaceId,
403
+ @path serverId: RunnerMcpServerId,
404
+ @query executionId?: RunnerMcpExecutionId,
405
+ @header("Last-Event-ID") lastEventId?: string,
406
+ ):
407
+ | SSEStream<RunnerMcpExecutionUpdateEvents>
408
+ | UnauthorizedError
409
+ | ForbiddenError
410
+ | NotFoundError
411
+ | ServiceUnavailableError
412
+ | InternalServerError;
413
+
414
+ @get
415
+ list(
416
+ @path workspaceId: RunnerMcpWorkspaceId,
417
+ @path serverId: RunnerMcpServerId,
418
+ @query status?: RunnerMcpExecutionStatus,
419
+ @query cursor?: string,
420
+
421
+ @query
422
+ @minValue(1)
423
+ @maxValue(1000)
424
+ limit?: int32 = 100,
425
+ ):
426
+ | RunnerMcpExecutionPage
98
427
  | ValidationError
428
+ | UnauthorizedError
429
+ | ForbiddenError
430
+ | NotFoundError
431
+ | ServiceUnavailableError
432
+ | InternalServerError;
433
+
434
+ @post
435
+ start(
436
+ @path workspaceId: RunnerMcpWorkspaceId,
437
+ @path serverId: RunnerMcpServerId,
438
+ @body request: RunnerMcpExecutionRequest,
439
+ ):
440
+ | RunnerMcpExecutionAccepted
441
+ | ValidationError
442
+ | UnauthorizedError
99
443
  | ForbiddenError
100
444
  | NotFoundError
101
445
  | ConflictError
102
446
  | BadGatewayError
103
447
  | ServiceUnavailableError
104
448
  | InternalServerError;
449
+
450
+ @get
451
+ @route("/{executionId}")
452
+ get(
453
+ @path workspaceId: RunnerMcpWorkspaceId,
454
+ @path serverId: RunnerMcpServerId,
455
+ @path executionId: RunnerMcpExecutionId,
456
+ ):
457
+ | RunnerMcpExecutionRecord
458
+ | UnauthorizedError
459
+ | ForbiddenError
460
+ | NotFoundError
461
+ | ServiceUnavailableError
462
+ | InternalServerError;
463
+
464
+ @post
465
+ @route("/{executionId}/cancel")
466
+ cancel(
467
+ @path workspaceId: RunnerMcpWorkspaceId,
468
+ @path serverId: RunnerMcpServerId,
469
+ @path executionId: RunnerMcpExecutionId,
470
+ @body request: RunnerMcpExecutionCancelRequest,
471
+ ):
472
+ | RunnerMcpExecutionAccepted
473
+ | ValidationError
474
+ | UnauthorizedError
475
+ | ForbiddenError
476
+ | NotFoundError
477
+ | ConflictError
478
+ | ServiceUnavailableError
479
+ | InternalServerError;
480
+
481
+ @get
482
+ @route("/{executionId}/telemetry")
483
+ telemetry(
484
+ @path workspaceId: RunnerMcpWorkspaceId,
485
+ @path serverId: RunnerMcpServerId,
486
+ @path executionId: RunnerMcpExecutionId,
487
+ ):
488
+ | RunnerMcpExecutionTelemetryResponse
489
+ | UnauthorizedError
490
+ | ForbiddenError
491
+ | NotFoundError
492
+ | ServiceUnavailableError
493
+ | InternalServerError;
494
+ }
495
+
496
+ @route("/runner/workspaces/{workspaceId}/test-cases")
497
+ @tag("Runner MCP test cases")
498
+ @useAuth(RunnerMcpSessionCookieAuth)
499
+ interface RunnerMcpTestCasesApi {
500
+ @get
501
+ list(
502
+ @path workspaceId: RunnerMcpWorkspaceId,
503
+ @query serverId?: RunnerMcpServerId,
504
+ @query toolName?: string,
505
+ @query cursor?: string,
506
+
507
+ @query
508
+ @minValue(1)
509
+ @maxValue(1000)
510
+ limit?: int32 = 100,
511
+ ):
512
+ | RunnerMcpTestCasePage
513
+ | ValidationError
514
+ | UnauthorizedError
515
+ | ForbiddenError
516
+ | NotFoundError
517
+ | ServiceUnavailableError
518
+ | InternalServerError;
519
+
520
+ @post
521
+ create(
522
+ @path workspaceId: RunnerMcpWorkspaceId,
523
+ @body request: RunnerMcpTestCaseCreateRequest,
524
+ ):
525
+ | RunnerMcpTestCase
526
+ | ValidationError
527
+ | UnauthorizedError
528
+ | ForbiddenError
529
+ | NotFoundError
530
+ | ConflictError
531
+ | ServiceUnavailableError
532
+ | InternalServerError;
533
+
534
+ @get
535
+ @route("/{testCaseId}")
536
+ get(
537
+ @path workspaceId: RunnerMcpWorkspaceId,
538
+ @path testCaseId: RunnerMcpTestCaseId,
539
+ ):
540
+ | RunnerMcpTestCase
541
+ | UnauthorizedError
542
+ | ForbiddenError
543
+ | NotFoundError
544
+ | ServiceUnavailableError
545
+ | InternalServerError;
546
+
547
+ @patch
548
+ @route("/{testCaseId}")
549
+ update(
550
+ @path workspaceId: RunnerMcpWorkspaceId,
551
+ @path testCaseId: RunnerMcpTestCaseId,
552
+ @body request: RunnerMcpTestCaseUpdateRequest,
553
+ ):
554
+ | RunnerMcpTestCase
555
+ | ValidationError
556
+ | UnauthorizedError
557
+ | ForbiddenError
558
+ | NotFoundError
559
+ | ConflictError
560
+ | ServiceUnavailableError
561
+ | InternalServerError;
562
+
563
+ @delete
564
+ @route("/{testCaseId}")
565
+ delete(
566
+ @path workspaceId: RunnerMcpWorkspaceId,
567
+ @path testCaseId: RunnerMcpTestCaseId,
568
+ ):
569
+ | RunnerMcpDeleted
570
+ | UnauthorizedError
571
+ | ForbiddenError
572
+ | NotFoundError
573
+ | ConflictError
574
+ | ServiceUnavailableError
575
+ | InternalServerError;
576
+
577
+ @post
578
+ @route("/{testCaseId}/run")
579
+ run(
580
+ @path workspaceId: RunnerMcpWorkspaceId,
581
+ @path testCaseId: RunnerMcpTestCaseId,
582
+ @body request: RunnerMcpTestCaseRunRequest,
583
+ ):
584
+ | RunnerMcpEvaluationRunAccepted
585
+ | ValidationError
586
+ | UnauthorizedError
587
+ | ForbiddenError
588
+ | NotFoundError
589
+ | ConflictError
590
+ | ServiceUnavailableError
591
+ | InternalServerError;
592
+ }
593
+
594
+ @route("/runner/workspaces/{workspaceId}/suites")
595
+ @tag("Runner MCP suites")
596
+ @useAuth(RunnerMcpSessionCookieAuth)
597
+ interface RunnerMcpSuitesApi {
598
+ @get
599
+ list(
600
+ @path workspaceId: RunnerMcpWorkspaceId,
601
+ @query cursor?: string,
602
+
603
+ @query
604
+ @minValue(1)
605
+ @maxValue(1000)
606
+ limit?: int32 = 100,
607
+ ):
608
+ | RunnerMcpTestSuitePage
609
+ | ValidationError
610
+ | UnauthorizedError
611
+ | ForbiddenError
612
+ | NotFoundError
613
+ | ServiceUnavailableError
614
+ | InternalServerError;
615
+
616
+ @post
617
+ create(
618
+ @path workspaceId: RunnerMcpWorkspaceId,
619
+ @body request: RunnerMcpTestSuiteCreateRequest,
620
+ ):
621
+ | RunnerMcpTestSuite
622
+ | ValidationError
623
+ | UnauthorizedError
624
+ | ForbiddenError
625
+ | NotFoundError
626
+ | ConflictError
627
+ | ServiceUnavailableError
628
+ | InternalServerError;
629
+
630
+ @get
631
+ @route("/{suiteId}")
632
+ get(
633
+ @path workspaceId: RunnerMcpWorkspaceId,
634
+ @path suiteId: RunnerMcpSuiteId,
635
+ ):
636
+ | RunnerMcpTestSuite
637
+ | UnauthorizedError
638
+ | ForbiddenError
639
+ | NotFoundError
640
+ | ServiceUnavailableError
641
+ | InternalServerError;
642
+
643
+ @patch
644
+ @route("/{suiteId}")
645
+ update(
646
+ @path workspaceId: RunnerMcpWorkspaceId,
647
+ @path suiteId: RunnerMcpSuiteId,
648
+ @body request: RunnerMcpTestSuiteUpdateRequest,
649
+ ):
650
+ | RunnerMcpTestSuite
651
+ | ValidationError
652
+ | UnauthorizedError
653
+ | ForbiddenError
654
+ | NotFoundError
655
+ | ConflictError
656
+ | ServiceUnavailableError
657
+ | InternalServerError;
658
+
659
+ @delete
660
+ @route("/{suiteId}")
661
+ delete(
662
+ @path workspaceId: RunnerMcpWorkspaceId,
663
+ @path suiteId: RunnerMcpSuiteId,
664
+ ):
665
+ | RunnerMcpDeleted
666
+ | UnauthorizedError
667
+ | ForbiddenError
668
+ | NotFoundError
669
+ | ConflictError
670
+ | ServiceUnavailableError
671
+ | InternalServerError;
672
+
673
+ @post
674
+ @route("/{suiteId}/run")
675
+ run(
676
+ @path workspaceId: RunnerMcpWorkspaceId,
677
+ @path suiteId: RunnerMcpSuiteId,
678
+ @body request: RunnerMcpSuiteRunRequest,
679
+ ):
680
+ | RunnerMcpEvaluationRunAccepted
681
+ | ValidationError
682
+ | UnauthorizedError
683
+ | ForbiddenError
684
+ | NotFoundError
685
+ | ConflictError
686
+ | ServiceUnavailableError
687
+ | InternalServerError;
688
+ }
689
+
690
+ @route("/runner/workspaces/{workspaceId}/evaluation-runs")
691
+ @tag("Runner MCP evaluations")
692
+ @useAuth(RunnerMcpSessionCookieAuth)
693
+ interface RunnerMcpEvaluationRunsApi {
694
+ @get
695
+ list(
696
+ @path workspaceId: RunnerMcpWorkspaceId,
697
+ @query status?: RunnerMcpEvaluationRunStatus,
698
+ @query cursor?: string,
699
+
700
+ @query
701
+ @minValue(1)
702
+ @maxValue(1000)
703
+ limit?: int32 = 100,
704
+ ):
705
+ | RunnerMcpEvaluationRunPage
706
+ | ValidationError
707
+ | UnauthorizedError
708
+ | ForbiddenError
709
+ | NotFoundError
710
+ | ServiceUnavailableError
711
+ | InternalServerError;
712
+
713
+ @get
714
+ @route("/{evaluationRunId}")
715
+ get(
716
+ @path workspaceId: RunnerMcpWorkspaceId,
717
+ @path evaluationRunId: RunnerMcpEvaluationRunId,
718
+ ):
719
+ | RunnerMcpEvaluationRun
720
+ | UnauthorizedError
721
+ | ForbiddenError
722
+ | NotFoundError
723
+ | ServiceUnavailableError
724
+ | InternalServerError;
725
+
726
+ @post
727
+ @route("/compare")
728
+ compare(
729
+ @path workspaceId: RunnerMcpWorkspaceId,
730
+ @body request: RunnerMcpEvaluationComparisonRequest,
731
+ ):
732
+ | RunnerMcpEvaluationRunComparison
733
+ | ValidationError
734
+ | UnauthorizedError
735
+ | ForbiddenError
736
+ | NotFoundError
737
+ | ConflictError
738
+ | ServiceUnavailableError
739
+ | InternalServerError;
740
+
741
+ @post
742
+ @route("/{evaluationRunId}/export")
743
+ export(
744
+ @path workspaceId: RunnerMcpWorkspaceId,
745
+ @path evaluationRunId: RunnerMcpEvaluationRunId,
746
+ @body request: RunnerMcpEvaluationExportRequest,
747
+ ):
748
+ | RunnerMcpEvaluationExportAccepted
749
+ | ValidationError
750
+ | UnauthorizedError
751
+ | ForbiddenError
752
+ | NotFoundError
753
+ | ConflictError
754
+ | ServiceUnavailableError
755
+ | InternalServerError;
756
+
757
+ @get
758
+ @route("/{evaluationRunId}/exports/{exportId}")
759
+ getExport(
760
+ @path workspaceId: RunnerMcpWorkspaceId,
761
+ @path evaluationRunId: RunnerMcpEvaluationRunId,
762
+ @path exportId: RunnerMcpEvaluationExportId,
763
+ ):
764
+ | RunnerMcpEvaluationExport
765
+ | UnauthorizedError
766
+ | ForbiddenError
767
+ | NotFoundError
768
+ | ServiceUnavailableError
769
+ | InternalServerError;
770
+
771
+ @get
772
+ @route("/{evaluationRunId}/exports/{exportId}/content")
773
+ getExportContent(
774
+ @path workspaceId: RunnerMcpWorkspaceId,
775
+ @path evaluationRunId: RunnerMcpEvaluationRunId,
776
+ @path exportId: RunnerMcpEvaluationExportId,
777
+ ):
778
+ | RunnerMcpEvaluationExportArtifact
779
+ | UnauthorizedError
780
+ | ForbiddenError
781
+ | NotFoundError
782
+ | ConflictError
783
+ | ServiceUnavailableError
784
+ | InternalServerError;
105
785
  }
106
786
  }