@aws/nx-plugin 1.0.0-rc.95 → 1.0.0-rc.97

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 (179) hide show
  1. package/LICENSE-THIRD-PARTY +234 -38
  2. package/migrations.json +65 -2
  3. package/package.json +6 -6
  4. package/src/agentcore-gateway/__snapshots__/generator.spec.ts.snap +1 -1
  5. package/src/agentcore-gateway/generator.js +6 -0
  6. package/src/agentcore-gateway/generator.js.map +1 -1
  7. package/src/agentcore-gateway/react-connection/__snapshots__/generator.spec.ts.snap +4 -1
  8. package/src/agentcore-harness/__snapshots__/generator.spec.ts.snap +68 -4
  9. package/src/agentcore-harness/generator.js +6 -0
  10. package/src/agentcore-harness/generator.js.map +1 -1
  11. package/src/connection/gateway-runtime-config.js +1 -1
  12. package/src/connection/gateway-runtime-config.js.map +1 -1
  13. package/src/infra/app/__snapshots__/generator.spec.ts.snap +10 -16
  14. package/src/infra/app/generator.js +34 -7
  15. package/src/infra/app/generator.js.map +1 -1
  16. package/src/init/generator.d.ts +1 -1
  17. package/src/init/generator.js +8 -6
  18. package/src/init/generator.js.map +1 -1
  19. package/src/init/schema.d.js.map +1 -1
  20. package/src/init/schema.d.ts +1 -0
  21. package/src/init/schema.json +5 -0
  22. package/src/mcp-server/server.js +2 -0
  23. package/src/mcp-server/server.js.map +1 -1
  24. package/src/mcp-server/tools/best-practices.d.ts +28 -0
  25. package/src/mcp-server/tools/best-practices.js +43 -0
  26. package/src/mcp-server/tools/best-practices.js.map +1 -0
  27. package/src/mcp-server/tools/general-guidance.d.ts +1 -1
  28. package/src/mcp-server/tools/general-guidance.js +13 -4
  29. package/src/mcp-server/tools/general-guidance.js.map +1 -1
  30. package/src/migrations/latest/checkov-scan-cache-inputs/metadata.json +3 -0
  31. package/src/migrations/latest/checkov-scan-cache-inputs/migration.d.ts +6 -0
  32. package/src/migrations/latest/checkov-scan-cache-inputs/migration.js +58 -0
  33. package/src/migrations/latest/checkov-scan-cache-inputs/migration.js.map +1 -0
  34. package/src/migrations/latest/gateway-url-accessor/__snapshots__/migration.spec.ts.snap +84 -0
  35. package/src/migrations/latest/gateway-url-accessor/metadata.json +3 -0
  36. package/src/migrations/latest/gateway-url-accessor/migration.d.ts +6 -0
  37. package/src/migrations/latest/gateway-url-accessor/migration.js +94 -0
  38. package/src/migrations/latest/gateway-url-accessor/migration.js.map +1 -0
  39. package/src/migrations/latest/infra-deploy-express-mode/metadata.json +1 -1
  40. package/src/migrations/latest/infra-deploy-express-mode/migration.js +26 -28
  41. package/src/migrations/latest/infra-deploy-express-mode/migration.js.map +1 -1
  42. package/src/migrations/latest/py-lambda-powertools-context/metadata.json +3 -0
  43. package/src/migrations/latest/py-lambda-powertools-context/migration.d.ts +6 -0
  44. package/src/migrations/latest/py-lambda-powertools-context/migration.js +58 -0
  45. package/src/migrations/latest/py-lambda-powertools-context/migration.js.map +1 -0
  46. package/src/migrations/latest/script-project-quality-gates/metadata.json +3 -0
  47. package/src/migrations/latest/script-project-quality-gates/migration.d.ts +6 -0
  48. package/src/migrations/latest/script-project-quality-gates/migration.js +53 -0
  49. package/src/migrations/latest/script-project-quality-gates/migration.js.map +1 -0
  50. package/src/migrations/latest/smithy-extension-trait-aliases/__snapshots__/migration.spec.ts.snap +25 -0
  51. package/src/migrations/latest/smithy-extension-trait-aliases/metadata.json +3 -0
  52. package/src/migrations/latest/smithy-extension-trait-aliases/migration.d.ts +28 -0
  53. package/src/migrations/latest/smithy-extension-trait-aliases/migration.js +75 -0
  54. package/src/migrations/latest/smithy-extension-trait-aliases/migration.js.map +1 -0
  55. package/src/migrations/latest/terraform-validate-without-backend/metadata.json +3 -0
  56. package/src/migrations/latest/terraform-validate-without-backend/migration.d.ts +6 -0
  57. package/src/migrations/latest/terraform-validate-without-backend/migration.js +84 -0
  58. package/src/migrations/latest/terraform-validate-without-backend/migration.js.map +1 -0
  59. package/src/preset/__snapshots__/generator.spec.ts.snap +3 -5
  60. package/src/preset/generator.js +4 -25
  61. package/src/preset/generator.js.map +1 -1
  62. package/src/py/agent/a2a-connection/generator.d.ts +1 -1
  63. package/src/py/agent/gateway-connection/generator.d.ts +1 -1
  64. package/src/py/agent/mcp-connection/generator.d.ts +1 -1
  65. package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +4 -1
  66. package/src/py/agent/react-connection/generator.d.ts +29 -0
  67. package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +8 -10
  68. package/src/py/dynamodb/generator.js +34 -7
  69. package/src/py/dynamodb/generator.js.map +1 -1
  70. package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +2 -1
  71. package/src/py/lambda-function/files/handler/__lambdaFunctionSnakeCase__.py.template +2 -1
  72. package/src/py/project/schema.json +3 -1
  73. package/src/py/rdb/__snapshots__/generator.spec.ts.snap +28 -12
  74. package/src/py/rdb/files/Dockerfile.create-db-user.template +7 -3
  75. package/src/py/rdb/files/Dockerfile.migration.template +7 -3
  76. package/src/py/rdb/generator.js +29 -28
  77. package/src/py/rdb/generator.js.map +1 -1
  78. package/src/smithy/react-connection/files/model/extensions.smithy.template +3 -3
  79. package/src/smithy/ts/api/generator.js +7 -2
  80. package/src/smithy/ts/api/generator.js.map +1 -1
  81. package/src/terraform/project/generator.js +34 -10
  82. package/src/terraform/project/generator.js.map +1 -1
  83. package/src/trpc/backend/generator.js +7 -1
  84. package/src/trpc/backend/generator.js.map +1 -1
  85. package/src/trpc/react/generator.js +6 -0
  86. package/src/trpc/react/generator.js.map +1 -1
  87. package/src/ts/agent/generator.js +3 -3
  88. package/src/ts/agent/generator.js.map +1 -1
  89. package/src/ts/agent/react-connection/generator.d.ts +37 -0
  90. package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +2 -0
  91. package/src/ts/dynamodb/generator.js +30 -6
  92. package/src/ts/dynamodb/generator.js.map +1 -1
  93. package/src/ts/lib/biome.d.ts +15 -1
  94. package/src/ts/lib/biome.js +79 -63
  95. package/src/ts/lib/biome.js.map +1 -1
  96. package/src/ts/lib/generator.d.ts +13 -0
  97. package/src/ts/lib/generator.js +14 -9
  98. package/src/ts/lib/generator.js.map +1 -1
  99. package/src/ts/lib/ts-project-utils.d.ts +31 -1
  100. package/src/ts/lib/ts-project-utils.js +53 -0
  101. package/src/ts/lib/ts-project-utils.js.map +1 -1
  102. package/src/ts/lib/vitest.d.ts +6 -0
  103. package/src/ts/lib/vitest.js +16 -1
  104. package/src/ts/lib/vitest.js.map +1 -1
  105. package/src/ts/mcp-server/generator.js +3 -3
  106. package/src/ts/mcp-server/generator.js.map +1 -1
  107. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +5 -0
  108. package/src/ts/rdb/files/Dockerfile.template +5 -0
  109. package/src/ts/rdb/generator.d.ts +8 -0
  110. package/src/ts/rdb/generator.js +28 -24
  111. package/src/ts/rdb/generator.js.map +1 -1
  112. package/src/ts/rdb/trpc-connection/__snapshots__/generator.spec.ts.snap +39 -0
  113. package/src/ts/rdb/trpc-connection/generator.js +13 -0
  114. package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
  115. package/src/ts/react-website/agui/files/common/src/components/__agentNameKebabCase__-chat.tsx.template +9 -0
  116. package/src/ts/react-website/agui/files/common/src/hooks/useAgui__agentNameClassName__.tsx.template +4 -1
  117. package/src/ts/react-website/agui/generator.d.ts +21 -0
  118. package/src/ts/react-website/agui/generator.js +6 -2
  119. package/src/ts/react-website/agui/generator.js.map +1 -1
  120. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +26 -22
  121. package/src/ts/react-website/app/generator.d.ts +42 -0
  122. package/src/ts/react-website/app/generator.js +4 -8
  123. package/src/ts/react-website/app/generator.js.map +1 -1
  124. package/src/utils/agent-connection/agent-connection.d.ts +2 -1
  125. package/src/utils/agent-connection/agent-connection.js +6 -1
  126. package/src/utils/agent-connection/agent-connection.js.map +1 -1
  127. package/src/utils/agent-core-constructs/files/cdk/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.ts.template +11 -7
  128. package/src/utils/agent-core-constructs/files/cdk/core/agentcore-gateway/agentcore-gateway.ts.template +14 -6
  129. package/src/utils/agent-core-packaging.js +5 -5
  130. package/src/utils/agent-core-packaging.js.map +1 -1
  131. package/src/utils/api-constructs/api-constructs.d.ts +5 -0
  132. package/src/utils/api-constructs/api-constructs.js +8 -0
  133. package/src/utils/api-constructs/api-constructs.js.map +1 -1
  134. package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +4 -2
  135. package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +4 -2
  136. package/src/utils/ast.d.ts +10 -0
  137. package/src/utils/ast.js +33 -0
  138. package/src/utils/ast.js.map +1 -1
  139. package/src/utils/dependencies.js +1 -10
  140. package/src/utils/dependencies.js.map +1 -1
  141. package/src/utils/docker.d.ts +11 -0
  142. package/src/utils/docker.js +16 -3
  143. package/src/utils/docker.js.map +1 -1
  144. package/src/utils/dynamodb-config.d.ts +48 -0
  145. package/src/utils/dynamodb-config.js +44 -0
  146. package/src/utils/dynamodb-config.js.map +1 -0
  147. package/src/utils/dynamodb-constructs/files/cdk/app/dynamodb/__nameKebabCase__.ts.template +8 -4
  148. package/src/utils/git-secrets.d.ts +28 -0
  149. package/src/utils/git-secrets.js +66 -0
  150. package/src/utils/git-secrets.js.map +1 -0
  151. package/src/utils/init.js +7 -6
  152. package/src/utils/init.js.map +1 -1
  153. package/src/utils/local-project-dependency.d.ts +28 -0
  154. package/src/utils/local-project-dependency.js +40 -0
  155. package/src/utils/local-project-dependency.js.map +1 -0
  156. package/src/utils/nx.d.ts +14 -0
  157. package/src/utils/nx.js +30 -0
  158. package/src/utils/nx.js.map +1 -1
  159. package/src/utils/rdb-constructs/files/cdk/app/dbs/__nameKebabCase__.ts.template +11 -6
  160. package/src/utils/script-project-targets.d.ts +26 -0
  161. package/src/utils/script-project-targets.js +75 -0
  162. package/src/utils/script-project-targets.js.map +1 -0
  163. package/src/utils/shared-shadcn.d.ts +13 -0
  164. package/src/utils/shared-shadcn.js +3 -2
  165. package/src/utils/shared-shadcn.js.map +1 -1
  166. package/src/utils/test.js +15 -0
  167. package/src/utils/test.js.map +1 -1
  168. package/src/utils/version-upgrade-migration/sync-vended-versions.js +4 -4
  169. package/src/utils/version-upgrade-migration/sync-vended-versions.js.map +1 -1
  170. package/src/utils/versions.d.ts +13 -9
  171. package/src/utils/versions.js +17 -8
  172. package/src/utils/versions.js.map +1 -1
  173. package/src/utils/website-constructs/files/cdk/app/static-websites/__websiteNameKebabCase__.ts.template +8 -4
  174. package/src/py/dynamodb/files/__name__/__init__.py.template +0 -6
  175. package/src/py/dynamodb/files/__name__/entities/__init__.py.template +0 -4
  176. package/src/py/dynamodb/files/config.json.template +0 -24
  177. package/src/ts/dynamodb/files/config.json.template +0 -24
  178. package/src/ts/dynamodb/files/src/entities/index.ts.template +0 -1
  179. package/src/ts/dynamodb/files/src/index.ts.template +0 -2
@@ -3683,6 +3683,36 @@ THE SOFTWARE.
3683
3683
 
3684
3684
  ---
3685
3685
 
3686
+ The following software may be included in this product: @clack/core (1.4.3)
3687
+ This software contains the following license and notice below:
3688
+
3689
+ MIT License
3690
+
3691
+ MIT License Copyright (c) 2025-Present [Bombshell contributors](https://bomb.sh/team)
3692
+
3693
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3694
+
3695
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
3696
+
3697
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3698
+
3699
+ ---
3700
+
3701
+ The following software may be included in this product: @clack/prompts (1.7.0)
3702
+ This software contains the following license and notice below:
3703
+
3704
+ MIT License
3705
+
3706
+ MIT License Copyright (c) 2025-Present [Bombshell contributors](https://bomb.sh/team)
3707
+
3708
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3709
+
3710
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
3711
+
3712
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
3713
+
3714
+ ---
3715
+
3686
3716
  The following software may be included in this product: @csstools/css-calc (3.2.0)
3687
3717
  This software contains the following license and notice below:
3688
3718
 
@@ -4644,7 +4674,7 @@ SOFTWARE.
4644
4674
 
4645
4675
  ---
4646
4676
 
4647
- The following software may be included in this product: @nx/devkit (23.1.2)
4677
+ The following software may be included in this product: @nx/devkit (23.2.0)
4648
4678
  This software contains the following license and notice below:
4649
4679
 
4650
4680
  MIT License
@@ -4668,7 +4698,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4668
4698
 
4669
4699
  ---
4670
4700
 
4671
- The following software may be included in this product: @nx/eslint (23.1.2)
4701
+ The following software may be included in this product: @nx/eslint (23.2.0)
4672
4702
  This software contains the following license and notice below:
4673
4703
 
4674
4704
  MIT License
@@ -4692,7 +4722,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4692
4722
 
4693
4723
  ---
4694
4724
 
4695
- The following software may be included in this product: @nx/js (23.1.2)
4725
+ The following software may be included in this product: @nx/js (23.2.0)
4696
4726
  This software contains the following license and notice below:
4697
4727
 
4698
4728
  MIT License
@@ -4716,7 +4746,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4716
4746
 
4717
4747
  ---
4718
4748
 
4719
- The following software may be included in this product: @nx/nx-linux-x64-gnu (23.1.2)
4749
+ The following software may be included in this product: @nx/nx-linux-x64-gnu (23.2.0)
4720
4750
  This software contains the following license and notice below:
4721
4751
 
4722
4752
  (The MIT License)
@@ -4744,7 +4774,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4744
4774
 
4745
4775
  ---
4746
4776
 
4747
- The following software may be included in this product: @nx/playwright (23.1.2)
4777
+ The following software may be included in this product: @nx/playwright (23.2.0)
4748
4778
  This software contains the following license and notice below:
4749
4779
 
4750
4780
  MIT License
@@ -4768,7 +4798,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4768
4798
 
4769
4799
  ---
4770
4800
 
4771
- The following software may be included in this product: @nx/react (23.1.2)
4801
+ The following software may be included in this product: @nx/react (23.2.0)
4772
4802
  This software contains the following license and notice below:
4773
4803
 
4774
4804
  MIT License
@@ -4792,7 +4822,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4792
4822
 
4793
4823
  ---
4794
4824
 
4795
- The following software may be included in this product: @nx/vite (23.1.2)
4825
+ The following software may be included in this product: @nx/vite (23.2.0)
4796
4826
  This software contains the following license and notice below:
4797
4827
 
4798
4828
  MIT License
@@ -4816,7 +4846,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4816
4846
 
4817
4847
  ---
4818
4848
 
4819
- The following software may be included in this product: @nx/vitest (23.1.2)
4849
+ The following software may be included in this product: @nx/vitest (23.2.0)
4820
4850
  This software contains the following license and notice below:
4821
4851
 
4822
4852
  MIT License
@@ -4840,7 +4870,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4840
4870
 
4841
4871
  ---
4842
4872
 
4843
- The following software may be included in this product: @nx/web (23.1.2)
4873
+ The following software may be included in this product: @nx/web (23.2.0)
4844
4874
  This software contains the following license and notice below:
4845
4875
 
4846
4876
  MIT License
@@ -4864,7 +4894,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
4864
4894
 
4865
4895
  ---
4866
4896
 
4867
- The following software may be included in this product: @nx/workspace (23.1.2)
4897
+ The following software may be included in this product: @nx/workspace (23.2.0)
4868
4898
  This software contains the following license and notice below:
4869
4899
 
4870
4900
  MIT License
@@ -7191,6 +7221,34 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
7191
7221
 
7192
7222
  ---
7193
7223
 
7224
+ The following software may be included in this product: agent-base (7.1.4)
7225
+ This software contains the following license and notice below:
7226
+
7227
+ (The MIT License)
7228
+
7229
+ Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
7230
+
7231
+ Permission is hereby granted, free of charge, to any person obtaining
7232
+ a copy of this software and associated documentation files (the
7233
+ 'Software'), to deal in the Software without restriction, including
7234
+ without limitation the rights to use, copy, modify, merge, publish,
7235
+ distribute, sublicense, and/or sell copies of the Software, and to
7236
+ permit persons to whom the Software is furnished to do so, subject to
7237
+ the following conditions:
7238
+
7239
+ The above copyright notice and this permission notice shall be
7240
+ included in all copies or substantial portions of the Software.
7241
+
7242
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
7243
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7244
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
7245
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
7246
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
7247
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
7248
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7249
+
7250
+ ---
7251
+
7194
7252
  The following software may be included in this product: ajv (6.14.0)
7195
7253
  This software contains the following license and notice below:
7196
7254
 
@@ -10611,33 +10669,6 @@ THE SOFTWARE.
10611
10669
 
10612
10670
  ---
10613
10671
 
10614
- The following software may be included in this product: enquirer (2.3.6)
10615
- This software contains the following license and notice below:
10616
-
10617
- The MIT License (MIT)
10618
-
10619
- Copyright (c) 2016-present, Jon Schlinkert.
10620
-
10621
- Permission is hereby granted, free of charge, to any person obtaining a copy
10622
- of this software and associated documentation files (the "Software"), to deal
10623
- in the Software without restriction, including without limitation the rights
10624
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10625
- copies of the Software, and to permit persons to whom the Software is
10626
- furnished to do so, subject to the following conditions:
10627
-
10628
- The above copyright notice and this permission notice shall be included in
10629
- all copies or substantial portions of the Software.
10630
-
10631
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10632
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10633
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
10634
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10635
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
10636
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
10637
- THE SOFTWARE.
10638
-
10639
- ---
10640
-
10641
10672
  The following software may be included in this product: enquirer (2.4.1)
10642
10673
  This software contains the following license and notice below:
10643
10674
 
@@ -11605,6 +11636,89 @@ OTHER DEALINGS IN THE SOFTWARE.
11605
11636
 
11606
11637
  ---
11607
11638
 
11639
+ The following software may be included in this product: fast-string-truncated-width (3.0.3)
11640
+ This software contains the following license and notice below:
11641
+
11642
+ The MIT License (MIT)
11643
+
11644
+ Copyright (c) 2024-present Fabio Spampinato
11645
+
11646
+ Permission is hereby granted, free of charge, to any person obtaining a
11647
+ copy of this software and associated documentation files (the "Software"),
11648
+ to deal in the Software without restriction, including without limitation
11649
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
11650
+ and/or sell copies of the Software, and to permit persons to whom the
11651
+ Software is furnished to do so, subject to the following conditions:
11652
+
11653
+ The above copyright notice and this permission notice shall be included in
11654
+ all copies or substantial portions of the Software.
11655
+
11656
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11657
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11658
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11659
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11660
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
11661
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
11662
+ DEALINGS IN THE SOFTWARE.
11663
+
11664
+ ---
11665
+
11666
+ The following software may be included in this product: fast-string-width (3.0.2)
11667
+ This software contains the following license and notice below:
11668
+
11669
+ The MIT License (MIT)
11670
+
11671
+ Copyright (c) 2024-present Fabio Spampinato
11672
+
11673
+ Permission is hereby granted, free of charge, to any person obtaining a
11674
+ copy of this software and associated documentation files (the "Software"),
11675
+ to deal in the Software without restriction, including without limitation
11676
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
11677
+ and/or sell copies of the Software, and to permit persons to whom the
11678
+ Software is furnished to do so, subject to the following conditions:
11679
+
11680
+ The above copyright notice and this permission notice shall be included in
11681
+ all copies or substantial portions of the Software.
11682
+
11683
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11684
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11685
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11686
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11687
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
11688
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
11689
+ DEALINGS IN THE SOFTWARE.
11690
+
11691
+ ---
11692
+
11693
+ The following software may be included in this product: fast-wrap-ansi (0.2.0)
11694
+ This software contains the following license and notice below:
11695
+
11696
+ MIT License
11697
+
11698
+ Copyright (c) 2025 James Garbutt
11699
+
11700
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
11701
+
11702
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11703
+ of this software and associated documentation files (the "Software"), to deal
11704
+ in the Software without restriction, including without limitation the rights
11705
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11706
+ copies of the Software, and to permit persons to whom the Software is
11707
+ furnished to do so, subject to the following conditions:
11708
+
11709
+ The above copyright notice and this permission notice shall be included in all
11710
+ copies or substantial portions of the Software.
11711
+
11712
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11713
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11714
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
11715
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11716
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
11717
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
11718
+ SOFTWARE.
11719
+
11720
+ ---
11721
+
11608
11722
  The following software may be included in this product: fault (2.0.1)
11609
11723
  This software contains the following license and notice below:
11610
11724
 
@@ -12912,6 +13026,34 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
12912
13026
 
12913
13027
  ---
12914
13028
 
13029
+ The following software may be included in this product: https-proxy-agent (7.0.6)
13030
+ This software contains the following license and notice below:
13031
+
13032
+ (The MIT License)
13033
+
13034
+ Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
13035
+
13036
+ Permission is hereby granted, free of charge, to any person obtaining
13037
+ a copy of this software and associated documentation files (the
13038
+ 'Software'), to deal in the Software without restriction, including
13039
+ without limitation the rights to use, copy, modify, merge, publish,
13040
+ distribute, sublicense, and/or sell copies of the Software, and to
13041
+ permit persons to whom the Software is furnished to do so, subject to
13042
+ the following conditions:
13043
+
13044
+ The above copyright notice and this permission notice shall be
13045
+ included in all copies or substantial portions of the Software.
13046
+
13047
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
13048
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
13049
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
13050
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
13051
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
13052
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
13053
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13054
+
13055
+ ---
13056
+
12915
13057
  The following software may be included in this product: iconv-lite (0.4.24)
12916
13058
  This software contains the following license and notice below:
12917
13059
 
@@ -17613,7 +17755,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
17613
17755
 
17614
17756
  ---
17615
17757
 
17616
- The following software may be included in this product: nx (23.1.2)
17758
+ The following software may be included in this product: nx (23.2.0)
17617
17759
  This software contains the following license and notice below:
17618
17760
 
17619
17761
  (The MIT License)
@@ -18570,6 +18712,33 @@ THE SOFTWARE.
18570
18712
 
18571
18713
  ---
18572
18714
 
18715
+ The following software may be included in this product: picomatch (4.0.7)
18716
+ This software contains the following license and notice below:
18717
+
18718
+ The MIT License (MIT)
18719
+
18720
+ Copyright (c) 2017-present, Jon Schlinkert.
18721
+
18722
+ Permission is hereby granted, free of charge, to any person obtaining a copy
18723
+ of this software and associated documentation files (the "Software"), to deal
18724
+ in the Software without restriction, including without limitation the rights
18725
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18726
+ copies of the Software, and to permit persons to whom the Software is
18727
+ furnished to do so, subject to the following conditions:
18728
+
18729
+ The above copyright notice and this permission notice shall be included in
18730
+ all copies or substantial portions of the Software.
18731
+
18732
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18733
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18734
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18735
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18736
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18737
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18738
+ THE SOFTWARE.
18739
+
18740
+ ---
18741
+
18573
18742
  The following software may be included in this product: pify (3.0.0)
18574
18743
  This software contains the following license and notice below:
18575
18744
 
@@ -20591,6 +20760,33 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
20591
20760
 
20592
20761
  ---
20593
20762
 
20763
+ The following software may be included in this product: sisteransi (1.0.5)
20764
+ This software contains the following license and notice below:
20765
+
20766
+ MIT License
20767
+
20768
+ Copyright (c) 2018 Terkel Gjervig Nielsen
20769
+
20770
+ Permission is hereby granted, free of charge, to any person obtaining a copy
20771
+ of this software and associated documentation files (the "Software"), to deal
20772
+ in the Software without restriction, including without limitation the rights
20773
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20774
+ copies of the Software, and to permit persons to whom the Software is
20775
+ furnished to do so, subject to the following conditions:
20776
+
20777
+ The above copyright notice and this permission notice shall be included in all
20778
+ copies or substantial portions of the Software.
20779
+
20780
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20781
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20782
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20783
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20784
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20785
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20786
+ SOFTWARE.
20787
+
20788
+ ---
20789
+
20594
20790
  The following software may be included in this product: slash (3.0.0)
20595
20791
  This software contains the following license and notice below:
20596
20792
 
package/migrations.json CHANGED
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "latest-infra-deploy-express-mode": {
56
56
  "version": "1.0.0-rc.94",
57
- "description": "Deploy using CloudFormation express mode from the deploy and deploy-sandbox targets of ts#infra projects",
57
+ "description": "Deploy using CloudFormation express mode from the deploy-sandbox target of ts#infra projects, and wait for full stabilization from deploy",
58
58
  "implementation": "./src/migrations/latest/infra-deploy-express-mode/migration"
59
59
  },
60
60
  "latest-shx-fs-commands": {
@@ -87,6 +87,36 @@
87
87
  "description": "Move the shared shadcn package from a tsconfig paths alias to package.json imports/exports, matching the shadcn CLI's own monorepo resolution",
88
88
  "implementation": "./src/migrations/latest/shadcn-package-imports-exports/migration"
89
89
  },
90
+ "latest-gateway-url-accessor": {
91
+ "version": "1.0.0-rc.97",
92
+ "description": "Expose a non-optional gatewayUrl accessor on the vended AgentCoreGateway construct",
93
+ "implementation": "./src/migrations/latest/gateway-url-accessor/migration"
94
+ },
95
+ "latest-checkov-scan-cache-inputs": {
96
+ "version": "1.0.0-rc.97",
97
+ "description": "Scope the CDK infrastructure checkov target's cache inputs so the security scan cannot serve a stale pass",
98
+ "implementation": "./src/migrations/latest/checkov-scan-cache-inputs/migration"
99
+ },
100
+ "latest-terraform-validate-without-backend": {
101
+ "version": "1.0.0-rc.97",
102
+ "description": "Run the Terraform validate target with -backend=false so it works before bootstrap",
103
+ "implementation": "./src/migrations/latest/terraform-validate-without-backend/migration"
104
+ },
105
+ "latest-py-lambda-powertools-context": {
106
+ "version": "1.0.0-rc.97",
107
+ "description": "Add powertools Lambda context injection and cold start metrics to Python Lambda handlers",
108
+ "implementation": "./src/migrations/latest/py-lambda-powertools-context/migration"
109
+ },
110
+ "latest-smithy-extension-trait-aliases": {
111
+ "version": "1.0.0-rc.97",
112
+ "description": "Alias the extensions.smithy vendor-extension traits so Smithy emits x-query / x-mutation / x-cursor",
113
+ "implementation": "./src/migrations/latest/smithy-extension-trait-aliases/migration"
114
+ },
115
+ "latest-script-project-quality-gates": {
116
+ "version": "1.0.0-rc.97",
117
+ "description": "Add build, lint, format and typecheck targets plus a tsconfig.json to AgentCore Gateway and Harness projects",
118
+ "implementation": "./src/migrations/latest/script-project-quality-gates/migration"
119
+ },
90
120
  "v1.0.0-rc.50-0001-modernize-function-props-cast": {
91
121
  "version": "1.0.0-rc.50",
92
122
  "description": "Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs",
@@ -328,7 +358,7 @@
328
358
  "implementation": "./src/migrations/v1.0.0-rc.89/0001-nx-parallel-default/migration"
329
359
  },
330
360
  "sync-vended-versions": {
331
- "version": "1.0.0-rc.95",
361
+ "version": "1.0.0-rc.97",
332
362
  "description": "Sync vended dependency versions and the tracked plugin version to those vended by this release",
333
363
  "implementation": "./src/utils/version-upgrade-migration/migration"
334
364
  }
@@ -399,6 +429,39 @@
399
429
  "alwaysAddToPackageJson": false
400
430
  }
401
431
  }
432
+ },
433
+ "nx-23.2.0-nx-packages": {
434
+ "version": "1.0.0-rc.97",
435
+ "packages": {
436
+ "nx": {
437
+ "version": "23.2.0",
438
+ "alwaysAddToPackageJson": false
439
+ },
440
+ "@nx/devkit": {
441
+ "version": "23.2.0",
442
+ "alwaysAddToPackageJson": false
443
+ },
444
+ "@nx/js": {
445
+ "version": "23.2.0",
446
+ "alwaysAddToPackageJson": false
447
+ },
448
+ "@nx/react": {
449
+ "version": "23.2.0",
450
+ "alwaysAddToPackageJson": false
451
+ },
452
+ "@nx/vite": {
453
+ "version": "23.2.0",
454
+ "alwaysAddToPackageJson": false
455
+ },
456
+ "@nx/vitest": {
457
+ "version": "23.2.0",
458
+ "alwaysAddToPackageJson": false
459
+ },
460
+ "@nx/workspace": {
461
+ "version": "23.2.0",
462
+ "alwaysAddToPackageJson": false
463
+ }
464
+ }
402
465
  }
403
466
  }
404
467
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "1.0.0-rc.95",
3
+ "version": "1.0.0-rc.97",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -36,7 +36,7 @@
36
36
  "node": ">=20.19.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "nx": "23.1.2"
39
+ "nx": "23.2.0"
40
40
  },
41
41
  "dependencies": {
42
42
  "@apidevtools/swagger-parser": "12.1.0",
@@ -46,10 +46,10 @@
46
46
  "@getgrit/gritql": "0.0.3",
47
47
  "@iarna/toml": "2.2.5",
48
48
  "@modelcontextprotocol/sdk": "1.30.0",
49
- "@nx/devkit": "23.1.2",
50
- "@nx/js": "23.1.2",
51
- "@nx/react": "23.1.2",
52
- "@nx/vite": "23.1.2",
49
+ "@nx/devkit": "23.2.0",
50
+ "@nx/js": "23.2.0",
51
+ "@nx/react": "23.2.0",
52
+ "@nx/vite": "23.2.0",
53
53
  "@nxlv/python": "23.0.0",
54
54
  "@phenomnomnominal/tsquery": "6.2.0",
55
55
  "@types/estree": "1.0.9",
@@ -336,7 +336,7 @@ export class MyGateway extends AgentCoreGateway {
336
336
  const rc = RuntimeConfig.ensure(this);
337
337
  rc.set('agentcore', 'gateways', {
338
338
  ...rc.get('agentcore').gateways,
339
- MyGateway: this.gateway.gatewayUrl,
339
+ MyGateway: this.gatewayUrl,
340
340
  });
341
341
  }
342
342
  }
