@mcpjam/cli 5.15.0 → 5.16.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 +19 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Command, CommanderError, Option } from 'commander';
|
|
3
3
|
import { realpathSync, readFileSync, existsSync, mkdirSync, writeFileSync, unlinkSync, statSync, closeSync, renameSync, lstatSync, openSync } from 'fs';
|
|
4
4
|
import { pathToFileURL } from 'url';
|
|
5
|
-
import { MODEL_REASONING_EFFORTS, loadEvalSuiteFile, createSuiteFileRunner, runSuiteFile, SuiteFileRunError, formatLocalEvalRunSummary, renderStructuredRunJson, probeMcpServer, redactForTelemetry, runServerDoctor, collectServerSnapshot, serializeStableServerSnapshot, serializeServerSnapshot, buildServerDiffReport, classifyMcpHeader, validateToolCallResult, isCallToolResultError, buildToolCallValidationReport, listResources, readResource, listServerSkillCatalog, getVerifiedServerSkill, isServerSkillRefusalError, readVerifiedServerSkillFile, SubscriptionCoordinator, listTools, listPrompts, getPrompt, MCPAppsConformanceTest, scoreFromAppsResult, MCPAppsConformanceSuite, MCPTasksConformanceTest, scoreFromTasksResult, runOAuthLogin, OAuthConformanceTest, scoreFromOAuthResult, OAuthConformanceSuite, runXaaFlow, MCPConformanceTest, scoreFromProtocolResult, MCPConformanceSuite, runConformance, isConformanceReportingConfigured, reportConformanceRun, reportConformanceRunSafely, OPENAI_SUBMISSION_MODES, renderStructuredRunJUnitXml, renderStructuredRunHtml, withEphemeralClient, diffServerSnapshots, ServerSnapshotFormatError, DEFAULT_SUBSCRIPTION_RECONNECT_POLICY, isKnownProtocolVersion, describeConformanceScore, toConformanceReport, buildConformanceRunReport, renderConformanceReportJUnitXml, renderConformanceReportJson, formatOAuthConformanceHuman, formatOAuthConformanceSuiteHuman, fetchOAuthMetadata, executeOAuthProxy, executeDebugOAuthProxy, normalizeRegistrationStrategy, normalizeXaaClientAuth, normalizeIdentityAssertionFormat, IDENTITY_ASSERTION_FORMATS, XAA_CONFIDENTIAL_CIMD_ORIGIN, getLocalConfidentialCimdProvider, MCP_PROTOCOL_VERSIONS, gatherClaudeReadinessEvidence, gradeClaudeReadiness, gatherOpenAIReadinessEvidence, xmldomParseXml, gradeOpenAIReadiness, gatherMuseReadinessEvidence, gradeMuseReadiness, openUrlInBrowser, buildEvalRunReport, GATE_WAIVER_MAX_REASON_LENGTH, GATE_WAIVER_REASON_NOTICE, MCPClientManager, withSkillsExtensionCapability, detectCiMetadata, MCP_SKILLS_EXTENSION_ID, 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, OPENAI_SUBMISSION_MODE_SHAPES, createDirectoryPluginFileSource, collectZipArchiveObservations, createZipPluginFileSource, generateRandomString, generateCodeChallenge, createInteractiveAuthorizationSession, declareEvalSuiteFileValidity, formatEvalRunDecisionSummary, gateOutcomeVerdict, applyGateWaiver, formatGateReport, formatGateWaiverLine, detectFlakyCases, evaluateCompareGates, buildRunCompareReport, formatSuiteFileFindings, serializeEvalSuiteFile, MAX_SUITE_FILE_BYTES, buildCorpus, HostedOnlyCaseError, verifyCorpusLock, TaskLifecycleEngine, driveTaskToTerminal, extensionTaskToObservation, legacyTaskToObservation, readEvalRunDecisionSummary as readEvalRunDecisionSummary$1, buildEvalRunDecisionSummary, evaluateGates, gateInputFromPlatformRun, isGateWaiverInForce, calculateLatencyStats, CORPUS_LOCK_VERSION, suiteFilePointer, passRateFractionFromPercent, DEFAULT_MIN_EFFECT_SIZE, DEFAULT_MIN_SAMPLE_SIZE, planPlatformSuiteGradingUpdate, isUnknownTaskError, isMCPTasksWireError, LEGACY_TASK_STATUSES } from '@mcpjam/sdk';
|
|
5
|
+
import { MODEL_REASONING_EFFORTS, loadEvalSuiteFile, createSuiteFileRunner, runSuiteFile, SuiteFileRunError, formatLocalEvalRunSummary, renderStructuredRunJson, probeMcpServer, redactForTelemetry, runServerDoctor, collectServerSnapshot, serializeStableServerSnapshot, serializeServerSnapshot, buildServerDiffReport, classifyMcpHeader, validateToolCallResult, isCallToolResultError, buildToolCallValidationReport, listResources, readResource, listServerSkillCatalog, getVerifiedServerSkill, isServerSkillRefusalError, readVerifiedServerSkillFile, SubscriptionCoordinator, listTools, listPrompts, getPrompt, MCPAppsConformanceTest, scoreFromAppsResult, MCPAppsConformanceSuite, MCPTasksConformanceTest, scoreFromTasksResult, runOAuthLogin, OAuthConformanceTest, scoreFromOAuthResult, OAuthConformanceSuite, runXaaFlow, MCPConformanceTest, scoreFromProtocolResult, MCPConformanceSuite, runConformance, isConformanceReportingConfigured, reportConformanceRun, reportConformanceRunSafely, OPENAI_SUBMISSION_MODES, renderStructuredRunJUnitXml, renderStructuredRunHtml, withEphemeralClient, diffServerSnapshots, ServerSnapshotFormatError, DEFAULT_SUBSCRIPTION_RECONNECT_POLICY, isKnownProtocolVersion, describeConformanceScore, toConformanceReport, buildConformanceRunReport, renderConformanceReportJUnitXml, renderConformanceReportJson, formatOAuthConformanceHuman, formatOAuthConformanceSuiteHuman, fetchOAuthMetadata, executeOAuthProxy, executeDebugOAuthProxy, normalizeRegistrationStrategy, normalizeXaaClientAuth, normalizeIdentityAssertionFormat, IDENTITY_ASSERTION_FORMATS, XAA_CONFIDENTIAL_CIMD_ORIGIN, getLocalConfidentialCimdProvider, MCP_PROTOCOL_VERSIONS, gatherClaudeReadinessEvidence, gradeClaudeReadiness, gatherOpenAIReadinessEvidence, xmldomParseXml, gradeOpenAIReadiness, gatherMuseReadinessEvidence, gradeMuseReadiness, openUrlInBrowser, buildEvalRunReport, GATE_WAIVER_MAX_REASON_LENGTH, GATE_WAIVER_REASON_NOTICE, MCPClientManager, withSkillsExtensionCapability, detectCiMetadata, MCP_SKILLS_EXTENSION_ID, 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, OPENAI_SUBMISSION_MODE_SHAPES, createDirectoryPluginFileSource, collectZipArchiveObservations, createZipPluginFileSource, generateRandomString, generateCodeChallenge, createInteractiveAuthorizationSession, declareEvalSuiteFileValidity, aiRefusalClass, formatEvalRunDecisionSummary, gateOutcomeVerdict, applyGateWaiver, formatGateReport, formatGateWaiverLine, detectFlakyCases, evaluateCompareGates, buildRunCompareReport, formatSuiteFileFindings, serializeEvalSuiteFile, MAX_SUITE_FILE_BYTES, buildCorpus, HostedOnlyCaseError, verifyCorpusLock, TaskLifecycleEngine, driveTaskToTerminal, extensionTaskToObservation, legacyTaskToObservation, recognizedAiRefusalCode, readEvalRunDecisionSummary as readEvalRunDecisionSummary$1, buildEvalRunDecisionSummary, evaluateGates, gateInputFromPlatformRun, isGateWaiverInForce, calculateLatencyStats, CORPUS_LOCK_VERSION, suiteFilePointer, passRateFractionFromPercent, DEFAULT_MIN_EFFECT_SIZE, DEFAULT_MIN_SAMPLE_SIZE, planPlatformSuiteGradingUpdate, isUnknownTaskError, isMCPTasksWireError, LEGACY_TASK_STATUSES } from '@mcpjam/sdk';
|
|
6
6
|
import path7, { join, dirname, basename, resolve } from 'path';
|
|
7
7
|
import { randomUUID, randomBytes, createHash } from 'crypto';
|
|
8
8
|
import { mkdir, writeFile, readFile, chmod, rename, rm, open, unlink, stat } from 'fs/promises';
|
|
@@ -29,7 +29,7 @@ import { selectPluginMcpServerMap, detectPluginMcpTransport } from '@mcpjam/sdk/
|
|
|
29
29
|
|
|
30
30
|
// package.json
|
|
31
31
|
var package_default = {
|
|
32
|
-
version: "5.
|
|
32
|
+
version: "5.16.0"};
|
|
33
33
|
function conformanceExitCode(result) {
|
|
34
34
|
if (result.outcome === "incomplete") return 3;
|
|
35
35
|
if (result.outcome === "failed") return 1;
|
|
@@ -7972,8 +7972,6 @@ function parseWaiverExpiry(raw, now = Date.now()) {
|
|
|
7972
7972
|
}
|
|
7973
7973
|
return now + amount * DURATION_UNIT_MS[match[2].toLowerCase()];
|
|
7974
7974
|
}
|
|
7975
|
-
|
|
7976
|
-
// src/lib/eval-run-exit-code.ts
|
|
7977
7975
|
var SEVERITY_ORDER = [1, 3, 4, 5, 0];
|
|
7978
7976
|
function worstOf(codes) {
|
|
7979
7977
|
for (const code of SEVERITY_ORDER) {
|
|
@@ -8032,8 +8030,25 @@ function isBillingShapedDetail(details) {
|
|
|
8032
8030
|
const inner = details.code;
|
|
8033
8031
|
return typeof inner === "string" && BILLING_SHAPED_DETAIL_CODES.has(inner);
|
|
8034
8032
|
}
|
|
8033
|
+
var AI_REFUSAL_EXIT_CODE = {
|
|
8034
|
+
configuration: 2,
|
|
8035
|
+
temporary: 4
|
|
8036
|
+
};
|
|
8037
|
+
function aiRefusalCodeOf(code, details) {
|
|
8038
|
+
const inner = details && typeof details === "object" ? details.code : void 0;
|
|
8039
|
+
for (const candidate of [inner, code]) {
|
|
8040
|
+
if (typeof candidate !== "string") continue;
|
|
8041
|
+
const recognized = recognizedAiRefusalCode(candidate);
|
|
8042
|
+
if (recognized) return recognized;
|
|
8043
|
+
}
|
|
8044
|
+
return void 0;
|
|
8045
|
+
}
|
|
8035
8046
|
function classifyLaunchErrorExitCode(code, details) {
|
|
8036
8047
|
if (isBillingShapedDetail(details)) return 4;
|
|
8048
|
+
const aiRefusal = aiRefusalCodeOf(code, details);
|
|
8049
|
+
if (aiRefusal !== void 0) {
|
|
8050
|
+
return AI_REFUSAL_EXIT_CODE[aiRefusalClass(aiRefusal)];
|
|
8051
|
+
}
|
|
8037
8052
|
if (code !== void 0 && AUTH_SHAPED_CODES.has(code)) return 3;
|
|
8038
8053
|
if (code !== void 0 && INVALID_SHAPED_CODES.has(code)) return 2;
|
|
8039
8054
|
return 4;
|