@aws/nx-plugin 0.62.0 → 0.62.2

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.
Files changed (65) hide show
  1. package/LICENSE-THIRD-PARTY +30 -3
  2. package/package.json +3 -4
  3. package/src/infra/app/__snapshots__/generator.spec.ts.snap +2 -2
  4. package/src/mcp-server/schema.d.ts +7 -2
  5. package/src/mcp-server/schema.js +2 -2
  6. package/src/mcp-server/schema.js.map +1 -1
  7. package/src/mcp-server/tools/create-workspace-command.js +8 -2
  8. package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
  9. package/src/mcp-server/tools/general-guidance.js +4 -1
  10. package/src/mcp-server/tools/general-guidance.js.map +1 -1
  11. package/src/mcp-server/tools/generator-guide.js +7 -4
  12. package/src/mcp-server/tools/generator-guide.js.map +1 -1
  13. package/src/mcp-server/tools/list-generators.js +4 -1
  14. package/src/mcp-server/tools/list-generators.js.map +1 -1
  15. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +1 -1
  16. package/src/py/strands-agent/__snapshots__/generator.spec.ts.snap +1 -1
  17. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
  18. package/src/ts/mcp-server/files/resources/sample-guidance.ts.template +1 -1
  19. package/src/ts/mcp-server/files/tools/add.ts.template +6 -4
  20. package/src/ts/mcp-server/generator.js +1 -5
  21. package/src/ts/mcp-server/generator.js.map +1 -1
  22. package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +35 -20
  23. package/src/ts/nx-plugin/files/mcp-server/schema.ts.template +1 -1
  24. package/src/ts/nx-plugin/files/mcp-server/tools/create-workspace-command.ts.template +7 -5
  25. package/src/ts/nx-plugin/files/mcp-server/tools/general-guidance.ts.template +5 -3
  26. package/src/ts/nx-plugin/files/mcp-server/tools/generator-guide.ts.template +9 -7
  27. package/src/ts/nx-plugin/files/mcp-server/tools/list-generators.ts.template +6 -4
  28. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +883 -85
  29. package/src/ts/react-website/app/files/app/{src → cloudscape/src}/app.tsx.template +1 -1
  30. package/src/ts/react-website/app/files/app/cloudscape/src/components/alert.tsx.template +3 -0
  31. package/src/ts/react-website/app/files/app/cloudscape/src/components/spinner.tsx.template +3 -0
  32. package/src/ts/react-website/app/files/app/{src → common/src}/config.ts.template +1 -1
  33. package/src/ts/react-website/app/files/app/none/src/app.tsx.template +8 -0
  34. package/src/ts/react-website/app/files/app/none/src/components/AppLayout/index.tsx.template +124 -0
  35. package/src/ts/react-website/app/files/app/none/src/components/alert.tsx.template +14 -0
  36. package/src/ts/react-website/app/files/app/none/src/components/spinner.tsx.template +7 -0
  37. package/src/ts/react-website/app/files/app/none/src/main.tsx.template +31 -0
  38. package/src/ts/react-website/app/files/app/none/src/styles.css.template +201 -0
  39. package/src/ts/react-website/app/files/tanstack-router/common/src/routeTree.gen.ts.template +59 -0
  40. package/src/ts/react-website/app/files/tanstack-router/none/src/routes/index.tsx.template +14 -0
  41. package/src/ts/react-website/app/generator.d.ts +2 -0
  42. package/src/ts/react-website/app/generator.js +30 -16
  43. package/src/ts/react-website/app/generator.js.map +1 -1
  44. package/src/ts/react-website/app/schema.d.ts +2 -1
  45. package/src/ts/react-website/app/schema.json +22 -0
  46. package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +348 -185
  47. package/src/ts/react-website/cognito-auth/files/app/components/CognitoAuth/index.tsx.template +15 -15
  48. package/src/ts/react-website/cognito-auth/generator.js +14 -40
  49. package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
  50. package/src/ts/react-website/cognito-auth/utils.d.ts +7 -0
  51. package/src/ts/react-website/cognito-auth/utils.js +92 -0
  52. package/src/ts/react-website/cognito-auth/utils.js.map +1 -0
  53. package/src/ts/react-website/runtime-config/__snapshots__/generator.spec.ts.snap +1 -1
  54. package/src/ts/react-website/runtime-config/files/app/components/RuntimeConfig/index.tsx.template +1 -1
  55. package/src/utils/versions.d.ts +9 -10
  56. package/src/utils/versions.js +9 -12
  57. package/src/utils/versions.js.map +1 -1
  58. package/src/ts/react-website/app/files/tanstack-router/src/routeTree.gen.ts.template +0 -111
  59. /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/components/AppLayout/index.tsx.template +0 -0
  60. /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/hooks/useAppLayout.tsx.template +0 -0
  61. /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/main.tsx.template +0 -0
  62. /package/src/ts/react-website/app/files/app/{src → cloudscape/src}/styles.css.template +0 -0
  63. /package/src/ts/react-website/app/files/app/{README.md.template → common/README.md.template} +0 -0
  64. /package/src/ts/react-website/app/files/tanstack-router/{src → cloudscape/src}/routes/index.tsx.template +0 -0
  65. /package/src/ts/react-website/app/files/tanstack-router/{src → common/src}/routes/__root.tsx.template +0 -0
