@bryan-thompson/inspector-assessment-client 1.22.14 → 1.22.16
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-DDbR9we4.js → OAuthCallback-DNYBkA2C.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-Bel6ibpN.js → OAuthDebugCallback-EhdSHXee.js} +1 -1
- package/dist/assets/{index-B55OPPJA.js → index-BRiFDs-g.js} +20 -13
- package/dist/index.html +1 -1
- package/lib/lib/assessment/configTypes.d.ts +70 -0
- package/lib/lib/assessment/configTypes.d.ts.map +1 -0
- package/lib/lib/assessment/configTypes.js +194 -0
- package/lib/lib/assessment/constants.d.ts +10 -0
- package/lib/lib/assessment/constants.d.ts.map +1 -0
- package/lib/lib/assessment/constants.js +61 -0
- package/lib/lib/assessment/coreTypes.d.ts +159 -0
- package/lib/lib/assessment/coreTypes.d.ts.map +1 -0
- package/lib/lib/assessment/coreTypes.js +101 -0
- package/lib/lib/assessment/extendedTypes.d.ts +415 -0
- package/lib/lib/assessment/extendedTypes.d.ts.map +1 -0
- package/lib/lib/assessment/extendedTypes.js +9 -0
- package/lib/lib/assessment/index.d.ts +23 -0
- package/lib/lib/assessment/index.d.ts.map +1 -0
- package/lib/lib/assessment/index.js +48 -0
- package/lib/lib/assessment/progressTypes.d.ts +160 -0
- package/lib/lib/assessment/progressTypes.d.ts.map +1 -0
- package/lib/lib/assessment/progressTypes.js +9 -0
- package/lib/lib/assessment/resultTypes.d.ts +568 -0
- package/lib/lib/assessment/resultTypes.d.ts.map +1 -0
- package/lib/lib/assessment/resultTypes.js +9 -0
- package/lib/lib/assessmentTypes.d.ts +18 -1342
- package/lib/lib/assessmentTypes.d.ts.map +1 -1
- package/lib/lib/assessmentTypes.js +19 -341
- package/lib/services/assessment/AssessmentOrchestrator.d.ts +5 -0
- package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
- package/lib/services/assessment/AssessmentOrchestrator.js +24 -6
- package/lib/services/assessment/lib/concurrencyLimit.d.ts +12 -0
- package/lib/services/assessment/lib/concurrencyLimit.d.ts.map +1 -1
- package/lib/services/assessment/lib/concurrencyLimit.js +22 -0
- package/lib/services/assessment/lib/logger.d.ts +98 -0
- package/lib/services/assessment/lib/logger.d.ts.map +1 -0
- package/lib/services/assessment/lib/logger.js +153 -0
- package/lib/services/assessment/modules/BaseAssessor.d.ts +2 -2
- package/lib/services/assessment/modules/BaseAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/SecurityAssessor.d.ts.map +1 -1
- package/lib/services/assessment/modules/SecurityAssessor.js +9 -4
- package/package.json +1 -1
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured Logger for Assessment Modules
|
|
3
|
+
*
|
|
4
|
+
* Provides configurable logging with level filtering, structured context,
|
|
5
|
+
* and consistent formatting across all assessment modules.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: This logger outputs to stdout. JSONL events (module_started,
|
|
8
|
+
* module_complete, etc.) use stderr via console.error() and should NOT
|
|
9
|
+
* be routed through this logger.
|
|
10
|
+
*/
|
|
11
|
+
export type LogLevel = "silent" | "error" | "warn" | "info" | "debug";
|
|
12
|
+
/**
|
|
13
|
+
* Logging configuration for assessment runs.
|
|
14
|
+
* Controls verbosity and output format of diagnostic messages.
|
|
15
|
+
*/
|
|
16
|
+
export interface LoggingConfig {
|
|
17
|
+
/**
|
|
18
|
+
* Log level threshold. Messages below this level are suppressed.
|
|
19
|
+
* - 'silent': No output
|
|
20
|
+
* - 'error': Only errors
|
|
21
|
+
* - 'warn': Errors and warnings
|
|
22
|
+
* - 'info': Normal operational messages (default)
|
|
23
|
+
* - 'debug': Detailed diagnostic output
|
|
24
|
+
*/
|
|
25
|
+
level: LogLevel;
|
|
26
|
+
/**
|
|
27
|
+
* Output format.
|
|
28
|
+
* - 'text': Human-readable prefixed messages (default)
|
|
29
|
+
* - 'json': Machine-parseable JSON lines
|
|
30
|
+
*/
|
|
31
|
+
format?: "text" | "json";
|
|
32
|
+
/**
|
|
33
|
+
* Include ISO timestamp in each message.
|
|
34
|
+
* Default: false
|
|
35
|
+
*/
|
|
36
|
+
includeTimestamp?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Logger interface for assessment modules.
|
|
40
|
+
* Provides structured logging with context support.
|
|
41
|
+
*/
|
|
42
|
+
export interface Logger {
|
|
43
|
+
/**
|
|
44
|
+
* Log debug-level message (most verbose).
|
|
45
|
+
* Use for detailed diagnostic information during development.
|
|
46
|
+
*/
|
|
47
|
+
debug(message: string, context?: Record<string, unknown>): void;
|
|
48
|
+
/**
|
|
49
|
+
* Log info-level message (normal operations).
|
|
50
|
+
* Use for significant events during normal operation.
|
|
51
|
+
*/
|
|
52
|
+
info(message: string, context?: Record<string, unknown>): void;
|
|
53
|
+
/**
|
|
54
|
+
* Log warning-level message (potential issues).
|
|
55
|
+
* Use for recoverable issues or unexpected but handled conditions.
|
|
56
|
+
*/
|
|
57
|
+
warn(message: string, context?: Record<string, unknown>): void;
|
|
58
|
+
/**
|
|
59
|
+
* Log error-level message (failures).
|
|
60
|
+
* Use for errors that may affect assessment results.
|
|
61
|
+
*/
|
|
62
|
+
error(message: string, context?: Record<string, unknown>): void;
|
|
63
|
+
/**
|
|
64
|
+
* Create a child logger with a combined prefix.
|
|
65
|
+
* Useful for sub-components that need their own namespace.
|
|
66
|
+
*/
|
|
67
|
+
child(name: string): Logger;
|
|
68
|
+
/**
|
|
69
|
+
* Check if a level would be logged.
|
|
70
|
+
* Use to avoid expensive operations when logging is disabled.
|
|
71
|
+
*/
|
|
72
|
+
isLevelEnabled(level: LogLevel): boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Default configuration for logging.
|
|
76
|
+
*/
|
|
77
|
+
export declare const DEFAULT_LOGGING_CONFIG: LoggingConfig;
|
|
78
|
+
/**
|
|
79
|
+
* Create a logger instance with the given prefix and configuration.
|
|
80
|
+
*
|
|
81
|
+
* @param prefix - Logger prefix (typically module name)
|
|
82
|
+
* @param config - Optional logging configuration
|
|
83
|
+
* @returns Logger instance
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const logger = createLogger('SecurityAssessor', { level: 'debug' });
|
|
88
|
+
* logger.info('Starting assessment', { toolCount: 5 });
|
|
89
|
+
* // Output: [SecurityAssessor] Starting assessment {"toolCount":5}
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare function createLogger(prefix: string, config?: Partial<LoggingConfig>): Logger;
|
|
93
|
+
/**
|
|
94
|
+
* Create a silent logger that produces no output.
|
|
95
|
+
* Useful for tests or when logging should be completely disabled.
|
|
96
|
+
*/
|
|
97
|
+
export declare function createSilentLogger(): Logger;
|
|
98
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/lib/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,KAAK,EAAE,QAAQ,CAAC;IAEhB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB;;;OAGG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAEhE;;;OAGG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE/D;;;OAGG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAE/D;;;OAGG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAEhE;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAE5B;;;OAGG;IACH,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC1C;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,aAIpC,CAAC;AAiDF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAC9B,MAAM,CA0FR;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured Logger for Assessment Modules
|
|
3
|
+
*
|
|
4
|
+
* Provides configurable logging with level filtering, structured context,
|
|
5
|
+
* and consistent formatting across all assessment modules.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: This logger outputs to stdout. JSONL events (module_started,
|
|
8
|
+
* module_complete, etc.) use stderr via console.error() and should NOT
|
|
9
|
+
* be routed through this logger.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Default configuration for logging.
|
|
13
|
+
*/
|
|
14
|
+
export const DEFAULT_LOGGING_CONFIG = {
|
|
15
|
+
level: "info",
|
|
16
|
+
format: "text",
|
|
17
|
+
includeTimestamp: false,
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Log level priority mapping.
|
|
21
|
+
* Higher numbers are more verbose.
|
|
22
|
+
*/
|
|
23
|
+
const LOG_LEVEL_PRIORITY = {
|
|
24
|
+
silent: 0,
|
|
25
|
+
error: 1,
|
|
26
|
+
warn: 2,
|
|
27
|
+
info: 3,
|
|
28
|
+
debug: 4,
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Safely serialize a value for logging.
|
|
32
|
+
* Handles circular references and error objects.
|
|
33
|
+
*/
|
|
34
|
+
function safeSerialize(value) {
|
|
35
|
+
if (value instanceof Error) {
|
|
36
|
+
return {
|
|
37
|
+
name: value.name,
|
|
38
|
+
message: value.message,
|
|
39
|
+
stack: value.stack,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Format context object for text output.
|
|
46
|
+
*/
|
|
47
|
+
function formatContext(context) {
|
|
48
|
+
if (!context || Object.keys(context).length === 0) {
|
|
49
|
+
return "";
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
// Serialize with safe handling of special values
|
|
53
|
+
const serializable = {};
|
|
54
|
+
for (const [key, value] of Object.entries(context)) {
|
|
55
|
+
serializable[key] = safeSerialize(value);
|
|
56
|
+
}
|
|
57
|
+
return " " + JSON.stringify(serializable);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return " [context serialization failed]";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Create a logger instance with the given prefix and configuration.
|
|
65
|
+
*
|
|
66
|
+
* @param prefix - Logger prefix (typically module name)
|
|
67
|
+
* @param config - Optional logging configuration
|
|
68
|
+
* @returns Logger instance
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const logger = createLogger('SecurityAssessor', { level: 'debug' });
|
|
73
|
+
* logger.info('Starting assessment', { toolCount: 5 });
|
|
74
|
+
* // Output: [SecurityAssessor] Starting assessment {"toolCount":5}
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export function createLogger(prefix, config) {
|
|
78
|
+
const finalConfig = {
|
|
79
|
+
...DEFAULT_LOGGING_CONFIG,
|
|
80
|
+
...config,
|
|
81
|
+
};
|
|
82
|
+
const threshold = LOG_LEVEL_PRIORITY[finalConfig.level];
|
|
83
|
+
function shouldLog(level) {
|
|
84
|
+
return LOG_LEVEL_PRIORITY[level] <= threshold;
|
|
85
|
+
}
|
|
86
|
+
function emit(level, message, context) {
|
|
87
|
+
if (!shouldLog(level)) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const timestamp = finalConfig.includeTimestamp
|
|
91
|
+
? new Date().toISOString()
|
|
92
|
+
: null;
|
|
93
|
+
if (finalConfig.format === "json") {
|
|
94
|
+
// JSON format for machine parsing
|
|
95
|
+
const logEntry = {
|
|
96
|
+
level,
|
|
97
|
+
prefix,
|
|
98
|
+
message,
|
|
99
|
+
};
|
|
100
|
+
if (timestamp) {
|
|
101
|
+
logEntry.timestamp = timestamp;
|
|
102
|
+
}
|
|
103
|
+
if (context && Object.keys(context).length > 0) {
|
|
104
|
+
const serializable = {};
|
|
105
|
+
for (const [key, value] of Object.entries(context)) {
|
|
106
|
+
serializable[key] = safeSerialize(value);
|
|
107
|
+
}
|
|
108
|
+
logEntry.context = serializable;
|
|
109
|
+
}
|
|
110
|
+
// Output to stdout (NOT stderr - that's reserved for JSONL events)
|
|
111
|
+
console.log(JSON.stringify(logEntry));
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
// Text format for human reading
|
|
115
|
+
let output = "";
|
|
116
|
+
if (timestamp) {
|
|
117
|
+
output += `[${timestamp}] `;
|
|
118
|
+
}
|
|
119
|
+
output += `[${prefix}] ${message}`;
|
|
120
|
+
output += formatContext(context);
|
|
121
|
+
// Output to stdout (NOT stderr - that's reserved for JSONL events)
|
|
122
|
+
console.log(output);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
const logger = {
|
|
126
|
+
debug(message, context) {
|
|
127
|
+
emit("debug", message, context);
|
|
128
|
+
},
|
|
129
|
+
info(message, context) {
|
|
130
|
+
emit("info", message, context);
|
|
131
|
+
},
|
|
132
|
+
warn(message, context) {
|
|
133
|
+
emit("warn", message, context);
|
|
134
|
+
},
|
|
135
|
+
error(message, context) {
|
|
136
|
+
emit("error", message, context);
|
|
137
|
+
},
|
|
138
|
+
child(name) {
|
|
139
|
+
return createLogger(`${prefix}:${name}`, finalConfig);
|
|
140
|
+
},
|
|
141
|
+
isLevelEnabled(level) {
|
|
142
|
+
return shouldLog(level);
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
return logger;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Create a silent logger that produces no output.
|
|
149
|
+
* Useful for tests or when logging should be completely disabled.
|
|
150
|
+
*/
|
|
151
|
+
export function createSilentLogger() {
|
|
152
|
+
return createLogger("", { level: "silent" });
|
|
153
|
+
}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { AssessmentConfiguration, AssessmentStatus } from "../../../lib/assessmentTypes.js";
|
|
6
6
|
import { AssessmentContext } from "../AssessmentOrchestrator.js";
|
|
7
|
-
export declare abstract class BaseAssessor {
|
|
7
|
+
export declare abstract class BaseAssessor<T = unknown> {
|
|
8
8
|
protected config: AssessmentConfiguration;
|
|
9
9
|
protected testCount: number;
|
|
10
10
|
constructor(config: AssessmentConfiguration);
|
|
11
11
|
/**
|
|
12
12
|
* Abstract method that each assessor must implement
|
|
13
13
|
*/
|
|
14
|
-
abstract assess(context: AssessmentContext): Promise<
|
|
14
|
+
abstract assess(context: AssessmentContext): Promise<T>;
|
|
15
15
|
/**
|
|
16
16
|
* Common method to determine status based on pass rate
|
|
17
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/BaseAssessor.ts"],"names":[],"mappings":"AAAA;;;GA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AC,EAClC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,SAAS,GAAE,MAAgC,GAC1C,OAAO,CAAC,CAAC,CAAC;IAWb;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAS1C;;OAEG;IACH,SAAS,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM;IAejD;;;;;;OAMG;IACH,SAAS,CAAC,eAAe,CACvB,QAAQ,EAAE,GAAG,EACb,UAAU,GAAE,OAAe,GAC1B,OAAO;IA8CV;;OAEG;IACH,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,GAAG,GAAG;QACzC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACvB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;CAqBF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,kBAAkB,EAInB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAc9D,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,iBAAiB,CAAuC;IAC1D,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAuFrE;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;;;OAIG;YACW,yBAAyB;
|
|
1
|
+
{"version":3,"file":"SecurityAssessor.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/modules/SecurityAssessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,kBAAkB,EAInB,MAAM,uBAAuB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AC,wBAAwB;IA8BhC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAW9B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B,OAAO,CAAC,oBAAoB;IAoH5B;;OAEG;IACH,OAAO,CAAC,YAAY;IASpB;;;OAGG;IACH,OAAO,CAAC,eAAe;IASvB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAiB9B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;CAmB3B"}
|
|
@@ -124,8 +124,12 @@ export class SecurityAssessor extends BaseAssessor {
|
|
|
124
124
|
// Parallel tool testing with concurrency limit
|
|
125
125
|
const concurrency = this.config.maxParallelTests ?? 5;
|
|
126
126
|
const limit = createConcurrencyLimit(concurrency);
|
|
127
|
-
// Progress tracking for batched events
|
|
128
|
-
|
|
127
|
+
// Progress tracking for batched events - pre-calculate exact payload count
|
|
128
|
+
let totalPayloads = 0;
|
|
129
|
+
for (const pattern of attackPatterns) {
|
|
130
|
+
totalPayloads += getPayloadsForAttack(pattern.attackName).length;
|
|
131
|
+
}
|
|
132
|
+
const totalEstimate = toolsToTest.length * totalPayloads;
|
|
129
133
|
let completedTests = 0;
|
|
130
134
|
let lastBatchTime = Date.now();
|
|
131
135
|
const startTime = Date.now();
|
|
@@ -377,8 +381,9 @@ export class SecurityAssessor extends BaseAssessor {
|
|
|
377
381
|
evidence: "No compatible parameters for testing",
|
|
378
382
|
};
|
|
379
383
|
}
|
|
380
|
-
// Execute tool call
|
|
381
|
-
const
|
|
384
|
+
// Execute tool call with configurable timeout (default 5000ms for fast payload testing)
|
|
385
|
+
const securityTimeout = this.config.securityTestTimeout ?? 5000;
|
|
386
|
+
const response = await this.executeWithTimeout(callTool(tool.name, params), securityTimeout);
|
|
382
387
|
// Check for connection errors FIRST (before vulnerability analysis)
|
|
383
388
|
if (this.isConnectionError(response)) {
|
|
384
389
|
return {
|
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.16",
|
|
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>",
|