@sfdxy/mule-lint 1.18.0 → 1.19.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/README.md +154 -150
- package/dist/bin/mule-lint-mcp.js.map +1 -1
- package/dist/bin/mule-lint.js +4 -3
- package/dist/bin/mule-lint.js.map +1 -1
- package/dist/package.json +26 -15
- package/dist/src/core/ComplexityCalculator.d.ts.map +1 -1
- package/dist/src/core/ComplexityCalculator.js.map +1 -1
- package/dist/src/core/FileScanner.d.ts.map +1 -1
- package/dist/src/core/FileScanner.js.map +1 -1
- package/dist/src/core/MetricsAggregator.d.ts.map +1 -1
- package/dist/src/core/MetricsAggregator.js.map +1 -1
- package/dist/src/core/MetricsCollector.d.ts.map +1 -1
- package/dist/src/core/MetricsCollector.js +1 -2
- package/dist/src/core/MetricsCollector.js.map +1 -1
- package/dist/src/core/QualityGateEvaluator.d.ts.map +1 -1
- package/dist/src/core/QualityGateEvaluator.js.map +1 -1
- package/dist/src/core/XPathHelper.d.ts +9 -1
- package/dist/src/core/XPathHelper.d.ts.map +1 -1
- package/dist/src/core/XPathHelper.js +4 -9
- package/dist/src/core/XPathHelper.js.map +1 -1
- package/dist/src/core/XmlParser.d.ts.map +1 -1
- package/dist/src/core/XmlParser.js.map +1 -1
- package/dist/src/core/YamlParser.d.ts.map +1 -1
- package/dist/src/core/YamlParser.js.map +1 -1
- package/dist/src/core/errors.js.map +1 -1
- package/dist/src/engine/LintEngine.d.ts.map +1 -1
- package/dist/src/engine/LintEngine.js +2 -4
- package/dist/src/engine/LintEngine.js.map +1 -1
- package/dist/src/formatter/MuleXmlFormatter.d.ts.map +1 -1
- package/dist/src/formatter/MuleXmlFormatter.js +7 -1
- package/dist/src/formatter/MuleXmlFormatter.js.map +1 -1
- package/dist/src/formatter/index.d.ts +2 -2
- package/dist/src/formatter/index.d.ts.map +1 -1
- package/dist/src/formatter/index.js.map +1 -1
- package/dist/src/formatters/CsvFormatter.js.map +1 -1
- package/dist/src/formatters/HtmlFormatter.js +0 -1
- package/dist/src/formatters/HtmlFormatter.js.map +1 -1
- package/dist/src/formatters/JsonFormatter.d.ts.map +1 -1
- package/dist/src/formatters/JsonFormatter.js.map +1 -1
- package/dist/src/formatters/SarifFormatter.js.map +1 -1
- package/dist/src/formatters/TableFormatter.js.map +1 -1
- package/dist/src/formatters/html/components/Icons.js +1 -1
- package/dist/src/formatters/html/components/Icons.js.map +1 -1
- package/dist/src/formatters/html/components/MetricCard.d.ts.map +1 -1
- package/dist/src/formatters/html/components/MetricCard.js.map +1 -1
- package/dist/src/formatters/html/components/Modal.d.ts.map +1 -1
- package/dist/src/formatters/html/components/Modal.js.map +1 -1
- package/dist/src/formatters/html/components/RatingBadge.d.ts.map +1 -1
- package/dist/src/formatters/html/components/RatingBadge.js +6 -6
- package/dist/src/formatters/html/components/RatingBadge.js.map +1 -1
- package/dist/src/formatters/html/index.d.ts +2 -2
- package/dist/src/formatters/html/index.d.ts.map +1 -1
- package/dist/src/formatters/html/index.js.map +1 -1
- package/dist/src/formatters/html/scripts/charts.d.ts.map +1 -1
- package/dist/src/formatters/html/scripts/charts.js +45 -12
- package/dist/src/formatters/html/scripts/charts.js.map +1 -1
- package/dist/src/formatters/html/scripts/index.d.ts.map +1 -1
- package/dist/src/formatters/html/scripts/index.js.map +1 -1
- package/dist/src/formatters/html/scripts/renderer.d.ts.map +1 -1
- package/dist/src/formatters/html/scripts/renderer.js +175 -35
- package/dist/src/formatters/html/scripts/renderer.js.map +1 -1
- package/dist/src/formatters/html/sections/Header.d.ts.map +1 -1
- package/dist/src/formatters/html/sections/Header.js.map +1 -1
- package/dist/src/formatters/html/sections/LintSummary.d.ts.map +1 -1
- package/dist/src/formatters/html/sections/LintSummary.js.map +1 -1
- package/dist/src/formatters/html/sections/QualityRatings.js.map +1 -1
- package/dist/src/formatters/html/sections/Sidebar.d.ts.map +1 -1
- package/dist/src/formatters/html/sections/Sidebar.js.map +1 -1
- package/dist/src/formatters/html/styles/badges.d.ts.map +1 -1
- package/dist/src/formatters/html/styles/badges.js.map +1 -1
- package/dist/src/formatters/html/styles/index.d.ts.map +1 -1
- package/dist/src/formatters/html/styles/index.js.map +1 -1
- package/dist/src/formatters/html/theme.js.map +1 -1
- package/dist/src/formatters/html/views/Dashboard.js +5 -5
- package/dist/src/formatters/html/views/Dashboard.js.map +1 -1
- package/dist/src/formatters/html/views/IssuesView.d.ts.map +1 -1
- package/dist/src/formatters/html/views/IssuesView.js.map +1 -1
- package/dist/src/formatters/index.js.map +1 -1
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +12 -511
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/prompts/index.d.ts +6 -0
- package/dist/src/mcp/prompts/index.d.ts.map +1 -0
- package/dist/src/mcp/prompts/index.js +87 -0
- package/dist/src/mcp/prompts/index.js.map +1 -0
- package/dist/src/mcp/resources/index.d.ts +6 -0
- package/dist/src/mcp/resources/index.d.ts.map +1 -0
- package/dist/src/mcp/resources/index.js +189 -0
- package/dist/src/mcp/resources/index.js.map +1 -0
- package/dist/src/mcp/tools/formatMuleXml.d.ts +6 -0
- package/dist/src/mcp/tools/formatMuleXml.d.ts.map +1 -0
- package/dist/src/mcp/tools/formatMuleXml.js +133 -0
- package/dist/src/mcp/tools/formatMuleXml.js.map +1 -0
- package/dist/src/mcp/tools/getRuleDetails.d.ts +6 -0
- package/dist/src/mcp/tools/getRuleDetails.d.ts.map +1 -0
- package/dist/src/mcp/tools/getRuleDetails.js +44 -0
- package/dist/src/mcp/tools/getRuleDetails.js.map +1 -0
- package/dist/src/mcp/tools/runLintAnalysis.d.ts +7 -0
- package/dist/src/mcp/tools/runLintAnalysis.d.ts.map +1 -0
- package/dist/src/mcp/tools/runLintAnalysis.js +76 -0
- package/dist/src/mcp/tools/runLintAnalysis.js.map +1 -0
- package/dist/src/mcp/tools/validateSnippet.d.ts +6 -0
- package/dist/src/mcp/tools/validateSnippet.d.ts.map +1 -0
- package/dist/src/mcp/tools/validateSnippet.js +59 -0
- package/dist/src/mcp/tools/validateSnippet.js.map +1 -0
- package/dist/src/quality/calculator.d.ts.map +1 -1
- package/dist/src/quality/calculator.js +1 -1
- package/dist/src/quality/calculator.js.map +1 -1
- package/dist/src/quality/index.d.ts.map +1 -1
- package/dist/src/quality/index.js.map +1 -1
- package/dist/src/quality/thresholds.js.map +1 -1
- package/dist/src/quality/types.d.ts.map +1 -1
- package/dist/src/rules/api-led/ApiLedRules.d.ts.map +1 -1
- package/dist/src/rules/api-led/ApiLedRules.js +6 -2
- package/dist/src/rules/api-led/ApiLedRules.js.map +1 -1
- package/dist/src/rules/api-led/SingleSystemSapiRule.d.ts.map +1 -1
- package/dist/src/rules/api-led/SingleSystemSapiRule.js.map +1 -1
- package/dist/src/rules/base/BaseRule.d.ts.map +1 -1
- package/dist/src/rules/base/BaseRule.js.map +1 -1
- package/dist/src/rules/base/ProjectRule.d.ts.map +1 -1
- package/dist/src/rules/base/ProjectRule.js.map +1 -1
- package/dist/src/rules/complexity/FlowComplexityRule.d.ts.map +1 -1
- package/dist/src/rules/complexity/FlowComplexityRule.js.map +1 -1
- package/dist/src/rules/dataweave/DataWeaveRules.d.ts.map +1 -1
- package/dist/src/rules/dataweave/DataWeaveRules.js +1 -3
- package/dist/src/rules/dataweave/DataWeaveRules.js.map +1 -1
- package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.d.ts.map +1 -1
- package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.js.map +1 -1
- package/dist/src/rules/documentation/DisplayNameRule.d.ts.map +1 -1
- package/dist/src/rules/documentation/DisplayNameRule.js.map +1 -1
- package/dist/src/rules/documentation/FlowDescriptionRule.d.ts.map +1 -1
- package/dist/src/rules/documentation/FlowDescriptionRule.js.map +1 -1
- package/dist/src/rules/documentation/MissingDocNameRule.d.ts.map +1 -1
- package/dist/src/rules/documentation/MissingDocNameRule.js.map +1 -1
- package/dist/src/rules/error-handling/CorrelationIdRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/CorrelationIdRule.js.map +1 -1
- package/dist/src/rules/error-handling/GenericErrorRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/GenericErrorRule.js.map +1 -1
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js.map +1 -1
- package/dist/src/rules/error-handling/HttpStatusRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/HttpStatusRule.js.map +1 -1
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.js.map +1 -1
- package/dist/src/rules/error-handling/TryScopeRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/TryScopeRule.js.map +1 -1
- package/dist/src/rules/experimental/ExperimentalRules.d.ts.map +1 -1
- package/dist/src/rules/experimental/ExperimentalRules.js +6 -2
- package/dist/src/rules/experimental/ExperimentalRules.js.map +1 -1
- package/dist/src/rules/governance/GovernanceRules.d.ts +2 -2
- package/dist/src/rules/governance/GovernanceRules.d.ts.map +1 -1
- package/dist/src/rules/governance/GovernanceRules.js +2 -2
- package/dist/src/rules/governance/GovernanceRules.js.map +1 -1
- package/dist/src/rules/http/HttpContentTypeRule.d.ts.map +1 -1
- package/dist/src/rules/http/HttpContentTypeRule.js.map +1 -1
- package/dist/src/rules/http/HttpTimeoutRule.d.ts.map +1 -1
- package/dist/src/rules/http/HttpTimeoutRule.js.map +1 -1
- package/dist/src/rules/http/HttpUserAgentRule.d.ts.map +1 -1
- package/dist/src/rules/http/HttpUserAgentRule.js.map +1 -1
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/logging/ExcessiveLoggersRule.d.ts.map +1 -1
- package/dist/src/rules/logging/ExcessiveLoggersRule.js.map +1 -1
- package/dist/src/rules/logging/LoggerCategoryRule.d.ts.map +1 -1
- package/dist/src/rules/logging/LoggerCategoryRule.js.map +1 -1
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.d.ts.map +1 -1
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.js.map +1 -1
- package/dist/src/rules/logging/LoggerPayloadRule.d.ts.map +1 -1
- package/dist/src/rules/logging/LoggerPayloadRule.js.map +1 -1
- package/dist/src/rules/logging/NewLoggingRules.d.ts.map +1 -1
- package/dist/src/rules/logging/NewLoggingRules.js.map +1 -1
- package/dist/src/rules/naming/FlowCasingRule.d.ts.map +1 -1
- package/dist/src/rules/naming/FlowCasingRule.js.map +1 -1
- package/dist/src/rules/naming/FlowNamingRule.d.ts.map +1 -1
- package/dist/src/rules/naming/FlowNamingRule.js +3 -1
- package/dist/src/rules/naming/FlowNamingRule.js.map +1 -1
- package/dist/src/rules/naming/VariableNamingRule.d.ts.map +1 -1
- package/dist/src/rules/naming/VariableNamingRule.js.map +1 -1
- package/dist/src/rules/operations/CommentedCodeRule.d.ts.map +1 -1
- package/dist/src/rules/operations/CommentedCodeRule.js.map +1 -1
- package/dist/src/rules/operations/UnusedFlowRule.d.ts.map +1 -1
- package/dist/src/rules/operations/UnusedFlowRule.js.map +1 -1
- package/dist/src/rules/performance/AsyncErrorHandlerRule.d.ts.map +1 -1
- package/dist/src/rules/performance/AsyncErrorHandlerRule.js.map +1 -1
- package/dist/src/rules/performance/ConnectionPoolingRule.d.ts.map +1 -1
- package/dist/src/rules/performance/ConnectionPoolingRule.js.map +1 -1
- package/dist/src/rules/performance/LargeChoiceBlockRule.d.ts.map +1 -1
- package/dist/src/rules/performance/LargeChoiceBlockRule.js.map +1 -1
- package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts.map +1 -1
- package/dist/src/rules/performance/ReconnectionStrategyRule.js.map +1 -1
- package/dist/src/rules/performance/ScatterGatherRoutesRule.d.ts.map +1 -1
- package/dist/src/rules/performance/ScatterGatherRoutesRule.js.map +1 -1
- package/dist/src/rules/security/EncryptionKeyInLogsRule.d.ts.map +1 -1
- package/dist/src/rules/security/EncryptionKeyInLogsRule.js.map +1 -1
- package/dist/src/rules/security/HardcodedCredentialsRule.d.ts.map +1 -1
- package/dist/src/rules/security/HardcodedCredentialsRule.js.map +1 -1
- package/dist/src/rules/security/HardcodedHttpRule.d.ts.map +1 -1
- package/dist/src/rules/security/HardcodedHttpRule.js +1 -9
- package/dist/src/rules/security/HardcodedHttpRule.js.map +1 -1
- package/dist/src/rules/security/InputValidationRule.d.ts.map +1 -1
- package/dist/src/rules/security/InputValidationRule.js +1 -3
- package/dist/src/rules/security/InputValidationRule.js.map +1 -1
- package/dist/src/rules/security/InsecureTlsRule.d.ts.map +1 -1
- package/dist/src/rules/security/InsecureTlsRule.js.map +1 -1
- package/dist/src/rules/security/RateLimitingRule.d.ts.map +1 -1
- package/dist/src/rules/security/RateLimitingRule.js.map +1 -1
- package/dist/src/rules/security/TlsVersionRule.d.ts.map +1 -1
- package/dist/src/rules/security/TlsVersionRule.js.map +1 -1
- package/dist/src/rules/standards/ApiKitValidationRule.d.ts.map +1 -1
- package/dist/src/rules/standards/ApiKitValidationRule.js.map +1 -1
- package/dist/src/rules/standards/AutoDiscoveryRule.d.ts.map +1 -1
- package/dist/src/rules/standards/AutoDiscoveryRule.js.map +1 -1
- package/dist/src/rules/standards/ChoiceAntiPatternRule.d.ts.map +1 -1
- package/dist/src/rules/standards/ChoiceAntiPatternRule.js.map +1 -1
- package/dist/src/rules/standards/CronExternalizedRule.d.ts.map +1 -1
- package/dist/src/rules/standards/CronExternalizedRule.js.map +1 -1
- package/dist/src/rules/standards/DeprecatedComponentRule.d.ts.map +1 -1
- package/dist/src/rules/standards/DeprecatedComponentRule.js.map +1 -1
- package/dist/src/rules/standards/DwlStandardsRule.d.ts.map +1 -1
- package/dist/src/rules/standards/DwlStandardsRule.js.map +1 -1
- package/dist/src/rules/standards/HttpPortPlaceholderRule.d.ts.map +1 -1
- package/dist/src/rules/standards/HttpPortPlaceholderRule.js.map +1 -1
- package/dist/src/rules/structure/StructureRules.d.ts.map +1 -1
- package/dist/src/rules/structure/StructureRules.js.map +1 -1
- package/dist/src/rules/yaml/YamlRules.d.ts.map +1 -1
- package/dist/src/rules/yaml/YamlRules.js +2 -7
- package/dist/src/rules/yaml/YamlRules.js.map +1 -1
- package/dist/src/types/Config.d.ts.map +1 -1
- package/dist/src/types/Config.js.map +1 -1
- package/dist/src/types/QualityGate.d.ts.map +1 -1
- package/dist/src/types/QualityGate.js.map +1 -1
- package/dist/src/types/Report.d.ts.map +1 -1
- package/dist/src/types/Rule.d.ts +1 -1
- package/dist/src/types/Rule.d.ts.map +1 -1
- package/docs/README.md +27 -27
- package/docs/best-practices/documentation-standards.md +20 -11
- package/docs/best-practices/folder-structure.md +16 -10
- package/docs/best-practices/mulesoft-best-practices.md +96 -94
- package/docs/best-practices/rules-catalog.md +316 -287
- package/docs/linter/architecture.md +70 -64
- package/docs/linter/extending.md +137 -128
- package/docs/linter/folder-structure.md +39 -38
- package/docs/linter/naming-conventions.md +80 -78
- package/docs/linter/rule-engine.md +306 -306
- package/docs/mcp-design.md +35 -21
- package/package.json +84 -73
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerPrompts = registerPrompts;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Register all MCP prompts (analyze-project, explain-rule, fix-issue)
|
|
7
|
+
*/
|
|
8
|
+
function registerPrompts(server) {
|
|
9
|
+
registerAnalyzeProject(server);
|
|
10
|
+
registerExplainRule(server);
|
|
11
|
+
registerFixIssue(server);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Prompt: analyze-project
|
|
15
|
+
*/
|
|
16
|
+
function registerAnalyzeProject(server) {
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- MCP SDK generic type inference exceeds TS depth limits (TS2589)
|
|
18
|
+
server.registerPrompt('analyze-project', {
|
|
19
|
+
description: 'Analyze the current project for MuleSoft best practice violations and linting issues.',
|
|
20
|
+
argsSchema: {
|
|
21
|
+
path: zod_1.z.string().describe('The absolute path to the project to analyze'),
|
|
22
|
+
},
|
|
23
|
+
}, ({ path }) => {
|
|
24
|
+
return {
|
|
25
|
+
messages: [
|
|
26
|
+
{
|
|
27
|
+
role: 'user',
|
|
28
|
+
content: {
|
|
29
|
+
type: 'text',
|
|
30
|
+
text: `Please analyze the MuleSoft project at ${path}. Run the linting engine and summarize the key issues, focusing on severity:error and severity:warning. Group the findings by category (e.g., Security, Naming, Efficiency).`,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Prompt: explain-rule
|
|
39
|
+
*/
|
|
40
|
+
function registerExplainRule(server) {
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- MCP SDK generic type inference exceeds TS depth limits (TS2589)
|
|
42
|
+
server.registerPrompt('explain-rule', {
|
|
43
|
+
description: 'Explain a specific linting rule and provide examples of good vs bad code.',
|
|
44
|
+
argsSchema: {
|
|
45
|
+
ruleId: zod_1.z.string().describe('The ID of the rule to explain (e.g., MULE-001)'),
|
|
46
|
+
},
|
|
47
|
+
}, ({ ruleId }) => {
|
|
48
|
+
return {
|
|
49
|
+
messages: [
|
|
50
|
+
{
|
|
51
|
+
role: 'user',
|
|
52
|
+
content: {
|
|
53
|
+
type: 'text',
|
|
54
|
+
text: `Can you explain the MuleSoft linting rule ${ruleId}? I need to understand the rationale behind it, potential side effects of ignoring it, and see code examples of both compliant and non-compliant usage.`,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Prompt: fix-issue
|
|
63
|
+
*/
|
|
64
|
+
function registerFixIssue(server) {
|
|
65
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- MCP SDK generic type inference exceeds TS depth limits (TS2589)
|
|
66
|
+
server.registerPrompt('fix-issue', {
|
|
67
|
+
description: 'Suggest a fix for a specific linting issue in a file.',
|
|
68
|
+
argsSchema: {
|
|
69
|
+
issue: zod_1.z.string().describe('The error message or rule description'),
|
|
70
|
+
file: zod_1.z.string().describe('The file path where the issue occurred'),
|
|
71
|
+
code: zod_1.z.string().describe('The specific code snippet causing the issue'),
|
|
72
|
+
},
|
|
73
|
+
}, ({ issue, file, code }) => {
|
|
74
|
+
return {
|
|
75
|
+
messages: [
|
|
76
|
+
{
|
|
77
|
+
role: 'user',
|
|
78
|
+
content: {
|
|
79
|
+
type: 'text',
|
|
80
|
+
text: `I have a linting issue in file ${file}: "${issue}".\nThe problematic code is:\n\`\`\`xml\n${code}\n\`\`\`\nPlease analyze why this is an issue and provide a corrected version of the code that satisfies the rule.`,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/prompts/index.ts"],"names":[],"mappings":";;AAMA,0CAIC;AAVD,6BAAwB;AAGxB;;GAEG;AACH,SAAgB,eAAe,CAAC,MAAiB;IAC/C,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC/B,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC5B,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,SAAS,sBAAsB,CAAC,MAAiB;IAC/C,iIAAiI;IAChI,MAAc,CAAC,cAAc,CAC5B,iBAAiB,EACjB;QACE,WAAW,EACT,uFAAuF;QACzF,UAAU,EAAE;YACV,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;SACzE;KACF,EACD,CAAC,EAAE,IAAI,EAAoB,EAAE,E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,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,kCAAkC,IAAI,MAAM,KAAK,4CAA4C,IAAI,oHAAoH;qBAC5N;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,yCAAyC,CAAC;AAOtF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAGzD"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerResources = registerResources;
|
|
37
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
38
|
+
const errors_1 = require("../../core/errors");
|
|
39
|
+
const rules_1 = require("../../rules");
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const fs = __importStar(require("fs"));
|
|
42
|
+
/**
|
|
43
|
+
* Register all MCP resources (rules catalog, docs)
|
|
44
|
+
*/
|
|
45
|
+
function registerResources(server) {
|
|
46
|
+
registerRulesResource(server);
|
|
47
|
+
registerDocsResource(server);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resource: mule-lint://rules
|
|
51
|
+
* Comprehensive catalog of all available linting rules
|
|
52
|
+
*/
|
|
53
|
+
function registerRulesResource(server) {
|
|
54
|
+
server.registerResource('rules', 'mule-lint://rules', {
|
|
55
|
+
description: 'A comprehensive catalog of all available linting rules. Read this to discover what rules are enforceable, their severity levels, and categories (e.g., Security, Performance, DataWeave).',
|
|
56
|
+
mimeType: 'application/json',
|
|
57
|
+
}, (uri) => {
|
|
58
|
+
const rulesList = rules_1.ALL_RULES.map((r) => ({
|
|
59
|
+
id: r.id,
|
|
60
|
+
name: r.name,
|
|
61
|
+
category: r.category,
|
|
62
|
+
severity: r.severity,
|
|
63
|
+
issueType: r.issueType ?? 'code-smell',
|
|
64
|
+
description: r.description,
|
|
65
|
+
}));
|
|
66
|
+
return {
|
|
67
|
+
contents: [
|
|
68
|
+
{
|
|
69
|
+
uri: uri.href,
|
|
70
|
+
text: JSON.stringify(rulesList, null, 2),
|
|
71
|
+
mimeType: 'application/json',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Resource: mule-lint://docs/{slug}
|
|
79
|
+
* Access official MuleSoft development best practices documentation
|
|
80
|
+
*/
|
|
81
|
+
function registerDocsResource(server) {
|
|
82
|
+
server.registerResource('docs', new mcp_js_1.ResourceTemplate('mule-lint://docs/{slug}', {
|
|
83
|
+
list: () => {
|
|
84
|
+
return {
|
|
85
|
+
resources: [
|
|
86
|
+
{
|
|
87
|
+
uri: 'mule-lint://docs/architecture',
|
|
88
|
+
name: 'Architecture',
|
|
89
|
+
mimeType: 'text/markdown',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
uri: 'mule-lint://docs/best-practices',
|
|
93
|
+
name: 'Best Practices',
|
|
94
|
+
mimeType: 'text/markdown',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
uri: 'mule-lint://docs/documentation-standards',
|
|
98
|
+
name: 'Documentation Standards',
|
|
99
|
+
mimeType: 'text/markdown',
|
|
100
|
+
},
|
|
101
|
+
{ uri: 'mule-lint://docs/extending', name: 'Extending', mimeType: 'text/markdown' },
|
|
102
|
+
{
|
|
103
|
+
uri: 'mule-lint://docs/folder-structure',
|
|
104
|
+
name: 'Folder Structure',
|
|
105
|
+
mimeType: 'text/markdown',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
uri: 'mule-lint://docs/naming',
|
|
109
|
+
name: 'Naming Conventions',
|
|
110
|
+
mimeType: 'text/markdown',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
uri: 'mule-lint://docs/rules-catalog',
|
|
114
|
+
name: 'Rules Catalog',
|
|
115
|
+
mimeType: 'text/markdown',
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
}), {
|
|
121
|
+
description: 'Access the official MuleSoft development best practices and internal documentation. Read these documents to ensure your generated code aligns with our architectural standards, naming conventions, and project structure.',
|
|
122
|
+
mimeType: 'text/markdown',
|
|
123
|
+
}, (uri, variables) => {
|
|
124
|
+
const slug = variables.slug;
|
|
125
|
+
const docsMap = {
|
|
126
|
+
architecture: 'docs/linter/architecture.md',
|
|
127
|
+
'best-practices': 'docs/best-practices/mulesoft-best-practices.md',
|
|
128
|
+
'documentation-standards': 'docs/best-practices/documentation-standards.md',
|
|
129
|
+
extending: 'docs/linter/extending.md',
|
|
130
|
+
'folder-structure': 'docs/best-practices/folder-structure.md',
|
|
131
|
+
naming: 'docs/linter/naming-conventions.md',
|
|
132
|
+
'rules-catalog': 'docs/best-practices/rules-catalog.md',
|
|
133
|
+
};
|
|
134
|
+
const relativePath = docsMap[slug];
|
|
135
|
+
if (!relativePath) {
|
|
136
|
+
return {
|
|
137
|
+
contents: [
|
|
138
|
+
{
|
|
139
|
+
uri: uri.href,
|
|
140
|
+
text: `Document not found: ${slug}. Available: ${Object.keys(docsMap).join(', ')}`,
|
|
141
|
+
mimeType: 'text/plain',
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
try {
|
|
147
|
+
// Try relative to CWD first (local dev), then relative to package root
|
|
148
|
+
let docPath = path.resolve(process.cwd(), relativePath);
|
|
149
|
+
if (!fs.existsSync(docPath)) {
|
|
150
|
+
docPath = path.resolve(__dirname, '../../../', relativePath);
|
|
151
|
+
}
|
|
152
|
+
if (fs.existsSync(docPath)) {
|
|
153
|
+
const content = fs.readFileSync(docPath, 'utf-8');
|
|
154
|
+
return {
|
|
155
|
+
contents: [
|
|
156
|
+
{
|
|
157
|
+
uri: uri.href,
|
|
158
|
+
text: content,
|
|
159
|
+
mimeType: 'text/markdown',
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
return {
|
|
166
|
+
contents: [
|
|
167
|
+
{
|
|
168
|
+
uri: uri.href,
|
|
169
|
+
text: `Document file not found at: ${docPath}`,
|
|
170
|
+
mimeType: 'text/plain',
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
return {
|
|
178
|
+
contents: [
|
|
179
|
+
{
|
|
180
|
+
uri: uri.href,
|
|
181
|
+
text: `Error reading document: ${(0, errors_1.getErrorMessage)(error)}`,
|
|
182
|
+
mimeType: 'text/plain',
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/resources/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,8CAGC;AAbD,oEAAsF;AAEtF,8CAAoD;AACpD,uCAAwC;AACxC,2CAA6B;AAC7B,uCAAyB;AAEzB;;GAEG;AACH,SAAgB,iBAAiB,CAAC,MAAiB;IACjD,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAC9B,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,MAAiB;IAC9C,MAAM,CAAC,gBAAgB,CACrB,OAAO,EACP,mBAAmB,EACnB;QACE,WAAW,EACT,2LAA2L;QAC7L,QAAQ,EAAE,kBAAkB;KAC7B,EACD,CAAC,GAAG,EAAE,EAAE;QACN,MAAM,SAAS,GAAG,iBAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YACtC,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,QAAQ,EAA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oBACL,QAAQ,EAAE;wBACR;4BACE,GAAG,EAAE,GAAG,CAAC,IAAI;4BACb,IAAI,EAAE,OAAO;4BACb,QAAQ,EAAE,eAAe;yBAC1B;qBACF;iBACF,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO;oBACL,QAAQ,EAAE;wBACR;4BACE,GAAG,EAAE,GAAG,CAAC,IAAI;4BACb,IAAI,EAAE,+BAA+B,OAAO,EAAE;4BAC9C,QAAQ,EAAE,YAAY;yBACvB;qBACF;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,QAAQ,EAAE;oBACR;wBACE,GAAG,EAAE,GAAG,CAAC,IAAI;wBACb,IAAI,EAAE,2BAA2B,IAAA,wBAAe,EAAC,KAAK,CAAC,EAAE;wBACzD,QAAQ,EAAE,YAAY;qBACvB;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatMuleXml.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/formatMuleXml.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwH7D"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.registerFormatMuleXml = registerFormatMuleXml;
|
|
37
|
+
const zod_1 = require("zod");
|
|
38
|
+
const errors_1 = require("../../core/errors");
|
|
39
|
+
/**
|
|
40
|
+
* Register the format_mule_xml tool on the MCP server
|
|
41
|
+
*/
|
|
42
|
+
function registerFormatMuleXml(server) {
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- MCP SDK generic type inference exceeds TS depth limits (TS2589)
|
|
44
|
+
server.tool('format_mule_xml', 'Format Mule XML files using Prettier with Anypoint Studio-compatible defaults (4-space indent, 140 width, single-quote safe). Accepts a project path to format all XML files, a single file path, or raw XML content for inline formatting.', {
|
|
45
|
+
projectPath: zod_1.z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Absolute path to a MuleSoft project directory — formats all XML in src/main/mule/'),
|
|
49
|
+
filePath: zod_1.z.string().optional().describe('Absolute path to a single Mule XML file to format'),
|
|
50
|
+
content: zod_1.z
|
|
51
|
+
.string()
|
|
52
|
+
.optional()
|
|
53
|
+
.describe('Raw XML string to format inline (returns formatted text)'),
|
|
54
|
+
check: zod_1.z
|
|
55
|
+
.boolean()
|
|
56
|
+
.optional()
|
|
57
|
+
.describe('Dry-run mode: report which files need formatting without writing changes'),
|
|
58
|
+
tabWidth: zod_1.z.number().optional().describe('Spaces per indent level (default: 4)'),
|
|
59
|
+
printWidth: zod_1.z.number().optional().describe('Max line width before wrapping (default: 140)'),
|
|
60
|
+
}, async ({ projectPath, filePath: singleFilePath, content, check, tabWidth, printWidth, }) => {
|
|
61
|
+
try {
|
|
62
|
+
const { formatXmlContent, formatFile, formatProject } = await Promise.resolve().then(() => __importStar(require('../../formatter/MuleXmlFormatter')));
|
|
63
|
+
const options = { check, tabWidth, printWidth };
|
|
64
|
+
// Mode 1: Inline content formatting
|
|
65
|
+
if (content) {
|
|
66
|
+
const result = await formatXmlContent(content, options);
|
|
67
|
+
return {
|
|
68
|
+
content: [
|
|
69
|
+
{
|
|
70
|
+
type: 'text',
|
|
71
|
+
text: JSON.stringify({
|
|
72
|
+
formatted: result.formatted,
|
|
73
|
+
changed: result.changed,
|
|
74
|
+
}, null, 2),
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
// Mode 2: Single file
|
|
80
|
+
if (singleFilePath) {
|
|
81
|
+
const result = await formatFile(singleFilePath, options);
|
|
82
|
+
return {
|
|
83
|
+
content: [
|
|
84
|
+
{
|
|
85
|
+
type: 'text',
|
|
86
|
+
text: JSON.stringify(result, null, 2),
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// Mode 3: Project
|
|
92
|
+
if (projectPath) {
|
|
93
|
+
const results = await formatProject(projectPath, options);
|
|
94
|
+
const summary = {
|
|
95
|
+
totalFiles: results.length,
|
|
96
|
+
changed: results.filter((r) => r.changed).length,
|
|
97
|
+
errors: results.filter((r) => r.error).length,
|
|
98
|
+
files: results,
|
|
99
|
+
};
|
|
100
|
+
return {
|
|
101
|
+
content: [
|
|
102
|
+
{
|
|
103
|
+
type: 'text',
|
|
104
|
+
text: JSON.stringify(summary, null, 2),
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
content: [
|
|
111
|
+
{
|
|
112
|
+
type: 'text',
|
|
113
|
+
text: 'Provide one of: projectPath, filePath, or content',
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
isError: true,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
const errorMessage = (0, errors_1.getErrorMessage)(error);
|
|
121
|
+
return {
|
|
122
|
+
content: [
|
|
123
|
+
{
|
|
124
|
+
type: 'text',
|
|
125
|
+
text: `Formatting failed: ${errorMessage}`,
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
isError: true,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=formatMuleXml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatMuleXml.js","sourceRoot":"","sources":["../../../../src/mcp/tools/formatMuleXml.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,sDAwHC;AAhID,6BAAwB;AAGxB,8CAAoD;AAEpD;;GAEG;AACH,SAAgB,qBAAqB,CAAC,MAAiB;IACrD,iIAAiI;IAChI,MAAc,CAAC,IAAI,CAClB,iBAAiB,EACjB,6OAA6O,EAC7O;QACE,WAAW,EAAE,OAAC;aACX,MAAM,EAAE;aACR,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,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRuleDetails.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/getRuleDetails.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA4C9D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerGetRuleDetails = registerGetRuleDetails;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const rules_1 = require("../../rules");
|
|
6
|
+
/**
|
|
7
|
+
* Register the get_rule_details tool on the MCP server
|
|
8
|
+
*/
|
|
9
|
+
function registerGetRuleDetails(server) {
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- MCP SDK generic type inference exceeds TS depth limits (TS2589)
|
|
11
|
+
server.tool('get_rule_details', 'Retrieve detailed documentation for a specific linting rule ID (e.g., MULE-001). Use this to understand WHY a rule failed and HOW to fix it properly according to best practices.', {
|
|
12
|
+
ruleId: zod_1.z.string().describe('The ID of the rule to retrieve (e.g., "MULE-001", "DW-004")'),
|
|
13
|
+
}, ({ ruleId }) => {
|
|
14
|
+
const rule = (0, rules_1.getRuleById)(ruleId);
|
|
15
|
+
if (!rule) {
|
|
16
|
+
return {
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: 'text',
|
|
20
|
+
text: `Rule not found: ${ruleId}`,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
isError: true,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
content: [
|
|
28
|
+
{
|
|
29
|
+
type: 'text',
|
|
30
|
+
text: JSON.stringify({
|
|
31
|
+
id: rule.id,
|
|
32
|
+
name: rule.name,
|
|
33
|
+
description: rule.description,
|
|
34
|
+
category: rule.category,
|
|
35
|
+
severity: rule.severity,
|
|
36
|
+
issueType: rule.issueType ?? 'code-smell',
|
|
37
|
+
docsUrl: rule.docsUrl,
|
|
38
|
+
}, null, 2),
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=getRuleDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getRuleDetails.js","sourceRoot":"","sources":["../../../../src/mcp/tools/getRuleDetails.ts"],"names":[],"mappings":";;AAQA,wDA4CC;AApDD,6BAAwB;AAGxB,uCAA0C;AAE1C;;GAEG;AACH,SAAgB,sBAAsB,CAAC,MAAiB;IACtD,iIAAiI;IAChI,MAAc,CAAC,IAAI,CAClB,kBAAkB,EAClB,mLAAmL,EACnL;QACE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6DAA6D,CAAC;KAC3F,EACD,CAAC,EAAE,MAAM,EAAsB,EAAE,EAAE;QACjC,MAAM,IAAI,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,mBAAmB,MAAM,EAAE;qBAClC;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,WAAW,EAAE,IAAI,CAAC,WAAW;wBAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,YAAY;wBACzC,OAAO,EAAE,IAAI,CAAC,OAAO;qBACtB,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { LintEngine } from '../../engine/LintEngine';
|
|
3
|
+
/**
|
|
4
|
+
* Register the run_lint_analysis tool on the MCP server
|
|
5
|
+
*/
|
|
6
|
+
export declare function registerRunLintAnalysis(server: McpServer, engine: LintEngine): void;
|
|
7
|
+
//# sourceMappingURL=runLintAnalysis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runLintAnalysis.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tools/runLintAnalysis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,CAwEnF"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerRunLintAnalysis = registerRunLintAnalysis;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const errors_1 = require("../../core/errors");
|
|
6
|
+
const rules_1 = require("../../rules");
|
|
7
|
+
/**
|
|
8
|
+
* Register the run_lint_analysis tool on the MCP server
|
|
9
|
+
*/
|
|
10
|
+
function registerRunLintAnalysis(server, engine) {
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- MCP SDK generic type inference exceeds TS depth limits (TS2589)
|
|
12
|
+
server.tool('run_lint_analysis', 'USE THIS TOOL FIRST to analyze a MuleSoft project. It scans the codebase for best practice violations, security issues (secure:: properties), and potential runtime errors. Returns a comprehensive report needed to identify what needs fixing.', {
|
|
13
|
+
projectPath: zod_1.z.string().describe('Absolute path to the MuleSoft project directory to scan'),
|
|
14
|
+
}, async ({ projectPath }) => {
|
|
15
|
+
try {
|
|
16
|
+
const report = await engine.scan(projectPath);
|
|
17
|
+
const summary = {
|
|
18
|
+
totalFiles: report.summary.totalFiles,
|
|
19
|
+
totalIssues: report.summary.bySeverity.error +
|
|
20
|
+
report.summary.bySeverity.warning +
|
|
21
|
+
report.summary.bySeverity.info,
|
|
22
|
+
errors: report.summary.bySeverity.error,
|
|
23
|
+
warnings: report.summary.bySeverity.warning,
|
|
24
|
+
// Include quality metrics if available
|
|
25
|
+
qualityMetrics: report.metrics
|
|
26
|
+
? {
|
|
27
|
+
complexity: report.metrics.complexity,
|
|
28
|
+
maintainability: report.metrics.maintainability,
|
|
29
|
+
reliability: report.metrics.reliability,
|
|
30
|
+
security: report.metrics.security,
|
|
31
|
+
}
|
|
32
|
+
: undefined,
|
|
33
|
+
issues: report.files
|
|
34
|
+
.map((r) => ({
|
|
35
|
+
file: r.relativePath,
|
|
36
|
+
issues: r.issues.map((i) => {
|
|
37
|
+
// Get issueType from rule metadata
|
|
38
|
+
const rule = (0, rules_1.getRuleById)(i.ruleId);
|
|
39
|
+
return {
|
|
40
|
+
ruleId: i.ruleId,
|
|
41
|
+
message: i.message,
|
|
42
|
+
line: i.line,
|
|
43
|
+
column: i.column,
|
|
44
|
+
severity: i.severity,
|
|
45
|
+
issueType: rule?.issueType ?? 'code-smell',
|
|
46
|
+
suggestion: i.suggestion,
|
|
47
|
+
codeSnippet: i.codeSnippet,
|
|
48
|
+
};
|
|
49
|
+
}),
|
|
50
|
+
}))
|
|
51
|
+
.filter((r) => r.issues.length > 0),
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: 'text',
|
|
57
|
+
text: JSON.stringify(summary, null, 2),
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
const errorMessage = (0, errors_1.getErrorMessage)(error);
|
|
64
|
+
return {
|
|
65
|
+
content: [
|
|
66
|
+
{
|
|
67
|
+
type: 'text',
|
|
68
|
+
text: `Analysis failed: ${errorMessage}`,
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
isError: true,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=runLintAnalysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runLintAnalysis.js","sourceRoot":"","sources":["../../../../src/mcp/tools/runLintAnalysis.ts"],"names":[],"mappings":";;AAUA,0DAwEC;AAlFD,6BAAwB;AAGxB,8CAAoD;AAEpD,uCAA0C;AAE1C;;GAEG;AACH,SAAgB,uBAAuB,CAAC,MAAiB,EAAE,MAAkB;IAC3E,iIAAiI;IAChI,MAAc,CAAC,IAAI,CAClB,mBAAmB,EACnB,kPAAkP,EAClP;QACE,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;KAC5F,EACD,KAAK,EAAE,EAAE,WAAW,EAA2B,EAAE,EAAE;QACjD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAE9C,MAAM,OAAO,GAAG;gBACd,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU;gBACrC,WAAW,EACT,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK;oBAC/B,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;oBACjC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;gBA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