driftdetect-mcp 0.4.6 → 0.5.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.
Files changed (77) hide show
  1. package/dist/enterprise-server.d.ts +7 -0
  2. package/dist/enterprise-server.d.ts.map +1 -1
  3. package/dist/enterprise-server.js +77 -7
  4. package/dist/enterprise-server.js.map +1 -1
  5. package/dist/tools/analysis/coupling.d.ts +56 -0
  6. package/dist/tools/analysis/coupling.d.ts.map +1 -0
  7. package/dist/tools/analysis/coupling.js +248 -0
  8. package/dist/tools/analysis/coupling.js.map +1 -0
  9. package/dist/tools/analysis/error-handling.d.ts +45 -0
  10. package/dist/tools/analysis/error-handling.d.ts.map +1 -0
  11. package/dist/tools/analysis/error-handling.js +220 -0
  12. package/dist/tools/analysis/error-handling.js.map +1 -0
  13. package/dist/tools/analysis/index.d.ts +11 -0
  14. package/dist/tools/analysis/index.d.ts.map +1 -0
  15. package/dist/tools/analysis/index.js +111 -0
  16. package/dist/tools/analysis/index.js.map +1 -0
  17. package/dist/tools/analysis/test-topology.d.ts +43 -0
  18. package/dist/tools/analysis/test-topology.d.ts.map +1 -0
  19. package/dist/tools/analysis/test-topology.js +294 -0
  20. package/dist/tools/analysis/test-topology.js.map +1 -0
  21. package/dist/tools/detail/code-examples.d.ts +20 -3
  22. package/dist/tools/detail/code-examples.d.ts.map +1 -1
  23. package/dist/tools/detail/code-examples.js +104 -0
  24. package/dist/tools/detail/code-examples.js.map +1 -1
  25. package/dist/tools/detail/index.d.ts +6 -4
  26. package/dist/tools/detail/index.d.ts.map +1 -1
  27. package/dist/tools/detail/index.js +44 -2
  28. package/dist/tools/detail/index.js.map +1 -1
  29. package/dist/tools/detail/pattern-get.d.ts +20 -3
  30. package/dist/tools/detail/pattern-get.d.ts.map +1 -1
  31. package/dist/tools/detail/pattern-get.js +87 -0
  32. package/dist/tools/detail/pattern-get.js.map +1 -1
  33. package/dist/tools/detail/wrappers.d.ts +97 -0
  34. package/dist/tools/detail/wrappers.d.ts.map +1 -0
  35. package/dist/tools/detail/wrappers.js +124 -0
  36. package/dist/tools/detail/wrappers.js.map +1 -0
  37. package/dist/tools/discovery/index.d.ts +3 -1
  38. package/dist/tools/discovery/index.d.ts.map +1 -1
  39. package/dist/tools/discovery/index.js +36 -1
  40. package/dist/tools/discovery/index.js.map +1 -1
  41. package/dist/tools/discovery/status.d.ts +16 -3
  42. package/dist/tools/discovery/status.d.ts.map +1 -1
  43. package/dist/tools/discovery/status.js +83 -1
  44. package/dist/tools/discovery/status.js.map +1 -1
  45. package/dist/tools/exploration/index.d.ts +2 -2
  46. package/dist/tools/exploration/index.d.ts.map +1 -1
  47. package/dist/tools/exploration/index.js +1 -1
  48. package/dist/tools/exploration/index.js.map +1 -1
  49. package/dist/tools/exploration/patterns-list.d.ts +21 -4
  50. package/dist/tools/exploration/patterns-list.d.ts.map +1 -1
  51. package/dist/tools/exploration/patterns-list.js +70 -0
  52. package/dist/tools/exploration/patterns-list.js.map +1 -1
  53. package/dist/tools/generation/__tests__/generation-tools.test.d.ts +6 -0
  54. package/dist/tools/generation/__tests__/generation-tools.test.d.ts.map +1 -0
  55. package/dist/tools/generation/__tests__/generation-tools.test.js +119 -0
  56. package/dist/tools/generation/__tests__/generation-tools.test.js.map +1 -0
  57. package/dist/tools/generation/explain.d.ts +75 -0
  58. package/dist/tools/generation/explain.d.ts.map +1 -0
  59. package/dist/tools/generation/explain.js +238 -0
  60. package/dist/tools/generation/explain.js.map +1 -0
  61. package/dist/tools/generation/index.d.ts +12 -0
  62. package/dist/tools/generation/index.d.ts.map +1 -0
  63. package/dist/tools/generation/index.js +90 -0
  64. package/dist/tools/generation/index.js.map +1 -0
  65. package/dist/tools/generation/suggest-changes.d.ts +64 -0
  66. package/dist/tools/generation/suggest-changes.d.ts.map +1 -0
  67. package/dist/tools/generation/suggest-changes.js +342 -0
  68. package/dist/tools/generation/suggest-changes.js.map +1 -0
  69. package/dist/tools/generation/validate-change.d.ts +76 -0
  70. package/dist/tools/generation/validate-change.d.ts.map +1 -0
  71. package/dist/tools/generation/validate-change.js +415 -0
  72. package/dist/tools/generation/validate-change.js.map +1 -0
  73. package/dist/tools/registry.d.ts +5 -1
  74. package/dist/tools/registry.d.ts.map +1 -1
  75. package/dist/tools/registry.js +12 -0
  76. package/dist/tools/registry.js.map +1 -1
  77. package/package.json +3 -3
@@ -0,0 +1,220 @@
1
+ /**
2
+ * drift_error_handling - Error Handling Analysis
3
+ *
4
+ * Analysis tool for error handling patterns, boundaries, and gaps.
5
+ * Detects unhandled error paths and swallowed exceptions.
6
+ */
7
+ import * as fs from 'node:fs/promises';
8
+ import * as path from 'node:path';
9
+ import { createErrorHandlingAnalyzer, createCallGraphAnalyzer, } from 'driftdetect-core';
10
+ import { createResponseBuilder, Errors } from '../../infrastructure/index.js';
11
+ // ============================================================================
12
+ // Constants
13
+ // ============================================================================
14
+ const DRIFT_DIR = '.drift';
15
+ const ERROR_HANDLING_DIR = 'error-handling';
16
+ // ============================================================================
17
+ // Handler
18
+ // ============================================================================
19
+ export async function handleErrorHandling(projectRoot, args) {
20
+ const { action } = args;
21
+ switch (action) {
22
+ case 'status':
23
+ return handleStatus(projectRoot);
24
+ case 'gaps':
25
+ return handleGaps(projectRoot, args.limit, args.minSeverity);
26
+ case 'boundaries':
27
+ return handleBoundaries(projectRoot);
28
+ case 'unhandled':
29
+ return handleUnhandled(projectRoot, args.minSeverity);
30
+ case 'analyze':
31
+ return handleAnalyze(projectRoot, args.function);
32
+ default:
33
+ throw Errors.invalidArgument('action', `Invalid action: ${action}. Valid: status, gaps, boundaries, unhandled, analyze`);
34
+ }
35
+ }
36
+ // ============================================================================
37
+ // Action Handlers
38
+ // ============================================================================
39
+ async function handleStatus(projectRoot) {
40
+ const builder = createResponseBuilder();
41
+ const dataPath = path.join(projectRoot, DRIFT_DIR, ERROR_HANDLING_DIR, 'topology.json');
42
+ try {
43
+ const data = JSON.parse(await fs.readFile(dataPath, 'utf-8'));
44
+ const { summary, metrics, topology } = data;
45
+ let summaryText = `🛡️ ${summary.totalFunctions} functions. `;
46
+ summaryText += `Coverage: ${summary.coveragePercent}%. `;
47
+ summaryText += `Quality: ${summary.avgQuality}/100. `;
48
+ summaryText += `${summary.unhandledPaths} unhandled paths.`;
49
+ const warnings = [];
50
+ if (summary.criticalUnhandled > 0) {
51
+ warnings.push(`${summary.criticalUnhandled} critical unhandled error paths`);
52
+ }
53
+ if (metrics.swallowedErrorCount > 0) {
54
+ warnings.push(`${metrics.swallowedErrorCount} swallowed errors`);
55
+ }
56
+ const hints = {
57
+ nextActions: summary.unhandledPaths > 0
58
+ ? ['Run drift_error_handling action="gaps" to see specific issues']
59
+ : ['Error handling looks good'],
60
+ warnings: warnings.length > 0 ? warnings : undefined,
61
+ relatedTools: ['drift_error_handling action="gaps"', 'drift_error_handling action="boundaries"'],
62
+ };
63
+ return builder
64
+ .withSummary(summaryText)
65
+ .withData({ summary, metrics, generatedAt: topology.generatedAt })
66
+ .withHints(hints)
67
+ .buildContent();
68
+ }
69
+ catch {
70
+ throw Errors.custom('NO_ERROR_HANDLING_DATA', 'No error handling analysis found. Build it first using the CLI: drift error-handling build', ['drift error-handling build']);
71
+ }
72
+ }
73
+ async function handleGaps(projectRoot, limit, minSeverity) {
74
+ const builder = createResponseBuilder();
75
+ const analyzer = await buildAnalyzer(projectRoot);
76
+ const gaps = analyzer.getGaps({
77
+ limit: limit ?? 20,
78
+ minSeverity: minSeverity ?? 'medium',
79
+ includeSuggestions: true,
80
+ });
81
+ const bySeverity = {
82
+ critical: 0,
83
+ high: 0,
84
+ medium: 0,
85
+ low: 0,
86
+ };
87
+ for (const gap of gaps) {
88
+ bySeverity[gap.severity]++;
89
+ }
90
+ let summaryText = `🔍 ${gaps.length} error handling gaps. `;
91
+ if (bySeverity.critical > 0)
92
+ summaryText += `🔴 ${bySeverity.critical} critical. `;
93
+ if (bySeverity.high > 0)
94
+ summaryText += `🟡 ${bySeverity.high} high. `;
95
+ const hints = {
96
+ nextActions: gaps.length > 0
97
+ ? [`Fix: ${gaps[0]?.suggestion ?? 'Add error handling'}`]
98
+ : ['No gaps found - good error handling!'],
99
+ relatedTools: ['drift_error_handling action="analyze"'],
100
+ };
101
+ return builder
102
+ .withSummary(summaryText)
103
+ .withData({ gaps, total: gaps.length, bySeverity })
104
+ .withHints(hints)
105
+ .buildContent();
106
+ }
107
+ async function handleBoundaries(projectRoot) {
108
+ const builder = createResponseBuilder();
109
+ const dataPath = path.join(projectRoot, DRIFT_DIR, ERROR_HANDLING_DIR, 'topology.json');
110
+ try {
111
+ const data = JSON.parse(await fs.readFile(dataPath, 'utf-8'));
112
+ const boundaries = data.topology.boundaries;
113
+ const frameworkBoundaries = boundaries.filter(b => b.isFrameworkBoundary).length;
114
+ let summaryText = `🛡️ ${boundaries.length} error boundaries. `;
115
+ summaryText += `${frameworkBoundaries} framework boundaries.`;
116
+ const hints = {
117
+ nextActions: boundaries.length === 0
118
+ ? ['Consider adding error boundaries to protect critical paths']
119
+ : ['Review boundary coverage'],
120
+ relatedTools: ['drift_error_handling action="unhandled"'],
121
+ };
122
+ return builder
123
+ .withSummary(summaryText)
124
+ .withData({ boundaries, total: boundaries.length, frameworkBoundaries })
125
+ .withHints(hints)
126
+ .buildContent();
127
+ }
128
+ catch {
129
+ throw Errors.custom('NO_ERROR_HANDLING_DATA', 'No error handling analysis found. Build it first.', ['drift error-handling build']);
130
+ }
131
+ }
132
+ async function handleUnhandled(projectRoot, minSeverity) {
133
+ const builder = createResponseBuilder();
134
+ const dataPath = path.join(projectRoot, DRIFT_DIR, ERROR_HANDLING_DIR, 'topology.json');
135
+ try {
136
+ const data = JSON.parse(await fs.readFile(dataPath, 'utf-8'));
137
+ let paths = data.topology.unhandledPaths;
138
+ // Filter by severity
139
+ if (minSeverity) {
140
+ const severityOrder = { critical: 0, high: 1, medium: 2, low: 3 };
141
+ const minOrder = severityOrder[minSeverity];
142
+ paths = paths.filter(p => severityOrder[p.severity] <= minOrder);
143
+ }
144
+ const bySeverity = {
145
+ critical: 0,
146
+ high: 0,
147
+ medium: 0,
148
+ low: 0,
149
+ };
150
+ for (const p of paths) {
151
+ bySeverity[p.severity]++;
152
+ }
153
+ let summaryText = `⚠️ ${paths.length} unhandled error paths. `;
154
+ if (bySeverity.critical > 0)
155
+ summaryText += `🔴 ${bySeverity.critical} critical. `;
156
+ if (bySeverity.high > 0)
157
+ summaryText += `🟡 ${bySeverity.high} high.`;
158
+ const hints = {
159
+ nextActions: paths.length > 0
160
+ ? [`Add error boundary at: ${paths[0]?.suggestedBoundary ?? 'entry point'}`]
161
+ : ['All error paths are handled!'],
162
+ warnings: bySeverity.critical > 0
163
+ ? ['Critical unhandled paths can cause application crashes']
164
+ : undefined,
165
+ relatedTools: ['drift_error_handling action="boundaries"'],
166
+ };
167
+ return builder
168
+ .withSummary(summaryText)
169
+ .withData({ paths, total: paths.length, bySeverity })
170
+ .withHints(hints)
171
+ .buildContent();
172
+ }
173
+ catch {
174
+ throw Errors.custom('NO_ERROR_HANDLING_DATA', 'No error handling analysis found. Build it first.', ['drift error-handling build']);
175
+ }
176
+ }
177
+ async function handleAnalyze(projectRoot, funcPath) {
178
+ const builder = createResponseBuilder();
179
+ if (!funcPath) {
180
+ throw Errors.missingParameter('function');
181
+ }
182
+ const analyzer = await buildAnalyzer(projectRoot);
183
+ const analysis = analyzer.getFunctionAnalysis(funcPath);
184
+ if (!analysis) {
185
+ throw Errors.custom('FUNCTION_NOT_FOUND', `Function not found: ${funcPath}`, ['Check the function path']);
186
+ }
187
+ const { profile, issues } = analysis;
188
+ let summaryText = `🔍 ${funcPath}: `;
189
+ summaryText += profile.hasTryCatch ? 'Has error handling. ' : 'No error handling. ';
190
+ summaryText += `Quality: ${profile.qualityScore}/100. `;
191
+ summaryText += `${issues.length} issues.`;
192
+ const hints = {
193
+ nextActions: analysis.suggestions,
194
+ warnings: issues.length > 0
195
+ ? issues.map(i => i.message)
196
+ : undefined,
197
+ relatedTools: ['drift_error_handling action="gaps"'],
198
+ };
199
+ return builder
200
+ .withSummary(summaryText)
201
+ .withData({ function: funcPath, analysis })
202
+ .withHints(hints)
203
+ .buildContent();
204
+ }
205
+ // ============================================================================
206
+ // Helpers
207
+ // ============================================================================
208
+ async function buildAnalyzer(projectRoot) {
209
+ const callGraphAnalyzer = createCallGraphAnalyzer({ rootDir: projectRoot });
210
+ await callGraphAnalyzer.initialize();
211
+ const callGraph = callGraphAnalyzer.getGraph();
212
+ if (!callGraph) {
213
+ throw Errors.custom('NO_CALL_GRAPH', 'Call graph required for error handling analysis', ['drift callgraph build']);
214
+ }
215
+ const analyzer = createErrorHandlingAnalyzer({ rootDir: projectRoot });
216
+ analyzer.setCallGraph(callGraph);
217
+ analyzer.build();
218
+ return analyzer;
219
+ }
220
+ //# sourceMappingURL=error-handling.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-handling.js","sourceRoot":"","sources":["../../../src/tools/analysis/error-handling.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,GAQxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAiD9E,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,SAAS,GAAG,QAAQ,CAAC;AAC3B,MAAM,kBAAkB,GAAG,gBAAgB,CAAC;AAE5C,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,WAAmB,EACnB,IAAuB;IAEvB,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAExB,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,YAAY,CAAC,WAAW,CAAC,CAAC;QACnC,KAAK,MAAM;YACT,O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C,MAAM,KAAK,GAAG;QACZ,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC;YACzB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YAC5B,CAAC,CAAC,SAAS;QACb,YAAY,EAAE,CAAC,oCAAoC,CAAC;KACrD,CAAC;IAEF,OAAO,OAAO;SACX,WAAW,CAAC,WAAW,CAAC;SACxB,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;SAC1C,SAAS,CAAC,KAAK,CAAC;SAChB,YAAY,EAAE,CAAC;AACpB,CAAC;AAED,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,KAAK,UAAU,aAAa,CAAC,WAAmB;IAC9C,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAC5E,MAAM,iBAAiB,CAAC,UAAU,EAAE,CAAC;IACrC,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAE/C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,MAAM,CAAC,MAAM,CACjB,eAAe,EACf,iDAAiD,EACjD,CAAC,uBAAuB,CAAC,CAC1B,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,2BAA2B,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IACvE,QAAQ,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAEjB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Analysis Tools Index
3
+ *
4
+ * Tools for deeper analysis of codebase patterns and quality.
5
+ */
6
+ import type { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ export declare const ANALYSIS_TOOLS: Tool[];
8
+ export { handleTestTopology, type TestTopologyArgs, type TestTopologyAction } from './test-topology.js';
9
+ export { handleCoupling, type CouplingArgs, type CouplingAction } from './coupling.js';
10
+ export { handleErrorHandling, type ErrorHandlingArgs, type ErrorHandlingAction } from './error-handling.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/analysis/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAM/D,eAAO,MAAM,cAAc,EAAE,IAAI,EAkGhC,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxG,OAAO,EAAE,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Analysis Tools Index
3
+ *
4
+ * Tools for deeper analysis of codebase patterns and quality.
5
+ */
6
+ const TEST_TOPOLOGY_ACTIONS = ['status', 'coverage', 'uncovered', 'mocks', 'affected', 'quality'];
7
+ const COUPLING_ACTIONS = ['status', 'cycles', 'hotspots', 'analyze', 'refactor-impact', 'unused-exports'];
8
+ const ERROR_HANDLING_ACTIONS = ['status', 'gaps', 'boundaries', 'unhandled', 'analyze'];
9
+ export const ANALYSIS_TOOLS = [
10
+ {
11
+ name: 'drift_test_topology',
12
+ description: 'Analyze test-to-code mappings, mock patterns, and test quality. Actions: status (overview), coverage (file coverage), uncovered (find gaps), mocks (mock analysis), affected (minimum test set), quality (test quality metrics).',
13
+ inputSchema: {
14
+ type: 'object',
15
+ properties: {
16
+ action: {
17
+ type: 'string',
18
+ enum: TEST_TOPOLOGY_ACTIONS,
19
+ description: 'Action to perform: status, coverage, uncovered, mocks, affected, quality',
20
+ },
21
+ file: {
22
+ type: 'string',
23
+ description: 'File path for coverage/quality actions',
24
+ },
25
+ files: {
26
+ type: 'array',
27
+ items: { type: 'string' },
28
+ description: 'Changed files for affected action',
29
+ },
30
+ limit: {
31
+ type: 'number',
32
+ description: 'Max results for uncovered action (default: 20)',
33
+ },
34
+ minRisk: {
35
+ type: 'string',
36
+ enum: ['low', 'medium', 'high'],
37
+ description: 'Minimum risk level for uncovered action (default: medium)',
38
+ },
39
+ },
40
+ required: ['action'],
41
+ },
42
+ },
43
+ {
44
+ name: 'drift_coupling',
45
+ description: 'Analyze module dependencies, detect cycles, and calculate coupling metrics (Robert C. Martin metrics). Actions: status (overview), cycles (dependency cycles), hotspots (highly coupled modules), analyze (specific module), refactor-impact (change impact), unused-exports (dead exports).',
46
+ inputSchema: {
47
+ type: 'object',
48
+ properties: {
49
+ action: {
50
+ type: 'string',
51
+ enum: COUPLING_ACTIONS,
52
+ description: 'Action to perform: status, cycles, hotspots, analyze, refactor-impact, unused-exports',
53
+ },
54
+ module: {
55
+ type: 'string',
56
+ description: 'Module path for analyze/refactor-impact actions',
57
+ },
58
+ limit: {
59
+ type: 'number',
60
+ description: 'Max results for hotspots/unused-exports (default: 15/20)',
61
+ },
62
+ minCoupling: {
63
+ type: 'number',
64
+ description: 'Minimum coupling threshold for hotspots (default: 3)',
65
+ },
66
+ maxCycleLength: {
67
+ type: 'number',
68
+ description: 'Maximum cycle length to report (default: 10)',
69
+ },
70
+ minSeverity: {
71
+ type: 'string',
72
+ enum: ['info', 'warning', 'critical'],
73
+ description: 'Minimum severity for cycles (default: info)',
74
+ },
75
+ },
76
+ required: ['action'],
77
+ },
78
+ },
79
+ {
80
+ name: 'drift_error_handling',
81
+ description: 'Analyze error handling patterns, boundaries, and gaps. Detects unhandled error paths and swallowed exceptions. Actions: status (overview), gaps (find issues), boundaries (error boundaries), unhandled (unhandled paths), analyze (specific function).',
82
+ inputSchema: {
83
+ type: 'object',
84
+ properties: {
85
+ action: {
86
+ type: 'string',
87
+ enum: ERROR_HANDLING_ACTIONS,
88
+ description: 'Action to perform: status, gaps, boundaries, unhandled, analyze',
89
+ },
90
+ function: {
91
+ type: 'string',
92
+ description: 'Function path for analyze action',
93
+ },
94
+ limit: {
95
+ type: 'number',
96
+ description: 'Max results for gaps action (default: 20)',
97
+ },
98
+ minSeverity: {
99
+ type: 'string',
100
+ enum: ['low', 'medium', 'high', 'critical'],
101
+ description: 'Minimum severity for gaps/unhandled (default: medium)',
102
+ },
103
+ },
104
+ required: ['action'],
105
+ },
106
+ },
107
+ ];
108
+ export { handleTestTopology } from './test-topology.js';
109
+ export { handleCoupling } from './coupling.js';
110
+ export { handleErrorHandling } from './error-handling.js';
111
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/analysis/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAClG,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC;AAC1G,MAAM,sBAAsB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAExF,MAAM,CAAC,MAAM,cAAc,GAAW;IACpC;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,kOAAkO;QAC/O,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,qBAAqB;oBAC3B,WAAW,EAAE,0EAA0E;iBACxF;gBACD,IAAI,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EAAE,yPAAyP;QACtQ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,sBAAsB;oBAC5B,WAAW,EAAE,iEAAiE;iBAC/E;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kCAAkC;iBAChD;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2CAA2C;iBACzD;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC;oBAC3C,WAAW,EAAE,uDAAuD;iBACrE;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;CACF,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAkD,MAAM,oBAAoB,CAAC;AACxG,OAAO,EAAE,cAAc,EAA0C,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,mBAAmB,EAAoD,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * drift_test_topology - Test Topology Analysis
3
+ *
4
+ * Analysis tool for test-to-code mappings, mock patterns, and test quality.
5
+ * Answers: "Which tests cover this code?" and "What's the minimum test set?"
6
+ */
7
+ import { type TestTopologySummary, type MockAnalysis, type MinimumTestSet, type UncoveredFunction, type TestCoverage } from 'driftdetect-core';
8
+ export type TestTopologyAction = 'status' | 'coverage' | 'uncovered' | 'mocks' | 'affected' | 'quality';
9
+ export interface TestTopologyArgs {
10
+ action: TestTopologyAction;
11
+ file?: string;
12
+ files?: string[];
13
+ limit?: number;
14
+ minRisk?: 'low' | 'medium' | 'high';
15
+ }
16
+ export interface TestTopologyStatusData {
17
+ summary: TestTopologySummary;
18
+ mockAnalysis: MockAnalysis;
19
+ generatedAt?: string;
20
+ }
21
+ export interface TestTopologyCoverageData {
22
+ file: string;
23
+ coverage: TestCoverage;
24
+ }
25
+ export interface TestTopologyUncoveredData {
26
+ uncovered: UncoveredFunction[];
27
+ total: number;
28
+ }
29
+ export interface TestTopologyMocksData {
30
+ analysis: MockAnalysis;
31
+ warnings: string[];
32
+ }
33
+ export interface TestTopologyAffectedData {
34
+ changedFiles: string[];
35
+ result: MinimumTestSet;
36
+ }
37
+ export declare function handleTestTopology(projectRoot: string, args: TestTopologyArgs): Promise<{
38
+ content: Array<{
39
+ type: string;
40
+ text: string;
41
+ }>;
42
+ }>;
43
+ //# sourceMappingURL=test-topology.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-topology.d.ts","sourceRoot":"","sources":["../../../src/tools/analysis/test-topology.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAO1B,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,UAAU,GACV,WAAW,GACX,OAAO,GACP,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,S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