@angular-modernizer/adapter-mcp 1.0.0 → 1.2.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 (131) hide show
  1. package/README.md +81 -65
  2. package/dist/cli.js +8 -0
  3. package/dist/core/project-analyzer.d.ts +3 -12
  4. package/dist/core/project-analyzer.js +3 -12
  5. package/dist/index.d.ts +118 -3
  6. package/dist/index.js +46 -3
  7. package/dist/mcp-watcher.d.ts +28 -8
  8. package/dist/mcp-watcher.js +7 -7
  9. package/dist/scan-host/scan-host.d.ts +119 -0
  10. package/dist/scan-host/scan-host.js +376 -0
  11. package/dist/scan-host/scan-protocol.d.ts +35 -0
  12. package/dist/scan-host/scan-protocol.js +6 -0
  13. package/dist/scan-host/scan-worker.d.ts +14 -0
  14. package/dist/scan-host/scan-worker.js +48 -0
  15. package/dist/server/limited-stdio-transport.d.ts +7 -0
  16. package/dist/server/mcp-server.d.ts +11 -7
  17. package/dist/server/mcp-server.js +4 -7
  18. package/dist/server/sdk-server.d.ts +1 -0
  19. package/dist/server/tool-registry.d.ts +3 -7
  20. package/dist/server/tool-registry.js +1 -7
  21. package/dist/streaming/progress-store.d.ts +22 -5
  22. package/dist/streaming/progress-store.js +9 -5
  23. package/dist/tools/analyze-build-impact.d.ts +58 -36
  24. package/dist/tools/analyze-build-impact.js +36 -29
  25. package/dist/tools/analyze-core-to-shared.d.ts +42 -12
  26. package/dist/tools/analyze-core-to-shared.js +11 -10
  27. package/dist/tools/analyze-parser-performance.d.ts +23 -22
  28. package/dist/tools/analyze-parser-performance.js +20 -18
  29. package/dist/tools/analyze-project.d.ts +87 -14
  30. package/dist/tools/analyze-project.js +140 -122
  31. package/dist/tools/check-incremental-compatibility.d.ts +13 -11
  32. package/dist/tools/check-incremental-compatibility.js +11 -8
  33. package/dist/tools/collect-feedback.d.ts +41 -26
  34. package/dist/tools/collect-feedback.js +32 -23
  35. package/dist/tools/compare-health.d.ts +76 -19
  36. package/dist/tools/compare-health.js +26 -19
  37. package/dist/tools/extract-libraries.d.ts +44 -20
  38. package/dist/tools/extract-libraries.js +16 -17
  39. package/dist/tools/find-angular-symbol.d.ts +27 -25
  40. package/dist/tools/find-angular-symbol.js +19 -16
  41. package/dist/tools/find-component-hosts.d.ts +33 -27
  42. package/dist/tools/find-component-hosts.js +27 -24
  43. package/dist/tools/find-usages.d.ts +25 -23
  44. package/dist/tools/find-usages.js +21 -18
  45. package/dist/tools/get-bootstrap-execution.d.ts +35 -27
  46. package/dist/tools/get-bootstrap-execution.js +28 -25
  47. package/dist/tools/get-call-graph.d.ts +19 -14
  48. package/dist/tools/get-call-graph.js +26 -23
  49. package/dist/tools/get-operation-progress-tool.d.ts +12 -6
  50. package/dist/tools/get-operation-progress-tool.js +11 -6
  51. package/dist/tools/get-operation-progress.d.ts +26 -0
  52. package/dist/tools/helpers/analysis-output.d.ts +5 -0
  53. package/dist/tools/helpers/batch-kernel.d.ts +14 -0
  54. package/dist/tools/helpers/batch-kernel.js +12 -0
  55. package/dist/tools/helpers/compact-output.d.ts +2 -1
  56. package/dist/tools/helpers/compact-output.js +2 -1
  57. package/dist/tools/helpers/health-delta.d.ts +27 -14
  58. package/dist/tools/helpers/health-delta.js +11 -14
  59. package/dist/tools/helpers/project-cache.d.ts +123 -36
  60. package/dist/tools/helpers/project-cache.js +227 -43
  61. package/dist/tools/helpers/rule-runner.d.ts +23 -16
  62. package/dist/tools/helpers/rule-runner.js +24 -17
  63. package/dist/tools/helpers/scan-engine.d.ts +107 -0
  64. package/dist/tools/helpers/scan-engine.js +197 -0
  65. package/dist/tools/helpers/scan-plan.d.ts +1 -1
  66. package/dist/tools/helpers/scan-plan.js +1 -1
  67. package/dist/tools/helpers/suggestion-generator.d.ts +9 -13
  68. package/dist/tools/helpers/suggestion-generator.js +0 -12
  69. package/dist/tools/helpers/tool-cache.d.ts +11 -0
  70. package/dist/tools/helpers/tool-cache.js +15 -0
  71. package/dist/tools/helpers/tool-context.d.ts +11 -8
  72. package/dist/tools/helpers/tool-context.js +5 -8
  73. package/dist/tools/inspect-form-group.d.ts +34 -27
  74. package/dist/tools/inspect-form-group.js +27 -24
  75. package/dist/tools/inspect-i18n.d.ts +31 -25
  76. package/dist/tools/inspect-i18n.js +23 -20
  77. package/dist/tools/inspect-template.d.ts +32 -25
  78. package/dist/tools/inspect-template.js +26 -23
  79. package/dist/tools/learn-patterns.d.ts +88 -12
  80. package/dist/tools/learn-patterns.js +17 -11
  81. package/dist/tools/list-imports.d.ts +45 -28
  82. package/dist/tools/list-imports.js +26 -23
  83. package/dist/tools/orchestrate-migration.d.ts +31 -9
  84. package/dist/tools/orchestrate-migration.js +12 -7
  85. package/dist/tools/parse-stack-trace.d.ts +23 -21
  86. package/dist/tools/parse-stack-trace.js +10 -7
  87. package/dist/tools/plan-migration.d.ts +67 -27
  88. package/dist/tools/plan-migration.js +22 -21
  89. package/dist/tools/resolve-type.d.ts +20 -10
  90. package/dist/tools/resolve-type.js +21 -13
  91. package/dist/tools/review-feedback.d.ts +27 -24
  92. package/dist/tools/review-feedback.js +24 -20
  93. package/dist/tools/rollback-changes.d.ts +13 -9
  94. package/dist/tools/rollback-changes.js +10 -7
  95. package/dist/tools/run-angular-cli.d.ts +12 -10
  96. package/dist/tools/run-angular-cli.js +11 -8
  97. package/dist/tools/run-build.d.ts +13 -11
  98. package/dist/tools/run-build.js +11 -8
  99. package/dist/tools/run-schematic.d.ts +12 -10
  100. package/dist/tools/run-schematic.js +11 -8
  101. package/dist/tools/scan-all.d.ts +69 -12
  102. package/dist/tools/scan-all.js +55 -122
  103. package/dist/tools/scan-angular.d.ts +41 -9
  104. package/dist/tools/scan-angular.js +66 -135
  105. package/dist/tools/scan-architecture.d.ts +75 -14
  106. package/dist/tools/scan-architecture.js +180 -185
  107. package/dist/tools/scan-solid.d.ts +40 -9
  108. package/dist/tools/scan-solid.js +64 -133
  109. package/dist/tools/search-codebase.d.ts +32 -26
  110. package/dist/tools/search-codebase.js +15 -12
  111. package/dist/tools/server-status.d.ts +116 -24
  112. package/dist/tools/server-status.js +85 -26
  113. package/dist/tools/suggest-improvements.d.ts +22 -19
  114. package/dist/tools/suggest-improvements.js +21 -17
  115. package/dist/tools/trace-output-flow.d.ts +34 -27
  116. package/dist/tools/trace-output-flow.js +27 -24
  117. package/dist/tools/transform-code.d.ts +71 -10
  118. package/dist/tools/transform-code.js +148 -54
  119. package/dist/tools/validate-before-transform.d.ts +24 -9
  120. package/dist/tools/validate-before-transform.js +10 -7
  121. package/dist/tools/validate-project-compatibility.d.ts +18 -13
  122. package/dist/tools/validate-project-compatibility.js +17 -11
  123. package/dist/tools/validate-transformation.d.ts +28 -11
  124. package/dist/tools/validate-transformation.js +14 -8
  125. package/dist/tools/verify-citations.d.ts +37 -16
  126. package/dist/tools/verify-citations.js +19 -16
  127. package/dist/types.d.ts +40 -10
  128. package/dist/types.js +0 -5
  129. package/package.json +12 -18
  130. package/dist/tools/shared/scan-types.d.ts +0 -200
  131. package/dist/tools/shared/scan-types.js +0 -7
