@angular-modernizer/adapter-mcp 0.1.4 → 0.3.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 (152) hide show
  1. package/README.md +125 -35
  2. package/dist/cli.js +65 -13
  3. package/dist/cli.js.map +1 -1
  4. package/dist/index.d.ts +8 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +8 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/mcp-watcher.d.ts.map +1 -1
  9. package/dist/mcp-watcher.js +3 -0
  10. package/dist/mcp-watcher.js.map +1 -1
  11. package/dist/server/json-rpc-handler.d.ts +41 -0
  12. package/dist/server/json-rpc-handler.d.ts.map +1 -1
  13. package/dist/server/json-rpc-handler.js +85 -6
  14. package/dist/server/json-rpc-handler.js.map +1 -1
  15. package/dist/server/mcp-server.d.ts +31 -0
  16. package/dist/server/mcp-server.d.ts.map +1 -1
  17. package/dist/server/mcp-server.js +76 -23
  18. package/dist/server/mcp-server.js.map +1 -1
  19. package/dist/server/stdio-guard.d.ts +20 -0
  20. package/dist/server/stdio-guard.d.ts.map +1 -0
  21. package/dist/server/stdio-guard.js +48 -0
  22. package/dist/server/stdio-guard.js.map +1 -0
  23. package/dist/tools/analyze-build-impact.d.ts +169 -12
  24. package/dist/tools/analyze-build-impact.d.ts.map +1 -1
  25. package/dist/tools/analyze-build-impact.js +221 -36
  26. package/dist/tools/analyze-build-impact.js.map +1 -1
  27. package/dist/tools/analyze-parser-performance.d.ts.map +1 -1
  28. package/dist/tools/analyze-parser-performance.js +6 -4
  29. package/dist/tools/analyze-parser-performance.js.map +1 -1
  30. package/dist/tools/collect-feedback.d.ts +112 -1
  31. package/dist/tools/collect-feedback.d.ts.map +1 -1
  32. package/dist/tools/collect-feedback.js +240 -11
  33. package/dist/tools/collect-feedback.js.map +1 -1
  34. package/dist/tools/extract-libraries.d.ts +4 -0
  35. package/dist/tools/extract-libraries.d.ts.map +1 -1
  36. package/dist/tools/extract-libraries.js +40 -8
  37. package/dist/tools/extract-libraries.js.map +1 -1
  38. package/dist/tools/find-angular-symbol.d.ts +29 -6
  39. package/dist/tools/find-angular-symbol.d.ts.map +1 -1
  40. package/dist/tools/find-angular-symbol.js +51 -6
  41. package/dist/tools/find-angular-symbol.js.map +1 -1
  42. package/dist/tools/find-component-hosts.d.ts +114 -0
  43. package/dist/tools/find-component-hosts.d.ts.map +1 -0
  44. package/dist/tools/find-component-hosts.js +240 -0
  45. package/dist/tools/find-component-hosts.js.map +1 -0
  46. package/dist/tools/find-usages.d.ts +33 -4
  47. package/dist/tools/find-usages.d.ts.map +1 -1
  48. package/dist/tools/find-usages.js +102 -11
  49. package/dist/tools/find-usages.js.map +1 -1
  50. package/dist/tools/get-bootstrap-execution.d.ts +108 -0
  51. package/dist/tools/get-bootstrap-execution.d.ts.map +1 -0
  52. package/dist/tools/get-bootstrap-execution.js +243 -0
  53. package/dist/tools/get-bootstrap-execution.js.map +1 -0
  54. package/dist/tools/get-call-graph.d.ts +33 -4
  55. package/dist/tools/get-call-graph.d.ts.map +1 -1
  56. package/dist/tools/get-call-graph.js +76 -13
  57. package/dist/tools/get-call-graph.js.map +1 -1
  58. package/dist/tools/helpers/compact-output.d.ts +61 -0
  59. package/dist/tools/helpers/compact-output.d.ts.map +1 -0
  60. package/dist/tools/helpers/compact-output.js +83 -0
  61. package/dist/tools/helpers/compact-output.js.map +1 -0
  62. package/dist/tools/helpers/find-ts-config.d.ts +24 -1
  63. package/dist/tools/helpers/find-ts-config.d.ts.map +1 -1
  64. package/dist/tools/helpers/find-ts-config.js +213 -7
  65. package/dist/tools/helpers/find-ts-config.js.map +1 -1
  66. package/dist/tools/helpers/project-cache.d.ts +177 -0
  67. package/dist/tools/helpers/project-cache.d.ts.map +1 -0
  68. package/dist/tools/helpers/project-cache.js +313 -0
  69. package/dist/tools/helpers/project-cache.js.map +1 -0
  70. package/dist/tools/helpers/rule-runner.d.ts +67 -0
  71. package/dist/tools/helpers/rule-runner.d.ts.map +1 -0
  72. package/dist/tools/helpers/rule-runner.js +117 -0
  73. package/dist/tools/helpers/rule-runner.js.map +1 -0
  74. package/dist/tools/helpers/scan-plan.d.ts +45 -0
  75. package/dist/tools/helpers/scan-plan.d.ts.map +1 -0
  76. package/dist/tools/helpers/scan-plan.js +151 -0
  77. package/dist/tools/helpers/scan-plan.js.map +1 -0
  78. package/dist/tools/helpers/stack-frame-file-index.d.ts +10 -0
  79. package/dist/tools/helpers/stack-frame-file-index.d.ts.map +1 -0
  80. package/dist/tools/helpers/stack-frame-file-index.js +71 -0
  81. package/dist/tools/helpers/stack-frame-file-index.js.map +1 -0
  82. package/dist/tools/helpers/suggestion-generator.d.ts +1 -1
  83. package/dist/tools/helpers/suggestion-generator.d.ts.map +1 -1
  84. package/dist/tools/helpers/suggestion-generator.js.map +1 -1
  85. package/dist/tools/inspect-form-group.d.ts +93 -0
  86. package/dist/tools/inspect-form-group.d.ts.map +1 -0
  87. package/dist/tools/inspect-form-group.js +161 -0
  88. package/dist/tools/inspect-form-group.js.map +1 -0
  89. package/dist/tools/inspect-i18n.d.ts +85 -0
  90. package/dist/tools/inspect-i18n.d.ts.map +1 -0
  91. package/dist/tools/inspect-i18n.js +203 -0
  92. package/dist/tools/inspect-i18n.js.map +1 -0
  93. package/dist/tools/inspect-template.d.ts +89 -0
  94. package/dist/tools/inspect-template.d.ts.map +1 -0
  95. package/dist/tools/inspect-template.js +166 -0
  96. package/dist/tools/inspect-template.js.map +1 -0
  97. package/dist/tools/list-imports.d.ts +119 -0
  98. package/dist/tools/list-imports.d.ts.map +1 -0
  99. package/dist/tools/list-imports.js +171 -0
  100. package/dist/tools/list-imports.js.map +1 -0
  101. package/dist/tools/orchestrate-migration.d.ts +1 -0
  102. package/dist/tools/orchestrate-migration.d.ts.map +1 -1
  103. package/dist/tools/orchestrate-migration.js +33 -1
  104. package/dist/tools/orchestrate-migration.js.map +1 -1
  105. package/dist/tools/parse-stack-trace.d.ts +3 -1
  106. package/dist/tools/parse-stack-trace.d.ts.map +1 -1
  107. package/dist/tools/parse-stack-trace.js +18 -4
  108. package/dist/tools/parse-stack-trace.js.map +1 -1
  109. package/dist/tools/plan-migration.d.ts +89 -1
  110. package/dist/tools/plan-migration.d.ts.map +1 -1
  111. package/dist/tools/plan-migration.js +203 -7
  112. package/dist/tools/plan-migration.js.map +1 -1
  113. package/dist/tools/resolve-type.d.ts +3 -0
  114. package/dist/tools/resolve-type.d.ts.map +1 -1
  115. package/dist/tools/resolve-type.js +6 -2
  116. package/dist/tools/resolve-type.js.map +1 -1
  117. package/dist/tools/review-feedback.d.ts +7 -0
  118. package/dist/tools/review-feedback.d.ts.map +1 -1
  119. package/dist/tools/review-feedback.js +68 -16
  120. package/dist/tools/review-feedback.js.map +1 -1
  121. package/dist/tools/scan-all.d.ts +6 -6
  122. package/dist/tools/scan-all.d.ts.map +1 -1
  123. package/dist/tools/scan-all.js +7 -7
  124. package/dist/tools/scan-all.js.map +1 -1
  125. package/dist/tools/scan-angular.d.ts +1 -1
  126. package/dist/tools/scan-angular.js +1 -1
  127. package/dist/tools/scan-architecture.d.ts +25 -4
  128. package/dist/tools/scan-architecture.d.ts.map +1 -1
  129. package/dist/tools/scan-architecture.js +115 -134
  130. package/dist/tools/scan-architecture.js.map +1 -1
  131. package/dist/tools/scan-solid.d.ts +1 -1
  132. package/dist/tools/scan-solid.js +1 -1
  133. package/dist/tools/search-codebase.d.ts +32 -6
  134. package/dist/tools/search-codebase.d.ts.map +1 -1
  135. package/dist/tools/search-codebase.js +60 -14
  136. package/dist/tools/search-codebase.js.map +1 -1
  137. package/dist/tools/server-status.d.ts +96 -0
  138. package/dist/tools/server-status.d.ts.map +1 -0
  139. package/dist/tools/server-status.js +195 -0
  140. package/dist/tools/server-status.js.map +1 -0
  141. package/dist/tools/suggest-improvements.d.ts +3 -1
  142. package/dist/tools/suggest-improvements.d.ts.map +1 -1
  143. package/dist/tools/suggest-improvements.js +47 -10
  144. package/dist/tools/suggest-improvements.js.map +1 -1
  145. package/dist/tools/trace-output-flow.d.ts +111 -0
  146. package/dist/tools/trace-output-flow.d.ts.map +1 -0
  147. package/dist/tools/trace-output-flow.js +308 -0
  148. package/dist/tools/trace-output-flow.js.map +1 -0
  149. package/dist/types.d.ts +7 -0
  150. package/dist/types.d.ts.map +1 -1
  151. package/dist/types.js.map +1 -1
  152. package/package.json +13 -12
@@ -3,10 +3,30 @@
3
3
  *
4
4
  * MCP tool for analyzing build impact before transformations.
5
5
  * Estimates affected files, modules, build time, and provides AI-friendly recommendations.
6
- * Uses IncrementalAnalyzer for scope calculation, DependencyGraphBuilder for transitive dependents,
7
- * and AngularModuleDetector for module detection.
6
+ * Uses IncrementalAnalyzer.getBuildScope() with the target files as the changed
7
+ * set. The underlying DependencyGraphBuilder follows `export ... from`,
8
+ * resolves tsconfig path aliases, splits value vs type-only dependents and
9
+ * does not let barrels inflate the radius. Optional `symbols` restrict the
10
+ * impact to consumers of specific exported symbols.
11
+ *
12
+ * External templates (`.html`) are not part of the TypeScript program; they
13
+ * are mapped to the component files that own them (`templateUrl`, then same
14
+ * basename) instead of failing. Such a component is recompiled, but its
15
+ * dependents are not counted, because a template edit does not change the
16
+ * component's TypeScript API. Files that cannot be mapped are listed in
17
+ * `unresolvedFiles`. `summaryOnly` and `maxResults` shorten the file lists;
18
+ * counts always describe the full result.
19
+ *
20
+ * Host components that use a changed component, directive or pipe only in
21
+ * their template (NgModule declarations, no import of the class) are listed
22
+ * as `templateDependentFiles` and, with the used classes, in `templateHosts`.
23
+ * They are recompiled and template type-checked; their own dependents are not
24
+ * counted.
8
25
  */
9
26
  import { type MCPTool } from '../types.js';
27
+ import { type BuildScopeSymbolImpact } from '@angular-modernizer/core';
28
+ import { type TemplateEdge } from '@angular-modernizer/api';
29
+ import { type ProjectCache } from './helpers/project-cache.js';
10
30
  /**
11
31
  * Build scope strategy
12
32
  */
@@ -26,15 +46,35 @@ interface EstimatedBuildScope {
26
46
  /**
27
47
  * Files that depend on the changed files (transitive dependents)
28
48
  */
29
- dependentFiles: string[];
49
+ dependentFiles?: string[];
30
50
  /**
31
51
  * Affected Angular modules
32
52
  */
33
- affectedModules: string[];
53
+ affectedModules?: string[];
34
54
  /**
35
55
  * Estimated build time in seconds
36
56
  */
37
57
  estimatedBuildTime: number;
58
+ /**
59
+ * Dependents that use changed bindings as values (need JS rebuild)
60
+ */
61
+ valueDependentFiles?: string[];
62
+ /**
63
+ * Dependents that only import types from the changed files (type-check only)
64
+ */
65
+ typeOnlyDependentFiles?: string[];
66
+ /**
67
+ * Barrel / re-export files passed through
68
+ */
69
+ reExportFiles?: string[];
70
+ /**
71
+ * Host components that use changed classes only in their templates
72
+ */
73
+ templateDependentFiles?: string[];
74
+ /**
75
+ * How the changed set was determined ('forced' = the requested files)
76
+ */
77
+ changeSource: 'forced' | 'git' | 'hash';
38
78
  }
39
79
  /**
40
80
  * Dependency information for a file
@@ -45,9 +85,21 @@ interface DependencyInfo {
45
85
  */
46
86
  file: string;
47
87
  /**
48
- * Number of files that depend on this file
88
+ * Number of files that depend on this file (value + type-only)
49
89
  */
50
90
  dependents: number;
91
+ /**
92
+ * Number of value dependents (need JS rebuild), when known
93
+ */
94
+ valueDependents?: number;
95
+ /**
96
+ * Number of type-only dependents (type-check only), when known
97
+ */
98
+ typeOnlyDependents?: number;
99
+ /**
100
+ * Number of template hosts (recompile, template type-check), when known
101
+ */
102
+ templateDependents?: number;
51
103
  /**
52
104
  * Whether this file is exported from a public API (index.ts)
53
105
  */
@@ -58,43 +110,125 @@ interface DependencyInfo {
58
110
  affectedModule?: string;
59
111
  }
60
112
  /**
61
- * Output result of build impact analysis.
113
+ * Sizes of the full result, independent of `summaryOnly` / `maxResults`.
114
+ */
115
+ interface BuildImpactCounts {
116
+ changedFiles: number;
117
+ dependentFiles: number;
118
+ valueDependentFiles: number;
119
+ typeOnlyDependentFiles: number;
120
+ templateDependentFiles: number;
121
+ reExportFiles: number;
122
+ affectedFiles: number;
123
+ affectedModules: number;
124
+ }
125
+ /**
126
+ * A host component that uses changed classes in its template only.
127
+ */
128
+ interface TemplateHost {
129
+ /** Host component file. */
130
+ file: string;
131
+ component: string;
132
+ uses: {
133
+ className: string;
134
+ via: TemplateEdge['via'];
135
+ file: string;
136
+ templateFile: string;
137
+ }[];
138
+ }
139
+ /**
140
+ * A requested non-TypeScript file mapped to the component files that own it.
141
+ */
142
+ interface MappedFile {
143
+ file: string;
144
+ mappedTo: string[];
145
+ }
146
+ /**
147
+ * A requested file that could not be placed in the TypeScript program.
148
+ */
149
+ interface UnresolvedFile {
150
+ file: string;
151
+ reason: string;
152
+ }
153
+ /**
154
+ * Output result of build impact analysis. `recommendation` comes first so it
155
+ * is the first thing a reader of the JSON sees.
62
156
  */
