@bryan-thompson/inspector-assessment 1.29.0 → 1.29.1
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/cli/build/__tests__/assessment-runner/config-builder.test.js +49 -0
- package/cli/build/__tests__/jsonl-events.test.js +4 -0
- package/cli/build/lib/assessment-runner/config-builder.js +7 -0
- package/cli/build/lib/jsonl-events.js +9 -3
- package/cli/package.json +1 -1
- package/client/dist/assets/{OAuthCallback-D4CGp1D9.js → OAuthCallback-BbE88qbF.js} +1 -1
- package/client/dist/assets/{OAuthDebugCallback-BtElYL3f.js → OAuthDebugCallback-CfRYq1JG.js} +1 -1
- package/client/dist/assets/{index-3Q8COhyq.js → index-CsUB73MT.js} +4 -4
- package/client/dist/index.html +1 -1
- package/client/lib/lib/assessment/configTypes.d.ts +6 -0
- package/client/lib/lib/assessment/configTypes.d.ts.map +1 -1
- package/client/lib/lib/assessment/configTypes.js +5 -0
- package/client/lib/lib/moduleScoring.d.ts +11 -0
- package/client/lib/lib/moduleScoring.d.ts.map +1 -1
- package/client/lib/lib/moduleScoring.js +11 -0
- package/client/lib/services/assessment/orchestratorHelpers.d.ts.map +1 -1
- package/client/lib/services/assessment/orchestratorHelpers.js +5 -3
- package/client/package.json +1 -1
- package/package.json +1 -1
- package/server/package.json +1 -1
|
@@ -12,6 +12,7 @@ jest.unstable_mockModule("../../profiles.js", () => ({
|
|
|
12
12
|
}));
|
|
13
13
|
jest.unstable_mockModule("../../../../client/lib/lib/assessmentTypes.js", () => ({
|
|
14
14
|
DEFAULT_ASSESSMENT_CONFIG: {
|
|
15
|
+
configVersion: 2,
|
|
15
16
|
enableExtendedAssessment: false,
|
|
16
17
|
parallelTesting: false,
|
|
17
18
|
testTimeout: 10000,
|
|
@@ -286,4 +287,52 @@ describe("buildConfig", () => {
|
|
|
286
287
|
expect(result.logging?.level).toBe("error");
|
|
287
288
|
});
|
|
288
289
|
});
|
|
290
|
+
describe("config version validation (Issue #107)", () => {
|
|
291
|
+
let consoleWarnSpy;
|
|
292
|
+
beforeEach(() => {
|
|
293
|
+
consoleWarnSpy = jest
|
|
294
|
+
.spyOn(console, "warn")
|
|
295
|
+
.mockImplementation(() => { });
|
|
296
|
+
});
|
|
297
|
+
afterEach(() => {
|
|
298
|
+
consoleWarnSpy.mockRestore();
|
|
299
|
+
});
|
|
300
|
+
it("should not warn when configVersion is present in defaults", () => {
|
|
301
|
+
// DEFAULT_ASSESSMENT_CONFIG mock includes configVersion: 2
|
|
302
|
+
buildConfig({ serverName: "test" });
|
|
303
|
+
// Should NOT warn because configVersion is set
|
|
304
|
+
expect(consoleWarnSpy).not.toHaveBeenCalledWith(expect.stringContaining("Config missing configVersion"));
|
|
305
|
+
});
|
|
306
|
+
it("should still build config successfully with configVersion", () => {
|
|
307
|
+
const result = buildConfig({ serverName: "test" });
|
|
308
|
+
expect(result).toBeDefined();
|
|
309
|
+
expect(result.configVersion).toBe(2);
|
|
310
|
+
expect(result.testTimeout).toBeDefined();
|
|
311
|
+
expect(result.logging).toBeDefined();
|
|
312
|
+
});
|
|
313
|
+
it("should include configVersion in final config", () => {
|
|
314
|
+
const result = buildConfig({ serverName: "test" });
|
|
315
|
+
expect(result.configVersion).toBe(2);
|
|
316
|
+
});
|
|
317
|
+
it("should preserve configVersion through profile-based config", () => {
|
|
318
|
+
modulesToLegacyConfig.mockReturnValue({
|
|
319
|
+
functionality: true,
|
|
320
|
+
security: true,
|
|
321
|
+
});
|
|
322
|
+
const result = buildConfig({ serverName: "test", profile: "quick" });
|
|
323
|
+
expect(result.configVersion).toBe(2);
|
|
324
|
+
});
|
|
325
|
+
it("should preserve configVersion through module filtering", () => {
|
|
326
|
+
getAllModulesConfig.mockReturnValue({
|
|
327
|
+
functionality: true,
|
|
328
|
+
security: true,
|
|
329
|
+
});
|
|
330
|
+
resolveModuleNames.mockReturnValue(["functionality"]);
|
|
331
|
+
const result = buildConfig({
|
|
332
|
+
serverName: "test",
|
|
333
|
+
onlyModules: ["functionality"],
|
|
334
|
+
});
|
|
335
|
+
expect(result.configVersion).toBe(2);
|
|
336
|
+
});
|
|
337
|
+
});
|
|
289
338
|
});
|
|
@@ -33,6 +33,10 @@ describe("JSONL Event Emission", () => {
|
|
|
33
33
|
emitJSONL({ event: "test" });
|
|
34
34
|
expect(emittedEvents[0]).toHaveProperty("version");
|
|
35
35
|
});
|
|
36
|
+
it("should include schemaVersion field", () => {
|
|
37
|
+
emitJSONL({ event: "test" });
|
|
38
|
+
expect(emittedEvents[0]).toHaveProperty("schemaVersion", 1);
|
|
39
|
+
});
|
|
36
40
|
it("should handle complex nested objects", () => {
|
|
37
41
|
emitJSONL({
|
|
38
42
|
event: "complex",
|
|
@@ -123,5 +123,12 @@ export function buildConfig(options) {
|
|
|
123
123
|
const envLogLevel = process.env.LOG_LEVEL;
|
|
124
124
|
const logLevel = options.logLevel ?? envLogLevel ?? "info";
|
|
125
125
|
config.logging = { level: logLevel };
|
|
126
|
+
// Config version validation (Issue #107)
|
|
127
|
+
// Warn if config is missing version field - will be required in v2.0.0
|
|
128
|
+
if (!config.configVersion) {
|
|
129
|
+
console.warn("⚠️ Config missing configVersion field. " +
|
|
130
|
+
"This will be required in v2.0.0. " +
|
|
131
|
+
"See docs/DEPRECATION_GUIDE.md for migration info.");
|
|
132
|
+
}
|
|
126
133
|
return config;
|
|
127
134
|
}
|
|
@@ -7,16 +7,22 @@
|
|
|
7
7
|
* This is a CLI-local version that imports from the built client lib
|
|
8
8
|
* to avoid rootDir conflicts in TypeScript compilation.
|
|
9
9
|
*/
|
|
10
|
-
import { INSPECTOR_VERSION } from "../../../client/lib/lib/moduleScoring.js";
|
|
10
|
+
import { INSPECTOR_VERSION, SCHEMA_VERSION, } from "../../../client/lib/lib/moduleScoring.js";
|
|
11
|
+
// Re-export for consumers of this module
|
|
12
|
+
export { SCHEMA_VERSION };
|
|
11
13
|
// ============================================================================
|
|
12
14
|
// Core Functions
|
|
13
15
|
// ============================================================================
|
|
14
16
|
/**
|
|
15
17
|
* Emit a JSONL event to stderr for real-time machine parsing.
|
|
16
|
-
* Automatically includes version
|
|
18
|
+
* Automatically includes version and schemaVersion fields for compatibility checking.
|
|
17
19
|
*/
|
|
18
20
|
export function emitJSONL(event) {
|
|
19
|
-
console.error(JSON.stringify({
|
|
21
|
+
console.error(JSON.stringify({
|
|
22
|
+
...event,
|
|
23
|
+
version: INSPECTOR_VERSION,
|
|
24
|
+
schemaVersion: SCHEMA_VERSION,
|
|
25
|
+
}));
|
|
20
26
|
}
|
|
21
27
|
/**
|
|
22
28
|
* Emit server_connected event after successful connection.
|
package/cli/package.json
CHANGED
|
@@ -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-CsUB73MT.js";
|
|
2
2
|
const OAuthCallback = ({ onConnect }) => {
|
|
3
3
|
const { toast } = useToast();
|
|
4
4
|
const hasProcessedRef = reactExports.useRef(false);
|
package/client/dist/assets/{OAuthDebugCallback-BtElYL3f.js → OAuthDebugCallback-CfRYq1JG.js}
RENAMED
|
@@ -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-CsUB73MT.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.29.
|
|
16376
|
+
const version$1 = "1.29.1";
|
|
16377
16377
|
const packageJson = {
|
|
16378
16378
|
name,
|
|
16379
16379
|
version: version$1
|
|
@@ -45288,7 +45288,7 @@ const useTheme = () => {
|
|
|
45288
45288
|
[theme, setThemeWithSideEffect]
|
|
45289
45289
|
);
|
|
45290
45290
|
};
|
|
45291
|
-
const version = "1.29.
|
|
45291
|
+
const version = "1.29.1";
|
|
45292
45292
|
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
45293
45293
|
createPopperScope
|
|
45294
45294
|
]);
|
|
@@ -48883,13 +48883,13 @@ const App = () => {
|
|
|
48883
48883
|
) });
|
|
48884
48884
|
if (window.location.pathname === "/oauth/callback") {
|
|
48885
48885
|
const OAuthCallback = React.lazy(
|
|
48886
|
-
() => __vitePreload(() => import("./OAuthCallback-
|
|
48886
|
+
() => __vitePreload(() => import("./OAuthCallback-BbE88qbF.js"), true ? [] : void 0)
|
|
48887
48887
|
);
|
|
48888
48888
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthCallback, { onConnect: onOAuthConnect }) });
|
|
48889
48889
|
}
|
|
48890
48890
|
if (window.location.pathname === "/oauth/callback/debug") {
|
|
48891
48891
|
const OAuthDebugCallback = React.lazy(
|
|
48892
|
-
() => __vitePreload(() => import("./OAuthDebugCallback-
|
|
48892
|
+
() => __vitePreload(() => import("./OAuthDebugCallback-CfRYq1JG.js"), true ? [] : void 0)
|
|
48893
48893
|
);
|
|
48894
48894
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OAuthDebugCallback, { onConnect: onOAuthDebugConnect }) });
|
|
48895
48895
|
}
|
package/client/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-CsUB73MT.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-cHhcEXbr.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -35,6 +35,12 @@ export interface ClaudeCodeConfig {
|
|
|
35
35
|
httpConfig?: HttpTransportConfig;
|
|
36
36
|
}
|
|
37
37
|
export interface AssessmentConfiguration {
|
|
38
|
+
/**
|
|
39
|
+
* Config schema version for migration support.
|
|
40
|
+
* Current version: 2
|
|
41
|
+
* @since 1.27.0
|
|
42
|
+
*/
|
|
43
|
+
configVersion?: number;
|
|
38
44
|
testTimeout: number;
|
|
39
45
|
/** Security-specific test timeout in ms (default: 5000). Lower than testTimeout for fast payload testing. */
|
|
40
46
|
securityTestTimeout?: number;
|
|
@@ -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;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAA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qBAAqB,EAAE,uBAuCnC,CAAC;AAIF,eAAO,MAAM,iBAAiB,EAAE,uBAuC/B,CAAC;AAIF,eAAO,MAAM,4BAA4B,EAAE,uBAkD1C,CAAC"}
|
|
@@ -11,6 +11,7 @@ export { DEFAULT_LOGGING_CONFIG };
|
|
|
11
11
|
// Configuration Presets
|
|
12
12
|
// ============================================================================
|
|
13
13
|
export const DEFAULT_ASSESSMENT_CONFIG = {
|
|
14
|
+
configVersion: 2,
|
|
14
15
|
testTimeout: 30000, // 30 seconds per tool
|
|
15
16
|
delayBetweenTests: 0, // No delay by default
|
|
16
17
|
skipBrokenTools: false,
|
|
@@ -52,6 +53,7 @@ export const DEFAULT_ASSESSMENT_CONFIG = {
|
|
|
52
53
|
// Reviewer mode configuration: optimized for fast, human-assisted reviews
|
|
53
54
|
// Focuses on Anthropic's 5 core requirements only
|
|
54
55
|
export const REVIEWER_MODE_CONFIG = {
|
|
56
|
+
configVersion: 2,
|
|
55
57
|
testTimeout: 10000, // 10 seconds per tool (faster)
|
|
56
58
|
delayBetweenTests: 100, // Small delay for rate limiting
|
|
57
59
|
skipBrokenTools: true, // Skip broken tools to save time
|
|
@@ -93,6 +95,7 @@ export const REVIEWER_MODE_CONFIG = {
|
|
|
93
95
|
};
|
|
94
96
|
// Developer mode configuration: comprehensive testing for debugging
|
|
95
97
|
export const DEVELOPER_MODE_CONFIG = {
|
|
98
|
+
configVersion: 2,
|
|
96
99
|
testTimeout: 30000, // 30 seconds per tool
|
|
97
100
|
delayBetweenTests: 500, // Moderate delay for thorough testing
|
|
98
101
|
skipBrokenTools: false,
|
|
@@ -134,6 +137,7 @@ export const DEVELOPER_MODE_CONFIG = {
|
|
|
134
137
|
// MCP Directory Audit mode: focuses on compliance gap assessors
|
|
135
138
|
// Use for pre-submission validation to Anthropic MCP Directory
|
|
136
139
|
export const AUDIT_MODE_CONFIG = {
|
|
140
|
+
configVersion: 2,
|
|
137
141
|
testTimeout: 30000,
|
|
138
142
|
delayBetweenTests: 100,
|
|
139
143
|
skipBrokenTools: false,
|
|
@@ -175,6 +179,7 @@ export const AUDIT_MODE_CONFIG = {
|
|
|
175
179
|
// Claude-enhanced audit mode: uses Claude Code for intelligent analysis
|
|
176
180
|
// Reduces false positives in AUP scanning and improves test quality
|
|
177
181
|
export const CLAUDE_ENHANCED_AUDIT_CONFIG = {
|
|
182
|
+
configVersion: 2,
|
|
178
183
|
testTimeout: 30000,
|
|
179
184
|
delayBetweenTests: 100,
|
|
180
185
|
skipBrokenTools: false,
|
|
@@ -23,4 +23,15 @@ export declare function calculateModuleScore(result: unknown): number | null;
|
|
|
23
23
|
* Dynamically imported from package.json to stay in sync.
|
|
24
24
|
*/
|
|
25
25
|
export declare const INSPECTOR_VERSION: string;
|
|
26
|
+
/**
|
|
27
|
+
* Schema version for JSONL events.
|
|
28
|
+
* Increment when event structure changes to enable consumers to handle
|
|
29
|
+
* schema evolution gracefully.
|
|
30
|
+
*
|
|
31
|
+
* This is the single source of truth - imported by:
|
|
32
|
+
* - scripts/lib/jsonl-events.ts
|
|
33
|
+
* - cli/src/lib/jsonl-events.ts
|
|
34
|
+
* - client/src/services/assessment/orchestratorHelpers.ts
|
|
35
|
+
*/
|
|
36
|
+
export declare const SCHEMA_VERSION = 1;
|
|
26
37
|
//# sourceMappingURL=moduleScoring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduleScoring.d.ts","sourceRoot":"","sources":["../../src/lib/moduleScoring.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;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,QAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"moduleScoring.d.ts","sourceRoot":"","sources":["../../src/lib/moduleScoring.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;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,QAAsB,CAAC;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,IAAI,CAAC"}
|
|
@@ -55,3 +55,14 @@ export function calculateModuleScore(result) {
|
|
|
55
55
|
* Dynamically imported from package.json to stay in sync.
|
|
56
56
|
*/
|
|
57
57
|
export const INSPECTOR_VERSION = packageJson.version;
|
|
58
|
+
/**
|
|
59
|
+
* Schema version for JSONL events.
|
|
60
|
+
* Increment when event structure changes to enable consumers to handle
|
|
61
|
+
* schema evolution gracefully.
|
|
62
|
+
*
|
|
63
|
+
* This is the single source of truth - imported by:
|
|
64
|
+
* - scripts/lib/jsonl-events.ts
|
|
65
|
+
* - cli/src/lib/jsonl-events.ts
|
|
66
|
+
* - client/src/services/assessment/orchestratorHelpers.ts
|
|
67
|
+
*/
|
|
68
|
+
export const SCHEMA_VERSION = 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestratorHelpers.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/orchestratorHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestratorHelpers.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/orchestratorHelpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAW/B,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,MAA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b,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC,CAAC;IACF,gBAAgB,EAAE;QAChB,SAAS,EAAE,OAAO,CAAC;QACnB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,MAAM,EAAE,OAAO,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B,CAkEA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACvC,gBAAgB,CAsBlB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACvC,MAAM,CA8ER;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC,GACvC,MAAM,EAAE,CAiBV"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - Summary and recommendations generation
|
|
10
10
|
*/
|
|
11
11
|
// Import score calculation helpers from shared module
|
|
12
|
-
import { calculateModuleScore, normalizeModuleKey, INSPECTOR_VERSION, } from "../../lib/moduleScoring.js";
|
|
12
|
+
import { calculateModuleScore, normalizeModuleKey, INSPECTOR_VERSION, SCHEMA_VERSION, } from "../../lib/moduleScoring.js";
|
|
13
13
|
// Track module start times for duration calculation
|
|
14
14
|
export const moduleStartTimes = new Map();
|
|
15
15
|
/**
|
|
@@ -19,13 +19,14 @@ export const moduleStartTimes = new Map();
|
|
|
19
19
|
export function emitModuleStartedEvent(moduleName, estimatedTests, toolCount) {
|
|
20
20
|
const moduleKey = normalizeModuleKey(moduleName);
|
|
21
21
|
moduleStartTimes.set(moduleKey, Date.now());
|
|
22
|
-
// Emit JSONL to stderr with version
|
|
22
|
+
// Emit JSONL to stderr with version and schemaVersion fields
|
|
23
23
|
console.error(JSON.stringify({
|
|
24
24
|
event: "module_started",
|
|
25
25
|
module: moduleKey,
|
|
26
26
|
estimatedTests,
|
|
27
27
|
toolCount,
|
|
28
28
|
version: INSPECTOR_VERSION,
|
|
29
|
+
schemaVersion: SCHEMA_VERSION,
|
|
29
30
|
}));
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
@@ -53,13 +54,14 @@ export function emitModuleProgress(moduleName, status, result, testsRun = 0) {
|
|
|
53
54
|
testsRun,
|
|
54
55
|
duration,
|
|
55
56
|
version: INSPECTOR_VERSION,
|
|
57
|
+
schemaVersion: SCHEMA_VERSION,
|
|
56
58
|
};
|
|
57
59
|
// Add AUP enrichment when module is AUP
|
|
58
60
|
if (moduleKey === "aup" && result) {
|
|
59
61
|
const aupEnrichment = buildAUPEnrichment(result);
|
|
60
62
|
Object.assign(event, aupEnrichment);
|
|
61
63
|
}
|
|
62
|
-
// Emit JSONL to stderr with version
|
|
64
|
+
// Emit JSONL to stderr with version and schemaVersion fields
|
|
63
65
|
console.error(JSON.stringify(event));
|
|
64
66
|
}
|
|
65
67
|
/**
|
package/client/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-client",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.1",
|
|
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>",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "Enhanced MCP Inspector with comprehensive assessment capabilities for server validation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bryan Thompson <bryan@triepod.ai>",
|
package/server/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bryan-thompson/inspector-assessment-server",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "Server-side application for the Enhanced MCP Inspector with assessment capabilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bryan Thompson <bryan@triepod.ai>",
|