@ancplua/qyl-api-schema 0.5.1 → 0.5.3

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
@@ -16,12 +16,12 @@ using Qyl.Api.Contracts.Runner.Mcp;
16
16
  namespace Qyl.Api.Contracts.Runner {
17
17
  @events
18
18
  union RunnerResourceEvents {
19
- RunnerResourceState,
19
+ message: RunnerResourceState,
20
20
  }
21
21
 
22
22
  @events
23
23
  union RunnerLogEvents {
24
- RunnerLogLine,
24
+ message: RunnerLogLine,
25
25
  }
26
26
 
27
27
  @route("/runner/resources")
package/common/errors.tsp CHANGED
@@ -17,6 +17,9 @@ namespace Qyl.Api.Contracts.Common.Errors;
17
17
  @doc("RFC 7807 Problem Details for HTTP APIs")
18
18
  @error
19
19
  model ProblemDetails {
20
+ @doc("RFC 7807 problem-details response media type")
21
+ @header contentType: "application/problem+json";
22
+
20
23
  @doc("A URI reference identifying the problem type")
21
24
  @encodedName("application/json", "type")
22
25
  problemType: url = "about:blank";
@@ -3513,10 +3513,35 @@
3513
3513
  "format": "int64",
3514
3514
  "minimum": 0
3515
3515
  },
3516
+ "icons": {
3517
+ "type": "array",
3518
+ "items": {
3519
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpIcon"
3520
+ }
3521
+ },
3516
3522
  "resource": {
3523
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpResourceContent"
3524
+ },
3525
+ "id": {
3526
+ "type": "string"
3527
+ },
3528
+ "input": {},
3529
+ "toolUseId": {
3530
+ "type": "string"
3531
+ },
3532
+ "content": {
3533
+ "type": "array",
3534
+ "items": {
3535
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpContent"
3536
+ }
3537
+ },
3538
+ "structuredContent": {
3517
3539
  "type": "object",
3518
3540
  "unevaluatedProperties": {}
3519
3541
  },
3542
+ "isError": {
3543
+ "type": "boolean"
3544
+ },
3520
3545
  "annotations": {
3521
3546
  "type": "object",
3522
3547
  "unevaluatedProperties": {}
@@ -3526,7 +3551,31 @@
3526
3551
  "unevaluatedProperties": {}
3527
3552
  }
3528
3553
  },
3529
- "description": "One MCP content item projected onto a stable qyl JSON shape."
3554
+ "description": "One MCP content item projected onto a stable qyl JSON shape. Variant-specific required fields follow its type discriminator."
3555
+ },
3556
+ "Runner.Mcp.RunnerMcpIcon": {
3557
+ "type": "object",
3558
+ "required": [
3559
+ "src"
3560
+ ],
3561
+ "properties": {
3562
+ "src": {
3563
+ "type": "string"
3564
+ },
3565
+ "mimeType": {
3566
+ "type": "string"
3567
+ },
3568
+ "sizes": {
3569
+ "type": "array",
3570
+ "items": {
3571
+ "type": "string"
3572
+ }
3573
+ },
3574
+ "theme": {
3575
+ "type": "string"
3576
+ }
3577
+ },
3578
+ "description": "Icon metadata carried by MCP tools and resource links."
3530
3579
  },
3531
3580
  "Runner.Mcp.RunnerMcpResourceContent": {
3532
3581
  "type": "object",
@@ -3563,6 +3612,10 @@
3563
3612
  "uri": {
3564
3613
  "type": "string",
3565
3614
  "format": "uri"
3615
+ },
3616
+ "_meta": {
3617
+ "type": "object",
3618
+ "unevaluatedProperties": {}
3566
3619
  }
3567
3620
  },
3568
3621
  "description": "Resource URI accepted by the runner's MCP projection."
@@ -3586,6 +3639,64 @@
3586
3639
  },
3587
3640
  "description": "Stable qyl projection of an MCP resources/read result."
3588
3641
  },
