@ancplua/qyl-api-schema 1.0.0 → 1.0.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/routes.tsp +0 -53
- package/api/runner.tsp +48 -0
- package/generated/json-schema/qyl-api-schema.json +65 -1950
- package/generated/openapi/qyl.openapi.json +3323 -4896
- package/generated/otel-keys.gen.tsp +1 -1
- package/generated/ts-runtime/api.d.ts +0 -432
- package/generated/ts-runtime/api.js +0 -144
- package/index.tsp +0 -1
- package/package.json +2 -3
- package/models/cost-etl-audit.tsp +0 -982
package/api/routes.tsp
CHANGED
|
@@ -10,7 +10,6 @@ import "../otel/metrics.tsp";
|
|
|
10
10
|
import "../otel/profiles.tsp";
|
|
11
11
|
import "../models/session.tsp";
|
|
12
12
|
import "../models/health.tsp";
|
|
13
|
-
import "../models/cost-etl-audit.tsp";
|
|
14
13
|
|
|
15
14
|
using TypeSpec.Http;
|
|
16
15
|
using TypeSpec.OpenAPI;
|
|
@@ -25,7 +24,6 @@ using Qyl.Api.Contracts.OTel.Enums;
|
|
|
25
24
|
using Qyl.Api.Contracts.OTel.Profiles;
|
|
26
25
|
using Qyl.Api.Contracts.Domains.Observe.Session;
|
|
27
26
|
using Qyl.Api.Contracts.Health;
|
|
28
|
-
using Qyl.Api.Contracts.Cost;
|
|
29
27
|
|
|
30
28
|
@service(#{ title: "qyl API" })
|
|
31
29
|
namespace Qyl.Api.Contracts;
|
|
@@ -248,57 +246,6 @@ interface SessionsApi {
|
|
|
248
246
|
): SessionStats | ValidationError | UnauthorizedError | InternalServerError;
|
|
249
247
|
}
|
|
250
248
|
|
|
251
|
-
// -----------------------------------------------------------------------------
|
|
252
|
-
// GenAI cost and ETL audit
|
|
253
|
-
// -----------------------------------------------------------------------------
|
|
254
|
-
|
|
255
|
-
@route("/api/v1/cost/etl-audit")
|
|
256
|
-
@tag("GenAI cost")
|
|
257
|
-
@useAuth(QylApiKeyHeaderAuth)
|
|
258
|
-
interface GenAiEtlAuditApi {
|
|
259
|
-
@get
|
|
260
|
-
report(
|
|
261
|
-
...ProjectScopeHeader,
|
|
262
|
-
|
|
263
|
-
@doc("Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
264
|
-
@query
|
|
265
|
-
startTime?: utcDateTime,
|
|
266
|
-
|
|
267
|
-
@doc("Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
268
|
-
@query
|
|
269
|
-
endTime?: utcDateTime,
|
|
270
|
-
|
|
271
|
-
@query
|
|
272
|
-
@minValue(1)
|
|
273
|
-
@maxValue(100)
|
|
274
|
-
limit?: int32 = 25,
|
|
275
|
-
):
|
|
276
|
-
| GenAiEtlAuditReport
|
|
277
|
-
| ValidationError
|
|
278
|
-
| UnauthorizedError
|
|
279
|
-
| InternalServerError;
|
|
280
|
-
|
|
281
|
-
@post
|
|
282
|
-
@route("/evaluate")
|
|
283
|
-
evaluate(
|
|
284
|
-
...ProjectScopeHeader,
|
|
285
|
-
|
|
286
|
-
@doc("Optional audit-period start. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
287
|
-
@query
|
|
288
|
-
startTime?: utcDateTime,
|
|
289
|
-
|
|
290
|
-
@doc("Optional audit-period end. Omitted dates select the previous 30 completed UTC days; an explicit range may not exceed 180 days.")
|
|
291
|
-
@query
|
|
292
|
-
endTime?: utcDateTime,
|
|
293
|
-
|
|
294
|
-
@body request: GenAiEtlAuditEvaluationRequest,
|
|
295
|
-
):
|
|
296
|
-
| GenAiEtlAuditEvaluationResponse
|
|
297
|
-
| ValidationError
|
|
298
|
-
| UnauthorizedError
|
|
299
|
-
| InternalServerError;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
249
|
// -----------------------------------------------------------------------------
|
|
303
250
|
// Health
|
|
304
251
|
// -----------------------------------------------------------------------------
|
package/api/runner.tsp
CHANGED
|
@@ -130,6 +130,54 @@ namespace Qyl.Api.Contracts.Runner {
|
|
|
130
130
|
| InternalServerError;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
@route("/runner/mcp/{resource}")
|
|
134
|
+
@tag("Runner MCP")
|
|
135
|
+
interface RunnerMcpApi {
|
|
136
|
+
@doc("Returns the MCP SDK-owned tools/list result without redefining its protocol body.")
|
|
137
|
+
@get
|
|
138
|
+
@route("/tools")
|
|
139
|
+
listTools(@path resource: string):
|
|
140
|
+
| unknown
|
|
141
|
+
| ForbiddenError
|
|
142
|
+
| NotFoundError
|
|
143
|
+
| ConflictError
|
|
144
|
+
| BadGatewayError
|
|
145
|
+
| ServiceUnavailableError
|
|
146
|
+
| InternalServerError;
|
|
147
|
+
|
|
148
|
+
@doc("Accepts and returns MCP SDK-owned tools/call bodies without redefining the protocol DTOs.")
|
|
149
|
+
@post
|
|
150
|
+
@route("/tools/call")
|
|
151
|
+
callTool(
|
|
152
|
+
@path resource: string,
|
|
153
|
+
@body request: unknown,
|
|
154
|
+
):
|
|
155
|
+
| unknown
|
|
156
|
+
| ValidationError
|
|
157
|
+
| ForbiddenError
|
|
158
|
+
| NotFoundError
|
|
159
|
+
| ConflictError
|
|
160
|
+
| BadGatewayError
|
|
161
|
+
| ServiceUnavailableError
|
|
162
|
+
| InternalServerError;
|
|
163
|
+
|
|
164
|
+
@doc("Accepts and returns MCP SDK-owned resources/read bodies without redefining the protocol DTOs.")
|
|
165
|
+
@post
|
|
166
|
+
@route("/resources/read")
|
|
167
|
+
readResource(
|
|
168
|
+
@path resource: string,
|
|
169
|
+
@body request: unknown,
|
|
170
|
+
):
|
|
171
|
+
| unknown
|
|
172
|
+
| ValidationError
|
|
173
|
+
| ForbiddenError
|
|
174
|
+
| NotFoundError
|
|
175
|
+
| ConflictError
|
|
176
|
+
| BadGatewayError
|
|
177
|
+
| ServiceUnavailableError
|
|
178
|
+
| InternalServerError;
|
|
179
|
+
}
|
|
180
|
+
|
|
133
181
|
@route("/runner/workspaces")
|
|
134
182
|
@tag("Runner workspaces")
|
|
135
183
|
@useAuth(RunnerMcpSessionCookieAuth)
|