@angular-modernizer/adapter-mcp 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -65
- 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 +58 -36
- package/dist/tools/analyze-build-impact.js +36 -29
- 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 +87 -14
- package/dist/tools/analyze-project.js +140 -122
- 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 +27 -25
- package/dist/tools/find-angular-symbol.js +19 -16
- package/dist/tools/find-component-hosts.d.ts +33 -27
- package/dist/tools/find-component-hosts.js +27 -24
- package/dist/tools/find-usages.d.ts +25 -23
- package/dist/tools/find-usages.js +21 -18
- package/dist/tools/get-bootstrap-execution.d.ts +35 -27
- package/dist/tools/get-bootstrap-execution.js +28 -25
- package/dist/tools/get-call-graph.d.ts +19 -14
- package/dist/tools/get-call-graph.js +26 -23
- 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 +123 -36
- package/dist/tools/helpers/project-cache.js +227 -43
- 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/scan-plan.d.ts +1 -1
- package/dist/tools/helpers/scan-plan.js +1 -1
- 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 +34 -27
- package/dist/tools/inspect-form-group.js +27 -24
- package/dist/tools/inspect-i18n.d.ts +31 -25
- package/dist/tools/inspect-i18n.js +23 -20
- package/dist/tools/inspect-template.d.ts +32 -25
- package/dist/tools/inspect-template.js +26 -23
- package/dist/tools/learn-patterns.d.ts +88 -12
- package/dist/tools/learn-patterns.js +17 -11
- package/dist/tools/list-imports.d.ts +45 -28
- package/dist/tools/list-imports.js +26 -23
- 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 +67 -27
- package/dist/tools/plan-migration.js +22 -21
- package/dist/tools/resolve-type.d.ts +20 -10
- package/dist/tools/resolve-type.js +21 -13
- 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 +32 -26
- package/dist/tools/search-codebase.js +15 -12
- 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 +34 -27
- package/dist/tools/trace-output-flow.js +27 -24
- package/dist/tools/transform-code.d.ts +71 -10
- package/dist/tools/transform-code.js +148 -54
- 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,26 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Analyze Parser Performance Tool
|
|
3
|
-
*
|
|
4
|
-
* MCP tool for analyzing parser performance metrics from transformation feedback sessions.
|
|
5
|
-
* Generates actionable improvement recommendations based on parser behavior and efficiency.
|
|
6
|
-
*
|
|
7
|
-
* Multi-Session Aggregation:
|
|
8
|
-
* - Aggregates metrics across multiple sessions
|
|
9
|
-
* - Calculates average performance statistics
|
|
10
|
-
* - Identifies common improvement opportunities
|
|
11
|
-
*
|
|
12
|
-
* Location Support:
|
|
13
|
-
* - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
|
|
14
|
-
* - Automatic session deduplication by sessionId
|
|
15
|
-
*
|
|
16
|
-
* Parser Configuration & Feedback
|
|
17
|
-
*/
|
|
18
1
|
import { type MCPTool, type ToolAnnotations } from '../types.js';
|
|
19
2
|
import { type ParserImprovementSuggestion } from '@angular-modernizer/core';
|
|
20
3
|
/**
|
|
21
4
|
* Output from analyze-parser-performance tool
|
|
22
5
|
*/
|
|
23
|
-
interface AnalyzeParserPerformanceOutput {
|
|
6
|
+
export interface AnalyzeParserPerformanceOutput {
|
|
24
7
|
/** Number of sessions analyzed */
|
|
25
8
|
sessionsAnalyzed: number;
|
|
26
9
|
/** Total transformations across all sessions */
|
|
@@ -39,7 +22,7 @@ interface AnalyzeParserPerformanceOutput {
|
|
|
39
22
|
/**
|
|
40
23
|
* Aggregated parser metrics across multiple sessions
|
|
41
24
|
*/
|
|
42
|
-
interface AggregatedParserMetrics {
|
|
25
|
+
export interface AggregatedParserMetrics {
|
|
43
26
|
/** Overall strategy distribution */
|
|
44
27
|
strategyDistribution: Record<string, number>;
|
|
45
28
|
/** Average parse time across all sessions */
|
|
@@ -66,7 +49,7 @@ interface AggregatedParserMetrics {
|
|
|
66
49
|
/**
|
|
67
50
|
* Per-session detailed metrics
|
|
68
51
|
*/
|
|
69
|
-
interface SessionMetricsDetail {
|
|
52
|
+
export interface SessionMetricsDetail {
|
|
70
53
|
/** Session identifier */
|
|
71
54
|
sessionId: string;
|
|
72
55
|
/** Number of transformations in this session */
|
|
@@ -79,13 +62,28 @@ interface SessionMetricsDetail {
|
|
|
79
62
|
successRate: number;
|
|
80
63
|
}
|
|
81
64
|
/**
|
|
82
|
-
*
|
|
65
|
+
* MCP tool for analyzing parser performance metrics from transformation feedback sessions.
|
|
66
|
+
* Generates improvement recommendations based on parser behavior and efficiency.
|
|
67
|
+
*
|
|
68
|
+
* @remarks
|
|
69
|
+
* Multi-Session Aggregation:
|
|
70
|
+
* - Aggregates metrics across multiple sessions
|
|
71
|
+
* - Calculates average performance statistics
|
|
72
|
+
* - Identifies common improvement opportunities
|
|
73
|
+
*
|
|
74
|
+
* Location Support:
|
|
75
|
+
* - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
|
|
76
|
+
* - Automatic session deduplication by sessionId
|
|
83
77
|
*/
|
|
84
78
|
export declare class AnalyzeParserPerformanceTool implements MCPTool {
|
|
85
79
|
name: string;
|
|
86
80
|
title: string;
|
|
87
81
|
annotations: ToolAnnotations;
|
|
88
82
|
description: string;
|
|
83
|
+
/**
|
|
84
|
+
* JSON Schema of the tool arguments.
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
89
87
|
inputSchema: {
|
|
90
88
|
readonly type: "object";
|
|
91
89
|
readonly additionalProperties: false;
|
|
@@ -109,6 +107,10 @@ export declare class AnalyzeParserPerformanceTool implements MCPTool {
|
|
|
109
107
|
};
|
|
110
108
|
readonly required: readonly [];
|
|
111
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* JSON Schema of the tool result (`structuredContent`).
|
|
112
|
+
* @hidden
|
|
113
|
+
*/
|
|
112
114
|
outputSchema: {
|
|
113
115
|
type: string;
|
|
114
116
|
properties: {
|
|
@@ -294,5 +296,4 @@ export declare class AnalyzeParserPerformanceTool implements MCPTool {
|
|
|
294
296
|
*/
|
|
295
297
|
private getEmptyAggregatedMetrics;
|
|
296
298
|
}
|
|
297
|
-
export {};
|
|
298
299
|
//# sourceMappingURL=analyze-parser-performance.d.ts.map
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Analyze Parser Performance Tool
|
|
3
|
-
*
|
|
4
|
-
* MCP tool for analyzing parser performance metrics from transformation feedback sessions.
|
|
5
|
-
* Generates actionable improvement recommendations based on parser behavior and efficiency.
|
|
6
|
-
*
|
|
7
|
-
* Multi-Session Aggregation:
|
|
8
|
-
* - Aggregates metrics across multiple sessions
|
|
9
|
-
* - Calculates average performance statistics
|
|
10
|
-
* - Identifies common improvement opportunities
|
|
11
|
-
*
|
|
12
|
-
* Location Support:
|
|
13
|
-
* - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
|
|
14
|
-
* - Automatic session deduplication by sessionId
|
|
15
|
-
*
|
|
16
|
-
* Parser Configuration & Feedback
|
|
17
|
-
*/
|
|
18
1
|
import { FeedbackStorage, ParserFeedbackAnalyzer, loadConfig, } from '@angular-modernizer/core';
|
|
19
2
|
import { countList } from './helpers/analysis-output.js';
|
|
20
3
|
import { STRING_ARRAY } from './helpers/investigation-schemas.js';
|
|
@@ -38,7 +21,18 @@ function describeParserPerformance(output) {
|
|
|
38
21
|
return lines.join('\n');
|
|
39
22
|
}
|
|
40
23
|
/**
|
|
41
|
-
*
|
|
24
|
+
* MCP tool for analyzing parser performance metrics from transformation feedback sessions.
|
|
25
|
+
* Generates improvement recommendations based on parser behavior and efficiency.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* Multi-Session Aggregation:
|
|
29
|
+
* - Aggregates metrics across multiple sessions
|
|
30
|
+
* - Calculates average performance statistics
|
|
31
|
+
* - Identifies common improvement opportunities
|
|
32
|
+
*
|
|
33
|
+
* Location Support:
|
|
34
|
+
* - 'both' (default): the project, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set
|
|
35
|
+
* - Automatic session deduplication by sessionId
|
|
42
36
|
*/
|
|
43
37
|
export class AnalyzeParserPerformanceTool {
|
|
44
38
|
name = 'analyze-parser-performance';
|
|
@@ -53,6 +47,10 @@ export class AnalyzeParserPerformanceTool {
|
|
|
53
47
|
'Generates actionable improvement recommendations based on parser behavior. ' +
|
|
54
48
|
'Reads <projectRoot>/.claude-feedback, plus the platform store when ANGULAR_MODERNIZER_PLATFORM_ROOT is set. ' +
|
|
55
49
|
'Supports multi-session aggregation. summary is a short text of the metrics and the top suggestions.';
|
|
50
|
+
/**
|
|
51
|
+
* JSON Schema of the tool arguments.
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
56
54
|
inputSchema = {
|
|
57
55
|
type: 'object',
|
|
58
56
|
additionalProperties: false,
|
|
@@ -76,6 +74,10 @@ export class AnalyzeParserPerformanceTool {
|
|
|
76
74
|
},
|
|
77
75
|
required: [],
|
|
78
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* JSON Schema of the tool result (`structuredContent`).
|
|
79
|
+
* @hidden
|
|
80
|
+
*/
|
|
79
81
|
outputSchema = {
|
|
80
82
|
type: 'object',
|
|
81
83
|
properties: {
|
|
@@ -1,47 +1,63 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Analyze Project Tool
|
|
3
|
-
*
|
|
4
|
-
* MCP tool for analyzing Angular projects to detect framework,
|
|
5
|
-
* architecture, layers, and technologies.
|
|
6
|
-
*/
|
|
7
1
|
import type { MCPTool, ToolAnnotations, ToolContext } from '../types.js';
|
|
8
2
|
import { type CancelledExecution } from './helpers/tool-context.js';
|
|
9
3
|
/**
|
|
10
4
|
* Result from the analyze-project tool.
|
|
11
5
|
*/
|
|
12
|
-
interface AnalyzeProjectResult {
|
|
6
|
+
export interface AnalyzeProjectResult {
|
|
13
7
|
/**
|
|
14
8
|
* Framework detection results.
|
|
15
9
|
*/
|
|
16
10
|
framework: {
|
|
11
|
+
/** `true` when a framework was recognized. */
|
|
17
12
|
detected: boolean;
|
|
13
|
+
/** Framework name, e.g. Angular CLI or Nx. */
|
|
18
14
|
type: string;
|
|
15
|
+
/** Detection confidence. */
|
|
19
16
|
confidence: number;
|
|
17
|
+
/** Findings that led to the detection. */
|
|
20
18
|
indicators: string[];
|
|
21
19
|
/**
|
|
22
20
|
* All projects in the Angular workspace (applications + libraries).
|
|
23
21
|
*/
|
|
24
22
|
projects?: {
|
|
23
|
+
/** Application projects. */
|
|
25
24
|
applications: {
|
|
25
|
+
/** Project name. */
|
|
26
26
|
name: string;
|
|
27
|
+
/** Project root folder. */
|
|
27
28
|
root: string;
|
|
29
|
+
/** Source root folder. */
|
|
28
30
|
sourceRoot?: string;
|
|
31
|
+
/** `true` when the application has a service worker. */
|
|
29
32
|
hasServiceWorker: boolean;
|
|
33
|
+
/** Path of the service worker configuration. */
|
|
30
34
|
serviceWorkerConfig?: string;
|
|
31
35
|
}[];
|
|
36
|
+
/** Library projects. */
|
|
32
37
|
libraries: {
|
|
38
|
+
/** Project name. */
|
|
33
39
|
name: string;
|
|
40
|
+
/** Project root folder. */
|
|
34
41
|
root: string;
|
|
42
|
+
/** Source root folder. */
|
|
35
43
|
sourceRoot?: string;
|
|
36
44
|
}[];
|
|
37
45
|
};
|
|
46
|
+
/** Offline (PWA) capabilities of the workspace. */
|
|
38
47
|
offlineApp?: {
|
|
48
|
+
/** `true` when offline support was found. */
|
|
39
49
|
detected: boolean;
|
|
50
|
+
/** Findings that led to the detection. */
|
|
40
51
|
indicators: string[];
|
|
52
|
+
/** `true` when a service worker is configured. */
|
|
41
53
|
serviceWorker?: boolean;
|
|
54
|
+
/** Detected PWA features. */
|
|
42
55
|
pwaFeatures?: string[];
|
|
56
|
+
/** Applications with offline support. */
|
|
43
57
|
applications?: {
|
|
58
|
+
/** Project name. */
|
|
44
59
|
name: string;
|
|
60
|
+
/** Path of the service worker configuration. */
|
|
45
61
|
serviceWorkerConfig?: string;
|
|
46
62
|
}[];
|
|
47
63
|
};
|
|
@@ -50,11 +66,17 @@ interface AnalyzeProjectResult {
|
|
|
50
66
|
* Architecture analysis results.
|
|
51
67
|
*/
|
|
52
68
|
architecture: {
|
|
69
|
+
/** Detected architecture pattern. */
|
|
53
70
|
pattern: string;
|
|
71
|
+
/** Detection confidence. */
|
|
54
72
|
confidence: number;
|
|
73
|
+
/** Layers derived from the folder structure and path aliases. */
|
|
55
74
|
layers: {
|
|
75
|
+
/** Layer name. */
|
|
56
76
|
name: string;
|
|
77
|
+
/** Layer folder. */
|
|
57
78
|
path: string;
|
|
79
|
+
/** Short description of the layer's role. */
|
|
58
80
|
purpose: string;
|
|
59
81
|
}[];
|
|
60
82
|
};
|
|
@@ -62,27 +84,39 @@ interface AnalyzeProjectResult {
|
|
|
62
84
|
* Technology stack analysis.
|
|
63
85
|
*/
|
|
64
86
|
technologyStack: {
|
|
87
|
+
/** Languages used in the project. */
|
|
65
88
|
languages: string[];
|
|
89
|
+
/** Frameworks and libraries found. */
|
|
66
90
|
frameworks: string[];
|
|
91
|
+
/** Build tools found. */
|
|
67
92
|
buildTools: string[];
|
|
93
|
+
/** Package manager (`npm`, `yarn` or `pnpm`) from the lock file. */
|
|
68
94
|
packageManager: string;
|
|
69
95
|
};
|
|
70
96
|
/**
|
|
71
97
|
* Analysis results from rules.
|
|
72
98
|
*/
|
|
73
99
|
results: {
|
|
100
|
+
/** Rule that reported the finding. */
|
|
74
101
|
ruleId: string;
|
|
102
|
+
/** Finding message. */
|
|
75
103
|
message: string;
|
|
104
|
+
/** File the finding refers to. */
|
|
76
105
|
filePath: string;
|
|
106
|
+
/** Rule-specific details. */
|
|
77
107
|
metadata?: Record<string, unknown>;
|
|
78
108
|
}[];
|
|
79
109
|
/**
|
|
80
110
|
* Counts of the run.
|
|
81
111
|
*/
|
|
82
112
|
counts: {
|
|
113
|
+
/** Files in the project. */
|
|
83
114
|
totalFiles: number;
|
|
115
|
+
/** Files analyzed by the rules. */
|
|
84
116
|
analyzedFiles: number;
|
|
117
|
+
/** Number of analyzer rules run. */
|
|
85
118
|
rulesExecuted: number;
|
|
119
|
+
/** Duration of the run in milliseconds. */
|
|
86
120
|
duration: number;
|
|
87
121
|
};
|
|
88
122
|
/**
|
|
@@ -93,37 +127,58 @@ interface AnalyzeProjectResult {
|
|
|
93
127
|
* Project metadata.
|
|
94
128
|
*/
|
|
95
129
|
metadata: {
|
|
130
|
+
/** Analyzed project root. */
|
|
96
131
|
projectRoot: string;
|
|
132
|
+
/** tsconfig used for the analysis. */
|
|
97
133
|
tsconfigPath: string;
|
|
134
|
+
/** Path of `package.json`, when found. */
|
|
98
135
|
packageJsonPath?: string;
|
|
136
|
+
/** Path of `angular.json`, when found. */
|
|
99
137
|
angularJsonPath?: string;
|
|
100
138
|
};
|
|
101
139
|
/**
|
|
102
140
|
* Pagination metadata (when pagination is used).
|
|
103
141
|
*/
|
|
104
142
|
pagination?: {
|
|
143
|
+
/** Findings in total. */
|
|
105
144
|
totalResults: number;
|
|
145
|
+
/** Findings in this page. */
|
|
106
146
|
returnedResults: number;
|
|
147
|
+
/** Offset of the page (`resultOffset`). */
|
|
107
148
|
offset: number;
|
|
149
|
+
/** `true` when more findings follow the page. */
|
|
108
150
|
hasMore: boolean;
|
|
109
151
|
};
|
|
110
152
|
/**
|
|
111
|
-
* Orchestration metrics
|
|
153
|
+
* Orchestration metrics, set when `parallel` or `incremental` was requested.
|
|
112
154
|
*/
|
|
113
155
|
orchestration?: {
|
|
156
|
+
/** Parallel execution was requested. */
|
|
114
157
|
parallel: boolean;
|
|
158
|
+
/** Incremental mode was requested. */
|
|
115
159
|
incremental: boolean;
|
|
160
|
+
/** Files skipped by incremental analysis. */
|
|
116
161
|
filesSkipped?: number;
|
|
162
|
+
/** Incremental cache hit rate. */
|
|
117
163
|
cacheHitRate?: number;
|
|
164
|
+
/** Duration of the run in milliseconds. */
|
|
118
165
|
duration: number;
|
|
166
|
+
/** Analyzed files per second. */
|
|
119
167
|
throughput: number;
|
|
168
|
+
/** Heap figures from the kernel's resource stats. */
|
|
120
169
|
memoryUsage?: {
|
|
170
|
+
/** Heap in use. */
|
|
121
171
|
peak: number;
|
|
172
|
+
/** Half of the total heap. */
|
|
122
173
|
average: number;
|
|
123
174
|
};
|
|
175
|
+
/** Statistics of the parallel executor. */
|
|
124
176
|
workerStats?: {
|
|
177
|
+
/** Completed tasks. */
|
|
125
178
|
completedTasks: number;
|
|
179
|
+
/** Average task duration. */
|
|
126
180
|
averageTaskDuration: number;
|
|
181
|
+
/** CPU time of all tasks. */
|
|
127
182
|
totalCpuTime: number;
|
|
128
183
|
};
|
|
129
184
|
};
|
|
@@ -131,26 +186,38 @@ interface AnalyzeProjectResult {
|
|
|
131
186
|
* Progress state (if enableProgress was true).
|
|
132
187
|
*/
|
|
133
188
|
progress?: {
|
|
189
|
+
/** Processed items. */
|
|
134
190
|
current: number;
|
|
191
|
+
/** Items in total. */
|
|
135
192
|
total: number;
|
|
193
|
+
/** Progress in percent. */
|
|
136
194
|
percentage: number;
|
|
195
|
+
/** Estimated time to completion. */
|
|
137
196
|
eta?: number;
|
|
197
|
+
/** Progress type reported by the kernel. */
|
|
138
198
|
phase: string;
|
|
139
199
|
};
|
|
140
200
|
/** Set when the client cancelled the analysis; counts cover the analyzed files. */
|
|
141
201
|
execution?: CancelledExecution;
|
|
142
202
|
}
|
|
143
203
|
/**
|
|
144
|
-
*
|
|
204
|
+
* MCP tool `analyze-project`: detects the framework (Angular CLI, Nx),
|
|
205
|
+
* architecture pattern, layers, workspace projects and technology stack of
|
|
206
|
+
* an Angular project.
|
|
145
207
|
*
|
|
146
|
-
*
|
|
147
|
-
* Uses the Analyzer plugin
|
|
208
|
+
* @remarks
|
|
209
|
+
* Uses the Analyzer plugin. Rule findings are returned only with
|
|
210
|
+
* `includeDetails`, paged by `maxResults` and `resultOffset`.
|
|
148
211
|
*/
|
|
149
212
|
export declare class AnalyzeProjectTool implements MCPTool {
|
|
150
213
|
readonly name = "analyze-project";
|
|
151
214
|
readonly title = "Analyze Project";
|
|
152
215
|
readonly annotations: ToolAnnotations;
|
|
153
216
|
readonly description: string;
|
|
217
|
+
/**
|
|
218
|
+
* JSON Schema of the tool arguments.
|
|
219
|
+
* @hidden
|
|
220
|
+
*/
|
|
154
221
|
readonly inputSchema: {
|
|
155
222
|
type: string;
|
|
156
223
|
additionalProperties: boolean;
|
|
@@ -252,6 +319,10 @@ export declare class AnalyzeProjectTool implements MCPTool {
|
|
|
252
319
|
};
|
|
253
320
|
required: never[];
|
|
254
321
|
};
|
|
322
|
+
/**
|
|
323
|
+
* JSON Schema of the tool result (`structuredContent`).
|
|
324
|
+
* @hidden
|
|
325
|
+
*/
|
|
255
326
|
readonly outputSchema: {
|
|
256
327
|
type: string;
|
|
257
328
|
properties: {
|
|
@@ -530,10 +601,12 @@ export declare class AnalyzeProjectTool implements MCPTool {
|
|
|
530
601
|
*/
|
|
531
602
|
private analyzeTsconfigPaths;
|
|
532
603
|
/**
|
|
533
|
-
*
|
|
534
|
-
*
|
|
604
|
+
* Settings of `tools.analyze-project` from the project's
|
|
605
|
+
* `.angular-modernizer.json` (only from the given root, never from the
|
|
606
|
+
* server's working directory). Only {@link CONFIG_KEYS} are taken; the
|
|
607
|
+
* config used to be read from a top-level `analyze-project` key, which the
|
|
608
|
+
* schema does not allow, so no setting ever applied.
|
|
535
609
|
*/
|
|
536
610
|
private loadConfig;
|
|
537
611
|
}
|
|
538
|
-
export {};
|
|
539
612
|
//# sourceMappingURL=analyze-project.d.ts.map
|