3642
+ "Runner.Mcp.RunnerMcpTask": {
3643
+ "type": "object",
3644
+ "required": [
3645
+ "taskId",
3646
+ "status",
3647
+ "createdAt",
3648
+ "lastUpdatedAt"
3649
+ ],
3650
+ "properties": {
3651
+ "taskId": {
3652
+ "type": "string"
3653
+ },
3654
+ "status": {
3655
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpTaskStatus"
3656
+ },
3657
+ "statusMessage": {
3658
+ "type": "string"
3659
+ },
3660
+ "createdAt": {
3661
+ "type": "string",
3662
+ "format": "date-time"
3663
+ },
3664
+ "lastUpdatedAt": {
3665
+ "type": "string",
3666
+ "format": "date-time"
3667
+ },
3668
+ "ttl": {
3669
+ "type": "number",
3670
+ "format": "double"
3671
+ },
3672
+ "pollInterval": {
3673
+ "type": "number",
3674
+ "format": "double"
3675
+ }
3676
+ },
3677
+ "description": "Task returned by an MCP task-augmented tool call. ttl and pollInterval are encoded as milliseconds."
3678
+ },
3679
+ "Runner.Mcp.RunnerMcpTaskMetadata": {
3680
+ "type": "object",
3681
+ "properties": {
3682
+ "ttl": {
3683
+ "type": "number",
3684
+ "format": "double"
3685
+ }
3686
+ },
3687
+ "description": "Task-augmentation metadata accepted on an MCP tool call. ttl is encoded as milliseconds."
3688
+ },
3689
+ "Runner.Mcp.RunnerMcpTaskStatus": {
3690
+ "type": "string",
3691
+ "enum": [
3692
+ "working",
3693
+ "input_required",
3694
+ "completed",
3695
+ "failed",
3696
+ "cancelled"
3697
+ ],
3698
+ "description": "Lifecycle state of an MCP task returned by a task-augmented tool call."
3699
+ },
3589
3700
  "Runner.Mcp.RunnerMcpTool": {
3590
3701
  "type": "object",
3591
3702
  "required": [
@@ -3614,6 +3725,15 @@
3614
3725
  "type": "object",
3615
3726
  "unevaluatedProperties": {}
3616
3727
  },
3728
+ "execution": {
3729
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpToolExecution"
3730
+ },
3731
+ "icons": {
3732
+ "type": "array",
3733
+ "items": {
3734
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpIcon"
3735
+ }
3736
+ },
3617
3737
  "_meta": {
3618
3738
  "type": "object",
3619
3739
  "unevaluatedProperties": {}
@@ -3633,6 +3753,13 @@
3633
3753
  "arguments": {
3634
3754
  "type": "object",
3635
3755
  "unevaluatedProperties": {}
3756
+ },
3757
+ "task": {
3758
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpTaskMetadata"
3759
+ },
3760
+ "_meta": {
3761
+ "type": "object",
3762
+ "unevaluatedProperties": {}
3636
3763
  }
3637
3764
  },
3638
3765
  "description": "Tool call accepted by the runner's MCP projection."
@@ -3657,6 +3784,9 @@
3657
3784
  "isError": {
3658
3785
  "type": "boolean"
3659
3786
  },
3787
+ "task": {
3788
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpTask"
3789
+ },
3660
3790
  "_meta": {
3661
3791
  "type": "object",
3662
3792
  "unevaluatedProperties": {}
@@ -3664,6 +3794,24 @@
3664
3794
  },
3665
3795
  "description": "Stable qyl projection of an MCP tool-call result."
3666
3796
  },
3797
+ "Runner.Mcp.RunnerMcpToolExecution": {
3798
+ "type": "object",
3799
+ "properties": {
3800
+ "taskSupport": {
3801
+ "$ref": "#/$defs/Runner.Mcp.RunnerMcpToolTaskSupport"
3802
+ }
3803
+ },
3804
+ "description": "Execution metadata advertised for an MCP tool."
3805
+ },
3806
+ "Runner.Mcp.RunnerMcpToolTaskSupport": {
3807
+ "type": "string",
3808
+ "enum": [
3809
+ "forbidden",
3810
+ "optional",
3811
+ "required"
3812
+ ],
3813
+ "description": "Task-augmentation support advertised for an MCP tool."
3814
+ },
3667
3815
  "Runner.Mcp.RunnerMcpToolsResponse": {
3668
3816
  "type": "object",
3669
3817
  "required": [
@@ -213,7 +213,7 @@
213
213
  }
214
214
  },
