@bryan-thompson/inspector-assessment-client 1.22.5 → 1.22.9
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-B5zTjfUQ.js → OAuthCallback-CfFY9Gl_.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-NE-WvEWH.js → OAuthDebugCallback-B5omwGTS.js} +1 -1
- package/dist/assets/{index-DILbEAS1.js → index-CRQP7KdJ.js} +4 -4
- package/dist/index.html +1 -1
- package/lib/lib/moduleScoring.d.ts +4 -1
- package/lib/lib/moduleScoring.d.ts.map +1 -1
- package/lib/lib/moduleScoring.js +4 -1
- package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
- package/lib/services/assessment/AssessmentOrchestrator.js +4 -1
- package/lib/services/assessment/modules/ToolAnnotationAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/ToolAnnotationAssessor.js +22 -7
- 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-CRQP7KdJ.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-CRQP7KdJ.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.22.
|
|
16323
|
+
const version$1 = "1.22.8";
|
|
16324
16324
|
const packageJson = {
|
|
16325
16325
|
name,
|
|
16326
16326
|
version: version$1
|
|
@@ -45352,7 +45352,7 @@ const useTheme = () => {
|
|
|
45352
45352
|
[theme, setThemeWithSideEffect]
|
|
45353
45353
|
);
|
|
45354
45354
|
};
|
|
45355
|
-
const version = "1.22.
|
|
45355
|
+
const version = "1.22.8";
|
|
45356
45356
|
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
45357
45357
|
createPopperScope
|
|
45358
45358
|
]);
|
|
@@ -59266,13 +59266,13 @@ const App = () => {
|
|
|
59266
59266
|
) });
|
|
59267
59267
|
if (window.location.pathname === "/oauth/callback") {
|
|
59268
59268
|
const OAuthCallback = React.lazy(
|
|
59269
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
59269
|
+
() => __vitePreload(() => import("./OAuthCallback-CfFY9Gl_.js"), true ? [] : void 0)
|
|
59270
59270
|
);
|
|
59271
59271
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
|
|
59272
59272
|
}
|
|
59273
59273
|
if (window.location.pathname === "/oauth/callback/debug") {
|
|
59274
59274
|
const OAuthDebugCallback = React.lazy(
|
|
59275
|
-
() => __vitePreload(() => import("./OAuthDebugCallback-
|
|
59275
|
+
() => __vitePreload(() => import("./OAuthDebugCallback-B5omwGTS.js"), true ? [] : void 0)
|
|
59276
59276
|
);
|
|
59277
59277
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
|
|
59278
59278
|
}
|
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-CRQP7KdJ.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-DiyPO_Zj.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -13,8 +13,11 @@ export declare function normalizeModuleKey(moduleName: string): string;
|
|
|
13
13
|
* Calculate module score from assessment result.
|
|
14
14
|
* Handles different result shapes from different assessors.
|
|
15
15
|
* This centralizes score calculation logic used by the orchestrator.
|
|
16
|
+
*
|
|
17
|
+
* Returns null for undefined/missing results (e.g., skipped modules via --skip-modules).
|
|
18
|
+
* Callers should check for null and skip emission/display for skipped modules.
|
|
16
19
|
*/
|
|
17
|
-
export declare function calculateModuleScore(result: unknown): number;
|
|
20
|
+
export declare function calculateModuleScore(result: unknown): number | null;
|
|
18
21
|
/**
|
|
19
22
|
* Current inspector-assessment version for event compatibility checking.
|
|
20
23
|
* This should match the version in package.json.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleScoring.d.ts","sourceRoot":"","sources":["../../src/lib/moduleScoring.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED
|
|
1
|
+
{"version":3,"file":"moduleScoring.d.ts","sourceRoot":"","sources":["../../src/lib/moduleScoring.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE7D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CA6BnE;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,WAAW,CAAC"}
|
package/lib/lib/moduleScoring.js
CHANGED
|
@@ -15,10 +15,13 @@ export function normalizeModuleKey(moduleName) {
|
|
|
15
15
|
* Calculate module score from assessment result.
|
|
16
16
|
* Handles different result shapes from different assessors.
|
|
17
17
|
* This centralizes score calculation logic used by the orchestrator.
|
|
18
|
+
*
|
|
19
|
+
* Returns null for undefined/missing results (e.g., skipped modules via --skip-modules).
|
|
20
|
+
* Callers should check for null and skip emission/display for skipped modules.
|
|
18
21
|
*/
|
|
19
22
|
export function calculateModuleScore(result) {
|
|
20
23
|
if (!result || typeof result !== "object")
|
|
21
|
-
return
|
|
24
|
+
return null;
|
|
22
25
|
const r = result;
|
|
23
26
|
// ErrorHandling module - uses metrics.mcpComplianceScore
|
|
24
27
|
const metrics = r.metrics;
|
|
@@ -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,EAGvB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAiC5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AssessmentOrchestrator.d.ts","sourceRoot":"","sources":["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B,CAAC,CAAkC;gBAEtD,MAAM,GAAE,OAAO,CAAC,uBAAuB,CAAM;IAgGzD;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;;OAGG;IACH,gBAAgB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,IAAI;IAqBhE;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B;;OAEG;IACH,eAAe,IAAI,gBAAgB,GAAG,SAAS;IAI/C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqC1B;;OAEG;IACG,iBAAiB,CACrB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,sBAAsB,CAAC;IA2gBlC;;OAEG;IACG,MAAM,CACV,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,IAAI,EAAE,EACb,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC5B,OAAO,CAAC,2BAA2B,CAAC,EACzC,UAAU,CAAC,EAAE,GAAG,EAChB,aAAa,CAAC,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,GAAG,GAChB,OAAO,CAAC,sBAAsB,CAAC;IAclC,OAAO,CAAC,qBAAqB;IAsE7B,OAAO,CAAC,sBAAsB;IAoB9B,OAAO,CAAC,eAAe;IA8DvB,OAAO,CAAC,uBAAuB;IAc/B;;OAEG;IACH,SAAS,IAAI,uBAAuB;IAIpC;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI;CAG7D"}
|
|
@@ -54,9 +54,12 @@ function emitModuleStartedEvent(moduleName, estimatedTests, toolCount) {
|
|
|
54
54
|
* For AUP module, includes enriched violation data for Claude analysis.
|
|
55
55
|
*/
|
|
56
56
|
function emitModuleProgress(moduleName, status, result, testsRun = 0) {
|
|
57
|
-
const moduleKey = normalizeModuleKey(moduleName);
|
|
58
57
|
// Calculate score using shared helper
|
|
59
58
|
const score = calculateModuleScore(result);
|
|
59
|
+
// Don't emit events for skipped modules (null score means module wasn't run)
|
|
60
|
+
if (score === null)
|
|
61
|
+
return;
|
|
62
|
+
const moduleKey = normalizeModuleKey(moduleName);
|
|
60
63
|
// Calculate duration from module start time
|
|
61
64
|
const startTime = moduleStartTimes.get(moduleKey);
|
|
62
65
|
const duration = startTime ? Date.now() - startTime : 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolAnnotationAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/ToolAnnotationAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EAKpB,uBAAuB,EAExB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAK9B,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolAnnotationAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/ToolAnnotationAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EACV,wBAAwB,EACxB,oBAAoB,EAKpB,uBAAuB,EAExB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAK9B,MAAM,8BAA8B,CAAC;AAiYtC;;GAEG;AACH,MA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AA+B;IAoFvC;;;;OAIG;IACH,OAAO,CAAC,UAAU;IA0IlB;;;OAGG;IACH,OAAO,CAAC,2BAA2B;IA2DnC;;;;;;;;;OASG;IACH,OAAO,CAAC,kBAAkB;IAyE1B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAuBzB;;;OAGG;IACH,OAAO,CAAC,aAAa;IAkKrB;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IA0DjC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAiDxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAmC3B;;OAEG;IACH,OAAO,CAAC,uBAAuB;CA2ChC"}
|
|
@@ -92,6 +92,13 @@ function containsKeyword(toolName, keywords) {
|
|
|
92
92
|
}
|
|
93
93
|
return null;
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Type guard for confidence levels that warrant event emission or status changes.
|
|
97
|
+
* Uses positive check for acceptable levels (safer than !== "low" if new levels added).
|
|
98
|
+
*/
|
|
99
|
+
function isActionableConfidence(confidence) {
|
|
100
|
+
return confidence === "high" || confidence === "medium";
|
|
101
|
+
}
|
|
95
102
|
/**
|
|
96
103
|
* Detect high-confidence annotation deception
|
|
97
104
|
* Returns misalignment info if obvious deception detected, null otherwise
|
|
@@ -535,6 +542,7 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
535
542
|
const toolAnnotations = this.extractAnnotations(tool);
|
|
536
543
|
const alignmentStatus = latestResult.alignmentStatus;
|
|
537
544
|
// Check readOnlyHint mismatch
|
|
545
|
+
// Only emit events when inference is confident enough to contradict explicit annotations
|
|
538
546
|
if (annotations?.readOnlyHint !== undefined &&
|
|
539
547
|
annotations.readOnlyHint !== inferred.expectedReadOnly) {
|
|
540
548
|
if (alignmentStatus === "REVIEW_RECOMMENDED") {
|
|
@@ -553,8 +561,10 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
553
561
|
reason: inferred.reason,
|
|
554
562
|
});
|
|
555
563
|
}
|
|
556
|
-
else
|
|
557
|
-
|
|
564
|
+
else if (!inferred.isAmbiguous &&
|
|
565
|
+
isActionableConfidence(inferred.confidence)) {
|
|
566
|
+
// Emit misaligned only for medium/high-confidence mismatches
|
|
567
|
+
// When inference is low-confidence/ambiguous, trust explicit annotation
|
|
558
568
|
context.onProgress({
|
|
559
569
|
type: "annotation_misaligned",
|
|
560
570
|
tool: tool.name,
|
|
@@ -568,8 +578,10 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
568
578
|
reason: `Tool has readOnlyHint=${annotations.readOnlyHint}, but ${inferred.reason}`,
|
|
569
579
|
});
|
|
570
580
|
}
|
|
581
|
+
// When inference is ambiguous/low-confidence, trust explicit annotation - no event emitted
|
|
571
582
|
}
|
|
572
583
|
// Check destructiveHint mismatch
|
|
584
|
+
// Only emit events when inference is confident enough to contradict explicit annotations
|
|
573
585
|
if (annotations?.destructiveHint !== undefined &&
|
|
574
586
|
annotations.destructiveHint !== inferred.expectedDestructive) {
|
|
575
587
|
if (alignmentStatus === "REVIEW_RECOMMENDED") {
|
|
@@ -588,8 +600,10 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
588
600
|
reason: inferred.reason,
|
|
589
601
|
});
|
|
590
602
|
}
|
|
591
|
-
else
|
|
592
|
-
|
|
603
|
+
else if (!inferred.isAmbiguous &&
|
|
604
|
+
isActionableConfidence(inferred.confidence)) {
|
|
605
|
+
// Emit misaligned only for medium/high-confidence mismatches
|
|
606
|
+
// When inference is low-confidence/ambiguous, trust explicit annotation
|
|
593
607
|
context.onProgress({
|
|
594
608
|
type: "annotation_misaligned",
|
|
595
609
|
tool: tool.name,
|
|
@@ -603,6 +617,7 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
603
617
|
reason: `Tool has destructiveHint=${annotations.destructiveHint}, but ${inferred.reason}`,
|
|
604
618
|
});
|
|
605
619
|
}
|
|
620
|
+
// When inference is ambiguous/low-confidence, trust explicit annotation - no event emitted
|
|
606
621
|
}
|
|
607
622
|
}
|
|
608
623
|
}
|
|
@@ -892,7 +907,7 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
892
907
|
// Note: High-confidence deception detection (exec/install keywords)
|
|
893
908
|
// is handled in the `deception` block above, not here
|
|
894
909
|
if (!inferredBehavior.isAmbiguous &&
|
|
895
|
-
inferredBehavior.confidence
|
|
910
|
+
isActionableConfidence(inferredBehavior.confidence)) {
|
|
896
911
|
// Medium/high confidence mismatch: MISALIGNED
|
|
897
912
|
alignmentStatus = "MISALIGNED";
|
|
898
913
|
if (readOnlyMismatch) {
|
|
@@ -911,7 +926,7 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
911
926
|
}
|
|
912
927
|
// Check for destructive tools without explicit hint (only for high-confidence patterns)
|
|
913
928
|
if (inferredBehavior.expectedDestructive &&
|
|
914
|
-
inferredBehavior.confidence
|
|
929
|
+
isActionableConfidence(inferredBehavior.confidence) &&
|
|
915
930
|
annotations.destructiveHint !== true) {
|
|
916
931
|
issues.push("Tool appears destructive but destructiveHint is not set to true");
|
|
917
932
|
recommendations.push(`Set destructiveHint=true for ${tool.name} - this tool appears to perform destructive operations`);
|
|
@@ -1197,7 +1212,7 @@ export class ToolAnnotationAssessor extends BaseAssessor {
|
|
|
1197
1212
|
return {
|
|
1198
1213
|
expectedReadOnly: false,
|
|
1199
1214
|
expectedDestructive: false,
|
|
1200
|
-
reason: "Could not infer from name pattern
|
|
1215
|
+
reason: "Could not infer behavior from name pattern",
|
|
1201
1216
|
confidence: "low",
|
|
1202
1217
|
isAmbiguous: true,
|
|
1203
1218
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-client",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.9",
|
|
4
4
|
"description": "Client-side application for the Enhanced MCP Inspector with assessment capabilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bryan Thompson <bryan@triepod.ai>",
|