@mcpjam/cli 3.20.0 → 3.20.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/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { Command, CommanderError } from 'commander';
3
3
  import { realpathSync, mkdirSync, writeFileSync, readFileSync, existsSync, statSync, closeSync, renameSync, openSync } from 'fs';
4
4
  import { pathToFileURL } from 'url';
5
- import { probeMcpServer, redactSensitiveValue, runServerDoctor, collectServerSnapshot, serializeStableServerSnapshot, serializeServerSnapshot, buildServerDiffReport, classifyMcpHeader, validateToolCallResult, isCallToolResultError, buildToolCallValidationReport, listResources, readResource, SubscriptionCoordinator, listTools, listPrompts, getPrompt, MCPAppsConformanceTest, scoreFromAppsResult, MCPAppsConformanceSuite, MCPTasksConformanceTest, scoreFromTasksResult, runOAuthLogin, OAuthConformanceTest, scoreFromOAuthResult, OAuthConformanceSuite, runXaaFlow, MCPConformanceTest, scoreFromProtocolResult, MCPConformanceSuite, withEphemeralClient, diffServerSnapshots, ServerSnapshotFormatError, renderStructuredRunJUnitXml, renderStructuredRunJson, DEFAULT_SUBSCRIPTION_RECONNECT_POLICY, isKnownProtocolVersion, describeConformanceScore, toConformanceReport, renderConformanceReportJUnitXml, renderConformanceReportJson, formatOAuthConformanceHuman, formatOAuthConformanceSuiteHuman, fetchOAuthMetadata, executeOAuthProxy, executeDebugOAuthProxy, normalizeRegistrationStrategy, normalizeXaaClientAuth, normalizeIdentityAssertionFormat, IDENTITY_ASSERTION_FORMATS, XAA_CONFIDENTIAL_CIMD_ORIGIN, getLocalConfidentialCimdProvider, MCP_PROTOCOL_VERSIONS, generateRandomString, generateCodeChallenge, createInteractiveAuthorizationSession, openUrlInBrowser, MCPClientManager, decodeMcpHeaderValue, canDeclareTasksExtension, createStrictElicitationContentValidator, MCP_APPS_CHECK_CATEGORIES, MCP_APPS_CHECK_IDS, MCP_TASKS_CHECK_CATEGORIES, MCP_TASKS_CHECK_IDS, OAuthProxyError, isLoopbackHost, MCP_CHECK_CATEGORIES, MCP_CHECK_IDS, TaskLifecycleEngine, driveTaskToTerminal, extensionTaskToObservation, legacyTaskToObservation, isUnknownTaskError, isMCPTasksWireError, LEGACY_TASK_STATUSES } from '@mcpjam/sdk';
5
+ import { probeMcpServer, redactForTelemetry, runServerDoctor, collectServerSnapshot, serializeStableServerSnapshot, serializeServerSnapshot, buildServerDiffReport, classifyMcpHeader, validateToolCallResult, isCallToolResultError, buildToolCallValidationReport, listResources, readResource, SubscriptionCoordinator, listTools, listPrompts, getPrompt, MCPAppsConformanceTest, scoreFromAppsResult, MCPAppsConformanceSuite, MCPTasksConformanceTest, scoreFromTasksResult, runOAuthLogin, OAuthConformanceTest, scoreFromOAuthResult, OAuthConformanceSuite, runXaaFlow, MCPConformanceTest, scoreFromProtocolResult, MCPConformanceSuite, withEphemeralClient, diffServerSnapshots, ServerSnapshotFormatError, renderStructuredRunJUnitXml, renderStructuredRunJson, DEFAULT_SUBSCRIPTION_RECONNECT_POLICY, isKnownProtocolVersion, describeConformanceScore, toConformanceReport, renderConformanceReportJUnitXml, renderConformanceReportJson, formatOAuthConformanceHuman, formatOAuthConformanceSuiteHuman, fetchOAuthMetadata, executeOAuthProxy, executeDebugOAuthProxy, normalizeRegistrationStrategy, normalizeXaaClientAuth, normalizeIdentityAssertionFormat, IDENTITY_ASSERTION_FORMATS, XAA_CONFIDENTIAL_CIMD_ORIGIN, getLocalConfidentialCimdProvider, MCP_PROTOCOL_VERSIONS, generateRandomString, generateCodeChallenge, createInteractiveAuthorizationSession, openUrlInBrowser, MCPClientManager, decodeMcpHeaderValue, canDeclareTasksExtension, createStrictElicitationContentValidator, MCP_APPS_CHECK_CATEGORIES, MCP_APPS_CHECK_IDS, MCP_TASKS_CHECK_CATEGORIES, MCP_TASKS_CHECK_IDS, OAuthProxyError, isLoopbackHost, MCP_CHECK_CATEGORIES, MCP_CHECK_IDS, TaskLifecycleEngine, driveTaskToTerminal, extensionTaskToObservation, legacyTaskToObservation, isUnknownTaskError, isMCPTasksWireError, LEGACY_TASK_STATUSES } from '@mcpjam/sdk';
6
6
  import { mkdir, writeFile, readFile, chmod, rename, rm } from 'fs/promises';
7
7
  import path2, { dirname, join, basename } from 'path';
8
8
  import { randomUUID } from 'crypto';
@@ -25,7 +25,7 @@ import { WebSocket } from 'ws';
25
25
 
26
26
  // package.json
