@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.
- package/README.md +188 -235
- package/dist/cli.js +77 -27
- package/dist/index.d.ts +11 -3
- package/dist/index.js +10 -2
- package/dist/mcp-watcher.d.ts +6 -1
- package/dist/mcp-watcher.js +14 -10
- package/dist/server/limited-stdio-transport.d.ts +68 -0
- package/dist/server/limited-stdio-transport.js +115 -0
- package/dist/server/mcp-server.d.ts +41 -12
- package/dist/server/mcp-server.js +113 -94
- package/dist/server/package-version.d.ts +16 -0
- package/dist/server/package-version.js +37 -0
- package/dist/server/sdk-server.d.ts +70 -0
- package/dist/server/sdk-server.js +113 -0
- package/dist/server/stdio-guard.d.ts +20 -0
- package/dist/server/stdio-guard.js +48 -0
- package/dist/server/tool-registry.d.ts +3 -2
- package/dist/server/tool-registry.js +5 -5
- package/dist/tools/analyze-build-impact.d.ts +346 -14
- package/dist/tools/analyze-build-impact.js +315 -31
- package/dist/tools/analyze-core-to-shared.d.ts +134 -4
- package/dist/tools/analyze-core-to-shared.js +113 -9
- package/dist/tools/analyze-parser-performance.d.ts +200 -7
- package/dist/tools/analyze-parser-performance.js +108 -47
- package/dist/tools/analyze-project.d.ts +267 -5
- package/dist/tools/analyze-project.js +196 -8
- package/dist/tools/check-incremental-compatibility.d.ts +61 -1
- package/dist/tools/check-incremental-compatibility.js +58 -2
- package/dist/tools/collect-feedback.d.ts +199 -10
- package/dist/tools/collect-feedback.js +171 -99
- package/dist/tools/compare-health.d.ts +356 -0
- package/dist/tools/compare-health.js +472 -0
- package/dist/tools/extract-libraries.d.ts +156 -4
- package/dist/tools/extract-libraries.js +115 -10
- package/dist/tools/find-angular-symbol.d.ts +98 -9
- package/dist/tools/find-angular-symbol.js +104 -12
- package/dist/tools/find-component-hosts.d.ts +684 -0
- package/dist/tools/find-component-hosts.js +441 -0
- package/dist/tools/find-usages.d.ts +99 -4
- package/dist/tools/find-usages.js +131 -11
- package/dist/tools/get-bootstrap-execution.d.ts +258 -0
- package/dist/tools/get-bootstrap-execution.js +324 -0
- package/dist/tools/get-call-graph.d.ts +139 -4
- package/dist/tools/get-call-graph.js +123 -13
- package/dist/tools/get-operation-progress-tool.d.ts +114 -2
- package/dist/tools/get-operation-progress-tool.js +114 -7
- package/dist/tools/get-operation-progress.d.ts +1 -1
- package/dist/tools/get-operation-progress.js +5 -5
- package/dist/tools/helpers/analysis-output.d.ts +177 -0
- package/dist/tools/helpers/analysis-output.js +165 -0
- package/dist/tools/helpers/build-schemas.d.ts +36 -0
- package/dist/tools/helpers/build-schemas.js +23 -0
- package/dist/tools/helpers/citation-file-source.d.ts +10 -0
- package/dist/tools/helpers/citation-file-source.js +82 -0
- package/dist/tools/helpers/compact-output.d.ts +61 -0
- package/dist/tools/helpers/compact-output.js +83 -0
- package/dist/tools/helpers/finding-window.d.ts +43 -0
- package/dist/tools/helpers/finding-window.js +64 -0
- package/dist/tools/helpers/health-delta.d.ts +86 -0
- package/dist/tools/helpers/health-delta.js +239 -0
- package/dist/tools/helpers/investigation-schemas.d.ts +93 -0
- package/dist/tools/helpers/investigation-schemas.js +48 -0
- package/dist/tools/helpers/library-imports.d.ts +57 -0
- package/dist/tools/helpers/library-imports.js +151 -0
- package/dist/tools/helpers/load-source-files.d.ts +30 -0
- package/dist/tools/helpers/load-source-files.js +34 -0
- package/dist/tools/helpers/output-contract.d.ts +32 -0
- package/dist/tools/helpers/output-contract.js +32 -0
- package/dist/tools/helpers/platform-root-resolver.d.ts +55 -25
- package/dist/tools/helpers/platform-root-resolver.js +75 -48
- package/dist/tools/helpers/process-output.d.ts +19 -0
- package/dist/tools/helpers/process-output.js +31 -0
- package/dist/tools/helpers/project-cache.d.ts +184 -0
- package/dist/tools/helpers/project-cache.js +331 -0
- package/dist/tools/helpers/project-decorators.d.ts +14 -0
- package/dist/tools/helpers/project-decorators.js +22 -0
- package/dist/tools/helpers/rule-matcher.js +5 -0
- package/dist/tools/helpers/rule-runner.d.ts +72 -0
- package/dist/tools/helpers/rule-runner.js +131 -0
- package/dist/tools/helpers/scan-cache.d.ts +22 -0
- package/dist/tools/helpers/scan-cache.js +34 -0
- package/dist/tools/helpers/scan-plan.d.ts +48 -0
- package/dist/tools/helpers/scan-plan.js +166 -0
- package/dist/tools/helpers/scope-paths.d.ts +17 -0
- package/dist/tools/helpers/scope-paths.js +32 -0
- package/dist/tools/helpers/stack-frame-file-index.d.ts +10 -0
- package/dist/tools/helpers/stack-frame-file-index.js +71 -0
- package/dist/tools/helpers/tool-context.d.ts +60 -0
- package/dist/tools/helpers/tool-context.js +82 -0
- package/dist/tools/helpers/transform-safety.d.ts +40 -0
- package/dist/tools/helpers/transform-safety.js +87 -0
- package/dist/tools/helpers/validation-output.d.ts +53 -0
- package/dist/tools/helpers/validation-output.js +48 -0
- package/dist/tools/inspect-form-group.d.ts +324 -0
- package/dist/tools/inspect-form-group.js +279 -0
- package/dist/tools/inspect-i18n.d.ts +466 -0
- package/dist/tools/inspect-i18n.js +400 -0
- package/dist/tools/inspect-template.d.ts +320 -0
- package/dist/tools/inspect-template.js +324 -0
- package/dist/tools/learn-patterns.d.ts +122 -1
- package/dist/tools/learn-patterns.js +97 -2
- package/dist/tools/list-imports.d.ts +128 -11
- package/dist/tools/list-imports.js +128 -8
- package/dist/tools/orchestrate-migration.d.ts +129 -5
- package/dist/tools/orchestrate-migration.js +166 -12
- package/dist/tools/parse-stack-trace.d.ts +59 -2
- package/dist/tools/parse-stack-trace.js +52 -4
- package/dist/tools/plan-migration.d.ts +418 -1
- package/dist/tools/plan-migration.js +355 -8
- package/dist/tools/resolve-type.d.ts +42 -1
- package/dist/tools/resolve-type.js +37 -4
- package/dist/tools/review-feedback.d.ts +206 -11
- package/dist/tools/review-feedback.js +132 -51
- package/dist/tools/rollback-changes.d.ts +79 -2
- package/dist/tools/rollback-changes.js +66 -14
- package/dist/tools/run-angular-cli.d.ts +45 -2
- package/dist/tools/run-angular-cli.js +67 -7
- package/dist/tools/run-build.d.ts +114 -2
- package/dist/tools/run-build.js +117 -8
- package/dist/tools/run-schematic.d.ts +70 -2
- package/dist/tools/run-schematic.js +104 -10
- package/dist/tools/scan-all.d.ts +24 -16
- package/dist/tools/scan-all.js +145 -137
- package/dist/tools/scan-angular.d.ts +20 -11
- package/dist/tools/scan-angular.js +52 -24
- package/dist/tools/scan-architecture.d.ts +42 -14
- package/dist/tools/scan-architecture.js +206 -163
- package/dist/tools/scan-solid.d.ts +20 -11
- package/dist/tools/scan-solid.js +52 -24
- package/dist/tools/search-codebase.d.ts +85 -1
- package/dist/tools/search-codebase.js +61 -4
- package/dist/tools/server-status.d.ts +370 -0
- package/dist/tools/server-status.js +369 -0
- package/dist/tools/suggest-improvements.d.ts +97 -5
- package/dist/tools/suggest-improvements.js +80 -44
- package/dist/tools/trace-output-flow.d.ts +791 -0
- package/dist/tools/trace-output-flow.js +668 -0
- package/dist/tools/transform-code-batch.d.ts +3 -0
- package/dist/tools/transform-code-batch.js +10 -5
- package/dist/tools/transform-code.d.ts +335 -12
- package/dist/tools/transform-code.js +649 -608
- package/dist/tools/validate-before-transform.d.ts +116 -2
- package/dist/tools/validate-before-transform.js +55 -2
- package/dist/tools/validate-project-compatibility.d.ts +64 -2
- package/dist/tools/validate-project-compatibility.js +67 -4
- package/dist/tools/validate-transformation.d.ts +220 -2
- package/dist/tools/validate-transformation.js +113 -15
- package/dist/tools/verify-citations.d.ts +181 -0
- package/dist/tools/verify-citations.js +218 -0
- package/dist/types.d.ts +45 -1
- package/dist/utils/format-tool-response.d.ts +22 -59
- package/dist/utils/format-tool-response.js +25 -134
- package/package.json +30 -13
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/core/project-analyzer.d.ts.map +0 -1
- package/dist/core/project-analyzer.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mcp-watcher.d.ts.map +0 -1
- package/dist/mcp-watcher.js.map +0 -1
- package/dist/server/json-rpc-handler.d.ts +0 -57
- package/dist/server/json-rpc-handler.d.ts.map +0 -1
- package/dist/server/json-rpc-handler.js +0 -222
- package/dist/server/json-rpc-handler.js.map +0 -1
- package/dist/server/mcp-server.d.ts.map +0 -1
- package/dist/server/mcp-server.js.map +0 -1
- package/dist/server/tool-registry.d.ts.map +0 -1
- package/dist/server/tool-registry.js.map +0 -1
- package/dist/streaming/progress-store.d.ts.map +0 -1
- package/dist/streaming/progress-store.js.map +0 -1
- package/dist/tools/analyze-build-impact.d.ts.map +0 -1
- package/dist/tools/analyze-build-impact.js.map +0 -1
- package/dist/tools/analyze-core-to-shared.d.ts.map +0 -1
- package/dist/tools/analyze-core-to-shared.js.map +0 -1
- package/dist/tools/analyze-parser-performance.d.ts.map +0 -1
- package/dist/tools/analyze-parser-performance.js.map +0 -1
- package/dist/tools/analyze-project.d.ts.map +0 -1
- package/dist/tools/analyze-project.js.map +0 -1
- package/dist/tools/check-incremental-compatibility.d.ts.map +0 -1
- package/dist/tools/check-incremental-compatibility.js.map +0 -1
- package/dist/tools/collect-feedback.d.ts.map +0 -1
- package/dist/tools/collect-feedback.js.map +0 -1
- package/dist/tools/extract-libraries.d.ts.map +0 -1
- package/dist/tools/extract-libraries.js.map +0 -1
- package/dist/tools/find-angular-symbol.d.ts.map +0 -1
- package/dist/tools/find-angular-symbol.js.map +0 -1
- package/dist/tools/find-usages.d.ts.map +0 -1
- package/dist/tools/find-usages.js.map +0 -1
- package/dist/tools/get-call-graph.d.ts.map +0 -1
- package/dist/tools/get-call-graph.js.map +0 -1
- package/dist/tools/get-operation-progress-tool.d.ts.map +0 -1
- package/dist/tools/get-operation-progress-tool.js.map +0 -1
- package/dist/tools/get-operation-progress.d.ts.map +0 -1
- package/dist/tools/get-operation-progress.js.map +0 -1
- package/dist/tools/helpers/feedback-analyzer.d.ts.map +0 -1
- package/dist/tools/helpers/feedback-analyzer.js.map +0 -1
- package/dist/tools/helpers/find-ts-config.d.ts.map +0 -1
- package/dist/tools/helpers/find-ts-config.js.map +0 -1
- package/dist/tools/helpers/platform-root-resolver.d.ts.map +0 -1
- package/dist/tools/helpers/platform-root-resolver.js.map +0 -1
- package/dist/tools/helpers/rule-matcher.d.ts.map +0 -1
- package/dist/tools/helpers/rule-matcher.js.map +0 -1
- package/dist/tools/helpers/suggestion-generator.d.ts.map +0 -1
- package/dist/tools/helpers/suggestion-generator.js.map +0 -1
- package/dist/tools/learn-patterns.d.ts.map +0 -1
- package/dist/tools/learn-patterns.js.map +0 -1
- package/dist/tools/list-imports.d.ts.map +0 -1
- package/dist/tools/list-imports.js.map +0 -1
- package/dist/tools/orchestrate-migration.d.ts.map +0 -1
- package/dist/tools/orchestrate-migration.js.map +0 -1
- package/dist/tools/parse-stack-trace.d.ts.map +0 -1
- package/dist/tools/parse-stack-trace.js.map +0 -1
- package/dist/tools/plan-migration.d.ts.map +0 -1
- package/dist/tools/plan-migration.js.map +0 -1
- package/dist/tools/resolve-type.d.ts.map +0 -1
- package/dist/tools/resolve-type.js.map +0 -1
- package/dist/tools/review-feedback.d.ts.map +0 -1
- package/dist/tools/review-feedback.js.map +0 -1
- package/dist/tools/rollback-changes.d.ts.map +0 -1
- package/dist/tools/rollback-changes.js.map +0 -1
- package/dist/tools/run-angular-cli.d.ts.map +0 -1
- package/dist/tools/run-angular-cli.js.map +0 -1
- package/dist/tools/run-build.d.ts.map +0 -1
- package/dist/tools/run-build.js.map +0 -1
- package/dist/tools/run-schematic.d.ts.map +0 -1
- package/dist/tools/run-schematic.js.map +0 -1
- package/dist/tools/scan-all.d.ts.map +0 -1
- package/dist/tools/scan-all.js.map +0 -1
- package/dist/tools/scan-angular.d.ts.map +0 -1
- package/dist/tools/scan-angular.js.map +0 -1
- package/dist/tools/scan-architecture.d.ts.map +0 -1
- package/dist/tools/scan-architecture.js.map +0 -1
- package/dist/tools/scan-solid.d.ts.map +0 -1
- package/dist/tools/scan-solid.js.map +0 -1
- package/dist/tools/search-codebase.d.ts.map +0 -1
- package/dist/tools/search-codebase.js.map +0 -1
- package/dist/tools/shared/scan-types.d.ts.map +0 -1
- package/dist/tools/shared/scan-types.js.map +0 -1
- package/dist/tools/suggest-improvements.d.ts.map +0 -1
- package/dist/tools/suggest-improvements.js.map +0 -1
- package/dist/tools/transform-code-batch.d.ts.map +0 -1
- package/dist/tools/transform-code-batch.js.map +0 -1
- package/dist/tools/transform-code.d.ts.map +0 -1
- package/dist/tools/transform-code.js.map +0 -1
- package/dist/tools/validate-before-transform.d.ts.map +0 -1
- package/dist/tools/validate-before-transform.js.map +0 -1
- package/dist/tools/validate-project-compatibility.d.ts.map +0 -1
- package/dist/tools/validate-project-compatibility.js.map +0 -1
- package/dist/tools/validate-transformation.d.ts.map +0 -1
- package/dist/tools/validate-transformation.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/format-tool-response.d.ts.map +0 -1
- 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
|
|
49
|
+
dependentFiles?: string[];
|
|
34
50
|
/**
|
|
35
51
|
* Affected Angular modules
|
|
36
52
|
*/
|
|
37
|
-
affectedModules
|
|
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
|
|
61
|
+
valueDependentFiles?: string[];
|
|
46
62
|
/**
|
|
47
63
|
* Dependents that only import types from the changed files (type-check only)
|
|
48
64
|
*/
|
|
49
|
-
typeOnlyDependentFiles
|
|
65
|
+
typeOnlyDependentFiles?: string[];
|
|
50
66
|
/**
|
|
51
67
|
* Barrel / re-export files passed through
|
|
52
68
|
*/
|
|
53
|
-
reExportFiles
|
|
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
|
-
*
|
|
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
|
|
177
|
+
affectedFiles?: string[];
|
|
100
178
|
/**
|
|
101
|
-
* Affected Angular module names
|
|
179
|
+
* Affected Angular module names; omitted with `summaryOnly`
|
|
102
180
|
*/
|
|
103
|
-
affectedModules
|
|
181
|
+
affectedModules?: string[];
|
|
104
182
|
/**
|
|
105
183
|
* Estimated build time in seconds
|
|
106
184
|
*/
|
|
107
185
|
estimatedBuildTime: number;
|
|
108
186
|
/**
|
|
109
|
-
*
|
|
187
|
+
* Requested `.html` files and the component files they were mapped to
|
|
110
188
|
*/
|
|
111
|
-
|
|
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.
|