@bryan-thompson/inspector-assessment-client 1.25.0 → 1.25.4
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/assets/{OAuthCallback-CNC5_mEQ.js → OAuthCallback-DE62cdTZ.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-BstXB61i.js → OAuthDebugCallback-CWjFdCIE.js} +1 -1
- package/dist/assets/{index-jmzR9VGa.js → index-PCQVSwHa.js} +4 -4
- package/dist/index.html +1 -1
- package/lib/lib/assessment/configTypes.d.ts +3 -0
- package/lib/lib/assessment/configTypes.d.ts.map +1 -1
- package/lib/lib/assessment/configTypes.js +11 -6
- package/lib/services/assessment/AssessmentOrchestrator.d.ts +1 -5
- package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
- package/lib/services/assessment/AssessmentOrchestrator.js +36 -236
- package/lib/services/assessment/ToolClassifier.d.ts +154 -27
- package/lib/services/assessment/ToolClassifier.d.ts.map +1 -1
- package/lib/services/assessment/ToolClassifier.js +171 -326
- package/lib/services/assessment/orchestratorHelpers.d.ts +83 -0
- package/lib/services/assessment/orchestratorHelpers.d.ts.map +1 -0
- package/lib/services/assessment/orchestratorHelpers.js +212 -0
- package/lib/services/assessment/tool-classifier-patterns.d.ts +84 -0
- package/lib/services/assessment/tool-classifier-patterns.d.ts.map +1 -0
- package/lib/services/assessment/tool-classifier-patterns.js +348 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-
|
|
1
|
+
import { u as useToast, r as reactExports, j as jsxRuntimeExports, p as parseOAuthCallbackParams, g as generateOAuthErrorDescription, S as SESSION_KEYS, I as InspectorOAuthClientProvider, a as auth } from "./index-PCQVSwHa.js";
|
|
2
2
|
const OAuthCallback = ({ onConnect }) => {
|
|
3
3
|
const { toast } = useToast();
|
|
4
4
|
const hasProcessedRef = reactExports.useRef(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-
|
|
1
|
+
import { r as reactExports, S as SESSION_KEYS, p as parseOAuthCallbackParams, j as jsxRuntimeExports, g as generateOAuthErrorDescription } from "./index-PCQVSwHa.js";
|
|
2
2
|
const OAuthDebugCallback = ({ onConnect }) => {
|
|
3
3
|
reactExports.useEffect(() => {
|
|
4
4
|
let isProcessed = false;
|
|
@@ -16320,7 +16320,7 @@ object({
|
|
|
16320
16320
|
token_type_hint: string().optional()
|
|
16321
16321
|
}).strip();
|
|
16322
16322
|
const name = "@bryan-thompson/inspector-assessment-client";
|
|
16323
|
-
const version$1 = "1.
|
|
16323
|
+
const version$1 = "1.25.4";
|
|
16324
16324
|
const packageJson = {
|
|
16325
16325
|
name,
|
|
16326
16326
|
version: version$1
|
|
@@ -45217,7 +45217,7 @@ const useTheme = () => {
|
|
|
45217
45217
|
[theme, setThemeWithSideEffect]
|
|
45218
45218
|
);
|
|
45219
45219
|
};
|
|
45220
|
-
const version = "1.
|
|
45220
|
+
const version = "1.25.4";
|
|
45221
45221
|
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
45222
45222
|
createPopperScope
|
|
45223
45223
|
]);
|
|
@@ -48774,13 +48774,13 @@ const App = () => {
|
|
|
48774
48774
|
) });
|
|
48775
48775
|
if (window.location.pathname === "/oauth/callback") {
|
|
48776
48776
|
const OAuthCallback = React.lazy(
|
|
48777
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
48777
|
+
() => __vitePreload(() => import("./OAuthCallback-DE62cdTZ.js"), true ? [] : void 0)
|
|
48778
48778
|
);
|
|
48779
48779
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
|
|
48780
48780
|
}
|
|
48781
48781
|
if (window.location.pathname === "/oauth/callback/debug") {
|
|
48782
48782
|
const OAuthDebugCallback = React.lazy(
|
|
48783
|
-
() => __vitePreload(() => import("./OAuthDebugCallback-
|
|
48783
|
+
() => __vitePreload(() => import("./OAuthDebugCallback-CWjFdCIE.js"), true ? [] : void 0)
|
|
48784
48784
|
);
|
|
48785
48785
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
|
|
48786
48786
|
}
|
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/mcp.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>MCP Inspector</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-PCQVSwHa.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Df9Sx1jt.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -53,7 +53,9 @@ export interface AssessmentConfiguration {
|
|
|
53
53
|
documentation: boolean;
|
|
54
54
|
errorHandling: boolean;
|
|
55
55
|
usability: boolean;
|
|
56
|
+
/** @deprecated Use protocolCompliance instead. Will be removed in v2.0.0. */
|
|
56
57
|
mcpSpecCompliance?: boolean;
|
|
58
|
+
protocolCompliance?: boolean;
|
|
57
59
|
aupCompliance?: boolean;
|
|
58
60
|
toolAnnotations?: boolean;
|
|
59
61
|
prohibitedLibraries?: boolean;
|
|
@@ -65,6 +67,7 @@ export interface AssessmentConfiguration {
|
|
|
65
67
|
resources?: boolean;
|
|
66
68
|
prompts?: boolean;
|
|
67
69
|
crossCapability?: boolean;
|
|
70
|
+
/** @deprecated Use protocolCompliance instead. Will be removed in v2.0.0. */
|
|
68
71
|
protocolConformance?: boolean;
|
|
69
72
|
};
|
|
70
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configTypes.d.ts","sourceRoot":"","sources":["../../../src/lib/assessment/configTypes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,aAAa,EACb,QAAQ,EACR,sBAAsB,EACvB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE;QACR,yBAAyB,EAAE,OAAO,CAAC;QACnC,mBAAmB,EAAE,OAAO,CAAC;QAC7B,mBAAmB,EAAE,OAAO,CAAC;QAC7B,oBAAoB,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,6GAA6G;IAC7G,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,OAAO,CAAC;IAEzB,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IAEnC,sBAAsB,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAI5D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,gBAAgB,CAAC,EAAE,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
|
errorHandling: true,
|
|
31
31
|
usability: true,
|
|
32
|
-
mcpSpecCompliance: false,
|
|
32
|
+
mcpSpecCompliance: false, // @deprecated
|
|
33
|
+
protocolCompliance: false, // Unified protocol compliance (replaces mcpSpecCompliance + protocolConformance)
|
|
33
34
|
// New assessors - disabled by default, enable for MCP Directory compliance audits
|
|
34
35
|
aupCompliance: false,
|
|
35
36
|
toolAnnotations: false,
|
|
@@ -68,7 +69,8 @@ export const REVIEWER_MODE_CONFIG = {
|
|
|
68
69
|
documentation: true,
|
|
69
70
|
errorHandling: true,
|
|
70
71
|
usability: true,
|
|
71
|
-
mcpSpecCompliance: false, // Not part of Anthropic's 5 core requirements
|
|
72
|
+
mcpSpecCompliance: false, // @deprecated - Not part of Anthropic's 5 core requirements
|
|
73
|
+
protocolCompliance: false, // Unified protocol compliance
|
|
72
74
|
// New assessors - disabled in reviewer mode for speed
|
|
73
75
|
aupCompliance: false,
|
|
74
76
|
toolAnnotations: false,
|
|
@@ -105,7 +107,8 @@ export const DEVELOPER_MODE_CONFIG = {
|
|
|
105
107
|
documentation: true,
|
|
106
108
|
errorHandling: true,
|
|
107
109
|
usability: true,
|
|
108
|
-
mcpSpecCompliance: true, // Include extended assessments
|
|
110
|
+
mcpSpecCompliance: true, // @deprecated - Include extended assessments
|
|
111
|
+
protocolCompliance: true, // Unified protocol compliance (replaces mcpSpecCompliance + protocolConformance)
|
|
109
112
|
// New assessors - enabled in developer mode for comprehensive testing
|
|
110
113
|
aupCompliance: true,
|
|
111
114
|
toolAnnotations: true,
|
|
@@ -143,7 +146,8 @@ export const AUDIT_MODE_CONFIG = {
|
|
|
143
146
|
documentation: true,
|
|
144
147
|
errorHandling: true,
|
|
145
148
|
usability: true,
|
|
146
|
-
mcpSpecCompliance: true,
|
|
149
|
+
mcpSpecCompliance: true, // @deprecated
|
|
150
|
+
protocolCompliance: true, // Unified protocol compliance
|
|
147
151
|
// All new assessors enabled for audit mode
|
|
148
152
|
aupCompliance: true,
|
|
149
153
|
toolAnnotations: true,
|
|
@@ -193,7 +197,8 @@ export const CLAUDE_ENHANCED_AUDIT_CONFIG = {
|
|
|
193
197
|
documentation: true,
|
|
194
198
|
errorHandling: true,
|
|
195
199
|
usability: true,
|
|
196
|
-
mcpSpecCompliance: true,
|
|
200
|
+
mcpSpecCompliance: true, // @deprecated
|
|
201
|
+
protocolCompliance: true, // Unified protocol compliance
|
|
197
202
|
aupCompliance: true,
|
|
198
203
|
toolAnnotations: true,
|
|
199
204
|
prohibitedLibraries: true,
|
|
@@ -205,7 +210,7 @@ export const CLAUDE_ENHANCED_AUDIT_CONFIG = {
|
|
|
205
210
|
resources: true,
|
|
206
211
|
prompts: true,
|
|
207
212
|
crossCapability: true,
|
|
208
|
-
// Protocol conformance - enabled in Claude mode for comprehensive validation
|
|
213
|
+
// Protocol conformance - enabled in Claude mode for comprehensive validation (@deprecated)
|
|
209
214
|
protocolConformance: true,
|
|
210
215
|
},
|
|
211
216
|
};
|
|
@@ -102,7 +102,7 @@ export declare class AssessmentOrchestrator {
|
|
|
102
102
|
private documentationAssessor?;
|
|
103
103
|
private errorHandlingAssessor?;
|
|
104
104
|
private usabilityAssessor?;
|
|
105
|
-
private
|
|
105
|
+
private protocolComplianceAssessor?;
|
|
106
106
|
private aupComplianceAssessor?;
|
|
107
107
|
private toolAnnotationAssessor?;
|
|
108
108
|
private prohibitedLibrariesAssessor?;
|
|
@@ -113,7 +113,6 @@ export declare class AssessmentOrchestrator {
|
|
|
113
113
|
private resourceAssessor?;
|
|
114
114
|
private promptAssessor?;
|
|
115
115
|
private crossCapabilityAssessor?;
|
|
116
|
-
private protocolConformanceAssessor?;
|
|
117
116
|
constructor(config?: Partial<AssessmentConfiguration>);
|
|
118
117
|
/**
|
|
119
118
|
* Get the count of tools that will actually be tested based on selectedToolsForTesting config.
|
|
@@ -151,9 +150,6 @@ export declare class AssessmentOrchestrator {
|
|
|
151
150
|
*/
|
|
152
151
|
assess(serverName: string, tools: Tool[], callTool: (name: string, params: Record<string, unknown>) => Promise<CompatibilityCallToolResult>, serverInfo?: any, readmeContent?: string, packageJson?: any): Promise<MCPDirectoryAssessment>;
|
|
153
152
|
private collectTotalTestCount;
|
|
154
|
-
private determineOverallStatus;
|
|
155
|
-
private generateSummary;
|
|
156
|
-
private generateRecommendations;
|
|
157
153
|
/**
|
|
158
154
|
* Get assessment configuration
|
|
159
155
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssessmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/AssessmentOrchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"AssessmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/AssessmentOrchestrator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EAEvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAmC5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAehC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM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AAM,EACtB,WAAW,CAAC,EAAE,GAAG,GAChB,OAAO,CAAC,sBAAsB,CAAC;IAclC,OAAO,CAAC,qBAAqB;IA0E7B;;OAEG;IACH,SAAS,IAAI,uBAAuB;IAIpC;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI;CAG7D"}
|
|
@@ -9,8 +9,8 @@ import { SecurityAssessor } from "./modules/SecurityAssessor.js";
|
|
|
9
9
|
import { DocumentationAssessor } from "./modules/DocumentationAssessor.js";
|
|
10
10
|
import { ErrorHandlingAssessor } from "./modules/ErrorHandlingAssessor.js";
|
|
11
11
|
import { UsabilityAssessor } from "./modules/UsabilityAssessor.js";
|
|
12
|
-
// Extended assessment modules
|
|
13
|
-
import {
|
|
12
|
+
// Extended assessment modules - unified protocol compliance
|
|
13
|
+
import { ProtocolComplianceAssessor } from "./modules/ProtocolComplianceAssessor.js";
|
|
14
14
|
// New MCP Directory Compliance Gap assessors
|
|
15
15
|
import { AUPComplianceAssessor } from "./modules/AUPComplianceAssessor.js";
|
|
16
16
|
import { ToolAnnotationAssessor } from "./modules/ToolAnnotationAssessor.js";
|
|
@@ -23,133 +23,16 @@ import { TemporalAssessor } from "./modules/TemporalAssessor.js";
|
|
|
23
23
|
import { ResourceAssessor } from "./modules/ResourceAssessor.js";
|
|
24
24
|
import { PromptAssessor } from "./modules/PromptAssessor.js";
|
|
25
25
|
import { CrossCapabilitySecurityAssessor } from "./modules/CrossCapabilitySecurityAssessor.js";
|
|
26
|
-
//
|
|
27
|
-
import { ProtocolConformanceAssessor } from "./modules/ProtocolConformanceAssessor.js";
|
|
26
|
+
// Note: ProtocolConformanceAssessor merged into ProtocolComplianceAssessor (v1.25.2)
|
|
28
27
|
// Pattern configuration for tool annotation assessment
|
|
29
28
|
import { loadPatternConfig, compilePatterns, } from "./config/annotationPatterns.js";
|
|
30
29
|
// Claude Code integration for intelligent analysis
|
|
31
30
|
import { ClaudeCodeBridge, FULL_CLAUDE_CODE_CONFIG, } from "./lib/claudeCodeBridge.js";
|
|
32
31
|
import { TestDataGenerator } from "./TestDataGenerator.js";
|
|
33
|
-
// Import score calculation helpers from shared module
|
|
34
|
-
import { calculateModuleScore, normalizeModuleKey, INSPECTOR_VERSION, } from "../../lib/moduleScoring.js";
|
|
35
32
|
// Structured logging
|
|
36
33
|
import { createLogger, DEFAULT_LOGGING_CONFIG } from "./lib/logger.js";
|
|
37
|
-
//
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Emit module_started event and track start time for duration calculation.
|
|
41
|
-
* Emits JSONL to stderr with version field for consistent event structure.
|
|
42
|
-
*/
|
|
43
|
-
function emitModuleStartedEvent(moduleName, estimatedTests, toolCount) {
|
|
44
|
-
const moduleKey = normalizeModuleKey(moduleName);
|
|
45
|
-
moduleStartTimes.set(moduleKey, Date.now());
|
|
46
|
-
// Emit JSONL to stderr with version field
|
|
47
|
-
console.error(JSON.stringify({
|
|
48
|
-
event: "module_started",
|
|
49
|
-
module: moduleKey,
|
|
50
|
-
estimatedTests,
|
|
51
|
-
toolCount,
|
|
52
|
-
version: INSPECTOR_VERSION,
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Emit module_complete event with score and duration.
|
|
57
|
-
* Uses shared score calculator for consistent scoring logic.
|
|
58
|
-
* For AUP module, includes enriched violation data for Claude analysis.
|
|
59
|
-
*/
|
|
60
|
-
function emitModuleProgress(moduleName, status, result, testsRun = 0) {
|
|
61
|
-
// Calculate score using shared helper
|
|
62
|
-
const score = calculateModuleScore(result);
|
|
63
|
-
// Don't emit events for skipped modules (null score means module wasn't run)
|
|
64
|
-
if (score === null)
|
|
65
|
-
return;
|
|
66
|
-
const moduleKey = normalizeModuleKey(moduleName);
|
|
67
|
-
// Calculate duration from module start time
|
|
68
|
-
const startTime = moduleStartTimes.get(moduleKey);
|
|
69
|
-
const duration = startTime ? Date.now() - startTime : 0;
|
|
70
|
-
moduleStartTimes.delete(moduleKey);
|
|
71
|
-
// Build base event
|
|
72
|
-
const event = {
|
|
73
|
-
event: "module_complete",
|
|
74
|
-
module: moduleKey,
|
|
75
|
-
status,
|
|
76
|
-
score,
|
|
77
|
-
testsRun,
|
|
78
|
-
duration,
|
|
79
|
-
version: INSPECTOR_VERSION,
|
|
80
|
-
};
|
|
81
|
-
// Add AUP enrichment when module is AUP
|
|
82
|
-
if (moduleKey === "aup" && result) {
|
|
83
|
-
const aupEnrichment = buildAUPEnrichment(result);
|
|
84
|
-
Object.assign(event, aupEnrichment);
|
|
85
|
-
}
|
|
86
|
-
// Emit JSONL to stderr with version field
|
|
87
|
-
console.error(JSON.stringify(event));
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Build AUP enrichment data from an AUP compliance assessment result.
|
|
91
|
-
* Samples violations prioritizing by severity (CRITICAL > HIGH > MEDIUM).
|
|
92
|
-
*/
|
|
93
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
94
|
-
function buildAUPEnrichment(aupResult, maxSamples = 10) {
|
|
95
|
-
const violations = aupResult.violations || [];
|
|
96
|
-
// Calculate metrics
|
|
97
|
-
const metrics = {
|
|
98
|
-
total: violations.length,
|
|
99
|
-
critical: violations.filter((v) => v.severity === "CRITICAL").length,
|
|
100
|
-
high: violations.filter((v) => v.severity === "HIGH")
|
|
101
|
-
.length,
|
|
102
|
-
medium: violations.filter((v) => v.severity === "MEDIUM").length,
|
|
103
|
-
byCategory: {},
|
|
104
|
-
};
|
|
105
|
-
// Count by category
|
|
106
|
-
for (const v of violations) {
|
|
107
|
-
metrics.byCategory[v.category] = (metrics.byCategory[v.category] || 0) + 1;
|
|
108
|
-
}
|
|
109
|
-
// Sample violations prioritizing by severity
|
|
110
|
-
const sampled = [];
|
|
111
|
-
const severityOrder = ["CRITICAL", "HIGH", "MEDIUM"];
|
|
112
|
-
for (const severity of severityOrder) {
|
|
113
|
-
if (sampled.length >= maxSamples)
|
|
114
|
-
break;
|
|
115
|
-
const bySeverity = violations.filter((v) => v.severity === severity);
|
|
116
|
-
for (const v of bySeverity) {
|
|
117
|
-
if (sampled.length >= maxSamples)
|
|
118
|
-
break;
|
|
119
|
-
sampled.push({
|
|
120
|
-
category: v.category,
|
|
121
|
-
categoryName: v.categoryName,
|
|
122
|
-
severity: v.severity,
|
|
123
|
-
matchedText: v.matchedText,
|
|
124
|
-
location: v.location,
|
|
125
|
-
confidence: v.confidence,
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
// Build sampling note
|
|
130
|
-
let samplingNote = "";
|
|
131
|
-
if (violations.length === 0) {
|
|
132
|
-
samplingNote = "No violations detected.";
|
|
133
|
-
}
|
|
134
|
-
else if (violations.length <= maxSamples) {
|
|
135
|
-
samplingNote = `All ${violations.length} violation(s) included.`;
|
|
136
|
-
}
|
|
137
|
-
else {
|
|
138
|
-
samplingNote = `Sampled ${sampled.length} of ${violations.length} violations, prioritized by severity (CRITICAL > HIGH > MEDIUM).`;
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
violationsSample: sampled,
|
|
142
|
-
samplingNote,
|
|
143
|
-
violationMetrics: metrics,
|
|
144
|
-
scannedLocations: aupResult.scannedLocations || {
|
|
145
|
-
toolNames: false,
|
|
146
|
-
toolDescriptions: false,
|
|
147
|
-
readme: false,
|
|
148
|
-
sourceCode: false,
|
|
149
|
-
},
|
|
150
|
-
highRiskDomains: (aupResult.highRiskDomains || []).slice(0, 10),
|
|
151
|
-
};
|
|
152
|
-
}
|
|
34
|
+
// Extracted helpers for testability
|
|
35
|
+
import { emitModuleStartedEvent, emitModuleProgress, determineOverallStatus, generateSummary, generateRecommendations, } from "./orchestratorHelpers.js";
|
|
153
36
|
export class AssessmentOrchestrator {
|
|
154
37
|
config;
|
|
155
38
|
logger;
|
|
@@ -164,8 +47,8 @@ export class AssessmentOrchestrator {
|
|
|
164
47
|
documentationAssessor;
|
|
165
48
|
errorHandlingAssessor;
|
|
166
49
|
usabilityAssessor;
|
|
167
|
-
// Extended assessors
|
|
168
|
-
|
|
50
|
+
// Extended assessors - unified protocol compliance
|
|
51
|
+
protocolComplianceAssessor;
|
|
169
52
|
// New MCP Directory Compliance Gap assessors
|
|
170
53
|
aupComplianceAssessor;
|
|
171
54
|
toolAnnotationAssessor;
|
|
@@ -178,8 +61,7 @@ export class AssessmentOrchestrator {
|
|
|
178
61
|
resourceAssessor;
|
|
179
62
|
promptAssessor;
|
|
180
63
|
crossCapabilityAssessor;
|
|
181
|
-
//
|
|
182
|
-
protocolConformanceAssessor;
|
|
64
|
+
// Note: protocolConformanceAssessor merged into protocolComplianceAssessor (v1.25.2)
|
|
183
65
|
constructor(config = {}) {
|
|
184
66
|
this.config = { ...DEFAULT_ASSESSMENT_CONFIG, ...config };
|
|
185
67
|
// Initialize logger
|
|
@@ -206,8 +88,12 @@ export class AssessmentOrchestrator {
|
|
|
206
88
|
}
|
|
207
89
|
// Initialize extended assessors if enabled
|
|
208
90
|
if (this.config.enableExtendedAssessment) {
|
|
209
|
-
|
|
210
|
-
|
|
91
|
+
// Initialize unified protocol compliance assessor
|
|
92
|
+
// Supports new protocolCompliance flag and deprecated mcpSpecCompliance/protocolConformance
|
|
93
|
+
if (this.config.assessmentCategories?.protocolCompliance ||
|
|
94
|
+
this.config.assessmentCategories?.mcpSpecCompliance ||
|
|
95
|
+
this.config.assessmentCategories?.protocolConformance) {
|
|
96
|
+
this.protocolComplianceAssessor = new ProtocolComplianceAssessor(this.config);
|
|
211
97
|
}
|
|
212
98
|
// Initialize new MCP Directory Compliance Gap assessors
|
|
213
99
|
if (this.config.assessmentCategories?.aupCompliance) {
|
|
@@ -255,10 +141,7 @@ export class AssessmentOrchestrator {
|
|
|
255
141
|
if (this.config.assessmentCategories?.crossCapability) {
|
|
256
142
|
this.crossCapabilityAssessor = new CrossCapabilitySecurityAssessor(this.config);
|
|
257
143
|
}
|
|
258
|
-
//
|
|
259
|
-
if (this.config.assessmentCategories?.protocolConformance) {
|
|
260
|
-
this.protocolConformanceAssessor = new ProtocolConformanceAssessor(this.config);
|
|
261
|
-
}
|
|
144
|
+
// Note: Protocol conformance now handled by unified ProtocolComplianceAssessor above
|
|
262
145
|
}
|
|
263
146
|
// Wire up Claude bridge to TestDataGenerator for intelligent test generation
|
|
264
147
|
if (this.claudeBridge) {
|
|
@@ -338,8 +221,8 @@ export class AssessmentOrchestrator {
|
|
|
338
221
|
this.documentationAssessor?.resetTestCount();
|
|
339
222
|
this.errorHandlingAssessor?.resetTestCount();
|
|
340
223
|
this.usabilityAssessor?.resetTestCount();
|
|
341
|
-
if (this.
|
|
342
|
-
this.
|
|
224
|
+
if (this.protocolComplianceAssessor) {
|
|
225
|
+
this.protocolComplianceAssessor.resetTestCount();
|
|
343
226
|
}
|
|
344
227
|
// Reset new assessors
|
|
345
228
|
if (this.aupComplianceAssessor) {
|
|
@@ -427,11 +310,11 @@ export class AssessmentOrchestrator {
|
|
|
427
310
|
return (assessmentResults.usability = r);
|
|
428
311
|
}));
|
|
429
312
|
}
|
|
430
|
-
// Extended assessments
|
|
431
|
-
if (this.
|
|
432
|
-
emitModuleStartedEvent("
|
|
433
|
-
assessmentPromises.push(this.
|
|
434
|
-
emitModuleProgress("
|
|
313
|
+
// Extended assessments - unified protocol compliance
|
|
314
|
+
if (this.protocolComplianceAssessor) {
|
|
315
|
+
emitModuleStartedEvent("Protocol Compliance", 10, toolCount);
|
|
316
|
+
assessmentPromises.push(this.protocolComplianceAssessor.assess(context).then((r) => {
|
|
317
|
+
emitModuleProgress("Protocol Compliance", r.status, r, this.protocolComplianceAssessor.getTestCount());
|
|
435
318
|
return (assessmentResults.mcpSpecCompliance = r);
|
|
436
319
|
}));
|
|
437
320
|
}
|
|
@@ -507,14 +390,7 @@ export class AssessmentOrchestrator {
|
|
|
507
390
|
return (assessmentResults.crossCapability = r);
|
|
508
391
|
}));
|
|
509
392
|
}
|
|
510
|
-
// Protocol Conformance
|
|
511
|
-
if (this.protocolConformanceAssessor) {
|
|
512
|
-
emitModuleStartedEvent("Protocol-Conformance", 3, toolCount);
|
|
513
|
-
assessmentPromises.push(this.protocolConformanceAssessor.assess(context).then((r) => {
|
|
514
|
-
emitModuleProgress("Protocol-Conformance", r.status, r, this.protocolConformanceAssessor.getTestCount());
|
|
515
|
-
return (assessmentResults.protocolConformance = r);
|
|
516
|
-
}));
|
|
517
|
-
}
|
|
393
|
+
// Note: Protocol Conformance now handled by unified ProtocolComplianceAssessor above
|
|
518
394
|
await Promise.all(assessmentPromises);
|
|
519
395
|
}
|
|
520
396
|
else {
|
|
@@ -558,11 +434,11 @@ export class AssessmentOrchestrator {
|
|
|
558
434
|
await this.usabilityAssessor.assess(context);
|
|
559
435
|
emitModuleProgress("Usability", assessmentResults.usability.status, assessmentResults.usability, this.usabilityAssessor.getTestCount());
|
|
560
436
|
}
|
|
561
|
-
if (this.
|
|
562
|
-
emitModuleStartedEvent("
|
|
437
|
+
if (this.protocolComplianceAssessor) {
|
|
438
|
+
emitModuleStartedEvent("Protocol Compliance", 10, toolCount);
|
|
563
439
|
assessmentResults.mcpSpecCompliance =
|
|
564
|
-
await this.
|
|
565
|
-
emitModuleProgress("
|
|
440
|
+
await this.protocolComplianceAssessor.assess(context);
|
|
441
|
+
emitModuleProgress("Protocol Compliance", assessmentResults.mcpSpecCompliance.status, assessmentResults.mcpSpecCompliance, this.protocolComplianceAssessor.getTestCount());
|
|
566
442
|
}
|
|
567
443
|
// New MCP Directory Compliance Gap assessments (sequential)
|
|
568
444
|
if (this.aupComplianceAssessor) {
|
|
@@ -625,13 +501,7 @@ export class AssessmentOrchestrator {
|
|
|
625
501
|
await this.crossCapabilityAssessor.assess(context);
|
|
626
502
|
emitModuleProgress("Cross-Capability", assessmentResults.crossCapability.status, assessmentResults.crossCapability, this.crossCapabilityAssessor.getTestCount());
|
|
627
503
|
}
|
|
628
|
-
// Protocol Conformance
|
|
629
|
-
if (this.protocolConformanceAssessor) {
|
|
630
|
-
emitModuleStartedEvent("Protocol-Conformance", 3, toolCount);
|
|
631
|
-
assessmentResults.protocolConformance =
|
|
632
|
-
await this.protocolConformanceAssessor.assess(context);
|
|
633
|
-
emitModuleProgress("Protocol-Conformance", assessmentResults.protocolConformance.status, assessmentResults.protocolConformance, this.protocolConformanceAssessor.getTestCount());
|
|
634
|
-
}
|
|
504
|
+
// Note: Protocol Conformance now handled by unified ProtocolComplianceAssessor above
|
|
635
505
|
}
|
|
636
506
|
// Integrate temporal findings into security.vulnerabilities for unified view
|
|
637
507
|
if (assessmentResults.temporal?.rugPullsDetected &&
|
|
@@ -644,10 +514,10 @@ export class AssessmentOrchestrator {
|
|
|
644
514
|
// Collect test counts from all assessors
|
|
645
515
|
this.totalTestsRun = this.collectTotalTestCount();
|
|
646
516
|
// Determine overall status
|
|
647
|
-
const overallStatus =
|
|
517
|
+
const overallStatus = determineOverallStatus(assessmentResults);
|
|
648
518
|
// Generate summary and recommendations
|
|
649
|
-
const summary =
|
|
650
|
-
const recommendations =
|
|
519
|
+
const summary = generateSummary(assessmentResults);
|
|
520
|
+
const recommendations = generateRecommendations(assessmentResults);
|
|
651
521
|
const executionTime = Date.now() - this.startTime;
|
|
652
522
|
// Type assertion needed because Partial<MCPDirectoryAssessment> has optional required fields
|
|
653
523
|
// When modules are skipped via --skip-modules, not all fields will be present
|
|
@@ -694,7 +564,7 @@ export class AssessmentOrchestrator {
|
|
|
694
564
|
const documentationCount = this.documentationAssessor?.getTestCount() || 0;
|
|
695
565
|
const errorHandlingCount = this.errorHandlingAssessor?.getTestCount() || 0;
|
|
696
566
|
const usabilityCount = this.usabilityAssessor?.getTestCount() || 0;
|
|
697
|
-
const mcpSpecCount = this.
|
|
567
|
+
const mcpSpecCount = this.protocolComplianceAssessor?.getTestCount() || 0;
|
|
698
568
|
// New assessor counts
|
|
699
569
|
const aupCount = this.aupComplianceAssessor?.getTestCount() || 0;
|
|
700
570
|
const annotationCount = this.toolAnnotationAssessor?.getTestCount() || 0;
|
|
@@ -707,8 +577,7 @@ export class AssessmentOrchestrator {
|
|
|
707
577
|
const resourcesCount = this.resourceAssessor?.getTestCount() || 0;
|
|
708
578
|
const promptsCount = this.promptAssessor?.getTestCount() || 0;
|
|
709
579
|
const crossCapabilityCount = this.crossCapabilityAssessor?.getTestCount() || 0;
|
|
710
|
-
// Protocol conformance
|
|
711
|
-
const protocolConformanceCount = this.protocolConformanceAssessor?.getTestCount() || 0;
|
|
580
|
+
// Note: Protocol conformance now included in mcpSpecCount (unified ProtocolComplianceAssessor)
|
|
712
581
|
this.logger.debug("Test counts by assessor", {
|
|
713
582
|
functionality: functionalityCount,
|
|
714
583
|
security: securityCount,
|
|
@@ -726,7 +595,7 @@ export class AssessmentOrchestrator {
|
|
|
726
595
|
resources: resourcesCount,
|
|
727
596
|
prompts: promptsCount,
|
|
728
597
|
crossCapability: crossCapabilityCount,
|
|
729
|
-
|
|
598
|
+
// Note: protocolConformance now included in mcpSpec (unified)
|
|
730
599
|
});
|
|
731
600
|
total =
|
|
732
601
|
functionalityCount +
|
|
@@ -744,80 +613,11 @@ export class AssessmentOrchestrator {
|
|
|
744
613
|
temporalCount +
|
|
745
614
|
resourcesCount +
|
|
746
615
|
promptsCount +
|
|
747
|
-
crossCapabilityCount
|
|
748
|
-
|
|
616
|
+
crossCapabilityCount;
|
|
617
|
+
// Note: protocolConformance now included in mcpSpecCount (unified)
|
|
749
618
|
this.logger.debug("Total test count", { total });
|
|
750
619
|
return total;
|
|
751
620
|
}
|
|
752
|
-
determineOverallStatus(results) {
|
|
753
|
-
const statuses = [];
|
|
754
|
-
// Collect all statuses from assessment results
|
|
755
|
-
Object.values(results).forEach((assessment) => {
|
|
756
|
-
if (assessment &&
|
|
757
|
-
typeof assessment === "object" &&
|
|
758
|
-
"status" in assessment) {
|
|
759
|
-
statuses.push(assessment.status);
|
|
760
|
-
}
|
|
761
|
-
});
|
|
762
|
-
// If any critical category fails, overall fails
|
|
763
|
-
if (statuses.includes("FAIL"))
|
|
764
|
-
return "FAIL";
|
|
765
|
-
// If any category needs more info, overall needs more info
|
|
766
|
-
if (statuses.includes("NEED_MORE_INFO"))
|
|
767
|
-
return "NEED_MORE_INFO";
|
|
768
|
-
// All must pass for overall pass
|
|
769
|
-
return "PASS";
|
|
770
|
-
}
|
|
771
|
-
generateSummary(results) {
|
|
772
|
-
const parts = [];
|
|
773
|
-
const totalCategories = Object.keys(results).length;
|
|
774
|
-
const passedCategories = Object.values(results).filter((r) => r?.status === "PASS").length;
|
|
775
|
-
parts.push(`Assessment complete: ${passedCategories}/${totalCategories} categories passed.`);
|
|
776
|
-
// Add key findings
|
|
777
|
-
if (results.security?.vulnerabilities?.length > 0) {
|
|
778
|
-
parts.push(`Found ${results.security.vulnerabilities.length} security vulnerabilities.`);
|
|
779
|
-
}
|
|
780
|
-
if (results.functionality?.brokenTools?.length > 0) {
|
|
781
|
-
parts.push(`${results.functionality.brokenTools.length} tools are not functioning correctly.`);
|
|
782
|
-
}
|
|
783
|
-
// New assessor findings
|
|
784
|
-
if (results.aupCompliance?.violations?.length > 0) {
|
|
785
|
-
const criticalCount = results.aupCompliance.violations.filter((v) => v.severity === "CRITICAL").length;
|
|
786
|
-
if (criticalCount > 0) {
|
|
787
|
-
parts.push(`CRITICAL: ${criticalCount} AUP violation(s) detected.`);
|
|
788
|
-
}
|
|
789
|
-
else {
|
|
790
|
-
parts.push(`${results.aupCompliance.violations.length} AUP item(s) flagged for review.`);
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
if (results.toolAnnotations?.missingAnnotationsCount > 0) {
|
|
794
|
-
parts.push(`${results.toolAnnotations.missingAnnotationsCount} tools missing annotations.`);
|
|
795
|
-
}
|
|
796
|
-
if (results.prohibitedLibraries?.matches?.length > 0) {
|
|
797
|
-
const blockingCount = results.prohibitedLibraries.matches.filter((m) => m.severity === "BLOCKING").length;
|
|
798
|
-
if (blockingCount > 0) {
|
|
799
|
-
parts.push(`BLOCKING: ${blockingCount} prohibited library/libraries detected.`);
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
if (results.portability?.usesBundleRoot) {
|
|
803
|
-
parts.push("Uses ${BUNDLE_ROOT} anti-pattern.");
|
|
804
|
-
}
|
|
805
|
-
return parts.join(" ");
|
|
806
|
-
}
|
|
807
|
-
generateRecommendations(results) {
|
|
808
|
-
const recommendations = [];
|
|
809
|
-
// Aggregate recommendations from all assessments
|
|
810
|
-
Object.values(results).forEach((assessment) => {
|
|
811
|
-
if (assessment &&
|
|
812
|
-
typeof assessment === "object" &&
|
|
813
|
-
"recommendations" in assessment &&
|
|
814
|
-
Array.isArray(assessment.recommendations)) {
|
|
815
|
-
recommendations.push(...assessment.recommendations);
|
|
816
|
-
}
|
|
817
|
-
});
|
|
818
|
-
// De-duplicate and prioritize
|
|
819
|
-
return [...new Set(recommendations)].slice(0, 10);
|
|
820
|
-
}
|
|
821
621
|
/**
|
|
822
622
|
* Get assessment configuration
|
|
823
623
|
*/
|