@bryan-thompson/inspector-assessment-client 1.29.0 → 1.30.0
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-9Gbb39Ii.js → OAuthCallback-BbE88qbF.js} +1 -1
- package/dist/assets/{OAuthDebugCallback-B76J2MBn.js → OAuthDebugCallback-CfRYq1JG.js} +1 -1
- package/dist/assets/{index-CHTOR9VI.js → index-CsUB73MT.js} +4 -4
- package/dist/index.html +1 -1
- package/lib/lib/assessment/configTypes.d.ts +38 -0
- package/lib/lib/assessment/configTypes.d.ts.map +1 -1
- package/lib/lib/assessment/configTypes.js +30 -7
- package/lib/lib/assessment/coreTypes.d.ts +14 -0
- package/lib/lib/assessment/coreTypes.d.ts.map +1 -1
- package/lib/lib/assessment/coreTypes.js +3 -0
- package/lib/lib/assessment/index.d.ts +1 -0
- package/lib/lib/assessment/index.d.ts.map +1 -1
- package/lib/lib/assessment/index.js +1 -0
- package/lib/lib/assessment/progressTypes.d.ts +13 -0
- package/lib/lib/assessment/progressTypes.d.ts.map +1 -1
- package/lib/lib/assessment/progressTypes.js +1 -0
- package/lib/lib/assessment/resultTypes.d.ts +8 -0
- package/lib/lib/assessment/resultTypes.d.ts.map +1 -1
- package/lib/lib/moduleScoring.d.ts +11 -0
- package/lib/lib/moduleScoring.d.ts.map +1 -1
- package/lib/lib/moduleScoring.js +11 -0
- package/lib/lib/securityPatterns.d.ts +3 -2
- package/lib/lib/securityPatterns.d.ts.map +1 -1
- package/lib/lib/securityPatterns.js +150 -2
- package/lib/services/assessment/AssessmentOrchestrator.d.ts +31 -0
- package/lib/services/assessment/AssessmentOrchestrator.d.ts.map +1 -1
- package/lib/services/assessment/AssessmentOrchestrator.js +23 -0
- package/lib/services/assessment/ResponseValidator.d.ts +3 -0
- package/lib/services/assessment/ResponseValidator.d.ts.map +1 -1
- package/lib/services/assessment/ResponseValidator.js +3 -0
- package/lib/services/assessment/TestDataGenerator.d.ts +3 -0
- package/lib/services/assessment/TestDataGenerator.d.ts.map +1 -1
- package/lib/services/assessment/TestDataGenerator.js +3 -0
- package/lib/services/assessment/TestScenarioEngine.d.ts +3 -0
- package/lib/services/assessment/TestScenarioEngine.d.ts.map +1 -1
- package/lib/services/assessment/TestScenarioEngine.js +3 -0
- package/lib/services/assessment/config/performanceConfig.d.ts +8 -0
- package/lib/services/assessment/config/performanceConfig.d.ts.map +1 -1
- package/lib/services/assessment/config/performanceConfig.js +7 -0
- package/lib/services/assessment/lib/claudeCodeBridge.d.ts +3 -0
- package/lib/services/assessment/lib/claudeCodeBridge.d.ts.map +1 -1
- package/lib/services/assessment/lib/claudeCodeBridge.js +3 -0
- package/lib/services/assessment/lib/errors.d.ts +3 -0
- package/lib/services/assessment/lib/errors.d.ts.map +1 -1
- package/lib/services/assessment/lib/errors.js +3 -0
- package/lib/services/assessment/lib/timeoutUtils.d.ts +3 -0
- package/lib/services/assessment/lib/timeoutUtils.d.ts.map +1 -1
- package/lib/services/assessment/lib/timeoutUtils.js +3 -0
- package/lib/services/assessment/modules/annotations/index.d.ts +6 -1
- package/lib/services/assessment/modules/annotations/index.d.ts.map +1 -1
- package/lib/services/assessment/modules/annotations/index.js +6 -1
- package/lib/services/assessment/modules/index.d.ts +5 -0
- package/lib/services/assessment/modules/index.d.ts.map +1 -1
- package/lib/services/assessment/modules/index.js +5 -0
- package/lib/services/assessment/modules/securityTests/SecurityPayloadGenerator.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/SecurityPayloadGenerator.js +86 -0
- package/lib/services/assessment/modules/securityTests/SecurityPayloadTester.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/SecurityPayloadTester.js +26 -0
- package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts +58 -0
- package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/SecurityResponseAnalyzer.js +402 -1
- package/lib/services/assessment/modules/securityTests/index.d.ts +6 -1
- package/lib/services/assessment/modules/securityTests/index.d.ts.map +1 -1
- package/lib/services/assessment/modules/securityTests/index.js +6 -1
- package/lib/services/assessment/orchestratorHelpers.d.ts +3 -0
- package/lib/services/assessment/orchestratorHelpers.d.ts.map +1 -1
- package/lib/services/assessment/orchestratorHelpers.js +8 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Backend API Security Patterns
|
|
3
|
-
* Tests MCP server API security with
|
|
3
|
+
* Tests MCP server API security with 30 focused patterns
|
|
4
4
|
*
|
|
5
5
|
* Architecture: Attack-Type with Specific Payloads
|
|
6
6
|
* - Critical Injection (6 patterns): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* - Auth Bypass (1 pattern): Fail-open authentication vulnerabilities (Issue #75)
|
|
20
20
|
* - Cross-Tool State Bypass (1 pattern): Cross-tool privilege escalation via shared state (Issue #92)
|
|
21
21
|
* - Chained Exploitation (1 pattern): Multi-tool chain execution attacks (Issue #93)
|
|
22
|
+
* - Session Management (1 pattern): Session fixation, predictable tokens, no timeout (Issue #111)
|
|
22
23
|
*
|
|
23
24
|
* Scope: Backend API Security ONLY
|
|
24
25
|
* - Tests structured data inputs to API endpoints
|
|
@@ -50,7 +51,7 @@ export interface AttackPattern {
|
|
|
50
51
|
* BACKEND API SECURITY PATTERNS
|
|
51
52
|
* ========================================
|
|
52
53
|
*
|
|
53
|
-
*
|
|
54
|
+
* 30 focused patterns for MCP server API security
|
|
54
55
|
*/
|
|
55
56
|
export declare const SECURITY_ATTACK_PATTERNS: AttackPattern[];
|
|
56
57
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"securityPatterns.d.ts","sourceRoot":"","sources":["../../src/lib/securityPatterns.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"securityPatterns.d.ts","sourceRoot":"","sources":["../../src/lib/securityPatterns.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,aAAa,EAq7DnD,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,KAAK,CAAC,EAAE,MAAM,GACb,eAAe,EAAE,CAQnB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,aAAa,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB;;;;;;;;EA8BnC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Backend API Security Patterns
|
|
3
|
-
* Tests MCP server API security with
|
|
3
|
+
* Tests MCP server API security with 30 focused patterns
|
|
4
4
|
*
|
|
5
5
|
* Architecture: Attack-Type with Specific Payloads
|
|
6
6
|
* - Critical Injection (6 patterns): Command, Calculator, SQL, Path Traversal, XXE, NoSQL
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* - Auth Bypass (1 pattern): Fail-open authentication vulnerabilities (Issue #75)
|
|
20
20
|
* - Cross-Tool State Bypass (1 pattern): Cross-tool privilege escalation via shared state (Issue #92)
|
|
21
21
|
* - Chained Exploitation (1 pattern): Multi-tool chain execution attacks (Issue #93)
|
|
22
|
+
* - Session Management (1 pattern): Session fixation, predictable tokens, no timeout (Issue #111)
|
|
22
23
|
*
|
|
23
24
|
* Scope: Backend API Security ONLY
|
|
24
25
|
* - Tests structured data inputs to API endpoints
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
* BACKEND API SECURITY PATTERNS
|
|
37
38
|
* ========================================
|
|
38
39
|
*
|
|
39
|
-
*
|
|
40
|
+
* 30 focused patterns for MCP server API security
|
|
40
41
|
*/
|
|
41
42
|
export const SECURITY_ATTACK_PATTERNS = [
|
|
42
43
|
// ==========================================
|
|
@@ -1661,6 +1662,153 @@ export const SECURITY_ATTACK_PATTERNS = [
|
|
|
1661
1662
|
},
|
|
1662
1663
|
],
|
|
1663
1664
|
},
|
|
1665
|
+
// ==========================================
|
|
1666
|
+
// SESSION MANAGEMENT TESTS (Issue #111, Challenge #12)
|
|
1667
|
+
// ==========================================
|
|
1668
|
+
// 30. SESSION MANAGEMENT VULNERABILITIES
|
|
1669
|
+
{
|
|
1670
|
+
attackName: "Session Management",
|
|
1671
|
+
description: "Tests for session management vulnerabilities: fixation, predictable tokens, no timeout, ID exposure, no regeneration",
|
|
1672
|
+
payloads: [
|
|
1673
|
+
// CWE-384: Session Fixation - accepting external session IDs
|
|
1674
|
+
{
|
|
1675
|
+
payload: "fixate",
|
|
1676
|
+
evidence: /"attacker_controlled"\s*:\s*true|"fixation_url"\s*:|session\s*fixation\s*accepted|"fixed"\s*:\s*true/i,
|
|
1677
|
+
riskLevel: "HIGH",
|
|
1678
|
+
description: "Session fixation - external session ID accepted (CWE-384)",
|
|
1679
|
+
payloadType: "session",
|
|
1680
|
+
parameterTypes: ["action", "session_action", "operation", "type"],
|
|
1681
|
+
},
|
|
1682
|
+
// CWE-330: Predictable session token pattern
|
|
1683
|
+
{
|
|
1684
|
+
payload: "create",
|
|
1685
|
+
evidence: /"token_pattern"\s*:\s*"session_\{user\}_\{timestamp\}_\{counter\}"|"session_id"\s*:\s*"session_[a-z0-9]+_\d{9,}_\d+"/i,
|
|
1686
|
+
riskLevel: "HIGH",
|
|
1687
|
+
description: "Predictable session token pattern (CWE-330)",
|
|
1688
|
+
payloadType: "session",
|
|
1689
|
+
parameterTypes: ["action", "session_action", "operation", "type"],
|
|
1690
|
+
},
|
|
1691
|
+
// CWE-613: No session timeout - expires_at null
|
|
1692
|
+
{
|
|
1693
|
+
payload: "create",
|
|
1694
|
+
evidence: /"expires_at"\s*:\s*null|"timeout_checked"\s*:\s*false/i,
|
|
1695
|
+
riskLevel: "HIGH",
|
|
1696
|
+
description: "Session never expires - no timeout (CWE-613)",
|
|
1697
|
+
payloadType: "session",
|
|
1698
|
+
parameterTypes: ["action", "session_action", "operation", "type"],
|
|
1699
|
+
},
|
|
1700
|
+
// CWE-200: Session ID exposed in URL parameter
|
|
1701
|
+
{
|
|
1702
|
+
payload: "create",
|
|
1703
|
+
evidence: /"session_url"\s*:\s*"[^"]*[?&]session_id=|"fixation_url"\s*:\s*"[^"]*[?&]session_id=/i,
|
|
1704
|
+
riskLevel: "HIGH",
|
|
1705
|
+
description: "Session ID exposed in URL parameter (CWE-200)",
|
|
1706
|
+
payloadType: "session",
|
|
1707
|
+
parameterTypes: ["action", "session_action", "operation", "type"],
|
|
1708
|
+
},
|
|
1709
|
+
// CWE-384: No session regeneration after authentication
|
|
1710
|
+
{
|
|
1711
|
+
payload: "login",
|
|
1712
|
+
evidence: /"session_regenerated"\s*:\s*false/i,
|
|
1713
|
+
riskLevel: "HIGH",
|
|
1714
|
+
description: "Session ID not regenerated after login (CWE-384)",
|
|
1715
|
+
payloadType: "session",
|
|
1716
|
+
parameterTypes: ["action", "session_action", "operation", "type"],
|
|
1717
|
+
},
|
|
1718
|
+
// CWE-613: Validation without timeout check
|
|
1719
|
+
{
|
|
1720
|
+
payload: "validate",
|
|
1721
|
+
evidence: /"timeout_checked"\s*:\s*false|"expires_at"\s*:\s*null.*"valid"\s*:\s*true/i,
|
|
1722
|
+
riskLevel: "HIGH",
|
|
1723
|
+
description: "Session validation without timeout check (CWE-613)",
|
|
1724
|
+
payloadType: "session",
|
|
1725
|
+
parameterTypes: ["action", "session_action", "operation", "type"],
|
|
1726
|
+
},
|
|
1727
|
+
],
|
|
1728
|
+
},
|
|
1729
|
+
// ==========================================
|
|
1730
|
+
// CRYPTOGRAPHIC FAILURES (Issue #112, Challenge #13)
|
|
1731
|
+
// OWASP A02:2021 - Cryptographic Failures
|
|
1732
|
+
// ==========================================
|
|
1733
|
+
// 31. CRYPTOGRAPHIC FAILURES
|
|
1734
|
+
{
|
|
1735
|
+
attackName: "Cryptographic Failures",
|
|
1736
|
+
description: "Tests for OWASP A02:2021 cryptographic vulnerabilities: weak hash, static salt, predictable RNG, timing attacks, ECB mode, hardcoded keys",
|
|
1737
|
+
payloads: [
|
|
1738
|
+
// CWE-328: Weak hash algorithm (MD5 for passwords)
|
|
1739
|
+
{
|
|
1740
|
+
payload: "hash",
|
|
1741
|
+
evidence: /"algorithm"\s*:\s*"MD5"|"algorithm_secure"\s*:\s*false|"cwe_ids"\s*:\s*\[.*"CWE-328"/i,
|
|
1742
|
+
riskLevel: "HIGH",
|
|
1743
|
+
description: "Weak hash algorithm MD5 for password hashing (CWE-328)",
|
|
1744
|
+
payloadType: "crypto",
|
|
1745
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1746
|
+
},
|
|
1747
|
+
// CWE-916: Static salt for password hashing
|
|
1748
|
+
{
|
|
1749
|
+
payload: "salt_hash",
|
|
1750
|
+
evidence: /"salt_type"\s*:\s*"static"|"salt"\s*:\s*"static_salt_123"|"salt_secure"\s*:\s*false/i,
|
|
1751
|
+
riskLevel: "HIGH",
|
|
1752
|
+
description: "Static salt enables rainbow table attacks (CWE-916)",
|
|
1753
|
+
payloadType: "crypto",
|
|
1754
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1755
|
+
},
|
|
1756
|
+
// CWE-330: Predictable RNG for token generation
|
|
1757
|
+
{
|
|
1758
|
+
payload: "random",
|
|
1759
|
+
evidence: /"rng_type"\s*:\s*"random\.random\(\)"|"seed"\s*:\s*"timestamp"|"cryptographically_secure"\s*:\s*false/i,
|
|
1760
|
+
riskLevel: "HIGH",
|
|
1761
|
+
description: "Predictable RNG with timestamp seed instead of secrets module (CWE-330)",
|
|
1762
|
+
payloadType: "crypto",
|
|
1763
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1764
|
+
},
|
|
1765
|
+
// CWE-208: Timing attack vulnerability in password verification
|
|
1766
|
+
{
|
|
1767
|
+
payload: "verify",
|
|
1768
|
+
evidence: /"timing_safe"\s*:\s*false|"comparison_type"\s*:\s*"direct_equality"|"cwe_ids"\s*:\s*\[.*"CWE-208"/i,
|
|
1769
|
+
riskLevel: "HIGH",
|
|
1770
|
+
description: "Non-constant-time comparison enables timing attacks (CWE-208)",
|
|
1771
|
+
payloadType: "crypto",
|
|
1772
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1773
|
+
},
|
|
1774
|
+
// CWE-327: Insecure cipher mode (ECB)
|
|
1775
|
+
{
|
|
1776
|
+
payload: "encrypt",
|
|
1777
|
+
evidence: /"mode"\s*:\s*"ECB"|"algorithm"\s*:\s*"XOR"|"cwe_ids"\s*:\s*\[.*"CWE-327"/i,
|
|
1778
|
+
riskLevel: "HIGH",
|
|
1779
|
+
description: "AES-ECB mode leaks patterns in ciphertext (CWE-327)",
|
|
1780
|
+
payloadType: "crypto",
|
|
1781
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1782
|
+
},
|
|
1783
|
+
// CWE-321: Hardcoded encryption key
|
|
1784
|
+
{
|
|
1785
|
+
payload: "encrypt",
|
|
1786
|
+
evidence: /"key_source"\s*:\s*"hardcoded"|"key_preview"\s*:\s*"hardcode|"cwe_ids"\s*:\s*\[.*"CWE-321"/i,
|
|
1787
|
+
riskLevel: "HIGH",
|
|
1788
|
+
description: "Hardcoded encryption key in source code (CWE-321)",
|
|
1789
|
+
payloadType: "crypto",
|
|
1790
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1791
|
+
},
|
|
1792
|
+
// CWE-916: Weak key derivation function (MD5, no iterations)
|
|
1793
|
+
{
|
|
1794
|
+
payload: "derive_key",
|
|
1795
|
+
evidence: /"derivation_function"\s*:\s*"MD5"|"iterations"\s*:\s*1|"kdf_secure"\s*:\s*false/i,
|
|
1796
|
+
riskLevel: "HIGH",
|
|
1797
|
+
description: "MD5 for key derivation without iterations or salt (CWE-916)",
|
|
1798
|
+
payloadType: "crypto",
|
|
1799
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1800
|
+
},
|
|
1801
|
+
// CWE-326: Inadequate encryption key length
|
|
1802
|
+
{
|
|
1803
|
+
payload: "sign",
|
|
1804
|
+
evidence: /"key_length"\s*:\s*[1-9](?!\d)|"key_secure"\s*:\s*false|"cwe_ids"\s*:\s*\[.*"CWE-326"/i,
|
|
1805
|
+
riskLevel: "HIGH",
|
|
1806
|
+
description: "Weak HMAC key length easily brute-forceable (CWE-326)",
|
|
1807
|
+
payloadType: "crypto",
|
|
1808
|
+
parameterTypes: ["action", "operation", "type"],
|
|
1809
|
+
},
|
|
1810
|
+
],
|
|
1811
|
+
},
|
|
1664
1812
|
];
|
|
1665
1813
|
/**
|
|
1666
1814
|
* Get all payloads for an attack type
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Assessment Orchestrator
|
|
3
3
|
* Coordinates all assessment modules and manages the assessment workflow
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
* @module AssessmentOrchestrator
|
|
4
7
|
*/
|
|
5
8
|
import { MCPDirectoryAssessment, AssessmentConfiguration, ManifestJsonSchema, ProgressCallback, ServerInfo } from "../../lib/assessmentTypes.js";
|
|
6
9
|
import { Tool, CompatibilityCallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
7
10
|
import { ClaudeCodeBridge, ClaudeCodeBridgeConfig } from "./lib/claudeCodeBridge.js";
|
|
8
11
|
/**
|
|
9
12
|
* MCP Resource interface for assessment context
|
|
13
|
+
* @public
|
|
10
14
|
*/
|
|
11
15
|
export interface MCPResource {
|
|
12
16
|
uri: string;
|
|
@@ -16,6 +20,7 @@ export interface MCPResource {
|
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
22
|
* MCP Resource Template interface for assessment context
|
|
23
|
+
* @public
|
|
19
24
|
*/
|
|
20
25
|
export interface MCPResourceTemplate {
|
|
21
26
|
uriTemplate: string;
|
|
@@ -25,6 +30,7 @@ export interface MCPResourceTemplate {
|
|
|
25
30
|
}
|
|
26
31
|
/**
|
|
27
32
|
* MCP Prompt interface for assessment context
|
|
33
|
+
* @public
|
|
28
34
|
*/
|
|
29
35
|
export interface MCPPrompt {
|
|
30
36
|
name: string;
|
|
@@ -37,6 +43,7 @@ export interface MCPPrompt {
|
|
|
37
43
|
}
|
|
38
44
|
/**
|
|
39
45
|
* MCP Server Capabilities interface
|
|
46
|
+
* @public
|
|
40
47
|
*/
|
|
41
48
|
export interface MCPServerCapabilities {
|
|
42
49
|
tools?: {
|
|
@@ -52,6 +59,10 @@ export interface MCPServerCapabilities {
|
|
|
52
59
|
logging?: Record<string, unknown>;
|
|
53
60
|
experimental?: Record<string, unknown>;
|
|
54
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Assessment context providing all inputs needed for MCP server assessment
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
55
66
|
export interface AssessmentContext {
|
|
56
67
|
serverName: string;
|
|
57
68
|
tools: Tool[];
|
|
@@ -86,6 +97,18 @@ export interface AssessmentContext {
|
|
|
86
97
|
};
|
|
87
98
|
listTools?: () => Promise<Tool[]>;
|
|
88
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Main orchestrator class for running MCP server assessments
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
* @example
|
|
105
|
+
* ```typescript
|
|
106
|
+
* import { AssessmentOrchestrator, AssessmentContext } from '@bryan-thompson/inspector-assessment';
|
|
107
|
+
*
|
|
108
|
+
* const orchestrator = new AssessmentOrchestrator();
|
|
109
|
+
* const result = await orchestrator.runFullAssessment(context);
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
89
112
|
export declare class AssessmentOrchestrator {
|
|
90
113
|
private config;
|
|
91
114
|
private logger;
|
|
@@ -125,14 +148,17 @@ export declare class AssessmentOrchestrator {
|
|
|
125
148
|
/**
|
|
126
149
|
* Enable Claude Code integration programmatically
|
|
127
150
|
* Call this method to enable Claude features after construction
|
|
151
|
+
* @public
|
|
128
152
|
*/
|
|
129
153
|
enableClaudeCode(config?: Partial<ClaudeCodeBridgeConfig>): void;
|
|
130
154
|
/**
|
|
131
155
|
* Check if Claude Code integration is enabled and available
|
|
156
|
+
* @public
|
|
132
157
|
*/
|
|
133
158
|
isClaudeEnabled(): boolean;
|
|
134
159
|
/**
|
|
135
160
|
* Get Claude Code Bridge for external access
|
|
161
|
+
* @public
|
|
136
162
|
*/
|
|
137
163
|
getClaudeBridge(): ClaudeCodeBridge | undefined;
|
|
138
164
|
/**
|
|
@@ -141,19 +167,24 @@ export declare class AssessmentOrchestrator {
|
|
|
141
167
|
private resetAllTestCounts;
|
|
142
168
|
/**
|
|
143
169
|
* Run a complete assessment on an MCP server
|
|
170
|
+
* @public
|
|
144
171
|
*/
|
|
145
172
|
runFullAssessment(context: AssessmentContext): Promise<MCPDirectoryAssessment>;
|
|
146
173
|
/**
|
|
147
174
|
* Legacy assess method for backward compatibility
|
|
175
|
+
* @public
|
|
176
|
+
* @deprecated Use runFullAssessment() with AssessmentContext instead
|
|
148
177
|
*/
|
|
149
178
|
assess(serverName: string, tools: Tool[], callTool: (name: string, params: Record<string, unknown>) => Promise<CompatibilityCallToolResult>, serverInfo?: ServerInfo, readmeContent?: string, packageJson?: Record<string, unknown>): Promise<MCPDirectoryAssessment>;
|
|
150
179
|
private collectTotalTestCount;
|
|
151
180
|
/**
|
|
152
181
|
* Get assessment configuration
|
|
182
|
+
* @public
|
|
153
183
|
*/
|
|
154
184
|
getConfig(): AssessmentConfiguration;
|
|
155
185
|
/**
|
|
156
186
|
* Update assessment configuration
|
|
187
|
+
* @public
|
|
157
188
|
*/
|
|
158
189
|
updateConfig(config: Partial<AssessmentConfiguration>): void;
|
|
159
190
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssessmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/AssessmentOrchestrator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"AssessmentOrchestrator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/AssessmentOrchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EAEvB,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,EACX,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAuC5C,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAehC;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE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AAO,CAAC,qBAAqB;IAoF7B;;;OAGG;IACH,SAAS,IAAI,uBAAuB;IAIpC;;;OAGG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAAG,IAAI;CAG7D"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Assessment Orchestrator
|
|
3
3
|
* Coordinates all assessment modules and manages the assessment workflow
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
* @module AssessmentOrchestrator
|
|
4
7
|
*/
|
|
5
8
|
import { DEFAULT_ASSESSMENT_CONFIG, } from "../../lib/assessmentTypes.js";
|
|
6
9
|
// Core assessment modules
|
|
@@ -36,6 +39,18 @@ import { TestDataGenerator } from "./TestDataGenerator.js";
|
|
|
36
39
|
import { createLogger, DEFAULT_LOGGING_CONFIG } from "./lib/logger.js";
|
|
37
40
|
// Extracted helpers for testability
|
|
38
41
|
import { emitModuleStartedEvent, emitModuleProgress, determineOverallStatus, generateSummary, generateRecommendations, } from "./orchestratorHelpers.js";
|
|
42
|
+
/**
|
|
43
|
+
* Main orchestrator class for running MCP server assessments
|
|
44
|
+
*
|
|
45
|
+
* @public
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { AssessmentOrchestrator, AssessmentContext } from '@bryan-thompson/inspector-assessment';
|
|
49
|
+
*
|
|
50
|
+
* const orchestrator = new AssessmentOrchestrator();
|
|
51
|
+
* const result = await orchestrator.runFullAssessment(context);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
39
54
|
export class AssessmentOrchestrator {
|
|
40
55
|
config;
|
|
41
56
|
logger;
|
|
@@ -209,6 +224,7 @@ export class AssessmentOrchestrator {
|
|
|
209
224
|
/**
|
|
210
225
|
* Enable Claude Code integration programmatically
|
|
211
226
|
* Call this method to enable Claude features after construction
|
|
227
|
+
* @public
|
|
212
228
|
*/
|
|
213
229
|
enableClaudeCode(config) {
|
|
214
230
|
const bridgeConfig = {
|
|
@@ -233,12 +249,14 @@ export class AssessmentOrchestrator {
|
|
|
233
249
|
}
|
|
234
250
|
/**
|
|
235
251
|
* Check if Claude Code integration is enabled and available
|
|
252
|
+
* @public
|
|
236
253
|
*/
|
|
237
254
|
isClaudeEnabled() {
|
|
238
255
|
return this.claudeEnabled && this.claudeBridge !== undefined;
|
|
239
256
|
}
|
|
240
257
|
/**
|
|
241
258
|
* Get Claude Code Bridge for external access
|
|
259
|
+
* @public
|
|
242
260
|
*/
|
|
243
261
|
getClaudeBridge() {
|
|
244
262
|
return this.claudeBridge;
|
|
@@ -290,6 +308,7 @@ export class AssessmentOrchestrator {
|
|
|
290
308
|
}
|
|
291
309
|
/**
|
|
292
310
|
* Run a complete assessment on an MCP server
|
|
311
|
+
* @public
|
|
293
312
|
*/
|
|
294
313
|
async runFullAssessment(context) {
|
|
295
314
|
this.startTime = Date.now();
|
|
@@ -610,6 +629,8 @@ export class AssessmentOrchestrator {
|
|
|
610
629
|
}
|
|
611
630
|
/**
|
|
612
631
|
* Legacy assess method for backward compatibility
|
|
632
|
+
* @public
|
|
633
|
+
* @deprecated Use runFullAssessment() with AssessmentContext instead
|
|
613
634
|
*/
|
|
614
635
|
async assess(serverName, tools, callTool, serverInfo, readmeContent, packageJson) {
|
|
615
636
|
const context = {
|
|
@@ -694,12 +715,14 @@ export class AssessmentOrchestrator {
|
|
|
694
715
|
}
|
|
695
716
|
/**
|
|
696
717
|
* Get assessment configuration
|
|
718
|
+
* @public
|
|
697
719
|
*/
|
|
698
720
|
getConfig() {
|
|
699
721
|
return this.config;
|
|
700
722
|
}
|
|
701
723
|
/**
|
|
702
724
|
* Update assessment configuration
|
|
725
|
+
* @public
|
|
703
726
|
*/
|
|
704
727
|
updateConfig(config) {
|
|
705
728
|
this.config = { ...this.config, ...config };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Response Validator for MCP Tool Testing
|
|
3
3
|
* Validates that tool responses are actually functional, not just present
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
* @module assessment/ResponseValidator
|
|
4
7
|
*/
|
|
5
8
|
import { CompatibilityCallToolResult, Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
6
9
|
import { ResponseMetadata } from "../../lib/assessmentTypes.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponseValidator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/ResponseValidator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResponseValidator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/ResponseValidator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,2BAA2B,EAC3B,IAAI,EACL,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,cAAc,EACV,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,OAAO,CAAC;IACZ,8EAA8E;IAC9E,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,QAAQ,EAAE,2BAA2B,CAAC;IACtC,gBAAgB,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC;CAC3E;AAED,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB;IAoG5E;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,GAAG,gBAAgB;IAgHrE;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO;IAgThE;;OAEG;IACH,MAAM,CAAC,0BAA0B,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,MAAM;CAsBvE"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Response Validator for MCP Tool Testing
|
|
3
3
|
* Validates that tool responses are actually functional, not just present
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
* @module assessment/ResponseValidator
|
|
4
7
|
*/
|
|
5
8
|
import { validateToolOutput, hasOutputSchema, tryExtractJsonFromContent, } from "../../utils/schemaUtils.js";
|
|
6
9
|
export class ResponseValidator {
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Supports optional Claude Code integration for intelligent test generation
|
|
6
6
|
* when ClaudeCodeBridge is provided.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
* @module assessment/TestDataGenerator
|
|
7
10
|
*/
|
|
8
11
|
import { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
9
12
|
import type { ClaudeCodeBridge } from "./lib/claudeCodeBridge.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestDataGenerator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/TestDataGenerator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"TestDataGenerator.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/TestDataGenerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EA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EG;WACW,uBAAuB,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GACnD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAoB1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAkTrC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAgB9B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO;IAI3E;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAsDtC;;;OAGG;IACH,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAwBxE;IAEJ;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAe7C;IAEF;;;;;;;;;;OAUG;IACH,MAAM,CAAC,wBAAwB,CAC7B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,QAAQ,EAAE,MAAM,GACf,OAAO;CAoBX"}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Supports optional Claude Code integration for intelligent test generation
|
|
6
6
|
* when ClaudeCodeBridge is provided.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
* @module assessment/TestDataGenerator
|
|
7
10
|
*/
|
|
8
11
|
export class TestDataGenerator {
|
|
9
12
|
// Optional Claude Code bridge for intelligent test generation
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Test Scenario Engine for Multi-Scenario MCP Tool Testing
|
|
3
3
|
* Orchestrates comprehensive testing with multiple scenarios per tool
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
* @module assessment/TestScenarioEngine
|
|
4
7
|
*/
|
|
5
8
|
import { Tool, CompatibilityCallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
6
9
|
import { TestScenario } from "./TestDataGenerator.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestScenarioEngine.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/TestScenarioEngine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"TestScenarioEngine.d.ts","sourceRoot":"","sources":["../../../src/services/assessment/TestScenarioEngine.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,IAAI,EACJ,2BAA2B,EAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAqB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAEL,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iBAAiB,EAElB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EACT,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,UAAU,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,kBAAkB,EAAE,CAAC;IACtC,OA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vC;;OAEG;YACW,eAAe;IAwE7B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAoD9B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAuC3B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAoK/B;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,MAAM,EAAE,2BAA2B,GAAG,MAAM;CAsD3E"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Test Scenario Engine for Multi-Scenario MCP Tool Testing
|
|
3
3
|
* Orchestrates comprehensive testing with multiple scenarios per tool
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
* @module assessment/TestScenarioEngine
|
|
4
7
|
*/
|
|
5
8
|
import { TestDataGenerator } from "./TestDataGenerator.js";
|
|
6
9
|
import { ResponseValidator, } from "./ResponseValidator.js";
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
* scattered across multiple modules. Supports JSON configuration files
|
|
6
6
|
* for runtime tuning via CLI flags.
|
|
7
7
|
*
|
|
8
|
+
* @public
|
|
9
|
+
* @module assessment/performance
|
|
8
10
|
* @see https://github.com/triepod-ai/inspector-assessment/issues/37
|
|
9
11
|
*/
|
|
10
12
|
import type { Logger } from "../lib/logger.js";
|
|
11
13
|
/**
|
|
12
14
|
* Performance configuration for assessment execution.
|
|
13
15
|
* Controls batching, timeouts, concurrency, and resource limits.
|
|
16
|
+
* @public
|
|
14
17
|
*/
|
|
15
18
|
export interface PerformanceConfig {
|
|
16
19
|
/**
|
|
@@ -64,10 +67,12 @@ export interface PerformanceConfig {
|
|
|
64
67
|
/**
|
|
65
68
|
* Default performance configuration.
|
|
66
69
|
* These values preserve existing behavior across all modules.
|
|
70
|
+
* @public
|
|
67
71
|
*/
|
|
68
72
|
export declare const DEFAULT_PERFORMANCE_CONFIG: Readonly<Required<PerformanceConfig>>;
|
|
69
73
|
/**
|
|
70
74
|
* Performance presets for common use cases.
|
|
75
|
+
* @public
|
|
71
76
|
*/
|
|
72
77
|
export declare const PERFORMANCE_PRESETS: {
|
|
73
78
|
/** Default configuration - balanced performance */
|
|
@@ -97,6 +102,7 @@ export declare const PERFORMANCE_PRESETS: {
|
|
|
97
102
|
* Validate a partial performance config.
|
|
98
103
|
* Ensures values are within reasonable bounds.
|
|
99
104
|
*
|
|
105
|
+
* @public
|
|
100
106
|
* @param config - Partial config to validate
|
|
101
107
|
* @returns Array of validation error messages (empty if valid)
|
|
102
108
|
*/
|
|
@@ -105,6 +111,7 @@ export declare function validatePerformanceConfig(config: Partial<PerformanceCon
|
|
|
105
111
|
* Merge a partial config with defaults.
|
|
106
112
|
* User-provided values override defaults.
|
|
107
113
|
*
|
|
114
|
+
* @public
|
|
108
115
|
* @param partial - Partial config to merge
|
|
109
116
|
* @returns Complete config with defaults applied
|
|
110
117
|
*/
|
|
@@ -113,6 +120,7 @@ export declare function mergeWithDefaults(partial: Partial<PerformanceConfig>):
|
|
|
113
120
|
* Load performance configuration from a JSON file.
|
|
114
121
|
* Partial configs are validated and merged with defaults.
|
|
115
122
|
*
|
|
123
|
+
* @public
|
|
116
124
|
* @param configPath - Path to JSON configuration file
|
|
117
125
|
* @param logger - Optional logger for diagnostic output
|
|
118
126
|
* @returns Complete configuration with defaults applied
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"performanceConfig.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/config/performanceConfig.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"performanceConfig.d.ts","sourceRoot":"","sources":["../../../../src/services/assessment/config/performanceConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;;OAIG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;;OAGG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;;OAUG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;;;OAIG;IACH,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CASzE,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B,mDAAmD;;IAGnD,8CAA8C;;;;8BA1ExB,MAAM;uBAoBb,MAAM;+BAOE,MAAM;+BAaN,MAAM;kCAOH,MAAM;;IAkChC,kEAAkE;;;;;8BAjF5C,MAAM;uBAoBb,MAAM;+BAOE,MAAM;kCAoBH,MAAM;;CAyCxB,CAAC;AAEX;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACjC,MAAM,EAAE,CAwDV;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAClC,QAAQ,CAAC,iBAAiB,CAAC,CAsB7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,GACd,QAAQ,CAAC,iBAAiB,CAAC,CAyC7B"}
|
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
* scattered across multiple modules. Supports JSON configuration files
|
|
6
6
|
* for runtime tuning via CLI flags.
|
|
7
7
|
*
|
|
8
|
+
* @public
|
|
9
|
+
* @module assessment/performance
|
|
8
10
|
* @see https://github.com/triepod-ai/inspector-assessment/issues/37
|
|
9
11
|
*/
|
|
10
12
|
import * as fs from "fs";
|
|
11
13
|
/**
|
|
12
14
|
* Default performance configuration.
|
|
13
15
|
* These values preserve existing behavior across all modules.
|
|
16
|
+
* @public
|
|
14
17
|
*/
|
|
15
18
|
export const DEFAULT_PERFORMANCE_CONFIG = Object.freeze({
|
|
16
19
|
batchFlushIntervalMs: 500,
|
|
@@ -23,6 +26,7 @@ export const DEFAULT_PERFORMANCE_CONFIG = Object.freeze({
|
|
|
23
26
|
});
|
|
24
27
|
/**
|
|
25
28
|
* Performance presets for common use cases.
|
|
29
|
+
* @public
|
|
26
30
|
*/
|
|
27
31
|
export const PERFORMANCE_PRESETS = {
|
|
28
32
|
/** Default configuration - balanced performance */
|
|
@@ -45,6 +49,7 @@ export const PERFORMANCE_PRESETS = {
|
|
|
45
49
|
* Validate a partial performance config.
|
|
46
50
|
* Ensures values are within reasonable bounds.
|
|
47
51
|
*
|
|
52
|
+
* @public
|
|
48
53
|
* @param config - Partial config to validate
|
|
49
54
|
* @returns Array of validation error messages (empty if valid)
|
|
50
55
|
*/
|
|
@@ -87,6 +92,7 @@ export function validatePerformanceConfig(config) {
|
|
|
87
92
|
* Merge a partial config with defaults.
|
|
88
93
|
* User-provided values override defaults.
|
|
89
94
|
*
|
|
95
|
+
* @public
|
|
90
96
|
* @param partial - Partial config to merge
|
|
91
97
|
* @returns Complete config with defaults applied
|
|
92
98
|
*/
|
|
@@ -110,6 +116,7 @@ export function mergeWithDefaults(partial) {
|
|
|
110
116
|
* Load performance configuration from a JSON file.
|
|
111
117
|
* Partial configs are validated and merged with defaults.
|
|
112
118
|
*
|
|
119
|
+
* @public
|
|
113
120
|
* @param configPath - Path to JSON configuration file
|
|
114
121
|
* @param logger - Optional logger for diagnostic output
|
|
115
122
|
* @returns Complete configuration with defaults applied
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* - Semantic AUP violation analysis
|
|
10
10
|
* - Tool behavior inference for annotation validation
|
|
11
11
|
* - Documentation quality assessment
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
* @module assessment/lib/claudeCodeBridge
|
|
12
15
|
*/
|
|
13
16
|
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
14
17
|
import type { AUPCategory } from "../../../lib/assessmentTypes.js";
|