@aws/nx-plugin 1.0.0-rc.56 → 1.0.0-rc.58

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 +2917 -1295
  2. package/migrations.json +34 -24
  3. package/package.json +13 -13
  4. package/src/agentcore-gateway/generator.d.ts +16 -1
  5. package/src/agentcore-gateway/generator.js +3 -2
  6. package/src/agentcore-gateway/generator.js.map +1 -1
  7. package/src/agentcore-gateway/schema.json +1 -0
  8. package/src/connection/scaffold-catalog.d.ts +160 -0
  9. package/src/connection/scaffold-catalog.js +207 -0
  10. package/src/connection/scaffold-catalog.js.map +1 -0
  11. package/src/connection/schema-resolver.d.ts +5 -0
  12. package/src/connection/schema-resolver.js +27 -0
  13. package/src/connection/schema-resolver.js.map +1 -0
  14. package/src/infra/app/__snapshots__/generator.spec.ts.snap +7 -7
  15. package/src/migrations/latest/smithy-ssdk-bundle-pins/migration.js +78 -0
  16. package/src/migrations/latest/smithy-ssdk-bundle-pins/migration.js.map +1 -0
  17. package/src/migrations/v1.0.0-rc.50/modernize-function-props-cast/migration.js.map +1 -0
  18. package/src/migrations/v1.0.0-rc.50/restrict-cors-to-custom-domains/migration.js.map +1 -0
  19. package/src/migrations/v1.0.0-rc.50/terraform-bootstrap-adopt-existing-bucket/migration.d.ts +6 -0
  20. package/src/migrations/v1.0.0-rc.50/terraform-bootstrap-adopt-existing-bucket/migration.js.map +1 -0
  21. package/src/migrations/v1.0.0-rc.52/user-identity-waf-allow-localhost-callback/migration.js.map +1 -0
  22. package/src/migrations/v1.0.0-rc.54/order-access-log-delivery-after-bucket-policy/migration.js.map +1 -0
  23. package/src/migrations/v1.0.0-rc.55/backfill-generator-metadata/migration.js.map +1 -0
  24. package/src/migrations/v1.0.0-rc.56/dynamodb-local-remove-optimize-flag/migration.js.map +1 -0
  25. package/src/migrations/v1.0.0-rc.57/ts-agent-session-management-support/migration.d.ts +6 -0
  26. package/src/migrations/v1.0.0-rc.57/ts-agent-session-management-support/migration.js +449 -0
  27. package/src/migrations/v1.0.0-rc.57/ts-agent-session-management-support/migration.js.map +1 -0
  28. package/src/preset/__snapshots__/generator.spec.ts.snap +5 -5
  29. package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +11 -9
  30. package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +20 -20
  31. package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +3 -3
  32. package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +2 -1
  33. package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +2 -1
  34. package/src/py/agent/a2a-connection/files/langchain/agent-connection/app/__targetAgentSnakeCase___client_langchain.py.template +2 -1
  35. package/src/py/agent/a2a-connection/generator.d.ts +1 -1
  36. package/src/py/agent/gateway-connection/generator.d.ts +1 -1
  37. package/src/py/agent/generator.js +4 -0
  38. package/src/py/agent/generator.js.map +1 -1
  39. package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +2 -1
  40. package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client_strands.py.template +2 -1
  41. package/src/py/agent/mcp-connection/files/langchain/agent-connection/app/__mcpServerSnakeCase___client_langchain.py.template +2 -1
  42. package/src/py/agent/mcp-connection/generator.d.ts +1 -1
  43. package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +6 -0
  44. package/src/py/agent/schema.d.js.map +1 -1
  45. package/src/py/agent/schema.d.ts +3 -0
  46. package/src/py/agent/schema.json +9 -0
  47. package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
  48. package/src/py/dynamodb/schema.json +1 -0
  49. package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +12 -12
  50. package/src/py/fast-api/generator.d.ts +5 -0
  51. package/src/py/fast-api/generator.js +3 -2
  52. package/src/py/fast-api/generator.js.map +1 -1
  53. package/src/py/fast-api/schema.json +1 -0
  54. package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
  55. package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +9 -7
  56. package/src/py/mcp-server/schema.json +1 -0
  57. package/src/py/rdb/__snapshots__/generator.spec.ts.snap +2 -2
  58. package/src/py/rdb/schema.json +1 -0
  59. package/src/smithy/project/__snapshots__/generator.spec.ts.snap +4 -4
  60. package/src/smithy/project/files/service/build.Dockerfile.template +2 -2
  61. package/src/smithy/project/generator.d.ts +25 -0
  62. package/src/smithy/project/generator.js +24 -3
  63. package/src/smithy/project/generator.js.map +1 -1
  64. package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +7 -7
  65. package/src/smithy/ts/api/generator.d.ts +6 -1
  66. package/src/smithy/ts/api/generator.js +3 -2
  67. package/src/smithy/ts/api/generator.js.map +1 -1
  68. package/src/smithy/ts/api/schema.json +1 -0
  69. package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +12 -12
  70. package/src/trpc/backend/generator.d.ts +6 -1
  71. package/src/trpc/backend/generator.js +3 -2
  72. package/src/trpc/backend/generator.js.map +1 -1
  73. package/src/trpc/backend/schema.json +1 -0
  74. package/src/ts/agent/__snapshots__/generator.spec.ts.snap +668 -24
  75. package/src/ts/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +2 -1
  76. package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client-strands.ts.template +1 -1
  77. package/src/ts/agent/files/ag-ui/index.ts.template +10 -1
  78. package/src/ts/agent/files/common/agent.ts.template +11 -3
  79. package/src/ts/agent/files/common/session.ts.template +43 -0
  80. package/src/ts/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +1 -0
  81. package/src/ts/agent/generator.d.ts +36 -1
  82. package/src/ts/agent/generator.js +28 -4
  83. package/src/ts/agent/generator.js.map +1 -1
  84. package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +2 -1
  85. package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client-strands.ts.template +2 -1
  86. package/src/ts/agent/react-connection/__snapshots__/generator.spec.ts.snap +8 -4
  87. package/src/ts/agent/react-connection/files/src/components/__agentNameClassName__AgentClientProvider.tsx.template +2 -1
  88. package/src/ts/agent/schema.d.js.map +1 -1
  89. package/src/ts/agent/schema.d.ts +3 -0
  90. package/src/ts/agent/schema.json +9 -0
  91. package/src/ts/dcr-proxy/__snapshots__/generator.spec.ts.snap +1 -1
  92. package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +2 -2
  93. package/src/ts/dynamodb/schema.json +1 -0
  94. package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
  95. package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +6 -4
  96. package/src/ts/mcp-server/generator.d.ts +32 -1
  97. package/src/ts/mcp-server/generator.js +7 -4
  98. package/src/ts/mcp-server/generator.js.map +1 -1
  99. package/src/ts/mcp-server/schema.json +1 -0
  100. package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +6 -6
  101. package/src/ts/rdb/generator.d.ts +8 -0
  102. package/src/ts/rdb/generator.js +3 -2
  103. package/src/ts/rdb/generator.js.map +1 -1
  104. package/src/ts/rdb/schema.json +1 -0
  105. package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +61 -45
  106. package/src/ts/react-website/app/generator.d.ts +6 -1
  107. package/src/ts/react-website/app/generator.js +3 -2
  108. package/src/ts/react-website/app/generator.js.map +1 -1
  109. package/src/ts/react-website/app/schema.json +1 -0
  110. package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +2 -2
  111. package/src/ts/react-website/cognito-auth/generator.d.ts +6 -1
  112. package/src/ts/react-website/cognito-auth/generator.js +3 -2
  113. package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
  114. package/src/utils/agent-chat/files/common/agentcore.ts.template +2 -2
  115. package/src/utils/agent-connection/agent-connection.js +4 -0
  116. package/src/utils/agent-connection/agent-connection.js.map +1 -1
  117. package/src/utils/agent-connection/files/core-runtime-config/runtime-config.ts.template +11 -1
  118. package/src/utils/agent-connection/files/core-strands/base/model-errors-strands.ts.template +26 -15
  119. package/src/utils/agent-connection/files/core-strands/base/tool-errors-strands.ts.template +23 -16
  120. package/src/utils/agent-connection/files/py-core-runtime-config/runtime_config.py.template +4 -3
  121. package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +22 -0
  122. package/src/utils/agent-core-constructs/agent-core-constructs.js +29 -2
  123. package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
  124. package/src/utils/agent-core-constructs/files/cdk/app/agent-core/__nameKebabCase__/__nameKebabCase__.ts.template +131 -3
  125. package/src/utils/agent-core-constructs/files/terraform/app/agent-core/__nameKebabCase__/__nameKebabCase__.tf.template +180 -1
  126. package/src/utils/api-constructs/api-constructs.d.ts +9 -0
  127. package/src/utils/api-constructs/api-constructs.js +11 -1
  128. package/src/utils/api-constructs/api-constructs.js.map +1 -1
  129. package/src/utils/ast.d.ts +5 -0
  130. package/src/utils/ast.js +25 -0
  131. package/src/utils/ast.js.map +1 -1
  132. package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template +2 -0
  133. package/src/utils/docker.d.ts +27 -2
  134. package/src/utils/docker.js +31 -2
  135. package/src/utils/docker.js.map +1 -1
  136. package/src/utils/identity-constructs/identity-constructs.d.ts +10 -0
  137. package/src/utils/identity-constructs/identity-constructs.js +11 -1
  138. package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
  139. package/src/utils/shared-constructs-constants.d.ts +6 -0
  140. package/src/utils/shared-constructs-constants.js +5 -0
  141. package/src/utils/shared-constructs-constants.js.map +1 -1
  142. package/src/utils/version-upgrade-migration/owned-dependencies.d.ts +26 -0
  143. package/src/utils/version-upgrade-migration/owned-dependencies.js +52 -4
  144. package/src/utils/version-upgrade-migration/owned-dependencies.js.map +1 -1
  145. package/src/utils/version-upgrade-migration/register.d.ts +5 -1
  146. package/src/utils/version-upgrade-migration/register.js +6 -2
  147. package/src/utils/version-upgrade-migration/register.js.map +1 -1
  148. package/src/utils/version-upgrade-migration/sync-embedded-versions.d.ts +26 -0
  149. package/src/utils/version-upgrade-migration/sync-embedded-versions.js +304 -0
  150. package/src/utils/version-upgrade-migration/sync-embedded-versions.js.map +1 -0
  151. package/src/utils/version-upgrade-migration/sync-vended-versions.js +14 -0
  152. package/src/utils/version-upgrade-migration/sync-vended-versions.js.map +1 -1
  153. package/src/utils/versions.d.ts +90 -77
  154. package/src/utils/versions.js +86 -75
  155. package/src/utils/versions.js.map +1 -1
  156. package/src/utils/website-constructs/website-constructs.d.ts +11 -0
  157. package/src/utils/website-constructs/website-constructs.js +12 -1
  158. package/src/utils/website-constructs/website-constructs.js.map +1 -1
  159. package/src/migrations/latest/backfill-generator-metadata/migration.js.map +0 -1
  160. package/src/migrations/latest/dynamodb-local-remove-optimize-flag/migration.js.map +0 -1
  161. package/src/migrations/latest/modernize-function-props-cast/migration.js.map +0 -1
  162. package/src/migrations/latest/order-access-log-delivery-after-bucket-policy/migration.js.map +0 -1
  163. package/src/migrations/latest/restrict-cors-to-custom-domains/migration.js.map +0 -1
  164. package/src/migrations/latest/terraform-bootstrap-adopt-existing-bucket/migration.js.map +0 -1
  165. package/src/migrations/latest/user-identity-waf-allow-localhost-callback/migration.js.map +0 -1
  166. /package/src/migrations/latest/{modernize-function-props-cast → smithy-ssdk-bundle-pins}/migration.d.ts +0 -0
  167. /package/src/migrations/{latest/restrict-cors-to-custom-domains → v1.0.0-rc.50/modernize-function-props-cast}/migration.d.ts +0 -0
  168. /package/src/migrations/{latest → v1.0.0-rc.50}/modernize-function-props-cast/migration.js +0 -0
  169. /package/src/migrations/{latest/terraform-bootstrap-adopt-existing-bucket → v1.0.0-rc.50/restrict-cors-to-custom-domains}/migration.d.ts +0 -0
  170. /package/src/migrations/{latest → v1.0.0-rc.50}/restrict-cors-to-custom-domains/migration.js +0 -0
  171. /package/src/migrations/{latest → v1.0.0-rc.50}/terraform-bootstrap-adopt-existing-bucket/migration.js +0 -0
  172. /package/src/migrations/{latest/dynamodb-local-remove-optimize-flag → v1.0.0-rc.52/user-identity-waf-allow-localhost-callback}/migration.d.ts +0 -0
  173. /package/src/migrations/{latest → v1.0.0-rc.52}/user-identity-waf-allow-localhost-callback/migration.js +0 -0
  174. /package/src/migrations/{latest → v1.0.0-rc.54}/order-access-log-delivery-after-bucket-policy/migration.d.ts +0 -0
  175. /package/src/migrations/{latest → v1.0.0-rc.54}/order-access-log-delivery-after-bucket-policy/migration.js +0 -0
  176. /package/src/migrations/{latest → v1.0.0-rc.55}/backfill-generator-metadata/migration.d.ts +0 -0
  177. /package/src/migrations/{latest → v1.0.0-rc.55}/backfill-generator-metadata/migration.js +0 -0
  178. /package/src/migrations/{latest/user-identity-waf-allow-localhost-callback → v1.0.0-rc.56/dynamodb-local-remove-optimize-flag}/migration.d.ts +0 -0
  179. /package/src/migrations/{latest → v1.0.0-rc.56}/dynamodb-local-remove-optimize-flag/migration.js +0 -0
