@mcpjam/cli 3.16.0 → 3.17.0

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, validateToolCallResult, isCallToolResultError, buildToolCallValidationReport, listResources, readResource, SubscriptionCoordinator, listTools, listPrompts, getPrompt, MCPAppsConformanceTest, MCPAppsConformanceSuite, MCPTasksConformanceTest, runOAuthLogin, OAuthConformanceTest, OAuthConformanceSuite, runXaaFlow, MCPConformanceTest, MCPConformanceSuite, withEphemeralClient, diffServerSnapshots, ServerSnapshotFormatError, renderStructuredRunJUnitXml, renderStructuredRunJson, DEFAULT_SUBSCRIPTION_RECONNECT_POLICY, toConformanceReport, renderConformanceReportJUnitXml, renderConformanceReportJson, formatOAuthConformanceHuman, formatOAuthConformanceSuiteHuman, fetchOAuthMetadata, executeOAuthProxy, executeDebugOAuthProxy, normalizeRegistrationStrategy, normalizeXaaClientAuth, normalizeIdentityAssertionFormat, IDENTITY_ASSERTION_FORMATS, XAA_CONFIDENTIAL_CIMD_ORIGIN, getLocalConfidentialCimdProvider, isKnownProtocolVersion, MCP_PROTOCOL_VERSIONS, generateRandomString, generateCodeChallenge, createInteractiveAuthorizationSession, openUrlInBrowser, MCPClientManager, 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, redactSensitiveValue, runServerDoctor, collectServerSnapshot, serializeStableServerSnapshot, serializeServerSnapshot, buildServerDiffReport, validateToolCallResult, isCallToolResultError, buildToolCallValidationReport, listResources, readResource, SubscriptionCoordinator, listTools, listPrompts, getPrompt, MCPAppsConformanceTest, MCPAppsConformanceSuite, MCPTasksConformanceTest, runOAuthLogin, OAuthConformanceTest, OAuthConformanceSuite, runXaaFlow, MCPConformanceTest, MCPConformanceSuite, withEphemeralClient, diffServerSnapshots, ServerSnapshotFormatError, renderStructuredRunJUnitXml, renderStructuredRunJson, DEFAULT_SUBSCRIPTION_RECONNECT_POLICY, isKnownProtocolVersion, 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, 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.16.0"};
28
+ version: "3.17.0"};
29
29
 
30
30
  // src/lib/output.ts
31
31
  var DEFAULT_OUTPUT_FORMAT = "json";
@@ -2673,6 +2673,9 @@ function registerAppsCommands(program) {
2673
2673
  ).option(
2674
2674
  "--reporter <reporter>",
2675
2675
  "Structured reporter output: json-summary or junit-xml"
2676
+ ).option(
2677
+ "--protocol-version <version>",
2678
+ "Pin the MCP protocol version for the conformance connection (e.g. 2026-07-28). HTTP targets only."
2676
2679
  )
2677
2680
  ).action(async (options, command) => {
2678
2681
  const reporter = parseReporterFormat(options.reporter);
@@ -2978,8 +2981,22 @@ function buildAppsConformanceConfig(options) {
2978
2981
  )
2979
2982
  )
2980
2983
  ) : void 0;
2984
+ const trimmedProtocolVersion = options.protocolVersion?.trim();
2985
+ let mcpProtocolVersion;
2986
+ if (trimmedProtocolVersion) {
2987
+ if (!isKnownProtocolVersion(trimmedProtocolVersion)) {
2988
+ throw usageError(`Unknown --protocol-version: ${trimmedProtocolVersion}`);
2989
+ }
2990
+ if (!("url" in serverConfig) || !serverConfig.url) {
2991
+ throw usageError(
2992
+ "--protocol-version can only be used with an HTTP target (--url)."
2993
+ );
2994
+ }
2995
+ mcpProtocolVersion = trimmedProtocolVersion;
2996
+ }
2981
2997
  return {
2982
2998
  ...serverConfig,
2999
+ ...mcpProtocolVersion ? { mcpProtocolVersion } : {},
2983
3000
  ...resolvedCheckIds && resolvedCheckIds.length > 0 ? { checkIds: resolvedCheckIds } : {}
2984
3001
  };
2985
3002
  }
@@ -4549,8 +4566,11 @@ function registerEnvironmentsCommands(program) {
4549
4566
  environments.command("create").description(
4550
4567
  "Create a project environment (requires project admin). Body fields may be supplied via --file/--json"
4551
4568
  ).option("--project <id-or-name>", "Project name or ID").option("--name <name>", "Display name for the new environment").option("--host-id <id>", "ID of the host this environment runs against").option("--description <text>", "Optional description").option(
4569
+ "--sandbox-image <id>",
4570
+ "Project-shared sandbox image (see `mcpjam images`) to pin: eval runs boot a fresh sandbox from it"
4571
+ ).option(
4552
4572
  "--file <path>",
4553
- "Environment JSON file with any of name/hostId/description/serverAttachmentId/skillSelection/pluginVersionIds (or - for stdin)"
4573
+ "Environment JSON file with any of name/hostId/description/serverAttachmentId/skillSelection/pluginVersionIds/sandboxImageId (or - for stdin)"
4554
4574
  ).option("--json <json>", "Inline environment JSON (or @file, or -)")
4555
4575
  ).action(
4556
4576
  async (options, command) => {
@@ -4561,7 +4581,8 @@ function registerEnvironmentsCommands(program) {
4561
4581
  ...options.project !== void 0 ? { project: options.project } : {},
4562
4582
  ...options.name !== void 0 ? { name: options.name } : {},
4563
4583
  ...options.hostId !== void 0 ? { hostId: options.hostId } : {},
4564
- ...options.description !== void 0 ? { description: options.description } : {}
4584
+ ...options.description !== void 0 ? { description: options.description } : {},
4585
+ ...options.sandboxImage !== void 0 ? { sandboxImageId: options.sandboxImage } : {}
4565
4586
  });
4566
4587
  const result = await runPlatformCommand2(
4567
4588
  options,
@@ -4573,13 +4594,16 @@ function registerEnvironmentsCommands(program) {
4573
4594
  );
4574
4595
  addPlatformOptions2(
4575
4596
  environments.command("update").description(
4576
- "Edit an environment. Only the fields you pass change; use --file/--json with a null value to clear serverAttachmentId, skillSelection, or pluginVersionIds"
4597
+ "Edit an environment. Only the fields you pass change; use --file/--json with a null value to clear serverAttachmentId, skillSelection, pluginVersionIds, or sandboxImageId"
4577
4598
  ).requiredOption("--environment <id-or-name>", "Environment name or ID").requiredOption(
4578
4599
  "--expected-revision <n>",
4579
4600
  "The revision you last read (from `environments get`); a stale value is rejected instead of overwriting a concurrent edit"
4580
4601
  ).option("--project <id-or-name>", "Project name or ID").option("--name <name>", "New display name").option("--host-id <id>", "New host for this environment").option(
4581
4602
  "--description <text>",
4582
4603
  "New description (empty string clears it)"
4604
+ ).option(
4605
+ "--sandbox-image <id>",
4606
+ `New sandbox-image pin (clear via --json '{"sandboxImageId": null}')`
4583
4607
  ).option(
4584
4608
  "--file <path>",
4585
4609
  "Environment JSON file with the fields to change (or - for stdin)"
@@ -4595,7 +4619,8 @@ function registerEnvironmentsCommands(program) {
4595
4619
  expectedRevision: parseRevision(options.expectedRevision),
4596
4620
  ...options.name !== void 0 ? { name: options.name } : {},
4597
4621
  ...options.hostId !== void 0 ? { hostId: options.hostId } : {},
4598
- ...options.description !== void 0 ? { description: options.description } : {}
4622
+ ...options.description !== void 0 ? { description: options.description } : {},
4623
+ ...options.sandboxImage !== void 0 ? { sandboxImageId: options.sandboxImage } : {}
4599
4624
  });
4600
4625
  const result = await runPlatformCommand2(
4601
4626
  options,