@angular-modernizer/adapter-mcp 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/README.md +188 -235
  2. package/dist/cli.js +77 -27
  3. package/dist/index.d.ts +11 -3
  4. package/dist/index.js +10 -2
  5. package/dist/mcp-watcher.d.ts +6 -1
  6. package/dist/mcp-watcher.js +14 -10
  7. package/dist/server/limited-stdio-transport.d.ts +68 -0
  8. package/dist/server/limited-stdio-transport.js +115 -0
  9. package/dist/server/mcp-server.d.ts +41 -12
  10. package/dist/server/mcp-server.js +113 -94
  11. package/dist/server/package-version.d.ts +16 -0
  12. package/dist/server/package-version.js +37 -0
  13. package/dist/server/sdk-server.d.ts +70 -0
  14. package/dist/server/sdk-server.js +113 -0
  15. package/dist/server/stdio-guard.d.ts +20 -0
  16. package/dist/server/stdio-guard.js +48 -0
  17. package/dist/server/tool-registry.d.ts +3 -2
  18. package/dist/server/tool-registry.js +5 -5
  19. package/dist/tools/analyze-build-impact.d.ts +346 -14
  20. package/dist/tools/analyze-build-impact.js +315 -31
  21. package/dist/tools/analyze-core-to-shared.d.ts +134 -4
  22. package/dist/tools/analyze-core-to-shared.js +113 -9
  23. package/dist/tools/analyze-parser-performance.d.ts +200 -7
  24. package/dist/tools/analyze-parser-performance.js +108 -47
  25. package/dist/tools/analyze-project.d.ts +267 -5
  26. package/dist/tools/analyze-project.js +196 -8
  27. package/dist/tools/check-incremental-compatibility.d.ts +61 -1
  28. package/dist/tools/check-incremental-compatibility.js +58 -2
  29. package/dist/tools/collect-feedback.d.ts +199 -10
  30. package/dist/tools/collect-feedback.js +171 -99
  31. package/dist/tools/compare-health.d.ts +356 -0
  32. package/dist/tools/compare-health.js +472 -0
  33. package/dist/tools/extract-libraries.d.ts +156 -4
  34. package/dist/tools/extract-libraries.js +115 -10
  35. package/dist/tools/find-angular-symbol.d.ts +98 -9
  36. package/dist/tools/find-angular-symbol.js +104 -12
  37. package/dist/tools/find-component-hosts.d.ts +684 -0
  38. package/dist/tools/find-component-hosts.js +441 -0
  39. package/dist/tools/find-usages.d.ts +99 -4
  40. package/dist/tools/find-usages.js +131 -11
  41. package/dist/tools/get-bootstrap-execution.d.ts +258 -0
  42. package/dist/tools/get-bootstrap-execution.js +324 -0
  43. package/dist/tools/get-call-graph.d.ts +139 -4
  44. package/dist/tools/get-call-graph.js +123 -13
  45. package/dist/tools/get-operation-progress-tool.d.ts +114 -2
  46. package/dist/tools/get-operation-progress-tool.js +114 -7
  47. package/dist/tools/get-operation-progress.d.ts +1 -1
  48. package/dist/tools/get-operation-progress.js +5 -5
  49. package/dist/tools/helpers/analysis-output.d.ts +177 -0
  50. package/dist/tools/helpers/analysis-output.js +165 -0
  51. package/dist/tools/helpers/build-schemas.d.ts +36 -0
  52. package/dist/tools/helpers/build-schemas.js +23 -0
  53. package/dist/tools/helpers/citation-file-source.d.ts +10 -0
  54. package/dist/tools/helpers/citation-file-source.js +82 -0
  55. package/dist/tools/helpers/compact-output.d.ts +61 -0
  56. package/dist/tools/helpers/compact-output.js +83 -0
  57. package/dist/tools/helpers/finding-window.d.ts +43 -0
  58. package/dist/tools/helpers/finding-window.js +64 -0
  59. package/dist/tools/helpers/health-delta.d.ts +86 -0
  60. package/dist/tools/helpers/health-delta.js +239 -0
  61. package/dist/tools/helpers/investigation-schemas.d.ts +93 -0
  62. package/dist/tools/helpers/investigation-schemas.js +48 -0
  63. package/dist/tools/helpers/library-imports.d.ts +57 -0
  64. package/dist/tools/helpers/library-imports.js +151 -0
  65. package/dist/tools/helpers/load-source-files.d.ts +30 -0
  66. package/dist/tools/helpers/load-source-files.js +34 -0
  67. package/dist/tools/helpers/output-contract.d.ts +32 -0
  68. package/dist/tools/helpers/output-contract.js +32 -0
  69. package/dist/tools/helpers/platform-root-resolver.d.ts +55 -25
  70. package/dist/tools/helpers/platform-root-resolver.js +75 -48
  71. package/dist/tools/helpers/process-output.d.ts +19 -0
  72. package/dist/tools/helpers/process-output.js +31 -0
  73. package/dist/tools/helpers/project-cache.d.ts +184 -0
  74. package/dist/tools/helpers/project-cache.js +331 -0
  75. package/dist/tools/helpers/project-decorators.d.ts +14 -0
  76. package/dist/tools/helpers/project-decorators.js +22 -0
  77. package/dist/tools/helpers/rule-matcher.js +5 -0
  78. package/dist/tools/helpers/rule-runner.d.ts +72 -0
  79. package/dist/tools/helpers/rule-runner.js +131 -0
  80. package/dist/tools/helpers/scan-cache.d.ts +22 -0
  81. package/dist/tools/helpers/scan-cache.js +34 -0
  82. package/dist/tools/helpers/scan-plan.d.ts +48 -0
  83. package/dist/tools/helpers/scan-plan.js +166 -0
  84. package/dist/tools/helpers/scope-paths.d.ts +17 -0
  85. package/dist/tools/helpers/scope-paths.js +32 -0
  86. package/dist/tools/helpers/stack-frame-file-index.d.ts +10 -0
  87. package/dist/tools/helpers/stack-frame-file-index.js +71 -0
  88. package/dist/tools/helpers/tool-context.d.ts +60 -0
  89. package/dist/tools/helpers/tool-context.js +82 -0
  90. package/dist/tools/helpers/transform-safety.d.ts +40 -0
  91. package/dist/tools/helpers/transform-safety.js +87 -0
  92. package/dist/tools/helpers/validation-output.d.ts +53 -0
  93. package/dist/tools/helpers/validation-output.js +48 -0
  94. package/dist/tools/inspect-form-group.d.ts +324 -0
  95. package/dist/tools/inspect-form-group.js +279 -0
  96. package/dist/tools/inspect-i18n.d.ts +466 -0
  97. package/dist/tools/inspect-i18n.js +400 -0
  98. package/dist/tools/inspect-template.d.ts +320 -0
  99. package/dist/tools/inspect-template.js +324 -0
  100. package/dist/tools/learn-patterns.d.ts +122 -1
  101. package/dist/tools/learn-patterns.js +97 -2
  102. package/dist/tools/list-imports.d.ts +128 -11
  103. package/dist/tools/list-imports.js +128 -8
  104. package/dist/tools/orchestrate-migration.d.ts +129 -5
  105. package/dist/tools/orchestrate-migration.js +166 -12
  106. package/dist/tools/parse-stack-trace.d.ts +59 -2
  107. package/dist/tools/parse-stack-trace.js +52 -4
  108. package/dist/tools/plan-migration.d.ts +418 -1
  109. package/dist/tools/plan-migration.js +355 -8
  110. package/dist/tools/resolve-type.d.ts +42 -1
  111. package/dist/tools/resolve-type.js +37 -4
  112. package/dist/tools/review-feedback.d.ts +206 -11
  113. package/dist/tools/review-feedback.js +132 -51
  114. package/dist/tools/rollback-changes.d.ts +79 -2
  115. package/dist/tools/rollback-changes.js +66 -14
  116. package/dist/tools/run-angular-cli.d.ts +45 -2
  117. package/dist/tools/run-angular-cli.js +67 -7
  118. package/dist/tools/run-build.d.ts +114 -2
  119. package/dist/tools/run-build.js +117 -8
  120. package/dist/tools/run-schematic.d.ts +70 -2
  121. package/dist/tools/run-schematic.js +104 -10
  122. package/dist/tools/scan-all.d.ts +24 -16
  123. package/dist/tools/scan-all.js +145 -137
  124. package/dist/tools/scan-angular.d.ts +20 -11
  125. package/dist/tools/scan-angular.js +52 -24
  126. package/dist/tools/scan-architecture.d.ts +42 -14
  127. package/dist/tools/scan-architecture.js +206 -163
  128. package/dist/tools/scan-solid.d.ts +20 -11
  129. package/dist/tools/scan-solid.js +52 -24
  130. package/dist/tools/search-codebase.d.ts +85 -1
  131. package/dist/tools/search-codebase.js +61 -4
  132. package/dist/tools/server-status.d.ts +370 -0
  133. package/dist/tools/server-status.js +369 -0
  134. package/dist/tools/suggest-improvements.d.ts +97 -5
  135. package/dist/tools/suggest-improvements.js +80 -44
  136. package/dist/tools/trace-output-flow.d.ts +791 -0
  137. package/dist/tools/trace-output-flow.js +668 -0
  138. package/dist/tools/transform-code-batch.d.ts +3 -0
  139. package/dist/tools/transform-code-batch.js +10 -5
  140. package/dist/tools/transform-code.d.ts +335 -12
  141. package/dist/tools/transform-code.js +649 -608
  142. package/dist/tools/validate-before-transform.d.ts +116 -2
  143. package/dist/tools/validate-before-transform.js +55 -2
  144. package/dist/tools/validate-project-compatibility.d.ts +64 -2
  145. package/dist/tools/validate-project-compatibility.js +67 -4
  146. package/dist/tools/validate-transformation.d.ts +220 -2
  147. package/dist/tools/validate-transformation.js +113 -15
  148. package/dist/tools/verify-citations.d.ts +181 -0
  149. package/dist/tools/verify-citations.js +218 -0
  150. package/dist/types.d.ts +45 -1
  151. package/dist/utils/format-tool-response.d.ts +22 -59
  152. package/dist/utils/format-tool-response.js +25 -134
  153. package/package.json +30 -13
  154. package/dist/cli.d.ts.map +0 -1
  155. package/dist/cli.js.map +0 -1
  156. package/dist/core/project-analyzer.d.ts.map +0 -1
  157. package/dist/core/project-analyzer.js.map +0 -1
  158. package/dist/index.d.ts.map +0 -1
  159. package/dist/index.js.map +0 -1
  160. package/dist/mcp-watcher.d.ts.map +0 -1
  161. package/dist/mcp-watcher.js.map +0 -1
  162. package/dist/server/json-rpc-handler.d.ts +0 -57
  163. package/dist/server/json-rpc-handler.d.ts.map +0 -1
  164. package/dist/server/json-rpc-handler.js +0 -222
  165. package/dist/server/json-rpc-handler.js.map +0 -1
  166. package/dist/server/mcp-server.d.ts.map +0 -1
  167. package/dist/server/mcp-server.js.map +0 -1
  168. package/dist/server/tool-registry.d.ts.map +0 -1
  169. package/dist/server/tool-registry.js.map +0 -1
  170. package/dist/streaming/progress-store.d.ts.map +0 -1
  171. package/dist/streaming/progress-store.js.map +0 -1
  172. package/dist/tools/analyze-build-impact.d.ts.map +0 -1
  173. package/dist/tools/analyze-build-impact.js.map +0 -1
  174. package/dist/tools/analyze-core-to-shared.d.ts.map +0 -1
  175. package/dist/tools/analyze-core-to-shared.js.map +0 -1
  176. package/dist/tools/analyze-parser-performance.d.ts.map +0 -1
  177. package/dist/tools/analyze-parser-performance.js.map +0 -1
  178. package/dist/tools/analyze-project.d.ts.map +0 -1
  179. package/dist/tools/analyze-project.js.map +0 -1
  180. package/dist/tools/check-incremental-compatibility.d.ts.map +0 -1
  181. package/dist/tools/check-incremental-compatibility.js.map +0 -1
  182. package/dist/tools/collect-feedback.d.ts.map +0 -1
  183. package/dist/tools/collect-feedback.js.map +0 -1
  184. package/dist/tools/extract-libraries.d.ts.map +0 -1
  185. package/dist/tools/extract-libraries.js.map +0 -1
  186. package/dist/tools/find-angular-symbol.d.ts.map +0 -1
  187. package/dist/tools/find-angular-symbol.js.map +0 -1
  188. package/dist/tools/find-usages.d.ts.map +0 -1
  189. package/dist/tools/find-usages.js.map +0 -1
  190. package/dist/tools/get-call-graph.d.ts.map +0 -1
  191. package/dist/tools/get-call-graph.js.map +0 -1
  192. package/dist/tools/get-operation-progress-tool.d.ts.map +0 -1
  193. package/dist/tools/get-operation-progress-tool.js.map +0 -1
  194. package/dist/tools/get-operation-progress.d.ts.map +0 -1
  195. package/dist/tools/get-operation-progress.js.map +0 -1
  196. package/dist/tools/helpers/feedback-analyzer.d.ts.map +0 -1
  197. package/dist/tools/helpers/feedback-analyzer.js.map +0 -1
  198. package/dist/tools/helpers/find-ts-config.d.ts.map +0 -1
  199. package/dist/tools/helpers/find-ts-config.js.map +0 -1
  200. package/dist/tools/helpers/platform-root-resolver.d.ts.map +0 -1
  201. package/dist/tools/helpers/platform-root-resolver.js.map +0 -1
  202. package/dist/tools/helpers/rule-matcher.d.ts.map +0 -1
  203. package/dist/tools/helpers/rule-matcher.js.map +0 -1
  204. package/dist/tools/helpers/suggestion-generator.d.ts.map +0 -1
  205. package/dist/tools/helpers/suggestion-generator.js.map +0 -1
  206. package/dist/tools/learn-patterns.d.ts.map +0 -1
  207. package/dist/tools/learn-patterns.js.map +0 -1
  208. package/dist/tools/list-imports.d.ts.map +0 -1
  209. package/dist/tools/list-imports.js.map +0 -1
  210. package/dist/tools/orchestrate-migration.d.ts.map +0 -1
  211. package/dist/tools/orchestrate-migration.js.map +0 -1
  212. package/dist/tools/parse-stack-trace.d.ts.map +0 -1
  213. package/dist/tools/parse-stack-trace.js.map +0 -1
  214. package/dist/tools/plan-migration.d.ts.map +0 -1
  215. package/dist/tools/plan-migration.js.map +0 -1
  216. package/dist/tools/resolve-type.d.ts.map +0 -1
  217. package/dist/tools/resolve-type.js.map +0 -1
  218. package/dist/tools/review-feedback.d.ts.map +0 -1
  219. package/dist/tools/review-feedback.js.map +0 -1
  220. package/dist/tools/rollback-changes.d.ts.map +0 -1
  221. package/dist/tools/rollback-changes.js.map +0 -1
  222. package/dist/tools/run-angular-cli.d.ts.map +0 -1
  223. package/dist/tools/run-angular-cli.js.map +0 -1
  224. package/dist/tools/run-build.d.ts.map +0 -1
  225. package/dist/tools/run-build.js.map +0 -1
  226. package/dist/tools/run-schematic.d.ts.map +0 -1
  227. package/dist/tools/run-schematic.js.map +0 -1
  228. package/dist/tools/scan-all.d.ts.map +0 -1
  229. package/dist/tools/scan-all.js.map +0 -1
  230. package/dist/tools/scan-angular.d.ts.map +0 -1
  231. package/dist/tools/scan-angular.js.map +0 -1
  232. package/dist/tools/scan-architecture.d.ts.map +0 -1
  233. package/dist/tools/scan-architecture.js.map +0 -1
  234. package/dist/tools/scan-solid.d.ts.map +0 -1
  235. package/dist/tools/scan-solid.js.map +0 -1
  236. package/dist/tools/search-codebase.d.ts.map +0 -1
  237. package/dist/tools/search-codebase.js.map +0 -1
  238. package/dist/tools/shared/scan-types.d.ts.map +0 -1
  239. package/dist/tools/shared/scan-types.js.map +0 -1
  240. package/dist/tools/suggest-improvements.d.ts.map +0 -1
  241. package/dist/tools/suggest-improvements.js.map +0 -1
  242. package/dist/tools/transform-code-batch.d.ts.map +0 -1
  243. package/dist/tools/transform-code-batch.js.map +0 -1
  244. package/dist/tools/transform-code.d.ts.map +0 -1
  245. package/dist/tools/transform-code.js.map +0 -1
  246. package/dist/tools/validate-before-transform.d.ts.map +0 -1
  247. package/dist/tools/validate-before-transform.js.map +0 -1
  248. package/dist/tools/validate-project-compatibility.d.ts.map +0 -1
  249. package/dist/tools/validate-project-compatibility.js.map +0 -1
  250. package/dist/tools/validate-transformation.d.ts.map +0 -1
  251. package/dist/tools/validate-transformation.js.map +0 -1
  252. package/dist/types.d.ts.map +0 -1
  253. package/dist/types.js.map +0 -1
  254. package/dist/utils/format-tool-response.d.ts.map +0 -1
  255. package/dist/utils/format-tool-response.js.map +0 -1