package/migrations.json CHANGED
@@ -2,77 +2,87 @@
2
2
  "$schema": "http://json-schema.org/schema",
3
3
  "name": "@aws/nx-plugin",
4
4
  "generators": {
5
- "latest-modernize-function-props-cast": {
5
+ "v1.0.0-rc.50-modernize-function-props-cast": {
6
6
  "version": "1.0.0-rc.50",
7
7
  "description": "Replace the legacy angle-bracket FunctionProps type assertion with the modern as syntax in generated API constructs",
8
- "implementation": "./src/migrations/latest/modernize-function-props-cast/migration"
8
+ "implementation": "./src/migrations/v1.0.0-rc.50/modernize-function-props-cast/migration"
9
9
  },
10
- "latest-restrict-cors-to-custom-domains": {
10
+ "v1.0.0-rc.50-restrict-cors-to-custom-domains": {
11
11
  "version": "1.0.0-rc.50",
12
12
  "description": "Include CloudFront custom domain aliases in restrictCorsTo and UserIdentity callback URLs",
13
- "implementation": "./src/migrations/latest/restrict-cors-to-custom-domains/migration"
13
+ "implementation": "./src/migrations/v1.0.0-rc.50/restrict-cors-to-custom-domains/migration"
14
14
  },
15
- "latest-terraform-bootstrap-adopt-existing-bucket": {
15
+ "v1.0.0-rc.50-terraform-bootstrap-adopt-existing-bucket": {
16
16
  "version": "1.0.0-rc.50",
17
17
  "description": "Adopt an existing Terraform state bucket in the vended bootstrap script when its state object is missing",
18
- "implementation": "./src/migrations/latest/terraform-bootstrap-adopt-existing-bucket/migration"
18
+ "implementation": "./src/migrations/v1.0.0-rc.50/terraform-bootstrap-adopt-existing-bucket/migration"
19
19
  },
20
- "latest-user-identity-waf-allow-localhost-callback": {
20
+ "v1.0.0-rc.52-user-identity-waf-allow-localhost-callback": {
21
21
  "version": "1.0.0-rc.52",
22
22
  "description": "Count the EC2MetaDataSSRF_QUERYARGUMENTS WAF rule on the UserIdentity Web ACL so sign-in from a local dev server is not blocked",
23
- "implementation": "./src/migrations/latest/user-identity-waf-allow-localhost-callback/migration"
23
+ "implementation": "./src/migrations/v1.0.0-rc.52/user-identity-waf-allow-localhost-callback/migration"
24
24
  },
25
- "latest-order-access-log-delivery-after-bucket-policy": {
25
+ "v1.0.0-rc.54-order-access-log-delivery-after-bucket-policy": {
26
26
  "version": "1.0.0-rc.54",
27
27
  "description": "Order the S3 server access log delivery source after the bucket policy to avoid a 409 from concurrent bucket configuration writes",
28
- "implementation": "./src/migrations/latest/order-access-log-delivery-after-bucket-policy/migration"
28
+ "implementation": "./src/migrations/v1.0.0-rc.54/order-access-log-delivery-after-bucket-policy/migration"
29
29
  },
30
- "latest-backfill-generator-metadata": {
30
+ "v1.0.0-rc.55-backfill-generator-metadata": {
31
31
  "version": "1.0.0-rc.55",
32
32
  "description": "Backfill the project metadata the version sync reads, recovered from the files the generators left behind",
33
- "implementation": "./src/migrations/latest/backfill-generator-metadata/migration"
33
+ "implementation": "./src/migrations/v1.0.0-rc.55/backfill-generator-metadata/migration"
34
34
  },
35
- "latest-dynamodb-local-remove-optimize-flag": {
35
+ "v1.0.0-rc.56-dynamodb-local-remove-optimize-flag": {
36
36
  "version": "1.0.0-rc.56",
37
37
  "description": "Drop -optimizeDbBeforeStartup from the vended DynamoDB Local container script, which can corrupt shared-local-instance.db",
38
- "implementation": "./src/migrations/latest/dynamodb-local-remove-optimize-flag/migration"
38
+ "implementation": "./src/migrations/v1.0.0-rc.56/dynamodb-local-remove-optimize-flag/migration"
39
+ },
40
+ "v1.0.0-rc.57-ts-agent-session-management-support": {
41
+ "version": "1.0.0-rc.57",
42
+ "description": "Add session management support to ts#agent",
43
+ "implementation": "./src/migrations/v1.0.0-rc.57/ts-agent-session-management-support/migration"
44
+ },
45
+ "latest-smithy-ssdk-bundle-pins": {
46
+ "version": "1.0.0-rc.58",
47
+ "description": "Bump the rolldown and dts plugin pins in the Smithy build.Dockerfile so the bundled SSDK type declaration resolves",
48
+ "implementation": "./src/migrations/latest/smithy-ssdk-bundle-pins/migration"
39
49
  },
40
50
  "sync-vended-versions": {
41
- "version": "1.0.0-rc.56",
51
+ "version": "1.0.0-rc.58",
42
52
  "description": "Sync vended dependency versions and the tracked plugin version to those vended by this release",
43
53
  "implementation": "./src/utils/version-upgrade-migration/migration"
44
54
  }
45
55
  },
46
56
  "packageJsonUpdates": {
47
- "nx-23.1.0-nx-packages": {
48
- "version": "1.0.0-rc.56",
57
+ "nx-23.1.1-nx-packages": {
58
+ "version": "1.0.0-rc.58",
49
59
  "packages": {
50
60
  "nx": {
51
- "version": "23.1.0",
61
+ "version": "23.1.1",
52
62
  "alwaysAddToPackageJson": false
53
63
  },
54
64
  "@nx/devkit": {
55
- "version": "23.1.0",
65
+ "version": "23.1.1",
56
66
  "alwaysAddToPackageJson": false
57
67
  },
58
68
  "@nx/js": {
59
- "version": "23.1.0",
69
+ "version": "23.1.1",
60
70
  "alwaysAddToPackageJson": false
61
71
  },
62
72
  "@nx/react": {
63
- "version": "23.1.0",
73
+ "version": "23.1.1",
64
74
  "alwaysAddToPackageJson": false
65
75
  },
66
76
  "@nx/vite": {
67
- "version": "23.1.0",
77
+ "version": "23.1.1",
68
78
  "alwaysAddToPackageJson": false
69
79
  },
70
80
  "@nx/vitest": {
71
- "version": "23.1.0",
81
+ "version": "23.1.1",
72
82
  "alwaysAddToPackageJson": false
73
83
  },
74
84
  "@nx/workspace": {
75
- "version": "23.1.0",
85
+ "version": "23.1.1",
76
86
  "alwaysAddToPackageJson": false
77
87
  }
78
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin",
3
- "version": "1.0.0-rc.56",
3
+ "version": "1.0.0-rc.58",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -36,20 +36,20 @@
36
36
  "node": ">=20.19.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "nx": "23.1.0"
39
+ "nx": "23.1.1"
40
40
  },
41
41
  "dependencies": {
42
42
  "@apidevtools/swagger-parser": "12.1.0",
43
- "@astral-sh/ruff-wasm-nodejs": "0.15.22",
43
+ "@astral-sh/ruff-wasm-nodejs": "0.16.1",
44
44
  "@biomejs/js-api": "6.0.0",
45
- "@biomejs/wasm-nodejs": "2.5.4",
45
+ "@biomejs/wasm-nodejs": "2.5.6",
46
46
  "@getgrit/gritql": "0.0.3",
47
47
  "@iarna/toml": "2.2.5",
48
- "@modelcontextprotocol/sdk": "1.29.0",
49
- "@nx/devkit": "23.1.0",
50
- "@nx/js": "23.1.0",
51
- "@nx/react": "23.1.0",
52
- "@nx/vite": "23.1.0",
48
+ "@modelcontextprotocol/sdk": "1.30.0",
49
+ "@nx/devkit": "23.1.1",
50
+ "@nx/js": "23.1.1",
51
+ "@nx/react": "23.1.1",
52
+ "@nx/vite": "23.1.1",
53
53
  "@nxlv/python": "22.2.2",
54
54
  "@phenomnomnominal/tsquery": "6.2.0",
55
55
  "@types/estree": "1.0.9",
@@ -58,7 +58,7 @@
58
58
  "enquirer": "2.4.1",
59
59
  "fast-glob": "3.3.3",
60
60
  "jiti": "2.7.0",
61
- "js-yaml": "4.3.0",
61
+ "js-yaml": "4.3.1",
62
62
  "license-checker-rseidelsohn": "4.4.2",
63
63
  "lodash.camelcase": "4.3.0",
64
64
  "lodash.clonedeepwith": "4.5.0",
@@ -67,7 +67,7 @@
67
67
  "lodash.trim": "4.18.0",
68
68
  "lodash.uniqby": "4.7.0",
69
69
  "mdast-util-mdx-jsx": "3.2.0",
70
- "minimatch": "10.2.5",
70
+ "minimatch": "10.2.6",
71
71
  "openapi-types": "12.1.3",
72
72
  "pip-requirements-js": "1.0.3",
73
73
  "remark-frontmatter": "5.0.0",
@@ -79,11 +79,11 @@
79
79
  "typescript": "6.0.3",
80
80
  "unified": "11.0.5",
81
81
  "unist-util-visit": "5.1.0",
82
- "vite": "8.1.5",
82
+ "vite": "8.2.0",
83
83
  "vitest": "4.1.10",
84
84
  "zod": "4.4.3"
85
85
  },
86
86
  "devDependencies": {
87
- "@types/semver": "7.7.1"
87
+ "@types/semver": "7.8.0"
88
88
  }
89
89
  }
@@ -52,7 +52,22 @@ export declare const DEPENDENCIES: import("../utils/declared-dependencies").Depe
52
52
  readonly name: "@types/node";
53
53
  } & {
54
54
  versionOnly: true;
55
- }], readonly import("../utils/declared-dependencies").DeclaredPyDependency<"a2a-sdk" | "ag-ui-langgraph" | "ag-ui-protocol" | "ag-ui-strands" | "aws-lambda-powertools" | "aws-lambda-powertools[tracer]" | "aws-lambda-powertools[parser]" | "aws-opentelemetry-distro" | "bedrock-agentcore" | "boto3" | "checkov" | "fastapi" | "fastapi[standard]" | "httpx" | "langchain" | "langchain-aws" | "langchain-mcp-adapters" | "langgraph" | "mcp" | "pip-check-updates" | "pip-licenses" | "ruff" | "strands-agents" | "strands-agents[a2a]" | "strands-agents-tools" | "ty" | "pynamodb" | "uvicorn" | "sqlmodel" | "alembic" | "aiomysql" | "asyncpg" | "greenlet", AgentCoreGatewayMetadata>[]>;
55
+ }], readonly [{
56
+ readonly name: "boto3";
57
+ readonly when: (m: IacMetadata) => boolean;
58
+ } & {
59
+ versionOnly: true;
60
+ }, {
61
+ readonly name: "httpx";
62
+ readonly when: (m: IacMetadata) => boolean;
63
+ } & {
64
+ versionOnly: true;
65
+ }, {
66
+ readonly name: "mcp";
67
+ readonly when: (m: IacMetadata) => boolean;
68
+ } & {
69
+ versionOnly: true;
70
+ }]>;
56
71
  export declare const AGENTCORE_GATEWAY_GENERATOR_INFO: NxGeneratorInfo;
57
72
  export declare const agentcoreGatewayGenerator: (tree: Tree, options: AgentcoreGatewayGeneratorSchema) => Promise<GeneratorCallback>;
58
73
  /**
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */ import { addProjectConfiguration, generateFiles, joinPathFragments, OverwriteStrategy, updateProjectConfiguration } from "@nx/devkit";
5
5
  import { addTsDependencies } from "../utils/add-dependencies.js";
6
- import { AGENT_CORE_CONSTRUCTS_DEPENDENCIES, addAgentCoreGatewayInfra } from "../utils/agent-core-constructs/agent-core-constructs.js";
6
+ import { AGENT_CORE_CONSTRUCTS_DEPENDENCIES, AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES, addAgentCoreGatewayInfra } from "../utils/agent-core-constructs/agent-core-constructs.js";
7
7
  import { declareDependencies, ownedElsewhere } from "../utils/declared-dependencies.js";
8
8
  import { formatFilesInSubtree } from "../utils/format.js";
9
9
  import { resolveIac } from "../utils/iac.js";
@@ -46,7 +46,8 @@ export const DEPENDENCIES = declareDependencies()({
46
46
  },
47
47
  ...ownedElsewhere(AGENT_CORE_CONSTRUCTS_DEPENDENCIES),
48
48
  ...ownedElsewhere(SHARED_CONSTRUCTS_DEPENDENCIES)
49
- ]
49
+ ],
50
+ py: ownedElsewhere(AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES)
50
51
  });
51
52
  export const AGENTCORE_GATEWAY_GENERATOR_INFO = getGeneratorInfo(import.meta.filename);
52
53
  export const agentcoreGatewayGenerator = async (tree, options)=>{
@@ -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 OverwriteStrategy,\n type ProjectConfiguration,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport { addTsDependencies } from '../utils/add-dependencies';\nimport {\n AGENT_CORE_CONSTRUCTS_DEPENDENCIES,\n addAgentCoreGatewayInfra,\n} from '../utils/agent-core-constructs/agent-core-constructs';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../utils/declared-dependencies';\nimport { formatFilesInSubtree } from '../utils/format';\nimport { resolveIac } from '../utils/iac';\nimport { installDependencies } from '../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../utils/metrics';\nimport { kebabCase, toClassName } from '../utils/names';\nimport { getNpmScopePrefix } from '../utils/npm-scope';\nimport {\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n projectExists,\n readProjectConfigurationUnqualified,\n} from '../utils/nx';\nimport { assignPort } from '../utils/port';\nimport { ensureProjectPackageJson } from '../utils/project-package-json';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../utils/shared-constructs';\nimport type { IacMetadata } from '../utils/shared-constructs-constants';\nimport type { AgentcoreGatewayGeneratorSchema } from './schema';\n\n// The gateway's local-dev server and Cedar policy rendering need these whatever\n// the protocol or auth, so no entry is conditional.\nexport const DEPENDENCIES = declareDependencies<AgentCoreGatewayMetadata>()({\n ts: [\n { name: '@modelcontextprotocol/sdk' },\n { name: 'express' },\n { name: '@types/express', dev: true },\n // ejs renders the Cedar policy in the shared gateway construct.\n { name: 'ejs', dev: true },\n { name: '@types/ejs', 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});\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 fixed to mcp — the enum accepts only this value, but we still\n // persist the resolved value in metadata so connection generators can read\n // it uniformly (and future additions are non-breaking).\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 const cedarPolicy = 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'),\n projectRoot,\n { nameClassName, nameKebabCase: name, port, attachedMcpServers: [] },\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 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","OverwriteStrategy","updateProjectConfiguration","addTsDependencies","AGENT_CORE_CONSTRUCTS_DEPENDENCIES","addAgentCoreGatewayInfra","declareDependencies","ownedElsewhere","formatFilesInSubtree","resolveIac","installDependencies","addGeneratorMetricsIfApplicable","kebabCase","toClassName","getNpmScopePrefix","addGeneratorMetadata","getGeneratorInfo","projectExists","readProjectConfigurationUnqualified","assignPort","ensureProjectPackageJson","SHARED_CONSTRUCTS_DEPENDENCIES","sharedConstructsGenerator","DEPENDENCIES","ts","name","dev","root","AGENTCORE_GATEWAY_GENERATOR_INFO","filename","agentcoreGatewayGenerator","tree","options","nameClassName","parentDir","directory","subDir","subDirectory","projectRoot","fullyQualifiedName","protocol","auth","cedarPolicy","infra","localGatewayTarget","port","executor","continuous","command","cwd","env","PORT","dependsOn","project","projectType","sourceRoot","tags","targets","metadata","generator","id","dir","dirname","nameKebabCase","attachedMcpServers","overwriteStrategy","KeepExisting","iac","undefined","rc","gatewayNameClassName","gatewayNameKebabCase","projectName","projectDirectory","preferInstallDependencies","languages","readAgentCoreGatewayMetadata","Error"],"mappings":"AAAA;;;CAGC,GACD,SACEA,uBAAuB,EAEvBC,aAAa,EACbC,iBAAiB,EACjBC,iBAAiB,EAGjBC,0BAA0B,QACrB,aAAa;AACpB,SAASC,iBAAiB,QAAQ,+BAA4B;AAC9D,SACEC,kCAAkC,EAClCC,wBAAwB,QACnB,0DAAuD;AAC9D,SACEC,mBAAmB,EACnBC,cAAc,QACT,oCAAiC;AACxC,SAASC,oBAAoB,QAAQ,qBAAkB;AACvD,SAASC,UAAU,QAAQ,kBAAe;AAC1C,SAASC,mBAAmB,QAAQ,sBAAmB;AACvD,SAASC,+BAA+B,QAAQ,sBAAmB;AACnE,SAASC,SAAS,EAAEC,WAAW,QAAQ,oBAAiB;AACxD,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SACEC,oBAAoB,EACpBC,gBAAgB,EAEhBC,aAAa,EACbC,mCAAmC,QAC9B,iBAAc;AACrB,SAASC,UAAU,QAAQ,mBAAgB;AAC3C,SAASC,wBAAwB,QAAQ,mCAAgC;AACzE,SACEC,8BAA8B,EAC9BC,yBAAyB,QACpB,gCAA6B;AAIpC,gFAAgF;AAChF,oDAAoD;AACpD,OAAO,MAAMC,eAAejB,sBAAgD;IAC1EkB,IAAI;QACF;YAAEC,MAAM;QAA4B;QACpC;YAAEA,MAAM;QAAU;QAClB;YAAEA,MAAM;YAAkBC,KAAK;QAAK;QACpC,gEAAgE;QAChE;YAAED,MAAM;YAAOC,KAAK;QAAK;QACzB;YAAED,MAAM;YAAcC,KAAK;QAAK;QA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AY;IAE9D,yEAAyE;IACzE,yDAAyD;IAEzD,IAAIK,UAAU,aAAa;QACzB,MAAMrB,0BAA0BS,MAAM;YAAEoC;QAAI,GAAG5C;QAE/C,MAAMlB,yBACJ0B,MACA;YACEuC,sBAAsBrC;YACtBsC,sBAAsB9C;YACtB+C,aAAajC;YACbkC,kBAAkBnC;YAClBI;YACAD;YACA0B;QACF,GACA5C;IAEJ;IAEA,MAAMZ,gCAAgCoB,MAAM;QAC1CH;KACD;IAED,MAAMpB,qBAAqBuB;IAC3B,OAAO,IACLrB,oBAAoBqB,MAAMC,QAAQ0C,yBAAyB,EAAE;YAC3DC,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAaF;;;CAGC,GACD,OAAO,MAAMC,+BAA+B,CAC1CvB;IAEA,MAAMK,WAAWL,QAAQK,QAAQ;IACjC,IAAIA,UAAUC,cAAc/B,iCAAiCgC,EAAE,EAAE;QAC/D,MAAM,IAAIiB,MACR,CAAC,SAAS,EAAExB,QAAQ5B,IAAI,CAAC,4BAA4B,EAAEG,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 OverwriteStrategy,\n type ProjectConfiguration,\n type Tree,\n updateProjectConfiguration,\n} from '@nx/devkit';\nimport { addTsDependencies } from '../utils/add-dependencies';\nimport {\n AGENT_CORE_CONSTRUCTS_DEPENDENCIES,\n AGENT_CORE_CONSTRUCTS_PY_DEPENDENCIES,\n addAgentCoreGatewayInfra,\n} from '../utils/agent-core-constructs/agent-core-constructs';\nimport {\n declareDependencies,\n ownedElsewhere,\n} from '../utils/declared-dependencies';\nimport { formatFilesInSubtree } from '../utils/format';\nimport { resolveIac } from '../utils/iac';\nimport { installDependencies } from '../utils/install';\nimport { addGeneratorMetricsIfApplicable } from '../utils/metrics';\nimport { kebabCase, toClassName } from '../utils/names';\nimport { getNpmScopePrefix } from '../utils/npm-scope';\nimport {\n addGeneratorMetadata,\n getGeneratorInfo,\n type NxGeneratorInfo,\n projectExists,\n readProjectConfigurationUnqualified,\n} from '../utils/nx';\nimport { assignPort } from '../utils/port';\nimport { ensureProjectPackageJson } from '../utils/project-package-json';\nimport {\n SHARED_CONSTRUCTS_DEPENDENCIES,\n sharedConstructsGenerator,\n} from '../utils/shared-constructs';\nimport type { IacMetadata } from '../utils/shared-constructs-constants';\nimport type { AgentcoreGatewayGeneratorSchema } from './schema';\n\n// The gateway's local-dev server and Cedar policy rendering need these whatever\n// the protocol or auth, so no entry is conditional.\nexport const DEPENDENCIES = declareDependencies<AgentCoreGatewayMetadata>()({\n ts: [\n { name: '@modelcontextprotocol/sdk' },\n { name: 'express' },\n { name: '@types/express', dev: true },\n // ejs renders the Cedar policy in the shared gateway construct.\n { name: 'ejs', dev: true },\n { name: '@types/ejs', 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 fixed to mcp — the enum accepts only this value, but we still\n // persist the resolved value in metadata so connection generators can read\n // it uniformly (and future additions are non-breaking).\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 const cedarPolicy = 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'),\n projectRoot,\n { nameClassName, nameKebabCase: name, port, attachedMcpServers: [] },\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 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","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","dev","root","py","AGENTCORE_GATEWAY_GENERATOR_INFO","filename","agentcoreGatewayGenerator","tree","options","nameClassName","parentDir","directory","subDir","subDirectory","projectRoot","fullyQualifiedName","protocol","auth","cedarPolicy","infra","localGatewayTarget","port","executor","continuous","command","cwd","env","PORT","dependsOn","project","projectType","sourceRoot","tags","targets","metadata","generator","id","dir","dirname","nameKebabCase","attachedMcpServers","overwriteStrategy","KeepExisting","iac","undefined","rc","gatewayNameClassName","gatewayNameKebabCase","projectName","projectDirectory","preferInstallDependencies","languages","read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B;QACF,GACA7C;IAEJ;IAEA,MAAMZ,gCAAgCqB,MAAM;QAC1CH;KACD;IAED,MAAMrB,qBAAqBwB;IAC3B,OAAO,IACLtB,oBAAoBsB,MAAMC,QAAQ0C,yBAAyB,EAAE;YAC3DC,WAAW;gBAAC;aAAa;QAC3B;AACJ,EAAE;AAaF;;;CAGC,GACD,OAAO,MAAMC,+BAA+B,CAC1CvB;IAEA,MAAMK,WAAWL,QAAQK,QAAQ;IACjC,IAAIA,UAAUC,cAAc/B,iCAAiCgC,EAAE,EAAE;QAC/D,MAAM,IAAIiB,MACR,CAAC,SAAS,EAAExB,QAAQ7B,IAAI,CAAC,4BAA4B,EAAEI,iCAAiCgC,EAAE,CAAC,YAAY,CAAC;IAE5G;IACA,OAAOF;AACT,EAAE;AAEF,eAAe5B,0BAA0B"}
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "agentcore-gateway",
4
4
  "title": "agentcore-gateway",
5
+ "x-label": "AgentCore Gateway",
5
6
  "description": "Generate an AgentCore Gateway project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -0,0 +1,160 @@
1
+ import { SUPPORTED_CONNECTIONS, type SUPPORTED_PROJECT_TYPES } from './supported-connections';
2
+ /**
3
+ * How to scaffold each end of a connection, derived from the plugin's own
4
+ * metadata rather than hand-listed.
5
+ *
6
+ * Every connection endpoint type is also a generator id, which is what makes the
7
+ * derivation possible:
8
+ *
9
+ * - **kind** — a generator whose schema `required`s a `project` adds a component
10
+ * to an existing project; anything else creates a project of its own.
11
+ * - **host** — a component lands in a project made by its language's base
12
+ * generator (`ts#project` / `py#project`).
13
+ * - **generator + options** — a type whose own generator is `hidden` is reached
14
+ * through the public wrapper that selects it, found by matching the wrapper's
15
+ * enum values against the type's name (`ts#trpc-api` ← `ts#api
16
+ * --framework=trpc`). A visible generator is run directly.
17
+ *
18
+ * - **label** — the generator schema's own `x-label`.
19
+ *
20
+ * The result is that adding a generator and a connection for it needs no edit
21
+ * here at all. The one thing still declared below is the option constraints,
22
+ * which live as imperative guards inside each connection generator and so cannot
23
+ * be read from metadata.
24
+ */
25
+ /**
26
+ * Every type that can sit at either end of a connection: the project-level
27
+ * types resolved by introspection, plus the component generator ids recorded in
28
+ * component metadata.
29
+ */
30
+ export type ConnectionEndpointType = (typeof SUPPORTED_PROJECT_TYPES)[number] | (typeof SUPPORTED_CONNECTIONS)[number]['source'] | (typeof SUPPORTED_CONNECTIONS)[number]['target'];
31
+ /**
32
+ * Whether scaffolding an endpoint creates a project of its own, or adds a
33
+ * component to a project that must already exist.
34
+ */
35
+ export type ScaffoldKind = 'project' | 'component';
36
+ /** How to scaffold one end of a connection from the CLI. */
37
+ export interface ScaffoldRecipe {
38
+ /** Human-readable name for this endpoint type. */
39
+ readonly label: string;
40
+ /** The generator id in `generators.json` that produces this endpoint. */
41
+ readonly generator: string;
42
+ /**
43
+ * Options that select this endpoint type from its generator, for generators
44
+ * producing more than one type (e.g. `framework`).
45
+ */
46
+ readonly options?: Readonly<Record<string, string>>;
47
+ /** Whether the generator creates a project or adds a component to one. */
48
+ readonly kind: ScaffoldKind;
49
+ /**
50
+ * The generator producing a project able to host this component, for
51
+ * `component` recipes. Components are added to an existing project, so one
52
+ * must be scaffolded first.
53
+ */
54
+ readonly host?: {
55
+ readonly generator: string;
56
+ readonly options?: Readonly<Record<string, string>>;
57
+ /**
58
+ * Whether the host project's name is referenced in snake_case. Python
59
+ * project names are snake_cased when qualified, TypeScript ones are not.
60
+ */
61
+ readonly snakeCaseName?: boolean;
62
+ };
63
+ }
64
+ /** The subset of JSON Schema the catalogue and the docs builder read. */
65
+ export type GeneratorSchema = {
66
+ /**
67
+ * Short display name for the thing this generator produces, used by the docs
68
+ * graph builder's palette. Set it on any generator that can take part in a
69
+ * connection.
70
+ */
71
+ 'x-label'?: string;
72
+ properties?: Record<string, {
73
+ type?: string;
74
+ description?: string;
75
+ enum?: string[];
76
+ default?: unknown;
77
+ 'x-priority'?: string;
78
+ }>;
79
+ required?: string[];
80
+ };
81
+ type Schema = GeneratorSchema;
82
+ /**
83
+ * Resolves a generator's JSON schema by generator id.
84
+ *
85
+ * Injected rather than fixed because the two callers load files differently: the
86
+ * plugin reads from disk (see `./schema-resolver`), while the docs site bundles
87
+ * the schemas for the browser, where `node:fs` does not exist. Keeping this
88
+ * module free of `node:fs` is what lets the browser import it at all.
89
+ */
90
+ export type SchemaResolver = (generatorId: string) => Schema;
91
+ /** The path `generators.json` records for a generator, relative to the plugin root. */
92
+ export declare const schemaPathOf: (generatorId: string) => string;
93
+ /**
94
+ * Derive the recipe for one endpoint type. Exported so a test can assert the
95
+ * derivation against every type the plugin supports.
96
+ */
97
+ export declare const deriveScaffoldRecipe: (endpointType: string, schemaOf: SchemaResolver) => ScaffoldRecipe;
98
+ /** Every endpoint type appearing at either end of a supported connection. */
99
+ export declare const CONNECTION_ENDPOINT_TYPES: readonly string[];
100
+ /**
101
+ * How to scaffold each connection endpoint type, derived from the generator
102
+ * metadata. A connection added to `SUPPORTED_CONNECTIONS` appears here with no
103
+ * edit to this file.
104
+ */
105
+ export declare const buildScaffoldRecipes: (schemaOf: SchemaResolver) => Readonly<Record<string, ScaffoldRecipe>>;
106
+ /**
107
+ * A requirement one end of a connection places on the other's options, mirroring
108
+ * the guard the corresponding connection generator enforces.
109
+ *
110
+ * Declared rather than derived: each guard is an imperative `throw` inside its
111
+ * connection generator, reachable only by running it. Recording them here lets a
112
+ * caller choosing options up front check them first, and the paired test asserts
113
+ * every entry names a real option with a value its enum allows.
114
+ */
115
+ export interface ConnectionConstraint {
116
+ /** Which end of the connection the constrained option belongs to. */
117
+ readonly side: 'source' | 'target';
118
+ /** The generator option carrying the constrained value. */
119
+ readonly option: string;
120
+ /** The only value accepted, if the option is pinned to one. */
121
+ readonly equals?: string;
122
+ /** A value rejected, for options accepting all but one. */
123
+ readonly notEquals?: string;
124
+ /** Why the constraint exists, phrased for the user choosing the option. */
125
+ readonly reason: string;
126
+ }
127
+ /**
128
+ * The option-level requirements each connection places on its endpoints.
129
+ *
130
+ * Only connections carrying a requirement appear. Keyed by `ConnectionKey`, so a
131
+ * key that no longer names a supported connection is a compile error.
132
+ */
133
+ export declare const CONNECTION_CONSTRAINTS: {
134
+ readonly 'ts#react-website -> ts#agent': readonly ConnectionConstraint[];
135
+ readonly 'ts#react-website -> py#agent': readonly ConnectionConstraint[];
136
+ readonly 'ts#agent -> ts#agent': readonly ConnectionConstraint[];
137
+ readonly 'ts#agent -> py#agent': readonly ConnectionConstraint[];
138
+ readonly 'py#agent -> ts#agent': readonly ConnectionConstraint[];
139
+ readonly 'py#agent -> py#agent': readonly ConnectionConstraint[];
140
+ readonly 'ts#agent -> ts#mcp-server': readonly ConnectionConstraint[];
141
+ readonly 'ts#agent -> py#mcp-server': readonly ConnectionConstraint[];
142
+ readonly 'py#agent -> ts#mcp-server': readonly ConnectionConstraint[];
143
+ readonly 'py#agent -> py#mcp-server': readonly ConnectionConstraint[];
144
+ readonly 'ts#agent -> agentcore-gateway': readonly ConnectionConstraint[];
145
+ readonly 'py#agent -> agentcore-gateway': readonly ConnectionConstraint[];
146
+ readonly 'agentcore-gateway -> ts#mcp-server': readonly ConnectionConstraint[];
147
+ readonly 'agentcore-gateway -> py#mcp-server': readonly ConnectionConstraint[];
148
+ readonly 'agentcore-gateway -> agentcore-gateway': readonly [{
149
+ readonly side: "target";
150
+ readonly option: "auth";
151
+ readonly equals: "iam";
152
+ readonly reason: "The source gateway signs its request with IAM, so the target gateway must accept IAM.";
153
+ }];
154
+ };
155
+ /**
156
+ * Connections whose source and target must be distinct projects, because the
157
+ * connection generator refuses to wire a project to itself.
158
+ */
159
+ export declare const SELF_CONNECTION_DISALLOWED: readonly ["agentcore-gateway -> agentcore-gateway"];
160
+ export {};