Skip to content

Commit c003fc0

Browse files
committed
refactor(@angular/cli): Move MCP devserver tools into their own subdirectory
1 parent 951c873 commit c003fc0

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

packages/angular/cli/src/commands/mcp/mcp-server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ import { registerInstructionsResource } from './resources/instructions';
1515
import { AI_TUTOR_TOOL } from './tools/ai-tutor';
1616
import { BEST_PRACTICES_TOOL } from './tools/best-practices';
1717
import { BUILD_TOOL } from './tools/build';
18+
import { START_DEVSERVER_TOOL } from './tools/devserver/start-devserver';
19+
import { STOP_DEVSERVER_TOOL } from './tools/devserver/stop-devserver';
20+
import { WAIT_FOR_DEVSERVER_BUILD_TOOL } from './tools/devserver/wait-for-devserver-build';
1821
import { DOC_SEARCH_TOOL } from './tools/doc-search';
1922
import { FIND_EXAMPLE_TOOL } from './tools/examples';
2023
import { MODERNIZE_TOOL } from './tools/modernize';
2124
import { ZONELESS_MIGRATION_TOOL } from './tools/onpush-zoneless-migration/zoneless-migration';
2225
import { LIST_PROJECTS_TOOL } from './tools/projects';
23-
import { START_DEVSERVER_TOOL } from './tools/start-devserver';
24-
import { STOP_DEVSERVER_TOOL } from './tools/stop-devserver';
2526
import { AnyMcpToolDeclaration, registerTools } from './tools/tool-registry';
26-
import { WAIT_FOR_DEVSERVER_BUILD_TOOL } from './tools/wait-for-devserver-build';
2727

2828
/**
2929
* Tools to manage devservers. Should be bundled together, then added to experimental or stable as a group.

packages/angular/cli/src/commands/mcp/tools/serve_spec.ts renamed to packages/angular/cli/src/commands/mcp/tools/devserver/serve_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
import { EventEmitter } from 'events';
1010
import { ChildProcess } from 'node:child_process';
11-
import { MockHost } from '../testing/mock-host';
11+
import { MockHost } from '../../testing/mock-host';
12+
import { McpToolContext } from '../tool-registry';
1213
import { startDevServer } from './start-devserver';
1314
import { stopDevserver } from './stop-devserver';
14-
import { McpToolContext } from './tool-registry';
1515
import { WATCH_DELAY, waitForDevserverBuild } from './wait-for-devserver-build';
1616

1717
class MockChildProcess extends EventEmitter {

packages/angular/cli/src/commands/mcp/tools/start-devserver.ts renamed to packages/angular/cli/src/commands/mcp/tools/devserver/start-devserver.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
*/
88

99
import { z } from 'zod';
10-
import { LocalDevServer, devServerKey } from '../dev-server';
11-
import { Host, LocalWorkspaceHost } from '../host';
12-
import { createStructuredContentOutput } from '../utils';
13-
import { McpToolContext, McpToolDeclaration, declareTool } from './tool-registry';
10+
import { LocalDevServer, devServerKey } from '../../dev-server';
11+
import { Host, LocalWorkspaceHost } from '../../host';
12+
import { createStructuredContentOutput } from '../../utils';
13+
import { McpToolContext, McpToolDeclaration, declareTool } from '../tool-registry';
1414

1515
const startDevServerToolInputSchema = z.object({
1616
project: z

packages/angular/cli/src/commands/mcp/tools/stop-devserver.ts renamed to packages/angular/cli/src/commands/mcp/tools/devserver/stop-devserver.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88

99
import { z } from 'zod';
10-
import { devServerKey } from '../dev-server';
11-
import { createStructuredContentOutput } from '../utils';
12-
import { McpToolContext, McpToolDeclaration, declareTool } from './tool-registry';
10+
import { devServerKey } from '../../dev-server';
11+
import { createStructuredContentOutput } from '../../utils';
12+
import { McpToolContext, McpToolDeclaration, declareTool } from '../tool-registry';
1313

1414
const stopDevserverToolInputSchema = z.object({
1515
project: z

packages/angular/cli/src/commands/mcp/tools/wait-for-devserver-build.ts renamed to packages/angular/cli/src/commands/mcp/tools/devserver/wait-for-devserver-build.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88

99
import { z } from 'zod';
10-
import { devServerKey } from '../dev-server';
11-
import { createStructuredContentOutput } from '../utils';
12-
import { McpToolContext, McpToolDeclaration, declareTool } from './tool-registry';
10+
import { devServerKey } from '../../dev-server';
11+
import { createStructuredContentOutput } from '../../utils';
12+
import { McpToolContext, McpToolDeclaration, declareTool } from '../tool-registry';
1313

1414
/**
1515
* How long to wait to give "ng serve" time to identify whether the watched workspace has changed.

0 commit comments

Comments
 (0)