@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,16 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Validate Transformation Tool
|
|
3
|
-
*
|
|
4
|
-
* MCP tool for validating code after transformation to ensure changes
|
|
5
|
-
* didn't break anything. Supports both legacy validation (PostTransformValidator)
|
|
6
|
-
* and modern incremental build validation (IncrementalBuildValidator) for 2-4x speedup.
|
|
7
|
-
*/
|
|
8
1
|
import { type MCPTool, type ToolAnnotations, type ToolContext } from '../types.js';
|
|
9
2
|
import { type IncompatibilityCheck } from '@angular-modernizer/core';
|
|
10
3
|
/**
|
|
11
4
|
* Incremental build metadata
|
|
12
5
|
*/
|
|
13
|
-
interface IncrementalMetadata {
|
|
6
|
+
export interface IncrementalMetadata {
|
|
14
7
|
/**
|
|
15
8
|
* Whether incremental mode was enabled
|
|
16
9
|
*/
|
|
@@ -47,7 +40,7 @@ interface IncrementalMetadata {
|
|
|
47
40
|
/**
|
|
48
41
|
* Validation result.
|
|
49
42
|
*/
|
|
50
|
-
interface ValidationResult {
|
|
43
|
+
export interface ValidationResult {
|
|
51
44
|
/**
|
|
52
45
|
* Whether validation passed (no errors).
|
|
53
46
|
*/
|
|
@@ -56,12 +49,19 @@ interface ValidationResult {
|
|
|
56
49
|
* Validation issues found.
|
|
57
50
|
*/
|
|
58
51
|
issues: {
|
|
52
|
+
/** Check that reported the issue. */
|
|
59
53
|
type: 'syntax' | 'build' | 'test' | 'lint';
|
|
54
|
+
/** Severity; only errors make the file not valid. */
|
|
60
55
|
severity: 'error' | 'warning' | 'info';
|
|
56
|
+
/** Issue description. */
|
|
61
57
|
message: string;
|
|
58
|
+
/** File the issue was found in. */
|
|
62
59
|
filePath?: string;
|
|
60
|
+
/** Line of the issue (1-based). */
|
|
63
61
|
line?: number;
|
|
62
|
+
/** Column of the issue. */
|
|
64
63
|
column?: number;
|
|
64
|
+
/** Additional details of the issue. */
|
|
65
65
|
details?: string;
|
|
66
66
|
}[];
|
|
67
67
|
/**
|
|
@@ -72,10 +72,15 @@ interface ValidationResult {
|
|
|
72
72
|
* Metadata about validation.
|
|
73
73
|
*/
|
|
74
74
|
metadata: {
|
|
75
|
+
/** Validated file. */
|
|
75
76
|
filePath: string;
|
|
77
|
+
/** Whether build validation was requested. */
|
|
76
78
|
buildValidation: boolean;
|
|
79
|
+
/** Whether test validation was requested. */
|
|
77
80
|
testValidation: boolean;
|
|
81
|
+
/** Whether lint validation was requested. */
|
|
78
82
|
lintValidation: boolean;
|
|
83
|
+
/** Project root the validation ran in. */
|
|
79
84
|
cwd?: string;
|
|
80
85
|
/** Build command that ran (legacy validation). */
|
|
81
86
|
buildCommand?: string;
|
|
@@ -92,13 +97,22 @@ interface ValidationResult {
|
|
|
92
97
|
summary: string;
|
|
93
98
|
}
|
|
94
99
|
/**
|
|
95
|
-
* MCP tool for
|
|
100
|
+
* MCP tool for validating code after a transformation to make sure the
|
|
101
|
+
* changes did not break anything, with incremental build support.
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* Supports legacy validation (`PostTransformValidator`) and incremental build
|
|
105
|
+
* validation (`IncrementalBuildValidator`), which is 2-4x faster.
|
|
96
106
|
*/
|
|
97
107
|
export declare class ValidateTransformationTool implements MCPTool {
|
|
98
108
|
name: string;
|
|
99
109
|
title: string;
|
|
100
110
|
annotations: ToolAnnotations;
|
|
101
111
|
description: string;
|
|
112
|
+
/**
|
|
113
|
+
* JSON Schema of the tool arguments.
|
|
114
|
+
* @hidden
|
|
115
|
+
*/
|
|
102
116
|
inputSchema: {
|
|
103
117
|
type: string;
|
|
104
118
|
additionalProperties: boolean;
|
|
@@ -172,6 +186,10 @@ export declare class ValidateTransformationTool implements MCPTool {
|
|
|
172
186
|
};
|
|
173
187
|
required: string[];
|
|
174
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* JSON Schema of the tool result (`structuredContent`).
|
|
191
|
+
* @hidden
|
|
192
|
+
*/
|
|
175
193
|
outputSchema: {
|
|
176
194
|
type: string;
|
|
177
195
|
properties: {
|
|
@@ -319,5 +337,4 @@ export declare class ValidateTransformationTool implements MCPTool {
|
|
|
319
337
|
*/
|
|
320
338
|
private detectTransformedFiles;
|
|
321
339
|
}
|
|
322
|
-
export {};
|
|
323
340
|
//# sourceMappingURL=validate-transformation.d.ts.map
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Validate Transformation Tool
|
|
3
|
-
*
|
|
4
|
-
* MCP tool for validating code after transformation to ensure changes
|
|
5
|
-
* didn't break anything. Supports both legacy validation (PostTransformValidator)
|
|
6
|
-
* and modern incremental build validation (IncrementalBuildValidator) for 2-4x speedup.
|
|
7
|
-
*/
|
|
8
1
|
import { PostTransformValidator, loadConfig, } from '@angular-modernizer/core';
|
|
9
2
|
import { Project } from 'ts-morph';
|
|
10
3
|
import { existsSync } from 'node:fs';
|
|
@@ -38,7 +31,12 @@ function describeTransformationValidation(result) {
|
|
|
38
31
|
return lines.join('\n');
|
|
39
32
|
}
|
|
40
33
|
/**
|
|
41
|
-
* MCP tool for
|
|
34
|
+
* MCP tool for validating code after a transformation to make sure the
|
|
35
|
+
* changes did not break anything, with incremental build support.
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Supports legacy validation (`PostTransformValidator`) and incremental build
|
|
39
|
+
* validation (`IncrementalBuildValidator`), which is 2-4x faster.
|
|
42
40
|
*/
|
|
43
41
|
export class ValidateTransformationTool {
|
|
44
42
|
name = 'validate-transformation';
|
|
@@ -51,6 +49,10 @@ export class ValidateTransformationTool {
|
|
|
51
49
|
};
|
|
52
50
|
description = 'Validate code after transformation to ensure changes did not break anything. Supports incremental build mode for 2-4x faster validation by checking only transformed files and their dependencies. Automatically detects project compatibility and falls back to full validation when needed. ' +
|
|
53
51
|
'summary is a short text with the verdict, the validation mode, the issue counts and the first issues.';
|
|
52
|
+
/**
|
|
53
|
+
* JSON Schema of the tool arguments.
|
|
54
|
+
* @hidden
|
|
55
|
+
*/
|
|
54
56
|
inputSchema = {
|
|
55
57
|
type: 'object',
|
|
56
58
|
additionalProperties: false,
|
|
@@ -122,6 +124,10 @@ export class ValidateTransformationTool {
|
|
|
122
124
|
},
|
|
123
125
|
required: ['filePath'],
|
|
124
126
|
};
|
|
127
|
+
/**
|
|
128
|
+
* JSON Schema of the tool result (`structuredContent`).
|
|
129
|
+
* @hidden
|
|
130
|
+
*/
|
|
125
131
|
outputSchema = {
|
|
126
132
|
type: 'object',
|
|
127
133
|
properties: {
|
|
@@ -1,58 +1,75 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Verify Citations Tool
|
|
3
|
-
*
|
|
4
|
-
* MCP tool that checks the `path:line` citations of Markdown plans against the
|
|
5
|
-
* current code: does the cited file exist, is the line range still in the
|
|
6
|
-
* file, and does the symbol named next to the citation still sit in the range?
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Run it before executing a bug-fix or feature plan (stale line numbers make
|
|
10
|
-
* edits land in the wrong place) and after writing one. Logic lives in the api
|
|
11
|
-
* `CitationVerifier`; the claude-plugin script `verify-citations.mjs` is the
|
|
12
|
-
* same check for sessions without this server.
|
|
13
|
-
*
|
|
14
|
-
* First tool on the structured output contract: `outputSchema`, `title` and
|
|
15
|
-
* `annotations`, answered with `structuredContent`.
|
|
16
|
-
*/
|
|
17
1
|
import { type CitationFileSource, type CitationStatus } from '@angular-modernizer/api';
|
|
18
2
|
import { type MCPTool, type ToolAnnotations } from '../types.js';
|
|
19
3
|
/** One checked citation in the tool output. */
|
|
20
4
|
export interface VerifiedCitation {
|
|
21
5
|
/** Plan file relative to `projectRoot`. */
|
|
22
6
|
plan: string;
|
|
7
|
+
/** Line of the citation in the plan. */
|
|
23
8
|
planLine: number;
|
|
24
9
|
/** Citation as written, e.g. `x.ts:12-20`. */
|
|
25
10
|
text: string;
|
|
11
|
+
/** Result of the check. */
|
|
26
12
|
status: CitationStatus;
|
|
13
|
+
/** Resolved file relative to the root, when exactly one file matched. */
|
|
27
14
|
file?: string;
|
|
15
|
+
/** Anchor that decided the status (`prefix` anchors end in `*`). */
|
|
28
16
|
matched?: string;
|
|
17
|
+
/** For `moved`: lines where the anchor is now, nearest first, at most 5. */
|
|
29
18
|
foundAt?: number[];
|
|
19
|
+
/** Current text of the first cited line, whitespace collapsed, at most 100 characters. */
|
|
30
20
|
current?: string;
|
|
21
|
+
/** For `out-of-range`: number of lines of the file. */
|
|
31
22
|
fileLength?: number;
|
|
23
|
+
/** For `missing-file`: files with the same name or stem; for `ambiguous`: the matches. */
|
|
32
24
|
candidates?: string[];
|
|
33
25
|
}
|
|
34
26
|
/** Output of the verify-citations tool. */
|
|
35
27
|
export interface VerifyCitationsOutput {
|
|
28
|
+
/** Absolute repository root the citations resolve from. */
|
|
36
29
|
projectRoot: string;
|
|
30
|
+
/** Citation counts per plan. */
|
|
37
31
|
plans: {
|
|
32
|
+
/** Plan file relative to `projectRoot`. */
|
|
38
33
|
plan: string;
|
|
34
|
+
/** Number of citations in the plan. */
|
|
39
35
|
citations: number;
|
|
36
|
+
/** Citations of the plan that need attention. */
|
|
40
37
|
needsAttention: number;
|
|
41
38
|
}[];
|
|
39
|
+
/** Number of citations in all plans. */
|
|
42
40
|
total: number;
|
|
41
|
+
/** Citations with status moved, anchor-missing, out-of-range, missing-file or ambiguous. */
|
|
43
42
|
needsAttention: number;
|
|
43
|
+
/** Number of citations per status. */
|
|
44
44
|
counts: Record<CitationStatus, number>;
|
|
45
45
|
/** Citations that need attention first, then the others, each in plan order. */
|
|
46
46
|
citations?: VerifiedCitation[];
|
|
47
|
+
/** `true` when `maxResults` cut the citation list. */
|
|
47
48
|
truncated: boolean;
|
|
49
|
+
/** Short text with the counts and the citations that need attention. */
|
|
48
50
|
summary: string;
|
|
49
51
|
}
|
|
52
|
+
/**
|
|
53
|
+
* MCP tool that checks the `path:line` citations of Markdown plans against the
|
|
54
|
+
* current code: does the cited file exist, is the line range still in the
|
|
55
|
+
* file, and does the symbol named next to the citation still sit in the range?
|
|
56
|
+
*
|
|
57
|
+
* @remarks
|
|
58
|
+
* Run it before executing a bug-fix or feature plan (stale line numbers make
|
|
59
|
+
* edits land in the wrong place) and after writing one. Logic lives in the api
|
|
60
|
+
* `CitationVerifier`; the claude-plugin script `verify-citations.mjs` is the
|
|
61
|
+
* same check for sessions without this server.
|
|
62
|
+
*/
|
|
50
63
|
export declare class VerifyCitationsTool implements MCPTool {
|
|
51
64
|
private readonly createSource;
|
|
52
65
|
readonly name = "verify-citations";
|
|
53
66
|
readonly title = "Verify Plan Citations";
|
|
54
67
|
readonly description: string;
|
|
55
68
|
readonly annotations: ToolAnnotations;
|
|
69
|
+
/**
|
|
70
|
+
* JSON Schema of the tool arguments.
|
|
71
|
+
* @hidden
|
|
72
|
+
*/
|
|
56
73
|
readonly inputSchema: {
|
|
57
74
|
type: string;
|
|
58
75
|
additionalProperties: boolean;
|
|
@@ -81,6 +98,10 @@ export declare class VerifyCitationsTool implements MCPTool {
|
|
|
81
98
|
};
|
|
82
99
|
required: string[];
|
|
83
100
|
};
|
|
101
|
+
/**
|
|
102
|
+
* JSON Schema of the tool result (`structuredContent`).
|
|
103
|
+
* @hidden
|
|
104
|
+
*/
|
|
84
105
|
readonly outputSchema: {
|
|
85
106
|
type: string;
|
|
86
107
|
properties: {
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Verify Citations Tool
|
|
3
|
-
*
|
|
4
|
-
* MCP tool that checks the `path:line` citations of Markdown plans against the
|
|
5
|
-
* current code: does the cited file exist, is the line range still in the
|
|
6
|
-
* file, and does the symbol named next to the citation still sit in the range?
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* Run it before executing a bug-fix or feature plan (stale line numbers make
|
|
10
|
-
* edits land in the wrong place) and after writing one. Logic lives in the api
|
|
11
|
-
* `CitationVerifier`; the claude-plugin script `verify-citations.mjs` is the
|
|
12
|
-
* same check for sessions without this server.
|
|
13
|
-
*
|
|
14
|
-
* First tool on the structured output contract: `outputSchema`, `title` and
|
|
15
|
-
* `annotations`, answered with `structuredContent`.
|
|
16
|
-
*/
|
|
17
1
|
import { isAbsolute, relative, resolve } from 'node:path';
|
|
18
2
|
import { CITATION_ATTENTION_STATUSES, CitationVerifier, } from '@angular-modernizer/api';
|
|
19
3
|
import { createNodeCitationFileSource } from './helpers/citation-file-source.js';
|
|
@@ -45,6 +29,17 @@ const CITATION_SCHEMA = {
|
|
|
45
29
|
},
|
|
46
30
|
required: ['plan', 'planLine', 'text', 'status'],
|
|
47
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* MCP tool that checks the `path:line` citations of Markdown plans against the
|
|
34
|
+
* current code: does the cited file exist, is the line range still in the
|
|
35
|
+
* file, and does the symbol named next to the citation still sit in the range?
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Run it before executing a bug-fix or feature plan (stale line numbers make
|
|
39
|
+
* edits land in the wrong place) and after writing one. Logic lives in the api
|
|
40
|
+
* `CitationVerifier`; the claude-plugin script `verify-citations.mjs` is the
|
|
41
|
+
* same check for sessions without this server.
|
|
42
|
+
*/
|
|
48
43
|
export class VerifyCitationsTool {
|
|
49
44
|
createSource;
|
|
50
45
|
name = 'verify-citations';
|
|
@@ -63,6 +58,10 @@ export class VerifyCitationsTool {
|
|
|
63
58
|
idempotentHint: true,
|
|
64
59
|
openWorldHint: false,
|
|
65
60
|
};
|
|
61
|
+
/**
|
|
62
|
+
* JSON Schema of the tool arguments.
|
|
63
|
+
* @hidden
|
|
64
|
+
*/
|
|
66
65
|
inputSchema = {
|
|
67
66
|
type: 'object',
|
|
68
67
|
additionalProperties: false,
|
|
@@ -81,6 +80,10 @@ export class VerifyCitationsTool {
|
|
|
81
80
|
},
|
|
82
81
|
required: ['planPaths', 'projectRoot'],
|
|
83
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* JSON Schema of the tool result (`structuredContent`).
|
|
85
|
+
* @hidden
|
|
86
|
+
*/
|
|
84
87
|
outputSchema = {
|
|
85
88
|
type: 'object',
|
|
86
89
|
properties: {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - MCP Types
|
|
3
|
-
*
|
|
4
|
-
* TypeScript type definitions for MCP protocol and tools.
|
|
5
|
-
*/
|
|
6
1
|
import type { ParallelOptions } from '@angular-modernizer/core';
|
|
7
2
|
/**
|
|
8
|
-
* MCP Tool interface as defined by the Model Context Protocol.
|
|
3
|
+
* MCP Tool interface as defined by the Model Context Protocol. Every tool
|
|
4
|
+
* class of this package implements it.
|
|
9
5
|
*/
|
|
10
6
|
export interface MCPTool {
|
|
11
7
|
/**
|
|
@@ -50,7 +46,9 @@ export type ProgressFn = (progress: number, total?: number, message?: string) =>
|
|
|
50
46
|
* set only when the client asked for progress with a `progressToken`.
|
|
51
47
|
*/
|
|
52
48
|
export interface ToolContext {
|
|
49
|
+
/** Aborted when the client cancels the request. */
|
|
53
50
|
signal?: AbortSignal;
|
|
51
|
+
/** Sends progress notifications; set only with a `progressToken`. */
|
|
54
52
|
progress?: ProgressFn;
|
|
55
53
|
}
|
|
56
54
|
/**
|
|
@@ -59,43 +57,69 @@ export interface ToolContext {
|
|
|
59
57
|
* `destructiveHint` and `idempotentHint` only matter when it is not read-only.
|
|
60
58
|
*/
|
|
61
59
|
export interface ToolAnnotations {
|
|
60
|
+
/** The tool does not change its environment. */
|
|
62
61
|
readOnlyHint?: boolean;
|
|
62
|
+
/** The tool can overwrite or delete project files. */
|
|
63
63
|
destructiveHint?: boolean;
|
|
64
|
+
/** Repeating a call with the same arguments has no further effect. */
|
|
64
65
|
idempotentHint?: boolean;
|
|
66
|
+
/** The tool reaches outside the project (arbitrary commands or packages). */
|
|
65
67
|
openWorldHint?: boolean;
|
|
66
68
|
}
|
|
67
69
|
/**
|
|
68
70
|
* JSON-RPC 2.0 request message.
|
|
71
|
+
*
|
|
72
|
+
* @deprecated Not used since the server runs on the MCP TypeScript SDK; will be removed in 2.0.
|
|
69
73
|
*/
|
|
70
74
|
export interface JsonRpcRequest {
|
|
75
|
+
/** Protocol version, always `'2.0'`. */
|
|
71
76
|
jsonrpc: '2.0';
|
|
77
|
+
/** Request id, echoed in the response. */
|
|
72
78
|
id: number | string;
|
|
79
|
+
/** Method name. */
|
|
73
80
|
method: string;
|
|
81
|
+
/** Method parameters. */
|
|
74
82
|
params?: Record<string, unknown>;
|
|
75
83
|
}
|
|
76
84
|
/**
|
|
77
85
|
* JSON-RPC 2.0 response message.
|
|
86
|
+
*
|
|
87
|
+
* @deprecated Not used since the server runs on the MCP TypeScript SDK; will be removed in 2.0.
|
|
78
88
|
*/
|
|
79
89
|
export interface JsonRpcResponse {
|
|
90
|
+
/** Protocol version, always `'2.0'`. */
|
|
80
91
|
jsonrpc: '2.0';
|
|
92
|
+
/** Id of the request; `null` when it could not be read. */
|
|
81
93
|
id: number | string | null;
|
|
94
|
+
/** Result on success. */
|
|
82
95
|
result?: unknown;
|
|
96
|
+
/** Error on failure. */
|
|
83
97
|
error?: JsonRpcError;
|
|
84
98
|
}
|
|
85
99
|
/**
|
|
86
100
|
* JSON-RPC 2.0 error object.
|
|
101
|
+
*
|
|
102
|
+
* @deprecated Not used since the server runs on the MCP TypeScript SDK; will be removed in 2.0.
|
|
87
103
|
*/
|
|
88
104
|
export interface JsonRpcError {
|
|
105
|
+
/** JSON-RPC error code, e.g. `-32602` for invalid params. */
|
|
89
106
|
code: number;
|
|
107
|
+
/** Error message. */
|
|
90
108
|
message: string;
|
|
109
|
+
/** Additional error details. */
|
|
91
110
|
data?: unknown;
|
|
92
111
|
}
|
|
93
112
|
/**
|
|
94
113
|
* JSON-RPC 2.0 notification message (no response expected).
|
|
114
|
+
*
|
|
115
|
+
* @deprecated Not used since the server runs on the MCP TypeScript SDK; will be removed in 2.0.
|
|
95
116
|
*/
|
|
96
117
|
export interface JsonRpcNotification {
|
|
118
|
+
/** Protocol version, always `'2.0'`. */
|
|
97
119
|
jsonrpc: '2.0';
|
|
120
|
+
/** Method name. */
|
|
98
121
|
method: string;
|
|
122
|
+
/** Method parameters. */
|
|
99
123
|
params?: Record<string, unknown>;
|
|
100
124
|
}
|
|
101
125
|
/**
|
|
@@ -103,15 +127,18 @@ export interface JsonRpcNotification {
|
|
|
103
127
|
*/
|
|
104
128
|
export interface MCPServerConfig {
|
|
105
129
|
/**
|
|
106
|
-
* Port for HTTP transport
|
|
130
|
+
* Port for HTTP transport. Never read: the server speaks stdio only.
|
|
131
|
+
* @deprecated Will be removed in 2.0.
|
|
107
132
|
*/
|
|
108
133
|
port?: number;
|
|
109
134
|
/**
|
|
110
|
-
* Tool execution timeout in milliseconds.
|
|
135
|
+
* Tool execution timeout in milliseconds. Not enforced by the server.
|
|
136
|
+
* @deprecated Will be removed in 2.0.
|
|
111
137
|
*/
|
|
112
138
|
timeout?: number;
|
|
113
139
|
/**
|
|
114
|
-
* Maximum number of concurrent tool executions.
|
|
140
|
+
* Maximum number of concurrent tool executions. Not enforced by the server.
|
|
141
|
+
* @deprecated Will be removed in 2.0.
|
|
115
142
|
*/
|
|
116
143
|
maxConcurrentTools?: number;
|
|
117
144
|
/**
|
|
@@ -119,7 +146,8 @@ export interface MCPServerConfig {
|
|
|
119
146
|
*/
|
|
120
147
|
logLevel?: 'debug' | 'info' | 'warn' | 'error';
|
|
121
148
|
/**
|
|
122
|
-
* Enable performance metrics collection.
|
|
149
|
+
* Enable performance metrics collection. Not read by the server.
|
|
150
|
+
* @deprecated Will be removed in 2.0.
|
|
123
151
|
*/
|
|
124
152
|
enableMetrics?: boolean;
|
|
125
153
|
/**
|
|
@@ -132,6 +160,8 @@ export interface MCPServerConfig {
|
|
|
132
160
|
}
|
|
133
161
|
/**
|
|
134
162
|
* Tool execution context for tracking and metrics.
|
|
163
|
+
*
|
|
164
|
+
* @deprecated Not used since the server runs on the MCP TypeScript SDK; will be removed in 2.0.
|
|
135
165
|
*/
|
|
136
166
|
export interface ToolExecutionContext {
|
|
137
167
|
/**
|
package/dist/types.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - MCP Types
|
|
3
|
-
*
|
|
4
|
-
* TypeScript type definitions for MCP protocol and tools.
|
|
5
|
-
*/
|
|
6
1
|
/**
|
|
7
2
|
* Helper to convert MCP OrchestrationOptions to Core ParallelOptions.
|
|
8
3
|
* Note: parallel/incremental/baseBranch are control flow params, not ParallelOptions.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-modernizer/adapter-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "MCP Server to expose Angular Modernizer tools to an AI assistant.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -15,13 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"author": "Christian Weiss",
|
|
18
|
-
"
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/eiweiss/tsanalyzer.git",
|
|
21
|
-
"directory": "packages/adapter-mcp"
|
|
22
|
-
},
|
|
23
|
-
"homepage": "https://github.com/eiweiss/tsanalyzer#readme",
|
|
24
|
-
"bugs": "https://github.com/eiweiss/tsanalyzer/issues",
|
|
18
|
+
"homepage": "https://eiweiss.github.io/angular-modernizer-docs/",
|
|
25
19
|
"type": "module",
|
|
26
20
|
"bin": {
|
|
27
21
|
"angular-modernizer-mcp": "dist/cli.js"
|
|
@@ -37,16 +31,16 @@
|
|
|
37
31
|
"glob": "^11.0.3",
|
|
38
32
|
"ts-morph": "^27.0.2",
|
|
39
33
|
"zod": "^4.6.5",
|
|
40
|
-
"@angular-modernizer/core": "1.
|
|
41
|
-
"@angular-modernizer/api": "1.
|
|
42
|
-
"@angular-modernizer/
|
|
43
|
-
"@angular-modernizer/
|
|
44
|
-
"@angular-modernizer/plugin-angular": "1.
|
|
45
|
-
"@angular-modernizer/plugin-
|
|
46
|
-
"@angular-modernizer/plugin-
|
|
47
|
-
"@angular-modernizer/plugin-standalone": "1.
|
|
48
|
-
"@angular-modernizer/plugin-system": "1.
|
|
49
|
-
"@angular-modernizer/worker": "1.
|
|
34
|
+
"@angular-modernizer/core": "1.1.0",
|
|
35
|
+
"@angular-modernizer/api": "1.1.0",
|
|
36
|
+
"@angular-modernizer/orchestration": "1.1.0",
|
|
37
|
+
"@angular-modernizer/plugin-analyzer": "1.1.0",
|
|
38
|
+
"@angular-modernizer/plugin-angular": "1.1.0",
|
|
39
|
+
"@angular-modernizer/plugin-architecture": "1.1.0",
|
|
40
|
+
"@angular-modernizer/plugin-solid": "1.1.0",
|
|
41
|
+
"@angular-modernizer/plugin-standalone": "1.1.0",
|
|
42
|
+
"@angular-modernizer/plugin-system": "1.1.0",
|
|
43
|
+
"@angular-modernizer/worker": "1.1.0"
|
|
50
44
|
},
|
|
51
45
|
"devDependencies": {
|
|
52
46
|
"@types/express": "^4.17.13",
|