@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/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.2"};
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 = { ...validatedConfig.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: accuracy >= threshold,
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)