@@ -1,28 +1,9 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Review Feedback Tool
3
- *
4
- * MCP tool for reviewing collected feedback and extracting insights for AI learning.
5
- * Reads feedback from the user's project (`<projectRoot>/.claude-feedback`).
6
- *
7
- * Pattern Analysis:
8
- * - Success patterns: ≥3 occurrences, ≥80% success rate
9
- * - Failure patterns: ≥2 occurrences
10
- * - Quality trends: Identify degraded quality transformations
11
- * - Outlier detection: Exclude anomalous feedback from learning
12
- * - Analysis insights: kind 'analysis' records grouped by tool and category.
13
- * They use their own completeness score (tool, claimed, actual, evidence)
14
- * and never go through the duration/confidence outlier rules.
15
- *
16
- * Location Support:
17
- * - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
18
- * - Automatic session deduplication by sessionId
19
- */
20
1
  import { type MCPTool, type ToolAnnotations } from '../types.js';
21
2
  import { type AnalysisInsight } from '@angular-modernizer/core';
22
3
  /**
23
4
  * Output from review-feedback tool
24
5
  */
25
- interface ReviewFeedbackOutput {
6
+ export interface ReviewFeedbackOutput {
26
7
  /** Number of sessions analyzed */
27
8
  sessions: number;
28
9
  /** Total number of transformations analyzed */
@@ -45,7 +26,7 @@ interface ReviewFeedbackOutput {
45
26
  /**
46
27
  * Extracted feedback insight for AI learning
47
28
  */
48
- interface FeedbackInsight {
29
+ export interface FeedbackInsight {
49
30
  /** Type of insight */
50
31
  type: 'success-pattern' | 'failure-pattern' | 'quality-trend' | 'anti-pattern';
51
32
  /** Pattern description */
@@ -66,7 +47,7 @@ interface FeedbackInsight {
66
47
  /**
67
48
  * Quality warning about feedback data
68
49
  */
69
- interface QualityWarning {
50
+ export interface QualityWarning {
70
51
  /** Type of quality issue */
71
52
  type: 'low-completeness' | 'outlier' | 'validation-errors';
72
53
  /** Number of affected feedback records */
@@ -77,13 +58,32 @@ interface QualityWarning {
77
58
  message: string;
78
59
  }
79
60
  /**
80
- * Review transformation feedback and extract insights for AI learning
61
+ * MCP tool for reviewing collected feedback and extracting insights for AI learning.
62
+ * Reads feedback from the user's project (`<projectRoot>/.claude-feedback`).
63
+ *
64
+ * @remarks
65
+ * Pattern Analysis:
66
+ * - Success patterns: ≥3 occurrences, ≥80% success rate
67
+ * - Failure patterns: ≥2 occurrences
68
+ * - Quality trends: Identify degraded quality transformations
69
+ * - Outlier detection: Exclude anomalous feedback from learning
70
+ * - Analysis insights: kind 'analysis' records grouped by tool and category.
71
+ * They use their own completeness score (tool, claimed, actual, evidence)
72
+ * and never go through the duration/confidence outlier rules.
73
+ *
74
+ * Location Support:
75
+ * - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
76
+ * - Automatic session deduplication by sessionId
81
77
  */
82
78
  export declare class ReviewFeedbackTool implements MCPTool {
83
79
  name: string;
84
80
  title: string;
85
81
  annotations: ToolAnnotations;
86
82
  description: string;
83
+ /**
84
+ * JSON Schema of the tool arguments.
85
+ * @hidden
86
+ */
87
87
  inputSchema: {
88
88
  readonly type: "object";
89
89
  readonly additionalProperties: false;
@@ -138,6 +138,10 @@ export declare class ReviewFeedbackTool implements MCPTool {
138
138
  };
139
139
  readonly required: readonly ["analysisType"];
140
140
  };
141
+ /**
142
+ * JSON Schema of the tool result (`structuredContent`).
143
+ * @hidden
144
+ */
141
145
  outputSchema: {
142
146
  type: string;
143
147
  properties: {
@@ -322,5 +326,4 @@ export declare class ReviewFeedbackTool implements MCPTool {
322
326
  */
323
327
  execute(args: Record<string, unknown>): Promise<ReviewFeedbackOutput>;
324
328
  }
325
- export {};
326
329
  //# sourceMappingURL=review-feedback.d.ts.map
@@ -1,22 +1,3 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Review Feedback Tool
3
- *
4
- * MCP tool for reviewing collected feedback and extracting insights for AI learning.
5
- * Reads feedback from the user's project (`<projectRoot>/.claude-feedback`).
6
- *
7
- * Pattern Analysis:
8
- * - Success patterns: ≥3 occurrences, ≥80% success rate
9
- * - Failure patterns: ≥2 occurrences
10
- * - Quality trends: Identify degraded quality transformations
11
- * - Outlier detection: Exclude anomalous feedback from learning
12
- * - Analysis insights: kind 'analysis' records grouped by tool and category.
13
- * They use their own completeness score (tool, claimed, actual, evidence)
14
- * and never go through the duration/confidence outlier rules.
15
- *
16
- * Location Support:
17
- * - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
18
- * - Automatic session deduplication by sessionId
19
- */
20
1
  import { FeedbackStorage, OutlierDetector, loadConfig, fromLegacyAnalysisRecord, scoreAnalysisCompleteness, summarizeAnalysisFeedback, } from '@angular-modernizer/core';
21
2
  import { feedbackSessionDirs, feedbackStorageConfig, resolveFeedbackRoots, } from './helpers/platform-root-resolver.js';
22
3
  import { STRING_ARRAY } from './helpers/investigation-schemas.js';
@@ -42,7 +23,22 @@ function describeReview(output) {
42
23
  return lines.join('\n');
43
24
  }
44
25
  /**
45
- * Review transformation feedback and extract insights for AI learning
26
+ * MCP tool for reviewing collected feedback and extracting insights for AI learning.
27
+ * Reads feedback from the user's project (`<projectRoot>/.claude-feedback`).
28
+ *
29
+ * @remarks
30
+ * Pattern Analysis:
31
+ * - Success patterns: ≥3 occurrences, ≥80% success rate
32
+ * - Failure patterns: ≥2 occurrences
33
+ * - Quality trends: Identify degraded quality transformations
34
+ * - Outlier detection: Exclude anomalous feedback from learning
35
+ * - Analysis insights: kind 'analysis' records grouped by tool and category.
36
+ * They use their own completeness score (tool, claimed, actual, evidence)
37
+ * and never go through the duration/confidence outlier rules.
38
+ *
39
+ * Location Support:
40
+ * - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
41
+ * - Automatic session deduplication by sessionId
46
42
  */
47
43
  export class ReviewFeedbackTool {
48
44
  name = 'review-feedback';
@@ -57,6 +53,10 @@ export class ReviewFeedbackTool {
57
53
  'Reads <projectRoot>/.claude-feedback, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set. ' +
58
54
  'Detects success patterns, failure patterns, quality trends, and outliers. ' +
59
55
  'summary is a short text with the counts, the success rate, the top insights and the quality warnings.';
56
+ /**
57
+ * JSON Schema of the tool arguments.
58
+ * @hidden
59
+ */
60
60
  inputSchema = {
61
61
  type: 'object',
62
62
  additionalProperties: false,
@@ -109,6 +109,10 @@ export class ReviewFeedbackTool {
109
109
  },
110
110
  required: ['analysisType'],
111
111
  };
112
+ /**
113
+ * JSON Schema of the tool result (`structuredContent`).
114
+ * @hidden
115
+ */
112
116
  outputSchema = {
113
117
  type: 'object',
114
118
  properties: {
@@ -1,14 +1,8 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Rollback Changes Tool
3
- *
4
- * MCP tool for rolling back transformations if validation fails or
5
- * changes are unsatisfactory. Uses either git stash or file-level backups.
6
- */
7
1
  import { type MCPTool, type ToolAnnotations } from '../types.js';
8
2
  /**
9
3
  * Rollback result.
10
4
  */
11
- interface RollbackResult {
5
+ export interface RollbackResult {
12
6
  /**
13
7
  * Whether rollback was successful.
14
8
  */
@@ -29,7 +23,9 @@ interface RollbackResult {
29
23
  * Additional metadata.
30
24
  */
31
25
  metadata?: {
26
+ /** Number of restored files. */
32
27
  totalFiles: number;
28
+ /** Rollback duration in milliseconds. */
33
29
  duration?: number;
34
30
  };
35
31
  /**
@@ -38,13 +34,18 @@ interface RollbackResult {
38
34
  summary: string;
39
35
  }
40
36
  /**
41
- * MCP tool for rollback operations.
37
+ * MCP tool for rolling back transformations if validation fails or
38
+ * changes are unsatisfactory. Uses either git stash or file-level backups.
42
39
  */
43
40
  export declare class RollbackChangesTool implements MCPTool {
44
41
  name: string;
45
42
  title: string;
46
43
  annotations: ToolAnnotations;
47
44
  description: string;
45
+ /**
46
+ * JSON Schema of the tool arguments.
47
+ * @hidden
48
+ */
48
49
  inputSchema: {
49
50
  type: string;
50
51
  additionalProperties: boolean;
@@ -76,6 +77,10 @@ export declare class RollbackChangesTool implements MCPTool {
76
77
  };
77
78
  };
78
79
  };
80
+ /**
81
+ * JSON Schema of the tool result (`structuredContent`).
82
+ * @hidden
83
+ */
79
84
  outputSchema: {
80
85
  type: string;
81
86
  properties: {
@@ -115,5 +120,4 @@ export declare class RollbackChangesTool implements MCPTool {
115
120
  };
116
121
  execute(args: Record<string, unknown>): Promise<RollbackResult>;
117
122
  }
118
- export {};
119
123
  //# sourceMappingURL=rollback-changes.d.ts.map
@@ -1,9 +1,3 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Rollback Changes Tool
3
- *
4
- * MCP tool for rolling back transformations if validation fails or
5
- * changes are unsatisfactory. Uses either git stash or file-level backups.
6
- */
7
1
  import { RollbackStrategy } from '@angular-modernizer/core';
8
2
  import { createProjectRollbackManager, findProjectRootOf, } from './helpers/transform-safety.js';
9
3
  import { STRING_ARRAY } from './helpers/investigation-schemas.js';
@@ -23,7 +17,8 @@ function describeRollback(result) {
23
17
  return lines.join('\n');
24
18
  }
25
19
  /**
26
- * MCP tool for rollback operations.
20
+ * MCP tool for rolling back transformations if validation fails or
21
+ * changes are unsatisfactory. Uses either git stash or file-level backups.
27
22
  */
28
23
  export class RollbackChangesTool {
29
24
  name = 'rollback-changes';
@@ -36,6 +31,10 @@ export class RollbackChangesTool {
36
31
  };
37
32
  description = 'Rollback transformations if validation fails or changes are unsatisfactory. Restores the backups transform-code wrote into <projectRoot>/.angular-modernizer-backups (file copies, plus a git snapshot inside a git repository); without files it restores the files of the last transform-code call. ' +
38
33
  'summary is a short text with the outcome and the restored files.';
34
+ /**
35
+ * JSON Schema of the tool arguments.
36
+ * @hidden
37
+ */
39
38
  inputSchema = {
40
39
  type: 'object',
41
40
  additionalProperties: false,
@@ -65,6 +64,10 @@ export class RollbackChangesTool {
65
64
  },
66
65
  },
67
66
  };
67
+ /**
68
+ * JSON Schema of the tool result (`structuredContent`).
69
+ * @hidden
70
+ */
68
71
  outputSchema = {
69
72
  type: 'object',
70
73
  properties: {
@@ -1,15 +1,8 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Run Angular CLI Tool
3
- *
4
- * MCP tool for executing Angular CLI commands programmatically.
5
- * Enables AI assistants to run ng commands for project management,
6
- * code generation, and build operations.
7
- */
8
1
  import { type MCPTool, type ToolAnnotations, type ToolContext } from '../types.js';
9
2
  /**
10
3
  * Result of Angular CLI command execution.
11
4
  */
12
- interface AngularCliResult {
5
+ export interface AngularCliResult {
13
6
  /**
14
7
  * Whether the command executed successfully.
15
8
  */
@@ -52,13 +45,19 @@ interface AngularCliResult {
52
45
  summary: string;
53
46
  }
54
47
  /**
55
- * MCP tool for executing Angular CLI commands.
48
+ * MCP tool for executing Angular CLI commands programmatically.
49
+ * Enables AI assistants to run ng commands for project management,
50
+ * code generation, and build operations.
56
51
  */
57
52
  export declare class RunAngularCliTool implements MCPTool {
58
53
  name: string;
59
54
  title: string;
60
55
  annotations: ToolAnnotations;
61
56
  description: string;
57
+ /**
58
+ * JSON Schema of the tool arguments.
59
+ * @hidden
60
+ */
62
61
  inputSchema: {
63
62
  type: string;
64
63
  additionalProperties: boolean;
@@ -99,6 +98,10 @@ export declare class RunAngularCliTool implements MCPTool {
99
98
  };
100
99
  required: string[];
101
100
  };
101
+ /**
102
+ * JSON Schema of the tool result (`structuredContent`).
103
+ * @hidden
104
+ */
102
105
  outputSchema: {
103
106
  type: string;
104
107
  properties: {
@@ -141,5 +144,4 @@ export declare class RunAngularCliTool implements MCPTool {
141
144
  */
142
145
  private executeCommand;
143
146
  }
144
- export {};
145
147
  //# sourceMappingURL=run-angular-cli.d.ts.map
@@ -1,10 +1,3 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Run Angular CLI Tool
3
- *
4
- * MCP tool for executing Angular CLI commands programmatically.
5
- * Enables AI assistants to run ng commands for project management,
6
- * code generation, and build operations.
7
- */
8
1
  import { spawn } from 'node:child_process';
9
2
  import { processGroupOptions, terminateOnAbort, terminateProcessTree, } from '@angular-modernizer/core';
10
3
  import { outputTail, seconds } from './helpers/process-output.js';
@@ -24,7 +17,9 @@ function withSummary(result) {
24
17
  return { ...result, summary: describeCliRun(result) };
25
18
  }
26
19
  /**
27
- * MCP tool for executing Angular CLI commands.
20
+ * MCP tool for executing Angular CLI commands programmatically.
21
+ * Enables AI assistants to run ng commands for project management,
22
+ * code generation, and build operations.
28
23
  */
29
24
  export class RunAngularCliTool {
30
25
  name = 'run-angular-cli';
@@ -37,6 +32,10 @@ export class RunAngularCliTool {
37
32
  };
38
33
  description = 'Execute Angular CLI commands for project management and code generation. ' +
39
34
  'The result has the full stdout and stderr; summary is a short text with the exit code and, on failure, the last output lines.';
35
+ /**
36
+ * JSON Schema of the tool arguments.
37
+ * @hidden
38
+ */
40
39
  inputSchema = {
41
40
  type: 'object',
42
41
  additionalProperties: false,
@@ -83,6 +82,10 @@ export class RunAngularCliTool {
83
82
  },
84
83
  required: ['command'],
85
84
  };
85
+ /**
86
+ * JSON Schema of the tool result (`structuredContent`).
87
+ * @hidden
88
+ */
86
89
  outputSchema = {
87
90
  type: 'object',
88
91
  properties: {
@@ -1,16 +1,9 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Run Build Tool
3
- *
4
- * MCP tool for executing build systems and validating code transformations.
5
- * Supports Angular CLI, Nx, Webpack, Vite, and auto-detection.
6
- * Includes incremental build mode for efficient validation.
7
- */
8
1
  import { type MCPTool, type ToolAnnotations, type ToolContext } from '../types.js';
9
2
  import { type IncompatibilityCheck } from '@angular-modernizer/core';
10
3
  /**
11
4
  * Incremental build metadata
12
5
  */
13
- interface IncrementalMetadata {
6
+ export interface IncrementalMetadata {
14
7
  /**
15
8
  * Whether incremental mode was enabled
16
9
  */
@@ -43,7 +36,7 @@ interface IncrementalMetadata {
43
36
  /**
44
37
  * Build execution result.
45
38
  */
46
- interface BuildResult {
39
+ export interface BuildResult {
47
40
  /**
48
41
  * Whether the build was successful.
49
42
  */
@@ -102,13 +95,19 @@ interface BuildResult {
102
95
  summary: string;
103
96
  }
104
97
  /**
105
- * MCP tool for executing build systems.
98
+ * MCP tool for executing build systems and validating code transformations.
99
+ * Supports Angular CLI, Nx, Webpack, Vite, and auto-detection.
100
+ * Includes incremental build mode for efficient validation.
106
101
  */
107
102
  export declare class RunBuildTool implements MCPTool {
108
103
  name: string;
109
104
  title: string;
110
105
  annotations: ToolAnnotations;
111
106
  description: string;
107
+ /**
108
+ * JSON Schema of the tool arguments.
109
+ * @hidden
110
+ */
112
111
  inputSchema: {
113
112
  type: string;
114
113
  additionalProperties: boolean;
@@ -174,6 +173,10 @@ export declare class RunBuildTool implements MCPTool {
174
173
  };
175
174
  required: string[];
176
175
  };
176
+ /**
177
+ * JSON Schema of the tool result (`structuredContent`).
178
+ * @hidden
179
+ */
177
180
  outputSchema: {
178
181
  type: string;
179
182
  properties: {
@@ -309,5 +312,4 @@ export declare class RunBuildTool implements MCPTool {
309
312
  */
310
313
  private parseBuildOutput;
311
314
  }
312
- export {};
313
315
  //# sourceMappingURL=run-build.d.ts.map
@@ -1,10 +1,3 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Run Build Tool
3
- *
4
- * MCP tool for executing build systems and validating code transformations.
5
- * Supports Angular CLI, Nx, Webpack, Vite, and auto-detection.
6
- * Includes incremental build mode for efficient validation.
7
- */
8
1
  import { spawn, execSync } from 'node:child_process';
9
2
  import { existsSync, readFileSync } from 'node:fs';
10
3
  import { join } from 'node:path';
@@ -47,7 +40,9 @@ function describeBuild(result) {
47
40
  return lines.join('\n');
48
41
  }
49
42
  /**
50
- * MCP tool for executing build systems.
43
+ * MCP tool for executing build systems and validating code transformations.
44
+ * Supports Angular CLI, Nx, Webpack, Vite, and auto-detection.
45
+ * Includes incremental build mode for efficient validation.
51
46
  */
52
47
  export class RunBuildTool {
53
48
  name = 'run-build';
@@ -60,6 +55,10 @@ export class RunBuildTool {
60
55
  };
61
56
  description = 'Execute build systems to validate code transformations. Supports incremental mode for 2-4x faster builds by validating only changed files and their dependencies. Automatically detects incompatibilities and falls back to full build when needed. ' +
62
57
  'The result has the full build output; summary is a short text with the outcome, the build mode and, on failure, the last output lines.';
58
+ /**
59
+ * JSON Schema of the tool arguments.
60
+ * @hidden
61
+ */
63
62
  inputSchema = {
64
63
  type: 'object',
65
64
  additionalProperties: false,
@@ -121,6 +120,10 @@ export class RunBuildTool {
121
120
  },
122
121
  required: ['rootPath'],
123
122
  };
123
+ /**
124
+ * JSON Schema of the tool result (`structuredContent`).
125
+ * @hidden
126
+ */
124
127
  outputSchema = {
125
128
  type: 'object',
126
129
  properties: {
@@ -1,15 +1,8 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Run Schematic Tool
3
- *
4
- * MCP tool for executing Angular schematics programmatically.
5
- * Enables AI assistants to run code generation and migration schematics
6
- * from built-in Angular collections or custom schematic libraries.
7
- */
8
1
  import { type MCPTool, type ToolAnnotations, type ToolContext } from '../types.js';
9
2
  /**
10
3
  * Result of schematic execution.
11
4
  */
12
- interface SchematicResult {
5
+ export interface SchematicResult {
13
6
  /**
14
7
  * Whether the schematic executed successfully.
15
8
  */
@@ -72,13 +65,19 @@ interface SchematicResult {
72
65
  summary: string;
73
66
  }
74
67
  /**
75
- * MCP tool for executing Angular schematics.
68
+ * MCP tool for executing Angular schematics programmatically.
69
+ * Enables AI assistants to run code generation and migration schematics
70
+ * from built-in Angular collections or custom schematic libraries.
76
71
  */
77
72
  export declare class RunSchematicTool implements MCPTool {
78
73
  name: string;
79
74
  title: string;
80
75
  annotations: ToolAnnotations;
81
76
  description: string;
77
+ /**
78
+ * JSON Schema of the tool arguments.
79
+ * @hidden
80
+ */
82
81
  inputSchema: {
83
82
  type: string;
84
83
  additionalProperties: boolean;
@@ -138,6 +137,10 @@ export declare class RunSchematicTool implements MCPTool {
138
137
  };
139
138
  required: string[];
140
139
  };
140
+ /**
141
+ * JSON Schema of the tool result (`structuredContent`).
142
+ * @hidden
143
+ */
141
144
  outputSchema: {
142
145
  type: string;
143
146
  properties: {
@@ -237,5 +240,4 @@ export declare class RunSchematicTool implements MCPTool {
237
240
  */
238
241
  private extractWarnings;
239
242
  }
240
- export {};
241
243
  //# sourceMappingURL=run-schematic.d.ts.map
@@ -1,10 +1,3 @@
1
- /**
2
- * @angular-modernizer/adapter-mcp - Run Schematic Tool
3
- *
4
- * MCP tool for executing Angular schematics programmatically.
5
- * Enables AI assistants to run code generation and migration schematics
6
- * from built-in Angular collections or custom schematic libraries.
7
- */
8
1
  import { spawn } from 'node:child_process';
9
2
  import { processGroupOptions, terminateOnAbort, terminateProcessTree, } from '@angular-modernizer/core';
10
3
  import { existsSync } from 'node:fs';
@@ -83,7 +76,9 @@ const SAFE_SCHEMATIC_OPTIONS = new Set([
83
76
  'defaults',
84
77
  ]);
85
78
  /**
86
- * MCP tool for executing Angular schematics.
79
+ * MCP tool for executing Angular schematics programmatically.
80
+ * Enables AI assistants to run code generation and migration schematics
81
+ * from built-in Angular collections or custom schematic libraries.
87
82
  */
88
83
  export class RunSchematicTool {
89
84
  name = 'run-schematic';
@@ -96,6 +91,10 @@ export class RunSchematicTool {
96
91
  };
97
92
  description = 'Execute Angular schematics for code generation and automated migrations. ' +
98
93
  'The result has the full stdout and stderr; summary is a short text with the outcome, the generated files and, on failure, the last output lines.';
94
+ /**
95
+ * JSON Schema of the tool arguments.
96
+ * @hidden
97
+ */
99
98
  inputSchema = {
100
99
  type: 'object',
101
100
  additionalProperties: false,
@@ -155,6 +154,10 @@ export class RunSchematicTool {
155
154
  },
156
155
  required: ['schematic', 'target'],
157
156
  };
157
+ /**
158
+ * JSON Schema of the tool result (`structuredContent`).
159
+ * @hidden
160
+ */
158
161
  outputSchema = {
159
162
  type: 'object',
160
163
  properties: {