@ancplua/qyl-api-schema 1.0.5 → 2.1.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/README.md +3 -0
- package/api/routes.tsp +19 -19
- package/api/runner.tsp +0 -703
- package/api/streaming.tsp +2 -2
- package/api/workbench.tsp +709 -0
- package/common/errors.tsp +2 -1
- package/common/pagination.tsp +8 -8
- package/generated/json-schema/qyl-api-schema.json +1435 -1446
- package/generated/openapi/qyl.openapi.json +1486 -1707
- package/generated/otel-keys.gen.tsp +93 -91
- package/generated/ts-runtime/api.d.ts +431 -431
- package/generated/ts-runtime/api.js +16 -16
- package/index.tsp +2 -1
- package/models/health.tsp +2 -0
- package/models/runner.tsp +4 -0
- package/models/session.tsp +9 -9
- package/models/workbench.tsp +1194 -0
- package/otel/resource.tsp +39 -39
- package/otel/span.tsp +6 -6
- package/package.json +12 -6
- package/models/runner-mcp.tsp +0 -1031
|
@@ -0,0 +1,1194 @@
|
|
|
1
|
+
import "@typespec/http";
|
|
2
|
+
import "@typespec/openapi3";
|
|
3
|
+
|
|
4
|
+
import "../common/types.tsp";
|
|
5
|
+
import "../otel/logs.tsp";
|
|
6
|
+
import "../otel/span.tsp";
|
|
7
|
+
|
|
8
|
+
using TypeSpec.Http;
|
|
9
|
+
using TypeSpec.OpenAPI;
|
|
10
|
+
using Qyl.Api.Contracts.Common;
|
|
11
|
+
using Qyl.Api.Contracts.OTel.Logs;
|
|
12
|
+
using Qyl.Api.Contracts.OTel.Traces;
|
|
13
|
+
|
|
14
|
+
namespace Qyl.Api.Contracts.Workbench;
|
|
15
|
+
|
|
16
|
+
@doc("""
|
|
17
|
+
Opaque identifier for one authenticated local workbench session.
|
|
18
|
+
|
|
19
|
+
Deliberately not Qyl.Api.Contracts.Common.SessionId, and not joinable with it.
|
|
20
|
+
A workbench session is a loopback browser session owned by the local runner: it
|
|
21
|
+
begins at cookie bootstrap, ends at logout or expiry, and never leaves the
|
|
22
|
+
machine. A Common.SessionId is an OTel telemetry session observed in ingested
|
|
23
|
+
spans, owned by the instrumented application, with its own lifetime and its own
|
|
24
|
+
continuity chain. The two have no common issuer, so equal values would be
|
|
25
|
+
coincidence. Correlate a workbench execution to telemetry through
|
|
26
|
+
WorkbenchTelemetryCorrelation.traceIds, never by comparing session identifiers.
|
|
27
|
+
""")
|
|
28
|
+
@minLength(1)
|
|
29
|
+
@maxLength(128)
|
|
30
|
+
scalar WorkbenchSessionId extends string;
|
|
31
|
+
|
|
32
|
+
@doc("Opaque identifier for one MCP workbench workspace.")
|
|
33
|
+
@minLength(1)
|
|
34
|
+
@maxLength(128)
|
|
35
|
+
scalar WorkbenchWorkspaceId extends string;
|
|
36
|
+
|
|
37
|
+
@doc("Opaque identifier for one configured MCP server.")
|
|
38
|
+
@minLength(1)
|
|
39
|
+
@maxLength(128)
|
|
40
|
+
scalar WorkbenchServerId extends string;
|
|
41
|
+
|
|
42
|
+
@doc("Opaque identifier for one asynchronous MCP tool execution.")
|
|
43
|
+
@minLength(1)
|
|
44
|
+
@maxLength(128)
|
|
45
|
+
scalar WorkbenchExecutionId extends string;
|
|
46
|
+
|
|
47
|
+
@doc("Opaque identifier for one reusable MCP test case.")
|
|
48
|
+
@minLength(1)
|
|
49
|
+
@maxLength(128)
|
|
50
|
+
scalar WorkbenchTestCaseId extends string;
|
|
51
|
+
|
|
52
|
+
@doc("Opaque identifier for one reusable MCP test suite.")
|
|
53
|
+
@minLength(1)
|
|
54
|
+
@maxLength(128)
|
|
55
|
+
scalar WorkbenchSuiteId extends string;
|
|
56
|
+
|
|
57
|
+
@doc("Opaque identifier for one MCP evaluation run.")
|
|
58
|
+
@minLength(1)
|
|
59
|
+
@maxLength(128)
|
|
60
|
+
scalar WorkbenchEvaluationRunId extends string;
|
|
61
|
+
|
|
62
|
+
@doc("Opaque identifier for one generated evaluation export.")
|
|
63
|
+
@minLength(1)
|
|
64
|
+
@maxLength(128)
|
|
65
|
+
scalar WorkbenchEvaluationExportId extends string;
|
|
66
|
+
|
|
67
|
+
@doc("Authenticated local principal metadata. No credential or session token is represented here.")
|
|
68
|
+
model WorkbenchPrincipalIdentity {
|
|
69
|
+
id: string;
|
|
70
|
+
@encodedName("application/json", "display_name")
|
|
71
|
+
displayName?: string;
|
|
72
|
+
local: true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@doc("Metadata for the authenticated local workbench session. The HttpOnly session cookie is never returned in this model.")
|
|
76
|
+
model WorkbenchSession {
|
|
77
|
+
id: WorkbenchSessionId;
|
|
78
|
+
principal: WorkbenchPrincipalIdentity;
|
|
79
|
+
@encodedName("application/json", "workspace_ids")
|
|
80
|
+
workspaceIds: WorkbenchWorkspaceId[];
|
|
81
|
+
@encodedName("application/json", "active_workspace_id")
|
|
82
|
+
activeWorkspaceId?: WorkbenchWorkspaceId;
|
|
83
|
+
@encodedName("application/json", "created_at")
|
|
84
|
+
createdAt: utcDateTime;
|
|
85
|
+
@encodedName("application/json", "expires_at")
|
|
86
|
+
expiresAt?: utcDateTime;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@doc("Loopback session bootstrap response. The cookie value is carried only in Set-Cookie and never in the JSON body.")
|
|
90
|
+
model WorkbenchSessionBootstrapResponse extends WorkbenchSession {
|
|
91
|
+
@doc("qyl-workbench-session cookie with HttpOnly, SameSite, Path, and expiry attributes; Secure is also present when served over HTTPS.")
|
|
92
|
+
@header("Set-Cookie")
|
|
93
|
+
setCookie: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@doc("One isolated MCP workbench workspace owned by the authenticated local principal.")
|
|
97
|
+
model WorkbenchWorkspace {
|
|
98
|
+
id: WorkbenchWorkspaceId;
|
|
99
|
+
@encodedName("application/json", "owner_id")
|
|
100
|
+
ownerId: string;
|
|
101
|
+
name: string;
|
|
102
|
+
description?: string;
|
|
103
|
+
@encodedName("application/json", "created_at")
|
|
104
|
+
createdAt: utcDateTime;
|
|
105
|
+
@encodedName("application/json", "updated_at")
|
|
106
|
+
updatedAt: utcDateTime;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@doc("Request to create an isolated MCP workbench workspace.")
|
|
110
|
+
model WorkbenchWorkspaceCreateRequest {
|
|
111
|
+
@minLength(1)
|
|
112
|
+
@maxLength(120)
|
|
113
|
+
name: string;
|
|
114
|
+
|
|
115
|
+
@maxLength(2000)
|
|
116
|
+
description?: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@doc("Request to update mutable MCP workbench workspace metadata.")
|
|
120
|
+
model WorkbenchWorkspaceUpdateRequest {
|
|
121
|
+
@minLength(1)
|
|
122
|
+
@maxLength(120)
|
|
123
|
+
name?: string;
|
|
124
|
+
|
|
125
|
+
@maxLength(2000)
|
|
126
|
+
description?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@doc("Workspaces visible to the authenticated local session.")
|
|
130
|
+
model WorkbenchWorkspaceListResponse {
|
|
131
|
+
workspaces: WorkbenchWorkspace[];
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@doc("Preferred tool-argument editor for one authenticated workspace.")
|
|
135
|
+
enum WorkbenchToolInputMode {
|
|
136
|
+
form: "form",
|
|
137
|
+
json: "json",
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@doc("Saved presentation preferences isolated to one authenticated MCP workspace.")
|
|
141
|
+
model WorkbenchWorkspacePreferences {
|
|
142
|
+
@encodedName("application/json", "workspace_id")
|
|
143
|
+
workspaceId: WorkbenchWorkspaceId;
|
|
144
|
+
@encodedName("application/json", "selected_server_id")
|
|
145
|
+
selectedServerId?: WorkbenchServerId;
|
|
146
|
+
|
|
147
|
+
@maxLength(1024)
|
|
148
|
+
@encodedName("application/json", "selected_tool_name")
|
|
149
|
+
selectedToolName?: string;
|
|
150
|
+
|
|
151
|
+
@encodedName("application/json", "input_mode")
|
|
152
|
+
inputMode: WorkbenchToolInputMode;
|
|
153
|
+
|
|
154
|
+
@maxLength(128)
|
|
155
|
+
@encodedName("application/json", "active_panel")
|
|
156
|
+
activePanel?: string;
|
|
157
|
+
|
|
158
|
+
@encodedName("application/json", "compact_mode")
|
|
159
|
+
compactMode: boolean;
|
|
160
|
+
@encodedName("application/json", "updated_at")
|
|
161
|
+
updatedAt: utcDateTime;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@doc("Request to replace saved presentation preferences for one authenticated MCP workspace.")
|
|
165
|
+
model WorkbenchWorkspacePreferencesUpdateRequest {
|
|
166
|
+
@encodedName("application/json", "selected_server_id")
|
|
167
|
+
selectedServerId?: WorkbenchServerId;
|
|
168
|
+
|
|
169
|
+
@maxLength(1024)
|
|
170
|
+
@encodedName("application/json", "selected_tool_name")
|
|
171
|
+
selectedToolName?: string;
|
|
172
|
+
|
|
173
|
+
@encodedName("application/json", "input_mode")
|
|
174
|
+
inputMode?: WorkbenchToolInputMode;
|
|
175
|
+
|
|
176
|
+
@maxLength(128)
|
|
177
|
+
@encodedName("application/json", "active_panel")
|
|
178
|
+
activePanel?: string;
|
|
179
|
+
|
|
180
|
+
@encodedName("application/json", "compact_mode")
|
|
181
|
+
compactMode?: boolean;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@doc("Supported MCP server transport owned by the local workbench.")
|
|
185
|
+
enum WorkbenchTransportKind {
|
|
186
|
+
stdio: "stdio",
|
|
187
|
+
streamableHttp: "streamable_http",
|
|
188
|
+
builtin: "builtin",
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@doc("Reference to a secret resolved from the workbench environment. The environment value is never part of this contract.")
|
|
192
|
+
model WorkbenchSecretReference {
|
|
193
|
+
source: "environment";
|
|
194
|
+
|
|
195
|
+
@pattern("^[A-Za-z_][A-Za-z0-9_]*$")
|
|
196
|
+
@encodedName("application/json", "environment_variable")
|
|
197
|
+
environmentVariable: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@doc("Environment variable whose value is resolved from a secret reference at connection time.")
|
|
201
|
+
model WorkbenchEnvironmentSecretReference {
|
|
202
|
+
@pattern("^[A-Za-z_][A-Za-z0-9_]*$")
|
|
203
|
+
name: string;
|
|
204
|
+
|
|
205
|
+
secret: WorkbenchSecretReference;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@doc("HTTP header whose value is resolved from a secret reference at connection time.")
|
|
209
|
+
model WorkbenchHeaderSecretReference {
|
|
210
|
+
@minLength(1)
|
|
211
|
+
name: string;
|
|
212
|
+
|
|
213
|
+
secret: WorkbenchSecretReference;
|
|
214
|
+
|
|
215
|
+
@doc("Optional HTTP authentication scheme applied to the resolved secret. Omit for a raw header value.")
|
|
216
|
+
scheme?: WorkbenchHeaderSecretScheme;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@doc("HTTP authentication scheme applied to an environment-resolved header secret.")
|
|
220
|
+
enum WorkbenchHeaderSecretScheme {
|
|
221
|
+
bearer: "bearer",
|
|
222
|
+
basic: "basic",
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@doc("Sanitized local stdio transport configuration. Arguments must not contain secrets.")
|
|
226
|
+
model WorkbenchStdioServerConfiguration {
|
|
227
|
+
transport: "stdio";
|
|
228
|
+
|
|
229
|
+
@minLength(1)
|
|
230
|
+
command: string;
|
|
231
|
+
|
|
232
|
+
arguments?: string[];
|
|
233
|
+
@encodedName("application/json", "working_directory")
|
|
234
|
+
workingDirectory?: string;
|
|
235
|
+
environment?: WorkbenchEnvironmentSecretReference[];
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@doc("Sanitized MCP Streamable HTTP transport configuration.")
|
|
239
|
+
model WorkbenchStreamableHttpServerConfiguration {
|
|
240
|
+
transport: "streamable_http";
|
|
241
|
+
endpoint: url;
|
|
242
|
+
headers?: WorkbenchHeaderSecretReference[];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@doc("Sanitized built-in MCP server configuration.")
|
|
246
|
+
model WorkbenchBuiltinServerConfiguration {
|
|
247
|
+
transport: "builtin";
|
|
248
|
+
|
|
249
|
+
@minLength(1)
|
|
250
|
+
name: string;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@doc("Exactly one sanitized MCP server transport configuration.")
|
|
254
|
+
@oneOf
|
|
255
|
+
union WorkbenchServerConfiguration {
|
|
256
|
+
stdio: WorkbenchStdioServerConfiguration,
|
|
257
|
+
streamableHttp: WorkbenchStreamableHttpServerConfiguration,
|
|
258
|
+
builtin: WorkbenchBuiltinServerConfiguration,
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@doc("Connection lifecycle for one configured MCP server.")
|
|
262
|
+
enum WorkbenchConnectionStatus {
|
|
263
|
+
disconnected: "disconnected",
|
|
264
|
+
connecting: "connecting",
|
|
265
|
+
connected: "connected",
|
|
266
|
+
disconnecting: "disconnecting",
|
|
267
|
+
reconnecting: "reconnecting",
|
|
268
|
+
failed: "failed",
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
@doc("Stable category for a workbench, transport, protocol, or tool execution error.")
|
|
272
|
+
enum WorkbenchErrorCategory {
|
|
273
|
+
authentication: "authentication",
|
|
274
|
+
transport: "transport",
|
|
275
|
+
protocol: "protocol",
|
|
276
|
+
serialization: "serialization",
|
|
277
|
+
schemaValidation: "schema_validation",
|
|
278
|
+
toolError: "tool_error",
|
|
279
|
+
timeout: "timeout",
|
|
280
|
+
cancelled: "cancelled",
|
|
281
|
+
internal: "internal",
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@doc("Typed, sanitized failure captured by the MCP workbench.")
|
|
285
|
+
model WorkbenchError {
|
|
286
|
+
category: WorkbenchErrorCategory;
|
|
287
|
+
code: string;
|
|
288
|
+
message: string;
|
|
289
|
+
@encodedName("application/json", "occurred_at")
|
|
290
|
+
occurredAt: utcDateTime;
|
|
291
|
+
retryable: boolean;
|
|
292
|
+
|
|
293
|
+
@doc("Sanitized implementation details with credentials and secret values removed.")
|
|
294
|
+
details?: unknown;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@doc("SDK-validated MCP initialize result projected through a Qyl-owned connection snapshot.")
|
|
298
|
+
model WorkbenchInitializationSnapshot {
|
|
299
|
+
@encodedName("application/json", "initialized_at")
|
|
300
|
+
initializedAt: utcDateTime;
|
|
301
|
+
@encodedName("application/json", "protocol_version")
|
|
302
|
+
protocolVersion: string;
|
|
303
|
+
|
|
304
|
+
@doc("Opaque SDK server-info entity.")
|
|
305
|
+
@encodedName("application/json", "server_identity")
|
|
306
|
+
serverIdentity: unknown;
|
|
307
|
+
|
|
308
|
+
@doc("Opaque SDK server-capabilities entity.")
|
|
309
|
+
capabilities: unknown;
|
|
310
|
+
|
|
311
|
+
instructions?: string;
|
|
312
|
+
|
|
313
|
+
@doc("Opaque SDK session information when the transport exposes it.")
|
|
314
|
+
@encodedName("application/json", "session_info")
|
|
315
|
+
sessionInfo?: unknown;
|
|
316
|
+
|
|
317
|
+
@doc("Complete opaque SDK initialize result.")
|
|
318
|
+
result: unknown;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
@doc("Current connection state and most recent initialization evidence for one MCP server.")
|
|
322
|
+
model WorkbenchConnectionSnapshot {
|
|
323
|
+
status: WorkbenchConnectionStatus;
|
|
324
|
+
@encodedName("application/json", "changed_at")
|
|
325
|
+
changedAt: utcDateTime;
|
|
326
|
+
@encodedName("application/json", "connected_at")
|
|
327
|
+
connectedAt?: utcDateTime;
|
|
328
|
+
@encodedName("application/json", "disconnected_at")
|
|
329
|
+
disconnectedAt?: utcDateTime;
|
|
330
|
+
initialization?: WorkbenchInitializationSnapshot;
|
|
331
|
+
@encodedName("application/json", "recent_error")
|
|
332
|
+
recentError?: WorkbenchError;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@doc("Persisted sanitized MCP server configuration and current runtime connection state.")
|
|
336
|
+
model WorkbenchServer {
|
|
337
|
+
id: WorkbenchServerId;
|
|
338
|
+
@encodedName("application/json", "workspace_id")
|
|
339
|
+
workspaceId: WorkbenchWorkspaceId;
|
|
340
|
+
name: string;
|
|
341
|
+
description?: string;
|
|
342
|
+
configuration: WorkbenchServerConfiguration;
|
|
343
|
+
connection: WorkbenchConnectionSnapshot;
|
|
344
|
+
@encodedName("application/json", "created_at")
|
|
345
|
+
createdAt: utcDateTime;
|
|
346
|
+
@encodedName("application/json", "updated_at")
|
|
347
|
+
updatedAt: utcDateTime;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
@doc("Request to add an MCP server configuration to a workspace.")
|
|
351
|
+
model WorkbenchServerCreateRequest {
|
|
352
|
+
@minLength(1)
|
|
353
|
+
@maxLength(120)
|
|
354
|
+
name: string;
|
|
355
|
+
|
|
356
|
+
@maxLength(2000)
|
|
357
|
+
description?: string;
|
|
358
|
+
|
|
359
|
+
configuration: WorkbenchServerConfiguration;
|
|
360
|
+
@encodedName("application/json", "auto_connect")
|
|
361
|
+
autoConnect?: boolean = false;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@doc("Request to replace mutable MCP server metadata or its complete sanitized transport configuration.")
|
|
365
|
+
model WorkbenchServerUpdateRequest {
|
|
366
|
+
@minLength(1)
|
|
367
|
+
@maxLength(120)
|
|
368
|
+
name?: string;
|
|
369
|
+
|
|
370
|
+
@maxLength(2000)
|
|
371
|
+
description?: string;
|
|
372
|
+
|
|
373
|
+
configuration?: WorkbenchServerConfiguration;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
@doc("Configured MCP servers in one authenticated workspace.")
|
|
377
|
+
model WorkbenchServerListResponse {
|
|
378
|
+
servers: WorkbenchServer[];
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
@doc("An MCP server connection action was accepted and continues asynchronously.")
|
|
382
|
+
model WorkbenchServerActionAccepted {
|
|
383
|
+
@statusCode statusCode: 202;
|
|
384
|
+
server: WorkbenchServer;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
@doc("One discovered MCP entity collection. Every item remains the SDK-validated opaque entity.")
|
|
388
|
+
model WorkbenchDiscoveryCollection {
|
|
389
|
+
items: unknown[];
|
|
390
|
+
|
|
391
|
+
@minValue(0)
|
|
392
|
+
count: int32;
|
|
393
|
+
|
|
394
|
+
complete: boolean;
|
|
395
|
+
cursor?: string;
|
|
396
|
+
@encodedName("application/json", "next_cursor")
|
|
397
|
+
nextCursor?: string;
|
|
398
|
+
@encodedName("application/json", "discovered_at")
|
|
399
|
+
discoveredAt: utcDateTime;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
@doc("Complete MCP capability discovery evidence for one server.")
|
|
403
|
+
model WorkbenchDiscoverySnapshot {
|
|
404
|
+
@encodedName("application/json", "server_id")
|
|
405
|
+
serverId: WorkbenchServerId;
|
|
406
|
+
@encodedName("application/json", "started_at")
|
|
407
|
+
startedAt: utcDateTime;
|
|
408
|
+
@encodedName("application/json", "completed_at")
|
|
409
|
+
completedAt: utcDateTime;
|
|
410
|
+
tools: WorkbenchDiscoveryCollection;
|
|
411
|
+
resources: WorkbenchDiscoveryCollection;
|
|
412
|
+
@encodedName("application/json", "resource_templates")
|
|
413
|
+
resourceTemplates: WorkbenchDiscoveryCollection;
|
|
414
|
+
prompts: WorkbenchDiscoveryCollection;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
@doc("Direction of a captured MCP protocol or transport event.")
|
|
418
|
+
enum WorkbenchProtocolDirection {
|
|
419
|
+
clientToServer: "client_to_server",
|
|
420
|
+
serverToClient: "server_to_client",
|
|
421
|
+
local: "local",
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
@doc("Kind of captured MCP protocol or transport event.")
|
|
425
|
+
enum WorkbenchProtocolEventKind {
|
|
426
|
+
request: "request",
|
|
427
|
+
response: "response",
|
|
428
|
+
notification: "notification",
|
|
429
|
+
error: "error",
|
|
430
|
+
transport: "transport",
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
@doc("Chronological diagnostic event carrying only a redacted opaque SDK message or local transport payload.")
|
|
434
|
+
model WorkbenchProtocolEvent {
|
|
435
|
+
id: string;
|
|
436
|
+
@encodedName("application/json", "server_id")
|
|
437
|
+
serverId: WorkbenchServerId;
|
|
438
|
+
direction: WorkbenchProtocolDirection;
|
|
439
|
+
kind: WorkbenchProtocolEventKind;
|
|
440
|
+
method?: string;
|
|
441
|
+
|
|
442
|
+
@doc("Opaque JSON-RPC request identifier, which may be a string or number.")
|
|
443
|
+
@encodedName("application/json", "request_id")
|
|
444
|
+
requestId?: unknown;
|
|
445
|
+
|
|
446
|
+
timestamp: utcDateTime;
|
|
447
|
+
@encodedName("application/json", "duration_ms")
|
|
448
|
+
durationMs?: DurationMs;
|
|
449
|
+
|
|
450
|
+
@doc("Opaque SDK message or transport payload after credential and secret redaction.")
|
|
451
|
+
payload?: unknown;
|
|
452
|
+
|
|
453
|
+
@encodedName("application/json", "redaction_applied")
|
|
454
|
+
redactionApplied: true;
|
|
455
|
+
@encodedName("application/json", "execution_id")
|
|
456
|
+
executionId?: WorkbenchExecutionId;
|
|
457
|
+
@encodedName("application/json", "trace_id")
|
|
458
|
+
traceId?: TraceId;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
@doc("Cursor page of chronological MCP protocol diagnostic events.")
|
|
462
|
+
model WorkbenchProtocolEventPage {
|
|
463
|
+
events: WorkbenchProtocolEvent[];
|
|
464
|
+
@encodedName("application/json", "next_cursor")
|
|
465
|
+
nextCursor?: string;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
@doc("How consequential the workbench considers an MCP tool invocation.")
|
|
469
|
+
enum WorkbenchExecutionEffect {
|
|
470
|
+
readOnly: "read_only",
|
|
471
|
+
consequential: "consequential",
|
|
472
|
+
`unknown`: "unknown",
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
@doc("Client acknowledgement supplied when requesting a consequential MCP tool invocation.")
|
|
476
|
+
model WorkbenchExecutionConfirmationRequest {
|
|
477
|
+
acknowledged: true;
|
|
478
|
+
acknowledgement: string;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
@doc("Server-timestamped confirmation evidence persisted for a consequential MCP tool invocation.")
|
|
482
|
+
model WorkbenchExecutionConfirmationEvidence {
|
|
483
|
+
acknowledged: true;
|
|
484
|
+
acknowledgement: string;
|
|
485
|
+
@encodedName("application/json", "confirmed_at")
|
|
486
|
+
confirmedAt: utcDateTime;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
@doc("Request to asynchronously invoke one discovered MCP tool.")
|
|
490
|
+
model WorkbenchExecutionRequest {
|
|
491
|
+
@minLength(1)
|
|
492
|
+
@encodedName("application/json", "tool_name")
|
|
493
|
+
toolName: string;
|
|
494
|
+
|
|
495
|
+
@doc("Opaque tool arguments validated against the SDK tool schema before execution.")
|
|
496
|
+
arguments?: unknown;
|
|
497
|
+
|
|
498
|
+
@minValue(1)
|
|
499
|
+
@maxValue(3600000)
|
|
500
|
+
@encodedName("application/json", "timeout_ms")
|
|
501
|
+
timeoutMs: int32 = 30000;
|
|
502
|
+
|
|
503
|
+
confirmation?: WorkbenchExecutionConfirmationRequest;
|
|
504
|
+
|
|
505
|
+
@minLength(8)
|
|
506
|
+
@maxLength(256)
|
|
507
|
+
@encodedName("application/json", "idempotency_key")
|
|
508
|
+
idempotencyKey: string;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
@doc("Asynchronous MCP execution lifecycle.")
|
|
512
|
+
enum WorkbenchExecutionStatus {
|
|
513
|
+
queued: "queued",
|
|
514
|
+
running: "running",
|
|
515
|
+
cancelling: "cancelling",
|
|
516
|
+
succeeded: "succeeded",
|
|
517
|
+
failed: "failed",
|
|
518
|
+
cancelled: "cancelled",
|
|
519
|
+
timedOut: "timed_out",
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
@doc("Token usage reported or derived for one MCP execution when available.")
|
|
523
|
+
model WorkbenchExecutionTokenUsage {
|
|
524
|
+
@encodedName("application/json", "input_tokens")
|
|
525
|
+
inputTokens?: TokenCount;
|
|
526
|
+
@encodedName("application/json", "output_tokens")
|
|
527
|
+
outputTokens?: TokenCount;
|
|
528
|
+
@encodedName("application/json", "total_tokens")
|
|
529
|
+
totalTokens?: TokenCount;
|
|
530
|
+
estimated: boolean;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
@doc("USD cost reported or estimated for one MCP execution when available.")
|
|
534
|
+
model WorkbenchExecutionCost {
|
|
535
|
+
@encodedName("application/json", "amount_usd")
|
|
536
|
+
amountUsd: CostUsd;
|
|
537
|
+
estimated: boolean;
|
|
538
|
+
source?: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@doc("Qyl observability identifiers correlating workbench, MCP, and downstream activity.")
|
|
542
|
+
model WorkbenchTelemetryCorrelation {
|
|
543
|
+
@encodedName("application/json", "execution_id")
|
|
544
|
+
executionId?: WorkbenchExecutionId;
|
|
545
|
+
@encodedName("application/json", "evaluation_run_id")
|
|
546
|
+
evaluationRunId?: WorkbenchEvaluationRunId;
|
|
547
|
+
@encodedName("application/json", "test_case_id")
|
|
548
|
+
testCaseId?: WorkbenchTestCaseId;
|
|
549
|
+
@encodedName("application/json", "trace_ids")
|
|
550
|
+
traceIds: TraceId[];
|
|
551
|
+
@encodedName("application/json", "span_ids")
|
|
552
|
+
spanIds: SpanId[];
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@doc("Persisted asynchronous execution evidence. SDK tool results remain opaque.")
|
|
556
|
+
model WorkbenchExecutionRecord {
|
|
557
|
+
id: WorkbenchExecutionId;
|
|
558
|
+
@encodedName("application/json", "workspace_id")
|
|
559
|
+
workspaceId: WorkbenchWorkspaceId;
|
|
560
|
+
@encodedName("application/json", "server_id")
|
|
561
|
+
serverId: WorkbenchServerId;
|
|
562
|
+
request: WorkbenchExecutionRequest;
|
|
563
|
+
|
|
564
|
+
@doc("Server-derived effect from the SDK-validated discovered Tool and its annotations.")
|
|
565
|
+
effect: WorkbenchExecutionEffect;
|
|
566
|
+
|
|
567
|
+
confirmation?: WorkbenchExecutionConfirmationEvidence;
|
|
568
|
+
status: WorkbenchExecutionStatus;
|
|
569
|
+
@encodedName("application/json", "created_at")
|
|
570
|
+
createdAt: utcDateTime;
|
|
571
|
+
@encodedName("application/json", "started_at")
|
|
572
|
+
startedAt?: utcDateTime;
|
|
573
|
+
@encodedName("application/json", "completed_at")
|
|
574
|
+
completedAt?: utcDateTime;
|
|
575
|
+
@encodedName("application/json", "duration_ms")
|
|
576
|
+
durationMs?: DurationMs;
|
|
577
|
+
|
|
578
|
+
@minValue(0)
|
|
579
|
+
@encodedName("application/json", "attempt_count")
|
|
580
|
+
attemptCount: int32;
|
|
581
|
+
|
|
582
|
+
@minValue(0)
|
|
583
|
+
@encodedName("application/json", "retry_count")
|
|
584
|
+
retryCount: int32;
|
|
585
|
+
|
|
586
|
+
@encodedName("application/json", "cancel_requested_at")
|
|
587
|
+
cancelRequestedAt?: utcDateTime;
|
|
588
|
+
@encodedName("application/json", "cancelled_at")
|
|
589
|
+
cancelledAt?: utcDateTime;
|
|
590
|
+
|
|
591
|
+
@doc("Complete opaque SDK tool-call result after output sanitization.")
|
|
592
|
+
result?: unknown;
|
|
593
|
+
|
|
594
|
+
error?: WorkbenchError;
|
|
595
|
+
@encodedName("application/json", "token_usage")
|
|
596
|
+
tokenUsage?: WorkbenchExecutionTokenUsage;
|
|
597
|
+
cost?: WorkbenchExecutionCost;
|
|
598
|
+
telemetry?: WorkbenchTelemetryCorrelation;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
@doc("An MCP execution was accepted and continues asynchronously.")
|
|
602
|
+
model WorkbenchExecutionAccepted {
|
|
603
|
+
@statusCode statusCode: 202;
|
|
604
|
+
execution: WorkbenchExecutionRecord;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
@doc("Request to cancel an asynchronous MCP execution where the transport permits cancellation.")
|
|
608
|
+
model WorkbenchExecutionCancelRequest {
|
|
609
|
+
@maxLength(1000)
|
|
610
|
+
reason?: string;
|
|
611
|
+
|
|
612
|
+
@minLength(8)
|
|
613
|
+
@maxLength(256)
|
|
614
|
+
@encodedName("application/json", "idempotency_key")
|
|
615
|
+
idempotencyKey: string;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
@doc("Cursor page of MCP execution records.")
|
|
619
|
+
model WorkbenchExecutionPage {
|
|
620
|
+
executions: WorkbenchExecutionRecord[];
|
|
621
|
+
@encodedName("application/json", "next_cursor")
|
|
622
|
+
nextCursor?: string;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
@doc("Whether correlated Qyl observability evidence was available.")
|
|
626
|
+
enum WorkbenchTelemetryAvailability {
|
|
627
|
+
available: "available",
|
|
628
|
+
partial: "partial",
|
|
629
|
+
unavailable: "unavailable",
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
@doc("Availability and retained item count for one correlated Qyl telemetry signal.")
|
|
633
|
+
model WorkbenchTelemetrySignalAvailability {
|
|
634
|
+
status: WorkbenchTelemetryAvailability;
|
|
635
|
+
@encodedName("application/json", "unavailable_reason")
|
|
636
|
+
unavailableReason?: string;
|
|
637
|
+
|
|
638
|
+
@minValue(0)
|
|
639
|
+
@encodedName("application/json", "item_count")
|
|
640
|
+
itemCount: int32;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
@doc("Per-signal availability for correlated workbench observability evidence.")
|
|
644
|
+
model WorkbenchTelemetrySignalSummary {
|
|
645
|
+
traces: WorkbenchTelemetrySignalAvailability;
|
|
646
|
+
logs: WorkbenchTelemetrySignalAvailability;
|
|
647
|
+
exceptions: WorkbenchTelemetrySignalAvailability;
|
|
648
|
+
@encodedName("application/json", "tool_call_events")
|
|
649
|
+
toolCallEvents: WorkbenchTelemetrySignalAvailability;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
@doc("Correlated Qyl observability evidence for one MCP execution. Signals unsupported by the connected Qyl read API are explicitly unavailable.")
|
|
653
|
+
model WorkbenchExecutionTelemetryResponse {
|
|
654
|
+
signals: WorkbenchTelemetrySignalSummary;
|
|
655
|
+
correlation: WorkbenchTelemetryCorrelation;
|
|
656
|
+
traces: Trace[];
|
|
657
|
+
logs: LogRecord[];
|
|
658
|
+
@encodedName("application/json", "queried_at")
|
|
659
|
+
queriedAt: utcDateTime;
|
|
660
|
+
|
|
661
|
+
@doc("Confirms that workbench telemetry querying is excluded from workbench export instrumentation.")
|
|
662
|
+
@encodedName("application/json", "self_export_suppressed")
|
|
663
|
+
selfExportSuppressed: true;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
@doc("Assertion outcome reported by an evaluation.")
|
|
667
|
+
enum WorkbenchAssertionStatus {
|
|
668
|
+
passed: "passed",
|
|
669
|
+
failed: "failed",
|
|
670
|
+
error: "error",
|
|
671
|
+
skipped: "skipped",
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
@doc("Execution-status assertion for an MCP test case.")
|
|
675
|
+
model WorkbenchStatusAssertion {
|
|
676
|
+
id: string;
|
|
677
|
+
kind: "status";
|
|
678
|
+
|
|
679
|
+
@minItems(1)
|
|
680
|
+
expected: WorkbenchExecutionStatus[];
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
@doc("Exact JSON value assertion at an optional JSON Pointer path.")
|
|
684
|
+
model WorkbenchExactAssertion {
|
|
685
|
+
id: string;
|
|
686
|
+
kind: "exact";
|
|
687
|
+
path?: string;
|
|
688
|
+
expected: unknown;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
@doc("Partial JSON object or array containment assertion at an optional JSON Pointer path.")
|
|
692
|
+
model WorkbenchPartialAssertion {
|
|
693
|
+
id: string;
|
|
694
|
+
kind: "partial";
|
|
695
|
+
path?: string;
|
|
696
|
+
expected: unknown;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
@doc("JSON Schema assertion at an optional JSON Pointer path.")
|
|
700
|
+
model WorkbenchSchemaAssertion {
|
|
701
|
+
id: string;
|
|
702
|
+
kind: "schema";
|
|
703
|
+
path?: string;
|
|
704
|
+
schema: unknown;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
@doc("Regular-expression assertion at an optional JSON Pointer path.")
|
|
708
|
+
model WorkbenchPatternAssertion {
|
|
709
|
+
id: string;
|
|
710
|
+
kind: "pattern";
|
|
711
|
+
path?: string;
|
|
712
|
+
pattern: string;
|
|
713
|
+
flags?: string;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
@doc("Maximum execution latency assertion.")
|
|
717
|
+
model WorkbenchLatencyAssertion {
|
|
718
|
+
id: string;
|
|
719
|
+
kind: "latency";
|
|
720
|
+
|
|
721
|
+
@minValue(0)
|
|
722
|
+
@encodedName("application/json", "max_duration_ms")
|
|
723
|
+
maxDurationMs: float64;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
@doc("Exactly one supported MCP evaluation assertion.")
|
|
727
|
+
@oneOf
|
|
728
|
+
union WorkbenchTestAssertion {
|
|
729
|
+
status: WorkbenchStatusAssertion,
|
|
730
|
+
exact: WorkbenchExactAssertion,
|
|
731
|
+
partial: WorkbenchPartialAssertion,
|
|
732
|
+
schema: WorkbenchSchemaAssertion,
|
|
733
|
+
pattern: WorkbenchPatternAssertion,
|
|
734
|
+
latency: WorkbenchLatencyAssertion,
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
@doc("Reusable tool invocation and assertions persisted in one workspace.")
|
|
738
|
+
model WorkbenchTestCase {
|
|
739
|
+
id: WorkbenchTestCaseId;
|
|
740
|
+
@encodedName("application/json", "workspace_id")
|
|
741
|
+
workspaceId: WorkbenchWorkspaceId;
|
|
742
|
+
@encodedName("application/json", "server_id")
|
|
743
|
+
serverId: WorkbenchServerId;
|
|
744
|
+
name: string;
|
|
745
|
+
description?: string;
|
|
746
|
+
@encodedName("application/json", "tool_name")
|
|
747
|
+
toolName: string;
|
|
748
|
+
arguments?: unknown;
|
|
749
|
+
|
|
750
|
+
@minValue(1)
|
|
751
|
+
@maxValue(3600000)
|
|
752
|
+
@encodedName("application/json", "timeout_ms")
|
|
753
|
+
timeoutMs: int32;
|
|
754
|
+
|
|
755
|
+
assertions: WorkbenchTestAssertion[];
|
|
756
|
+
tags: string[];
|
|
757
|
+
@encodedName("application/json", "created_at")
|
|
758
|
+
createdAt: utcDateTime;
|
|
759
|
+
@encodedName("application/json", "updated_at")
|
|
760
|
+
updatedAt: utcDateTime;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
@doc("Request to create a reusable MCP test case.")
|
|
764
|
+
model WorkbenchTestCaseCreateRequest {
|
|
765
|
+
@encodedName("application/json", "server_id")
|
|
766
|
+
serverId: WorkbenchServerId;
|
|
767
|
+
|
|
768
|
+
@minLength(1)
|
|
769
|
+
@maxLength(160)
|
|
770
|
+
name: string;
|
|
771
|
+
|
|
772
|
+
@maxLength(4000)
|
|
773
|
+
description?: string;
|
|
774
|
+
|
|
775
|
+
@minLength(1)
|
|
776
|
+
@encodedName("application/json", "tool_name")
|
|
777
|
+
toolName: string;
|
|
778
|
+
|
|
779
|
+
arguments?: unknown;
|
|
780
|
+
|
|
781
|
+
@minValue(1)
|
|
782
|
+
@maxValue(3600000)
|
|
783
|
+
@encodedName("application/json", "timeout_ms")
|
|
784
|
+
timeoutMs: int32 = 30000;
|
|
785
|
+
|
|
786
|
+
@minItems(1)
|
|
787
|
+
assertions: WorkbenchTestAssertion[];
|
|
788
|
+
|
|
789
|
+
tags?: string[];
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
@doc("Request to update mutable MCP test-case fields.")
|
|
793
|
+
model WorkbenchTestCaseUpdateRequest {
|
|
794
|
+
@encodedName("application/json", "server_id")
|
|
795
|
+
serverId?: WorkbenchServerId;
|
|
796
|
+
|
|
797
|
+
@minLength(1)
|
|
798
|
+
@maxLength(160)
|
|
799
|
+
name?: string;
|
|
800
|
+
|
|
801
|
+
@maxLength(4000)
|
|
802
|
+
description?: string;
|
|
803
|
+
|
|
804
|
+
@minLength(1)
|
|
805
|
+
@encodedName("application/json", "tool_name")
|
|
806
|
+
toolName?: string;
|
|
807
|
+
|
|
808
|
+
arguments?: unknown;
|
|
809
|
+
|
|
810
|
+
@minValue(1)
|
|
811
|
+
@maxValue(3600000)
|
|
812
|
+
@encodedName("application/json", "timeout_ms")
|
|
813
|
+
timeoutMs?: int32;
|
|
814
|
+
|
|
815
|
+
@minItems(1)
|
|
816
|
+
assertions?: WorkbenchTestAssertion[];
|
|
817
|
+
|
|
818
|
+
tags?: string[];
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
@doc("Cursor page of reusable MCP test cases.")
|
|
822
|
+
model WorkbenchTestCasePage {
|
|
823
|
+
@encodedName("application/json", "test_cases")
|
|
824
|
+
testCases: WorkbenchTestCase[];
|
|
825
|
+
@encodedName("application/json", "next_cursor")
|
|
826
|
+
nextCursor?: string;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
@doc("Reusable ordered group of MCP test cases.")
|
|
830
|
+
model WorkbenchTestSuite {
|
|
831
|
+
id: WorkbenchSuiteId;
|
|
832
|
+
@encodedName("application/json", "workspace_id")
|
|
833
|
+
workspaceId: WorkbenchWorkspaceId;
|
|
834
|
+
name: string;
|
|
835
|
+
description?: string;
|
|
836
|
+
|
|
837
|
+
@minItems(1)
|
|
838
|
+
@encodedName("application/json", "test_case_ids")
|
|
839
|
+
testCaseIds: WorkbenchTestCaseId[];
|
|
840
|
+
|
|
841
|
+
tags: string[];
|
|
842
|
+
@encodedName("application/json", "created_at")
|
|
843
|
+
createdAt: utcDateTime;
|
|
844
|
+
@encodedName("application/json", "updated_at")
|
|
845
|
+
updatedAt: utcDateTime;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
@doc("Request to create a reusable MCP test suite.")
|
|
849
|
+
model WorkbenchTestSuiteCreateRequest {
|
|
850
|
+
@minLength(1)
|
|
851
|
+
@maxLength(160)
|
|
852
|
+
name: string;
|
|
853
|
+
|
|
854
|
+
@maxLength(4000)
|
|
855
|
+
description?: string;
|
|
856
|
+
|
|
857
|
+
@minItems(1)
|
|
858
|
+
@encodedName("application/json", "test_case_ids")
|
|
859
|
+
testCaseIds: WorkbenchTestCaseId[];
|
|
860
|
+
|
|
861
|
+
tags?: string[];
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
@doc("Request to update mutable MCP test-suite fields.")
|
|
865
|
+
model WorkbenchTestSuiteUpdateRequest {
|
|
866
|
+
@minLength(1)
|
|
867
|
+
@maxLength(160)
|
|
868
|
+
name?: string;
|
|
869
|
+
|
|
870
|
+
@maxLength(4000)
|
|
871
|
+
description?: string;
|
|
872
|
+
|
|
873
|
+
@minItems(1)
|
|
874
|
+
@encodedName("application/json", "test_case_ids")
|
|
875
|
+
testCaseIds?: WorkbenchTestCaseId[];
|
|
876
|
+
|
|
877
|
+
tags?: string[];
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
@doc("Cursor page of reusable MCP test suites.")
|
|
881
|
+
model WorkbenchTestSuitePage {
|
|
882
|
+
suites: WorkbenchTestSuite[];
|
|
883
|
+
@encodedName("application/json", "next_cursor")
|
|
884
|
+
nextCursor?: string;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
@doc("Request to execute one test case or suite asynchronously.")
|
|
888
|
+
model WorkbenchEvaluationRunRequest {
|
|
889
|
+
@minLength(8)
|
|
890
|
+
@maxLength(256)
|
|
891
|
+
@encodedName("application/json", "idempotency_key")
|
|
892
|
+
idempotencyKey: string;
|
|
893
|
+
|
|
894
|
+
confirmation?: WorkbenchExecutionConfirmationRequest;
|
|
895
|
+
|
|
896
|
+
@minValue(1)
|
|
897
|
+
@maxValue(50)
|
|
898
|
+
concurrency?: int32 = 1;
|
|
899
|
+
|
|
900
|
+
@encodedName("application/json", "fail_fast")
|
|
901
|
+
failFast?: boolean = false;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
@doc("Request to run one persisted MCP test case asynchronously.")
|
|
905
|
+
model WorkbenchTestCaseRunRequest extends WorkbenchEvaluationRunRequest {}
|
|
906
|
+
|
|
907
|
+
@doc("Request to run a complete suite or an explicit subset of its persisted test cases asynchronously.")
|
|
908
|
+
model WorkbenchSuiteRunRequest extends WorkbenchEvaluationRunRequest {
|
|
909
|
+
@minItems(1)
|
|
910
|
+
@encodedName("application/json", "selected_test_case_ids")
|
|
911
|
+
selectedTestCaseIds?: WorkbenchTestCaseId[];
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
@doc("Lifecycle for an MCP evaluation run.")
|
|
915
|
+
enum WorkbenchEvaluationRunStatus {
|
|
916
|
+
queued: "queued",
|
|
917
|
+
running: "running",
|
|
918
|
+
completed: "completed",
|
|
919
|
+
failed: "failed",
|
|
920
|
+
cancelled: "cancelled",
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
@doc("Outcome for one test case within an evaluation run.")
|
|
924
|
+
enum WorkbenchEvaluationResultStatus {
|
|
925
|
+
passed: "passed",
|
|
926
|
+
failed: "failed",
|
|
927
|
+
error: "error",
|
|
928
|
+
skipped: "skipped",
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
@doc("Outcome of one assertion with sanitized actual evidence when useful.")
|
|
932
|
+
model WorkbenchAssertionResult {
|
|
933
|
+
@encodedName("application/json", "assertion_id")
|
|
934
|
+
assertionId: string;
|
|
935
|
+
kind: string;
|
|
936
|
+
status: WorkbenchAssertionStatus;
|
|
937
|
+
message?: string;
|
|
938
|
+
actual?: unknown;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
@doc("Immutable reusable-test definition captured when an evaluation run starts.")
|
|
942
|
+
model WorkbenchEvaluationTestCaseSnapshot {
|
|
943
|
+
id: WorkbenchTestCaseId;
|
|
944
|
+
@encodedName("application/json", "server_id")
|
|
945
|
+
serverId: WorkbenchServerId;
|
|
946
|
+
name: string;
|
|
947
|
+
description?: string;
|
|
948
|
+
@encodedName("application/json", "tool_name")
|
|
949
|
+
toolName: string;
|
|
950
|
+
arguments?: unknown;
|
|
951
|
+
@encodedName("application/json", "timeout_ms")
|
|
952
|
+
timeoutMs: int32;
|
|
953
|
+
assertions: WorkbenchTestAssertion[];
|
|
954
|
+
tags: string[];
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
@doc("Immutable suite definition captured when an evaluation run starts.")
|
|
958
|
+
model WorkbenchEvaluationSuiteSnapshot {
|
|
959
|
+
id: WorkbenchSuiteId;
|
|
960
|
+
name: string;
|
|
961
|
+
description?: string;
|
|
962
|
+
@encodedName("application/json", "test_case_ids")
|
|
963
|
+
testCaseIds: WorkbenchTestCaseId[];
|
|
964
|
+
tags: string[];
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
@doc("One test-case result retained by an MCP evaluation run.")
|
|
968
|
+
model WorkbenchEvaluationTestResult {
|
|
969
|
+
@encodedName("application/json", "test_case")
|
|
970
|
+
testCase: WorkbenchEvaluationTestCaseSnapshot;
|
|
971
|
+
@encodedName("application/json", "execution_id")
|
|
972
|
+
executionId?: WorkbenchExecutionId;
|
|
973
|
+
status: WorkbenchEvaluationResultStatus;
|
|
974
|
+
@encodedName("application/json", "started_at")
|
|
975
|
+
startedAt?: utcDateTime;
|
|
976
|
+
@encodedName("application/json", "completed_at")
|
|
977
|
+
completedAt?: utcDateTime;
|
|
978
|
+
@encodedName("application/json", "duration_ms")
|
|
979
|
+
durationMs?: DurationMs;
|
|
980
|
+
assertions: WorkbenchAssertionResult[];
|
|
981
|
+
error?: WorkbenchError;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
@doc("Aggregate correctness, reliability, latency, usage, and cost for an MCP evaluation run.")
|
|
985
|
+
model WorkbenchEvaluationSummary {
|
|
986
|
+
@minValue(0)
|
|
987
|
+
total: int32;
|
|
988
|
+
|
|
989
|
+
@minValue(0)
|
|
990
|
+
passed: int32;
|
|
991
|
+
|
|
992
|
+
@minValue(0)
|
|
993
|
+
failed: int32;
|
|
994
|
+
|
|
995
|
+
@minValue(0)
|
|
996
|
+
errors: int32;
|
|
997
|
+
|
|
998
|
+
@minValue(0)
|
|
999
|
+
skipped: int32;
|
|
1000
|
+
|
|
1001
|
+
@encodedName("application/json", "success_rate")
|
|
1002
|
+
successRate: Ratio;
|
|
1003
|
+
reliability: Ratio;
|
|
1004
|
+
@encodedName("application/json", "mean_duration_ms")
|
|
1005
|
+
meanDurationMs?: DurationMs;
|
|
1006
|
+
@encodedName("application/json", "p50_duration_ms")
|
|
1007
|
+
p50DurationMs?: DurationMs;
|
|
1008
|
+
@encodedName("application/json", "p95_duration_ms")
|
|
1009
|
+
p95DurationMs?: DurationMs;
|
|
1010
|
+
@encodedName("application/json", "p99_duration_ms")
|
|
1011
|
+
p99DurationMs?: DurationMs;
|
|
1012
|
+
@encodedName("application/json", "token_usage")
|
|
1013
|
+
tokenUsage?: WorkbenchExecutionTokenUsage;
|
|
1014
|
+
cost?: WorkbenchExecutionCost;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
@doc("Asynchronous MCP evaluation run with retained per-test evidence.")
|
|
1018
|
+
model WorkbenchEvaluationRun {
|
|
1019
|
+
id: WorkbenchEvaluationRunId;
|
|
1020
|
+
@encodedName("application/json", "workspace_id")
|
|
1021
|
+
workspaceId: WorkbenchWorkspaceId;
|
|
1022
|
+
suite?: WorkbenchEvaluationSuiteSnapshot;
|
|
1023
|
+
@encodedName("application/json", "test_cases")
|
|
1024
|
+
testCases: WorkbenchEvaluationTestCaseSnapshot[];
|
|
1025
|
+
status: WorkbenchEvaluationRunStatus;
|
|
1026
|
+
@encodedName("application/json", "created_at")
|
|
1027
|
+
createdAt: utcDateTime;
|
|
1028
|
+
@encodedName("application/json", "started_at")
|
|
1029
|
+
startedAt?: utcDateTime;
|
|
1030
|
+
@encodedName("application/json", "completed_at")
|
|
1031
|
+
completedAt?: utcDateTime;
|
|
1032
|
+
results: WorkbenchEvaluationTestResult[];
|
|
1033
|
+
summary?: WorkbenchEvaluationSummary;
|
|
1034
|
+
confirmation?: WorkbenchExecutionConfirmationEvidence;
|
|
1035
|
+
telemetry?: WorkbenchTelemetryCorrelation;
|
|
1036
|
+
error?: WorkbenchError;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
@doc("An MCP evaluation run was accepted and continues asynchronously.")
|
|
1040
|
+
model WorkbenchEvaluationRunAccepted {
|
|
1041
|
+
@statusCode statusCode: 202;
|
|
1042
|
+
run: WorkbenchEvaluationRun;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
@doc("Cursor page of MCP evaluation runs.")
|
|
1046
|
+
model WorkbenchEvaluationRunPage {
|
|
1047
|
+
runs: WorkbenchEvaluationRun[];
|
|
1048
|
+
@encodedName("application/json", "next_cursor")
|
|
1049
|
+
nextCursor?: string;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
@doc("Request to compare a baseline MCP evaluation run with a candidate run.")
|
|
1053
|
+
model WorkbenchEvaluationComparisonRequest {
|
|
1054
|
+
@encodedName("application/json", "baseline_run_id")
|
|
1055
|
+
baselineRunId: WorkbenchEvaluationRunId;
|
|
1056
|
+
@encodedName("application/json", "candidate_run_id")
|
|
1057
|
+
candidateRunId: WorkbenchEvaluationRunId;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
@doc("Regression classification for one test case across two evaluation runs.")
|
|
1061
|
+
enum WorkbenchRegressionStatus {
|
|
1062
|
+
improved: "improved",
|
|
1063
|
+
regressed: "regressed",
|
|
1064
|
+
unchanged: "unchanged",
|
|
1065
|
+
added: "added",
|
|
1066
|
+
removed: "removed",
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
@doc("Per-test comparison across a baseline and candidate MCP evaluation run.")
|
|
1070
|
+
model WorkbenchEvaluationTestComparison {
|
|
1071
|
+
@encodedName("application/json", "test_case_id")
|
|
1072
|
+
testCaseId: WorkbenchTestCaseId;
|
|
1073
|
+
status: WorkbenchRegressionStatus;
|
|
1074
|
+
@encodedName("application/json", "baseline_status")
|
|
1075
|
+
baselineStatus?: WorkbenchEvaluationResultStatus;
|
|
1076
|
+
@encodedName("application/json", "candidate_status")
|
|
1077
|
+
candidateStatus?: WorkbenchEvaluationResultStatus;
|
|
1078
|
+
@encodedName("application/json", "duration_delta_ms")
|
|
1079
|
+
durationDeltaMs?: float64;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
@doc("Aggregate comparison of two completed MCP evaluation runs.")
|
|
1083
|
+
model WorkbenchEvaluationRunComparison {
|
|
1084
|
+
@encodedName("application/json", "baseline_run_id")
|
|
1085
|
+
baselineRunId: WorkbenchEvaluationRunId;
|
|
1086
|
+
@encodedName("application/json", "candidate_run_id")
|
|
1087
|
+
candidateRunId: WorkbenchEvaluationRunId;
|
|
1088
|
+
baseline: WorkbenchEvaluationSummary;
|
|
1089
|
+
candidate: WorkbenchEvaluationSummary;
|
|
1090
|
+
@encodedName("application/json", "success_rate_delta")
|
|
1091
|
+
successRateDelta: float64;
|
|
1092
|
+
@encodedName("application/json", "reliability_delta")
|
|
1093
|
+
reliabilityDelta: float64;
|
|
1094
|
+
@encodedName("application/json", "p95_duration_delta_ms")
|
|
1095
|
+
p95DurationDeltaMs?: float64;
|
|
1096
|
+
@encodedName("application/json", "token_delta")
|
|
1097
|
+
tokenDelta?: int64;
|
|
1098
|
+
@encodedName("application/json", "cost_delta_usd")
|
|
1099
|
+
costDeltaUsd?: float64;
|
|
1100
|
+
tests: WorkbenchEvaluationTestComparison[];
|
|
1101
|
+
@encodedName("application/json", "compared_at")
|
|
1102
|
+
comparedAt: utcDateTime;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
@doc("Supported evaluation export representation.")
|
|
1106
|
+
enum WorkbenchEvaluationExportFormat {
|
|
1107
|
+
json: "json",
|
|
1108
|
+
report: "report",
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
@doc("Request to generate a machine-readable or readable evaluation export.")
|
|
1112
|
+
model WorkbenchEvaluationExportRequest {
|
|
1113
|
+
format: WorkbenchEvaluationExportFormat;
|
|
1114
|
+
@encodedName("application/json", "include_protocol_events")
|
|
1115
|
+
includeProtocolEvents?: boolean = true;
|
|
1116
|
+
@encodedName("application/json", "include_telemetry")
|
|
1117
|
+
includeTelemetry?: boolean = true;
|
|
1118
|
+
|
|
1119
|
+
@minLength(8)
|
|
1120
|
+
@maxLength(256)
|
|
1121
|
+
@encodedName("application/json", "idempotency_key")
|
|
1122
|
+
idempotencyKey: string;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
@doc("Lifecycle for generation of an evaluation export artifact.")
|
|
1126
|
+
enum WorkbenchEvaluationExportStatus {
|
|
1127
|
+
pending: "pending",
|
|
1128
|
+
ready: "ready",
|
|
1129
|
+
failed: "failed",
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
@doc("Metadata for one generated evaluation JSON or readable report artifact.")
|
|
1133
|
+
model WorkbenchEvaluationExport {
|
|
1134
|
+
id: WorkbenchEvaluationExportId;
|
|
1135
|
+
@encodedName("application/json", "run_id")
|
|
1136
|
+
runId: WorkbenchEvaluationRunId;
|
|
1137
|
+
format: WorkbenchEvaluationExportFormat;
|
|
1138
|
+
status: WorkbenchEvaluationExportStatus;
|
|
1139
|
+
@encodedName("application/json", "requested_at")
|
|
1140
|
+
requestedAt: utcDateTime;
|
|
1141
|
+
@encodedName("application/json", "completed_at")
|
|
1142
|
+
completedAt?: utcDateTime;
|
|
1143
|
+
@encodedName("application/json", "media_type")
|
|
1144
|
+
mediaType?: string;
|
|
1145
|
+
@encodedName("application/json", "file_name")
|
|
1146
|
+
fileName?: string;
|
|
1147
|
+
@encodedName("application/json", "byte_size")
|
|
1148
|
+
byteSize?: ByteSize;
|
|
1149
|
+
sha256?: Sha256Hash;
|
|
1150
|
+
error?: WorkbenchError;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
@doc("Machine-readable evaluation export with retained execution, protocol, and optional telemetry evidence.")
|
|
1154
|
+
model WorkbenchEvaluationJsonExportPayload {
|
|
1155
|
+
format: "json";
|
|
1156
|
+
run: WorkbenchEvaluationRun;
|
|
1157
|
+
@encodedName("application/json", "protocol_events")
|
|
1158
|
+
protocolEvents: WorkbenchProtocolEvent[];
|
|
1159
|
+
telemetry: WorkbenchExecutionTelemetryResponse[];
|
|
1160
|
+
@encodedName("application/json", "exported_at")
|
|
1161
|
+
exportedAt: utcDateTime;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
@doc("Human-readable Markdown evaluation report.")
|
|
1165
|
+
model WorkbenchEvaluationReportExportPayload {
|
|
1166
|
+
format: "report";
|
|
1167
|
+
markdown: string;
|
|
1168
|
+
@encodedName("application/json", "exported_at")
|
|
1169
|
+
exportedAt: utcDateTime;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
@doc("Exactly one generated evaluation export representation.")
|
|
1173
|
+
@oneOf
|
|
1174
|
+
union WorkbenchEvaluationExportPayload {
|
|
1175
|
+
json: WorkbenchEvaluationJsonExportPayload,
|
|
1176
|
+
report: WorkbenchEvaluationReportExportPayload,
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
@doc("Ready evaluation export metadata and its TypeSpec-owned content.")
|
|
1180
|
+
model WorkbenchEvaluationExportArtifact {
|
|
1181
|
+
export: WorkbenchEvaluationExport;
|
|
1182
|
+
payload: WorkbenchEvaluationExportPayload;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
@doc("An evaluation export was accepted and continues asynchronously.")
|
|
1186
|
+
model WorkbenchEvaluationExportAccepted {
|
|
1187
|
+
@statusCode statusCode: 202;
|
|
1188
|
+
export: WorkbenchEvaluationExport;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
@doc("Successful deletion with no response body.")
|
|
1192
|
+
model WorkbenchDeleted {
|
|
1193
|
+
@statusCode statusCode: 204;
|
|
1194
|
+
}
|