@angular-modernizer/adapter-mcp 1.0.0 → 1.1.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 +78 -64
- package/dist/cli.js +8 -0
- package/dist/core/project-analyzer.d.ts +3 -12
- package/dist/core/project-analyzer.js +3 -12
- package/dist/index.d.ts +118 -3
- package/dist/index.js +46 -3
- package/dist/mcp-watcher.d.ts +28 -8
- package/dist/mcp-watcher.js +7 -7
- package/dist/scan-host/scan-host.d.ts +119 -0
- package/dist/scan-host/scan-host.js +376 -0
- package/dist/scan-host/scan-protocol.d.ts +35 -0
- package/dist/scan-host/scan-protocol.js +6 -0
- package/dist/scan-host/scan-worker.d.ts +14 -0
- package/dist/scan-host/scan-worker.js +48 -0
- package/dist/server/limited-stdio-transport.d.ts +7 -0
- package/dist/server/mcp-server.d.ts +11 -7
- package/dist/server/mcp-server.js +4 -7
- package/dist/server/sdk-server.d.ts +1 -0
- package/dist/server/tool-registry.d.ts +3 -7
- package/dist/server/tool-registry.js +1 -7
- package/dist/streaming/progress-store.d.ts +22 -5
- package/dist/streaming/progress-store.js +9 -5
- package/dist/tools/analyze-build-impact.d.ts +56 -34
- package/dist/tools/analyze-build-impact.js +30 -25
- package/dist/tools/analyze-core-to-shared.d.ts +42 -12
- package/dist/tools/analyze-core-to-shared.js +11 -10
- package/dist/tools/analyze-parser-performance.d.ts +23 -22
- package/dist/tools/analyze-parser-performance.js +20 -18
- package/dist/tools/analyze-project.d.ts +82 -12
- package/dist/tools/analyze-project.js +98 -101
- package/dist/tools/check-incremental-compatibility.d.ts +13 -11
- package/dist/tools/check-incremental-compatibility.js +11 -8
- package/dist/tools/collect-feedback.d.ts +41 -26
- package/dist/tools/collect-feedback.js +32 -23
- package/dist/tools/compare-health.d.ts +76 -19
- package/dist/tools/compare-health.js +26 -19
- package/dist/tools/extract-libraries.d.ts +44 -20
- package/dist/tools/extract-libraries.js +16 -17
- package/dist/tools/find-angular-symbol.d.ts +25 -23
- package/dist/tools/find-angular-symbol.js +17 -14
- package/dist/tools/find-component-hosts.d.ts +31 -25
- package/dist/tools/find-component-hosts.js +24 -21
- package/dist/tools/find-usages.d.ts +23 -21
- package/dist/tools/find-usages.js +19 -16
- package/dist/tools/get-bootstrap-execution.d.ts +33 -25
- package/dist/tools/get-bootstrap-execution.js +25 -22
- package/dist/tools/get-call-graph.d.ts +18 -13
- package/dist/tools/get-call-graph.js +24 -21
- package/dist/tools/get-operation-progress-tool.d.ts +12 -6
- package/dist/tools/get-operation-progress-tool.js +11 -6
- package/dist/tools/get-operation-progress.d.ts +26 -0
- package/dist/tools/helpers/analysis-output.d.ts +5 -0
- package/dist/tools/helpers/batch-kernel.d.ts +14 -0
- package/dist/tools/helpers/batch-kernel.js +12 -0
- package/dist/tools/helpers/compact-output.d.ts +2 -1
- package/dist/tools/helpers/compact-output.js +2 -1
- package/dist/tools/helpers/health-delta.d.ts +27 -14
- package/dist/tools/helpers/health-delta.js +11 -14
- package/dist/tools/helpers/project-cache.d.ts +50 -34
- package/dist/tools/helpers/project-cache.js +33 -34
- package/dist/tools/helpers/rule-runner.d.ts +23 -16
- package/dist/tools/helpers/rule-runner.js +24 -17
- package/dist/tools/helpers/scan-engine.d.ts +107 -0
- package/dist/tools/helpers/scan-engine.js +197 -0
- package/dist/tools/helpers/suggestion-generator.d.ts +9 -13
- package/dist/tools/helpers/suggestion-generator.js +0 -12
- package/dist/tools/helpers/tool-cache.d.ts +11 -0
- package/dist/tools/helpers/tool-cache.js +15 -0
- package/dist/tools/helpers/tool-context.d.ts +11 -8
- package/dist/tools/helpers/tool-context.js +5 -8
- package/dist/tools/inspect-form-group.d.ts +32 -25
- package/dist/tools/inspect-form-group.js +24 -21
- package/dist/tools/inspect-i18n.d.ts +28 -22
- package/dist/tools/inspect-i18n.js +20 -17
- package/dist/tools/inspect-template.d.ts +31 -24
- package/dist/tools/inspect-template.js +23 -20
- package/dist/tools/learn-patterns.d.ts +88 -12
- package/dist/tools/learn-patterns.js +17 -11
- package/dist/tools/list-imports.d.ts +42 -25
- package/dist/tools/list-imports.js +23 -20
- package/dist/tools/orchestrate-migration.d.ts +31 -9
- package/dist/tools/orchestrate-migration.js +12 -7
- package/dist/tools/parse-stack-trace.d.ts +23 -21
- package/dist/tools/parse-stack-trace.js +10 -7
- package/dist/tools/plan-migration.d.ts +65 -25
- package/dist/tools/plan-migration.js +19 -19
- package/dist/tools/resolve-type.d.ts +19 -9
- package/dist/tools/resolve-type.js +19 -11
- package/dist/tools/review-feedback.d.ts +27 -24
- package/dist/tools/review-feedback.js +24 -20
- package/dist/tools/rollback-changes.d.ts +13 -9
- package/dist/tools/rollback-changes.js +10 -7
- package/dist/tools/run-angular-cli.d.ts +12 -10
- package/dist/tools/run-angular-cli.js +11 -8
- package/dist/tools/run-build.d.ts +13 -11
- package/dist/tools/run-build.js +11 -8
- package/dist/tools/run-schematic.d.ts +12 -10
- package/dist/tools/run-schematic.js +11 -8
- package/dist/tools/scan-all.d.ts +69 -12
- package/dist/tools/scan-all.js +55 -122
- package/dist/tools/scan-angular.d.ts +41 -9
- package/dist/tools/scan-angular.js +66 -135
- package/dist/tools/scan-architecture.d.ts +75 -14
- package/dist/tools/scan-architecture.js +180 -185
- package/dist/tools/scan-solid.d.ts +40 -9
- package/dist/tools/scan-solid.js +64 -133
- package/dist/tools/search-codebase.d.ts +30 -24
- package/dist/tools/search-codebase.js +13 -10
- package/dist/tools/server-status.d.ts +116 -24
- package/dist/tools/server-status.js +85 -26
- package/dist/tools/suggest-improvements.d.ts +22 -19
- package/dist/tools/suggest-improvements.js +21 -17
- package/dist/tools/trace-output-flow.d.ts +32 -25
- package/dist/tools/trace-output-flow.js +24 -21
- package/dist/tools/transform-code.d.ts +71 -10
- package/dist/tools/transform-code.js +60 -42
- package/dist/tools/validate-before-transform.d.ts +24 -9
- package/dist/tools/validate-before-transform.js +10 -7
- package/dist/tools/validate-project-compatibility.d.ts +18 -13
- package/dist/tools/validate-project-compatibility.js +17 -11
- package/dist/tools/validate-transformation.d.ts +28 -11
- package/dist/tools/validate-transformation.js +14 -8
- package/dist/tools/verify-citations.d.ts +37 -16
- package/dist/tools/verify-citations.js +19 -16
- package/dist/types.d.ts +40 -10
- package/dist/types.js +0 -5
- package/package.json +12 -18
- package/dist/tools/shared/scan-types.d.ts +0 -200
- package/dist/tools/shared/scan-types.js +0 -7
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Shared Scan Tool Types
|
|
3
|
-
*
|
|
4
|
-
* Common types and interfaces used across all scan tools.
|
|
5
|
-
*/
|
|
6
|
-
import type { ParallelOptions } from '@angular-modernizer/core';
|
|
7
|
-
/**
|
|
8
|
-
* Extended orchestration options for MCP scan tools.
|
|
9
|
-
*/
|
|
10
|
-
export interface OrchestrationOptions extends ParallelOptions {
|
|
11
|
-
parallel?: boolean;
|
|
12
|
-
incremental?: boolean;
|
|
13
|
-
baseBranch?: string;
|
|
14
|
-
enableProgress?: boolean;
|
|
15
|
-
resourceLimits?: {
|
|
16
|
-
maxMemory?: number;
|
|
17
|
-
maxWorkers?: number;
|
|
18
|
-
};
|
|
19
|
-
excludePatterns?: string[];
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Scope configuration for targeted scanning.
|
|
23
|
-
*/
|
|
24
|
-
export interface ScanScope {
|
|
25
|
-
/**
|
|
26
|
-
* Type of scope to scan.
|
|
27
|
-
* - 'all': Scan entire project (default)
|
|
28
|
-
* - 'applications': Scan only Angular applications
|
|
29
|
-
* - 'libraries': Scan only Angular libraries
|
|
30
|
-
* - 'modules': Scan specific Angular modules (NgModules)
|
|
31
|
-
* - 'features': Scan specific feature modules
|
|
32
|
-
* - 'folders': Scan specific folders
|
|
33
|
-
*/
|
|
34
|
-
type: 'all' | 'applications' | 'libraries' | 'modules' | 'features' | 'folders';
|
|
35
|
-
/**
|
|
36
|
-
* Specific targets based on scope type.
|
|
37
|
-
* - For 'applications': Application names from angular.json
|
|
38
|
-
* - For 'libraries': Library names from angular.json
|
|
39
|
-
* - For 'modules': NgModule class names
|
|
40
|
-
* - For 'features': Feature module paths
|
|
41
|
-
* - For 'folders': Folder paths relative to project root
|
|
42
|
-
*/
|
|
43
|
-
targets?: string[];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Resolved scope with file patterns.
|
|
47
|
-
*/
|
|
48
|
-
export interface ResolvedScope {
|
|
49
|
-
type: string;
|
|
50
|
-
patterns: string[];
|
|
51
|
-
excludePatterns: string[];
|
|
52
|
-
applications?: {
|
|
53
|
-
name: string;
|
|
54
|
-
root: string;
|
|
55
|
-
}[];
|
|
56
|
-
libraries?: {
|
|
57
|
-
name: string;
|
|
58
|
-
root: string;
|
|
59
|
-
}[];
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Common input parameters for all scan tools.
|
|
63
|
-
*/
|
|
64
|
-
export interface BaseScanInput {
|
|
65
|
-
/**
|
|
66
|
-
* Root path of the project to scan.
|
|
67
|
-
*/
|
|
68
|
-
rootPath: string;
|
|
69
|
-
/**
|
|
70
|
-
* Scope configuration for targeted scanning.
|
|
71
|
-
*/
|
|
72
|
-
scope?: ScanScope;
|
|
73
|
-
/**
|
|
74
|
-
* Specific rules to execute (optional, runs all tool rules if not specified).
|
|
75
|
-
*/
|
|
76
|
-
rules?: string[];
|
|
77
|
-
/**
|
|
78
|
-
* File patterns to include.
|
|
79
|
-
*/
|
|
80
|
-
includePatterns?: string[];
|
|
81
|
-
/**
|
|
82
|
-
* File patterns to exclude.
|
|
83
|
-
*/
|
|
84
|
-
excludePatterns?: string[];
|
|
85
|
-
/**
|
|
86
|
-
* Whether to include auto-fix suggestions.
|
|
87
|
-
*/
|
|
88
|
-
includeAutoFixes?: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* Maximum number of files to analyze (for performance).
|
|
91
|
-
*/
|
|
92
|
-
maxFiles?: number;
|
|
93
|
-
/**
|
|
94
|
-
* Maximum number of violations to return (pagination).
|
|
95
|
-
* @default 1000
|
|
96
|
-
*/
|
|
97
|
-
maxResults?: number;
|
|
98
|
-
/**
|
|
99
|
-
* Offset for result pagination (skip first N violations).
|
|
100
|
-
* @default 0
|
|
101
|
-
*/
|
|
102
|
-
resultOffset?: number;
|
|
103
|
-
/**
|
|
104
|
-
* Advanced orchestration options (Phase 5b/6d/7b).
|
|
105
|
-
*/
|
|
106
|
-
orchestration?: ParallelOptions;
|
|
107
|
-
/**
|
|
108
|
-
* AbortSignal for cancellation support.
|
|
109
|
-
*/
|
|
110
|
-
signal?: AbortSignal;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Violation result from scan tools.
|
|
114
|
-
*/
|
|
115
|
-
export interface ScanViolation {
|
|
116
|
-
id: string;
|
|
117
|
-
ruleId: string;
|
|
118
|
-
severity: 'error' | 'warning' | 'info';
|
|
119
|
-
message: string;
|
|
120
|
-
filePath: string;
|
|
121
|
-
line?: number;
|
|
122
|
-
column?: number;
|
|
123
|
-
category: string;
|
|
124
|
-
suggestedFix?: string;
|
|
125
|
-
metadata?: Record<string, unknown>;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Result from scan tools.
|
|
129
|
-
*/
|
|
130
|
-
export interface BaseScanResult {
|
|
131
|
-
/**
|
|
132
|
-
* All violations found.
|
|
133
|
-
*/
|
|
134
|
-
violations: ScanViolation[];
|
|
135
|
-
/**
|
|
136
|
-
* Summary statistics.
|
|
137
|
-
*/
|
|
138
|
-
summary: {
|
|
139
|
-
totalViolations: number;
|
|
140
|
-
analyzedFiles: number;
|
|
141
|
-
bySeverity: Record<string, number>;
|
|
142
|
-
byCategory: Record<string, number>;
|
|
143
|
-
byRule: Record<string, number>;
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Analysis metadata.
|
|
147
|
-
*/
|
|
148
|
-
metadata: {
|
|
149
|
-
rulesExecuted: string[];
|
|
150
|
-
duration: number;
|
|
151
|
-
projectRoot: string;
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* Resolved scope information.
|
|
155
|
-
*/
|
|
156
|
-
scope?: ResolvedScope;
|
|
157
|
-
/**
|
|
158
|
-
* Orchestration metrics (Phase 5b/6d/7b).
|
|
159
|
-
*/
|
|
160
|
-
orchestration?: {
|
|
161
|
-
parallel: boolean;
|
|
162
|
-
incremental: boolean;
|
|
163
|
-
useWorkerThreads?: boolean;
|
|
164
|
-
autoSelectMode?: boolean;
|
|
165
|
-
filesAnalyzed: number;
|
|
166
|
-
filesSkipped: number;
|
|
167
|
-
cacheHitRate: number;
|
|
168
|
-
duration: number;
|
|
169
|
-
throughput: number;
|
|
170
|
-
workerStats?: {
|
|
171
|
-
completedTasks: number;
|
|
172
|
-
averageTaskDuration: number;
|
|
173
|
-
totalCpuTime: number;
|
|
174
|
-
};
|
|
175
|
-
resourceUsage?: {
|
|
176
|
-
maxWorkers?: number;
|
|
177
|
-
maxMemory?: number;
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Pagination metadata (when pagination is used).
|
|
182
|
-
*/
|
|
183
|
-
pagination?: {
|
|
184
|
-
totalResults: number;
|
|
185
|
-
returnedResults: number;
|
|
186
|
-
offset: number;
|
|
187
|
-
hasMore: boolean;
|
|
188
|
-
};
|
|
189
|
-
/**
|
|
190
|
-
* Progress state (if enableProgress was true).
|
|
191
|
-
*/
|
|
192
|
-
progress?: {
|
|
193
|
-
current: number;
|
|
194
|
-
total: number;
|
|
195
|
-
percentage: number;
|
|
196
|
-
eta?: number;
|
|
197
|
-
phase: string;
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=scan-types.d.ts.map
|