@ancplua/qyl-api-schema 0.5.3 → 0.5.4
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 +9 -6
- package/generated/openapi/qyl.openapi.json +234 -0
- package/package.json +3 -2
package/api/runner.tsp
CHANGED
|
@@ -28,35 +28,35 @@ namespace Qyl.Api.Contracts.Runner {
|
|
|
28
28
|
@tag("Runner resources")
|
|
29
29
|
interface RunnerResourcesApi {
|
|
30
30
|
@get
|
|
31
|
-
snapshot(): RunnerResourceState[] | InternalServerError;
|
|
31
|
+
snapshot(): RunnerResourceState[] | ForbiddenError | InternalServerError;
|
|
32
32
|
|
|
33
33
|
@get
|
|
34
34
|
@route("/stream")
|
|
35
|
-
stream(): SSEStream<RunnerResourceEvents> | InternalServerError;
|
|
35
|
+
stream(): SSEStream<RunnerResourceEvents> | ForbiddenError | InternalServerError;
|
|
36
36
|
|
|
37
37
|
@get
|
|
38
38
|
@route("/{resource}/logs")
|
|
39
39
|
logs(
|
|
40
40
|
@path resource: string,
|
|
41
|
-
): RunnerLogLine[] | NotFoundError | InternalServerError;
|
|
41
|
+
): RunnerLogLine[] | ForbiddenError | NotFoundError | InternalServerError;
|
|
42
42
|
|
|
43
43
|
@get
|
|
44
44
|
@route("/{resource}/logs/stream")
|
|
45
45
|
streamLogs(
|
|
46
46
|
@path resource: string,
|
|
47
|
-
): SSEStream<RunnerLogEvents> | NotFoundError | InternalServerError;
|
|
47
|
+
): SSEStream<RunnerLogEvents> | ForbiddenError | NotFoundError | InternalServerError;
|
|
48
48
|
|
|
49
49
|
@post
|
|
50
50
|
@route("/{resource}/restart")
|
|
51
51
|
restart(
|
|
52
52
|
@path resource: string,
|
|
53
|
-
): RunnerActionAccepted | NotFoundError | ConflictError | InternalServerError;
|
|
53
|
+
): RunnerActionAccepted | ForbiddenError | NotFoundError | ConflictError | InternalServerError;
|
|
54
54
|
|
|
55
55
|
@post
|
|
56
56
|
@route("/{resource}/stop")
|
|
57
57
|
stop(
|
|
58
58
|
@path resource: string,
|
|
59
|
-
): RunnerActionAccepted | NotFoundError | ConflictError | InternalServerError;
|
|
59
|
+
): RunnerActionAccepted | ForbiddenError | NotFoundError | ConflictError | InternalServerError;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
@route("/runner/mcp/{resource}")
|
|
@@ -67,6 +67,7 @@ namespace Qyl.Api.Contracts.Runner {
|
|
|
67
67
|
listTools(
|
|
68
68
|
@path resource: string,
|
|
69
69
|
): RunnerMcpToolsResponse
|
|
70
|
+
| ForbiddenError
|
|
70
71
|
| NotFoundError
|
|
71
72
|
| ConflictError
|
|
72
73
|
| BadGatewayError
|
|
@@ -79,6 +80,7 @@ namespace Qyl.Api.Contracts.Runner {
|
|
|
79
80
|
@body request: RunnerMcpToolCallRequest,
|
|
80
81
|
): RunnerMcpToolCallResponse
|
|
81
82
|
| ValidationError
|
|
83
|
+
| ForbiddenError
|
|
82
84
|
| NotFoundError
|
|
83
85
|
| ConflictError
|
|
84
86
|
| BadGatewayError
|
|
@@ -91,6 +93,7 @@ namespace Qyl.Api.Contracts.Runner {
|
|
|
91
93
|
@body request: RunnerMcpResourceReadRequest,
|
|
92
94
|
): RunnerMcpResourceReadResponse
|
|
93
95
|
| ValidationError
|
|
96
|
+
| ForbiddenError
|
|
94
97
|
| NotFoundError
|
|
95
98
|
| ConflictError
|
|
96
99
|
| BadGatewayError
|
|
@@ -2096,6 +2096,32 @@
|
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
2098
|
},
|
|
2099
|
+
"403": {
|
|
2100
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
2101
|
+
"headers": {
|
|
2102
|
+
"X-Trace-Id": {
|
|
2103
|
+
"required": false,
|
|
2104
|
+
"description": "Trace ID for correlation",
|
|
2105
|
+
"schema": {
|
|
2106
|
+
"type": "string"
|
|
2107
|
+
}
|
|
2108
|
+
},
|
|
2109
|
+
"X-Request-Id": {
|
|
2110
|
+
"required": false,
|
|
2111
|
+
"description": "Request ID for support",
|
|
2112
|
+
"schema": {
|
|
2113
|
+
"type": "string"
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
},
|
|
2117
|
+
"content": {
|
|
2118
|
+
"application/problem+json": {
|
|
2119
|
+
"schema": {
|
|
2120
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
},
|
|
2099
2125
|
"404": {
|
|
2100
2126
|
"description": "Resource not found (404)",
|
|
2101
2127
|
"headers": {
|
|
@@ -2240,6 +2266,32 @@
|
|
|
2240
2266
|
}
|
|
2241
2267
|
}
|
|
2242
2268
|
},
|
|
2269
|
+
"403": {
|
|
2270
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
2271
|
+
"headers": {
|
|
2272
|
+
"X-Trace-Id": {
|
|
2273
|
+
"required": false,
|
|
2274
|
+
"description": "Trace ID for correlation",
|
|
2275
|
+
"schema": {
|
|
2276
|
+
"type": "string"
|
|
2277
|
+
}
|
|
2278
|
+
},
|
|
2279
|
+
"X-Request-Id": {
|
|
2280
|
+
"required": false,
|
|
2281
|
+
"description": "Request ID for support",
|
|
2282
|
+
"schema": {
|
|
2283
|
+
"type": "string"
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
},
|
|
2287
|
+
"content": {
|
|
2288
|
+
"application/problem+json": {
|
|
2289
|
+
"schema": {
|
|
2290
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
2291
|
+
}
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2243
2295
|
"404": {
|
|
2244
2296
|
"description": "Resource not found (404)",
|
|
2245
2297
|
"headers": {
|
|
@@ -2400,6 +2452,32 @@
|
|
|
2400
2452
|
}
|
|
2401
2453
|
}
|
|
2402
2454
|
},
|
|
2455
|
+
"403": {
|
|
2456
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
2457
|
+
"headers": {
|
|
2458
|
+
"X-Trace-Id": {
|
|
2459
|
+
"required": false,
|
|
2460
|
+
"description": "Trace ID for correlation",
|
|
2461
|
+
"schema": {
|
|
2462
|
+
"type": "string"
|
|
2463
|
+
}
|
|
2464
|
+
},
|
|
2465
|
+
"X-Request-Id": {
|
|
2466
|
+
"required": false,
|
|
2467
|
+
"description": "Request ID for support",
|
|
2468
|
+
"schema": {
|
|
2469
|
+
"type": "string"
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
},
|
|
2473
|
+
"content": {
|
|
2474
|
+
"application/problem+json": {
|
|
2475
|
+
"schema": {
|
|
2476
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
}
|
|
2480
|
+
},
|
|
2403
2481
|
"404": {
|
|
2404
2482
|
"description": "Resource not found (404)",
|
|
2405
2483
|
"headers": {
|
|
@@ -2538,6 +2616,32 @@
|
|
|
2538
2616
|
}
|
|
2539
2617
|
}
|
|
2540
2618
|
},
|
|
2619
|
+
"403": {
|
|
2620
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
2621
|
+
"headers": {
|
|
2622
|
+
"X-Trace-Id": {
|
|
2623
|
+
"required": false,
|
|
2624
|
+
"description": "Trace ID for correlation",
|
|
2625
|
+
"schema": {
|
|
2626
|
+
"type": "string"
|
|
2627
|
+
}
|
|
2628
|
+
},
|
|
2629
|
+
"X-Request-Id": {
|
|
2630
|
+
"required": false,
|
|
2631
|
+
"description": "Request ID for support",
|
|
2632
|
+
"schema": {
|
|
2633
|
+
"type": "string"
|
|
2634
|
+
}
|
|
2635
|
+
}
|
|
2636
|
+
},
|
|
2637
|
+
"content": {
|
|
2638
|
+
"application/problem+json": {
|
|
2639
|
+
"schema": {
|
|
2640
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
},
|
|
2541
2645
|
"500": {
|
|
2542
2646
|
"description": "Internal server error (500)",
|
|
2543
2647
|
"headers": {
|
|
@@ -2611,6 +2715,32 @@
|
|
|
2611
2715
|
}
|
|
2612
2716
|
}
|
|
2613
2717
|
},
|
|
2718
|
+
"403": {
|
|
2719
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
2720
|
+
"headers": {
|
|
2721
|
+
"X-Trace-Id": {
|
|
2722
|
+
"required": false,
|
|
2723
|
+
"description": "Trace ID for correlation",
|
|
2724
|
+
"schema": {
|
|
2725
|
+
"type": "string"
|
|
2726
|
+
}
|
|
2727
|
+
},
|
|
2728
|
+
"X-Request-Id": {
|
|
2729
|
+
"required": false,
|
|
2730
|
+
"description": "Request ID for support",
|
|
2731
|
+
"schema": {
|
|
2732
|
+
"type": "string"
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
},
|
|
2736
|
+
"content": {
|
|
2737
|
+
"application/problem+json": {
|
|
2738
|
+
"schema": {
|
|
2739
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
},
|
|
2614
2744
|
"500": {
|
|
2615
2745
|
"description": "Internal server error (500)",
|
|
2616
2746
|
"headers": {
|
|
@@ -2670,6 +2800,32 @@
|
|
|
2670
2800
|
}
|
|
2671
2801
|
}
|
|
2672
2802
|
},
|
|
2803
|
+
"403": {
|
|
2804
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
2805
|
+
"headers": {
|
|
2806
|
+
"X-Trace-Id": {
|
|
2807
|
+
"required": false,
|
|
2808
|
+
"description": "Trace ID for correlation",
|
|
2809
|
+
"schema": {
|
|
2810
|
+
"type": "string"
|
|
2811
|
+
}
|
|
2812
|
+
},
|
|
2813
|
+
"X-Request-Id": {
|
|
2814
|
+
"required": false,
|
|
2815
|
+
"description": "Request ID for support",
|
|
2816
|
+
"schema": {
|
|
2817
|
+
"type": "string"
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
"content": {
|
|
2822
|
+
"application/problem+json": {
|
|
2823
|
+
"schema": {
|
|
2824
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
}
|
|
2828
|
+
},
|
|
2673
2829
|
"404": {
|
|
2674
2830
|
"description": "Resource not found (404)",
|
|
2675
2831
|
"headers": {
|
|
@@ -2778,6 +2934,32 @@
|
|
|
2778
2934
|
}
|
|
2779
2935
|
}
|
|
2780
2936
|
},
|
|
2937
|
+
"403": {
|
|
2938
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
2939
|
+
"headers": {
|
|
2940
|
+
"X-Trace-Id": {
|
|
2941
|
+
"required": false,
|
|
2942
|
+
"description": "Trace ID for correlation",
|
|
2943
|
+
"schema": {
|
|
2944
|
+
"type": "string"
|
|
2945
|
+
}
|
|
2946
|
+
},
|
|
2947
|
+
"X-Request-Id": {
|
|
2948
|
+
"required": false,
|
|
2949
|
+
"description": "Request ID for support",
|
|
2950
|
+
"schema": {
|
|
2951
|
+
"type": "string"
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
},
|
|
2955
|
+
"content": {
|
|
2956
|
+
"application/problem+json": {
|
|
2957
|
+
"schema": {
|
|
2958
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
}
|
|
2962
|
+
},
|
|
2781
2963
|
"404": {
|
|
2782
2964
|
"description": "Resource not found (404)",
|
|
2783
2965
|
"headers": {
|
|
@@ -2853,6 +3035,32 @@
|
|
|
2853
3035
|
"202": {
|
|
2854
3036
|
"description": "A runner lifecycle action was accepted and continues asynchronously."
|
|
2855
3037
|
},
|
|
3038
|
+
"403": {
|
|
3039
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
3040
|
+
"headers": {
|
|
3041
|
+
"X-Trace-Id": {
|
|
3042
|
+
"required": false,
|
|
3043
|
+
"description": "Trace ID for correlation",
|
|
3044
|
+
"schema": {
|
|
3045
|
+
"type": "string"
|
|
3046
|
+
}
|
|
3047
|
+
},
|
|
3048
|
+
"X-Request-Id": {
|
|
3049
|
+
"required": false,
|
|
3050
|
+
"description": "Request ID for support",
|
|
3051
|
+
"schema": {
|
|
3052
|
+
"type": "string"
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3056
|
+
"content": {
|
|
3057
|
+
"application/problem+json": {
|
|
3058
|
+
"schema": {
|
|
3059
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
2856
3064
|
"404": {
|
|
2857
3065
|
"description": "Resource not found (404)",
|
|
2858
3066
|
"headers": {
|
|
@@ -2954,6 +3162,32 @@
|
|
|
2954
3162
|
"202": {
|
|
2955
3163
|
"description": "A runner lifecycle action was accepted and continues asynchronously."
|
|
2956
3164
|
},
|
|
3165
|
+
"403": {
|
|
3166
|
+
"description": "Forbidden - insufficient permissions (403)",
|
|
3167
|
+
"headers": {
|
|
3168
|
+
"X-Trace-Id": {
|
|
3169
|
+
"required": false,
|
|
3170
|
+
"description": "Trace ID for correlation",
|
|
3171
|
+
"schema": {
|
|
3172
|
+
"type": "string"
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3175
|
+
"X-Request-Id": {
|
|
3176
|
+
"required": false,
|
|
3177
|
+
"description": "Request ID for support",
|
|
3178
|
+
"schema": {
|
|
3179
|
+
"type": "string"
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
},
|
|
3183
|
+
"content": {
|
|
3184
|
+
"application/problem+json": {
|
|
3185
|
+
"schema": {
|
|
3186
|
+
"$ref": "#/components/schemas/Common.Errors.ForbiddenError"
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
},
|
|
2957
3191
|
"404": {
|
|
2958
3192
|
"description": "Resource not found (404)",
|
|
2959
3193
|
"headers": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ancplua/qyl-api-schema",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
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": {
|
|
@@ -88,7 +88,8 @@
|
|
|
88
88
|
"watch": "tsp compile main.tsp --watch",
|
|
89
89
|
"format": "tsp format **/*.tsp",
|
|
90
90
|
"lint": "npm run build:emitters && tsp compile main.tsp --no-emit --warn-as-error",
|
|
91
|
-
"lint:public": "tsp compile index.tsp --no-emit --warn-as-error"
|
|
91
|
+
"lint:public": "tsp compile index.tsp --no-emit --warn-as-error",
|
|
92
|
+
"verify:runner-security": "node scripts/verify-runner-security.mjs"
|
|
92
93
|
},
|
|
93
94
|
"peerDependencies": {
|
|
94
95
|
"@typespec/compiler": "^1.13.0 || >=1.13.0-dev.0",
|