215
215
  "content": {
216
- "application/json": {
216
+ "application/problem+json": {
217
217
  "schema": {
218
218
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
219
219
  }
@@ -246,7 +246,7 @@
246
246
  }
247
247
  },
248
248
  "content": {
249
- "application/json": {
249
+ "application/problem+json": {
250
250
  "schema": {
251
251
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
252
252
  }
@@ -272,7 +272,7 @@
272
272
  }
273
273
  },
274
274
  "content": {
275
- "application/json": {
275
+ "application/problem+json": {
276
276
  "schema": {
277
277
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
278
278
  }
@@ -380,7 +380,7 @@
380
380
  }
381
381
  },
382
382
  "content": {
383
- "application/json": {
383
+ "application/problem+json": {
384
384
  "schema": {
385
385
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
386
386
  }
@@ -413,7 +413,7 @@
413
413
  }
414
414
  },
415
415
  "content": {
416
- "application/json": {
416
+ "application/problem+json": {
417
417
  "schema": {
418
418
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
419
419
  }
@@ -439,7 +439,7 @@
439
439
  }
440
440
  },
441
441
  "content": {
442
- "application/json": {
442
+ "application/problem+json": {
443
443
  "schema": {
444
444
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
445
445
  }
@@ -519,7 +519,7 @@
519
519
  }
520
520
  },
521
521
  "content": {
522
- "application/json": {
522
+ "application/problem+json": {
523
523
  "schema": {
524
524
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
525
525
  }
@@ -552,7 +552,7 @@
552
552
  }
553
553
  },
554
554
  "content": {
555
- "application/json": {
555
+ "application/problem+json": {
556
556
  "schema": {
557
557
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
558
558
  }
@@ -578,7 +578,7 @@
578
578
  }
579
579
  },
580
580
  "content": {
581
- "application/json": {
581
+ "application/problem+json": {
582
582
  "schema": {
583
583
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
584
584
  }
@@ -658,7 +658,7 @@
658
658
  }
659
659
  },
660
660
  "content": {
661
- "application/json": {
661
+ "application/problem+json": {
662
662
  "schema": {
663
663
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
664
664
  }
@@ -691,7 +691,7 @@
691
691
  }
692
692
  },
693
693
  "content": {
694
- "application/json": {
694
+ "application/problem+json": {
695
695
  "schema": {
696
696
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
697
697
  }
@@ -717,7 +717,7 @@
717
717
  }
718
718
  },
719
719
  "content": {
720
- "application/json": {
720
+ "application/problem+json": {
721
721
  "schema": {
722
722
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
723
723
  }
@@ -788,7 +788,7 @@
788
788
  }
789
789
  },
790
790
  "content": {
791
- "application/json": {
791
+ "application/problem+json": {
792
792
  "schema": {
793
793
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
794
794
  }
@@ -814,7 +814,7 @@
814
814
  }
815
815
  },
816
816
  "content": {
817
- "application/json": {
817
+ "application/problem+json": {
818
818
  "schema": {
819
819
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
820
820
  }
@@ -840,7 +840,7 @@
840
840
  }
841
841
  },
842
842
  "content": {
843
- "application/json": {
843
+ "application/problem+json": {
844
844
  "schema": {
845
845
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
846
846
  }
@@ -973,7 +973,7 @@
973
973
  }
974
974
  },
975
975
  "content": {
976
- "application/json": {
976
+ "application/problem+json": {
977
977
  "schema": {
978
978
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
979
979
  }
@@ -1006,7 +1006,7 @@
1006
1006
  }
1007
1007
  },
1008
1008
  "content": {
1009
- "application/json": {
1009
+ "application/problem+json": {
1010
1010
  "schema": {
1011
1011
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1012
1012
  }
@@ -1032,7 +1032,7 @@
1032
1032
  }
1033
1033
  },
1034
1034
  "content": {
1035
- "application/json": {
1035
+ "application/problem+json": {
1036
1036
  "schema": {
1037
1037
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
1038
1038
  }
@@ -1115,7 +1115,7 @@
1115
1115
  }
1116
1116
  },
1117
1117
  "content": {
1118
- "application/json": {
1118
+ "application/problem+json": {
1119
1119
  "schema": {
1120
1120
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1121
1121
  }
@@ -1141,7 +1141,7 @@
1141
1141
  }
1142
1142
  },
1143
1143
  "content": {
1144
- "application/json": {
1144
+ "application/problem+json": {
1145
1145
  "schema": {
1146
1146
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
1147
1147
  }
@@ -1212,7 +1212,7 @@
1212
1212
  }
1213
1213
  },
1214
1214
  "content": {
1215
- "application/json": {
1215
+ "application/problem+json": {
1216
1216
  "schema": {
1217
1217
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1218
1218
  }
@@ -1238,7 +1238,7 @@
1238
1238
  }
1239
1239
  },
1240
1240
  "content": {
1241
- "application/json": {
1241
+ "application/problem+json": {
1242
1242
  "schema": {
1243
1243
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
1244
1244
  }
@@ -1264,7 +1264,7 @@
1264
1264
  }
1265
1265
  },
1266
1266
  "content": {
1267
- "application/json": {
1267
+ "application/problem+json": {
1268
1268
  "schema": {
1269
1269
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
1270
1270
  }
@@ -1361,7 +1361,7 @@
1361
1361
  }
1362
1362
  },
1363
1363
  "content": {
1364
- "application/json": {
1364
+ "application/problem+json": {
1365
1365
  "schema": {
1366
1366
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1367
1367
  }
@@ -1387,7 +1387,7 @@
1387
1387
  }
1388
1388
  },
1389
1389
  "content": {
1390
- "application/json": {
1390
+ "application/problem+json": {
1391
1391
  "schema": {
1392
1392
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
1393
1393
  }
@@ -1413,7 +1413,7 @@
1413
1413
  }
1414
1414
  },
1415
1415
  "content": {
1416
- "application/json": {
1416
+ "application/problem+json": {
1417
1417
  "schema": {
1418
1418
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
1419
1419
  }
@@ -1545,7 +1545,7 @@
1545
1545
  }
1546
1546
  },
1547
1547
  "content": {
1548
- "application/json": {
1548
+ "application/problem+json": {
1549
1549
  "schema": {
1550
1550
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1551
1551
  }
@@ -1571,7 +1571,7 @@
1571
1571
  }
1572
1572
  },
1573
1573
  "content": {
1574
- "application/json": {
1574
+ "application/problem+json": {
1575
1575
  "schema": {
1576
1576
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
1577
1577
  }
@@ -1666,7 +1666,7 @@
1666
1666
  }
1667
1667
  },
1668
1668
  "content": {
1669
- "application/json": {
1669
+ "application/problem+json": {
1670
1670
  "schema": {
1671
1671
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
1672
1672
  }
@@ -1699,7 +1699,7 @@
1699
1699
  }
1700
1700
  },
1701
1701
  "content": {
1702
- "application/json": {
1702
+ "application/problem+json": {
1703
1703
  "schema": {
1704
1704
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1705
1705
  }
@@ -1725,7 +1725,7 @@
1725
1725
  }
1726
1726
  },
1727
1727
  "content": {
1728
- "application/json": {
1728
+ "application/problem+json": {
1729
1729
  "schema": {
1730
1730
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
1731
1731
  }
@@ -1796,7 +1796,7 @@
1796
1796
  }
1797
1797
  },
1798
1798
  "content": {
1799
- "application/json": {
1799
+ "application/problem+json": {
1800
1800
  "schema": {
1801
1801
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1802
1802
  }
@@ -1822,7 +1822,7 @@
1822
1822
  }
1823
1823
  },
1824
1824
  "content": {
1825
- "application/json": {
1825
+ "application/problem+json": {
1826
1826
  "schema": {
1827
1827
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
1828
1828
  }
@@ -1848,7 +1848,7 @@
1848
1848
  }
1849
1849
  },
1850
1850
  "content": {
1851
- "application/json": {
1851
+ "application/problem+json": {
1852
1852
  "schema": {
1853
1853
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
1854
1854
  }
@@ -1945,7 +1945,7 @@
1945
1945
  }
1946
1946
  },
1947
1947
  "content": {
1948
- "application/json": {
1948
+ "application/problem+json": {
1949
1949
  "schema": {
1950
1950
  "$ref": "#/components/schemas/Common.Errors.UnauthorizedError"
1951
1951
  }
@@ -1971,7 +1971,7 @@
1971
1971
  }
1972
1972
  },
1973
1973
  "content": {
1974
- "application/json": {
1974
+ "application/problem+json": {
1975
1975
  "schema": {
1976
1976
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
1977
1977
  }
@@ -1997,7 +1997,7 @@
1997
1997
  }
1998
1998
  },
1999
1999
  "content": {
2000
- "application/json": {
2000
+ "application/problem+json": {
2001
2001
  "schema": {
2002
2002
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2003
2003
  }
@@ -2089,7 +2089,7 @@
2089
2089
  }
2090
2090
  },
2091
2091
  "content": {
2092
- "application/json": {
2092
+ "application/problem+json": {
2093
2093
  "schema": {
2094
2094
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
2095
2095
  }
@@ -2115,7 +2115,7 @@
2115
2115
  }
2116
2116
  },
2117
2117
  "content": {
2118
- "application/json": {
2118
+ "application/problem+json": {
2119
2119
  "schema": {
2120
2120
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
2121
2121
  }
@@ -2141,7 +2141,7 @@
2141
2141
  }
2142
2142
  },
2143
2143
  "content": {
2144
- "application/json": {
2144
+ "application/problem+json": {
2145
2145
  "schema": {
2146
2146
  "$ref": "#/components/schemas/Common.Errors.ConflictError"
2147
2147
  }
@@ -2167,7 +2167,7 @@
2167
2167
  }
2168
2168
  },
2169
2169
  "content": {
2170
- "application/json": {
2170
+ "application/problem+json": {
2171
2171
  "schema": {
2172
2172
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2173
2173
  }
@@ -2193,7 +2193,7 @@
2193
2193
  }
2194
2194
  },
2195
2195
  "content": {
2196
- "application/json": {
2196
+ "application/problem+json": {
2197
2197
  "schema": {
2198
2198
  "$ref": "#/components/schemas/Common.Errors.BadGatewayError"
2199
2199
  }
@@ -2259,7 +2259,7 @@
2259
2259
  }
2260
2260
  },
2261
2261
  "content": {
2262
- "application/json": {
2262
+ "application/problem+json": {
2263
2263
  "schema": {
2264
2264
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
2265
2265
  }
@@ -2285,7 +2285,7 @@
2285
2285
  }
2286
2286
  },
2287
2287
  "content": {
2288
- "application/json": {
2288
+ "application/problem+json": {
2289
2289
  "schema": {
2290
2290
  "$ref": "#/components/schemas/Common.Errors.ConflictError"
2291
2291
  }
@@ -2311,7 +2311,7 @@
2311
2311
  }
2312
2312
  },
2313
2313
  "content": {
2314
- "application/json": {
2314
+ "application/problem+json": {
2315
2315
  "schema": {
2316
2316
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2317
2317
  }
@@ -2337,7 +2337,7 @@
2337
2337
  }
2338
2338
  },
2339
2339
  "content": {
2340
- "application/json": {
2340
+ "application/problem+json": {
2341
2341
  "schema": {
2342
2342
  "$ref": "#/components/schemas/Common.Errors.BadGatewayError"
2343
2343
  }
@@ -2393,7 +2393,7 @@
2393
2393
  }
2394
2394
  },
2395
2395
  "content": {
2396
- "application/json": {
2396
+ "application/problem+json": {
2397
2397
  "schema": {
2398
2398
  "$ref": "#/components/schemas/Common.Errors.ValidationError"
2399
2399
  }
@@ -2419,7 +2419,7 @@
2419
2419
  }
2420
2420
  },
2421
2421
  "content": {
2422
- "application/json": {
2422
+ "application/problem+json": {
2423
2423
  "schema": {
2424
2424
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
2425
2425
  }
@@ -2445,7 +2445,7 @@
2445
2445
  }
2446
2446
  },
2447
2447
  "content": {
2448
- "application/json": {
2448
+ "application/problem+json": {
2449
2449
  "schema": {
2450
2450
  "$ref": "#/components/schemas/Common.Errors.ConflictError"
2451
2451
  }
@@ -2471,7 +2471,7 @@
2471
2471
  }
2472
2472
  },
2473
2473
  "content": {
2474
- "application/json": {
2474
+ "application/problem+json": {
2475
2475
  "schema": {
2476
2476
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2477
2477
  }
@@ -2497,7 +2497,7 @@
2497
2497
  }
2498
2498
  },
2499
2499
  "content": {
2500
- "application/json": {
2500
+ "application/problem+json": {
2501
2501
  "schema": {
2502
2502
  "$ref": "#/components/schemas/Common.Errors.BadGatewayError"
2503
2503
  }
@@ -2557,7 +2557,7 @@
2557
2557
  }
2558
2558
  },
2559
2559
  "content": {
2560
- "application/json": {
2560
+ "application/problem+json": {
2561
2561
  "schema": {
2562
2562
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2563
2563
  }
@@ -2600,6 +2600,9 @@
2600
2600
  "contentSchema": {
2601
2601
  "$ref": "#/components/schemas/Runner.RunnerResourceState"
2602
2602
  }
2603
+ },
2604
+ "event": {
2605
+ "const": "message"
2603
2606
  }
2604
2607
  }
2605
2608
  }
@@ -2627,7 +2630,7 @@
2627
2630
  }
2628
2631
  },
2629
2632
  "content": {
2630
- "application/json": {
2633
+ "application/problem+json": {
2631
2634
  "schema": {
2632
2635
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2633
2636
  }
@@ -2686,7 +2689,7 @@
2686
2689
  }
2687
2690
  },
2688
2691
  "content": {
2689
- "application/json": {
2692
+ "application/problem+json": {
2690
2693
  "schema": {
2691
2694
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
2692
2695
  }
@@ -2712,7 +2715,7 @@
2712
2715
  }
2713
2716
  },
2714
2717
  "content": {
2715
- "application/json": {
2718
+ "application/problem+json": {
2716
2719
  "schema": {
2717
2720
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2718
2721
  }
@@ -2764,6 +2767,9 @@
2764
2767
  "contentSchema": {
2765
2768
  "$ref": "#/components/schemas/Runner.RunnerLogLine"
2766
2769
  }
2770
+ },
2771
+ "event": {
2772
+ "const": "message"
2767
2773
  }
2768
2774
  }
2769
2775
  }
@@ -2791,7 +2797,7 @@
2791
2797
  }
2792
2798
  },
2793
2799
  "content": {
2794
- "application/json": {
2800
+ "application/problem+json": {
2795
2801
  "schema": {
2796
2802
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
2797
2803
  }
@@ -2817,7 +2823,7 @@
2817
2823
  }
2818
2824
  },
2819
2825
  "content": {
2820
- "application/json": {
2826
+ "application/problem+json": {
2821
2827
  "schema": {
2822
2828
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2823
2829
  }
@@ -2866,7 +2872,7 @@
2866
2872
  }
2867
2873
  },
2868
2874
  "content": {
2869
- "application/json": {
2875
+ "application/problem+json": {
2870
2876
  "schema": {
2871
2877
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
2872
2878
  }
@@ -2892,7 +2898,7 @@
2892
2898
  }
2893
2899
  },
2894
2900
  "content": {
2895
- "application/json": {
2901
+ "application/problem+json": {
2896
2902
  "schema": {
2897
2903
  "$ref": "#/components/schemas/Common.Errors.ConflictError"
2898
2904
  }
@@ -2918,7 +2924,7 @@
2918
2924
  }
2919
2925
  },
2920
2926
  "content": {
2921
- "application/json": {
2927
+ "application/problem+json": {
2922
2928
  "schema": {
2923
2929
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
2924
2930
  }
@@ -2967,7 +2973,7 @@
2967
2973
  }
2968
2974
  },
2969
2975
  "content": {
2970
- "application/json": {
2976
+ "application/problem+json": {
2971
2977
  "schema": {
2972
2978
  "$ref": "#/components/schemas/Common.Errors.NotFoundError"
2973
2979
  }
@@ -2993,7 +2999,7 @@
2993
2999
  }
2994
3000
  },
2995
3001
  "content": {
2996
- "application/json": {
3002
+ "application/problem+json": {
2997
3003
  "schema": {
2998
3004
  "$ref": "#/components/schemas/Common.Errors.ConflictError"
2999
3005
  }
@@ -3019,7 +3025,7 @@
3019
3025
  }
3020
3026
  },
3021
3027
  "content": {
3022
- "application/json": {
3028
+ "application/problem+json": {
3023
3029
  "schema": {
3024
3030
  "$ref": "#/components/schemas/Common.Errors.InternalServerError"
3025
3031
  }
@@ -6556,10 +6562,35 @@
6556
6562
  "format": "int64",
6557
6563
  "minimum": 0
6558
6564
  },
6565
+ "icons": {
6566
+ "type": "array",
6567
+ "items": {
6568
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpIcon"
6569
+ }
6570
+ },
6559
6571
  "resource": {
6572
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpResourceContent"
6573
+ },
6574
+ "id": {
6575
+ "type": "string"
6576
+ },
6577
+ "input": {},
6578
+ "toolUseId": {
6579
+ "type": "string"
6580
+ },
6581
+ "content": {
6582
+ "type": "array",
6583
+ "items": {
6584
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpContent"
6585
+ }
6586
+ },
6587
+ "structuredContent": {
6560
6588
  "type": "object",
6561
6589
  "unevaluatedProperties": {}
6562
6590
  },
6591
+ "isError": {
6592
+ "type": "boolean"
6593
+ },
6563
6594
  "annotations": {
6564
6595
  "type": "object",
6565
6596
  "unevaluatedProperties": {}
@@ -6569,7 +6600,31 @@
6569
6600
  "unevaluatedProperties": {}
6570
6601
  }
6571
6602
  },
6572
- "description": "One MCP content item projected onto a stable qyl JSON shape."
6603
+ "description": "One MCP content item projected onto a stable qyl JSON shape. Variant-specific required fields follow its type discriminator."
6604
+ },
6605
+ "Runner.Mcp.RunnerMcpIcon": {
6606
+ "type": "object",
6607
+ "required": [
6608
+ "src"
6609
+ ],
6610
+ "properties": {
6611
+ "src": {
6612
+ "type": "string"
6613
+ },
6614
+ "mimeType": {
6615
+ "type": "string"
6616
+ },
6617
+ "sizes": {
6618
+ "type": "array",
6619
+ "items": {
6620
+ "type": "string"
6621
+ }
6622
+ },
6623
+ "theme": {
6624
+ "type": "string"
6625
+ }
6626
+ },
6627
+ "description": "Icon metadata carried by MCP tools and resource links."
6573
6628
  },
6574
6629
  "Runner.Mcp.RunnerMcpResourceContent": {
6575
6630
  "type": "object",
@@ -6606,6 +6661,10 @@
6606
6661
  "uri": {
6607
6662
  "type": "string",
6608
6663
  "format": "uri"
6664
+ },
6665
+ "_meta": {
6666
+ "type": "object",
6667
+ "unevaluatedProperties": {}
6609
6668
  }
6610
6669
  },
6611
6670
  "description": "Resource URI accepted by the runner's MCP projection."
@@ -6629,6 +6688,64 @@
6629
6688
  },
6630
6689
  "description": "Stable qyl projection of an MCP resources/read result."
6631
6690
  },
6691
+ "Runner.Mcp.RunnerMcpTask": {
6692
+ "type": "object",
6693
+ "required": [
6694
+ "taskId",
6695
+ "status",
6696
+ "createdAt",
6697
+ "lastUpdatedAt"
6698
+ ],
6699
+ "properties": {
6700
+ "taskId": {
6701
+ "type": "string"
6702
+ },
6703
+ "status": {
6704
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpTaskStatus"
6705
+ },
6706
+ "statusMessage": {
6707
+ "type": "string"
6708
+ },
6709
+ "createdAt": {
6710
+ "type": "string",
6711
+ "format": "date-time"
6712
+ },
6713
+ "lastUpdatedAt": {
6714
+ "type": "string",
6715
+ "format": "date-time"
6716
+ },
6717
+ "ttl": {
6718
+ "type": "number",
6719
+ "format": "double"
6720
+ },
6721
+ "pollInterval": {
6722
+ "type": "number",
6723
+ "format": "double"
6724
+ }
6725
+ },
6726
+ "description": "Task returned by an MCP task-augmented tool call. ttl and pollInterval are encoded as milliseconds."
6727
+ },
6728
+ "Runner.Mcp.RunnerMcpTaskMetadata": {
6729
+ "type": "object",
6730
+ "properties": {
6731
+ "ttl": {
6732
+ "type": "number",
6733
+ "format": "double"
6734
+ }
6735
+ },
6736
+ "description": "Task-augmentation metadata accepted on an MCP tool call. ttl is encoded as milliseconds."
6737
+ },
6738
+ "Runner.Mcp.RunnerMcpTaskStatus": {
6739
+ "type": "string",
6740
+ "enum": [
6741
+ "working",
6742
+ "input_required",
6743
+ "completed",
6744
+ "failed",
6745
+ "cancelled"
6746
+ ],
6747
+ "description": "Lifecycle state of an MCP task returned by a task-augmented tool call."
6748
+ },
6632
6749
  "Runner.Mcp.RunnerMcpTool": {
6633
6750
  "type": "object",
6634
6751
  "required": [
@@ -6657,6 +6774,15 @@
6657
6774
  "type": "object",
6658
6775
  "unevaluatedProperties": {}
6659
6776
  },
6777
+ "execution": {
6778
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpToolExecution"
6779
+ },
6780
+ "icons": {
6781
+ "type": "array",
6782
+ "items": {
6783
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpIcon"
6784
+ }
6785
+ },
6660
6786
  "_meta": {
6661
6787
  "type": "object",
6662
6788
  "unevaluatedProperties": {}
@@ -6676,6 +6802,13 @@
6676
6802
  "arguments": {
6677
6803
  "type": "object",
6678
6804
  "unevaluatedProperties": {}
6805
+ },
6806
+ "task": {
6807
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpTaskMetadata"
6808
+ },
6809
+ "_meta": {
6810
+ "type": "object",
6811
+ "unevaluatedProperties": {}
6679
6812
  }
6680
6813
  },
6681
6814
  "description": "Tool call accepted by the runner's MCP projection."
@@ -6700,6 +6833,9 @@
6700
6833
  "isError": {
6701
6834
  "type": "boolean"
6702
6835
  },
6836
+ "task": {
6837
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpTask"
6838
+ },
6703
6839
  "_meta": {
6704
6840
  "type": "object",
6705
6841
  "unevaluatedProperties": {}
@@ -6707,6 +6843,24 @@
6707
6843
  },
6708
6844
  "description": "Stable qyl projection of an MCP tool-call result."
6709
6845
  },
6846
+ "Runner.Mcp.RunnerMcpToolExecution": {
6847
+ "type": "object",
6848
+ "properties": {
6849
+ "taskSupport": {
6850
+ "$ref": "#/components/schemas/Runner.Mcp.RunnerMcpToolTaskSupport"
6851
+ }
6852
+ },
6853
+ "description": "Execution metadata advertised for an MCP tool."
6854
+ },
6855
+ "Runner.Mcp.RunnerMcpToolTaskSupport": {
6856
+ "type": "string",
6857
+ "enum": [
6858
+ "forbidden",
6859
+ "optional",
6860
+ "required"
6861
+ ],
6862
+ "description": "Task-augmentation support advertised for an MCP tool."
6863
+ },
6710
6864
  "Runner.Mcp.RunnerMcpToolsResponse": {
6711
6865
  "type": "object",
6712
6866
  "required": [
@@ -10,6 +10,8 @@ export type SessionId = string & {
10
10
  export type UserId = string & {
11
11
  readonly __brand: "UserId";
12
12
  };
13
+ export declare const ProblemDetailsMediaType: "application/problem+json";
14
+ export type ProblemDetailsMediaType = typeof ProblemDetailsMediaType;
13
15
  export declare const SortOrderValues: {
14
16
  readonly asc: "asc";
15
17
  readonly desc: "desc";
@@ -261,6 +263,20 @@ export declare const RunnerLogStreamValues: {
261
263
  readonly stderr: "err";
262
264
  };
263
265
  export type RunnerLogStream = typeof RunnerLogStreamValues[keyof typeof RunnerLogStreamValues];
266
+ export declare const RunnerMcpToolTaskSupportValues: {
267
+ readonly forbidden: "forbidden";
268
+ readonly optional: "optional";
269
+ readonly required: "required";
270
+ };
271
+ export type RunnerMcpToolTaskSupport = typeof RunnerMcpToolTaskSupportValues[keyof typeof RunnerMcpToolTaskSupportValues];
272
+ export declare const RunnerMcpTaskStatusValues: {
273
+ readonly working: "working";
274
+ readonly inputRequired: "input_required";
275
+ readonly completed: "completed";
276
+ readonly failed: "failed";
277
+ readonly cancelled: "cancelled";
278
+ };
279
+ export type RunnerMcpTaskStatus = typeof RunnerMcpTaskStatusValues[keyof typeof RunnerMcpTaskStatusValues];
264
280
  export declare const McpDataModeValues: {
265
281
  readonly live: "live";
266
282
  readonly demo: "demo";
@@ -695,6 +711,15 @@ export interface RunnerLogLine {
695
711
  "stream": RunnerLogStream;
696
712
  "line": string;
697
713
  }
714
+ export interface RunnerMcpIcon {
715
+ "src": string;
716
+ "mimeType"?: string;
717
+ "sizes"?: string[];
718
+ "theme"?: string;
719
+ }
720
+ export interface RunnerMcpToolExecution {
721
+ "taskSupport"?: RunnerMcpToolTaskSupport;
722
+ }
698
723
  export interface RunnerMcpTool {
699
724
  "name": string;
700
725
  "title"?: string;
@@ -702,6 +727,8 @@ export interface RunnerMcpTool {
702
727
  "inputSchema": Record<string, unknown>;
703
728
  "outputSchema"?: Record<string, unknown>;
704
729
  "annotations"?: Record<string, unknown>;
730
+ "execution"?: RunnerMcpToolExecution;
731
+ "icons"?: RunnerMcpIcon[];
705
732
  "_meta"?: Record<string, unknown>;
706
733
  }
707
734
  export interface RunnerMcpToolsResponse {
@@ -712,6 +739,11 @@ export interface RunnerMcpToolsResponse {
712
739
  export interface RunnerMcpToolCallRequest {
713
740
  "name": string;
714
741
  "arguments"?: Record<string, unknown>;
742
+ "task"?: RunnerMcpTaskMetadata;
743
+ "_meta"?: Record<string, unknown>;
744
+ }
745
+ export interface RunnerMcpTaskMetadata {
746
+ "ttl"?: number;
715
747
  }
716
748
  export interface RunnerMcpContent {
717
749
  "type": string;
@@ -723,24 +755,42 @@ export interface RunnerMcpContent {
723
755
  "title"?: string;
724
756
  "description"?: string;
725
757
  "size"?: number;
726
- "resource"?: Record<string, unknown>;
758
+ "icons"?: RunnerMcpIcon[];
759
+ "resource"?: RunnerMcpResourceContent;
760
+ "id"?: string;
761
+ "input"?: unknown;
762
+ "toolUseId"?: string;
763
+ "content"?: RunnerMcpContent[];
764
+ "structuredContent"?: Record<string, unknown>;
765
+ "isError"?: boolean;
727
766
  "annotations"?: Record<string, unknown>;
728
767
  "_meta"?: Record<string, unknown>;
729
768
  }
769
+ export interface RunnerMcpResourceContent {
770
+ "uri": string;
771
+ "mimeType"?: string;
772
+ "text"?: string;
773
+ "blob"?: string;
774
+ "_meta"?: Record<string, unknown>;
775
+ }
776
+ export interface RunnerMcpTask {
777
+ "taskId": string;
778
+ "status": RunnerMcpTaskStatus;
779
+ "statusMessage"?: string;
780
+ "createdAt": string;
781
+ "lastUpdatedAt": string;
782
+ "ttl"?: number;
783
+ "pollInterval"?: number;
784
+ }
730
785
  export interface RunnerMcpToolCallResponse {
731
786
  "content": RunnerMcpContent[];
732
787
  "structuredContent"?: Record<string, unknown>;
733
788
  "isError": boolean;
789
+ "task"?: RunnerMcpTask;
734
790
  "_meta"?: Record<string, unknown>;
735
791
  }
736
792
  export interface RunnerMcpResourceReadRequest {
737
793
  "uri": string;
738
- }
739
- export interface RunnerMcpResourceContent {
740
- "uri": string;
741
- "mimeType"?: string;
742
- "text"?: string;
743
- "blob"?: string;
744
794
  "_meta"?: Record<string, unknown>;
745
795
  }
746
796
  export interface RunnerMcpResourceReadResponse {
@@ -1,5 +1,6 @@
1
1
  // <auto-generated/>
2
2
  // Copyright (c) 2025-2026 ancplua
3
+ export const ProblemDetailsMediaType = "application/problem+json";
3
4
  export const SortOrderValues = {
4
5
  "asc": "asc",
5
6
  "desc": "desc",
@@ -225,6 +226,18 @@ export const RunnerLogStreamValues = {
225
226
  "stdout": "out",
226
227
  "stderr": "err",
227
228
  };
229
+ export const RunnerMcpToolTaskSupportValues = {
230
+ "forbidden": "forbidden",
231
+ "optional": "optional",
232
+ "required": "required",
233
+ };
234
+ export const RunnerMcpTaskStatusValues = {
235
+ "working": "working",
236
+ "inputRequired": "input_required",
237
+ "completed": "completed",
238
+ "failed": "failed",
239
+ "cancelled": "cancelled",
240
+ };
228
241
  export const McpDataModeValues = {
229
242
  "live": "live",
230
243
  "demo": "demo",
@@ -1,5 +1,25 @@
1
1
  namespace Qyl.Api.Contracts.Runner.Mcp;
2
2
 
3
+ @doc("Icon metadata carried by MCP tools and resource links.")
4
+ model RunnerMcpIcon {
5
+ src: string;
6
+ mimeType?: string;
7
+ sizes?: string[];
8
+ theme?: string;
9
+ }
10
+
11
+ @doc("Task-augmentation support advertised for an MCP tool.")
12
+ enum RunnerMcpToolTaskSupport {
13
+ forbidden: "forbidden",
14
+ optional: "optional",
15
+ required: "required",
16
+ }
17
+
18
+ @doc("Execution metadata advertised for an MCP tool.")
19
+ model RunnerMcpToolExecution {
20
+ taskSupport?: RunnerMcpToolTaskSupport;
21
+ }
22
+
3
23
  @doc("Stable qyl projection of an MCP tool advertised by a runner resource.")
4
24
  model RunnerMcpTool {
5
25
  name: string;
@@ -8,6 +28,8 @@ model RunnerMcpTool {
8
28
  inputSchema: Record<unknown>;
9
29
  outputSchema?: Record<unknown>;
10
30
  annotations?: Record<unknown>;
31
+ execution?: RunnerMcpToolExecution;
32
+ icons?: RunnerMcpIcon[];
11
33
  @encodedName("application/json", "_meta")
12
34
  metadata?: Record<unknown>;
13
35
  }
@@ -24,9 +46,17 @@ model RunnerMcpToolsResponse {
24
46
  model RunnerMcpToolCallRequest {
25
47
  name: string;
26
48
  arguments?: Record<unknown>;
49
+ task?: RunnerMcpTaskMetadata;
50
+ @encodedName("application/json", "_meta")
51
+ metadata?: Record<unknown>;
27
52
  }
28
53
 
29
- @doc("One MCP content item projected onto a stable qyl JSON shape.")
54
+ @doc("Task-augmentation metadata accepted on an MCP tool call. ttl is encoded as milliseconds.")
55
+ model RunnerMcpTaskMetadata {
56
+ ttl?: float64;
57
+ }
58
+
59
+ @doc("One MCP content item projected onto a stable qyl JSON shape. Variant-specific required fields follow its type discriminator.")
30
60
  model RunnerMcpContent {
31
61
  type: string;
32
62
  text?: string;
@@ -38,17 +68,45 @@ model RunnerMcpContent {
38
68
  description?: string;
39
69
  @minValue(0)
40
70
  size?: int64;
41
- resource?: Record<unknown>;
71
+ icons?: RunnerMcpIcon[];
72
+ resource?: RunnerMcpResourceContent;
73
+ id?: string;
74
+ input?: unknown;
75
+ toolUseId?: string;
76
+ content?: RunnerMcpContent[];
77
+ structuredContent?: Record<unknown>;
78
+ isError?: boolean;
42
79
  annotations?: Record<unknown>;
43
80
  @encodedName("application/json", "_meta")
44
81
  metadata?: Record<unknown>;
45
82
  }
46
83
 
84
+ @doc("Lifecycle state of an MCP task returned by a task-augmented tool call.")
85
+ enum RunnerMcpTaskStatus {
86
+ working: "working",
87
+ inputRequired: "input_required",
88
+ completed: "completed",
89
+ failed: "failed",
90
+ cancelled: "cancelled",
91
+ }
92
+
93
+ @doc("Task returned by an MCP task-augmented tool call. ttl and pollInterval are encoded as milliseconds.")
94
+ model RunnerMcpTask {
95
+ taskId: string;
96
+ status: RunnerMcpTaskStatus;
97
+ statusMessage?: string;
98
+ createdAt: utcDateTime;
99
+ lastUpdatedAt: utcDateTime;
100
+ ttl?: float64;
101
+ pollInterval?: float64;
102
+ }
103
+
47
104
  @doc("Stable qyl projection of an MCP tool-call result.")
48
105
  model RunnerMcpToolCallResponse {
49
106
  content: RunnerMcpContent[];
50
107
  structuredContent?: Record<unknown>;
51
108
  isError: boolean;
109
+ task?: RunnerMcpTask;
52
110
  @encodedName("application/json", "_meta")
53
111
  metadata?: Record<unknown>;
54
112
  }
@@ -56,6 +114,8 @@ model RunnerMcpToolCallResponse {
56
114
  @doc("Resource URI accepted by the runner's MCP projection.")
57
115
  model RunnerMcpResourceReadRequest {
58
116
  uri: url;
117
+ @encodedName("application/json", "_meta")
118
+ metadata?: Record<unknown>;
59
119
  }
60
120
 
61
121
  @doc("Text or base64 resource content returned by an MCP server. Exactly one of text or blob is present.")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancplua/qyl-api-schema",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "TypeSpec source of truth for qyl API contracts. Emits OpenAPI, JSON Schema, Qyl.Api.Contracts DTOs, and TypeScript contract types; not an OpenTelemetry package, storage schema, or server implementation.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {