/** * Invalid Values Response Analyzer * * Analyzes responses to invalid value inputs for contextual scoring. * Issue #99: Contextual empty string validation scoring. * Issue #173: Bonus points for suggestions and graceful degradation. * * @module assessment/modules/ProtocolComplianceAssessor/errorHandling/InvalidValuesAnalyzer * @see GitHub Issue #99, #173, #188 */ import type { ErrorTestDetail, InvalidValuesAnalysis, SuggestionDetectionResult, Logger, AssessmentConfiguration } from "../types.js"; /** * Analyzes invalid values responses for contextual scoring decisions. */ export declare class InvalidValuesAnalyzer { private executionDetector; private safeResponseDetector; constructor(_config: AssessmentConfiguration, _logger: Logger); /** * Analyze invalid_values response to determine scoring impact. * * Classifications: * - safe_rejection: Tool rejected with error (no penalty) * - safe_reflection: Tool stored/echoed without executing (no penalty) * - defensive_programming: Tool handled gracefully (no penalty) * - graceful_degradation: Optional param handled with neutral response (no penalty + bonus) * - execution_detected: Tool executed input (penalty) * - unknown: Cannot determine (partial penalty) */ analyze(test: ErrorTestDetail): InvalidValuesAnalysis; /** * Safely extract response text from various response formats. */ extractResponseTextSafe(rawResponse: unknown): string; /** * Check for defensive programming patterns - tool accepted but caused no harm. * Examples: "Deleted 0 keys", "No results found", "Query returned 0" */ isDefensiveProgrammingResponse(responseText: string): boolean; /** * Issue #173: Detect helpful suggestion patterns in error responses. * Patterns like: "Did you mean: Button, Checkbox?" * Returns extracted suggestions for bonus scoring. */ detectSuggestionPatterns(responseText: string): SuggestionDetectionResult; /** * Issue #173: Check for neutral/graceful responses on optional parameters. * These indicate the tool handled empty/missing optional input appropriately. */ isNeutralGracefulResponse(responseText: string): boolean; } //# sourceMappingURL=InvalidValuesAnalyzer.d.ts.map