63
157
  interface AnalyzeBuildImpactOutput {
158
+ /**
159
+ * AI-friendly recommendation
160
+ */
161
+ recommendation: string;
162
+ /**
163
+ * Sizes of the full result
164
+ */
165
+ counts: BuildImpactCounts;
166
+ /**
167
+ * `true` when `maxResults` cut at least one file list
168
+ */
169
+ truncated: boolean;
64
170
  /**
65
171
  * Estimated build scope with strategy and recommendations
66
172
  */
67
173
  estimatedBuildScope: EstimatedBuildScope;
68
174
  /**
69
- * All affected files (changed + dependents)
175
+ * All affected files (changed + dependents); omitted with `summaryOnly`
70
176
  */
71
- affectedFiles: string[];
177
+ affectedFiles?: string[];
72
178
  /**
73
- * Affected Angular module names
179
+ * Affected Angular module names; omitted with `summaryOnly`
74
180
  */
75
- affectedModules: string[];
181
+ affectedModules?: string[];
76
182
  /**
77
183
  * Estimated build time in seconds
78
184
  */
79
185
  estimatedBuildTime: number;
80
186
  /**
81
- * AI-friendly recommendation
187
+ * Requested `.html` files and the component files they were mapped to
82
188
  */
83
- recommendation: string;
189
+ mappedFiles?: MappedFile[];
190
+ /**
191
+ * Requested files that are not in the program and could not be mapped
192
+ */
193
+ unresolvedFiles?: UnresolvedFile[];
84
194
  /**
85
195
  * Detailed dependency information for each changed file
86
196
  */
87
197
  dependencies: DependencyInfo[];
198
+ /**
199
+ * Symbol-level consumers (only when `symbols` was given; omitted with `summaryOnly`)
200
+ */
201
+ symbolImpacts?: BuildScopeSymbolImpact[];
202
+ /**
203
+ * Template hosts with the classes they use (omitted with `summaryOnly`,
204
+ * capped by `maxResults`)
205
+ */
206
+ templateHosts?: TemplateHost[];
88
207
  }
89
208
  /**
90
209
  * MCP tool for analyzing build impact before transformations.
91
210
  */