@@ -14,6 +14,7 @@ import { getNpmScopePrefix } from "../utils/npm-scope.js";
14
14
  import { addGeneratorMetadata, getGeneratorInfo, projectExists, readProjectConfigurationUnqualified } from "../utils/nx.js";
15
15
  import { assignPort } from "../utils/port.js";
16
16
  import { ensureProjectPackageJson } from "../utils/project-package-json.js";
17
+ import { addScriptProjectTargets } from "../utils/script-project-targets.js";
17
18
  import { SHARED_CONSTRUCTS_DEPENDENCIES, sharedConstructsGenerator } from "../utils/shared-constructs.js";
18
19
  // The gateway's local-dev server needs these whatever the auth; only the MCP
19
20
  // SDK is protocol-specific (the http local gateway is a plain proxy).
@@ -117,6 +118,11 @@ export const agentcoreGatewayGenerator = async (tree, options)=>{
117
118
  project.targets ??= {};
118
119
  project.targets['serve'] ??= localGatewayTarget(port);
119
120
  project.targets['dev'] ??= localGatewayTarget(port);
121
+ // local-dev.ts is TypeScript the connection generators edit and the user is
122
+ // invited to tune, so it goes through the workspace's build sweep.
123
+ addScriptProjectTargets(tree, {
124
+ project
125
+ });
120
126
  updateProjectConfiguration(tree, project.name, project);
121
127
  // Scaffold the gateway project: local-dev.ts (+ Cedar policies if requested)
122
128
  generateFiles(tree, joinPathFragments(import.meta.dirname, 'files', 'project', protocol), projectRoot, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../packages/nx-plugin/src/agentcore-gateway/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n addProjectConfiguration,\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n logger,\n OverwriteStrategy,\n type ProjectConfiguration,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport { addTsDependencies } from '../utils/add-dependencies.js';\nimport {\n AGENT_CORE_CONSTRUCTS_DEPENDENCIES,\n AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES,\n addAgentCoreGatewayInfra,\n} from '../utils/agent-core-constructs/agent-core-constructs.js';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../utils/declared-dependencies.js';\nimport { formatFilesInSubtree } from '../utils/format.js';\nimport { resolveIac } from '../utils/iac.js';\nimport { installDependencies } from '../utils/install.js';\nimport { addGeneratorMetricsIfApplicable } from '../utils/metrics.js';\nimport { kebabCase, toClassName } from '../utils/names.js';\nimport { getNpmScopePrefix } from '../utils/npm-scope.js';\nimport {\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n projectExists,\n readProjectConfigurationUnqualified,\n} from '../utils/nx.js';\nimport { assignPort } from '../utils/port.js';\nimport { ensureProjectPackageJson } from '../utils/project-package-json.js';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../utils/shared-constructs.js';\nimport type { IacMetadata } from '../utils/shared-constructs-constants.js';\nimport type { AgentcoreGatewayGeneratorSchema } from './schema';\n\n// The gateway's local-dev server needs these whatever the auth; only the MCP\n// SDK is protocol-specific (the http local gateway is a plain proxy).\nexport const DEPENDENCIES = declareDependencies<AgentCoreGatewayMetadata>()({\n ts: [\n { name: '@modelcontextprotocol/sdk', when: (m) => m.protocol === 'mcp' },\n { name: 'express' },\n { name: '@types/express', dev: true },\n // local-dev.ts runs via tsx, which is shared tooling.\n { name: 'tsx', dev: true, root: true },\n ...ownedElsewhere(AGENT_CORE_CONSTRUCTS_DEPENDENCIES),\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ],\n py: ownedElsewhere(AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES),\n});\n\nexport const AGENTCORE_GATEWAY_GENERATOR_INFO: NxGeneratorInfo =\n getGeneratorInfo(import.meta.filename);\n\nexport const agentcoreGatewayGenerator = async (\n tree: Tree,\n options: AgentcoreGatewayGeneratorSchema,\n): Promise<GeneratorCallback> => {\n const name = kebabCase(options.name);\n const nameClassName = toClassName(name);\n const parentDir = options.directory ?? 'packages';\n const subDir = options.subDirectory ?? name;\n const projectRoot = joinPathFragments(parentDir, subDir);\n const fullyQualifiedName = `${getNpmScopePrefix(tree)}${name}`;\n\n // Protocol is mcp (aggregate MCP server targets into one MCP endpoint) or\n // http (proxy agent runtime targets via path-based routing). Persisted in\n // metadata so connection generators can validate it.\n const protocol = options.protocol ?? 'mcp';\n // Inbound auth is iam (default) or cognito. Persisted in metadata so\n // connection generators can validate it (agent -> gateway connections\n // require an IAM gateway).\n const auth = options.auth ?? 'iam';\n // Cedar policies authorize MCP tool actions, which an http gateway has none\n // of — its runtime targets are plain proxied endpoints — so the policy\n // engine only applies to mcp gateways. cedarPolicy defaults to true in the\n // schema, so an http gateway quietly drops it rather than requiring\n // --cedarPolicy=false.\n if (protocol === 'http' && options.cedarPolicy) {\n logger.warn(\n 'Cedar policies authorize MCP tool actions, so cedarPolicy is ignored for http-protocol gateways.',\n );\n }\n const cedarPolicy = protocol === 'mcp' && (options.cedarPolicy ?? true);\n const infra = options.infra ?? 'agentcore';\n\n // local-dev.ts is the local gateway: a continuous MCP aggregator chaining\n // onto attached MCP servers' dev targets (added by the mcp-connection\n // generator), so a single `nx dev <gateway>` boots the gateway and every\n // attached MCP server together.\n //\n // `serve` exists for parity with other generators; the deployed Gateway is\n // a managed AWS resource, so `serve`-mode agents talk to it via runtime\n // config and the local gateway sits idle.\n const localGatewayTarget = (port: number) => ({\n executor: 'nx:run-commands' as const,\n continuous: true,\n options: {\n command: 'tsx local-dev.ts',\n cwd: '{projectRoot}',\n env: { PORT: `${port}` },\n },\n dependsOn: [] as Array<string | { projects: string[]; target: string }>,\n });\n let project: ProjectConfiguration;\n if (projectExists(tree, fullyQualifiedName)) {\n project = readProjectConfigurationUnqualified(tree, fullyQualifiedName);\n } else {\n addProjectConfiguration(tree, fullyQualifiedName, {\n name: fullyQualifiedName,\n root: projectRoot,\n projectType: 'library',\n sourceRoot: projectRoot,\n tags: [],\n targets: {},\n metadata: {\n generator: AGENTCORE_GATEWAY_GENERATOR_INFO.id,\n } as any,\n });\n project = readProjectConfigurationUnqualified(tree, fullyQualifiedName);\n }\n // Ensure the project has its own package.json so its runtime dependencies\n // (added below) are declared in it rather than the workspace root.\n ensureProjectPackageJson(tree, {\n dir: projectRoot,\n fullyQualifiedName,\n });\n const port = assignPort(tree, project, 8100);\n // A gateway is its own standalone project, so it uses plain `serve` / `dev`\n // targets. Re-run: keep existing targets (their dependsOn may have been\n // populated by the mcp-connection generator), just ensure both exist.\n project.targets ??= {};\n project.targets['serve'] ??= localGatewayTarget(port);\n project.targets['dev'] ??= localGatewayTarget(port);\n updateProjectConfiguration(tree, project.name, project);\n\n // Scaffold the gateway project: local-dev.ts (+ Cedar policies if requested)\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'project', protocol),\n projectRoot,\n {\n nameClassName,\n nameKebabCase: name,\n port,\n attachedMcpServers: [],\n attachedAgents: [],\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n if (cedarPolicy) {\n // The default permit-all policy differs by auth type: AgentCore represents\n // IAM callers as `AgentCore::IamEntity` and Cognito/JWT callers as\n // `AgentCore::OAuthUser`, so the two policies match different principals.\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'cedar'),\n projectRoot,\n { nameClassName, auth },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n }\n\n // Recorded in the metadata below so the version sync can tell a CDK\n // project from a Terraform one; undefined when no infrastructure was\n // generated, in which case neither provider's packages were added.\n const iac =\n infra !== 'none' ? await resolveIac(tree, options.iac) : undefined;\n\n // Recorded below and read by the declaration's predicates, so the packages\n // added here are exactly the ones the version sync will own.\n const metadata: AgentCoreGatewayMetadata = {\n name,\n rc: nameClassName,\n protocol,\n auth,\n port,\n ...(iac ? { iac } : {}),\n };\n\n addGeneratorMetadata(\n tree,\n fullyQualifiedName,\n AGENTCORE_GATEWAY_GENERATOR_INFO,\n metadata,\n );\n\n addTsDependencies(tree, DEPENDENCIES, { metadata, projectRoot });\n\n // Wire up infra (CDK or Terraform); re-running with infra=agentcore adds\n // the infrastructure to a previously infra-less gateway.\n\n if (infra === 'agentcore') {\n await sharedConstructsGenerator(tree, { iac }, DEPENDENCIES);\n\n await addAgentCoreGatewayInfra(\n tree,\n {\n gatewayNameClassName: nameClassName,\n gatewayNameKebabCase: name,\n projectName: fullyQualifiedName,\n projectDirectory: projectRoot,\n cedarPolicy,\n auth,\n protocol,\n iac,\n },\n DEPENDENCIES,\n );\n }\n\n await addGeneratorMetricsIfApplicable(tree, [\n AGENTCORE_GATEWAY_GENERATOR_INFO,\n ]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, options.preferInstallDependencies, {\n languages: ['typescript'],\n });\n};\n\n/**\n * Gateway details stored in the gateway project's metadata.\n */\nexport interface AgentCoreGatewayMetadata extends IacMetadata {\n name: string;\n rc: string;\n protocol: string;\n auth: string;\n port: number;\n}\n\n/**\n * Read a gateway project's metadata, validating it was generated by the\n * agentcore-gateway generator.\n */\nexport const readAgentCoreGatewayMetadata = (\n project: ProjectConfiguration,\n): AgentCoreGatewayMetadata => {\n const metadata = project.metadata as any;\n if (metadata?.generator !== AGENTCORE_GATEWAY_GENERATOR_INFO.id) {\n throw new Error(\n `Project '${project.name}' was not generated by the '${AGENTCORE_GATEWAY_GENERATOR_INFO.id}' generator.`,\n );\n }\n return metadata as AgentCoreGatewayMetadata;\n};\n\nexport default agentcoreGatewayGenerator;\n"],"names":["addProjectConfiguration","generateFiles","joinPathFragments","logger","OverwriteStrategy","updateProjectConfiguration","addTsDependencies","AGENT_CORE_CONSTRUCTS_DEPENDENCIES","AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES","addAgentCoreGatewayInfra","declareDependencies","ownedElsewhere","formatFilesInSubtree","resolveIac","installDependencies","addGeneratorMetricsIfApplicable","kebabCase","toClassName","getNpmScopePrefix","addGeneratorMetadata","getGeneratorInfo","projectExists","readProjectConfigurationUnqualified","assignPort","ensureProjectPackageJson","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","DEPENDENCIES","ts","name","when","m","protocol","dev","root","py","AGENTCORE_GATEWAY_GENERATOR_INFO","filename","agentcoreGatewayGenerator","tree","options","nameClassName","parentDir","directory","subDir","subDirectory","projectRoot","fullyQualifiedName","auth","cedarPolicy","warn","infra","localGatewayTarget","port","executor","continuous","command","cwd","env","PORT","dependsOn","project","projectType","sourceRoot","tags","targets","metadata","generator","id","dir","dirname","nameKebabCase","attachedMcpServers","attachedAgents","overwriteStrategy","KeepExisting","iac","undefined","rc","gatewayNameClassName","gatewayNameKebabCase","projectName","projectDirectory","preferInstallDependencies","languages","readAgentCoreGatewayMetadata","Error"],"mappings":"AAAA;;;CAGC,GACD,SACEA,uBAAuB,EAEvBC,aAAa,EACbC,iBAAiB,EACjBC,MAAM,EACNC,iBAAiB,EAGjBC,0BAA0B,QACrB,aAAa;AACpB,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SACEC,kCAAkC,EAClCC,qCAAqC,EACrCC,wBAAw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IAEA,MAAMZ,gCAAgCwB,MAAM;QAC1CH;KACD;IAED,MAAMxB,qBAAqB2B;IAC3B,OAAO,IACLzB,oBAAoByB,MAAMC,QAAQ2C,yBAAyB,EAAE;YAC3DC,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAaF;;;CAGC,GACD,OAAO,MAAMC,+BAA+B,CAC1CxB;IAEA,MAAMK,WAAWL,QAAQK,QAAQ;IACjC,IAAIA,UAAUC,cAAc/B,iCAAiCgC,EAAE,EAAE;QAC/D,MAAM,IAAIkB,MACR,CAAC,SAAS,EAAEzB,QAAQhC,IAAI,CAAC,4BAA4B,EAAEO,iCAAiCgC,EAAE,CAAC,YAAY,CAAC;IAE5G;IACA,OAAOF;AACT,EAAE;AAEF,eAAe5B,0BAA0B"}
1
+ {"version":3,"sources":["../../../../../packages/nx-plugin/src/agentcore-gateway/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n addProjectConfiguration,\n type GeneratorCallback,\n generateFiles,\n joinPathFragments,\n logger,\n OverwriteStrategy,\n type ProjectConfiguration,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport { addTsDependencies } from '../utils/add-dependencies.js';\nimport {\n AGENT_CORE_CONSTRUCTS_DEPENDENCIES,\n AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES,\n addAgentCoreGatewayInfra,\n} from '../utils/agent-core-constructs/agent-core-constructs.js';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../utils/declared-dependencies.js';\nimport { formatFilesInSubtree } from '../utils/format.js';\nimport { resolveIac } from '../utils/iac.js';\nimport { installDependencies } from '../utils/install.js';\nimport { addGeneratorMetricsIfApplicable } from '../utils/metrics.js';\nimport { kebabCase, toClassName } from '../utils/names.js';\nimport { getNpmScopePrefix } from '../utils/npm-scope.js';\nimport {\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n projectExists,\n readProjectConfigurationUnqualified,\n} from '../utils/nx.js';\nimport { assignPort } from '../utils/port.js';\nimport { ensureProjectPackageJson } from '../utils/project-package-json.js';\nimport { addScriptProjectTargets } from '../utils/script-project-targets.js';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../utils/shared-constructs.js';\nimport type { IacMetadata } from '../utils/shared-constructs-constants.js';\nimport type { AgentcoreGatewayGeneratorSchema } from './schema';\n\n// The gateway's local-dev server needs these whatever the auth; only the MCP\n// SDK is protocol-specific (the http local gateway is a plain proxy).\nexport const DEPENDENCIES = declareDependencies<AgentCoreGatewayMetadata>()({\n ts: [\n { name: '@modelcontextprotocol/sdk', when: (m) => m.protocol === 'mcp' },\n { name: 'express' },\n { name: '@types/express', dev: true },\n // local-dev.ts runs via tsx, which is shared tooling.\n { name: 'tsx', dev: true, root: true },\n ...ownedElsewhere(AGENT_CORE_CONSTRUCTS_DEPENDENCIES),\n ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES),\n ],\n py: ownedElsewhere(AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES),\n});\n\nexport const AGENTCORE_GATEWAY_GENERATOR_INFO: NxGeneratorInfo =\n getGeneratorInfo(import.meta.filename);\n\nexport const agentcoreGatewayGenerator = async (\n tree: Tree,\n options: AgentcoreGatewayGeneratorSchema,\n): Promise<GeneratorCallback> => {\n const name = kebabCase(options.name);\n const nameClassName = toClassName(name);\n const parentDir = options.directory ?? 'packages';\n const subDir = options.subDirectory ?? name;\n const projectRoot = joinPathFragments(parentDir, subDir);\n const fullyQualifiedName = `${getNpmScopePrefix(tree)}${name}`;\n\n // Protocol is mcp (aggregate MCP server targets into one MCP endpoint) or\n // http (proxy agent runtime targets via path-based routing). Persisted in\n // metadata so connection generators can validate it.\n const protocol = options.protocol ?? 'mcp';\n // Inbound auth is iam (default) or cognito. Persisted in metadata so\n // connection generators can validate it (agent -> gateway connections\n // require an IAM gateway).\n const auth = options.auth ?? 'iam';\n // Cedar policies authorize MCP tool actions, which an http gateway has none\n // of — its runtime targets are plain proxied endpoints — so the policy\n // engine only applies to mcp gateways. cedarPolicy defaults to true in the\n // schema, so an http gateway quietly drops it rather than requiring\n // --cedarPolicy=false.\n if (protocol === 'http' && options.cedarPolicy) {\n logger.warn(\n 'Cedar policies authorize MCP tool actions, so cedarPolicy is ignored for http-protocol gateways.',\n );\n }\n const cedarPolicy = protocol === 'mcp' && (options.cedarPolicy ?? true);\n const infra = options.infra ?? 'agentcore';\n\n // local-dev.ts is the local gateway: a continuous MCP aggregator chaining\n // onto attached MCP servers' dev targets (added by the mcp-connection\n // generator), so a single `nx dev <gateway>` boots the gateway and every\n // attached MCP server together.\n //\n // `serve` exists for parity with other generators; the deployed Gateway is\n // a managed AWS resource, so `serve`-mode agents talk to it via runtime\n // config and the local gateway sits idle.\n const localGatewayTarget = (port: number) => ({\n executor: 'nx:run-commands' as const,\n continuous: true,\n options: {\n command: 'tsx local-dev.ts',\n cwd: '{projectRoot}',\n env: { PORT: `${port}` },\n },\n dependsOn: [] as Array<string | { projects: string[]; target: string }>,\n });\n let project: ProjectConfiguration;\n if (projectExists(tree, fullyQualifiedName)) {\n project = readProjectConfigurationUnqualified(tree, fullyQualifiedName);\n } else {\n addProjectConfiguration(tree, fullyQualifiedName, {\n name: fullyQualifiedName,\n root: projectRoot,\n projectType: 'library',\n sourceRoot: projectRoot,\n tags: [],\n targets: {},\n metadata: {\n generator: AGENTCORE_GATEWAY_GENERATOR_INFO.id,\n } as any,\n });\n project = readProjectConfigurationUnqualified(tree, fullyQualifiedName);\n }\n // Ensure the project has its own package.json so its runtime dependencies\n // (added below) are declared in it rather than the workspace root.\n ensureProjectPackageJson(tree, {\n dir: projectRoot,\n fullyQualifiedName,\n });\n const port = assignPort(tree, project, 8100);\n // A gateway is its own standalone project, so it uses plain `serve` / `dev`\n // targets. Re-run: keep existing targets (their dependsOn may have been\n // populated by the mcp-connection generator), just ensure both exist.\n project.targets ??= {};\n project.targets['serve'] ??= localGatewayTarget(port);\n project.targets['dev'] ??= localGatewayTarget(port);\n // local-dev.ts is TypeScript the connection generators edit and the user is\n // invited to tune, so it goes through the workspace's build sweep.\n addScriptProjectTargets(tree, { project });\n updateProjectConfiguration(tree, project.name, project);\n\n // Scaffold the gateway project: local-dev.ts (+ Cedar policies if requested)\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'project', protocol),\n projectRoot,\n {\n nameClassName,\n nameKebabCase: name,\n port,\n attachedMcpServers: [],\n attachedAgents: [],\n },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n if (cedarPolicy) {\n // The default permit-all policy differs by auth type: AgentCore represents\n // IAM callers as `AgentCore::IamEntity` and Cognito/JWT callers as\n // `AgentCore::OAuthUser`, so the two policies match different principals.\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'cedar'),\n projectRoot,\n { nameClassName, auth },\n { overwriteStrategy: OverwriteStrategy.KeepExisting },\n );\n }\n\n // Recorded in the metadata below so the version sync can tell a CDK\n // project from a Terraform one; undefined when no infrastructure was\n // generated, in which case neither provider's packages were added.\n const iac =\n infra !== 'none' ? await resolveIac(tree, options.iac) : undefined;\n\n // Recorded below and read by the declaration's predicates, so the packages\n // added here are exactly the ones the version sync will own.\n const metadata: AgentCoreGatewayMetadata = {\n name,\n rc: nameClassName,\n protocol,\n auth,\n port,\n ...(iac ? { iac } : {}),\n };\n\n addGeneratorMetadata(\n tree,\n fullyQualifiedName,\n AGENTCORE_GATEWAY_GENERATOR_INFO,\n metadata,\n );\n\n addTsDependencies(tree, DEPENDENCIES, { metadata, projectRoot });\n\n // Wire up infra (CDK or Terraform); re-running with infra=agentcore adds\n // the infrastructure to a previously infra-less gateway.\n\n if (infra === 'agentcore') {\n await sharedConstructsGenerator(tree, { iac }, DEPENDENCIES);\n\n await addAgentCoreGatewayInfra(\n tree,\n {\n gatewayNameClassName: nameClassName,\n gatewayNameKebabCase: name,\n projectName: fullyQualifiedName,\n projectDirectory: projectRoot,\n cedarPolicy,\n auth,\n protocol,\n iac,\n },\n DEPENDENCIES,\n );\n }\n\n await addGeneratorMetricsIfApplicable(tree, [\n AGENTCORE_GATEWAY_GENERATOR_INFO,\n ]);\n\n await formatFilesInSubtree(tree);\n return () =>\n installDependencies(tree, options.preferInstallDependencies, {\n languages: ['typescript'],\n });\n};\n\n/**\n * Gateway details stored in the gateway project's metadata.\n */\nexport interface AgentCoreGatewayMetadata extends IacMetadata {\n name: string;\n rc: string;\n protocol: string;\n auth: string;\n port: number;\n}\n\n/**\n * Read a gateway project's metadata, validating it was generated by the\n * agentcore-gateway generator.\n */\nexport const readAgentCoreGatewayMetadata = (\n project: ProjectConfiguration,\n): AgentCoreGatewayMetadata => {\n const metadata = project.metadata as any;\n if (metadata?.generator !== AGENTCORE_GATEWAY_GENERATOR_INFO.id) {\n throw new Error(\n `Project '${project.name}' was not generated by the '${AGENTCORE_GATEWAY_GENERATOR_INFO.id}' generator.`,\n );\n }\n return metadata as AgentCoreGatewayMetadata;\n};\n\nexport default agentcoreGatewayGenerator;\n"],"names":["addProjectConfiguration","generateFiles","joinPathFragments","logger","OverwriteStrategy","updateProjectConfiguration","addTsDependencies","AGENT_CORE_CONSTRUCTS_DEPENDENCIES","AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES","addAgentCoreGatewayInfra","declareDependencies","ownedElsewhere","formatFilesInSubtree","resolveIac","installDependencies","addGeneratorMetricsIfApplicable","kebabCase","toClassName","getNpmScopePrefix","addGeneratorMetadata","getGeneratorInfo","projectExists","readProjectConfigurationUnqualified","assignPort","ensureProjectPackageJson","addScriptProjectTargets","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","DEPENDENCIES","ts","name","when","m","protocol","dev","root","py","AGENTCORE_GATEWAY_GENERATOR_INFO","filename","agentcoreGatewayGenerator","tree","options","nameClassName","parentDir","directory","subDir","subDirectory","projectRoot","fullyQualifiedName","auth","cedarPolicy","warn","infra","localGatewayTarget","port","executor","continuous","command","cwd","env","PORT","dependsOn","project","projectType","sourceRoot","tags","targets","metadata","generator","id","dir","dirname","nameKebabCase","attachedMcpServers","attachedAgents","overwriteStrategy","KeepExisting","iac","undefined","rc","gatewayNameClassName","gatewayNameKebabCase","projectName","projectDirectory","preferInstallDependencies","languages","readAgentCoreGatewayMetadata","Error"],"mappings":"AAAA;;;CAGC,GACD,SACEA,uBAAuB,EAEvBC,aAAa,EACbC,iBAAiB,EACjBC,MAAM,EACNC,iBAAiB,EAGjBC,0BAA0B,QACrB,aAAa;AACpB,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SACEC,kCAAkC,EAClCC,qCAAqC,EACrCC,wBAAwB,QACnB,0DAA0D;AACjE,SACEC,mBAAmB,EACnBC,cAAc,QACT,oCAAoC;AAC3C,SAASC,oBAAoB,QAAQ,qBAAqB;AAC1D,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,mBAAmB,QAAQ,sBAAsB;AAC1D,SAASC,+BAA+B,QAAQ,sBAAsB;AACtE,SAASC,SAAS,EAAEC,WAAW,QAAQ,oBAAoB;AAC3D,SAASC,iBAAiB,QAAQ,wBAAwB;AAC1D,SACEC,oBAAoB,EACpBC,gBAAgB,EAEhBC,aAAa,EACbC,mCAAmC,QAC9B,iBAAiB;AACxB,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,wBAAwB,QAAQ,mCAAmC;AAC5E,SAASC,uBAAuB,QAAQ,qCAAqC;AAC7E,SACEC,8BAA8B,EAC9BC,yBAAyB,QACpB,gCAAgC;AAIvC,6EAA6E;AAC7E,sEAAsE;AACtE,OAAO,MAAMC,eAAelB,sBAAgD;IAC1EmB,IAAI;QACF;YAAEC,MAAM;YAA6BC,MAAM,CAACC,IAAMA,EAAEC,QAAQ,KAAK;QAAM;QACvE;YAAEH,MAAM;QAAU;QAClB;YAAEA,MAAM;YAAkBI,KAAK;QAAK;QACpC,sDAAsD;QACtD;YAAEJ,MAAM;YA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C,WAAW2B,MAAMC,QAAQoC,GAAG,IAAIC;IAE3D,2EAA2E;IAC3E,6DAA6D;IAC7D,MAAMX,WAAqC;QACzCrC;QACAiD,IAAIrC;QACJT;QACAgB;QACAK;QACA,GAAIuB,MAAM;YAAEA;QAAI,IAAI,CAAC,CAAC;IACxB;IAEA1D,qBACEqB,MACAQ,oBACAX,kCACA8B;IAGF7D,kBAAkBkC,MAAMZ,cAAc;QAAEuC;QAAUpB;IAAY;IAE9D,yEAAyE;IACzE,yDAAyD;IAEzD,IAAIK,UAAU,aAAa;QACzB,MAAMzB,0BAA0Ba,MAAM;YAAEqC;QAAI,GAAGjD;QAE/C,MAAMnB,yBACJ+B,MACA;YACEwC,sBAAsBtC;YACtBuC,sBAAsBnD;YACtBoD,aAAalC;YACbmC,kBAAkBpC;YAClBG;YACAD;YACAhB;YACA4C;QACF,GACAjD;IAEJ;IAEA,MAAMb,gCAAgCyB,MAAM;QAC1CH;KACD;IAED,MAAMzB,qBAAqB4B;IAC3B,OAAO,IACL1B,oBAAoB0B,MAAMC,QAAQ2C,yBAAyB,EAAE;YAC3DC,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAaF;;;CAGC,GACD,OAAO,MAAMC,+BAA+B,CAC1CxB;IAEA,MAAMK,WAAWL,QAAQK,QAAQ;IACjC,IAAIA,UAAUC,cAAc/B,iCAAiCgC,EAAE,EAAE;QAC/D,MAAM,IAAIkB,MACR,CAAC,SAAS,EAAEzB,QAAQhC,IAAI,CAAC,4BAA4B,EAAEO,iCAAiCgC,EAAE,CAAC,YAAY,CAAC;IAE5G;IACA,OAAOF;AACT,EAAE;AAEF,eAAe5B,0BAA0B"}
@@ -51,6 +51,9 @@ class SigV4HttpAgent extends HttpAgent {
51
51
  }
52
52
  }
53
53
 
54
+ // The id this agent is registered under, used as \`agentId\` by CopilotKit components.
55
+ export const MY_AGENT_ID = 'my-agent';
56
+
54
57
  export const useAguiMyAgent = (): Record<string, AbstractAgent> => {
55
58
  const runtimeConfig = useRuntimeConfig();
56
59
  const gatewayUrl = runtimeConfig.gateways.MyGateway;
@@ -61,7 +64,7 @@ export const useAguiMyAgent = (): Record<string, AbstractAgent> => {
61
64
  return useMemo((): Record<string, AbstractAgent> => {
62
65
  const agent = new SigV4HttpAgent({ url }, sigv4);
63
66
 
64
- return { 'my-agent': agent };
67
+ return { [MY_AGENT_ID]: agent };
65
68
  }, [url, sigv4]);
66
69
  };
67
70
  "