@dotsetlabs/bellwether 1.0.3 → 2.0.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/CHANGELOG.md +74 -0
- package/README.md +8 -2
- package/dist/baseline/accessors.d.ts +1 -1
- package/dist/baseline/accessors.js +1 -3
- package/dist/baseline/baseline-format.d.ts +287 -0
- package/dist/baseline/baseline-format.js +12 -0
- package/dist/baseline/comparator.js +249 -11
- package/dist/baseline/converter.d.ts +15 -15
- package/dist/baseline/converter.js +46 -34
- package/dist/baseline/diff.d.ts +1 -1
- package/dist/baseline/diff.js +45 -28
- package/dist/baseline/error-analyzer.d.ts +1 -1
- package/dist/baseline/error-analyzer.js +90 -17
- package/dist/baseline/incremental-checker.js +8 -5
- package/dist/baseline/index.d.ts +2 -12
- package/dist/baseline/index.js +3 -23
- package/dist/baseline/performance-tracker.d.ts +0 -1
- package/dist/baseline/performance-tracker.js +13 -20
- package/dist/baseline/response-fingerprint.js +39 -2
- package/dist/baseline/saver.js +41 -10
- package/dist/baseline/schema-compare.d.ts +22 -0
- package/dist/baseline/schema-compare.js +259 -16
- package/dist/baseline/types.d.ts +10 -7
- package/dist/cache/response-cache.d.ts +8 -0
- package/dist/cache/response-cache.js +110 -0
- package/dist/cli/commands/check.js +23 -6
- package/dist/cli/commands/explore.js +34 -14
- package/dist/cli/index.js +8 -0
- package/dist/config/template.js +8 -7
- package/dist/config/validator.d.ts +59 -59
- package/dist/config/validator.js +245 -90
- package/dist/constants/core.d.ts +4 -0
- package/dist/constants/core.js +8 -19
- package/dist/constants/registry.d.ts +17 -0
- package/dist/constants/registry.js +18 -0
- package/dist/constants/testing.d.ts +0 -369
- package/dist/constants/testing.js +18 -456
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/docs/contract.js +131 -83
- package/dist/docs/report.js +8 -5
- package/dist/interview/insights.d.ts +17 -0
- package/dist/interview/insights.js +52 -0
- package/dist/interview/interviewer.js +52 -10
- package/dist/interview/prompt-test-generator.d.ts +12 -0
- package/dist/interview/prompt-test-generator.js +77 -0
- package/dist/interview/resource-test-generator.d.ts +12 -0
- package/dist/interview/resource-test-generator.js +20 -0
- package/dist/interview/schema-inferrer.js +26 -4
- package/dist/interview/schema-test-generator.js +278 -31
- package/dist/interview/stateful-test-runner.d.ts +3 -0
- package/dist/interview/stateful-test-runner.js +80 -0
- package/dist/interview/types.d.ts +12 -0
- package/dist/transport/mcp-client.js +1 -1
- package/dist/transport/sse-transport.d.ts +7 -3
- package/dist/transport/sse-transport.js +157 -67
- package/dist/version.js +1 -1
- package/man/bellwether.1 +1 -1
- package/man/bellwether.1.md +2 -2
- package/package.json +1 -1
- package/schemas/bellwether-check.schema.json +185 -0
- package/schemas/bellwether-explore.schema.json +837 -0
- package/scripts/completions/bellwether.bash +10 -4
- package/scripts/completions/bellwether.zsh +55 -2
package/dist/constants/core.js
CHANGED
|
@@ -89,19 +89,9 @@ export const TRANSPORT_ERRORS = {
|
|
|
89
89
|
/missing.*id/i,
|
|
90
90
|
],
|
|
91
91
|
/** Patterns indicating timeout */
|
|
92
|
-
TIMEOUT_PATTERNS: [
|
|
93
|
-
/timeout/i,
|
|
94
|
-
/timed out/i,
|
|
95
|
-
/ETIMEDOUT/i,
|
|
96
|
-
/deadline/i,
|
|
97
|
-
],
|
|
92
|
+
TIMEOUT_PATTERNS: [/timeout/i, /timed out/i, /ETIMEDOUT/i, /deadline/i],
|
|
98
93
|
/** Patterns indicating shutdown errors */
|
|
99
|
-
SHUTDOWN_PATTERNS: [
|
|
100
|
-
/shutdown/i,
|
|
101
|
-
/SIGTERM/i,
|
|
102
|
-
/SIGKILL/i,
|
|
103
|
-
/exit.*signal/i,
|
|
104
|
-
],
|
|
94
|
+
SHUTDOWN_PATTERNS: [/shutdown/i, /SIGTERM/i, /SIGKILL/i, /exit.*signal/i],
|
|
105
95
|
/** Maximum transport errors to collect before stopping */
|
|
106
96
|
MAX_ERRORS_TO_COLLECT: 50,
|
|
107
97
|
/** Error messages that indicate a likely server bug (vs environment issue) */
|
|
@@ -393,7 +383,7 @@ export const PERCENTILES = {
|
|
|
393
383
|
*/
|
|
394
384
|
export const COST_THRESHOLDS = {
|
|
395
385
|
/** Cost threshold ($) for prompting confirmation in interactive mode */
|
|
396
|
-
CONFIRMATION_THRESHOLD: 0.
|
|
386
|
+
CONFIRMATION_THRESHOLD: 0.1,
|
|
397
387
|
/** Cost threshold ($) for suggesting --ci flag */
|
|
398
388
|
SUGGEST_CI_THRESHOLD: 0.05,
|
|
399
389
|
/** Cost threshold ($) for suggesting --scenarios-only */
|
|
@@ -534,12 +524,7 @@ export const PATHS = {
|
|
|
534
524
|
/** Mock data directory for testing */
|
|
535
525
|
MOCK_DATA_DIR: 'mock-data',
|
|
536
526
|
/** Possible config file names (in order of preference) */
|
|
537
|
-
CONFIG_FILENAMES: [
|
|
538
|
-
'bellwether.yaml',
|
|
539
|
-
'bellwether.yml',
|
|
540
|
-
'.bellwether.yaml',
|
|
541
|
-
'.bellwether.yml',
|
|
542
|
-
],
|
|
527
|
+
CONFIG_FILENAMES: ['bellwether.yaml', 'bellwether.yml', '.bellwether.yaml', '.bellwether.yml'],
|
|
543
528
|
/** Default config file name (first in CONFIG_FILENAMES) */
|
|
544
529
|
DEFAULT_CONFIG_FILENAME: 'bellwether.yaml',
|
|
545
530
|
/** Default baseline output file */
|
|
@@ -568,6 +553,10 @@ export const REPORT_SCHEMAS = {
|
|
|
568
553
|
CHECK_REPORT_SCHEMA_FILE: 'schemas/bellwether-check.schema.json',
|
|
569
554
|
/** Public schema URL for consumers */
|
|
570
555
|
CHECK_REPORT_SCHEMA_URL: 'https://unpkg.com/@dotsetlabs/bellwether/schemas/bellwether-check.schema.json',
|
|
556
|
+
/** Local schema path for bellwether-explore.json */
|
|
557
|
+
EXPLORE_REPORT_SCHEMA_FILE: 'schemas/bellwether-explore.schema.json',
|
|
558
|
+
/** Public schema URL for consumers */
|
|
559
|
+
EXPLORE_REPORT_SCHEMA_URL: 'https://unpkg.com/@dotsetlabs/bellwether/schemas/bellwether-explore.schema.json',
|
|
571
560
|
};
|
|
572
561
|
// ==================== Patterns ====================
|
|
573
562
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry-related constants.
|
|
3
|
+
*/
|
|
4
|
+
export declare const URLS: {
|
|
5
|
+
/** MCP Registry base URL */
|
|
6
|
+
readonly MCP_REGISTRY: "https://registry.modelcontextprotocol.io";
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* MCP Registry configuration.
|
|
10
|
+
*/
|
|
11
|
+
export declare const REGISTRY: {
|
|
12
|
+
/** Default request timeout (10 seconds) */
|
|
13
|
+
readonly TIMEOUT: 10000;
|
|
14
|
+
/** API version */
|
|
15
|
+
readonly API_VERSION: "v0";
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry-related constants.
|
|
3
|
+
*/
|
|
4
|
+
export const URLS = {
|
|
5
|
+
/** MCP Registry base URL */
|
|
6
|
+
MCP_REGISTRY: 'https://registry.modelcontextprotocol.io',
|
|
7
|
+
};
|
|
8
|
+
// ==================== Registry ====================
|
|
9
|
+
/**
|
|
10
|
+
* MCP Registry configuration.
|
|
11
|
+
*/
|
|
12
|
+
export const REGISTRY = {
|
|
13
|
+
/** Default request timeout (10 seconds) */
|
|
14
|
+
TIMEOUT: 10000,
|
|
15
|
+
/** API version */
|
|
16
|
+
API_VERSION: 'v0',
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -1,41 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Change impact analysis configuration.
|
|
3
|
-
* Used by change-impact-analyzer.ts for semantic breaking change detection.
|
|
4
|
-
*/
|
|
5
|
-
export declare const CHANGE_IMPACT: {
|
|
6
|
-
/** Risk weights for different schema change types (0-100 scale) */
|
|
7
|
-
readonly RISK_WEIGHTS: {
|
|
8
|
-
readonly parameter_removed: 100;
|
|
9
|
-
readonly parameter_required_added: 90;
|
|
10
|
-
readonly parameter_type_changed: 85;
|
|
11
|
-
readonly enum_value_removed: 80;
|
|
12
|
-
readonly constraint_tightened: 60;
|
|
13
|
-
readonly format_changed: 50;
|
|
14
|
-
readonly constraint_added: 40;
|
|
15
|
-
readonly default_changed: 30;
|
|
16
|
-
readonly constraint_removed: 20;
|
|
17
|
-
readonly parameter_required_removed: 15;
|
|
18
|
-
readonly enum_value_added: 10;
|
|
19
|
-
readonly parameter_added: 10;
|
|
20
|
-
readonly description_changed: 5;
|
|
21
|
-
readonly constraint_relaxed: 5;
|
|
22
|
-
};
|
|
23
|
-
/** Migration complexity thresholds (number of breaking changes) */
|
|
24
|
-
readonly COMPLEXITY_THRESHOLDS: {
|
|
25
|
-
/** 0-1 breaking changes = trivial migration */
|
|
26
|
-
readonly trivial: 1;
|
|
27
|
-
/** 2-3 breaking changes = simple migration */
|
|
28
|
-
readonly simple: 3;
|
|
29
|
-
/** 4-6 breaking changes = moderate migration */
|
|
30
|
-
readonly moderate: 6;
|
|
31
|
-
};
|
|
32
|
-
/** Risk score thresholds for severity classification */
|
|
33
|
-
readonly SEVERITY_THRESHOLDS: {
|
|
34
|
-
readonly info: 20;
|
|
35
|
-
readonly warning: 50;
|
|
36
|
-
readonly breaking: 70;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
1
|
/**
|
|
40
2
|
* Check command configuration defaults.
|
|
41
3
|
* Used by check.ts and incremental-checker.ts.
|
|
@@ -122,28 +84,6 @@ export declare const PERFORMANCE_CONFIDENCE: {
|
|
|
122
84
|
readonly NO_SAMPLES: "No performance samples collected";
|
|
123
85
|
};
|
|
124
86
|
};
|
|
125
|
-
/**
|
|
126
|
-
* Deprecation lifecycle configuration.
|
|
127
|
-
* Used by deprecation-tracker.ts for tool deprecation management.
|
|
128
|
-
*/
|
|
129
|
-
export declare const DEPRECATION: {
|
|
130
|
-
/** Default configuration values */
|
|
131
|
-
readonly DEFAULTS: {
|
|
132
|
-
/** Warn when using deprecated tools */
|
|
133
|
-
readonly warnOnUsage: true;
|
|
134
|
-
/** Fail when using tools past their removal date */
|
|
135
|
-
readonly failOnExpired: true;
|
|
136
|
-
/** Default grace period in days after removal date */
|
|
137
|
-
readonly gracePeriodDays: 90;
|
|
138
|
-
};
|
|
139
|
-
/** Days thresholds for warning levels */
|
|
140
|
-
readonly THRESHOLDS: {
|
|
141
|
-
/** Warn about upcoming removal within this many days */
|
|
142
|
-
readonly upcomingRemovalDays: 30;
|
|
143
|
-
/** Critical warning within this many days */
|
|
144
|
-
readonly criticalRemovalDays: 7;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
87
|
export declare const SCHEMA_EVOLUTION: {
|
|
148
88
|
/** Default maximum versions to keep per tool */
|
|
149
89
|
readonly DEFAULT_MAX_VERSIONS_PER_TOOL: 50;
|
|
@@ -233,74 +173,6 @@ export declare const ERROR_ANALYSIS: {
|
|
|
233
173
|
/** Maximum related parameters to extract */
|
|
234
174
|
readonly MAX_RELATED_PARAMETERS: 5;
|
|
235
175
|
};
|
|
236
|
-
/**
|
|
237
|
-
* Migration guide generation configuration.
|
|
238
|
-
* Used by migration-generator.ts for auto-generating migration guides.
|
|
239
|
-
*/
|
|
240
|
-
export declare const MIGRATION_GUIDE: {
|
|
241
|
-
/** Maximum code examples per migration step */
|
|
242
|
-
readonly MAX_CODE_EXAMPLES_PER_STEP: 3;
|
|
243
|
-
/** Maximum steps in a migration guide */
|
|
244
|
-
readonly MAX_MIGRATION_STEPS: 20;
|
|
245
|
-
/** Minimum changes required to generate a guide */
|
|
246
|
-
readonly MIN_CHANGES_FOR_GUIDE: 1;
|
|
247
|
-
/** Effort estimation thresholds (number of breaking changes) */
|
|
248
|
-
readonly EFFORT_THRESHOLDS: {
|
|
249
|
-
/** 0-1 breaking changes = trivial */
|
|
250
|
-
readonly trivial: 1;
|
|
251
|
-
/** 2-3 breaking changes = minor */
|
|
252
|
-
readonly minor: 3;
|
|
253
|
-
/** 4-6 breaking changes = moderate */
|
|
254
|
-
readonly moderate: 6;
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
|
-
/**
|
|
258
|
-
* Auto-generated test scenario configuration.
|
|
259
|
-
* Used by scenario-generator.ts for generating test scenarios.
|
|
260
|
-
*/
|
|
261
|
-
export declare const SCENARIO_GENERATION: {
|
|
262
|
-
/** Maximum happy path scenarios per tool */
|
|
263
|
-
readonly MAX_HAPPY_PATH_SCENARIOS: 5;
|
|
264
|
-
/** Maximum edge case scenarios per tool */
|
|
265
|
-
readonly MAX_EDGE_CASE_SCENARIOS: 10;
|
|
266
|
-
/** Maximum error case scenarios per tool */
|
|
267
|
-
readonly MAX_ERROR_CASE_SCENARIOS: 5;
|
|
268
|
-
/** Maximum security test scenarios per tool */
|
|
269
|
-
readonly MAX_SECURITY_SCENARIOS: 5;
|
|
270
|
-
/** Default minimum coverage percentage */
|
|
271
|
-
readonly DEFAULT_MIN_COVERAGE: 80;
|
|
272
|
-
/** Common SQL injection payloads for testing */
|
|
273
|
-
readonly SQL_INJECTION_PAYLOADS: readonly string[];
|
|
274
|
-
/** Common XSS payloads for testing */
|
|
275
|
-
readonly XSS_PAYLOADS: readonly string[];
|
|
276
|
-
/** Common path traversal payloads for testing */
|
|
277
|
-
readonly PATH_TRAVERSAL_PAYLOADS: readonly string[];
|
|
278
|
-
/** Categories of test scenarios */
|
|
279
|
-
readonly CATEGORIES: readonly string[];
|
|
280
|
-
};
|
|
281
|
-
/**
|
|
282
|
-
* PR comment formatting configuration.
|
|
283
|
-
* Used by pr-comment-generator.ts for generating GitHub PR comments.
|
|
284
|
-
*/
|
|
285
|
-
export declare const PR_COMMENTS: {
|
|
286
|
-
/** Maximum tools to show in detailed section */
|
|
287
|
-
readonly MAX_DETAILED_TOOLS: 10;
|
|
288
|
-
/** Maximum changes to show per tool */
|
|
289
|
-
readonly MAX_CHANGES_PER_TOOL: 5;
|
|
290
|
-
/** Maximum workflows to show in affected section */
|
|
291
|
-
readonly MAX_AFFECTED_WORKFLOWS: 5;
|
|
292
|
-
/** Maximum code examples in migration section */
|
|
293
|
-
readonly MAX_MIGRATION_EXAMPLES: 3;
|
|
294
|
-
/** Truncation length for long values */
|
|
295
|
-
readonly VALUE_TRUNCATE_LENGTH: 50;
|
|
296
|
-
/** Badge colors for different severity levels */
|
|
297
|
-
readonly BADGE_COLORS: {
|
|
298
|
-
readonly breaking: "red";
|
|
299
|
-
readonly warning: "orange";
|
|
300
|
-
readonly info: "blue";
|
|
301
|
-
readonly none: "green";
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
176
|
/**
|
|
305
177
|
* Schema-based test generation configuration for check mode.
|
|
306
178
|
* Used by schema-test-generator.ts for deterministic test case creation.
|
|
@@ -1053,105 +925,6 @@ export declare const DOCUMENTATION_SCORING: {
|
|
|
1053
925
|
/** Threshold for suggesting examples (tools without examples / total tools) */
|
|
1054
926
|
readonly EXAMPLES_SUGGESTION_THRESHOLD: 0.5;
|
|
1055
927
|
};
|
|
1056
|
-
/**
|
|
1057
|
-
* AI Agent Compatibility scoring configuration.
|
|
1058
|
-
* Used by ai-compatibility-scorer.ts for evaluating how well
|
|
1059
|
-
* an MCP server is designed for AI agent consumption.
|
|
1060
|
-
*
|
|
1061
|
-
* Scoring factors:
|
|
1062
|
-
* - Description clarity (20%): LLM understanding
|
|
1063
|
-
* - Parameter naming (15%): Semantic inference
|
|
1064
|
-
* - Error message quality (15%): Actionable errors
|
|
1065
|
-
* - Example completeness (20%): Non-truncated examples
|
|
1066
|
-
* - Workflow documentation (15%): Multi-step guidance
|
|
1067
|
-
* - Response predictability (15%): Schema stability
|
|
1068
|
-
*/
|
|
1069
|
-
export declare const AI_COMPATIBILITY: {
|
|
1070
|
-
/** Component weights for overall score (should sum to 1.0) */
|
|
1071
|
-
readonly WEIGHTS: {
|
|
1072
|
-
readonly descriptionClarity: 0.2;
|
|
1073
|
-
readonly parameterNaming: 0.15;
|
|
1074
|
-
readonly errorMessageQuality: 0.15;
|
|
1075
|
-
readonly exampleCompleteness: 0.2;
|
|
1076
|
-
readonly workflowDocumentation: 0.15;
|
|
1077
|
-
readonly responsePredictability: 0.15;
|
|
1078
|
-
};
|
|
1079
|
-
/** Grade thresholds (minimum score for each grade) */
|
|
1080
|
-
readonly GRADE_THRESHOLDS: {
|
|
1081
|
-
readonly A: 90;
|
|
1082
|
-
readonly B: 80;
|
|
1083
|
-
readonly C: 70;
|
|
1084
|
-
readonly D: 60;
|
|
1085
|
-
readonly F: 0;
|
|
1086
|
-
};
|
|
1087
|
-
/** Description quality scoring */
|
|
1088
|
-
readonly DESCRIPTION: {
|
|
1089
|
-
/** Minimum acceptable description length */
|
|
1090
|
-
readonly MIN_LENGTH: 50;
|
|
1091
|
-
/** Good description length */
|
|
1092
|
-
readonly GOOD_LENGTH: 100;
|
|
1093
|
-
/** Pattern to detect action verb at start */
|
|
1094
|
-
readonly ACTION_VERB_PATTERN: RegExp;
|
|
1095
|
-
/** Pattern to detect purpose/behavior explanation */
|
|
1096
|
-
readonly PURPOSE_PATTERN: RegExp;
|
|
1097
|
-
/** Pattern to detect input/output mentions */
|
|
1098
|
-
readonly IO_PATTERN: RegExp;
|
|
1099
|
-
/** Points for various description qualities */
|
|
1100
|
-
readonly POINTS: {
|
|
1101
|
-
/** Points for minimum length */
|
|
1102
|
-
readonly MIN_LENGTH: 20;
|
|
1103
|
-
/** Points for good length */
|
|
1104
|
-
readonly GOOD_LENGTH: 30;
|
|
1105
|
-
/** Points for action verb */
|
|
1106
|
-
readonly ACTION_VERB: 25;
|
|
1107
|
-
/** Points for purpose explanation */
|
|
1108
|
-
readonly PURPOSE: 25;
|
|
1109
|
-
/** Points for I/O mention */
|
|
1110
|
-
readonly IO_MENTION: 20;
|
|
1111
|
-
};
|
|
1112
|
-
};
|
|
1113
|
-
/** Parameter naming quality scoring */
|
|
1114
|
-
readonly PARAMETER: {
|
|
1115
|
-
/** Generic/bad parameter names to flag */
|
|
1116
|
-
readonly BAD_NAMES: readonly string[];
|
|
1117
|
-
/** Minimum acceptable parameter name length */
|
|
1118
|
-
readonly MIN_NAME_LENGTH: 2;
|
|
1119
|
-
};
|
|
1120
|
-
/** Error message quality scoring */
|
|
1121
|
-
readonly ERROR: {
|
|
1122
|
-
/** Minimum error message length for quality */
|
|
1123
|
-
readonly MIN_MESSAGE_LENGTH: 20;
|
|
1124
|
-
/** Pattern to detect actionable error content */
|
|
1125
|
-
readonly ACTIONABLE_PATTERN: RegExp;
|
|
1126
|
-
/** Pattern to detect remediation hints */
|
|
1127
|
-
readonly REMEDIATION_PATTERN: RegExp;
|
|
1128
|
-
/** Default score when no errors observed */
|
|
1129
|
-
readonly DEFAULT_SCORE: 70;
|
|
1130
|
-
};
|
|
1131
|
-
/** Example completeness scoring */
|
|
1132
|
-
readonly EXAMPLE: {
|
|
1133
|
-
/** Weight for coverage in score */
|
|
1134
|
-
readonly COVERAGE_WEIGHT: 0.6;
|
|
1135
|
-
/** Weight for quality (non-truncated) in score */
|
|
1136
|
-
readonly QUALITY_WEIGHT: 0.4;
|
|
1137
|
-
};
|
|
1138
|
-
/** Workflow documentation scoring */
|
|
1139
|
-
readonly WORKFLOW: {
|
|
1140
|
-
/** Pattern to detect sequence hints */
|
|
1141
|
-
readonly SEQUENCE_PATTERN: RegExp;
|
|
1142
|
-
/** Pattern to detect dependency hints */
|
|
1143
|
-
readonly DEPENDENCY_PATTERN: RegExp;
|
|
1144
|
-
};
|
|
1145
|
-
/** Response predictability scoring */
|
|
1146
|
-
readonly RESPONSE: {
|
|
1147
|
-
/** Default score when no evolution data */
|
|
1148
|
-
readonly DEFAULT_SCORE: 80;
|
|
1149
|
-
};
|
|
1150
|
-
/** Maximum recommendations to generate */
|
|
1151
|
-
readonly MAX_RECOMMENDATIONS: 5;
|
|
1152
|
-
/** Score threshold below which to recommend improvements */
|
|
1153
|
-
readonly RECOMMENDATION_THRESHOLD: 80;
|
|
1154
|
-
};
|
|
1155
928
|
/**
|
|
1156
929
|
* Contract-as-code testing configuration.
|
|
1157
930
|
* Used by contract validator for verifying MCP server behavior
|
|
@@ -1198,91 +971,6 @@ export declare const CONTRACT_TESTING: {
|
|
|
1198
971
|
readonly TIMEOUT: 1000;
|
|
1199
972
|
};
|
|
1200
973
|
};
|
|
1201
|
-
/**
|
|
1202
|
-
* Regression risk scoring configuration.
|
|
1203
|
-
* Used by risk-scorer.ts for prioritizing fixes based on
|
|
1204
|
-
* weighted risk factors.
|
|
1205
|
-
*/
|
|
1206
|
-
export declare const REGRESSION_RISK: {
|
|
1207
|
-
/** Risk factor weights (should sum to 1.0) */
|
|
1208
|
-
readonly WEIGHTS: {
|
|
1209
|
-
/** Weight for breaking change severity */
|
|
1210
|
-
readonly breakingChangeSeverity: 0.35;
|
|
1211
|
-
/** Weight for affected tool importance */
|
|
1212
|
-
readonly toolImportance: 0.25;
|
|
1213
|
-
/** Weight for error rate delta */
|
|
1214
|
-
readonly errorRateDelta: 0.15;
|
|
1215
|
-
/** Weight for performance regression */
|
|
1216
|
-
readonly performanceRegression: 0.15;
|
|
1217
|
-
/** Weight for security posture changes */
|
|
1218
|
-
readonly securityPosture: 0.1;
|
|
1219
|
-
};
|
|
1220
|
-
/** Risk level thresholds (minimum score for each level) */
|
|
1221
|
-
readonly LEVEL_THRESHOLDS: {
|
|
1222
|
-
readonly critical: 80;
|
|
1223
|
-
readonly high: 60;
|
|
1224
|
-
readonly medium: 40;
|
|
1225
|
-
readonly low: 20;
|
|
1226
|
-
readonly info: 0;
|
|
1227
|
-
};
|
|
1228
|
-
/** Breaking change severity scores */
|
|
1229
|
-
readonly BREAKING_SCORES: {
|
|
1230
|
-
/** Score for removed tool */
|
|
1231
|
-
readonly toolRemoved: 100;
|
|
1232
|
-
/** Score for removed required parameter */
|
|
1233
|
-
readonly requiredParamRemoved: 90;
|
|
1234
|
-
/** Score for type change */
|
|
1235
|
-
readonly typeChanged: 80;
|
|
1236
|
-
/** Score for removed enum value */
|
|
1237
|
-
readonly enumValueRemoved: 70;
|
|
1238
|
-
/** Score for tightened constraint */
|
|
1239
|
-
readonly constraintTightened: 50;
|
|
1240
|
-
/** Score for added required parameter */
|
|
1241
|
-
readonly requiredParamAdded: 40;
|
|
1242
|
-
};
|
|
1243
|
-
/** Tool importance indicators (patterns in descriptions) */
|
|
1244
|
-
readonly IMPORTANCE_PATTERNS: {
|
|
1245
|
-
/** Patterns indicating high-frequency tools */
|
|
1246
|
-
readonly highFrequency: readonly [RegExp];
|
|
1247
|
-
/** Patterns indicating low-frequency tools */
|
|
1248
|
-
readonly lowFrequency: readonly [RegExp];
|
|
1249
|
-
};
|
|
1250
|
-
/** Error rate change thresholds */
|
|
1251
|
-
readonly ERROR_RATE: {
|
|
1252
|
-
/** Threshold for significant increase (%) */
|
|
1253
|
-
readonly SIGNIFICANT_INCREASE: 10;
|
|
1254
|
-
/** Threshold for critical increase (%) */
|
|
1255
|
-
readonly CRITICAL_INCREASE: 25;
|
|
1256
|
-
/** Base score for error rate calculation */
|
|
1257
|
-
readonly BASE_SCORE: 50;
|
|
1258
|
-
};
|
|
1259
|
-
/** Performance regression scoring */
|
|
1260
|
-
readonly PERFORMANCE: {
|
|
1261
|
-
/** Threshold for minor regression (%) */
|
|
1262
|
-
readonly MINOR_REGRESSION: 10;
|
|
1263
|
-
/** Threshold for major regression (%) */
|
|
1264
|
-
readonly MAJOR_REGRESSION: 25;
|
|
1265
|
-
/** Threshold for critical regression (%) */
|
|
1266
|
-
readonly CRITICAL_REGRESSION: 50;
|
|
1267
|
-
/** Scores for each threshold */
|
|
1268
|
-
readonly SCORES: {
|
|
1269
|
-
readonly minor: 30;
|
|
1270
|
-
readonly major: 60;
|
|
1271
|
-
readonly critical: 90;
|
|
1272
|
-
};
|
|
1273
|
-
};
|
|
1274
|
-
/** Security change scoring */
|
|
1275
|
-
readonly SECURITY: {
|
|
1276
|
-
/** Score for new vulnerability */
|
|
1277
|
-
readonly NEW_VULNERABILITY: 100;
|
|
1278
|
-
/** Score for resolved vulnerability */
|
|
1279
|
-
readonly RESOLVED_VULNERABILITY: -20;
|
|
1280
|
-
/** Score for severity increase */
|
|
1281
|
-
readonly SEVERITY_INCREASE: 50;
|
|
1282
|
-
};
|
|
1283
|
-
/** Maximum recommendations to include */
|
|
1284
|
-
readonly MAX_RECOMMENDATIONS: 5;
|
|
1285
|
-
};
|
|
1286
974
|
/**
|
|
1287
975
|
* Smart value generation configuration for check mode.
|
|
1288
976
|
* Used by smart-value-generator.ts for intelligent test value creation.
|
|
@@ -1387,61 +1075,4 @@ export declare const SMART_VALUE_GENERATION: {
|
|
|
1387
1075
|
};
|
|
1388
1076
|
};
|
|
1389
1077
|
};
|
|
1390
|
-
/**
|
|
1391
|
-
* Intelligent test pruning configuration.
|
|
1392
|
-
* Used to skip unnecessary tests based on tool characteristics
|
|
1393
|
-
* and testing history.
|
|
1394
|
-
*/
|
|
1395
|
-
export declare const TEST_PRUNING: {
|
|
1396
|
-
/** Test categories that can be pruned */
|
|
1397
|
-
readonly CATEGORIES: {
|
|
1398
|
-
readonly boundary: "boundary";
|
|
1399
|
-
readonly enum: "enum";
|
|
1400
|
-
readonly optionalCombinations: "optional_combinations";
|
|
1401
|
-
readonly errorHandling: "error_handling";
|
|
1402
|
-
readonly happyPath: "happy_path";
|
|
1403
|
-
readonly security: "security";
|
|
1404
|
-
readonly semantic: "semantic";
|
|
1405
|
-
};
|
|
1406
|
-
/** Categories that should always run */
|
|
1407
|
-
readonly ALWAYS_RUN: readonly string[];
|
|
1408
|
-
/** Tool prioritization weights */
|
|
1409
|
-
readonly PRIORITY_WEIGHTS: {
|
|
1410
|
-
/** Weight for previous error history */
|
|
1411
|
-
readonly errorHistory: 0.3;
|
|
1412
|
-
/** Weight for external dependencies */
|
|
1413
|
-
readonly externalDependency: 0.25;
|
|
1414
|
-
/** Weight for schema complexity */
|
|
1415
|
-
readonly schemaComplexity: 0.2;
|
|
1416
|
-
/** Weight for time since last test */
|
|
1417
|
-
readonly timeSinceLastTest: 0.15;
|
|
1418
|
-
/** Weight for change frequency */
|
|
1419
|
-
readonly changeFrequency: 0.1;
|
|
1420
|
-
};
|
|
1421
|
-
/** Schema complexity thresholds */
|
|
1422
|
-
readonly SCHEMA_COMPLEXITY: {
|
|
1423
|
-
/** Number of parameters for "complex" classification */
|
|
1424
|
-
readonly HIGH_PARAM_COUNT: 10;
|
|
1425
|
-
/** Number of nested levels for "complex" classification */
|
|
1426
|
-
readonly HIGH_NESTING_DEPTH: 3;
|
|
1427
|
-
/** Number of required params for priority boost */
|
|
1428
|
-
readonly MANY_REQUIRED_PARAMS: 5;
|
|
1429
|
-
};
|
|
1430
|
-
/** Historical success thresholds */
|
|
1431
|
-
readonly SUCCESS_HISTORY: {
|
|
1432
|
-
/** Success rate threshold to reduce testing (%) */
|
|
1433
|
-
readonly HIGH_SUCCESS_THRESHOLD: 95;
|
|
1434
|
-
/** Number of consecutive successes to consider stable */
|
|
1435
|
-
readonly STABLE_RUN_COUNT: 5;
|
|
1436
|
-
};
|
|
1437
|
-
/** Time-based thresholds */
|
|
1438
|
-
readonly TIME_THRESHOLDS: {
|
|
1439
|
-
/** Hours since last test to increase priority */
|
|
1440
|
-
readonly STALE_HOURS: 168;
|
|
1441
|
-
/** Hours since last test for maximum priority */
|
|
1442
|
-
readonly VERY_STALE_HOURS: 720;
|
|
1443
|
-
};
|
|
1444
|
-
/** Maximum tests to skip per tool (safety limit) */
|
|
1445
|
-
readonly MAX_SKIPPED_CATEGORIES_PER_TOOL: 3;
|
|
1446
|
-
};
|
|
1447
1078
|
//# sourceMappingURL=testing.d.ts.map
|