@bryan-thompson/inspector-assessment-client 1.36.3 → 1.36.5
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-RXmtS9Xr.js → OAuthCallback-pydLxj3d.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-BRtDZYF8.js → OAuthDebugCallback-BLEebYQf.js} +1 -1
- package/dist/assets/{index-0DAqp50J.js → index-CVyqQ7s8.js} +4 -4
- package/dist/index.html +1 -1
- package/lib/services/assessment/modules/annotations/AnnotationDeceptionDetector.d.ts +22 -0
- package/lib/services/assessment/modules/annotations/AnnotationDeceptionDetector.d.ts.map +1 -1
- package/lib/services/assessment/modules/annotations/AnnotationDeceptionDetector.js +53 -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-CVyqQ7s8.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-CVyqQ7s8.js";
|
|
2
2
|
const OAuthDebugCallback = ({ onConnect }) => {
|
|
3
3
|
reactExports.useEffect(() => {
|
|
4
4
|
let isProcessed = false;
|
|
@@ -16373,7 +16373,7 @@ object({
|
|
|
16373
16373
|
token_type_hint: string().optional()
|
|
16374
16374
|
}).strip();
|
|
16375
16375
|
const name = "@bryan-thompson/inspector-assessment-client";
|
|
16376
|
-
const version$1 = "1.36.
|
|
16376
|
+
const version$1 = "1.36.4";
|
|
16377
16377
|
const packageJson = {
|
|
16378
16378
|
name,
|
|
16379
16379
|
version: version$1
|
|
@@ -48920,7 +48920,7 @@ const useTheme = () => {
|
|
|
48920
48920
|
[theme, setThemeWithSideEffect]
|
|
48921
48921
|
);
|
|
48922
48922
|
};
|
|
48923
|
-
const version = "1.36.
|
|
48923
|
+
const version = "1.36.4";
|
|
48924
48924
|
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
48925
48925
|
createPopperScope
|
|
48926
48926
|
]);
|
|
@@ -52515,13 +52515,13 @@ const App = () => {
|
|
|
52515
52515
|
) });
|
|
52516
52516
|
if (window.location.pathname === "/oauth/callback") {
|
|
52517
52517
|
const OAuthCallback = React.lazy(
|
|
52518
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
52518
|
+
() => __vitePreload(() => import("./OAuthCallback-pydLxj3d.js"), true ? [] : void 0)
|
|
52519
52519
|
);
|
|
52520
52520
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
|
|
52521
52521
|
}
|
|
52522
52522
|
if (window.location.pathname === "/oauth/callback/debug") {
|
|
52523
52523
|
const OAuthDebugCallback = React.lazy(
|
|
52524
|
-
() => __vitePreload(() => import("./OAuthDebugCallback-
|
|
52524
|
+
() => __vitePreload(() => import("./OAuthDebugCallback-BLEebYQf.js"), true ? [] : void 0)
|
|
52525
52525
|
);
|
|
52526
52526
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
|
|
52527
52527
|
}
|
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-CVyqQ7s8.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-BoUA5OL1.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -15,6 +15,18 @@ export declare const READONLY_CONTRADICTION_KEYWORDS: string[];
|
|
|
15
15
|
* Issue #18: browser-tools-mcp uses runAccessibilityAudit, runSEOAudit, etc.
|
|
16
16
|
*/
|
|
17
17
|
export declare const RUN_READONLY_EXEMPT_SUFFIXES: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Prefixes that indicate read-only operations.
|
|
20
|
+
* Issue #161: When a tool starts with these prefixes, certain keywords become nouns.
|
|
21
|
+
* For example, "post" in "get_post_details" is a Reddit post (noun), not POST method (verb).
|
|
22
|
+
*/
|
|
23
|
+
export declare const READONLY_PREFIX_PATTERNS: RegExp[];
|
|
24
|
+
/**
|
|
25
|
+
* Keywords that can be nouns when following a read-only prefix.
|
|
26
|
+
* Issue #161: These words are verbs when used as prefixes (post_message) but
|
|
27
|
+
* nouns when used after read-only prefixes (get_post_details).
|
|
28
|
+
*/
|
|
29
|
+
export declare const NOUN_KEYWORDS_IN_READONLY_CONTEXT: string[];
|
|
18
30
|
/**
|
|
19
31
|
* Keywords that contradict destructiveHint=false (these tools delete/destroy data)
|
|
20
32
|
*/
|
|
@@ -41,6 +53,16 @@ export declare function containsKeyword(toolName: string, keywords: string[]): s
|
|
|
41
53
|
* Issue #18: Prevents false positives for analysis/audit tools.
|
|
42
54
|
*/
|
|
43
55
|
export declare function isRunKeywordExempt(toolName: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Check if a keyword is being used as a noun in a read-only context.
|
|
58
|
+
* Issue #161: "post" in "get_post_details" is a Reddit post (noun), not POST method (verb).
|
|
59
|
+
* Prevents false positives when read-only tools reference content types.
|
|
60
|
+
*
|
|
61
|
+
* @param toolName - The tool name to check
|
|
62
|
+
* @param keyword - The keyword that was matched (e.g., "post")
|
|
63
|
+
* @returns true if the keyword is a noun in this read-only context
|
|
64
|
+
*/
|
|
65
|
+
export declare function isNounInReadOnlyContext(toolName: string, keyword: string): boolean;
|
|
44
66
|
/**
|
|
45
67
|
* Type guard for confidence levels that warrant event emission or status changes.
|
|
46
68
|
* Uses positive check for acceptable levels (safer than !== "low" if new levels added).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationDeceptionDetector.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/annotations/AnnotationDeceptionDetector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,+BAA+B,UA0C3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAexC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kCAAkC,UAgB9C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAAC;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,GACjB,MAAM,GAAG,IAAI,CAkBf;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAU5D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACjE,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"AnnotationDeceptionDetector.d.ts","sourceRoot":"","sources":["../../../../../src/services/assessment/modules/annotations/AnnotationDeceptionDetector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;GAEG;AACH,eAAO,MAAM,+BAA+B,UA0C3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAexC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,UAYpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,UAO7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kCAAkC,UAgB9C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAAC;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,GACjB,MAAM,GAAG,IAAI,CAkBf;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAU5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,OAAO,CAOT;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,GACjE,eAAe,GAAG,IAAI,CAwCxB"}
|
|
@@ -72,6 +72,37 @@ export const RUN_READONLY_EXEMPT_SUFFIXES = [
|
|
|
72
72
|
"benchmark", // runBenchmark, runPerfBenchmark
|
|
73
73
|
"diagnostic", // runDiagnostic
|
|
74
74
|
];
|
|
75
|
+
/**
|
|
76
|
+
* Prefixes that indicate read-only operations.
|
|
77
|
+
* Issue #161: When a tool starts with these prefixes, certain keywords become nouns.
|
|
78
|
+
* For example, "post" in "get_post_details" is a Reddit post (noun), not POST method (verb).
|
|
79
|
+
*/
|
|
80
|
+
export const READONLY_PREFIX_PATTERNS = [
|
|
81
|
+
/^get[_-]/i,
|
|
82
|
+
/^list[_-]/i,
|
|
83
|
+
/^fetch[_-]/i,
|
|
84
|
+
/^read[_-]/i,
|
|
85
|
+
/^search[_-]/i,
|
|
86
|
+
/^find[_-]/i,
|
|
87
|
+
/^show[_-]/i,
|
|
88
|
+
/^view[_-]/i,
|
|
89
|
+
/^describe[_-]/i,
|
|
90
|
+
/^check[_-]/i,
|
|
91
|
+
/^query[_-]/i,
|
|
92
|
+
];
|
|
93
|
+
/**
|
|
94
|
+
* Keywords that can be nouns when following a read-only prefix.
|
|
95
|
+
* Issue #161: These words are verbs when used as prefixes (post_message) but
|
|
96
|
+
* nouns when used after read-only prefixes (get_post_details).
|
|
97
|
+
*/
|
|
98
|
+
export const NOUN_KEYWORDS_IN_READONLY_CONTEXT = [
|
|
99
|
+
"post", // Reddit post, blog post, forum post
|
|
100
|
+
"message", // chat message, email message
|
|
101
|
+
"comment", // post comment, code comment
|
|
102
|
+
"thread", // forum thread, email thread
|
|
103
|
+
"log", // log entry, audit log
|
|
104
|
+
"record", // database record
|
|
105
|
+
];
|
|
75
106
|
/**
|
|
76
107
|
* Keywords that contradict destructiveHint=false (these tools delete/destroy data)
|
|
77
108
|
*/
|
|
@@ -130,6 +161,23 @@ export function isRunKeywordExempt(toolName) {
|
|
|
130
161
|
// Check if any exempt suffix is present
|
|
131
162
|
return RUN_READONLY_EXEMPT_SUFFIXES.some((suffix) => lowerName.includes(suffix));
|
|
132
163
|
}
|
|
164
|
+
/**
|
|
165
|
+
* Check if a keyword is being used as a noun in a read-only context.
|
|
166
|
+
* Issue #161: "post" in "get_post_details" is a Reddit post (noun), not POST method (verb).
|
|
167
|
+
* Prevents false positives when read-only tools reference content types.
|
|
168
|
+
*
|
|
169
|
+
* @param toolName - The tool name to check
|
|
170
|
+
* @param keyword - The keyword that was matched (e.g., "post")
|
|
171
|
+
* @returns true if the keyword is a noun in this read-only context
|
|
172
|
+
*/
|
|
173
|
+
export function isNounInReadOnlyContext(toolName, keyword) {
|
|
174
|
+
// Check if keyword can be a noun in read-only context
|
|
175
|
+
if (!NOUN_KEYWORDS_IN_READONLY_CONTEXT.includes(keyword)) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
// Check if tool name starts with read-only prefix
|
|
179
|
+
return READONLY_PREFIX_PATTERNS.some((pattern) => pattern.test(toolName));
|
|
180
|
+
}
|
|
133
181
|
/**
|
|
134
182
|
* Type guard for confidence levels that warrant event emission or status changes.
|
|
135
183
|
* Uses positive check for acceptable levels (safer than !== "low" if new levels added).
|
|
@@ -152,6 +200,11 @@ export function detectAnnotationDeception(toolName, annotations) {
|
|
|
152
200
|
// Tool matches "run" but has an analysis suffix - not deceptive
|
|
153
201
|
// Fall through to normal pattern-based inference
|
|
154
202
|
}
|
|
203
|
+
else if (isNounInReadOnlyContext(toolName, keyword)) {
|
|
204
|
+
// Issue #161: Skip when keyword is a noun in read-only context
|
|
205
|
+
// e.g., "post" in "get_post_details" is a Reddit post, not POST method
|
|
206
|
+
// Fall through to normal pattern-based inference
|
|
207
|
+
}
|
|
155
208
|
else {
|
|
156
209
|
return {
|
|
157
210
|
field: "readOnlyHint",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-client",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.5",
|
|
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>",
|