@inspectr/mcplab-core 1.22.0 → 1.22.2
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/dist/config-values.d.ts +7 -0
- package/dist/config-values.d.ts.map +1 -0
- package/dist/config-values.js +15 -0
- package/dist/config-values.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts +10 -0
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +41 -20
- package/dist/mcp.js.map +1 -1
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +8 -2
- package/dist/runner.js.map +1 -1
- package/dist/scenario-builder.d.ts +2 -1
- package/dist/scenario-builder.d.ts.map +1 -1
- package/dist/scenario-builder.js +44 -21
- package/dist/scenario-builder.js.map +1 -1
- package/dist/test-case-store.d.ts +2 -1
- package/dist/test-case-store.d.ts.map +1 -1
- package/dist/test-case-store.js +2 -0
- package/dist/test-case-store.js.map +1 -1
- package/dist/types.d.ts +306 -331
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,442 +1,417 @@
|
|
|
1
1
|
export type TransportType = 'http';
|
|
2
2
|
export interface ServerAuthBearer {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
type: 'bearer';
|
|
4
|
+
env?: string;
|
|
5
|
+
token?: string;
|
|
6
6
|
}
|
|
7
7
|
export interface ServerAuthApiKey {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
type: 'api_key';
|
|
9
|
+
header_name?: string;
|
|
10
|
+
value: string;
|
|
11
11
|
}
|
|
12
12
|
export interface ServerAuthOauthClientCredentials {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
type: 'oauth_client_credentials';
|
|
14
|
+
token_url: string;
|
|
15
|
+
client_id_env: string;
|
|
16
|
+
client_secret_env: string;
|
|
17
|
+
scope?: string;
|
|
18
|
+
audience?: string;
|
|
19
|
+
token_params?: Record<string, string>;
|
|
20
20
|
}
|
|
21
21
|
export interface ServerAuthOauthAuthorizationCode {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
export type ServerAuth =
|
|
32
|
-
| ServerAuthBearer
|
|
33
|
-
| ServerAuthApiKey
|
|
34
|
-
| ServerAuthOauthClientCredentials
|
|
35
|
-
| ServerAuthOauthAuthorizationCode;
|
|
22
|
+
type: 'oauth_authorization_code';
|
|
23
|
+
mode?: 'pre_registered' | 'dcr';
|
|
24
|
+
client_id?: string;
|
|
25
|
+
client_secret?: string;
|
|
26
|
+
redirect_url?: string;
|
|
27
|
+
scope?: string;
|
|
28
|
+
authorization_url?: string;
|
|
29
|
+
token_url?: string;
|
|
30
|
+
}
|
|
31
|
+
export type ServerAuth = ServerAuthBearer | ServerAuthApiKey | ServerAuthOauthClientCredentials | ServerAuthOauthAuthorizationCode;
|
|
36
32
|
export interface ServerConfig {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
name?: string;
|
|
34
|
+
transport: TransportType;
|
|
35
|
+
url: string;
|
|
36
|
+
headers?: Record<string, string>;
|
|
37
|
+
auth?: ServerAuth;
|
|
42
38
|
}
|
|
43
39
|
export interface ServerInlineEntry extends ServerConfig {
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
id: string;
|
|
41
|
+
name?: string;
|
|
46
42
|
}
|
|
47
43
|
export interface ServerRefEntry {
|
|
48
|
-
|
|
44
|
+
ref: string;
|
|
49
45
|
}
|
|
50
46
|
export type ServerListEntry = ServerInlineEntry | ServerRefEntry;
|
|
51
47
|
export interface AgentConfig {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
48
|
+
name?: string;
|
|
49
|
+
provider: 'openai' | 'anthropic' | 'azure_openai';
|
|
50
|
+
model: string;
|
|
51
|
+
temperature?: number;
|
|
52
|
+
max_tokens?: number;
|
|
53
|
+
max_turns?: number;
|
|
54
|
+
system?: string;
|
|
59
55
|
}
|
|
60
56
|
export interface AgentInlineEntry extends AgentConfig {
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
id: string;
|
|
58
|
+
name?: string;
|
|
63
59
|
}
|
|
64
60
|
export interface AgentRefEntry {
|
|
65
|
-
|
|
61
|
+
ref: string;
|
|
66
62
|
}
|
|
67
63
|
export type AgentListEntry = AgentInlineEntry | AgentRefEntry;
|
|
68
64
|
export interface ToolConstraints {
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
required_tools?: string[];
|
|
66
|
+
forbidden_tools?: string[];
|
|
71
67
|
}
|
|
72
68
|
export interface ResponseAssertionRegex {
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
type: 'regex';
|
|
70
|
+
pattern: string;
|
|
75
71
|
}
|
|
76
72
|
export interface ResponseAssertionContains {
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
type: 'contains';
|
|
74
|
+
value: string;
|
|
79
75
|
}
|
|
80
76
|
export interface ResponseAssertionNotContains {
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
type: 'not_contains';
|
|
78
|
+
value: string;
|
|
83
79
|
}
|
|
84
80
|
export interface ResponseAssertionStartsWith {
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
type: 'starts_with';
|
|
82
|
+
value: string;
|
|
87
83
|
}
|
|
88
84
|
export interface ResponseAssertionEndsWith {
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
type: 'ends_with';
|
|
86
|
+
value: string;
|
|
91
87
|
}
|
|
92
88
|
export interface ResponseAssertionEquals {
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
type: 'equals';
|
|
90
|
+
value: string;
|
|
95
91
|
}
|
|
96
92
|
export interface ResponseAssertionJsonPath {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
type: 'jsonpath';
|
|
94
|
+
path: string;
|
|
95
|
+
equals?: string | number | boolean;
|
|
100
96
|
}
|
|
101
97
|
export interface ResponseAssertionJsonPathExists {
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
type: 'jsonpath_exists';
|
|
99
|
+
path: string;
|
|
104
100
|
}
|
|
105
101
|
export interface ResponseAssertionJsonPathNotExists {
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
type: 'jsonpath_not_exists';
|
|
103
|
+
path: string;
|
|
108
104
|
}
|
|
109
105
|
export interface AgentAssertion {
|
|
110
|
-
|
|
111
|
-
|
|
106
|
+
label: string;
|
|
107
|
+
prompt: string;
|
|
112
108
|
}
|
|
113
109
|
export interface ToolInputAssertionBase {
|
|
114
|
-
|
|
110
|
+
tool: string;
|
|
115
111
|
}
|
|
116
112
|
export interface ToolInputAssertionContains extends ToolInputAssertionBase {
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
type: 'contains';
|
|
114
|
+
value: string;
|
|
119
115
|
}
|
|
120
116
|
export interface ToolInputAssertionRegex extends ToolInputAssertionBase {
|
|
121
|
-
|
|
122
|
-
|
|
117
|
+
type: 'regex';
|
|
118
|
+
pattern: string;
|
|
123
119
|
}
|
|
124
120
|
export interface ToolInputAssertionJsonPath extends ToolInputAssertionBase {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
export type ToolInputAssertion =
|
|
130
|
-
| ToolInputAssertionContains
|
|
131
|
-
| ToolInputAssertionRegex
|
|
132
|
-
| ToolInputAssertionJsonPath;
|
|
121
|
+
type: 'jsonpath';
|
|
122
|
+
path: string;
|
|
123
|
+
equals?: string | number | boolean;
|
|
124
|
+
}
|
|
125
|
+
export type ToolInputAssertion = ToolInputAssertionContains | ToolInputAssertionRegex | ToolInputAssertionJsonPath;
|
|
133
126
|
export interface AgentContext {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
127
|
+
include_prompt?: boolean;
|
|
128
|
+
include_tool_sequence?: boolean;
|
|
129
|
+
include_tool_inputs?: boolean;
|
|
137
130
|
}
|
|
138
131
|
export interface AgentJudgeContext {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
export type ResponseAssertion =
|
|
147
|
-
| ResponseAssertionRegex
|
|
148
|
-
| ResponseAssertionContains
|
|
149
|
-
| ResponseAssertionNotContains
|
|
150
|
-
| ResponseAssertionStartsWith
|
|
151
|
-
| ResponseAssertionEndsWith
|
|
152
|
-
| ResponseAssertionEquals
|
|
153
|
-
| ResponseAssertionJsonPath
|
|
154
|
-
| ResponseAssertionJsonPathExists
|
|
155
|
-
| ResponseAssertionJsonPathNotExists;
|
|
132
|
+
scenario_prompt?: string;
|
|
133
|
+
tool_sequence?: string[];
|
|
134
|
+
tool_inputs?: Array<{
|
|
135
|
+
tool: string;
|
|
136
|
+
arguments: unknown;
|
|
137
|
+
}>;
|
|
138
|
+
}
|
|
139
|
+
export type ResponseAssertion = ResponseAssertionRegex | ResponseAssertionContains | ResponseAssertionNotContains | ResponseAssertionStartsWith | ResponseAssertionEndsWith | ResponseAssertionEquals | ResponseAssertionJsonPath | ResponseAssertionJsonPathExists | ResponseAssertionJsonPathNotExists;
|
|
156
140
|
export interface EvalRules {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
141
|
+
tool_constraints?: ToolConstraints;
|
|
142
|
+
tool_sequence?: string[];
|
|
143
|
+
tool_input_assertions?: ToolInputAssertion[];
|
|
144
|
+
response_assertions?: ResponseAssertion[];
|
|
145
|
+
agent_assertions?: AgentAssertion[];
|
|
146
|
+
agent_context?: AgentContext;
|
|
163
147
|
}
|
|
164
148
|
export type CheckResultStatus = 'passed' | 'failed' | 'not_evaluated';
|
|
165
149
|
export interface CheckResult {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
150
|
+
type: string;
|
|
151
|
+
label: string;
|
|
152
|
+
status: CheckResultStatus;
|
|
153
|
+
reason?: string;
|
|
154
|
+
metadata?: Record<string, unknown>;
|
|
171
155
|
}
|
|
172
156
|
export interface CheckCounts {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
157
|
+
passed: number;
|
|
158
|
+
failed: number;
|
|
159
|
+
not_evaluated: number;
|
|
160
|
+
total: number;
|
|
177
161
|
}
|
|
178
162
|
export interface ExtractRule {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
163
|
+
name: string;
|
|
164
|
+
from: 'final_text';
|
|
165
|
+
regex: string;
|
|
182
166
|
}
|
|
183
167
|
export interface ScenarioAttachment {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
168
|
+
type: 'image' | 'document';
|
|
169
|
+
media_type: string;
|
|
170
|
+
data: string;
|
|
171
|
+
url?: string;
|
|
172
|
+
name?: string;
|
|
189
173
|
}
|
|
190
174
|
export interface SourceScenarioAttachment extends Omit<ScenarioAttachment, 'media_type' | 'data'> {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
175
|
+
media_type?: string;
|
|
176
|
+
data?: string;
|
|
177
|
+
path?: string;
|
|
194
178
|
}
|
|
195
179
|
export interface Scenario {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
180
|
+
id: string;
|
|
181
|
+
name?: string;
|
|
182
|
+
mcp_servers?: ServerListEntry[];
|
|
183
|
+
servers: string[];
|
|
184
|
+
prompt: string;
|
|
185
|
+
attachments?: ScenarioAttachment[];
|
|
186
|
+
eval?: EvalRules;
|
|
187
|
+
extract?: ExtractRule[];
|
|
204
188
|
}
|
|
205
189
|
export interface ScenarioRefEntry {
|
|
206
|
-
|
|
207
|
-
|
|
190
|
+
ref: string;
|
|
191
|
+
mcp_servers?: ServerListEntry[];
|
|
208
192
|
}
|
|
209
193
|
export interface SourceScenario extends Omit<Scenario, 'servers' | 'attachments'> {
|
|
210
|
-
|
|
211
|
-
|
|
194
|
+
servers?: string[];
|
|
195
|
+
attachments?: SourceScenarioAttachment[];
|
|
212
196
|
}
|
|
213
197
|
export type ScenarioListEntry = SourceScenario | ScenarioRefEntry;
|
|
214
198
|
export interface EvalConfig {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
199
|
+
name?: string;
|
|
200
|
+
description?: string;
|
|
201
|
+
servers: Record<string, ServerConfig>;
|
|
202
|
+
agents: Record<string, AgentConfig>;
|
|
203
|
+
scenarios: Scenario[];
|
|
204
|
+
run_defaults?: {
|
|
205
|
+
selected_agents?: string[];
|
|
206
|
+
};
|
|
222
207
|
}
|
|
223
208
|
export interface SourceEvalConfig extends Omit<EvalConfig, 'scenarios' | 'agents' | 'servers'> {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
209
|
+
servers?: ServerListEntry[];
|
|
210
|
+
agents: AgentListEntry[];
|
|
211
|
+
scenarios: ScenarioListEntry[];
|
|
227
212
|
}
|
|
228
213
|
export interface ExecutableScenario extends Scenario {
|
|
229
|
-
|
|
230
|
-
|
|
214
|
+
agent: string;
|
|
215
|
+
scenario_exec_id?: string;
|
|
231
216
|
}
|
|
232
217
|
export interface ExecutableEvalConfig extends Omit<EvalConfig, 'scenarios'> {
|
|
233
|
-
|
|
218
|
+
scenarios: ExecutableScenario[];
|
|
234
219
|
}
|
|
235
220
|
export interface ToolDef {
|
|
236
|
-
|
|
237
|
-
title?: string;
|
|
238
|
-
description?: string;
|
|
239
|
-
inputSchema?: unknown;
|
|
240
|
-
outputSchema?: unknown;
|
|
241
|
-
annotations?: {
|
|
221
|
+
name: string;
|
|
242
222
|
title?: string;
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
223
|
+
description?: string;
|
|
224
|
+
inputSchema?: unknown;
|
|
225
|
+
outputSchema?: unknown;
|
|
226
|
+
annotations?: {
|
|
227
|
+
title?: string;
|
|
228
|
+
readOnlyHint?: boolean;
|
|
229
|
+
idempotentHint?: boolean;
|
|
230
|
+
destructiveHint?: boolean;
|
|
231
|
+
openWorldHint?: boolean;
|
|
232
|
+
[key: string]: unknown;
|
|
233
|
+
};
|
|
249
234
|
}
|
|
250
235
|
export interface ToolCall {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
236
|
+
id?: string;
|
|
237
|
+
name: string;
|
|
238
|
+
arguments: Record<string, unknown> | unknown;
|
|
239
|
+
server?: string;
|
|
255
240
|
}
|
|
256
241
|
export interface LlmMessage {
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
242
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
243
|
+
content: string;
|
|
244
|
+
attachments?: ScenarioAttachment[];
|
|
245
|
+
tool_call_id?: string;
|
|
246
|
+
name?: string;
|
|
247
|
+
tool_calls?: ToolCall[];
|
|
263
248
|
}
|
|
264
249
|
export interface LlmResponse {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
250
|
+
content?: string;
|
|
251
|
+
tool_calls?: ToolCall[];
|
|
252
|
+
raw?: unknown;
|
|
253
|
+
usage?: {
|
|
254
|
+
input_tokens?: number;
|
|
255
|
+
output_tokens?: number;
|
|
256
|
+
total_tokens?: number;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
export interface TraceMessageUsage {
|
|
269
260
|
input_tokens?: number;
|
|
270
261
|
output_tokens?: number;
|
|
271
262
|
total_tokens?: number;
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
export interface TraceMessageUsage {
|
|
275
|
-
input_tokens?: number;
|
|
276
|
-
output_tokens?: number;
|
|
277
|
-
total_tokens?: number;
|
|
278
263
|
}
|
|
279
264
|
export interface EstimatedTokens {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
export type TraceMessageContentBlock =
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
| {
|
|
311
|
-
type: 'tool_result';
|
|
312
|
-
tool_use_id: string;
|
|
313
|
-
name: string;
|
|
314
|
-
content: Array<{
|
|
265
|
+
input: number;
|
|
266
|
+
output: number;
|
|
267
|
+
total: number;
|
|
268
|
+
method: 'js_tiktoken_estimate' | 'js_tiktoken_fallback';
|
|
269
|
+
}
|
|
270
|
+
export type TraceMessageContentBlock = {
|
|
271
|
+
type: 'text';
|
|
272
|
+
text: string;
|
|
273
|
+
} | {
|
|
274
|
+
type: 'image';
|
|
275
|
+
media_type: string;
|
|
276
|
+
data: string;
|
|
277
|
+
name?: string;
|
|
278
|
+
} | {
|
|
279
|
+
type: 'document';
|
|
280
|
+
media_type: string;
|
|
281
|
+
data: string;
|
|
282
|
+
name?: string;
|
|
283
|
+
} | {
|
|
284
|
+
type: 'tool_use';
|
|
285
|
+
id: string;
|
|
286
|
+
name: string;
|
|
287
|
+
input: unknown;
|
|
288
|
+
server: string;
|
|
289
|
+
estimated_tokens?: EstimatedTokens;
|
|
290
|
+
} | {
|
|
291
|
+
type: 'tool_result';
|
|
292
|
+
tool_use_id: string;
|
|
293
|
+
name: string;
|
|
294
|
+
content: Array<{
|
|
315
295
|
type: 'text';
|
|
316
296
|
text: string;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
297
|
+
}>;
|
|
298
|
+
is_error: boolean;
|
|
299
|
+
duration_ms?: number;
|
|
300
|
+
ts_start?: string;
|
|
301
|
+
ts_end?: string;
|
|
302
|
+
server?: string;
|
|
303
|
+
estimated_tokens?: EstimatedTokens;
|
|
304
|
+
};
|
|
325
305
|
export interface TraceMessage {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
306
|
+
role: 'user' | 'assistant' | 'tool';
|
|
307
|
+
ts?: string;
|
|
308
|
+
usage?: TraceMessageUsage;
|
|
309
|
+
content: TraceMessageContentBlock[];
|
|
330
310
|
}
|
|
331
311
|
export interface ScenarioRunTraceRecord {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
312
|
+
type: 'scenario_run';
|
|
313
|
+
trace_version: 3;
|
|
314
|
+
run_index: number;
|
|
315
|
+
request_id?: string;
|
|
316
|
+
scenario_id: string;
|
|
317
|
+
agent: string;
|
|
318
|
+
provider: string;
|
|
319
|
+
model: string;
|
|
320
|
+
ts_start: string;
|
|
321
|
+
ts_end: string;
|
|
322
|
+
pass: boolean;
|
|
323
|
+
error?: string;
|
|
324
|
+
messages: TraceMessage[];
|
|
325
|
+
metrics?: {
|
|
326
|
+
tool_call_count: number;
|
|
327
|
+
total_tool_duration_ms: number;
|
|
328
|
+
};
|
|
349
329
|
}
|
|
350
330
|
export interface TraceFileLegacyMeta {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
export type PersistedTraceRecord =
|
|
357
|
-
| ScenarioRunTraceRecord
|
|
358
|
-
| TraceFileLegacyMeta
|
|
359
|
-
| Record<string, unknown>;
|
|
331
|
+
type: 'trace_meta';
|
|
332
|
+
trace_version: number;
|
|
333
|
+
run_id: string;
|
|
334
|
+
ts: string;
|
|
335
|
+
}
|
|
336
|
+
export type PersistedTraceRecord = ScenarioRunTraceRecord | TraceFileLegacyMeta | Record<string, unknown>;
|
|
360
337
|
export interface ScenarioRunResult {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
338
|
+
run_index: number;
|
|
339
|
+
request_id?: string;
|
|
340
|
+
pass: boolean;
|
|
341
|
+
error?: string;
|
|
342
|
+
failures: string[];
|
|
343
|
+
check_results?: CheckResult[];
|
|
344
|
+
tool_calls: string[];
|
|
345
|
+
tool_call_count: number;
|
|
346
|
+
tool_sequence: string[];
|
|
347
|
+
tool_usage: Record<string, number>;
|
|
348
|
+
tool_durations_ms: number[];
|
|
349
|
+
run_duration_ms?: number;
|
|
350
|
+
final_text: string;
|
|
351
|
+
extracted: Record<string, string | number | boolean | null>;
|
|
375
352
|
}
|
|
376
353
|
export interface ScenarioAggregate {
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
export type HealthMcpConnectionInfo =
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
serverPackageVersion: string;
|
|
407
|
-
environment: {
|
|
354
|
+
scenario_id: string;
|
|
355
|
+
scenario_name?: string;
|
|
356
|
+
agent: string;
|
|
357
|
+
provider?: string;
|
|
358
|
+
model?: string;
|
|
359
|
+
eval?: EvalRules;
|
|
360
|
+
tool_constraints_stats?: {
|
|
361
|
+
required: Record<string, number>;
|
|
362
|
+
forbidden: Record<string, number>;
|
|
363
|
+
};
|
|
364
|
+
runs: ScenarioRunResult[];
|
|
365
|
+
pass_rate: number;
|
|
366
|
+
distinct_sequences: Record<string, number>;
|
|
367
|
+
tool_usage_frequency: Record<string, number>;
|
|
368
|
+
extracted_values: Record<string, Record<string, number>>;
|
|
369
|
+
last_final_answer: string;
|
|
370
|
+
}
|
|
371
|
+
export type HealthMcpConnectionInfo = {
|
|
372
|
+
enabled: false;
|
|
373
|
+
} | {
|
|
374
|
+
enabled: true;
|
|
375
|
+
transport: 'streamable-http';
|
|
376
|
+
host: string;
|
|
377
|
+
port: number;
|
|
378
|
+
path: string;
|
|
379
|
+
proxyUrl: string;
|
|
380
|
+
directUrl: string;
|
|
381
|
+
serverPackageVersion: string;
|
|
382
|
+
environment: {
|
|
408
383
|
MCP_HOST: string;
|
|
409
384
|
MCP_PORT: string;
|
|
410
385
|
MCP_PATH: string;
|
|
411
|
-
};
|
|
412
386
|
};
|
|
387
|
+
};
|
|
413
388
|
export interface ResultsJson {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
389
|
+
metadata: {
|
|
390
|
+
run_id: string;
|
|
391
|
+
timestamp: string;
|
|
392
|
+
run_note?: string;
|
|
393
|
+
git_commit?: string;
|
|
394
|
+
config_hash: string;
|
|
395
|
+
langsmith_trace_urls?: Record<string, string>;
|
|
396
|
+
config_path?: string;
|
|
397
|
+
config_name?: string;
|
|
398
|
+
rerun_agents?: string[];
|
|
399
|
+
rerun_scenario_ids?: string[];
|
|
400
|
+
rerun_server_override_all?: string[];
|
|
401
|
+
rerun_scenario_server_overrides?: Record<string, string[]>;
|
|
402
|
+
tool_tokens_total?: number | null;
|
|
403
|
+
total_duration_ms?: number;
|
|
404
|
+
total_tool_duration_ms?: number;
|
|
405
|
+
cli_version: string;
|
|
406
|
+
mcp_server_versions: Record<string, string | null>;
|
|
407
|
+
};
|
|
408
|
+
summary: {
|
|
409
|
+
total_scenarios: number;
|
|
410
|
+
total_runs: number;
|
|
411
|
+
pass_rate: number;
|
|
412
|
+
avg_tool_calls_per_run: number;
|
|
413
|
+
avg_tool_latency_ms: number | null;
|
|
414
|
+
};
|
|
415
|
+
scenarios: ScenarioAggregate[];
|
|
441
416
|
}
|
|
442
|
-
//# sourceMappingURL=types.d.ts.map
|
|
417
|
+
//# sourceMappingURL=types.d.ts.map
|