27
27
  var package_default = {
28
- version: "3.20.0"};
28
+ version: "3.20.1"};
29
29
  function conformanceExitCode(result) {
30
30
  if (result.outcome === "incomplete") return 3;
31
31
  if (result.outcome === "failed") return 1;
@@ -532,7 +532,7 @@ function getCliRpcLogEvents(collectors) {
532
532
  function redactCliRpcLogs(logs) {
533
533
  return logs.map((event) => ({
534
534
  ...event,
535
- message: redactSensitiveValue(event.message)
535
+ message: redactForTelemetry(event.message)
536
536
  }));
537
537
  }
538
538
 
@@ -642,7 +642,7 @@ function assertNoCredentialsFileAuthConflicts(options) {
642
642
  );
643
643
  }
644
644
  function redactCredentialsFromResult(result, credentialsFilePath) {
645
- const redacted = redactSensitiveValue(result);
645
+ const redacted = redactForTelemetry(result);
646
646
  const credentials = result.credentials ?? {};
647
647
  const hasCredentials = Object.keys(credentials).length > 0;
648
648
  const secretMarker = credentialsFilePath ? "[SAVED_TO_FILE]" : "[REDACTED]";
@@ -2259,7 +2259,7 @@ function buildDebugArtifactEnvelope(options) {
2259
2259
  if (rpcLogs.length > 0) {
2260
2260
  payload._rpcLogs = rpcLogs;
2261
2261
  }
2262
- return redactSensitiveValue(payload);
2262
+ return redactForTelemetry(payload);
2263
2263
  }
2264
2264
  function buildCommandArtifactError(code, message, details) {
2265
2265
  return {
@@ -2282,7 +2282,7 @@ async function writeBinaryArtifact(outputPath, data) {
2282
2282
  }
2283
2283
  async function writeDebugArtifact(outputPath, payload) {
2284
2284
  const resolvedPath = path2.resolve(process.cwd(), outputPath);
2285
- const redactedPayload = redactSensitiveValue(payload);
2285
+ const redactedPayload = redactForTelemetry(payload);
2286
2286
  try {
2287
2287
  await mkdir(path2.dirname(resolvedPath), { recursive: true });
2288
2288
  await writeFile(
@@ -6905,7 +6905,7 @@ function createMcpJamMcpServer(options) {
6905
6905
  target: summarizeServerDoctorTarget(target, config),
6906
6906
  timeout: input.timeoutMs ?? defaultTimeoutMs
6907
6907
  });
6908
- return redactSensitiveValue(result);
6908
+ return redactForTelemetry(result);
6909
6909
  })
6910
6910
  );
6911
6911
  server.registerTool(
@@ -6929,7 +6929,7 @@ function createMcpJamMcpServer(options) {
6929
6929
  headers,
6930
6930
  timeoutMs: timeoutMs ?? defaultTimeoutMs
6931
6931
  });
6932
- return redactSensitiveValue(result);
6932
+ return redactForTelemetry(result);
6933
6933
  })
6934
6934
  );
6935
6935
  let closed = false;
@@ -7473,10 +7473,10 @@ function redactOAuthConformanceResult(result, options) {
7473
7473
  options.credentialsFilePath
7474
7474
  );
7475
7475
  }
7476
- return redactSensitiveValue(result);
7476
+ return redactForTelemetry(result);
7477
7477
  }
7478
7478
  function redactOAuthConformanceSuiteResult(result, options) {
7479
- const redacted = redactSensitiveValue(result);
7479
+ const redacted = redactForTelemetry(result);
7480
7480
  if (options.credentialsFilePath) {
7481
7481
  redacted.credentialsFile = options.credentialsFilePath;
7482
7482
  }
@@ -8287,7 +8287,7 @@ function printRegistrationNotes(result, quiet) {
8287
8287
  function redactXaaResult(result) {
8288
8288
  const rawIdJag = result.idJag?.token;
8289
8289
  const masked = result.idJag ? { ...result, idJag: { ...result.idJag, token: "[REDACTED]" } } : result;
8290
- const scrubbed = redactSensitiveValue(masked);
8290
+ const scrubbed = redactForTelemetry(masked);
8291
8291
  const afterRaw = rawIdJag ? replaceRawValue(scrubbed, rawIdJag) : scrubbed;
8292
8292
  return result.registration ? { ...afterRaw, registration: result.registration } : afterRaw;
8293
8293
  }
@@ -8812,7 +8812,7 @@ function registerServerCommands(program) {
8812
8812
  throw operationalError("Probe did not return a result.");
8813
8813
  }
8814
8814
  writeResult(
8815
- redactSensitiveValue(result),
8815
+ redactForTelemetry(result),
8816
8816
  globalOptions.format
8817
8817
  );
8818
8818
  if (result.status === "error") {
@@ -8841,7 +8841,7 @@ function registerServerCommands(program) {
8841
8841
  retryPolicy
8842
8842
  });
8843
8843
  const rawPayload = globalOptions.rpc ? attachCliRpcLogs(result, collector) : result;
8844
- const jsonPayload = redactSensitiveValue(rawPayload);
8844
+ const jsonPayload = redactForTelemetry(rawPayload);
8845
8845
  const artifactPath = options.out ? await writeDebugArtifact(options.out, jsonPayload) : void 0;
8846
8846
  if (globalOptions.format === "human") {
8847
8847
  process.stdout.write(