@gleanwork/mcp-server-tester 1.0.0-beta.2 → 1.0.0-beta.3
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 +13 -12
- package/dist/cli/index.js +5 -2
- package/dist/fixtures/mcp.d.ts +8 -0
- package/dist/fixtures/mcp.js +5 -2
- package/dist/fixtures/mcp.js.map +1 -1
- package/dist/index.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -7
- package/dist/index.d.ts +9 -7
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/reporters/ui-dist/app.js +4 -4
- package/package.json +3 -3
- package/src/reporters/ui-dist/app.js +4 -4
package/dist/index.cjs
CHANGED
|
@@ -4407,7 +4407,7 @@ function escapeHtml(text) {
|
|
|
4407
4407
|
|
|
4408
4408
|
// package.json
|
|
4409
4409
|
var package_default = {
|
|
4410
|
-
version: "1.0.0-beta.
|
|
4410
|
+
version: "1.0.0-beta.3"};
|
|
4411
4411
|
|
|
4412
4412
|
// src/mcp/clientFactory.ts
|
|
4413
4413
|
function getRetryAfterDelayMs(err) {
|
|
@@ -4498,7 +4498,10 @@ async function createMCPClientForConfig(config, options) {
|
|
|
4498
4498
|
validatedConfig.connectTimeoutMs !== void 0 ? { timeout: validatedConfig.connectTimeoutMs } : void 0
|
|
4499
4499
|
);
|
|
4500
4500
|
} else if (isHttpConfig(validatedConfig)) {
|
|
4501
|
-
const headers = {
|
|
4501
|
+
const headers = {
|
|
4502
|
+
"User-Agent": `@gleanwork/mcp-server-tester/${package_default.version}`,
|
|
4503
|
+
...validatedConfig.headers
|
|
4504
|
+
};
|
|
4502
4505
|
if (validatedConfig.auth?.clientCredentials && !options?.authProvider) {
|
|
4503
4506
|
const ccConfig = validatedConfig.auth.clientCredentials;
|
|
4504
4507
|
const clientId = ccConfig.clientId ?? process.env["MCP_CLIENT_ID"];
|
|
@@ -6951,7 +6954,6 @@ async function runEvalCase(evalCase, context, options = {}) {
|
|
|
6951
6954
|
const passCount = assertionResults.filter((r) => r.pass).length;
|
|
6952
6955
|
const assertionPassRate = assertionResults.length > 0 ? passCount / assertionResults.length : 0;
|
|
6953
6956
|
const infrastructureErrorRate = infraErrors.length / iterations;
|
|
6954
|
-
const accuracy = assertionPassRate;
|
|
6955
6957
|
const threshold = evalCase.accuracyThreshold ?? 1;
|
|
6956
6958
|
const baseResult = lastResult ?? {
|
|
6957
6959
|
id: evalCase.id,
|
|
@@ -6968,10 +6970,9 @@ async function runEvalCase(evalCase, context, options = {}) {
|
|
|
6968
6970
|
};
|
|
6969
6971
|
return {
|
|
6970
6972
|
...baseResult,
|
|
6971
|
-
pass:
|
|
6973
|
+
pass: assertionPassRate >= threshold,
|
|
6972
6974
|
assertionPassRate,
|
|
6973
6975
|
infrastructureErrorRate,
|
|
6974
|
-
accuracy,
|
|
6975
6976
|
iterationResults,
|
|
6976
6977
|
infrastructureErrorCount: infraErrors.length,
|
|
6977
6978
|
durationMs: iterationResults.reduce((sum, r) => sum + r.durationMs, 0)
|