@@ -3878,7 +3878,7 @@ THE SOFTWARE.
3878
3878
 
3879
3879
  ---
3880
3880
 
3881
- The following software may be included in this product: @modelcontextprotocol/sdk (1.21.0)
3881
+ The following software may be included in this product: @modelcontextprotocol/sdk (1.24.1)
3882
3882
  This software contains the following license and notice below:
3883
3883
 
3884
3884
  MIT License
@@ -15822,6 +15822,33 @@ SOFTWARE.
15822
15822
 
15823
15823
  ---
15824
15824
 
15825
+ The following software may be included in this product: jose (6.1.3)
15826
+ This software contains the following license and notice below:
15827
+
15828
+ The MIT License (MIT)
15829
+
15830
+ Copyright (c) 2018 Filip Skokan
15831
+
15832
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15833
+ of this software and associated documentation files (the "Software"), to deal
15834
+ in the Software without restriction, including without limitation the rights
15835
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15836
+ copies of the Software, and to permit persons to whom the Software is
15837
+ furnished to do so, subject to the following conditions:
15838
+
15839
+ The above copyright notice and this permission notice shall be included in all
15840
+ copies or substantial portions of the Software.
15841
+
15842
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15843
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15844
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15845
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15846
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15847
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
15848
+ SOFTWARE.
15849
+
15850
+ ---
15851
+
15825
15852
  The following software may be included in this product: js-tokens (4.0.0)
15826
15853
  This software contains the following license and notice below:
15827
15854
 
@@ -27276,7 +27303,7 @@ SOFTWARE.
27276
27303
 
27277
27304
  ---
27278
27305
 
27279
- The following software may be included in this product: ts-node (10.9.1)
27306
+ The following software may be included in this product: ts-node (10.9.2)
27280
27307
  This software contains the following license and notice below:
27281
27308
 
27282
27309
  The MIT License (MIT)
@@ -31481,7 +31508,7 @@ OTHER DEALINGS IN THE SOFTWARE.
31481
31508
 
31482
31509
  ---
31483
31510
 
31484
- The following software may be included in this product: zod (3.25.76)
31511
+ The following software may be included in this product: zod (4.1.13)
31485
31512
  This software contains the following license and notice below:
31486
31513
 
31487
31514
  MIT License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "0.62.0",
3
+ "version": "0.62.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -26,7 +26,7 @@
26
26
  "@apidevtools/swagger-parser": "^10.1.1",
27
27
  "@hey-api/openapi-ts": "0.64.13",
28
28
  "@iarna/toml": "^2.2.5",
29
- "@modelcontextprotocol/sdk": "^1.21.0",
29
+ "@modelcontextprotocol/sdk": "^1.24.0",
30
30
  "@nx/devkit": "~22.1.3",
31
31
  "@nx/eslint": "~22.1.3",
32
32
  "@nx/js": "~22.1.3",
@@ -48,8 +48,7 @@
48
48
  "typescript": "~5.9.3",
49
49
  "vite": "^7.2.4",
50
50
  "vitest": "^4.0.14",
51
- "zod": "^4.1.13",
52
- "zod-v3": "npm:zod@^3.25.76"
51
+ "zod": "^4.1.13"
53
52
  },
54
53
  "types": "./src/index.d.ts"
55
54
  }
