@inspectr/mcplab 1.14.0 → 1.14.1
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/app/assets/{index-B3_k1eZO.js → index-P8sMM8bG.js} +48 -48
- package/dist/app/index.html +1 -1
- package/dist/app-server/app-context.d.ts +141 -90
- package/dist/app-server/http.d.ts +1 -1
- package/dist/app-server/oauth-debugger-domain.d.ts +203 -182
- package/dist/app-server/oauth-debugger.d.ts +17 -10
- package/dist/app-server/scenario-assistant-domain.js +1 -1
- package/dist/app-server/scenario-assistant-domain.js.map +1 -1
- package/dist/app-server/tool-analysis-domain.d.ts +178 -163
- package/package.json +1 -1
|
@@ -4,201 +4,216 @@ import { McpClientManager } from '@inspectr/mcplab-core';
|
|
|
4
4
|
import type { AppSettings } from './types.js';
|
|
5
5
|
import { type OAuthSessionManager } from './oauth-session-manager.js';
|
|
6
6
|
type JobEvent = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
type: 'started' | 'log' | 'completed' | 'error';
|
|
8
|
+
ts: string;
|
|
9
|
+
payload: Record<string, unknown>;
|
|
10
10
|
};
|
|
11
11
|
export interface ToolAnalysisFinding {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
id: string;
|
|
13
|
+
scope:
|
|
14
|
+
| 'tool_name'
|
|
15
|
+
| 'description'
|
|
16
|
+
| 'schema'
|
|
17
|
+
| 'ergonomics'
|
|
18
|
+
| 'safety'
|
|
19
|
+
| 'eval_readiness'
|
|
20
|
+
| 'execution';
|
|
21
|
+
severity: 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
22
|
+
title: string;
|
|
23
|
+
detail: string;
|
|
24
|
+
suggestion?: string;
|
|
18
25
|
}
|
|
19
26
|
interface ToolAnalysisSuggestedSchemaChange {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
type: 'description' | 'parameter' | 'required' | 'enum' | 'constraints' | 'examples' | 'naming';
|
|
28
|
+
summary: string;
|
|
29
|
+
before?: string;
|
|
30
|
+
after?: string;
|
|
24
31
|
}
|
|
25
32
|
interface ToolAnalysisToolReport {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
33
|
+
serverName: string;
|
|
34
|
+
toolName: string;
|
|
35
|
+
publicToolName: string;
|
|
36
|
+
title?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
inputSchema?: unknown;
|
|
39
|
+
outputSchema?: unknown;
|
|
40
|
+
safetyClassification: 'read_only' | 'unsafe_or_unknown';
|
|
41
|
+
classificationReason: string;
|
|
42
|
+
metadataReview?: {
|
|
43
|
+
strengths: string[];
|
|
44
|
+
issues: ToolAnalysisFinding[];
|
|
45
|
+
suggestedDescription?: string;
|
|
46
|
+
suggestedSchemaChanges: ToolAnalysisSuggestedSchemaChange[];
|
|
47
|
+
evalReadinessNotes: string[];
|
|
48
|
+
};
|
|
49
|
+
deeperAnalysis?: {
|
|
50
|
+
attempted: boolean;
|
|
51
|
+
skippedReason?: string;
|
|
52
|
+
sampleCalls: Array<{
|
|
53
|
+
callIndex: number;
|
|
54
|
+
arguments: unknown;
|
|
55
|
+
ok: boolean;
|
|
56
|
+
durationMs?: number;
|
|
57
|
+
resultPreview?: string;
|
|
58
|
+
error?: string;
|
|
59
|
+
observations: string[];
|
|
60
|
+
issues: ToolAnalysisFinding[];
|
|
61
|
+
}>;
|
|
62
|
+
overallObservations: string[];
|
|
63
|
+
};
|
|
64
|
+
overallRecommendations: string[];
|
|
58
65
|
}
|
|
59
66
|
interface ToolAnalysisServerReport {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
serverName: string;
|
|
68
|
+
toolCountDiscovered: number;
|
|
69
|
+
toolCountAnalyzed: number;
|
|
70
|
+
toolCountSkipped: number;
|
|
71
|
+
warnings: string[];
|
|
72
|
+
tools: ToolAnalysisToolReport[];
|
|
66
73
|
}
|
|
67
74
|
export interface ToolAnalysisReport {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
};
|
|
75
|
+
schemaVersion: 1;
|
|
76
|
+
createdAt: string;
|
|
77
|
+
assistantAgentName: string;
|
|
78
|
+
assistantAgentModel: string;
|
|
79
|
+
modes: {
|
|
80
|
+
metadataReview: boolean;
|
|
81
|
+
deeperAnalysis: boolean;
|
|
82
|
+
};
|
|
83
|
+
settings: {
|
|
84
|
+
autoRunPolicy?: 'read_only_allowlist';
|
|
85
|
+
sampleCallsPerTool?: number;
|
|
86
|
+
toolCallTimeoutMs?: number;
|
|
87
|
+
maxParallelTools?: number;
|
|
88
|
+
};
|
|
89
|
+
summary: {
|
|
90
|
+
serversAnalyzed: number;
|
|
91
|
+
toolsAnalyzed: number;
|
|
92
|
+
toolsSkipped: number;
|
|
93
|
+
issueCounts: {
|
|
94
|
+
critical: number;
|
|
95
|
+
high: number;
|
|
96
|
+
medium: number;
|
|
97
|
+
low: number;
|
|
98
|
+
info: number;
|
|
93
99
|
};
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
100
|
+
};
|
|
101
|
+
servers: ToolAnalysisServerReport[];
|
|
102
|
+
findings: ToolAnalysisFinding[];
|
|
103
|
+
mcpServerVersions?: Record<string, string | null>;
|
|
97
104
|
}
|
|
98
105
|
export interface ToolAnalysisJob {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
id: string;
|
|
107
|
+
status: 'running' | 'completed' | 'error' | 'stopped';
|
|
108
|
+
events: JobEvent[];
|
|
109
|
+
clients: Set<ServerResponse>;
|
|
110
|
+
abortController: AbortController;
|
|
111
|
+
result?: ToolAnalysisReport;
|
|
112
|
+
savedReportId?: string;
|
|
113
|
+
savedReportPath?: string;
|
|
107
114
|
}
|
|
108
115
|
interface ToolAnalysisToolContext {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
serverName: string;
|
|
117
|
+
tool: ToolDef;
|
|
118
|
+
safetyClassification: 'read_only' | 'unsafe_or_unknown';
|
|
119
|
+
classificationReason: string;
|
|
113
120
|
}
|
|
114
121
|
interface ToolAnalysisMetadataPayload {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
serverName: string;
|
|
123
|
+
toolName: string;
|
|
124
|
+
title: string;
|
|
125
|
+
description: string;
|
|
126
|
+
inputSchema: unknown;
|
|
127
|
+
outputSchema: unknown;
|
|
128
|
+
projectGoal: string;
|
|
122
129
|
}
|
|
123
130
|
interface ToolAnalysisSamplePlanPayload {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
serverName: string;
|
|
132
|
+
toolName: string;
|
|
133
|
+
title: string;
|
|
134
|
+
description: string;
|
|
135
|
+
inputSchema: unknown;
|
|
136
|
+
outputSchema: unknown;
|
|
137
|
+
maxCalls: number;
|
|
131
138
|
}
|
|
132
139
|
interface ToolAnalysisExecutionReviewPayload {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
serverName: string;
|
|
141
|
+
toolName: string;
|
|
142
|
+
title: string;
|
|
143
|
+
arguments: unknown;
|
|
144
|
+
resultPreview: string;
|
|
145
|
+
description: string;
|
|
146
|
+
inputSchema: unknown;
|
|
147
|
+
outputSchema: unknown;
|
|
141
148
|
}
|
|
142
|
-
export declare function classifyToolSafety(
|
|
143
|
-
|
|
144
|
-
|
|
149
|
+
export declare function classifyToolSafety(
|
|
150
|
+
toolName: string,
|
|
151
|
+
inputSchema?: unknown,
|
|
152
|
+
annotations?: ToolDef['annotations']
|
|
153
|
+
): {
|
|
154
|
+
safetyClassification: 'read_only' | 'unsafe_or_unknown';
|
|
155
|
+
classificationReason: string;
|
|
145
156
|
};
|
|
146
157
|
export declare function parseJsonFromAssistantText<T = unknown>(text: string): T;
|
|
147
158
|
export declare function buildToolAnalysisMetadataPayload(params: {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
159
|
+
serverName: string;
|
|
160
|
+
toolName: string;
|
|
161
|
+
title?: string;
|
|
162
|
+
description?: string;
|
|
163
|
+
inputSchema?: unknown;
|
|
164
|
+
outputSchema?: unknown;
|
|
154
165
|
}): ToolAnalysisMetadataPayload;
|
|
155
166
|
export declare function buildToolAnalysisSamplePlanPayload(params: {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
167
|
+
serverName: string;
|
|
168
|
+
toolName: string;
|
|
169
|
+
title?: string;
|
|
170
|
+
description?: string;
|
|
171
|
+
inputSchema?: unknown;
|
|
172
|
+
outputSchema?: unknown;
|
|
173
|
+
maxCalls: number;
|
|
163
174
|
}): ToolAnalysisSamplePlanPayload;
|
|
164
175
|
export declare function buildToolAnalysisExecutionReviewPayload(params: {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
176
|
+
serverName: string;
|
|
177
|
+
toolName: string;
|
|
178
|
+
title?: string;
|
|
179
|
+
arguments: unknown;
|
|
180
|
+
resultPreview: string;
|
|
181
|
+
description?: string;
|
|
182
|
+
inputSchema?: unknown;
|
|
183
|
+
outputSchema?: unknown;
|
|
173
184
|
}): ToolAnalysisExecutionReviewPayload;
|
|
174
|
-
export declare function discoverMcpToolsForServers(
|
|
185
|
+
export declare function discoverMcpToolsForServers(
|
|
186
|
+
serversByName: EvalConfig['servers'],
|
|
187
|
+
serverNames: string[],
|
|
188
|
+
options?: {
|
|
175
189
|
serverAuthHeaders?: Record<string, Record<string, string>>;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
190
|
+
}
|
|
191
|
+
): Promise<{
|
|
192
|
+
mcp: McpClientManager;
|
|
193
|
+
servers: Array<{
|
|
194
|
+
serverName: string;
|
|
195
|
+
warnings: string[];
|
|
196
|
+
tools: ToolAnalysisToolContext[];
|
|
197
|
+
}>;
|
|
183
198
|
}>;
|
|
184
199
|
export declare function runToolAnalysisJob(params: {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
job: ToolAnalysisJob;
|
|
201
|
+
settings: AppSettings;
|
|
202
|
+
requestedAssistantAgentName?: string;
|
|
203
|
+
serverNames: string[];
|
|
204
|
+
oauthSessionManager: OAuthSessionManager;
|
|
205
|
+
hostHeader?: string;
|
|
206
|
+
selectedToolsByServer?: Record<string, string[]>;
|
|
207
|
+
modes: {
|
|
208
|
+
metadataReview: boolean;
|
|
209
|
+
deeperAnalysis: boolean;
|
|
210
|
+
};
|
|
211
|
+
deeper: {
|
|
212
|
+
autoRunPolicy: 'read_only_allowlist';
|
|
213
|
+
sampleCallsPerTool: number;
|
|
214
|
+
toolCallTimeoutMs: number;
|
|
215
|
+
};
|
|
216
|
+
maxParallelTools: number;
|
|
202
217
|
}): Promise<void>;
|
|
203
218
|
export {};
|
|
204
|
-
//# sourceMappingURL=tool-analysis-domain.d.ts.map
|
|
219
|
+
//# sourceMappingURL=tool-analysis-domain.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inspectr/mcplab",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.1",
|
|
4
4
|
"description": "MCPLab - Test and evaluate MCP servers with LLMs — run evals, compare agents and launch the MCPLab web app",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://mcplab.inspectr.dev",
|