@bryan-thompson/inspector-assessment-cli 1.24.0 → 1.24.2
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/build/assess-full.js +21 -0
- package/package.json +1 -1
package/build/assess-full.js
CHANGED
|
@@ -409,6 +409,24 @@ async function runFullAssessment(options) {
|
|
|
409
409
|
if (!options.jsonOnly) {
|
|
410
410
|
console.log("✅ Connected to MCP server");
|
|
411
411
|
}
|
|
412
|
+
// Capture server info from initialization for protocol conformance checks
|
|
413
|
+
// Apply defensive null checks for protocol conformance validation
|
|
414
|
+
const rawServerInfo = client.getServerVersion();
|
|
415
|
+
const rawServerCapabilities = client.getServerCapabilities();
|
|
416
|
+
// Build serverInfo with safe fallbacks
|
|
417
|
+
const serverInfo = rawServerInfo
|
|
418
|
+
? {
|
|
419
|
+
name: rawServerInfo.name || "unknown",
|
|
420
|
+
version: rawServerInfo.version,
|
|
421
|
+
metadata: rawServerInfo.metadata,
|
|
422
|
+
}
|
|
423
|
+
: undefined;
|
|
424
|
+
// ServerCapabilities can be undefined - that's valid per MCP spec
|
|
425
|
+
const serverCapabilities = rawServerCapabilities ?? undefined;
|
|
426
|
+
// Log warning if server didn't provide initialization info
|
|
427
|
+
if (!serverInfo && !options.jsonOnly) {
|
|
428
|
+
console.log("⚠️ Server did not provide serverInfo during initialization");
|
|
429
|
+
}
|
|
412
430
|
const response = await client.listTools();
|
|
413
431
|
const tools = response.tools || [];
|
|
414
432
|
// Emit JSONL tool discovery events for audit-worker parsing
|
|
@@ -653,6 +671,9 @@ async function runFullAssessment(options) {
|
|
|
653
671
|
prompts,
|
|
654
672
|
readResource,
|
|
655
673
|
getPrompt,
|
|
674
|
+
// Server info for protocol conformance checks
|
|
675
|
+
serverInfo,
|
|
676
|
+
serverCapabilities: serverCapabilities,
|
|
656
677
|
};
|
|
657
678
|
if (!options.jsonOnly) {
|
|
658
679
|
console.log(`\n🏃 Running assessment with ${Object.keys(config.assessmentCategories || {}).length} modules...`);
|
package/package.json
CHANGED