@inspectr/mcplab-mcp-server 1.2.0 → 1.2.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/http-handler.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/mcp-run-calculations.d.ts +41 -33
- package/dist/prompts.d.ts +1 -1
- package/dist/runtime.d.ts +21 -14
- package/dist/server-factory.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/package.json +3 -3
package/dist/http-handler.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1,56 @@
|
|
|
1
1
|
import type { ResultsJson } from '@inspectr/mcplab-core';
|
|
2
2
|
type AggregateGroupBy = 'run' | 'scenario' | 'agent';
|
|
3
3
|
type MetricSummary = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
total_runs: number;
|
|
5
|
+
passed_runs: number;
|
|
6
|
+
failed_runs: number;
|
|
7
|
+
pass_rate: number;
|
|
8
|
+
avg_tool_calls_per_run: number;
|
|
9
|
+
avg_tool_latency_ms: number | null;
|
|
10
10
|
};
|
|
11
11
|
type AggregateGroupRow = MetricSummary & {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
key: string;
|
|
13
|
+
run_id?: string;
|
|
14
|
+
scenario_id?: string;
|
|
15
|
+
agent?: string;
|
|
16
|
+
run_count: number;
|
|
17
|
+
timestamp_range?: {
|
|
18
|
+
min: string;
|
|
19
|
+
max: string;
|
|
20
|
+
};
|
|
21
21
|
};
|
|
22
22
|
type CompareClass = 'regressed' | 'improved' | 'unchanged' | 'new' | 'missing';
|
|
23
23
|
export type LoadedRunResult = {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
run_id: string;
|
|
25
|
+
path: string;
|
|
26
|
+
results: ResultsJson;
|
|
27
27
|
};
|
|
28
28
|
export declare function buildAggregateRunsReport(params: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
runs: LoadedRunResult[];
|
|
30
|
+
scenarioIds?: string[];
|
|
31
|
+
agents?: string[];
|
|
32
|
+
groupBy: AggregateGroupBy;
|
|
33
|
+
topN: number;
|
|
34
|
+
includeDetails: boolean;
|
|
35
35
|
}): Record<string, unknown>;
|
|
36
36
|
export declare function buildCompareRunsReport(params: {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
left: LoadedRunResult;
|
|
38
|
+
right: LoadedRunResult;
|
|
39
|
+
scenarioIds?: string[];
|
|
40
|
+
agents?: string[];
|
|
41
|
+
topN: number;
|
|
42
|
+
includeDetails: boolean;
|
|
43
43
|
}): Record<string, unknown>;
|
|
44
44
|
export declare function computeMetricSummary(scenarios: ResultsJson['scenarios']): MetricSummary;
|
|
45
|
-
export declare function buildAggregateRows(
|
|
46
|
-
|
|
45
|
+
export declare function buildAggregateRows(
|
|
46
|
+
runs: LoadedRunResult[],
|
|
47
|
+
groupBy: AggregateGroupBy,
|
|
48
|
+
scenarioFilter: Set<string> | null,
|
|
49
|
+
agentFilter: Set<string> | null
|
|
50
|
+
): AggregateGroupRow[];
|
|
51
|
+
export declare function classifyCompareRow(
|
|
52
|
+
left: MetricSummary | null,
|
|
53
|
+
right: MetricSummary | null
|
|
54
|
+
): CompareClass;
|
|
47
55
|
export {};
|
|
48
|
-
//# sourceMappingURL=mcp-run-calculations.d.ts.map
|
|
56
|
+
//# sourceMappingURL=mcp-run-calculations.d.ts.map
|
package/dist/prompts.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { registerPrompts } from './runtime.js';
|
|
2
|
-
//# sourceMappingURL=prompts.d.ts.map
|
|
2
|
+
//# sourceMappingURL=prompts.d.ts.map
|
package/dist/runtime.d.ts
CHANGED
|
@@ -2,27 +2,34 @@ import { type IncomingMessage, type ServerResponse } from 'node:http';
|
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
3
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
4
4
|
export type SessionRuntime = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
transport: StreamableHTTPServerTransport;
|
|
6
|
+
server: McpServer;
|
|
7
7
|
};
|
|
8
8
|
export interface McplabMcpServerOptions {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
host: string;
|
|
10
|
+
port: number;
|
|
11
|
+
path: string;
|
|
12
|
+
logger?: Pick<Console, 'log' | 'error'>;
|
|
13
13
|
}
|
|
14
14
|
export interface McplabMcpServerRuntime {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
host: string;
|
|
16
|
+
port: number;
|
|
17
|
+
path: string;
|
|
18
|
+
close(): Promise<void>;
|
|
19
19
|
}
|
|
20
|
-
export declare function startMcplabMcpServer(
|
|
20
|
+
export declare function startMcplabMcpServer(
|
|
21
|
+
options: McplabMcpServerOptions
|
|
22
|
+
): Promise<McplabMcpServerRuntime>;
|
|
21
23
|
export declare function defaultMcplabMcpServerOptionsFromEnv(): McplabMcpServerOptions;
|
|
22
24
|
export declare function createConfiguredServer(): McpServer;
|
|
23
25
|
export declare function registerTools(server: McpServer): void;
|
|
24
26
|
export declare function registerPrompts(server: McpServer): void;
|
|
25
|
-
export declare function handleMcplabMcpHttpRequest(
|
|
27
|
+
export declare function handleMcplabMcpHttpRequest(
|
|
28
|
+
req: IncomingMessage,
|
|
29
|
+
res: ServerResponse,
|
|
30
|
+
sessions: Map<string, SessionRuntime>,
|
|
31
|
+
options?: {
|
|
26
32
|
path?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
33
|
+
}
|
|
34
|
+
): Promise<void>;
|
|
35
|
+
//# sourceMappingURL=runtime.d.ts.map
|
package/dist/server-factory.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { createConfiguredServer } from './runtime.js';
|
|
2
|
-
//# sourceMappingURL=server-factory.d.ts.map
|
|
2
|
+
//# sourceMappingURL=server-factory.d.ts.map
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { registerTools } from './runtime.js';
|
|
2
|
-
//# sourceMappingURL=tools.d.ts.map
|
|
2
|
+
//# sourceMappingURL=tools.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inspectr/mcplab-mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "MCP server that exposes MCPLab evaluation tools — query runs, results, and traces via the Model Context Protocol",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"build": "rm -rf dist && tsc -b --force"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@inspectr/mcplab-core": "1.
|
|
54
|
-
"@inspectr/mcplab-reporting": "1.1.
|
|
53
|
+
"@inspectr/mcplab-core": "1.9.0",
|
|
54
|
+
"@inspectr/mcplab-reporting": "1.1.8",
|
|
55
55
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
56
56
|
"yaml": "^2.5.1",
|
|
57
57
|
"zod": "^3.25.0"
|