@@ -3,7 +3,7 @@
3
3
  exports[`infra generator > should add required dependencies to package.json > dependencies 1`] = `
4
4
  {
5
5
  "aws-cdk": "2.1033.0",
6
- "aws-cdk-lib": "2.229.1",
6
+ "aws-cdk-lib": "2.230.0",
7
7
  "constructs": "10.4.3",
8
8
  "esbuild": "0.27.0",
9
9
  "source-map-support": "0.5.21",
@@ -40,7 +40,7 @@ exports[`infra generator > should add required dependencies to package.json > pa
40
40
  {
41
41
  "dependencies": {
42
42
  "aws-cdk": "2.1033.0",
43
- "aws-cdk-lib": "2.229.1",
43
+ "aws-cdk-lib": "2.230.0",
44
44
  "constructs": "10.4.3",
45
45
  "esbuild": "0.27.0",
46
46
  "source-map-support": "0.5.21",
@@ -2,6 +2,11 @@
2
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { z } from 'zod-v3';
5
+ import { z } from 'zod';
6
6
  export declare const PACKAGE_MANAGERS: readonly ["pnpm", "yarn", "npm", "bun"];
7
- export declare const PackageManagerSchema: z.ZodEnum<["pnpm", "yarn", "npm", "bun"]>;
7
+ export declare const PackageManagerSchema: z.ZodEnum<{
8
+ yarn: "yarn";
9
+ pnpm: "pnpm";
10
+ npm: "npm";
11
+ bun: "bun";
12
+ }>;
@@ -5,7 +5,7 @@ exports.PackageManagerSchema = exports.PACKAGE_MANAGERS = void 0;
5
5
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6
6
  * SPDX-License-Identifier: Apache-2.0
7
7
  */
8
- const zod_v3_1 = require("zod-v3");
8
+ const zod_1 = require("zod");
9
9
  exports.PACKAGE_MANAGERS = ['pnpm', 'yarn', 'npm', 'bun'];
10
- exports.PackageManagerSchema = zod_v3_1.z.enum(exports.PACKAGE_MANAGERS);
10
+ exports.PackageManagerSchema = zod_1.z.enum(exports.PACKAGE_MANAGERS);
11
11
  //# sourceMappingURL=schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/mcp-server/schema.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,mCAA2B;AAEd,QAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAC3D,QAAA,oBAAoB,GAAG,UAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/mcp-server/schema.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,6BAAwB;AAEX,QAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAC3D,QAAA,oBAAoB,GAAG,OAAC,CAAC,IAAI,CAAC,wBAAgB,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addCreateWorkspaceCommandTool = void 0;
4
- const zod_v3_1 = require("zod-v3");
4
+ const zod_1 = require("zod");
5
5
  const schema_1 = require("../schema");
6
6
  const iac_1 = require("../../utils/iac");
7
7
  const versions_1 = require("../../utils/versions");
@@ -9,7 +9,13 @@ const versions_1 = require("../../utils/versions");
9
9
  * Add a tool which tells a model how to create an Nx workspace
10
10
  */
11
11
  const addCreateWorkspaceCommandTool = (server) => {
12
- server.tool('create-workspace-command', 'Tool to discover how to create a workspace to start a new project.', { workspaceName: zod_v3_1.z.string(), packageManager: schema_1.PackageManagerSchema }, ({ workspaceName, packageManager }) => ({
12
+ server.registerTool('create-workspace-command', {
13
+ description: 'Tool to discover how to create a workspace to start a new project.',
14
+ inputSchema: {
15
+ workspaceName: zod_1.z.string(),
16
+ packageManager: schema_1.PackageManagerSchema,
17
+ },
18
+ }, ({ workspaceName, packageManager }) => ({
13
19
  content: [
14
20
  {
15
21
  type: 'text',
@@ -1 +1 @@
1
- {"version":3,"file":"create-workspace-command.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/create-workspace-command.ts"],"names":[],"mappings":";;;AAKA,mCAA2B;AAC3B,sCAAiD;AACjD,yCAAgD;AAChD,mDAAmD;AAEnD;;GAEG;AACI,MAAM,6BAA6B,GAAG,CAAC,MAAiB,EAAE,EAAE;IACjE,MAAM,CAAC,IAAI,CACT,0BAA0B,EAC1B,oEAAoE,EACpE,EAAE,aAAa,EAAE,UAAC,CAAC,MAAM,EAAE,EAAE,cAAc,EAAE,6BAAoB,EAAE,EACnE,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;;;0BAGU,sBAAW,CAAC,qBAAqB,CAAC,IAAI,aAAa,SAAS,cAAc;;;8CAGtD,aAAa;;qEAEU,mBAAa,CAAC,IAAI,CAAC,IAAI,CAAC;yCACpD,mBAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;GACzG;aACM;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,6BAA6B,iCAwBxC"}
1
+ {"version":3,"file":"create-workspace-command.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/create-workspace-command.ts"],"names":[],"mappings":";;;AAKA,6BAAwB;AACxB,sCAAiD;AACjD,yCAAgD;AAChD,mDAAmD;AAEnD;;GAEG;AACI,MAAM,6BAA6B,GAAG,CAAC,MAAiB,EAAE,EAAE;IACjE,MAAM,CAAC,YAAY,CACjB,0BAA0B,EAC1B;QACE,WAAW,EACT,oEAAoE;QACtE,WAAW,EAAE;YACX,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;YACzB,cAAc,EAAE,6BAAoB;SACrC;KACF,EACD,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE;;;0BAGU,sBAAW,CAAC,qBAAqB,CAAC,IAAI,aAAa,SAAS,cAAc;;;8CAGtD,aAAa;;qEAEU,mBAAa,CAAC,IAAI,CAAC,IAAI,CAAC;yCACpD,mBAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;GACzG;aACM;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,6BAA6B,iCA8BxC"}
@@ -15,7 +15,10 @@ exports.TOOL_SELECTION_GUIDE = `## Tool Selection Guide
15
15
  * Add a tool which provides general guidance for using Nx and the Nx Plugin for AWS
16
16
  */
17
17
  const addGeneralGuidanceTool = (server, generators) => {
18
- server.tool('general-guidance', 'Tool for guidance and best practices for working with Nx and the Nx Plugin for AWS', () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
18
+ server.registerTool('general-guidance', {
19
+ title: 'General Guidance',
20
+ description: 'Tool for guidance and best practices for working with Nx and the Nx Plugin for AWS',
21
+ }, () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
19
22
  return ({
20
23
  content: [
21
24
  {
@@ -1 +1 @@
1
- {"version":3,"file":"general-guidance.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/general-guidance.ts"],"names":[],"mappings":";;;;AAMA,sCAA6C;AAC7C,sDAAoE;AACpE,yCAAgD;AAEnC,QAAA,oBAAoB,GAAG;;;;;gGAK4D,CAAC;AAEjG;;GAEG;AACI,MAAM,sBAAsB,GAAG,CACpC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,IAAI,CACT,kBAAkB,EAClB,oFAAoF,EACpF,GAAS,EAAE;QAAC,OAAA,CAAC;YACX,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;EAEd,4BAAoB;;;;2DAIqC,yBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;iFACL,mBAAa,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;EAOvG,yBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,+BAAc,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkC3E,MAAM,IAAA,gCAAe,EAAC,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,EAAE,UAAU,CAAC;;KAExE;iBACI;aACF;SACF,CAAC,CAAA;MAAA,CACH,CAAC;AACJ,CAAC,CAAC;AAlEW,QAAA,sBAAsB,0BAkEjC"}
1
+ {"version":3,"file":"general-guidance.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/general-guidance.ts"],"names":[],"mappings":";;;;AAMA,sCAA6C;AAC7C,sDAAoE;AACpE,yCAAgD;AAEnC,QAAA,oBAAoB,GAAG;;;;;gGAK4D,CAAC;AAEjG;;GAEG;AACI,MAAM,sBAAsB,GAAG,CACpC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,KAAK,EAAE,kBAAkB;QACzB,WAAW,EACT,oFAAoF;KACvF,EACD,GAAS,EAAE;QAAC,OAAA,CAAC;YACX,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE;;EAEd,4BAAoB;;;;2DAIqC,yBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;iFACL,mBAAa,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;EAOvG,yBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAA,+BAAc,EAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkC3E,MAAM,IAAA,gCAAe,EAAC,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,EAAE,UAAU,CAAC;;KAExE;iBACI;aACF;SACF,CAAC,CAAA;MAAA,CACH,CAAC;AACJ,CAAC,CAAC;AAtEW,QAAA,sBAAsB,0BAsEjC"}
@@ -2,16 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addGeneratorGuideTool = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const zod_v3_1 = require("zod-v3");
5
+ const zod_1 = require("zod");
6
6
  const generator_info_1 = require("../generator-info");
7
7
  const schema_1 = require("../schema");
8
8
  /**
9
9
  * Add a tool which provides a detailed guide for an individual generator
10
10
  */
11
11
  const addGeneratorGuideTool = (server, generators) => {
12
- server.tool('generator-guide', 'Tool to retrieve detailed information about a specific generator.', {
13
- packageManager: schema_1.PackageManagerSchema,
14
- generator: zod_v3_1.z.custom((v) => typeof v === 'string' && generators.map((g) => g.id).includes(v)),
12
+ server.registerTool('generator-guide', {
13
+ description: 'Tool to retrieve detailed information about a specific generator.',
14
+ inputSchema: {
15
+ packageManager: schema_1.PackageManagerSchema,
16
+ generator: zod_1.z.enum(generators.map((g) => g.id)),
17
+ },
15
18
  }, (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ packageManager, generator: generatorId }) {
16
19
  const generator = generators.find((g) => g.id === generatorId);
17
20
  if (!generator) {
@@ -1 +1 @@
1
- {"version":3,"file":"generator-guide.js","sourceRoot":"","sources":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":"generator-guide.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/generator-guide.ts"],"names":[],"mappings":";;;;AAMA,6BAAwB;AACxB,sDAG2B;AAC3B,sCAAiD;AAEjD;;GAEG;AACI,MAAM,qBAAqB,GAAG,CACnC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,YAAY,CACjB,iBAAiB,EACjB;QACE,WAAW,EACT,mEAAmE;QACrE,WAAW,EAAE;YACX,cAAc,EAAE,6BAAoB;YACpC,SAAS,EAAE,OAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC/C;KACF,EACD,KAAmD,EAAE,oDAA9C,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE;QAC/C,MAAM,SAAS,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,WAAW,CAAC,CAAC;QAC/D,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,8BAA8B,WAAW,2BAA2B,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC7G,CAAC;QACJ,CAAC;QAED,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,MAAM,IAAA,oCAAmB,EAAC,cAAc,EAAE,SAAS,CAAC;;;;EAIpE,MAAM,IAAA,4CAA2B,EAAC,SAAS,EAAE,UAAU,EAAE,cAAc,CAAC;CACzE;iBACU;aACF;SACF,CAAC;IACJ,CAAC,CAAA,CACF,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,qBAAqB,yBAqChC"}
@@ -7,7 +7,10 @@ const generator_info_1 = require("../generator-info");
7
7
  * Adds a tool which lists details about the available generators
8
8
  */
9
9
  const addListGeneratorsTool = (server, generators) => {
10
- server.tool('list-generators', 'Tool to discover the available generators and how to run them.', { packageManager: schema_1.PackageManagerSchema }, ({ packageManager }) => ({
10
+ server.registerTool('list-generators', {
11
+ description: 'Tool to discover the available generators and how to run them.',
12
+ inputSchema: { packageManager: schema_1.PackageManagerSchema },
13
+ }, ({ packageManager }) => ({
11
14
  content: [
12
15
  {
13
16
  type: 'text',
@@ -1 +1 @@
1
- {"version":3,"file":"list-generators.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/list-generators.ts"],"names":[],"mappings":";;;AAKA,sCAAiD;AACjD,sDAAwD;AAGxD;;GAEG;AACI,MAAM,qBAAqB,GAAG,CACnC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,IAAI,CACT,iBAAiB,EACjB,gEAAgE,EAChE,EAAE,cAAc,EAAE,6BAAoB,EAAE,EACxC,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACvB,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;;IAEZ,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,IAAA,oCAAmB,EAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;GACpF;aACM;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AApBW,QAAA,qBAAqB,yBAoBhC"}
1
+ {"version":3,"file":"list-generators.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/mcp-server/tools/list-generators.ts"],"names":[],"mappings":";;;AAKA,sCAAiD;AACjD,sDAAwD;AAGxD;;GAEG;AACI,MAAM,qBAAqB,GAAG,CACnC,MAAiB,EACjB,UAA6B,EAC7B,EAAE;IACF,MAAM,CAAC,YAAY,CACjB,iBAAiB,EACjB;QACE,WAAW,EACT,gEAAgE;QAClE,WAAW,EAAE,EAAE,cAAc,EAAE,6BAAoB,EAAE;KACtD,EACD,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;QACvB,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE;;IAEZ,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,IAAA,oCAAmB,EAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;GACpF;aACM;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,qBAAqB,yBAuBhC"}
@@ -546,7 +546,7 @@ name = "proj.test_project"
546
546
  version = "0.1.0"
547
547
  dependencies = [
548
548
  "mcp==1.22.0",
549
- "boto3==1.41.5",
549
+ "boto3==1.42.0",
550
550
  "aws-opentelemetry-distro==0.14.0"
551
551
  ]
552
552
 
@@ -590,7 +590,7 @@ dependencies = [
590
590
  "aws-opentelemetry-distro==0.14.0",
591
591
  "bedrock-agentcore==0.1.7",
592
592
  "fastapi==0.123.0",
593
- "boto3==1.41.5",
593
+ "boto3==1.42.0",
594
594
  "mcp==1.22.0",
595
595
  "strands-agents==1.18.0",
596
596
  "strands-agents-tools==0.2.16",
@@ -640,9 +640,9 @@ exports[`ts#mcp-server generator > should match snapshot for generated files > u
640
640
  "snapshot-server": "./src/snapshot-server/stdio.js"
641
641
  },
642
642
  "dependencies": {
643
- "@modelcontextprotocol/sdk": "1.21.0",
643
+ "@modelcontextprotocol/sdk": "1.24.0",
644
644
  "express": "5.1.0",
645
- "zod-v3": "npm:zod@^3"
645
+ "zod": "4.1.13"
646
646
  },
647
647
  "devDependencies": {
648
648
  "@modelcontextprotocol/inspector": "0.17.2",
@@ -1,7 +1,7 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
 
3
3
  export const registerSampleGuidanceResource = (server: McpServer) => {
4
- server.resource('example-context', 'example://context', async (uri) => ({
4
+ server.registerResource('example-context', 'example://context', {}, async (uri) => ({
5
5
  contents: [{ uri: uri.href, text: `## Sample Guidance
6
6
 
7
7
  This is some guidance in markdown format!`}],
@@ -1,11 +1,13 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { z } from 'zod-v3';
2
+ import { z } from 'zod';
3
3
 
4
4
  export const registerAddTool = (server: McpServer) => {
5
- server.tool("add", "adds two numbers",
6
- { a: z.number(), b: z.number() },
5
+ server.registerTool("add", {
6
+ description: "adds two numbers",
7
+ inputSchema: { a: z.number(), b: z.number() }
8
+ },
7
9
  async ({ a, b }) => ({
8
- content: [{ type: "text", text: String(a + b) }]
10
+ content: [{ type: "text" as const, text: String(a + b) }]
9
11
  })
10
12
  );
11
13
  };
@@ -62,11 +62,7 @@ const tsMcpServerGenerator = (tree, options) => tslib_1.__awaiter(void 0, void 0
62
62
  distDir,
63
63
  }, { overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting });
64
64
  // Add dependencies
65
- // Note here we depend on zod v3 (default zod is v4 for all other generators)
66
- // Zod v3 is needed since the MCP SDK doesn't yet support v4 (or both v3 and v4 via standard schema)
67
- // Tracking: https://github.com/modelcontextprotocol/typescript-sdk/issues/164
68
- // We use a renamed dependency so that v3 and v4 can coexist in projects until the above is resolved
69
- const deps = (0, versions_1.withVersions)(['@modelcontextprotocol/sdk', 'zod-v3', 'express']);
65
+ const deps = (0, versions_1.withVersions)(['@modelcontextprotocol/sdk', 'zod', 'express']);
70
66
  const devDeps = (0, versions_1.withVersions)([
71
67
  'tsx',
72
68
  '@types/express',
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/mcp-server/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAYoB;AAEpB,uCAMwB;AACxB,iDAAsE;AACtE,+CAA0D;AAC1D,mDAAoD;AACpD,6CAA2D;AAC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AC,IAAI,EACZ,oCAA4B,EAC5B,eAAe,EACf;QACE,IAAI,EAAE,YAAY;KACnB,CACF,CAAC;IAEF,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,oCAA4B,CAAC,CAAC,CAAC;IAE5E,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;IACjC,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC,CAAA,CAAC;AAnLW,QAAA,oBAAoB,wBAmL/B;AAEF,kBAAe,4BAAoB,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/mcp-server/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAYoB;AAEpB,uCAMwB;AACxB,iDAAsE;AACtE,+CAA0D;AAC1D,mDAAoD;AACpD,6CAA2D;AAC3D,qEAA0E;AAC1E,mGAA4F;AAC5F,qDAAoD;AACpD,yCAAqD;AACrD,sDAAsE;AACtE,2CAA8C;AAEjC,QAAA,4BAA4B,GACvC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAExB,MAAM,oBAAoB,GAAG,CAClC,IAAU,EACV,OAAmC,EACP,EAAE;;IAC9B,MAAM,OAAO,GAAG,IAAA,wCAAmC,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAE3E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAA,0BAAiB,EAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,KAAK,CACb,uBAAuB,OAAO,CAAC,OAAO,wDAAwD,CAC/F,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,GAAG,IAAA,iBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC;IAC7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G,eAAe,QAAQ,CAAC,EAAE;gBAC5B,QAAQ,EAAE,iBAAiB;gBAC3B,OAAO,EAAE;oBACP,QAAQ,EAAE,CAAC,eAAe,iBAAiB,UAAU,CAAC;oBACtD,GAAG,EAAE,eAAe;oBACpB,GAAG,EAAE;wBACH,IAAI,EAAE,GAAG,YAAY,EAAE;qBACxB;iBACF;gBACD,UAAU,EAAE,IAAI;aACjB,EACD,CAAC,GAAG,eAAe,UAAU,CAAC,EAAE;gBAC9B,QAAQ,EAAE,iBAAiB;gBAC3B,OAAO,EAAE;oBACP,QAAQ,EAAE;wBACR,gCAAgC,iBAAiB,WAAW;qBAC7D;oBACD,GAAG,EAAE,eAAe;iBACrB;gBACD,UAAU,EAAE,IAAI;aACjB,OAEH,CAAC;IAEH,IAAA,kCAA6B,EAC3B,IAAI,EACJ,OAAO,CAAC,IAAI,EACZ,oCAA4B,EAC5B,eAAe,EACf;QACE,IAAI,EAAE,YAAY;KACnB,CACF,CAAC;IAEF,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,oCAA4B,CAAC,CAAC,CAAC;IAE5E,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;IACjC,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC,CAAA,CAAC;AA/KW,QAAA,oBAAoB,wBA+K/B;AAEF,kBAAe,4BAAoB,CAAC"}
@@ -148,7 +148,7 @@ exports[`ts#nx-plugin generator > should generate MCP server files > test-plugin
148
148
  `;
149
149
 
150
150
  exports[`ts#nx-plugin generator > should generate MCP server files > test-plugin/src/mcp-server/schema.ts 1`] = `
151
- "import { z } from 'zod-v3';
151
+ "import { z } from 'zod';
152
152
 
153
153
  export const PACKAGE_MANAGERS = ['pnpm', 'yarn', 'npm', 'bun'] as const;
154
154
  export const PackageManagerSchema = z.enum(PACKAGE_MANAGERS);
@@ -223,7 +223,7 @@ void (async () => {
223
223
 
224
224
  exports[`ts#nx-plugin generator > should generate MCP server files > test-plugin/src/mcp-server/tools/create-workspace-command.ts 1`] = `
225
225
  "import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
226
- import { z } from 'zod-v3';
226
+ import { z } from 'zod';
227
227
  import { PackageManagerSchema } from '../schema';
228
228
  import { buildInstallCommand, getPackageName } from '../utils';
229
229
 
@@ -231,14 +231,20 @@ import { buildInstallCommand, getPackageName } from '../utils';
231
231
  * Registers a tool which tells a model how to create an Nx workspace
232
232
  */
233
233
  export const registerCreateWorkspaceCommandTool = (server: McpServer) => {
234
- server.tool(
234
+ server.registerTool(
235
235
  'create-workspace-command',
236
- 'Tool to discover how to create a workspace to start a new project.',
237
- { workspaceName: z.string(), packageManager: PackageManagerSchema },
236
+ {
237
+ description:
238
+ 'Tool to discover how to create a workspace to start a new project.',
239
+ inputSchema: {
240
+ workspaceName: z.string(),
241
+ packageManager: PackageManagerSchema,
242
+ },
243
+ },
238
244
  ({ workspaceName, packageManager }) => ({
239
245
  content: [
240
246
  {
241
- type: 'text',
247
+ type: 'text' as const,
242
248
  text: \`Run the following command to create a workspace:
243
249
 
244
250
  \\\`\\\`\\\`bash
@@ -270,13 +276,16 @@ import * as path from 'path';
270
276
  * Registers a tool which provides general guidance for using Nx and this plugin
271
277
  */
272
278
  export const registerGeneralGuidanceTool = (server: McpServer) => {
273
- server.tool(
279
+ server.registerTool(
274
280
  'general-guidance',
275
- 'Tool for guidance and best practices for working with Nx and this plugin',
281
+ {
282
+ description:
283
+ 'Tool for guidance and best practices for working with Nx and this plugin',
284
+ },
276
285
  async () => ({
277
286
  content: [
278
287
  {
279
- type: 'text',
288
+ type: 'text' as const,
280
289
  text: fs.readFileSync(
281
290
  path.resolve(__dirname, '../resources/GENERAL_GUIDANCE.md'),
282
291
  'utf-8',
@@ -291,7 +300,7 @@ export const registerGeneralGuidanceTool = (server: McpServer) => {
291
300
 
292
301
  exports[`ts#nx-plugin generator > should generate MCP server files > test-plugin/src/mcp-server/tools/generator-guide.ts 1`] = `
293
302
  "import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
294
- import { z } from 'zod-v3';
303
+ import { z } from 'zod';
295
304
  import { renderGeneratorInfo, listGenerators } from '../utils';
296
305
  import { PackageManagerSchema } from '../schema';
297
306
  import * as fs from 'fs';
@@ -301,15 +310,18 @@ import * as path from 'path';
301
310
  * Registers a tool which provides a detailed guide for an individual generator
302
311
  */
303
312
  export const registerGeneratorGuideTool = (server: McpServer) => {
304
- server.tool(
313
+ const generators = listGenerators();
314
+ server.registerTool(
305
315
  'generator-guide',
306
- 'Tool to retrieve detailed information about a specific generator.',
307
316
  {
308
- packageManager: PackageManagerSchema,
309
- generator: z.string(),
317
+ description:
318
+ 'Tool to retrieve detailed information about a specific generator.',
319
+ inputSchema: {
320
+ packageManager: PackageManagerSchema,
321
+ generator: z.enum(generators.map((g) => g.id)),
322
+ },
310
323
  },
311
324
  async ({ packageManager, generator: generatorId }) => {
312
- const generators = listGenerators();
313
325
  const generator = generators.find((g) => g.id === generatorId);
314
326
  if (!generator) {
315
327
  throw new Error(
@@ -320,7 +332,7 @@ export const registerGeneratorGuideTool = (server: McpServer) => {
320
332
  return {
321
333
  content: [
322
334
  {
323
- type: 'text',
335
+ type: 'text' as const,
324
336
  text: \`## \${renderGeneratorInfo(packageManager, generator)}
325
337
 
326
338
  # Guide
@@ -345,14 +357,17 @@ import { renderGeneratorInfo, listGenerators } from '../utils';
345
357
  * Registers a tool which lists details about the available generators
346
358
  */
347
359
  export const registerListGeneratorsTool = (server: McpServer) => {
348
- server.tool(
360
+ server.registerTool(
349
361
  'list-generators',
350
- 'Tool to discover the available generators and how to run them.',
351
- { packageManager: PackageManagerSchema },
362
+ {
363
+ description:
364
+ 'Tool to discover the available generators and how to run them.',
365
+ inputSchema: { packageManager: PackageManagerSchema },
366
+ },
352
367
  ({ packageManager }) => ({
353
368
  content: [
354
369
  {
355
- type: 'text',
370
+ type: 'text' as const,
356
371
  text: \`## Available Generators
357
372
 
358
373
  \${listGenerators()
@@ -1,4 +1,4 @@
1
- import { z } from 'zod-v3';
1
+ import { z } from 'zod';
2
2
 
3
3
  export const PACKAGE_MANAGERS = ['pnpm', 'yarn', 'npm', 'bun'] as const;
4
4
  export const PackageManagerSchema = z.enum(PACKAGE_MANAGERS);
@@ -1,5 +1,5 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { z } from 'zod-v3';
2
+ import { z } from 'zod';
3
3
  import { PackageManagerSchema } from '../schema';
4
4
  import { buildInstallCommand, getPackageName } from '../utils';
5
5
 
@@ -7,14 +7,16 @@ import { buildInstallCommand, getPackageName } from '../utils';
7
7
  * Registers a tool which tells a model how to create an Nx workspace
8
8
  */
9
9
  export const registerCreateWorkspaceCommandTool = (server: McpServer) => {
10
- server.tool(
10
+ server.registerTool(
11
11
  'create-workspace-command',
12
- 'Tool to discover how to create a workspace to start a new project.',
13
- { workspaceName: z.string(), packageManager: PackageManagerSchema },
12
+ {
13
+ description: 'Tool to discover how to create a workspace to start a new project.',
14
+ inputSchema: { workspaceName: z.string(), packageManager: PackageManagerSchema },
15
+ },
14
16
  ({ workspaceName, packageManager }) => ({
15
17
  content: [
16
18
  {
17
- type: 'text',
19
+ type: 'text' as const,
18
20
  text: `Run the following command to create a workspace:
19
21
 
20
22
  \`\`\`bash
@@ -6,13 +6,15 @@ import * as path from 'path';
6
6
  * Registers a tool which provides general guidance for using Nx and this plugin
7
7
  */
8
8
  export const registerGeneralGuidanceTool = (server: McpServer) => {
9
- server.tool(
9
+ server.registerTool(
10
10
  'general-guidance',
11
- 'Tool for guidance and best practices for working with Nx and this plugin',
11
+ {
12
+ description: 'Tool for guidance and best practices for working with Nx and this plugin',
13
+ },
12
14
  async () => ({
13
15
  content: [
14
16
  {
15
- type: 'text',
17
+ type: 'text' as const,
16
18
  text: fs.readFileSync(
17
19
  path.resolve(__dirname, '../resources/GENERAL_GUIDANCE.md'),
18
20
  'utf-8',
@@ -1,5 +1,5 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { z } from 'zod-v3';
2
+ import { z } from 'zod';
3
3
  import { renderGeneratorInfo, listGenerators } from '../utils';
4
4
  import { PackageManagerSchema } from '../schema';
5
5
  import * as fs from 'fs';
@@ -11,15 +11,17 @@ import * as path from 'path';
11
11
  export const registerGeneratorGuideTool = (
12
12
  server: McpServer,
13
13
  ) => {
14
- server.tool(
14
+ const generators = listGenerators();
15
+ server.registerTool(
15
16
  'generator-guide',
16
- 'Tool to retrieve detailed information about a specific generator.',
17
17
  {
18
- packageManager: PackageManagerSchema,
19
- generator: z.string(),
18
+ description: 'Tool to retrieve detailed information about a specific generator.',
19
+ inputSchema: {
20
+ packageManager: PackageManagerSchema,
21
+ generator: z.enum(generators.map(g => g.id)),
22
+ },
20
23
  },
21
24
  async ({ packageManager, generator: generatorId }) => {
22
- const generators = listGenerators();
23
25
  const generator = generators.find((g) => g.id === generatorId);
24
26
  if (!generator) {
25
27
  throw new Error(
@@ -30,7 +32,7 @@ export const registerGeneratorGuideTool = (
30
32
  return {
31
33
  content: [
32
34
  {
33
- type: 'text',
35
+ type: 'text' as const,
34
36
  text: `## ${renderGeneratorInfo(packageManager, generator)}
35
37
 
36
38
  # Guide
@@ -8,14 +8,16 @@ import { renderGeneratorInfo, listGenerators } from '../utils';
8
8
  export const registerListGeneratorsTool = (
9
9
  server: McpServer,
10
10
  ) => {
11
- server.tool(
11
+ server.registerTool(
12
12
  'list-generators',
13
- 'Tool to discover the available generators and how to run them.',
14
- { packageManager: PackageManagerSchema },
13
+ {
14
+ description: 'Tool to discover the available generators and how to run them.',
15
+ inputSchema: { packageManager: PackageManagerSchema },
16
+ },
15
17
  ({ packageManager }) => ({
16
18
  content: [
17
19
  {
18
- type: 'text',
20
+ type: 'text' as const,
19
21
  text: `## Available Generators
20
22
 
21
23
  ${listGenerators().map((g) => `### ${renderGeneratorInfo(packageManager, g)}`).join('\n\n')}