92
211
  export declare class AnalyzeBuildImpactTool implements MCPTool {
212
+ private readonly projects?;
213
+ /**
214
+ * @param projects - Shared project cache; without it every call parses the
215
+ * workspace anew.
216
+ */
217
+ constructor(projects?: ProjectCache | undefined);
93
218
  name: string;
94
219
  description: string;
95
220
  inputSchema: {
96
221
  type: string;
97
222
  properties: {
223
+ summaryOnly: {
224
+ readonly type: "boolean";
225
+ readonly description: "Return counts and the text summary only, without the result list. Default: false.";
226
+ readonly default: false;
227
+ };
228
+ maxResults: {
229
+ readonly type: "number";
230
+ readonly description: string;
231
+ };
98
232
  projectPath: {
99
233
  type: string;
100
234
  description: string;
@@ -106,10 +240,33 @@ export declare class AnalyzeBuildImpactTool implements MCPTool {
106
240
  };
107
241
  description: string;
108
242
  };
243
+ symbols: {
244
+ type: string;
245
+ items: {
246
+ type: string;
247
+ };
248
+ description: string;
249
+ };
109
250
  };
110
251
  required: string[];
111
252
  };
112
253
  execute(args: Record<string, unknown>): Promise<AnalyzeBuildImpactOutput>;
254
+ /**
255
+ * Splits the requested files into files of the TypeScript program, `.html`
256
+ * templates mapped to their component files, and files that fit neither.
257
+ * Components reached only through their template are returned as
258
+ * `templateOnlyFiles`: they are recompiled, their dependents are not.
259
+ */
260
+ private resolveChangedFiles;
261
+ /**
262
+ * Applies `summaryOnly` (drop every list) or `maxResults` (cap each list).
263
+ */
264
+ private compactLists;
265
+ /**
266
+ * Dependent counts for one changed file. Uses the per-file breakdown when
267
+ * available; with a single changed file all dependents belong to it.
268
+ */
269
+ private getDependentCounts;
113
270
  /**
114
271
  * Generate AI-friendly recommendation
115
272
  */
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-build-impact.d.ts","sourceRoot":"","sources":["../../src/tools/analyze-build-impact.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAyB3C;;GAEG;AACH,KAAK,kBAAkB,GAAG,eAAe,GAAG,SAAS,GAAG,MAAM,CAAC;AAE/D;;GAEG;AACH,UAAU,mBAAmB;IAC3B;;OAEG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB;;OAEG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,UAAU,cAAc;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC;;OAEG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;IAExB;;OAEG;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,cAAc,EAAE,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,sBAAuB,YAAW,OAAO;IACpD,IAAI,SAA0B;IAC9B,WAAW,SAC6N;IAExO,WAAW;;;;;;;;;;;;;;;;MAiBT;IAEI,OAAO,CACX,IAAI,EAAE,MAAM,CAA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E1B;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAE3B;;OAEG;IACH,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAEnC;;OAEG;IACH,YAAY,EAAE,cAAc,EAAE,CAAC;IAE/B;;OAEG;IACH,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAEzC;;;OAGG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;CAChC;AAcD;;GAEG;AACH,qBAAa,sBAAuB,YAAW,OAAO;IAKxC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAJtC;;;OAGG;gBAC0B,QAAQ,CAAC,EAAE,YAAY,YAAA;IAEpD,IAAI,SAA0B;IAC9B,WAAW,SAK2D;IAEtE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0BT;IAEI,OAAO,CACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,wBAAwB,CAAC;IA2MpC;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAyC3B;;OAEG;IACH,OAAO,CAAC,YAAY;IAmBpB;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IA4B1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAsB9B;;OAEG;IACH,OAAO,CAAC,eAAe;IAkCvB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAiB1B"}
@@ -3,19 +3,62 @@
3
3
  *
4
4
  * MCP tool for analyzing build impact before transformations.
5
5
  * Estimates affected files, modules, build time, and provides AI-friendly recommendations.
6
- * Uses IncrementalAnalyzer for scope calculation, DependencyGraphBuilder for transitive dependents,
7
- * and AngularModuleDetector for module detection.
6
+ * Uses IncrementalAnalyzer.getBuildScope() with the target files as the changed
7
+ * set. The underlying DependencyGraphBuilder follows `export ... from`,
8
+ * resolves tsconfig path aliases, splits value vs type-only dependents and
9
+ * does not let barrels inflate the radius. Optional `symbols` restrict the
10
+ * impact to consumers of specific exported symbols.
11
+ *
12
+ * External templates (`.html`) are not part of the TypeScript program; they
13
+ * are mapped to the component files that own them (`templateUrl`, then same
14
+ * basename) instead of failing. Such a component is recompiled, but its
15
+ * dependents are not counted, because a template edit does not change the
16
+ * component's TypeScript API. Files that cannot be mapped are listed in
17
+ * `unresolvedFiles`. `summaryOnly` and `maxResults` shorten the file lists;
18
+ * counts always describe the full result.
19
+ *
20
+ * Host components that use a changed component, directive or pipe only in
21
+ * their template (NgModule declarations, no import of the class) are listed
22
+ * as `templateDependentFiles` and, with the used classes, in `templateHosts`.
23
+ * They are recompiled and template type-checked; their own dependents are not
24
+ * counted.
8
25
  */
9
26
  import { Project } from 'ts-morph';
10
- import { IncrementalAnalyzer, DependencyGraphBuilder, } from '@angular-modernizer/core';
27
+ import { IncrementalAnalyzer, } from '@angular-modernizer/core';
28
+ import { findTemplateOwnerFiles, } from '@angular-modernizer/api';
11
29
  import { existsSync } from 'node:fs';
12
30
  import { join } from 'node:path';
31
+ import { findTsConfig } from './helpers/find-ts-config.js';
32
+ import { COMPACT_OUTPUT_SCHEMA, limitList, parseCompactOptions, } from './helpers/compact-output.js';
33
+ /** Groups template edges by host component file. */
34
+ function toTemplateHosts(edges) {
35
+ const hosts = new Map();
36
+ for (const edge of edges) {
37
+ const key = `${edge.from}\0${edge.hostClassName}`;
38
+ const host = hosts.get(key) ?? { file: edge.from, component: edge.hostClassName, uses: [] };
39
+ host.uses.push({ className: edge.className, via: edge.via, file: edge.to, templateFile: edge.templateFile });
40
+ hosts.set(key, host);
41
+ }
42
+ return [...hosts.values()];
43
+ }
13
44
  /**
14
45
  * MCP tool for analyzing build impact before transformations.
15
46
  */
16
47
  export class AnalyzeBuildImpactTool {
48
+ projects;
49
+ /**
50
+ * @param projects - Shared project cache; without it every call parses the
51
+ * workspace anew.
52
+ */
53
+ constructor(projects) {
54
+ this.projects = projects;
55
+ }
17
56
  name = 'analyze-build-impact';
18
- description = 'Analyze build impact before transformations. Estimates affected files, transitive dependents, Angular modules, build time, and provides clear recommendations for AI usage. Helps determine if a transformation is safe to proceed.';
57
+ description = 'Analyze build impact before transformations. Estimates affected files, transitive dependents, Angular modules, build time, and provides clear recommendations for AI usage. Helps determine if a transformation is safe to proceed. ' +
58
+ 'External .html templates are mapped to their component files. Host components that use a changed component, ' +
59
+ 'directive or pipe only in their template (NgModule declarations) are listed as templateHosts. ' +
60
+ 'The recommendation and counts come first; ' +
61
+ 'use summaryOnly to skip the file lists or maxResults to cap them.';
19
62
  inputSchema = {
20
63
  type: 'object',
21
64
  properties: {
@@ -28,8 +71,16 @@ export class AnalyzeBuildImpactTool {
28
71
  items: {
29
72
  type: 'string',
30
73
  },
31
- description: 'Array of file paths that will be changed (relative to project root or absolute)',
74
+ description: 'Array of file paths that will be changed (relative to project root or absolute). These files are the changed set.',
32
75
  },
76
+ symbols: {
77
+ type: 'array',
78
+ items: {
79
+ type: 'string',
80
+ },
81
+ description: 'Optional exported symbol names of the changed files. When given, only consumers of exactly these symbols count as dependents, and symbolImpacts lists value / type-only consumers per symbol.',
82
+ },
83
+ ...COMPACT_OUTPUT_SCHEMA,
33
84
  },
34
85
  required: ['projectPath', 'filesToChange'],
35
86
  };
@@ -43,52 +94,58 @@ export class AnalyzeBuildImpactTool {
43
94
  }
44
95
  const projectPath = params.projectPath;
45
96
  const filesToChange = params.filesToChange;
97
+ const compact = parseCompactOptions(args);
46
98
  // Validate project path
47
99
  if (!existsSync(projectPath)) {
48
100
  throw new Error(`Project path does not exist: ${projectPath}`);
49
101
  }
50
- const tsConfigPath = join(projectPath, 'tsconfig.json');
51
- if (!existsSync(tsConfigPath)) {
102
+ const tsConfigPath = findTsConfig(projectPath);
103
+ if (!tsConfigPath) {
52
104
  throw new Error(`tsconfig.json not found in project: ${projectPath}`);
53
105
  }
106
+ const symbols = Array.isArray(params.symbols)
107
+ ? params.symbols.filter((s) => typeof s === 'string')
108
+ : [];
54
109
  // Initialize ts-morph project
55
- const project = new Project({
56
- tsConfigFilePath: tsConfigPath,
57
- skipAddingFilesFromTsConfig: false,
58
- });
110
+ // Shared cache in the server (one parse per workspace); a fresh Project otherwise
111
+ const project = this.projects?.get(tsConfigPath) ??
112
+ new Project({
113
+ tsConfigFilePath: tsConfigPath,
114
+ skipAddingFilesFromTsConfig: false,
115
+ });
59
116
  // Normalize file paths to absolute paths
60
- const normalizedFiles = filesToChange.map((file) => {
117
+ const requestedFiles = filesToChange.map((file) => {
61
118
  if (file.startsWith('/')) {
62
119
  return file;
63
120
  }
64
121
  return join(projectPath, file);
65
122
  });
66
- // Validate that all files exist in the project
67
- for (const filePath of normalizedFiles) {
68
- const sourceFile = project.getSourceFile(filePath);
69
- if (!sourceFile) {
70
- throw new Error(`File not found in project: ${filePath}`);
71
- }
123
+ const { changedFiles: normalizedFiles, templateOnlyFiles, mappedFiles, unresolvedFiles, } = this.resolveChangedFiles(project, requestedFiles);
124
+ if (normalizedFiles.length === 0) {
125
+ throw new Error(`No requested file is part of the TypeScript program: ${unresolvedFiles
126
+ .map((u) => `${u.file} (${u.reason})`)
127
+ .join(', ')}`);
72
128
  }
73
129
  // Create IncrementalAnalyzer and get build scope using core infrastructure
74
130
  const incrementalAnalyzer = new IncrementalAnalyzer(project);
75
- // Simulate changed files by providing forceFiles option
131
+ // The requested files ARE the changed set (forceFiles)
76
132
  const buildScope = await incrementalAnalyzer.getBuildScope({
77
133
  forceFiles: normalizedFiles,
134
+ ...(templateOnlyFiles.length > 0 ? { templateOnlyFiles } : {}),
135
+ ...(symbols.length > 0 ? { symbols } : {}),
78
136
  });
79
137
  // Extract build scope information
80
138
  const strategy = buildScope.strategy;
81
139
  const dependentFiles = buildScope.dependentFiles;
82
140
  const affectedModules = buildScope.affectedModules.map((m) => m.moduleName);
83
141
  const estimatedBuildTime = buildScope.estimatedBuildTime;
84
- // Build dependency graph for detailed dependency info
85
- const dependencyGraphBuilder = new DependencyGraphBuilder(project);
86
- await dependencyGraphBuilder.buildGraph();
87
- dependencyGraphBuilder.computeTransitiveDependencies();
142
+ const valueDependentFiles = buildScope.valueDependentFiles ?? dependentFiles;
143
+ const typeOnlyDependentFiles = buildScope.typeOnlyDependentFiles ?? [];
144
+ const templateDependentFiles = buildScope.templateDependentFiles ?? [];
88
145
  // Calculate detailed dependency info for each changed file
89
146
  const dependencies = [];
90
147
  for (const changedFile of normalizedFiles) {
91
- const transitiveDependents = dependencyGraphBuilder.getTransitiveDependents(changedFile);
148
+ const counts = this.getDependentCounts(buildScope, changedFile, normalizedFiles.length);
92
149
  // Check if file is public API
93
150
  const isPublicApi = this.isPublicApiFile(project, changedFile);
94
151
  // Find affected module for this file
@@ -97,33 +154,161 @@ export class AnalyzeBuildImpactTool {
97
154
  // Get dependency info
98
155
  dependencies.push({
99
156
  file: changedFile,
100
- dependents: transitiveDependents.length,
157
+ ...counts,
101
158
  isPublicApi,
102
159
  affectedModule: affectedModule?.moduleName,
103
160
  });
104
161
  }
105
162
  // Generate recommendation
106
163
  const totalAffectedFiles = normalizedFiles.length + dependentFiles.length;
107
- const recommendation = this.generateRecommendation(totalAffectedFiles, strategy, estimatedBuildTime, dependencies);
164
+ const baseRecommendation = this.generateRecommendation(totalAffectedFiles, strategy, estimatedBuildTime, dependencies);
165
+ const typeOnlyNote = typeOnlyDependentFiles.length > 0
166
+ ? ` ${typeOnlyDependentFiles.length} of the dependents import types only (type-check, no JS rebuild).`
167
+ : '';
168
+ const templateNote = templateDependentFiles.length > 0
169
+ ? ` ${templateDependentFiles.length} host component(s) use the changed classes only in their templates (recompile and template type-check), see templateHosts.`
170
+ : '';
171
+ const unresolvedNote = unresolvedFiles.length > 0
172
+ ? ` ${unresolvedFiles.length} requested file(s) could not be analyzed, see unresolvedFiles.`
173
+ : '';
174
+ const recommendation = `${baseRecommendation}${typeOnlyNote}${templateNote}${unresolvedNote}`;
175
+ const reExportFiles = buildScope.reExportFiles ?? [];
176
+ // All affected files (changed + dependents)
177
+ const affectedFiles = [...normalizedFiles, ...dependentFiles];
178
+ const counts = {
179
+ changedFiles: normalizedFiles.length,
180
+ dependentFiles: dependentFiles.length,
181
+ valueDependentFiles: valueDependentFiles.length,
182
+ typeOnlyDependentFiles: typeOnlyDependentFiles.length,
183
+ templateDependentFiles: templateDependentFiles.length,
184
+ reExportFiles: reExportFiles.length,
185
+ affectedFiles: affectedFiles.length,
186
+ affectedModules: affectedModules.length,
187
+ };
188
+ const lists = this.compactLists({
189
+ dependentFiles,
190
+ affectedModules,
191
+ valueDependentFiles,
192
+ typeOnlyDependentFiles,
193
+ templateDependentFiles,
194
+ reExportFiles,
195
+ affectedFiles,
196
+ }, compact);
197
+ const templateHosts = compact.summaryOnly
198
+ ? undefined
199
+ : limitList(toTemplateHosts(buildScope.templateEdges ?? []), compact.maxResults);
108
200
  // Build estimated scope
109
201
  const estimatedBuildScope = {
110
202
  strategy,
111
203
  changedFiles: normalizedFiles,
112
- dependentFiles,
113
- affectedModules,
204
+ ...(lists.dependentFiles ? { dependentFiles: lists.dependentFiles } : {}),
205
+ ...(lists.affectedModules ? { affectedModules: lists.affectedModules } : {}),
114
206
  estimatedBuildTime,
207
+ ...(lists.valueDependentFiles
208
+ ? { valueDependentFiles: lists.valueDependentFiles }
209
+ : {}),
210
+ ...(lists.typeOnlyDependentFiles
211
+ ? { typeOnlyDependentFiles: lists.typeOnlyDependentFiles }
212
+ : {}),
213
+ ...(lists.reExportFiles ? { reExportFiles: lists.reExportFiles } : {}),
214
+ ...(lists.templateDependentFiles && lists.templateDependentFiles.length > 0
215
+ ? { templateDependentFiles: lists.templateDependentFiles }
216
+ : {}),
217
+ changeSource: buildScope.changeSource ?? 'forced',
115
218
  };
116
- // All affected files (changed + dependents)
117
- const affectedFiles = [...normalizedFiles, ...dependentFiles];
118
219
  return {
220
+ recommendation,
221
+ counts,
222
+ truncated: lists.truncated || (templateHosts?.truncated ?? false),
119
223
  estimatedBuildScope,
120
- affectedFiles,
121
- affectedModules,
224
+ ...(lists.affectedFiles ? { affectedFiles: lists.affectedFiles } : {}),
225
+ ...(lists.affectedModules ? { affectedModules: lists.affectedModules } : {}),
122
226
  estimatedBuildTime,
123
- recommendation,
227
+ ...(mappedFiles.length > 0 ? { mappedFiles } : {}),
228
+ ...(unresolvedFiles.length > 0 ? { unresolvedFiles } : {}),
124
229
  dependencies,
230
+ ...(buildScope.symbolImpacts && !compact.summaryOnly
231
+ ? { symbolImpacts: buildScope.symbolImpacts }
232
+ : {}),
233
+ ...(templateHosts && templateHosts.items.length > 0
234
+ ? { templateHosts: templateHosts.items }
235
+ : {}),
125
236
  };
126
237
  }
238
+ /**
239
+ * Splits the requested files into files of the TypeScript program, `.html`
240
+ * templates mapped to their component files, and files that fit neither.
241
+ * Components reached only through their template are returned as
242
+ * `templateOnlyFiles`: they are recompiled, their dependents are not.
243
+ */
244
+ resolveChangedFiles(project, requestedFiles) {
245
+ const changed = new Set();
246
+ const direct = new Set();
247
+ const mappedFiles = [];
248
+ const unresolvedFiles = [];
249
+ for (const file of requestedFiles) {
250
+ if (project.getSourceFile(file)) {
251
+ changed.add(file);
252
+ direct.add(file);
253
+ continue;
254
+ }
255
+ if (!file.endsWith('.html')) {
256
+ unresolvedFiles.push({ file, reason: 'not in the TypeScript program' });
257
+ continue;
258
+ }
259
+ const owners = findTemplateOwnerFiles(project, file);
260
+ if (owners.length === 0) {
261
+ unresolvedFiles.push({ file, reason: 'no component references this template' });
262
+ continue;
263
+ }
264
+ mappedFiles.push({ file, mappedTo: owners });
265
+ owners.forEach((owner) => changed.add(owner));
266
+ }
267
+ return {
268
+ changedFiles: [...changed],
269
+ templateOnlyFiles: [...changed].filter((file) => !direct.has(file)),
270
+ mappedFiles,
271
+ unresolvedFiles,
272
+ };
273
+ }
274
+ /**
275
+ * Applies `summaryOnly` (drop every list) or `maxResults` (cap each list).
276
+ */
277
+ compactLists(lists, compact) {
278
+ if (compact.summaryOnly) {
279
+ return { truncated: false };
280
+ }
281
+ const result = {};
282
+ let truncated = false;
283
+ for (const key of Object.keys(lists)) {
284
+ const limited = limitList(lists[key], compact.maxResults);
285
+ result[key] = limited.items;
286
+ truncated ||= limited.truncated;
287
+ }
288
+ return { ...result, truncated };
289
+ }
290
+ /**
291
+ * Dependent counts for one changed file. Uses the per-file breakdown when
292
+ * available; with a single changed file all dependents belong to it.
293
+ */
294
+ getDependentCounts(buildScope, changedFile, changedFileCount) {
295
+ const fileImpact = buildScope.fileImpacts?.find((impact) => impact.file === changedFile);
296
+ if (fileImpact) {
297
+ const valueDependents = fileImpact.valueDependents.length;
298
+ const typeOnlyDependents = fileImpact.typeOnlyDependents.length;
299
+ const templateDependents = fileImpact.templateDependents?.length ?? 0;
300
+ return {
301
+ dependents: valueDependents + typeOnlyDependents + templateDependents,
302
+ valueDependents,
303
+ typeOnlyDependents,
304
+ ...(templateDependents > 0 ? { templateDependents } : {}),
305
+ };
306
+ }
307
+ if (changedFileCount === 1) {
308
+ return { dependents: buildScope.dependentFiles.length };
309
+ }
310
+ return { dependents: 0 };
311
+ }
127
312
  /**
128
313
  * Generate AI-friendly recommendation
129
314
  */
@@ -134,13 +319,13 @@ export class AnalyzeBuildImpactTool {
134
319
  return `Public API change detected (${totalAffectedFiles} files affected, ~${estimatedBuildTime}s build time). High impact - may affect many files. Consider smaller batch or review dependents carefully.`;
135
320
  }
136
321
  if (totalAffectedFiles <= 10) {
137
- return `Safe to transform, minimal impact (${totalAffectedFiles} files affected, ~${estimatedBuildTime}s build time). Recommended strategy: ${strategy}`;
322
+ return `Safe to transform, minimal impact (${totalAffectedFiles} files affected, ~${estimatedBuildTime}s build time). Recommended strategy: ${strategy}.`;
138
323
  }
139
324
  else if (totalAffectedFiles <= 50) {
140
- return `Medium impact (${totalAffectedFiles} files affected, ~${estimatedBuildTime}s build time). Incremental build recommended. Strategy: ${strategy}`;
325
+ return `Medium impact (${totalAffectedFiles} files affected, ~${estimatedBuildTime}s build time). Incremental build recommended. Strategy: ${strategy}.`;
141
326
  }
142
327
  else {
143
- return `High impact (${totalAffectedFiles} files affected, ~${estimatedBuildTime}s build time). Consider smaller batch or use full build. Strategy: ${strategy}`;
328
+ return `High impact (${totalAffectedFiles} files affected, ~${estimatedBuildTime}s build time). Consider smaller batch or use full build. Strategy: ${strategy}.`;
144
329
  }
145
330
  }
146
331
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-build-impact.js","sourceRoot":"","sources":["../../src/tools/analyze-build-impact.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAiHjC;;GAEG;AACH,MAAM,OAAO,sBAAsB;IACjC,IAAI,GAAG,sBAAsB,CAAC;IAC9B,WAAW,GACT,qOAAqO,CAAC;IAExO,WAAW,GAAG;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8BAA8B;aAC5C;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,WAAW,EACT,iFAAiF;aACpF;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC;KAC3C,CAAC;IAEF,KAAK,CAAC,OAAO,CACX,IAA6B;QAE7B,MAAM,MAAM,GAAG,IAAwC,CAAC;QAExD,IAAI,CAAC,MAAM,CAAC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