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