@bryan-thompson/inspector-assessment-client 1.32.2 → 1.32.3

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.
Files changed (39) hide show
  1. package/lib/lib/assessment/configSchemas.d.ts +763 -0
  2. package/lib/lib/assessment/configSchemas.d.ts.map +1 -0
  3. package/lib/lib/assessment/configSchemas.js +187 -0
  4. package/lib/lib/assessment/coreTypes.d.ts +41 -0
  5. package/lib/lib/assessment/coreTypes.d.ts.map +1 -1
  6. package/lib/lib/assessment/jsonlEventSchemas.d.ts +1667 -0
  7. package/lib/lib/assessment/jsonlEventSchemas.d.ts.map +1 -0
  8. package/lib/lib/assessment/jsonlEventSchemas.js +437 -0
  9. package/lib/lib/assessment/progressTypes.d.ts +49 -1
  10. package/lib/lib/assessment/progressTypes.d.ts.map +1 -1
  11. package/lib/services/assessment/AssessmentOrchestrator.d.ts +3 -3
  12. package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
  13. package/lib/services/assessment/TestDataGenerator.d.ts +42 -8
  14. package/lib/services/assessment/TestDataGenerator.d.ts.map +1 -1
  15. package/lib/services/assessment/TestDataGenerator.js +23 -153
  16. package/lib/services/assessment/modules/CrossCapabilitySecurityAssessor.d.ts.map +1 -1
  17. package/lib/services/assessment/modules/DeveloperExperienceAssessor.d.ts.map +1 -1
  18. package/lib/services/assessment/modules/DocumentationAssessor.d.ts.map +1 -1
  19. package/lib/services/assessment/modules/ErrorHandlingAssessor.d.ts.map +1 -1
  20. package/lib/services/assessment/modules/ErrorHandlingAssessor.js +18 -1
  21. package/lib/services/assessment/modules/FunctionalityAssessor.d.ts +2 -2
  22. package/lib/services/assessment/modules/FunctionalityAssessor.d.ts.map +1 -1
  23. package/lib/services/assessment/modules/FunctionalityAssessor.js +6 -3
  24. package/lib/services/assessment/modules/MCPSpecComplianceAssessor.d.ts.map +1 -1
  25. package/lib/services/assessment/modules/PortabilityAssessor.d.ts.map +1 -1
  26. package/lib/services/assessment/modules/ProhibitedLibrariesAssessor.d.ts.map +1 -1
  27. package/lib/services/assessment/modules/ProtocolComplianceAssessor.d.ts.map +1 -1
  28. package/lib/services/assessment/modules/securityTests/SecurityPayloadTester.d.ts.map +1 -1
  29. package/lib/services/assessment/modules/securityTests/SecurityPayloadTester.js +78 -2
  30. package/lib/services/assessment/testdata/index.d.ts +12 -0
  31. package/lib/services/assessment/testdata/index.d.ts.map +1 -0
  32. package/lib/services/assessment/testdata/index.js +11 -0
  33. package/lib/services/assessment/testdata/realistic-values.d.ts +126 -0
  34. package/lib/services/assessment/testdata/realistic-values.d.ts.map +1 -0
  35. package/lib/services/assessment/testdata/realistic-values.js +162 -0
  36. package/lib/services/assessment/testdata/tool-category-data.d.ts +28 -0
  37. package/lib/services/assessment/testdata/tool-category-data.d.ts.map +1 -0
  38. package/lib/services/assessment/testdata/tool-category-data.js +60 -0
  39. package/package.json +1 -1
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Realistic Test Data Pools
3
+ *
4
+ * Context-aware test values for generating realistic test data.
5
+ * Used by TestDataGenerator to produce meaningful test inputs.
6
+ *
7
+ * @module assessment/testdata/realistic-values
8
+ */
9
+ /**
10
+ * Realistic URLs for testing URL-related parameters.
11
+ * Includes public, stable endpoints that are commonly accessible.
12
+ */
13
+ export declare const REALISTIC_URLS: readonly ["https://www.google.com", "https://api.github.com/users/octocat", "https://jsonplaceholder.typicode.com/posts/1", "https://httpbin.org/get", "https://example.com", "https://www.wikipedia.org", "https://api.openweathermap.org/data/2.5/weather?q=London"];
14
+ /**
15
+ * Realistic email addresses for testing email-related parameters.
16
+ * Uses common patterns and the example.com domain for safety.
17
+ */
18
+ export declare const REALISTIC_EMAILS: readonly ["admin@example.com", "support@example.com", "info@example.com", "test@test.com", "user@domain.com", "noreply@example.com", "hello@world.com"];
19
+ /**
20
+ * Realistic names for testing name/title parameters.
21
+ * Includes common default and placeholder names.
22
+ */
23
+ export declare const REALISTIC_NAMES: readonly ["Default", "Admin", "Test User", "Sample Item", "Example Project", "Demo Application", "Main"];
24
+ /**
25
+ * Realistic IDs for testing identifier parameters.
26
+ * Includes various formats: numeric, UUID, and string IDs.
27
+ */
28
+ export declare const REALISTIC_IDS: readonly ["1", "123", "550e8400-e29b-41d4-a716-446655440000", "default", "main", "264051cd-48ab-80ff-864e-d1aa9bc41429", "00000000-0000-0000-0000-000000000000", "admin", "user1"];
29
+ /**
30
+ * Realistic file paths for testing path/file parameters.
31
+ * Includes common directories and file locations.
32
+ */
33
+ export declare const REALISTIC_PATHS: readonly ["/tmp/test.txt", "/home", "./README.md", "./package.json", "./src", "./test", "./config", "/var/log", "/etc"];
34
+ /**
35
+ * Realistic search queries for testing search/filter parameters.
36
+ * Includes various query formats and patterns.
37
+ */
38
+ export declare const REALISTIC_QUERIES: readonly ["test", "hello", "*", "name", "id:1", "status:active", "type:user", "limit:10", "{\"match_all\": {}}"];
39
+ /**
40
+ * Realistic numbers for testing numeric parameters.
41
+ * Includes common values, boundaries, and HTTP status codes.
42
+ */
43
+ export declare const REALISTIC_NUMBERS: readonly [0, 1, 10, 100, 1000, 5, 50, 200, 404, 500];
44
+ /**
45
+ * Boolean values for testing boolean parameters.
46
+ */
47
+ export declare const REALISTIC_BOOLEANS: readonly [true, false];
48
+ /**
49
+ * Realistic JSON objects for testing object parameters.
50
+ * Includes common response patterns and simple entities.
51
+ */
52
+ export declare const REALISTIC_JSON_OBJECTS: readonly [{
53
+ readonly message: "Hello World";
54
+ }, {
55
+ readonly status: "ok";
56
+ readonly code: 200;
57
+ }, {
58
+ readonly data: readonly [];
59
+ readonly total: 0;
60
+ }, {
61
+ readonly id: 1;
62
+ readonly name: "Test";
63
+ }, {
64
+ readonly success: true;
65
+ }, {
66
+ readonly error: false;
67
+ }, {
68
+ readonly results: readonly [];
69
+ }, {}];
70
+ /**
71
+ * Realistic arrays for testing array parameters.
72
+ * Includes various array types and sizes.
73
+ */
74
+ export declare const REALISTIC_ARRAYS: readonly [readonly [], readonly [1], readonly ["a", "b", "c"], readonly [1, 2, 3], readonly [{
75
+ readonly id: 1;
76
+ }, {
77
+ readonly id: 2;
78
+ }], readonly ["test"], readonly [true, false]];
79
+ /**
80
+ * Generate realistic timestamps for testing date/time parameters.
81
+ * Returns an array of ISO 8601 formatted timestamps.
82
+ */
83
+ export declare function generateRealisticTimestamps(): string[];
84
+ /**
85
+ * Composed object containing all realistic data pools.
86
+ * Used by TestDataGenerator for backward compatibility.
87
+ */
88
+ export declare const REALISTIC_DATA: {
89
+ readonly urls: readonly ["https://www.google.com", "https://api.github.com/users/octocat", "https://jsonplaceholder.typicode.com/posts/1", "https://httpbin.org/get", "https://example.com", "https://www.wikipedia.org", "https://api.openweathermap.org/data/2.5/weather?q=London"];
90
+ readonly emails: readonly ["admin@example.com", "support@example.com", "info@example.com", "test@test.com", "user@domain.com", "noreply@example.com", "hello@world.com"];
91
+ readonly names: readonly ["Default", "Admin", "Test User", "Sample Item", "Example Project", "Demo Application", "Main"];
92
+ readonly ids: readonly ["1", "123", "550e8400-e29b-41d4-a716-446655440000", "default", "main", "264051cd-48ab-80ff-864e-d1aa9bc41429", "00000000-0000-0000-0000-000000000000", "admin", "user1"];
93
+ readonly paths: readonly ["/tmp/test.txt", "/home", "./README.md", "./package.json", "./src", "./test", "./config", "/var/log", "/etc"];
94
+ readonly queries: readonly ["test", "hello", "*", "name", "id:1", "status:active", "type:user", "limit:10", "{\"match_all\": {}}"];
95
+ readonly numbers: readonly [0, 1, 10, 100, 1000, 5, 50, 200, 404, 500];
96
+ readonly booleans: readonly [true, false];
97
+ readonly jsonObjects: readonly [{
98
+ readonly message: "Hello World";
99
+ }, {
100
+ readonly status: "ok";
101
+ readonly code: 200;
102
+ }, {
103
+ readonly data: readonly [];
104
+ readonly total: 0;
105
+ }, {
106
+ readonly id: 1;
107
+ readonly name: "Test";
108
+ }, {
109
+ readonly success: true;
110
+ }, {
111
+ readonly error: false;
112
+ }, {
113
+ readonly results: readonly [];
114
+ }, {}];
115
+ readonly arrays: readonly [readonly [], readonly [1], readonly ["a", "b", "c"], readonly [1, 2, 3], readonly [{
116
+ readonly id: 1;
117
+ }, {
118
+ readonly id: 2;
119
+ }], readonly ["test"], readonly [true, false]];
120
+ readonly timestamps: string[];
121
+ };
122
+ /**
123
+ * Type for the REALISTIC_DATA structure.
124
+ */
125
+ export type RealisticDataType = typeof REALISTIC_DATA;
126
+ //# sourceMappingURL=realistic-values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realistic-values.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/testdata/realistic-values.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,cAAc,wQAQjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,gBAAgB,yJAQnB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe,0GAQlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,aAAa,oLAUhB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,eAAe,yHAUlB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iBAAiB,kHAUpB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iBAAiB,sDAEpB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB,wBAAyB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;MASzB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;8CAQnB,CAAC;AAEX;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,EAAE,CAUtD;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYjB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,cAAc,CAAC"}
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Realistic Test Data Pools
3
+ *
4
+ * Context-aware test values for generating realistic test data.
5
+ * Used by TestDataGenerator to produce meaningful test inputs.
6
+ *
7
+ * @module assessment/testdata/realistic-values
8
+ */
9
+ /**
10
+ * Realistic URLs for testing URL-related parameters.
11
+ * Includes public, stable endpoints that are commonly accessible.
12
+ */
13
+ export const REALISTIC_URLS = [
14
+ "https://www.google.com", // Public, always accessible
15
+ "https://api.github.com/users/octocat", // Public API endpoint that exists
16
+ "https://jsonplaceholder.typicode.com/posts/1", // Test API that always works
17
+ "https://httpbin.org/get", // HTTP testing service
18
+ "https://example.com", // RFC 2606 reserved domain for examples
19
+ "https://www.wikipedia.org", // Public, stable site
20
+ "https://api.openweathermap.org/data/2.5/weather?q=London", // Public API
21
+ ];
22
+ /**
23
+ * Realistic email addresses for testing email-related parameters.
24
+ * Uses common patterns and the example.com domain for safety.
25
+ */
26
+ export const REALISTIC_EMAILS = [
27
+ "admin@example.com", // Common admin email
28
+ "support@example.com", // Common support email
29
+ "info@example.com", // Common info email
30
+ "test@test.com", // Generic test email
31
+ "user@domain.com", // Generic user email
32
+ "noreply@example.com", // Common no-reply format
33
+ "hello@world.com", // Simple, memorable
34
+ ];
35
+ /**
36
+ * Realistic names for testing name/title parameters.
37
+ * Includes common default and placeholder names.
38
+ */
39
+ export const REALISTIC_NAMES = [
40
+ "Default", // Common default name
41
+ "Admin", // Common admin user
42
+ "Test User", // Clear test user
43
+ "Sample Item", // Generic sample
44
+ "Example Project", // Clear example
45
+ "Demo Application", // Common demo name
46
+ "Main", // Common main/primary name
47
+ ];
48
+ /**
49
+ * Realistic IDs for testing identifier parameters.
50
+ * Includes various formats: numeric, UUID, and string IDs.
51
+ */
52
+ export const REALISTIC_IDS = [
53
+ "1", // Simple numeric ID that often exists
54
+ "123", // Common test ID
55
+ "550e8400-e29b-41d4-a716-446655440000", // Valid UUID v4 (replaces "test")
56
+ "default", // Common default ID
57
+ "main", // Common main ID
58
+ "264051cd-48ab-80ff-864e-d1aa9bc41429", // Valid UUID from realistic data
59
+ "00000000-0000-0000-0000-000000000000", // Nil UUID (often used as placeholder)
60
+ "admin", // Common admin ID
61
+ "user1", // Common user ID pattern
62
+ ];
63
+ /**
64
+ * Realistic file paths for testing path/file parameters.
65
+ * Includes common directories and file locations.
66
+ */
67
+ export const REALISTIC_PATHS = [
68
+ "/tmp/test.txt", // Common temp file path (usually writable)
69
+ "/home", // Common home directory
70
+ "./README.md", // Often exists in projects
71
+ "./package.json", // Common in Node projects
72
+ "./src", // Common source directory
73
+ "./test", // Common test directory
74
+ "./config", // Common config directory
75
+ "/var/log", // Common log directory (readable)
76
+ "/etc", // Common config directory (readable)
77
+ ];
78
+ /**
79
+ * Realistic search queries for testing search/filter parameters.
80
+ * Includes various query formats and patterns.
81
+ */
82
+ export const REALISTIC_QUERIES = [
83
+ "test", // Simple search term
84
+ "hello", // Common greeting
85
+ "*", // Wildcard that matches everything
86
+ "name", // Common field name
87
+ "id:1", // Common ID search
88
+ "status:active", // Common status filter
89
+ "type:user", // Common type filter
90
+ "limit:10", // Common pagination
91
+ '{"match_all": {}}', // Elasticsearch match all
92
+ ];
93
+ /**
94
+ * Realistic numbers for testing numeric parameters.
95
+ * Includes common values, boundaries, and HTTP status codes.
96
+ */
97
+ export const REALISTIC_NUMBERS = [
98
+ 0, 1, 10, 100, 1000, 5, 50, 200, 404, 500,
99
+ ];
100
+ /**
101
+ * Boolean values for testing boolean parameters.
102
+ */
103
+ export const REALISTIC_BOOLEANS = [true, false];
104
+ /**
105
+ * Realistic JSON objects for testing object parameters.
106
+ * Includes common response patterns and simple entities.
107
+ */
108
+ export const REALISTIC_JSON_OBJECTS = [
109
+ { message: "Hello World" }, // Simple message object
110
+ { status: "ok", code: 200 }, // Common status response
111
+ { data: [], total: 0 }, // Empty result set
112
+ { id: 1, name: "Test" }, // Simple entity
113
+ { success: true }, // Common success response
114
+ { error: false }, // Common no-error response
115
+ { results: [] }, // Common empty results
116
+ {}, // Empty object (often valid)
117
+ ];
118
+ /**
119
+ * Realistic arrays for testing array parameters.
120
+ * Includes various array types and sizes.
121
+ */
122
+ export const REALISTIC_ARRAYS = [
123
+ [], // Empty array (often valid)
124
+ [1], // Single item
125
+ ["a", "b", "c"], // Simple string array
126
+ [1, 2, 3], // Simple number array
127
+ [{ id: 1 }, { id: 2 }], // Simple object array
128
+ ["test"], // Single test item
129
+ [true, false], // Boolean array
130
+ ];
131
+ /**
132
+ * Generate realistic timestamps for testing date/time parameters.
133
+ * Returns an array of ISO 8601 formatted timestamps.
134
+ */
135
+ export function generateRealisticTimestamps() {
136
+ return [
137
+ new Date().toISOString(), // Current time (always valid)
138
+ new Date(Date.now() - 86400000).toISOString(), // Yesterday
139
+ new Date(Date.now() + 86400000).toISOString(), // Tomorrow
140
+ "2024-01-01T00:00:00Z", // New Year 2024
141
+ "2023-12-31T23:59:59Z", // End of 2023
142
+ new Date(0).toISOString(), // Unix epoch
143
+ "2024-06-15T12:00:00Z", // Midday mid-year
144
+ ];
145
+ }
146
+ /**
147
+ * Composed object containing all realistic data pools.
148
+ * Used by TestDataGenerator for backward compatibility.
149
+ */
150
+ export const REALISTIC_DATA = {
151
+ urls: [...REALISTIC_URLS],
152
+ emails: [...REALISTIC_EMAILS],
153
+ names: [...REALISTIC_NAMES],
154
+ ids: [...REALISTIC_IDS],
155
+ paths: [...REALISTIC_PATHS],
156
+ queries: [...REALISTIC_QUERIES],
157
+ numbers: [...REALISTIC_NUMBERS],
158
+ booleans: [...REALISTIC_BOOLEANS],
159
+ jsonObjects: [...REALISTIC_JSON_OBJECTS],
160
+ arrays: [...REALISTIC_ARRAYS],
161
+ timestamps: generateRealisticTimestamps(),
162
+ };
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Tool Category Test Data
3
+ *
4
+ * Category-specific test values and field patterns for context-aware
5
+ * test data generation based on tool classification.
6
+ *
7
+ * @module assessment/testdata/tool-category-data
8
+ */
9
+ /**
10
+ * Tool category-specific data pools for when field name doesn't help identify
11
+ * the expected input type. Used as fallback after field-name detection.
12
+ *
13
+ * Keys must match ToolClassifier category names (lowercase).
14
+ */
15
+ export declare const TOOL_CATEGORY_DATA: Record<string, Record<string, string[]>>;
16
+ /**
17
+ * Field names that indicate specific data types regardless of tool category.
18
+ * These take precedence over category-specific generation.
19
+ *
20
+ * Used to identify when field-name-based generation should be used
21
+ * instead of category-based generation.
22
+ */
23
+ export declare const SPECIFIC_FIELD_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp];
24
+ /**
25
+ * Type for the SPECIFIC_FIELD_PATTERNS array.
26
+ */
27
+ export type SpecificFieldPatternsType = typeof SPECIFIC_FIELD_PATTERNS;
28
+ //# sourceMappingURL=tool-category-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-category-data.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/testdata/tool-category-data.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAsBvE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,2HAe1B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,OAAO,uBAAuB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Tool Category Test Data
3
+ *
4
+ * Category-specific test values and field patterns for context-aware
5
+ * test data generation based on tool classification.
6
+ *
7
+ * @module assessment/testdata/tool-category-data
8
+ */
9
+ /**
10
+ * Tool category-specific data pools for when field name doesn't help identify
11
+ * the expected input type. Used as fallback after field-name detection.
12
+ *
13
+ * Keys must match ToolClassifier category names (lowercase).
14
+ */
15
+ export const TOOL_CATEGORY_DATA = {
16
+ calculator: {
17
+ default: ["2+2", "10*5", "100/4", "sqrt(16)", "15-7"],
18
+ },
19
+ search_retrieval: {
20
+ default: [
21
+ "hello world",
22
+ "example query",
23
+ "recent changes",
24
+ "find documents",
25
+ ],
26
+ },
27
+ system_exec: {
28
+ default: ["echo hello", "pwd", "date", "whoami"],
29
+ },
30
+ url_fetcher: {
31
+ default: [
32
+ "https://api.github.com",
33
+ "https://httpbin.org/get",
34
+ "https://jsonplaceholder.typicode.com/posts/1",
35
+ ],
36
+ },
37
+ };
38
+ /**
39
+ * Field names that indicate specific data types regardless of tool category.
40
+ * These take precedence over category-specific generation.
41
+ *
42
+ * Used to identify when field-name-based generation should be used
43
+ * instead of category-based generation.
44
+ */
45
+ export const SPECIFIC_FIELD_PATTERNS = [
46
+ /url/i,
47
+ /endpoint/i,
48
+ /link/i,
49
+ /email/i,
50
+ /mail/i,
51
+ /path/i,
52
+ /file/i,
53
+ /directory/i,
54
+ /folder/i,
55
+ /uuid/i,
56
+ /page_id/i,
57
+ /database_id/i,
58
+ /user_id/i,
59
+ /block_id/i,
60
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bryan-thompson/inspector-assessment-client",
3
- "version": "1.32.2",
3
+ "version": "1.32.3",
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>",