@@ -8,9 +8,25 @@
8
8
  * resolves tsconfig path aliases, splits value vs type-only dependents and
9
9
  * does not let barrels inflate the radius. Optional `symbols` restrict the
10
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.
11
25
  */
12
- import { type MCPTool } from '../types.js';
26
+ import { type MCPTool, type ToolAnnotations } from '../types.js';
13
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';
14
30
  /**
15
31
  * Build scope strategy
16
32
  */
@@ -30,11 +46,11 @@ interface EstimatedBuildScope {
30
46
  /**
31
47
  * Files that depend on the changed files (transitive dependents)
32
48
  */
33
- dependentFiles: string[];
49
+ dependentFiles?: string[];
34
50
  /**
35
51
  * Affected Angular modules
36
52
  */
37
- affectedModules: string[];
53
+ affectedModules?: string[];
38
54
  /**
39
55
  * Estimated build time in seconds
40
56
  */
@@ -42,15 +58,19 @@ interface EstimatedBuildScope {
42
58
  /**
43
59
  * Dependents that use changed bindings as values (need JS rebuild)
44
60
  */
45
- valueDependentFiles: string[];
61
+ valueDependentFiles?: string[];
46
62
  /**
47
63
  * Dependents that only import types from the changed files (type-check only)
48
64
  */
49
- typeOnlyDependentFiles: string[];
65
+ typeOnlyDependentFiles?: string[];
50
66
  /**
51
67
  * Barrel / re-export files passed through
52
68
  */
53
- reExportFiles: string[];
69
+ reExportFiles?: string[];
70
+ /**
71
+ * Host components that use changed classes only in their templates
72
+ */
73
+ templateDependentFiles?: string[];
54
74
  /**
55
75
  * How the changed set was determined ('forced' = the requested files)
56
76
  */
@@ -76,6 +96,10 @@ interface DependencyInfo {
76
96
  * Number of type-only dependents (type-check only), when known
77
97
  */
78
98
  typeOnlyDependents?: number;
99
+ /**
100
+ * Number of template hosts (recompile, template type-check), when known
101
+ */
102
+ templateDependents?: number;
79
103
  /**
80
104
  * Whether this file is exported from a public API (index.ts)
81
105
  */
@@ -86,47 +110,136 @@ interface DependencyInfo {
86
110
  affectedModule?: string;
87
111
  }
88
112
  /**
89
- * 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.
90
156
  */
91
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;
92
170
  /**
93
171
  * Estimated build scope with strategy and recommendations
94
172
  */
95
173
  estimatedBuildScope: EstimatedBuildScope;
96
174
  /**
97
- * All affected files (changed + dependents)
175
+ * All affected files (changed + dependents); omitted with `summaryOnly`
98
176
  */
99
- affectedFiles: string[];
177
+ affectedFiles?: string[];
100
178
  /**
101
- * Affected Angular module names
179
+ * Affected Angular module names; omitted with `summaryOnly`
102
180
  */
103
- affectedModules: string[];
181
+ affectedModules?: string[];
104
182
  /**
105
183
  * Estimated build time in seconds
106
184
  */
107
185
  estimatedBuildTime: number;
108
186
  /**
109
- * AI-friendly recommendation
187
+ * Requested `.html` files and the component files they were mapped to
110
188
  */
111
- recommendation: string;
189
+ mappedFiles?: MappedFile[];
190
+ /**
191
+ * Requested files that are not in the program and could not be mapped
192
+ */
193
+ unresolvedFiles?: UnresolvedFile[];
112
194
  /**
113
195
  * Detailed dependency information for each changed file
114
196
  */
115
197
  dependencies: DependencyInfo[];
116
198
  /**
117
- * Symbol-level consumers (only when `symbols` was given)
199
+ * Symbol-level consumers (only when `symbols` was given; omitted with `summaryOnly`)
118
200
  */
119
201
  symbolImpacts?: BuildScopeSymbolImpact[];
202
+ /**
203
+ * Template hosts with the classes they use (omitted with `summaryOnly`,
204
+ * capped by `maxResults`)
205
+ */
206
+ templateHosts?: TemplateHost[];
207
+ /**
208
+ * Human-readable summary for LLM consumption: the recommendation and the counts
209
+ */
210
+ summary: string;
211
+ /**
212
+ * Conditions that can make the result incomplete (unresolved library imports)
213
+ */
214
+ warnings?: string[];
120
215
  }
121
216
  /**
122
217
  * MCP tool for analyzing build impact before transformations.
123
218
  */
124
219
  export declare class AnalyzeBuildImpactTool implements MCPTool {
220
+ private readonly projects?;
221
+ /**
222
+ * @param projects - Shared project cache; without it every call parses the
223
+ * workspace anew.
224
+ */
225
+ constructor(projects?: ProjectCache | undefined);
125
226
  name: string;
227
+ title: string;
228
+ annotations: ToolAnnotations;
126
229
  description: string;
127
230
  inputSchema: {
128
231
  type: string;
232
+ additionalProperties: boolean;
129
233
  properties: {
234
+ summaryOnly: {
235
+ readonly type: "boolean";
236
+ readonly description: "Return counts and the text summary only, without the result list. Default: false.";
237
+ readonly default: false;
238
+ };
239
+ maxResults: {
240
+ readonly type: "number";
241
+ readonly description: string;
242
+ };
130
243
  projectPath: {
131
244
  type: string;
132
245
  description: string;
@@ -148,7 +261,226 @@ export declare class AnalyzeBuildImpactTool implements MCPTool {
148
261
  };
149
262
  required: string[];
150
263
  };
264
+ outputSchema: {
265
+ type: string;
266
+ properties: {
267
+ warnings: {
268
+ readonly type: "array";
269
+ readonly items: {
270
+ readonly type: "string";
271
+ };
272
+ readonly description: "Conditions that can make the result incomplete, e.g. library imports that do not resolve because node_modules is missing.";
273
+ };
274
+ recommendation: {
275
+ type: string;
276
+ };
277
+ counts: {
278
+ type: string;
279
+ properties: {
280
+ [k: string]: {
281
+ type: string;
282
+ };
283
+ };
284
+ required: ("changedFiles" | "dependentFiles" | "valueDependentFiles" | "typeOnlyDependentFiles" | "templateDependentFiles" | "reExportFiles" | "affectedFiles" | "affectedModules")[];
285
+ };
286
+ truncated: {
287
+ type: string;
288
+ };
289
+ estimatedBuildScope: {
290
+ type: string;
291
+ properties: {
292
+ strategy: {
293
+ type: string;
294
+ };
295
+ changedFiles: {
296
+ readonly type: "array";
297
+ readonly items: {
298
+ readonly type: "string";
299
+ };
300
+ };
301
+ dependentFiles: {
302
+ readonly type: "array";
303
+ readonly items: {
304
+ readonly type: "string";
305
+ };
306
+ };
307
+ affectedModules: {
308
+ readonly type: "array";
309
+ readonly items: {
310
+ readonly type: "string";
311
+ };
312
+ };
313
+ estimatedBuildTime: {
314
+ type: string;
315
+ };
316
+ valueDependentFiles: {
317
+ readonly type: "array";
318
+ readonly items: {
319
+ readonly type: "string";
320
+ };
321
+ };
322
+ typeOnlyDependentFiles: {
323
+ readonly type: "array";
324
+ readonly items: {
325
+ readonly type: "string";
326
+ };
327
+ };
328
+ reExportFiles: {
329
+ readonly type: "array";
330
+ readonly items: {
331
+ readonly type: "string";
332
+ };
333
+ };
334
+ templateDependentFiles: {
335
+ readonly type: "array";
336
+ readonly items: {
337
+ readonly type: "string";
338
+ };
339
+ };
340
+ changeSource: {
341
+ type: string;
342
+ };
343
+ };
344
+ required: string[];
345
+ };
346
+ affectedFiles: {
347
+ readonly type: "array";
348
+ readonly items: {
349
+ readonly type: "string";
350
+ };
351
+ };
352
+ affectedModules: {
353
+ readonly type: "array";
354
+ readonly items: {
355
+ readonly type: "string";
356
+ };
357
+ };
358
+ estimatedBuildTime: {
359
+ type: string;
360
+ };
361
+ mappedFiles: {
362
+ type: string;
363
+ items: {
364
+ type: string;
365
+ properties: {
366
+ file: {
367
+ type: string;
368
+ };
369
+ mappedTo: {
370
+ readonly type: "array";
371
+ readonly items: {
372
+ readonly type: "string";
373
+ };
374
+ };
375
+ };
376
+ required: string[];
377
+ };
378
+ };
379
+ unresolvedFiles: {
380
+ type: string;
381
+ items: {
382
+ type: string;
383
+ properties: {
384
+ file: {
385
+ type: string;
386
+ };
387
+ reason: {
388
+ type: string;
389
+ };
390
+ };
391
+ required: string[];
392
+ };
393
+ };
394
+ dependencies: {
395
+ type: string;
396
+ items: {
397
+ type: string;
398
+ properties: {
399
+ file: {
400
+ type: string;
401
+ };
402
+ dependents: {
403
+ type: string;
404
+ };
405
+ valueDependents: {
406
+ type: string;
407
+ };
408
+ typeOnlyDependents: {
409
+ type: string;
410
+ };
411
+ templateDependents: {
412
+ type: string;
413
+ };
414
+ isPublicApi: {
415
+ type: string;
416
+ };
417
+ affectedModule: {
418
+ type: string;
419
+ };
420
+ };
421
+ required: string[];
422
+ };
423
+ };
424
+ symbolImpacts: {
425
+ type: string;
426
+ items: {
427
+ type: string;
428
+ };
429
+ };
430
+ templateHosts: {
431
+ type: string;
432
+ items: {
433
+ type: string;
434
+ properties: {
435
+ file: {
436
+ type: string;
437
+ };
438
+ component: {
439
+ type: string;
440
+ };
441
+ uses: {
442
+ type: string;
443
+ items: {
444
+ type: string;
445
+ properties: {
446
+ className: {
447
+ type: string;
448
+ };
449
+ via: {
450
+ type: string;
451
+ };
452
+ file: {
453
+ type: string;
454
+ };
455
+ templateFile: {
456
+ type: string;
457
+ };
458
+ };
459
+ required: string[];
460
+ };
461
+ };
462
+ };
463
+ required: string[];
464
+ };
465
+ };
466
+ summary: {
467
+ type: string;
468
+ };
469
+ };
470
+ required: string[];
471
+ };
151
472
  execute(args: Record<string, unknown>): Promise<AnalyzeBuildImpactOutput>;
473
+ /**
474
+ * Splits the requested files into files of the TypeScript program, `.html`
475
+ * templates mapped to their component files, and files that fit neither.
476
+ * Components reached only through their template are returned as
477
+ * `templateOnlyFiles`: they are recompiled, their dependents are not.
478
+ */
479
+ private resolveChangedFiles;
480
+ /**
481
+ * Applies `summaryOnly` (drop every list) or `maxResults` (cap each list).
482
+ */
483
+ private compactLists;
152
484
  /**
153
485
  * Dependent counts for one changed file. Uses the per-file breakdown when
154
486
  * available; with a single changed file all dependents belong to it.