Skip to content

refactor(@angular/cli): migrate build and test MCP tools into specialized target strategy handlers#33227

Merged
clydin merged 2 commits into
angular:mainfrom
clydin:feat/mcp-target-strategies
May 21, 2026
Merged

refactor(@angular/cli): migrate build and test MCP tools into specialized target strategy handlers#33227
clydin merged 2 commits into
angular:mainfrom
clydin:feat/mcp-target-strategies

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented May 20, 2026

Migrate build and unit-test MCP tools from standalone tools into specialized target strategy handlers in the tools/run-target subdirectory. Restrict BuildTargetStrategy to known official builders, parsing execution logs to extract output paths and extending payload metadata. Restrict UnitTestTargetStrategy to known test runner builders, auto-injecting non-interactive one-off watch mode flags and automatically configuring headless options for Karma jasmine suites. Handle all other targets and builders via the GenericTargetStrategy.

@clydin clydin force-pushed the feat/mcp-target-strategies branch 2 times, most recently from 988a94b to 22e151e Compare May 20, 2026 17:51
@clydin clydin marked this pull request as ready for review May 20, 2026 18:57
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request enhances the MCP 'run_target' tool by introducing dedicated strategies for 'build' and 'test' targets, a centralized 'options-serializer' utility, and expanded test coverage. Review feedback recommends stripping ANSI escape sequences when parsing build output locations and adding support for the 'configuration' flag in the unit test strategy to ensure consistency across execution modes.

…ized target strategy handlers

Migrate build and unit-test MCP tools from standalone tools into specialized target strategy handlers in the tools/run-target subdirectory. Restrict BuildTargetStrategy to known official builders, parsing execution logs to extract output paths and extending payload metadata. Restrict UnitTestTargetStrategy to known test runner builders, auto-injecting non-interactive one-off watch mode flags and automatically configuring headless options for Karma jasmine suites. Handle all other targets and builders via the GenericTargetStrategy.
@clydin clydin force-pushed the feat/mcp-target-strategies branch from 22e151e to 07ca86c Compare May 20, 2026 19:56
@clydin clydin added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels May 20, 2026
@clydin clydin requested a review from alan-agius4 May 21, 2026 13:30
Remove build, test, and e2e standalone tool declarations from the MCP server registry. Now that the unified run_target Strategy Dispatcher facade is fully operational and verified, these granular tools are redundant. Removing them reduces system prompt context footprint by over 1,000 tokens, eliminates semantic clashing, and increases tool selection accuracy for client LLMs.
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 21, 2026
@clydin clydin merged commit 377540d into angular:main May 21, 2026
62 of 63 checks passed
@clydin
Copy link
Copy Markdown
Member Author

clydin commented May 21, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the feat/mcp-target-strategies branch May 21, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants