@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
package/README.md
CHANGED
|
@@ -17,33 +17,41 @@ Tools are designed for LLM consumption with structured I/O, pre-validation, auto
|
|
|
17
17
|
```
|
|
18
18
|
AI Assistant (Claude/Copilot)
|
|
19
19
|
|
|
|
20
|
-
| JSON-RPC 2.0
|
|
20
|
+
| MCP over stdio (JSON-RPC 2.0, MCP TypeScript SDK)
|
|
21
|
+
| protocol eras 2025-06-18 / 2025-11-25 (initialize), 2026-07-28 (server/discover)
|
|
21
22
|
v
|
|
22
23
|
MCP Server (adapter-mcp)
|
|
23
24
|
- 41 Tools (analysis, planning, transformation,
|
|
24
|
-
build and validation, feedback, bug investigation)
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
25
|
+
build and validation, rollback, feedback, bug investigation)
|
|
26
|
+
- Input validation against closed JSON schemas
|
|
27
|
+
- structuredContent validated against each outputSchema, plus a summary text
|
|
28
|
+
- Native MCP progress and cancellation
|
|
29
|
+
- Shared ts-morph ProjectCache (investigation tools, build impact, plan-migration)
|
|
30
|
+
| |
|
|
31
|
+
| Kernel per call | direct calls
|
|
32
|
+
| (scans, transform-code, ...) | (14 investigation tools)
|
|
33
|
+
v |
|
|
34
|
+
Core Platform (Kernel + Plugins) |
|
|
35
|
+
- Analysis rules (52) |
|
|
36
|
+
- Architecture: 17 |
|
|
37
|
+
- Angular: 28 |
|
|
38
|
+
- SOLID: 7 |
|
|
37
39
|
- Transformations (26 types via transform-code)
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
+
- Safety envelope: backup, type check, rollback
|
|
41
|
+
- Caching, worker parallelism, workflow engine
|
|
42
|
+
| |
|
|
43
|
+
| context.api |
|
|
44
|
+
v v
|
|
45
|
+
Public API (@angular-modernizer/api)
|
|
46
|
+
- Analysis and transformation building blocks
|
|
47
|
+
- Investigation: usages, call graph, types, templates, forms, i18n
|
|
40
48
|
|
|
|
41
|
-
| ts-morph AST
|
|
49
|
+
| ts-morph AST, TypeScript type checker, @angular/compiler (templates)
|
|
42
50
|
v
|
|
43
|
-
TypeScript Project
|
|
44
|
-
- Source
|
|
45
|
-
- Type
|
|
46
|
-
- Semantic
|
|
51
|
+
TypeScript / Angular Project
|
|
52
|
+
- Source files and templates
|
|
53
|
+
- Type checking
|
|
54
|
+
- Semantic analysis
|
|
47
55
|
```
|
|
48
56
|
|
|
49
57
|
### Protocol
|
|
@@ -82,12 +90,10 @@ Create `.angular-modernizer.json` in your project root. Only `build` is required
|
|
|
82
90
|
},
|
|
83
91
|
"tools": {
|
|
84
92
|
"analyze-project": {
|
|
85
|
-
"excludePatterns": ["**/node_modules/**", "**/dist/**"]
|
|
86
|
-
"orchestration": { "parallel": true, "autoSelectMode": true }
|
|
93
|
+
"excludePatterns": ["**/node_modules/**", "**/dist/**"]
|
|
87
94
|
},
|
|
88
95
|
"scan-architecture": {
|
|
89
|
-
"maxFiles": 500
|
|
90
|
-
"orchestration": { "parallel": true, "enableProgress": true }
|
|
96
|
+
"maxFiles": 500
|
|
91
97
|
}
|
|
92
98
|
}
|
|
93
99
|
}
|
|
@@ -119,7 +125,8 @@ Or point a client at a local build, e.g. `.mcp.json` / `claude_desktop_config.js
|
|
|
119
125
|
```
|
|
120
126
|
|
|
121
127
|
`--expose-gc` lets the ProjectCache collect garbage after evicting a project. `cli.js` also takes
|
|
122
|
-
`--max-projects N` and `--max-heap-mb N` (defaults 3 and 2048
|
|
128
|
+
`--max-projects N` and `--max-heap-mb N` (defaults 3 and 2048; the heap limit also applies to the scan worker) and
|
|
129
|
+
`--scan-worker 0` (scans on the main thread instead of a worker thread). A running client keeps the old code in memory
|
|
123
130
|
after a rebuild; reconnect, or check `server-status` (`build.rebuiltSinceStart`).
|
|
124
131
|
|
|
125
132
|
---
|
|
@@ -139,7 +146,7 @@ after a rebuild; reconnect, or check `server-status` (`build.rebuiltSinceStart`)
|
|
|
139
146
|
| analyze-core-to-shared | Dependency violation analysis | - | yes | 3-10s |
|
|
140
147
|
| analyze-parser-performance | Parser metrics from feedback sessions | - | no | varies |
|
|
141
148
|
| extract-libraries | Library extraction candidates (shared folders, secondary entry points) | - | no | varies |
|
|
142
|
-
| learn-patterns |
|
|
149
|
+
| learn-patterns | Pattern discovery with AST heuristics, stored in a knowledge base | - | yes | 10-60s |
|
|
143
150
|
|
|
144
151
|
The scans, analyze-project, analyze-core-to-shared and extract-libraries keep their numbers in `counts` (for the scans `totalViolations`, `analyzedFiles`, `bySeverity`, `byCategory`, `byRule`, always over all violations); `summary` is a short text with the totals, the largest rules and categories, the first five entries and the returned page. `violations` holds only the page set by `maxResults` and `resultOffset`, `pagination` says what was cut.
|
|
145
152
|
|
|
@@ -227,6 +234,14 @@ Key features:
|
|
|
227
234
|
- Generates custom analysis rules from patterns
|
|
228
235
|
- Tracks pattern evolution across scans
|
|
229
236
|
|
|
237
|
+
### Feedback Tools
|
|
238
|
+
|
|
239
|
+
| Tool | Purpose | Cache | Time |
|
|
240
|
+
|-|-|-|-|
|
|
241
|
+
| collect-feedback | Store the outcome of a transformation or a corrected analysis result | no | <1s |
|
|
242
|
+
| review-feedback | Patterns, quality trends and warnings from stored feedback | no | varies |
|
|
243
|
+
| suggest-improvements | Rule adjustment suggestions from feedback patterns | no | varies |
|
|
244
|
+
|
|
230
245
|
#### collect-feedback
|
|
231
246
|
|
|
232
247
|
Manually collect transformation feedback for AI learning with privacy-first design.
|
|
@@ -325,6 +340,7 @@ Returns:
|
|
|
325
340
|
- `insights`: array of detected patterns with confidence scores
|
|
326
341
|
- `qualityWarnings`: warnings about low-quality feedback
|
|
327
342
|
- `sourcesRead`: locations where feedback was read from
|
|
343
|
+
- `analysisRecords`, `analysisInsights`: number of analysis records and the insights drawn from them
|
|
328
344
|
|
|
329
345
|
#### suggest-improvements
|
|
330
346
|
|
|
@@ -354,19 +370,22 @@ Usage:
|
|
|
354
370
|
|
|
355
371
|
Returns:
|
|
356
372
|
- `ruleId`: rule these suggestions apply to
|
|
373
|
+
- `currentPerformance`: `successRate`, `avgDuration`, `qualityImprovement` of the rule
|
|
357
374
|
- `suggestions`: array of suggestions sorted by confidence (descending)
|
|
358
|
-
- `
|
|
359
|
-
- `
|
|
375
|
+
- `feedbackCount`: number of feedback records analyzed
|
|
376
|
+
- `analysisFeedbackCount`: number of analysis records for this tool
|
|
377
|
+
- `sourcesRead`: locations where feedback was read from
|
|
360
378
|
|
|
361
379
|
Example suggestion:
|
|
362
380
|
|
|
363
381
|
```json
|
|
364
382
|
{
|
|
365
383
|
"type": "parameter-adjustment",
|
|
366
|
-
"
|
|
367
|
-
"
|
|
368
|
-
"
|
|
369
|
-
"expectedImprovement": "Reduce false positives by
|
|
384
|
+
"description": "Lower confidence threshold for this rule",
|
|
385
|
+
"reasoning": "3 failures occurred with high confidence (>0.8), suggesting overconfidence in predictions",
|
|
386
|
+
"confidence": 0.8,
|
|
387
|
+
"expectedImprovement": "Reduce false positives by 21%",
|
|
388
|
+
"implementation": "Adjust rule confidence threshold from 0.8 to 0.9. Review decision-making logic to improve accuracy.",
|
|
370
389
|
"requiresApproval": true
|
|
371
390
|
}
|
|
372
391
|
```
|
|
@@ -444,7 +463,7 @@ Safety features (single file, batch and streaming alike):
|
|
|
444
463
|
- Type check of the transformed file: only errors the transformation introduced count (`validation.introducedTypeErrors`)
|
|
445
464
|
- Build validation (`validateBuild`), project lint only on request (`validateLint`)
|
|
446
465
|
- Automatic rollback when validation fails (`autoRollback`)
|
|
447
|
-
- Batch mode backs up all files first and applies `rollbackStrategy` (`all-or-nothing`, `selective`, `none`)
|
|
466
|
+
- Batch mode backs up all files first, type-checks every batch file after the last transformation against its errors before the first one (a file with an introduced error fails, `validation.introducedTypeErrors` lists `<file>: <error>`), and applies `rollbackStrategy` (`all-or-nothing`, `selective`, `none`) to failed files
|
|
448
467
|
- `rollback-changes` restores the same backups later (`strategy`: `auto`, `file-backup`, `git-stash`)
|
|
449
468
|
|
|
450
469
|
Validation parameters:
|
|
@@ -547,6 +566,8 @@ Cache statistics example (second run, nothing changed):
|
|
|
547
566
|
|
|
548
567
|
### Intelligent Mode Selection
|
|
549
568
|
|
|
569
|
+
> **Deprecated in 1.1:** `parallel` and `incremental` of analyze-project and scan-architecture select the old WorkerPool path, which will be removed in 2.0. On a large app (371 files) it was no faster than the default path (10.8-12.1 vs 10.3-13.1 s), blocked the server for up to 10.7 s and took about four times the memory; before 1.1 the automatic mode selection could fail with `Not implemented yet`. The default path runs the analysis in a scan worker. Leave these options unset; the text below describes the old path.
|
|
570
|
+
|
|
550
571
|
The orchestration system automatically selects between Promise-based and worker thread parallelism based on project complexity score:
|
|
551
572
|
|
|
552
573
|
```
|
|
@@ -601,46 +622,39 @@ Example evolution output:
|
|
|
601
622
|
|
|
602
623
|
### Tool-Specific Configuration
|
|
603
624
|
|
|
604
|
-
|
|
625
|
+
Per-tool defaults go under `tools` in `.angular-modernizer.json`; arguments of a call override them. The schema lists
|
|
626
|
+
the configurable tools (scan-architecture, scan-all, scan-angular, scan-solid, analyze-project, transform-code,
|
|
627
|
+
transform-code-batch, run-build, validate-transformation, collect-feedback, review-feedback, suggest-improvements) and
|
|
628
|
+
their keys; `orchestration` takes a different set of keys per tool. Other tools, such as learn-patterns, take their
|
|
629
|
+
options per call only. analyze-project reads `tools.analyze-project` except `orchestration`: its `parallel` and
|
|
630
|
+
`incremental` select the deprecated WorkerPool path, which only the call argument can choose.
|
|
605
631
|
|
|
606
632
|
```json
|
|
607
633
|
{
|
|
608
|
-
"
|
|
609
|
-
"
|
|
610
|
-
"
|
|
611
|
-
"maxResults": 1000,
|
|
612
|
-
"orchestration": {
|
|
613
|
-
"parallel": true,
|
|
614
|
-
"autoSelectMode": true,
|
|
615
|
-
"enableProgress": true
|
|
616
|
-
}
|
|
634
|
+
"build": {
|
|
635
|
+
"command": "ng build",
|
|
636
|
+
"mode": "incremental"
|
|
617
637
|
},
|
|
618
|
-
"
|
|
619
|
-
"
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
"
|
|
625
|
-
"
|
|
626
|
-
|
|
627
|
-
|
|
638
|
+
"tools": {
|
|
639
|
+
"analyze-project": {
|
|
640
|
+
"excludePatterns": ["**/node_modules/**", "**/dist/**"],
|
|
641
|
+
"maxResults": 1000
|
|
642
|
+
},
|
|
643
|
+
"scan-architecture": {
|
|
644
|
+
"maxFiles": 500,
|
|
645
|
+
"includeAutoFixes": true
|
|
646
|
+
},
|
|
647
|
+
"review-feedback": {
|
|
648
|
+
"source": "both",
|
|
649
|
+
"minConfidence": 0.7
|
|
628
650
|
}
|
|
629
|
-
},
|
|
630
|
-
"learn-patterns": {
|
|
631
|
-
"targetPath": ".",
|
|
632
|
-
"categories": ["all"],
|
|
633
|
-
"minOccurrences": 3,
|
|
634
|
-
"enableLearning": true,
|
|
635
|
-
"generateStyleProfile": true,
|
|
636
|
-
"respectCodebaseStyle": true
|
|
637
651
|
}
|
|
638
652
|
}
|
|
639
653
|
```
|
|
640
654
|
|
|
641
655
|
### Cache Configuration
|
|
642
656
|
|
|
643
|
-
|
|
657
|
+
The scan tools cache per file with these built-in settings (not configurable):
|
|
644
658
|
|
|
645
659
|
```typescript
|
|
646
660
|
cacheConfig: {
|
|
@@ -670,14 +684,15 @@ rm -rf .angular-modernizer-cache
|
|
|
670
684
|
|
|
671
685
|
### Orchestration Tuning
|
|
672
686
|
|
|
673
|
-
|
|
687
|
+
> **Deprecated in 1.1:** `parallel` and `incremental` of analyze-project and scan-architecture select the old WorkerPool path, which will be removed in 2.0. On a large app (371 files) it was no faster than the default path (10.8-12.1 vs 10.3-13.1 s), blocked the server for up to 10.7 s and took about four times the memory; before 1.1 the automatic mode selection could fail with `Not implemented yet`. The default path runs the analysis in a scan worker. Leave these options unset; the text below describes the old path.
|
|
688
|
+
|
|
689
|
+
For large projects (500+ files), in `tools.scan-architecture` (or per call as the `orchestration` argument):
|
|
674
690
|
|
|
675
691
|
```json
|
|
676
692
|
{
|
|
677
693
|
"orchestration": {
|
|
678
694
|
"parallel": true,
|
|
679
695
|
"autoSelectMode": true,
|
|
680
|
-
"maxWorkers": 6,
|
|
681
696
|
"enableProgress": true,
|
|
682
697
|
"enableMonitoring": true,
|
|
683
698
|
"resourceLimits": {
|
|
@@ -792,6 +807,7 @@ Long-running tools report progress through MCP `notifications/progress` when the
|
|
|
792
807
|
| transform-code | single file: 3 steps (loaded, transformed, validated); batch: files | restores the backup (also with `autoRollback: false`); a batch restores every file |
|
|
793
808
|
| run-build, run-angular-cli, run-schematic, validate-transformation | none | ends the build with its process tree (SIGTERM, SIGKILL after 5 s) |
|
|
794
809
|
| orchestrate-migration | steps | passes the cancel to the running step, runs no further step |
|
|
810
|
+
| find-usages, get-call-graph, resolve-type, find-angular-symbol, search-codebase, list-imports, inspect-template, find-component-hosts, trace-output-flow, get-bootstrap-execution, inspect-form-group, inspect-i18n, analyze-build-impact, plan-migration | first call on a workspace: files loaded (`n/N files loaded`, per batch of 50) | stops the project load at the next batch, nothing is cached; program and checker build and the query are not interrupted |
|
|
795
811
|
|
|
796
812
|
A cancelled request gets no response (MCP spec). Scans also stop while they add their files to the project (checked per file). Only the kernel's own project load (`kernel.initialize()`) and transform-code's load of its file cannot be interrupted; the cancel takes effect right after them. Direct callers of a scan get the analyzed part with `execution.stopReason: 'cancelled'`.
|
|
797
813
|
|
package/dist/cli.js
CHANGED
|
@@ -10,6 +10,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
10
10
|
import { MCPServer } from './server/mcp-server.js';
|
|
11
11
|
import { isDebugEnabled } from './mcp-watcher.js';
|
|
12
12
|
import { routeConsoleToStderr } from './server/stdio-guard.js';
|
|
13
|
+
import { configureScanHost, parseScanWorkerSetting } from './scan-host/scan-host.js';
|
|
13
14
|
import { AnalyzeProjectTool } from './tools/analyze-project.js';
|
|
14
15
|
import { ScanArchitectureTool } from './tools/scan-architecture.js';
|
|
15
16
|
import { ScanSolidTool } from './tools/scan-solid.js';
|
|
@@ -117,6 +118,13 @@ function main() {
|
|
|
117
118
|
cacheLimits.warnings.forEach((w) => console.error(`Project cache: ${w}`));
|
|
118
119
|
const projects = new ProjectCache(cacheLimits.options);
|
|
119
120
|
debugLog(`CLI Project cache limits: ${JSON.stringify(projects.limits)}`);
|
|
121
|
+
// Scans analyze in a worker thread (default; --scan-worker 0 or
|
|
122
|
+
// ANGULAR_MODERNIZER_SCAN_WORKER=0 runs them on the main thread), its
|
|
123
|
+
// heap limited to the same --max-heap-mb as the project cache
|
|
124
|
+
const scanWorker = parseScanWorkerSetting(process.argv.slice(2), process.env);
|
|
125
|
+
scanWorker.warnings.forEach((w) => console.error(`Scan worker: ${w}`));
|
|
126
|
+
configureScanHost({ enabled: scanWorker.enabled, maxHeapMb: projects.limits.maxHeapMb });
|
|
127
|
+
debugLog(`CLI Scan worker: ${scanWorker.enabled ? 'on' : 'off'}`);
|
|
120
128
|
server.registerTool(new AnalyzeProjectTool());
|
|
121
129
|
server.registerTool(new ScanArchitectureTool());
|
|
122
130
|
server.registerTool(new ScanSolidTool());
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Project Analyzer
|
|
3
|
-
*
|
|
4
|
-
* Core orchestration logic for analyzing Angular projects.
|
|
5
|
-
* This module coordinates the Kernel, plugins, and analysis rules
|
|
6
|
-
* to perform comprehensive project analysis.
|
|
7
|
-
*
|
|
8
|
-
* Design Philosophy: "Orchestrate, Don't Implement"
|
|
9
|
-
* - This module doesn't contain analysis logic
|
|
10
|
-
* - It coordinates existing components (Kernel, plugins, rules)
|
|
11
|
-
* - All actual analysis happens in plugin rules
|
|
12
|
-
*/
|
|
13
1
|
import { type AnalysisResult } from '@angular-modernizer/plugin-system';
|
|
14
2
|
/**
|
|
15
3
|
* Options for project analysis.
|
|
@@ -51,6 +39,9 @@ export interface AnalyzeProjectOptions {
|
|
|
51
39
|
* 4. Executes all rules in parallel
|
|
52
40
|
* 5. Collects and returns all analysis results
|
|
53
41
|
*
|
|
42
|
+
* The function holds no analysis logic of its own; all findings come from
|
|
43
|
+
* the plugin rules.
|
|
44
|
+
*
|
|
54
45
|
* @param options - Configuration for the analysis
|
|
55
46
|
* @returns Promise resolving to array of all analysis results
|
|
56
47
|
* @throws Error if project path is invalid or analysis fails
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - Project Analyzer
|
|
3
|
-
*
|
|
4
|
-
* Core orchestration logic for analyzing Angular projects.
|
|
5
|
-
* This module coordinates the Kernel, plugins, and analysis rules
|
|
6
|
-
* to perform comprehensive project analysis.
|
|
7
|
-
*
|
|
8
|
-
* Design Philosophy: "Orchestrate, Don't Implement"
|
|
9
|
-
* - This module doesn't contain analysis logic
|
|
10
|
-
* - It coordinates existing components (Kernel, plugins, rules)
|
|
11
|
-
* - All actual analysis happens in plugin rules
|
|
12
|
-
*/
|
|
13
1
|
import { Kernel } from '@angular-modernizer/core';
|
|
14
2
|
import { AnalyzerPlugin } from '@angular-modernizer/plugin-analyzer';
|
|
15
3
|
import { createPublicApi } from '@angular-modernizer/api';
|
|
@@ -24,6 +12,9 @@ import { ContextFactory, } from '@angular-modernizer/plugin-system';
|
|
|
24
12
|
* 4. Executes all rules in parallel
|
|
25
13
|
* 5. Collects and returns all analysis results
|
|
26
14
|
*
|
|
15
|
+
* The function holds no analysis logic of its own; all findings come from
|
|
16
|
+
* the plugin rules.
|
|
17
|
+
*
|
|
27
18
|
* @param options - Configuration for the analysis
|
|
28
19
|
* @returns Promise resolving to array of all analysis results
|
|
29
20
|
* @throws Error if project path is invalid or analysis fails
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* MCP server of the Angular Modernizer: 41 tools for analysis, migration
|
|
3
|
+
* planning, transformation, build validation, rollback, feedback and bug
|
|
4
|
+
* investigation of Angular projects, served over stdio with the MCP
|
|
5
|
+
* TypeScript SDK.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The server speaks both protocol eras on one stdio connection: clients that
|
|
9
|
+
* open with `initialize` get the revision they ask for (2025-06-18,
|
|
10
|
+
* 2025-11-25), clients that open with `server/discover` get 2026-07-28.
|
|
11
|
+
* Arguments are validated against each tool's input schema; every tool
|
|
12
|
+
* answers with `structuredContent` validated against its output schema and a
|
|
13
|
+
* text block with the result's `summary`.
|
|
14
|
+
*
|
|
15
|
+
* Run the server through the `angular-modernizer-mcp` bin (`dist/cli.js`):
|
|
16
|
+
*
|
|
17
|
+
* ```bash
|
|
18
|
+
* npx @angular-modernizer/adapter-mcp
|
|
19
|
+
* claude mcp add angular-modernizer npx @angular-modernizer/adapter-mcp
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* `cli.js` takes `--max-projects N` and `--max-heap-mb N` for the shared
|
|
23
|
+
* ts-morph project cache (defaults 3 and 2048 MB, 0 = no heap limit).
|
|
24
|
+
*
|
|
25
|
+
* The package entry exports the building blocks for embedding the server or
|
|
26
|
+
* calling tools directly:
|
|
27
|
+
*
|
|
28
|
+
* - {@link MCPServer}: stdio server lifecycle; register tools, then `start()`.
|
|
29
|
+
* - {@link ToolRegistry}: tool registration and execution.
|
|
30
|
+
* - {@link MCPTool}: the tool contract every tool class implements, with
|
|
31
|
+
* {@link ToolContext} for cancellation and progress.
|
|
32
|
+
* - The tool classes, one per MCP tool, e.g. {@link ScanAllTool},
|
|
33
|
+
* {@link TransformCodeTool}, {@link FindUsagesTool}, {@link ServerStatusTool}.
|
|
34
|
+
* - {@link ProgressStore}: operation store of the deprecated streaming path.
|
|
35
|
+
* - {@link startMCPWatcher}: debug log and health check, enabled with
|
|
36
|
+
* `ANGULAR_MODERNIZER_DEBUG`.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { MCPServer, ScanAllTool, FindUsagesTool } from '@angular-modernizer/adapter-mcp';
|
|
41
|
+
*
|
|
42
|
+
* const server = new MCPServer();
|
|
43
|
+
* server.registerTool(new ScanAllTool());
|
|
44
|
+
* server.registerTool(new FindUsagesTool());
|
|
45
|
+
* server.start();
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @packageDocumentation
|
|
6
49
|
*/
|
|
7
50
|
export { MCPServer } from './server/mcp-server.js';
|
|
8
51
|
export { ToolRegistry } from './server/tool-registry.js';
|
|
@@ -52,4 +95,76 @@ export { VerifyCitationsTool } from './tools/verify-citations.js';
|
|
|
52
95
|
export { ProgressStore, type OperationMetadata, type OperationState, } from './streaming/progress-store.js';
|
|
53
96
|
export type { MCPTool, ToolAnnotations, MCPServerConfig, JsonRpcRequest, JsonRpcResponse, JsonRpcNotification, ToolExecutionContext, ToolContext, ProgressFn, } from './types.js';
|
|
54
97
|
export { analyzeProject } from './core/project-analyzer.js';
|
|
98
|
+
export type { AnalyzeProjectOptions } from './core/project-analyzer.js';
|
|
99
|
+
export type { JsonRpcError } from './types.js';
|
|
100
|
+
export type { MemorySnapshot } from './mcp-watcher.js';
|
|
101
|
+
export type { ServerRuntimeStats } from './server/mcp-server.js';
|
|
102
|
+
export type { ProjectCache } from './tools/helpers/project-cache.js';
|
|
103
|
+
export type { HealthScan, CompareHealthOutput } from './tools/compare-health.js';
|
|
104
|
+
export type { DistDirectory, ServerStatusOutput } from './tools/server-status.js';
|
|
105
|
+
export type { AnalyzeBuildImpactOutput } from './tools/analyze-build-impact.js';
|
|
106
|
+
export type { AnalyzeCoreToSharedResult } from './tools/analyze-core-to-shared.js';
|
|
107
|
+
export type { AnalyzeParserPerformanceOutput } from './tools/analyze-parser-performance.js';
|
|
108
|
+
export type { AnalyzeProjectResult } from './tools/analyze-project.js';
|
|
109
|
+
export type { CompatibilityCheckOutput } from './tools/check-incremental-compatibility.js';
|
|
110
|
+
export type { CollectFeedbackOutput, CollectAnalysisFeedbackOutput, } from './tools/collect-feedback.js';
|
|
111
|
+
export type { ExtractLibrariesResult } from './tools/extract-libraries.js';
|
|
112
|
+
export type { FindAngularSymbolOutput } from './tools/find-angular-symbol.js';
|
|
113
|
+
export type { FindComponentHostsOutput } from './tools/find-component-hosts.js';
|
|
114
|
+
export type { FindUsagesOutput } from './tools/find-usages.js';
|
|
115
|
+
export type { GetBootstrapExecutionOutput } from './tools/get-bootstrap-execution.js';
|
|
116
|
+
export type { GetCallGraphOutput } from './tools/get-call-graph.js';
|
|
117
|
+
export type { InspectFormGroupOutput } from './tools/inspect-form-group.js';
|
|
118
|
+
export type { InspectI18nOutput } from './tools/inspect-i18n.js';
|
|
119
|
+
export type { InspectTemplateOutput } from './tools/inspect-template.js';
|
|
120
|
+
export type { LearnPatternsResult } from './tools/learn-patterns.js';
|
|
121
|
+
export type { ListImportsOutput } from './tools/list-imports.js';
|
|
122
|
+
export type { OrchestrateMigrationResult } from './tools/orchestrate-migration.js';
|
|
123
|
+
export type { ParseStackTraceOutput } from './tools/parse-stack-trace.js';
|
|
124
|
+
export type { PlanMigrationResult } from './tools/plan-migration.js';
|
|
125
|
+
export type { ReviewFeedbackOutput } from './tools/review-feedback.js';
|
|
126
|
+
export type { RollbackResult } from './tools/rollback-changes.js';
|
|
127
|
+
export type { AngularCliResult } from './tools/run-angular-cli.js';
|
|
128
|
+
export type { BuildResult } from './tools/run-build.js';
|
|
129
|
+
export type { SchematicResult } from './tools/run-schematic.js';
|
|
130
|
+
export type { ScanAllResult } from './tools/scan-all.js';
|
|
131
|
+
export type { ScanAngularResult } from './tools/scan-angular.js';
|
|
132
|
+
export type { ScanArchitectureResult } from './tools/scan-architecture.js';
|
|
133
|
+
export type { ScanSolidResult } from './tools/scan-solid.js';
|
|
134
|
+
export type { SearchCodebaseOutput } from './tools/search-codebase.js';
|
|
135
|
+
export type { SuggestImprovementsOutput } from './tools/suggest-improvements.js';
|
|
136
|
+
export type { TraceOutputFlowOutput } from './tools/trace-output-flow.js';
|
|
137
|
+
export type { TransformationResult } from './tools/transform-code.js';
|
|
138
|
+
export type { ValidationResult as ValidateBeforeTransformResult } from './tools/validate-before-transform.js';
|
|
139
|
+
export type { ValidationResult as ValidateTransformationResult } from './tools/validate-transformation.js';
|
|
140
|
+
export type { ValidateProjectCompatibilityOutput } from './tools/validate-project-compatibility.js';
|
|
141
|
+
export type { VerifyCitationsOutput } from './tools/verify-citations.js';
|
|
142
|
+
export type { BuildImpactCounts, BuildScopeStrategy, DependencyInfo, EstimatedBuildScope, MappedFile, TemplateHost, UnresolvedFile, } from './tools/analyze-build-impact.js';
|
|
143
|
+
export type { AggregatedParserMetrics, SessionMetricsDetail, } from './tools/analyze-parser-performance.js';
|
|
144
|
+
export type { RecommendationType } from './tools/check-incremental-compatibility.js';
|
|
145
|
+
export type { CompareHealthStatus, HealthRunInfo, HealthScanResult, } from './tools/compare-health.js';
|
|
146
|
+
export type { ExtractionOpportunity } from './tools/extract-libraries.js';
|
|
147
|
+
export type { CoverageOutput, HostOutput } from './tools/find-component-hosts.js';
|
|
148
|
+
export type { RootOutput } from './tools/get-bootstrap-execution.js';
|
|
149
|
+
export type { ControlOutput, FormOutput } from './tools/inspect-form-group.js';
|
|
150
|
+
export type { DetailField, ListField as InspectI18nListField, SourceOutput, } from './tools/inspect-i18n.js';
|
|
151
|
+
export type { ListField as InspectTemplateListField, TemplateReportOutput, } from './tools/inspect-template.js';
|
|
152
|
+
export type { ImportCounts, ImportEntry, NamedImportEntry, } from './tools/list-imports.js';
|
|
153
|
+
export type { MigrationStep, MigrationStrategy, ScanPlanOutput, StyleAwareRiskAssessment, } from './tools/plan-migration.js';
|
|
154
|
+
export type { FeedbackInsight, QualityWarning } from './tools/review-feedback.js';
|
|
155
|
+
export type { IncrementalMetadata as RunBuildIncrementalMetadata } from './tools/run-build.js';
|
|
156
|
+
export type { ResolvedScope, ScanExecution } from './tools/scan-architecture.js';
|
|
157
|
+
export type { DistPackageState } from './tools/server-status.js';
|
|
158
|
+
export type { DynamicFlowOutput, OutputFlowOutput } from './tools/trace-output-flow.js';
|
|
159
|
+
export type { IncrementalMetadata as ValidateTransformationIncrementalMetadata } from './tools/validate-transformation.js';
|
|
160
|
+
export type { VerifiedCitation } from './tools/verify-citations.js';
|
|
161
|
+
export type { ScanCounts } from './tools/helpers/analysis-output.js';
|
|
162
|
+
export type { FileDelta, HealthViolation, RuleDelta, } from './tools/helpers/health-delta.js';
|
|
163
|
+
export type { AcquireControl, CachedProjectInfo, EvictionReason, EvictionStats, ProjectCacheLimits, ProjectEviction, } from './tools/helpers/project-cache.js';
|
|
164
|
+
export type { RuleTiming } from './tools/helpers/rule-runner.js';
|
|
165
|
+
export type { Performance, Suggestion } from './tools/helpers/suggestion-generator.js';
|
|
166
|
+
export type { CancelledExecution } from './tools/helpers/tool-context.js';
|
|
167
|
+
export type { ResponseRecord, ResponseStats } from './server/limited-stdio-transport.js';
|
|
168
|
+
export type { ScanHostStatus, ScanWorkerInfo } from './scan-host/scan-host.js';
|
|
169
|
+
export type { ProtocolEra, ProtocolInfo } from './server/sdk-server.js';
|
|
55
170
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* MCP server of the Angular Modernizer: 41 tools for analysis, migration
|
|
3
|
+
* planning, transformation, build validation, rollback, feedback and bug
|
|
4
|
+
* investigation of Angular projects, served over stdio with the MCP
|
|
5
|
+
* TypeScript SDK.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The server speaks both protocol eras on one stdio connection: clients that
|
|
9
|
+
* open with `initialize` get the revision they ask for (2025-06-18,
|
|
10
|
+
* 2025-11-25), clients that open with `server/discover` get 2026-07-28.
|
|
11
|
+
* Arguments are validated against each tool's input schema; every tool
|
|
12
|
+
* answers with `structuredContent` validated against its output schema and a
|
|
13
|
+
* text block with the result's `summary`.
|
|
14
|
+
*
|
|
15
|
+
* Run the server through the `angular-modernizer-mcp` bin (`dist/cli.js`):
|
|
16
|
+
*
|
|
17
|
+
* ```bash
|
|
18
|
+
* npx @angular-modernizer/adapter-mcp
|
|
19
|
+
* claude mcp add angular-modernizer npx @angular-modernizer/adapter-mcp
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* `cli.js` takes `--max-projects N` and `--max-heap-mb N` for the shared
|
|
23
|
+
* ts-morph project cache (defaults 3 and 2048 MB, 0 = no heap limit).
|
|
24
|
+
*
|
|
25
|
+
* The package entry exports the building blocks for embedding the server or
|
|
26
|
+
* calling tools directly:
|
|
27
|
+
*
|
|
28
|
+
* - {@link MCPServer}: stdio server lifecycle; register tools, then `start()`.
|
|
29
|
+
* - {@link ToolRegistry}: tool registration and execution.
|
|
30
|
+
* - {@link MCPTool}: the tool contract every tool class implements, with
|
|
31
|
+
* {@link ToolContext} for cancellation and progress.
|
|
32
|
+
* - The tool classes, one per MCP tool, e.g. {@link ScanAllTool},
|
|
33
|
+
* {@link TransformCodeTool}, {@link FindUsagesTool}, {@link ServerStatusTool}.
|
|
34
|
+
* - {@link ProgressStore}: operation store of the deprecated streaming path.
|
|
35
|
+
* - {@link startMCPWatcher}: debug log and health check, enabled with
|
|
36
|
+
* `ANGULAR_MODERNIZER_DEBUG`.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import { MCPServer, ScanAllTool, FindUsagesTool } from '@angular-modernizer/adapter-mcp';
|
|
41
|
+
*
|
|
42
|
+
* const server = new MCPServer();
|
|
43
|
+
* server.registerTool(new ScanAllTool());
|
|
44
|
+
* server.registerTool(new FindUsagesTool());
|
|
45
|
+
* server.start();
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @packageDocumentation
|
|
6
49
|
*/
|
|
7
50
|
// Export server infrastructure
|
|
8
51
|
export { MCPServer } from './server/mcp-server.js';
|
package/dist/mcp-watcher.d.ts
CHANGED
|
@@ -1,33 +1,53 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - MCP Watcher
|
|
3
|
-
*
|
|
4
|
-
* Writes periodic status updates to mcp-server.log to help debug
|
|
5
|
-
* hanging operations like analyze-project. The server starts it only when
|
|
6
|
-
* `ANGULAR_MODERNIZER_DEBUG` is set.
|
|
7
|
-
*/
|
|
1
|
+
/** Internal state of the {@link MCPWatcher}. */
|
|
8
2
|
export interface WatcherState {
|
|
3
|
+
/** When the watcher started. */
|
|
9
4
|
startTime: Date;
|
|
5
|
+
/** Time of the last heartbeat. */
|
|
10
6
|
lastHeartbeat: Date;
|
|
7
|
+
/** Number of heartbeats since the start. */
|
|
11
8
|
heartbeatCount: number;
|
|
9
|
+
/** Running operations by operation id. */
|
|
12
10
|
activeOperations: Map<string, OperationInfo>;
|
|
11
|
+
/** Memory readings of the last 20 heartbeats, oldest first. */
|
|
13
12
|
memorySnapshots: MemorySnapshot[];
|
|
13
|
+
/** Port of the health check HTTP server; unset when disabled. */
|
|
14
14
|
healthCheckPort?: number;
|
|
15
15
|
}
|
|
16
|
+
/** An operation tracked by the {@link MCPWatcher}. */
|
|
16
17
|
export interface OperationInfo {
|
|
18
|
+
/** Operation id. */
|
|
17
19
|
operationId: string;
|
|
20
|
+
/** Name of the tool running the operation. */
|
|
18
21
|
toolName: string;
|
|
22
|
+
/** When the operation started. */
|
|
19
23
|
startTime: Date;
|
|
24
|
+
/** Time of the last phase update. */
|
|
20
25
|
lastUpdate: Date;
|
|
26
|
+
/** Current phase, `'starting'` at the start. */
|
|
21
27
|
phase: string;
|
|
28
|
+
/** Details of the current phase. */
|
|
22
29
|
details?: string;
|
|
23
30
|
}
|
|
24
|
-
|
|
31
|
+
/** Memory reading of one heartbeat, in bytes (`process.memoryUsage()`). */
|
|
32
|
+
export interface MemorySnapshot {
|
|
33
|
+
/** Time of the reading. */
|
|
25
34
|
timestamp: Date;
|
|
35
|
+
/** V8 heap in use. */
|
|
26
36
|
heapUsed: number;
|
|
37
|
+
/** V8 heap allocated. */
|
|
27
38
|
heapTotal: number;
|
|
39
|
+
/** Memory of C++ objects bound to JavaScript objects. */
|
|
28
40
|
external: number;
|
|
41
|
+
/** Resident set size of the process. */
|
|
29
42
|
rss: number;
|
|
30
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Debug watcher: writes periodic status updates (heartbeat, memory, running
|
|
46
|
+
* operations) to `mcp-server.log` to help debug hanging operations, and
|
|
47
|
+
* optionally serves a health check over HTTP. The server starts it only when
|
|
48
|
+
* `ANGULAR_MODERNIZER_DEBUG` is set; its timer is `unref()`ed and never keeps
|
|
49
|
+
* the process alive.
|
|
50
|
+
*/
|
|
31
51
|
declare class MCPWatcher {
|
|
32
52
|
private readonly state;
|
|
33
53
|
private readonly logPath;
|
package/dist/mcp-watcher.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @angular-modernizer/adapter-mcp - MCP Watcher
|
|
3
|
-
*
|
|
4
|
-
* Writes periodic status updates to mcp-server.log to help debug
|
|
5
|
-
* hanging operations like analyze-project. The server starts it only when
|
|
6
|
-
* `ANGULAR_MODERNIZER_DEBUG` is set.
|
|
7
|
-
*/
|
|
8
1
|
import { appendFileSync, writeFileSync } from 'node:fs';
|
|
9
2
|
import { resolve } from 'node:path';
|
|
10
3
|
import * as http from 'node:http';
|
|
4
|
+
/**
|
|
5
|
+
* Debug watcher: writes periodic status updates (heartbeat, memory, running
|
|
6
|
+
* operations) to `mcp-server.log` to help debug hanging operations, and
|
|
7
|
+
* optionally serves a health check over HTTP. The server starts it only when
|
|
8
|
+
* `ANGULAR_MODERNIZER_DEBUG` is set; its timer is `unref()`ed and never keeps
|
|
9
|
+
* the process alive.
|
|
10
|
+
*/
|
|
11
11
|
class MCPWatcher {
|
|
12
12
|
state;
|
|
13
13
|
logPath;
|