/** * Check command configuration defaults. * Used by check.ts and incremental-checker.ts. */ export declare const CHECK: { /** Default cache age for incremental checking (1 week in hours) */ readonly DEFAULT_INCREMENTAL_CACHE_HOURS: 168; /** Minimum cache age (1 hour) */ readonly MIN_INCREMENTAL_CACHE_HOURS: 1; /** Maximum cache age (30 days in hours) */ readonly MAX_INCREMENTAL_CACHE_HOURS: 720; }; /** * Performance tracking configuration. * Used by performance-tracker.ts for latency regression detection. */ export declare const PERFORMANCE_TRACKING: { /** Default regression threshold (10% = tool is 10% slower) */ readonly DEFAULT_REGRESSION_THRESHOLD: 0.1; /** Warning threshold for minor regressions (5%) */ readonly WARNING_THRESHOLD: 0.05; /** Minimum samples required for reliable metrics */ readonly MIN_SAMPLES: 3; /** Trend detection thresholds */ readonly TREND_THRESHOLDS: { /** Performance is "improving" if p50 is at least 5% faster */ readonly improving: -0.05; /** Performance is "degrading" if p50 is at least 5% slower */ readonly degrading: 0.05; }; /** Percentiles to calculate for latency analysis */ readonly PERCENTILES: readonly number[]; }; /** * Performance confidence scoring configuration. * Used by performance-tracker.ts for statistical validity assessment. * * Confidence levels indicate how reliable performance baselines are: * - HIGH: Enough samples with low variability - baselines are reliable * - MEDIUM: Moderate samples or variability - use with caution * - LOW: Few samples or high variability - consider collecting more data */ export declare const PERFORMANCE_CONFIDENCE: { /** Thresholds for high confidence level */ readonly HIGH: { /** Minimum samples required for high confidence */ readonly MIN_SAMPLES: 10; /** Maximum coefficient of variation for high confidence (0.3 = 30%) */ readonly MAX_CV: 0.3; }; /** Thresholds for medium confidence level */ readonly MEDIUM: { /** Minimum samples required for medium confidence */ readonly MIN_SAMPLES: 5; /** Maximum coefficient of variation for medium confidence (0.5 = 50%) */ readonly MAX_CV: 0.5; }; /** Warmup configuration for excluding cold-start overhead from variance */ readonly WARMUP: { /** Default number of warmup runs before timing (0 = include first sample in variance) */ readonly DEFAULT_RUNS: 1; /** Whether to exclude warmup from variance calculation by default */ readonly EXCLUDE_FROM_VARIANCE: true; }; /** Display labels for confidence levels */ readonly LABELS: { readonly high: "HIGH"; readonly medium: "MEDIUM"; readonly low: "LOW"; }; /** Text indicators for confidence levels (used in Markdown) */ readonly INDICATORS: { readonly high: "high"; readonly medium: "med"; readonly low: "low"; }; /** Recommendation messages for low confidence */ readonly RECOMMENDATIONS: { /** Message when sample count is too low */ readonly LOW_SAMPLES: (current: number, target: number) => string; /** Message when variability is too high */ readonly HIGH_VARIABILITY: "High variability in response times; consider investigating causes"; /** Message when no samples collected */ readonly NO_SAMPLES: "No performance samples collected"; }; }; export declare const SCHEMA_EVOLUTION: { /** Default maximum versions to keep per tool */ readonly DEFAULT_MAX_VERSIONS_PER_TOOL: 50; /** Default limit for "most active tools" queries */ readonly DEFAULT_ACTIVE_TOOLS_LIMIT: 10; /** Default number of versions to display in formatted output */ readonly DEFAULT_DISPLAY_VERSIONS: 10; /** Default number of changes to display per version */ readonly DEFAULT_DISPLAY_CHANGES: 5; /** Default width for visual timeline */ readonly DEFAULT_VISUAL_TIMELINE_WIDTH: 80; /** Maximum versions to show in visual timeline */ readonly MAX_VISUAL_TIMELINE_VERSIONS: 20; /** Minimum samples required for meaningful stability assessment */ readonly MIN_SAMPLES_FOR_STABILITY: 3; /** Minimum samples for high confidence stability assessment */ readonly HIGH_CONFIDENCE_MIN_SAMPLES: 10; /** Stability confidence threshold for flagging issues (0-1) */ readonly STABILITY_THRESHOLD: 0.7; /** Grade thresholds for schema stability scoring */ readonly GRADE_THRESHOLDS: { /** Minimum confidence for grade A */ readonly A: 0.95; /** Minimum confidence for grade B */ readonly B: 0.85; /** Minimum confidence for grade C */ readonly C: 0.7; /** Minimum confidence for grade D */ readonly D: 0.5; }; /** Display labels for stability states */ readonly STABILITY_LABELS: { readonly STABLE: "Stable"; readonly UNSTABLE: "Unstable"; readonly UNKNOWN: "Unknown"; readonly INSUFFICIENT_DATA: "Insufficient Data"; }; /** Display labels for change types */ readonly CHANGE_LABELS: { readonly FIELDS_ADDED: "Fields Added"; readonly FIELDS_REMOVED: "Fields Removed"; readonly TYPE_CHANGED: "Type Changed"; readonly REQUIRED_CHANGED: "Required Changed"; readonly STRUCTURE_CHANGED: "Structure Changed"; }; }; /** * Error analysis configuration. * Used by error-analyzer.ts for enhanced error analysis and remediation. */ export declare const ERROR_ANALYSIS: { /** Trend significance thresholds */ readonly TREND_THRESHOLDS: { /** Multiplier threshold for "increasing" trend (current > previous * 1.5) */ readonly INCREASING: 1.5; /** Multiplier threshold for "decreasing" trend (current < previous * 0.5) */ readonly DECREASING: 0.5; }; /** Severity weights for error analysis */ readonly SEVERITY_WEIGHTS: { readonly critical: 100; readonly high: 75; readonly medium: 50; readonly low: 25; readonly info: 10; }; /** Category display labels */ readonly CATEGORY_LABELS: { readonly client_error_validation: "Validation Error"; readonly client_error_auth: "Authentication Error"; readonly client_error_not_found: "Not Found"; readonly client_error_conflict: "Conflict"; readonly client_error_rate_limit: "Rate Limited"; readonly server_error: "Server Error"; readonly unknown: "Unknown Error"; }; /** Trend display labels */ readonly TREND_LABELS: { readonly increasing: "Increasing"; readonly decreasing: "Decreasing"; readonly stable: "Stable"; readonly new: "New"; readonly resolved: "Resolved"; }; /** Maximum remediations to display per tool */ readonly MAX_REMEDIATIONS_DISPLAY: 5; /** Maximum related parameters to extract */ readonly MAX_RELATED_PARAMETERS: 5; }; /** * Schema-based test generation configuration for check mode. * Used by schema-test-generator.ts for deterministic test case creation. * These tests are generated from JSON Schema without requiring LLM. */ export declare const SCHEMA_TESTING: { /** Maximum tests per test category to prevent explosion */ readonly MAX_TESTS_PER_CATEGORY: 3; /** Maximum total tests per tool (across all categories) */ readonly MAX_TESTS_PER_TOOL: 12; /** Minimum tests to generate even for simple tools */ readonly MIN_TESTS_PER_TOOL: 3; /** Boundary test values for various types */ readonly BOUNDARY_VALUES: { /** Empty string for string boundary testing */ readonly EMPTY_STRING: ""; /** Long string length for boundary testing */ readonly LONG_STRING_LENGTH: 150; /** Zero value for number boundary */ readonly ZERO: 0; /** Negative value for number boundary */ readonly NEGATIVE_ONE: -1; /** Large negative value */ readonly LARGE_NEGATIVE: -999999999; /** Very large number for boundary testing */ readonly LARGE_POSITIVE: 999999999; /** Maximum safe integer */ readonly MAX_SAFE_INT: number; /** Minimum safe integer */ readonly MIN_SAFE_INT: number; /** Decimal value for integer field testing */ readonly DECIMAL: 1.5; /** Empty array */ readonly EMPTY_ARRAY: unknown[]; /** Empty object */ readonly EMPTY_OBJECT: Record; }; /** Values for type coercion testing */ readonly TYPE_COERCION: { /** String that looks like a number */ readonly NUMERIC_STRING: "123"; /** String that looks like boolean */ readonly TRUE_STRING: "true"; /** String that looks like boolean */ readonly FALSE_STRING: "false"; /** Empty string for coercion testing */ readonly EMPTY_STRING: ""; /** String "null" for null coercion testing */ readonly NULL_STRING: "null"; /** String "undefined" */ readonly UNDEFINED_STRING: "undefined"; }; /** Invalid enum value to use when testing enum violations */ readonly INVALID_ENUM_VALUES: readonly string[]; /** Test names for different test categories (used in descriptions) */ readonly CATEGORY_DESCRIPTIONS: { readonly HAPPY_PATH: "Happy path test"; readonly BOUNDARY: "Boundary value test"; readonly TYPE_COERCION: "Type coercion test"; readonly ENUM_VIOLATION: "Enum validation test"; readonly NULL_HANDLING: "Null/undefined handling test"; readonly ARRAY_HANDLING: "Array handling test"; readonly NESTED_OBJECT: "Nested object test"; readonly ERROR_HANDLING: "Error handling test"; readonly MISSING_REQUIRED: "Missing required parameter test"; }; /** Array test configuration */ readonly ARRAY_TESTS: { /** Number of items for "many items" test */ readonly MANY_ITEMS_COUNT: 10; }; }; /** * Configuration for test outcome assessment. * Used by interviewer.ts and schema-test-generator.ts to properly * categorize test results and calculate meaningful metrics. * * Key insight: Tests that expect errors (validation tests) should be * counted as "success" when they correctly reject invalid input. * This prevents misleading low success rates for tools that properly * validate their inputs. */ export declare const OUTCOME_ASSESSMENT: { /** * Test categories that expect errors (validation tests). * Tools should reject these inputs - rejection counts as success. */ readonly EXPECTS_ERROR_CATEGORIES: readonly ["error_handling"]; /** * Test descriptions that indicate error-expectation. * Matched case-insensitively against test descriptions. */ readonly EXPECTS_ERROR_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp]; /** * Categories where tests always expect success (happy path). * Errors on these tests indicate actual tool problems. */ readonly EXPECTS_SUCCESS_CATEGORIES: readonly ["happy_path"]; /** * Categories where outcome is unpredictable (edge cases). * Either success or error is acceptable. */ readonly EITHER_OUTCOME_CATEGORIES: readonly ["edge_case", "boundary"]; /** * Reliability metrics calculation. * These control how success/failure rates are computed. */ readonly METRICS: { /** * Whether to count correct rejection as success. * When true: validation tests that correctly reject count as success. * When false: only actual successes count (misleading for validators). * @default true */ readonly COUNT_REJECTION_AS_SUCCESS: true; /** * Whether to separate validation metrics from reliability metrics. * When true: separate "Validation Rate" from "Success Rate". * @default true */ readonly SEPARATE_VALIDATION_METRICS: true; }; /** * Labels for different metrics in output. */ readonly LABELS: { /** Label for happy path success rate */ readonly HAPPY_PATH_SUCCESS: "Reliability"; /** Label for validation test success (correct rejections) */ readonly VALIDATION_SUCCESS: "Validation"; /** Label for overall combined metric */ readonly OVERALL: "Overall"; /** Label for unexpected errors */ readonly UNEXPECTED_ERRORS: "Bugs"; }; /** * Text indicators for outcome assessment results. */ readonly INDICATORS: { /** Correct outcome (success or expected error) */ readonly correct: "[PASS]"; /** Incorrect outcome (unexpected behavior) */ readonly incorrect: "[FAIL]"; /** Ambiguous outcome (either was acceptable) */ readonly ambiguous: "[--]"; }; }; /** * Rate limiting configuration defaults and detection patterns. */ export declare const RATE_LIMITING: { /** Error patterns indicating rate limiting */ readonly ERROR_PATTERNS: readonly RegExp[]; /** Base delay for backoff (ms) */ readonly BASE_DELAY_MS: 500; /** Maximum backoff delay (ms) */ readonly MAX_DELAY_MS: 10000; /** Jitter ratio (0-1) */ readonly JITTER_RATIO: 0.2; }; /** * Stateful testing configuration. */ export declare const STATEFUL_TESTING: { /** Parameter patterns that should use state from previous tools */ readonly PREFERRED_PARAM_PATTERNS: readonly RegExp[]; /** Maximum number of stored values across tool calls */ readonly MAX_STORED_VALUES: 50; }; /** * Configuration for detecting tool patterns that commonly cause false positives. * Used by schema-test-generator.ts to adjust test expectations. * * These patterns help Bellwether distinguish between: * - Actual tool bugs (should be flagged) * - Expected behavior for specialized tool patterns (should not be flagged) */ /** * Operation-based tool detection patterns. * Tools with operation enum + args object pattern dispatch to different handlers * where each operation has different required arguments. */ export declare const OPERATION_BASED_DETECTION: { /** Parameter names that indicate an operation/action discriminator */ readonly OPERATION_PARAM_NAMES: readonly string[]; /** Parameter names that indicate a dynamic arguments object */ readonly ARGS_PARAM_NAMES: readonly string[]; /** Minimum enum values to consider a dispatch pattern (single value is not dispatch) */ readonly MIN_ENUM_VALUES: 2; }; /** * Self-stateful tool detection patterns. * Tools that require prior invocation to establish state (sessions, chains, contexts). * These tools need an active session/chain before they can be used. */ export declare const SELF_STATEFUL_DETECTION: { /** Description patterns indicating the tool requires prior state */ readonly DESCRIPTION_PATTERNS: readonly RegExp[]; /** Parameter names that suggest session/state dependency */ readonly STATE_PARAM_PATTERNS: readonly RegExp[]; /** Tool name patterns that suggest stateful behavior */ readonly STATEFUL_TOOL_NAME_PATTERNS: readonly RegExp[]; }; /** * Complex array schema detection patterns. * Tools with arrays whose items have complex nested structures with required properties. * These require properly structured input data that simple test generation can't provide. */ export declare const COMPLEX_SCHEMA_DETECTION: { /** Maximum nesting depth before considering schema "complex" */ readonly MAX_SIMPLE_DEPTH: 2; /** Minimum required properties in array items to consider "complex" */ readonly MIN_REQUIRED_PROPERTIES: 1; /** Property names that typically require structured data (chart/data visualization) */ readonly STRUCTURED_DATA_PATTERNS: readonly RegExp[]; /** Minimum array items in schema examples/defaults to use instead of generating */ readonly MIN_EXAMPLE_ITEMS: 2; }; /** * Security testing configuration for check mode. * Used by security-tester.ts for deterministic vulnerability detection. * * Security testing is opt-in via the --security flag and runs deterministic * payload tests without requiring LLM. This enables detection of common * vulnerability patterns like SQL injection, XSS, path traversal, etc. */ export declare const SECURITY_TESTING: { /** Maximum payloads per category to test (limits test time) */ readonly MAX_PAYLOADS_PER_CATEGORY: 3; /** Timeout for each security test in milliseconds */ readonly TEST_TIMEOUT_MS: 5000; /** Maximum parameters to test per tool (for tools with many params) */ readonly MAX_PARAMS_PER_TOOL: 5; /** Risk score weights by risk level (for calculating overall risk) */ readonly RISK_WEIGHTS: { readonly critical: 40; readonly high: 25; readonly medium: 15; readonly low: 5; readonly info: 1; }; /** Risk score thresholds for severity classification */ readonly RISK_THRESHOLDS: { /** Score >= this is critical severity */ readonly critical: 70; /** Score >= this is high severity */ readonly high: 50; /** Score >= this is medium severity */ readonly medium: 25; /** Score >= this is low severity */ readonly low: 10; }; /** Default categories to test when --security is used without --security-categories */ readonly DEFAULT_CATEGORIES: readonly ["sql_injection", "xss", "path_traversal", "command_injection", "ssrf", "error_disclosure"]; /** Parameter name patterns that suggest security-relevant parameters */ readonly SECURITY_RELEVANT_PARAM_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp]; /** CWE (Common Weakness Enumeration) IDs for each category */ readonly CWE_IDS: { readonly sql_injection: "CWE-89"; readonly xss: "CWE-79"; readonly path_traversal: "CWE-22"; readonly command_injection: "CWE-78"; readonly ssrf: "CWE-918"; readonly error_disclosure: "CWE-209"; }; /** Patterns that indicate a security rejection (good behavior) */ readonly REJECTION_PATTERNS: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp]; /** Patterns that indicate error information disclosure */ readonly ERROR_DISCLOSURE_PATTERNS: { /** Stack trace patterns */ readonly stackTrace: readonly [RegExp, RegExp, RegExp, RegExp]; /** File path patterns */ readonly filePath: readonly [RegExp, RegExp]; /** Database patterns */ readonly database: readonly [RegExp, RegExp, RegExp, RegExp, RegExp, RegExp, RegExp]; /** Internal IP patterns */ readonly internalIp: readonly [RegExp, RegExp, RegExp]; }; }; /** * Semantic validation configuration for check mode. * Used by validation module for semantic type inference and testing. * * Semantic validation infers types (dates, emails, URLs, etc.) from * parameter names and descriptions, then generates targeted tests * to verify proper input validation. */ export declare const SEMANTIC_VALIDATION: { /** Minimum confidence threshold for generating semantic tests (0-1) */ readonly MIN_CONFIDENCE_THRESHOLD: 0.5; /** Maximum invalid values to test per parameter */ readonly MAX_INVALID_VALUES_PER_PARAM: 2; /** Maximum semantic tests per tool */ readonly MAX_SEMANTIC_TESTS_PER_TOOL: 6; /** * Enable flexible semantic validation by default. * When true, semantic tests use 'either' outcome, allowing tools to * accept flexible formats (e.g., dayjs accepting various date strings). * This reduces false positives for tools with lenient parsing libraries. * Set to false for strict semantic validation enforcement. */ readonly FLEXIBLE_BY_DEFAULT: true; /** Confidence scores for different inference sources */ readonly CONFIDENCE: { /** Confidence when schema format explicitly specifies type */ readonly SCHEMA_FORMAT: 0.95; /** Confidence boost from parameter name pattern match */ readonly NAME_PATTERN_MATCH: 0.4; /** Confidence boost from description pattern match */ readonly DESCRIPTION_PATTERN_MATCH: 0.5; }; /** Semantic type display names for documentation */ readonly TYPE_DISPLAY_NAMES: { readonly date_iso8601: "ISO 8601 Date"; readonly date_month: "Year-Month"; readonly datetime: "DateTime"; readonly timestamp: "Unix Timestamp"; readonly amount_currency: "Currency Amount"; readonly percentage: "Percentage"; readonly identifier: "Identifier"; readonly email: "Email Address"; readonly url: "URL"; readonly phone: "Phone Number"; readonly ip_address: "IP Address"; readonly file_path: "File Path"; readonly json: "JSON String"; readonly base64: "Base64 Encoded"; readonly regex: "Regular Expression"; readonly unknown: "Unknown"; }; /** Example valid values for documentation */ readonly EXAMPLE_VALUES: { readonly date_iso8601: "2024-01-15"; readonly date_month: "2024-01"; readonly datetime: "2024-01-15T14:30:00Z"; readonly timestamp: "1705330200"; readonly amount_currency: "99.99"; readonly percentage: "75"; readonly identifier: "user-123-abc"; readonly email: "user@example.com"; readonly url: "https://example.com"; readonly phone: "+1-555-123-4567"; readonly ip_address: "192.168.1.1"; readonly file_path: "/path/to/file.txt"; readonly json: "{\"key\": \"value\"}"; readonly base64: "SGVsbG8gV29ybGQ="; readonly regex: "^[a-z]+$"; readonly unknown: ""; }; }; /** * Granular exit codes for CI/CD integration. * * Enables semantic responses to drift detection, allowing CI pipelines * to differentiate between severity levels and take appropriate action. * * Usage in CI: * bellwether check ... * case $? in * 0) echo "No changes" ;; * 1) echo "Info-level changes" ;; * 2) echo "Warning-level changes" ;; * 3) echo "Breaking changes" ;; * 4) echo "Runtime error" ;; * 5) echo "Low confidence warning" ;; * esac */ export declare const EXIT_CODES: { /** No changes detected - baseline matches current state */ readonly CLEAN: 0; /** Info-level changes only (non-breaking additions, description changes) */ readonly INFO: 1; /** Warning-level changes (potential issues, new error patterns) */ readonly WARNING: 2; /** Breaking changes detected (schema changes, removed tools) */ readonly BREAKING: 3; /** Runtime error (connection failed, timeout, configuration error) */ readonly ERROR: 4; /** Low confidence warning - metrics have insufficient statistical confidence */ readonly LOW_CONFIDENCE: 5; }; /** * Map severity level to exit code. * Used by check command to determine appropriate exit status. */ export declare const SEVERITY_TO_EXIT_CODE: Record; /** * Payload size limits for protection against resource exhaustion. * * These limits prevent DoS scenarios where malformed or malicious * MCP servers could cause memory exhaustion or infinite loops. */ export declare const PAYLOAD_LIMITS: { /** Maximum schema size in bytes (1MB) */ readonly MAX_SCHEMA_SIZE: number; /** Maximum baseline file size in bytes (10MB) */ readonly MAX_BASELINE_SIZE: number; /** Maximum response content size in bytes (5MB) */ readonly MAX_RESPONSE_SIZE: number; /** Maximum array items to process in fingerprinting */ readonly MAX_ARRAY_ITEMS: 10000; /** Maximum object properties to process */ readonly MAX_OBJECT_PROPERTIES: 1000; /** Maximum schema depth for circular reference protection */ readonly MAX_SCHEMA_DEPTH: 50; }; /** * Statistical sampling configuration for check mode. * Used by check.ts and interviewer.ts for confidence-based testing. * * Controls minimum sample counts for reliable performance baselines * and enables adaptive sample escalation for high-variability tools. */ export declare const CHECK_SAMPLING: { /** Default minimum samples per tool */ readonly DEFAULT_MIN_SAMPLES: 10; /** Recommended minimum samples for production baselines */ readonly RECOMMENDED_MIN_SAMPLES: 10; /** Maximum samples when auto-escalating for high variability */ readonly MAX_AUTO_ESCALATE_SAMPLES: 15; /** Coefficient of variation threshold that triggers auto-escalation (50%) */ readonly HIGH_VARIABILITY_THRESHOLD: 0.5; /** Number of additional samples to add when escalating */ readonly AUTO_ESCALATE_INCREMENT: 2; /** Target confidence levels (maps to PERFORMANCE_CONFIDENCE thresholds) */ readonly TARGET_CONFIDENCE: { readonly low: "low"; readonly medium: "medium"; readonly high: "high"; }; /** Minimum samples required for each target confidence level */ readonly SAMPLES_FOR_CONFIDENCE: { readonly low: 1; readonly medium: 5; readonly high: 10; }; }; /** * External dependency detection configuration. * Used by external-dependency-detector.ts for categorizing errors * from known external services vs code bugs. * * Helps distinguish between: * - Environment misconfiguration (missing credentials) * - External API failures (service down, rate limited) * - Actual code bugs */ export declare const EXTERNAL_DEPENDENCIES: { /** Known external service fingerprints */ readonly SERVICES: { readonly plaid: { readonly name: "Plaid"; /** Patterns in tool names/descriptions that indicate Plaid usage */ readonly toolPatterns: readonly RegExp[]; /** Patterns in error messages that indicate Plaid errors */ readonly errorPatterns: readonly RegExp[]; /** HTTP status codes typical of Plaid errors */ readonly statusCodes: readonly number[]; /** Remediation suggestion for Plaid errors */ readonly remediation: "Configure Plaid sandbox credentials (PLAID_CLIENT_ID, PLAID_SECRET, PLAID_ENV=sandbox)"; /** Credential expectations for configuration checks */ readonly credentials: { readonly requiredEnv: readonly ["PLAID_CLIENT_ID", "PLAID_SECRET"]; readonly optionalEnv: readonly ["PLAID_ENV"]; readonly requiredConfigKeys: readonly ["clientId", "secret"]; readonly sandboxAvailable: true; readonly mockAvailable: true; }; }; readonly stripe: { readonly name: "Stripe"; /** Patterns in tool names/descriptions that indicate Stripe usage (high confidence = has 'stripe' in name) */ readonly toolPatterns: readonly RegExp[]; /** Low confidence patterns - may match non-Stripe tools (removed: payment, charge, subscription) */ readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure Stripe API keys (STRIPE_SECRET_KEY)"; readonly credentials: { readonly requiredEnv: readonly ["STRIPE_SECRET_KEY"]; readonly optionalEnv: readonly ["STRIPE_PUBLISHABLE_KEY"]; readonly requiredConfigKeys: readonly ["secretKey"]; readonly sandboxAvailable: true; readonly mockAvailable: true; }; }; readonly aws: { readonly name: "AWS"; readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION)"; readonly credentials: { readonly requiredEnv: readonly ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"]; readonly optionalEnv: readonly ["AWS_REGION"]; readonly requiredConfigKeys: readonly ["accessKeyId", "secretAccessKey"]; readonly sandboxAvailable: false; readonly mockAvailable: true; }; }; readonly openai: { readonly name: "OpenAI"; /** Patterns in tool names that indicate OpenAI usage (removed generic: completion, embedding) */ readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure OpenAI API key (OPENAI_API_KEY)"; readonly credentials: { readonly requiredEnv: readonly ["OPENAI_API_KEY"]; readonly optionalEnv: readonly []; readonly requiredConfigKeys: readonly ["apiKey"]; readonly sandboxAvailable: false; readonly mockAvailable: true; }; }; readonly anthropic: { readonly name: "Anthropic"; readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure Anthropic API key (ANTHROPIC_API_KEY)"; readonly credentials: { readonly requiredEnv: readonly ["ANTHROPIC_API_KEY"]; readonly optionalEnv: readonly []; readonly requiredConfigKeys: readonly ["apiKey"]; readonly sandboxAvailable: false; readonly mockAvailable: true; }; }; readonly firebase: { readonly name: "Firebase"; readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure Firebase credentials (FIREBASE_CONFIG or service account)"; readonly credentials: { readonly requiredEnv: readonly ["FIREBASE_CONFIG"]; readonly optionalEnv: readonly ["GOOGLE_APPLICATION_CREDENTIALS"]; readonly requiredConfigKeys: readonly ["config"]; readonly sandboxAvailable: false; readonly mockAvailable: true; }; }; readonly twilio: { readonly name: "Twilio"; /** Patterns in tool names that indicate Twilio usage (removed generic: sms) */ readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure Twilio credentials (TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN)"; readonly credentials: { readonly requiredEnv: readonly ["TWILIO_ACCOUNT_SID", "TWILIO_AUTH_TOKEN"]; readonly optionalEnv: readonly []; readonly requiredConfigKeys: readonly ["accountSid", "authToken"]; readonly sandboxAvailable: true; readonly mockAvailable: true; }; }; readonly sendgrid: { readonly name: "SendGrid"; /** Patterns in tool names that indicate SendGrid usage (removed generic: email.*send) */ readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure SendGrid API key (SENDGRID_API_KEY)"; readonly credentials: { readonly requiredEnv: readonly ["SENDGRID_API_KEY"]; readonly optionalEnv: readonly []; readonly requiredConfigKeys: readonly ["apiKey"]; readonly sandboxAvailable: false; readonly mockAvailable: true; }; }; readonly github: { readonly name: "GitHub"; /** Patterns in tool names that indicate GitHub usage (removed generic: repository, pull.*request) */ readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Configure GitHub token (GITHUB_TOKEN)"; readonly credentials: { readonly requiredEnv: readonly ["GITHUB_TOKEN"]; readonly optionalEnv: readonly []; readonly requiredConfigKeys: readonly ["token"]; readonly sandboxAvailable: false; readonly mockAvailable: true; }; }; readonly database: { readonly name: "Database"; /** Patterns in tool names that indicate database usage (removed generic: sql) */ readonly toolPatterns: readonly RegExp[]; readonly errorPatterns: readonly RegExp[]; readonly statusCodes: readonly number[]; readonly remediation: "Check database connection string and ensure database server is running"; readonly credentials: { readonly requiredEnv: readonly []; readonly optionalEnv: readonly ["DATABASE_URL"]; readonly requiredConfigKeys: readonly ["connectionString"]; readonly sandboxAvailable: false; readonly mockAvailable: false; }; }; }; /** Error source categories */ readonly ERROR_SOURCES: { /** Error is from external service API */ readonly external_dependency: "external_dependency"; /** Error is from missing/invalid environment configuration */ readonly environment: "environment"; /** Error appears to be a code bug */ readonly code_bug: "code_bug"; /** Cannot determine error source */ readonly unknown: "unknown"; }; /** Patterns that indicate environment/configuration issues */ readonly ENVIRONMENT_PATTERNS: readonly RegExp[]; /** Patterns that indicate transient/temporary issues (should retry) */ readonly TRANSIENT_PATTERNS: readonly RegExp[]; }; /** * Example output configuration for documentation generation. * Used by docs/contract.ts for CONTRACT.md example formatting. * * Controls truncation behavior and provides configurable limits * for different output modes (default, full, AI-optimized). */ export declare const EXAMPLE_OUTPUT: { /** Default example length (backwards compatible) */ readonly DEFAULT_LENGTH: 300; /** Full example length (with --full-examples) */ readonly FULL_LENGTH: 5000; /** AI-optimized example length (balanced for context windows) */ readonly AI_OPTIMIZED_LENGTH: 2000; /** Maximum examples per tool in documentation */ readonly MAX_EXAMPLES_PER_TOOL: 3; /** Default examples per tool */ readonly DEFAULT_EXAMPLES_PER_TOOL: 2; /** Minimum length to show truncation indicator */ readonly MIN_TRUNCATION_INDICATOR_LENGTH: 50; /** Truncation indicators for different content types */ readonly TRUNCATION_INDICATORS: { readonly json: "... (truncated)"; readonly markdown: "\n\n... (content truncated)"; readonly text: "..."; }; /** Smart truncation settings */ readonly SMART_TRUNCATE: { /** Preserve JSON structure when truncating */ readonly preserveJsonStructure: true; /** Preserve markdown headers when truncating */ readonly preserveMarkdownHeaders: true; /** Minimum items to show in truncated arrays */ readonly minArrayItems: 2; /** Message template for omitted array items */ readonly arrayOmittedTemplate: "... ({count} more items)"; /** Message template for omitted object keys */ readonly objectOmittedTemplate: "... ({count} more fields)"; }; }; /** * Display thresholds and symbols for reliability metrics. */ export declare const RELIABILITY_DISPLAY: { /** High reliability threshold (percentage) */ readonly HIGH_THRESHOLD: 90; /** Medium reliability threshold (percentage) */ readonly MEDIUM_THRESHOLD: 50; /** Status symbols for reliability and validation summaries */ readonly SYMBOLS: { readonly PASS: "[PASS]"; readonly WARN: "[WARN]"; readonly FAIL: "[FAIL]"; }; }; /** * Confidence labels for terminal and documentation output. */ export declare const CONFIDENCE_INDICATORS: { readonly high: "HIGH"; readonly medium: "MEDIUM"; readonly low: "LOW"; }; /** * Documentation quality scoring configuration. * Used by documentation-scorer.ts for tool documentation assessment. * * Scoring evaluates four key components: * - Description coverage: percentage of tools with descriptions * - Description quality: depth and clarity of descriptions * - Parameter documentation: percentage of parameters documented * - Example coverage: percentage of tools with examples */ export declare const DOCUMENTATION_SCORING: { /** Component weights for overall score (should sum to 1.0) */ readonly WEIGHTS: { readonly descriptionCoverage: 0.3; readonly descriptionQuality: 0.3; readonly parameterDocumentation: 0.25; readonly exampleCoverage: 0.15; }; /** Grade thresholds (minimum score for each grade) */ readonly GRADE_THRESHOLDS: { readonly A: 90; readonly B: 80; readonly C: 70; readonly D: 60; readonly F: 0; }; /** Description quality scoring criteria */ readonly DESCRIPTION: { /** Minimum length for a "good" description */ readonly MIN_GOOD_LENGTH: 50; /** Minimum length for an "acceptable" description */ readonly MIN_ACCEPTABLE_LENGTH: 20; /** Score for good length (>= MIN_GOOD_LENGTH) */ readonly GOOD_LENGTH_SCORE: 40; /** Score for acceptable length (>= MIN_ACCEPTABLE_LENGTH) */ readonly ACCEPTABLE_LENGTH_SCORE: 20; /** Score bonus for starting with imperative verb */ readonly IMPERATIVE_VERB_BONUS: 20; /** Score bonus for describing behavior/returns */ readonly BEHAVIOR_DESCRIPTION_BONUS: 20; /** Score bonus for including examples or specifics */ readonly EXAMPLES_BONUS: 20; }; /** Penalties for documentation issues */ readonly PENALTIES: { /** Penalty for missing tool description */ readonly missingDescription: 30; /** Penalty for short description (< MIN_ACCEPTABLE_LENGTH) */ readonly shortDescription: 15; /** Penalty multiplier for undocumented parameters (applied per-param) */ readonly undocumentedParamMultiplier: 25; }; /** Pattern to detect imperative verb at start of description */ readonly IMPERATIVE_PATTERN: RegExp; /** Pattern to detect behavior/return value description */ readonly BEHAVIOR_PATTERN: RegExp; /** Pattern to detect examples or specific details */ readonly EXAMPLES_PATTERN: RegExp; /** Issue severity levels */ readonly SEVERITY: { readonly missingDescription: "error"; readonly shortDescription: "warning"; readonly missingParamDescription: "warning"; readonly noExamples: "info"; }; /** Maximum suggestions to include in report */ readonly MAX_SUGGESTIONS: 5; /** Threshold for suggesting examples (tools without examples / total tools) */ readonly EXAMPLES_SUGGESTION_THRESHOLD: 0.5; }; /** * Contract-as-code testing configuration. * Used by contract validator for verifying MCP server behavior * against defined expectations. */ export declare const CONTRACT_TESTING: { /** Default contract file names (in order of preference) */ readonly CONTRACT_FILENAMES: readonly string[]; /** Current contract schema version */ readonly SCHEMA_VERSION: "1"; /** Maximum number of output assertions per tool */ readonly MAX_OUTPUT_ASSERTIONS: 20; /** Maximum validation errors to report before truncating */ readonly MAX_VALIDATION_ERRORS: 50; /** Validation modes */ readonly MODES: { /** Strict mode - fail on any contract violation */ readonly STRICT: "strict"; /** Lenient mode - warn on non-breaking violations */ readonly LENIENT: "lenient"; /** Report mode - report violations without failing */ readonly REPORT: "report"; }; /** Severity levels for contract violations */ readonly VIOLATION_SEVERITY: { /** Tool is missing from server */ readonly MISSING_TOOL: "breaking"; /** Required parameter is missing */ readonly MISSING_REQUIRED_PARAM: "breaking"; /** Parameter type mismatch */ readonly TYPE_MISMATCH: "breaking"; /** Output assertion failed */ readonly OUTPUT_ASSERTION_FAILED: "warning"; /** Extra unexpected tool found */ readonly UNEXPECTED_TOOL: "info"; /** Extra unexpected field in output */ readonly UNEXPECTED_FIELD: "info"; }; /** JSONPath patterns for output validation */ readonly JSONPATH: { /** Maximum depth for JSONPath evaluation */ readonly MAX_DEPTH: 20; /** Timeout for JSONPath evaluation (ms) */ readonly TIMEOUT: 1000; }; }; /** * Smart value generation configuration for check mode. * Used by smart-value-generator.ts for intelligent test value creation. * * Provides realistic default values for common semantic types like * coordinates, search queries, and identifiers instead of generic "test" values. */ export declare const SMART_VALUE_GENERATION: { /** Geographic coordinate patterns and defaults */ readonly COORDINATES: { /** Patterns that indicate latitude fields */ readonly LATITUDE_PATTERNS: readonly RegExp[]; /** Patterns that indicate longitude fields */ readonly LONGITUDE_PATTERNS: readonly RegExp[]; /** Default coordinate values (San Francisco - commonly used in examples) */ readonly DEFAULTS: { readonly latitude: 37.7749; readonly longitude: -122.4194; }; /** Valid ranges for coordinates */ readonly RANGES: { readonly latitude: { readonly min: -90; readonly max: 90; }; readonly longitude: { readonly min: -180; readonly max: 180; }; }; }; /** Search/query field patterns and defaults */ readonly SEARCH_QUERY: { /** Patterns that indicate search/query fields */ readonly PATTERNS: readonly RegExp[]; /** Context-aware search values */ readonly VALUES: { /** For location-related queries */ readonly location: "San Francisco, CA"; /** For weather-related queries */ readonly weather: "New York"; /** For product-related queries */ readonly product: "laptop"; /** For general searches */ readonly general: "example search query"; }; /** Description patterns to detect context */ readonly CONTEXT_PATTERNS: { readonly location: RegExp; readonly weather: RegExp; readonly product: RegExp; }; }; /** Enhanced ID field patterns and defaults */ readonly IDENTIFIERS: { /** Patterns that indicate UUID format */ readonly UUID_PATTERNS: readonly RegExp[]; /** Patterns that indicate numeric IDs */ readonly NUMERIC_ID_PATTERNS: readonly RegExp[]; /** Default ID values for different formats */ readonly DEFAULTS: { readonly uuid: "550e8400-e29b-41d4-a716-446655440000"; readonly numeric: "12345"; readonly prefixed: "id_example123"; readonly generic: "test-id-123"; }; }; /** Resource name patterns */ readonly RESOURCE_NAMES: { /** Patterns that indicate file names */ readonly FILE_PATTERNS: readonly RegExp[]; /** Patterns that indicate directory/path */ readonly PATH_PATTERNS: readonly RegExp[]; /** Default values */ readonly DEFAULTS: { readonly filename: "example.txt"; readonly directory: "/tmp/test"; readonly path: "/tmp/test/example.txt"; }; }; /** Account/user patterns */ readonly ACCOUNT: { /** Patterns for account identifiers */ readonly PATTERNS: readonly RegExp[]; /** Default values */ readonly DEFAULTS: { readonly accountId: "acct_123456789"; readonly userId: "user_123456789"; }; }; /** Limit/count patterns for pagination */ readonly PAGINATION: { /** Patterns for limit fields */ readonly LIMIT_PATTERNS: readonly RegExp[]; /** Patterns for offset/page fields */ readonly OFFSET_PATTERNS: readonly RegExp[]; /** Default values */ readonly DEFAULTS: { readonly limit: 10; readonly offset: 0; readonly page: 1; }; }; }; //# sourceMappingURL=testing.d.ts.map