@aws/agentcore-cdk 0.1.0-alpha.5 → 0.1.0-alpha.51

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 (351) hide show
  1. package/README.md +48 -12
  2. package/dist/cdk/constants.d.ts +8 -0
  3. package/dist/cdk/constants.d.ts.map +1 -1
  4. package/dist/cdk/constants.js +27 -1
  5. package/dist/cdk/constants.js.map +1 -1
  6. package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.d.ts +21 -4
  7. package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.d.ts.map +1 -1
  8. package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.js +69 -6
  9. package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.js.map +1 -1
  10. package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.d.ts +17 -0
  11. package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.d.ts.map +1 -0
  12. package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.js +20 -0
  13. package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.js.map +1 -0
  14. package/dist/cdk/constructs/bundling/container/index.d.ts +1 -0
  15. package/dist/cdk/constructs/bundling/container/index.d.ts.map +1 -1
  16. package/dist/cdk/constructs/bundling/container/index.js +3 -1
  17. package/dist/cdk/constructs/bundling/container/index.js.map +1 -1
  18. package/dist/cdk/constructs/bundling/index.d.ts +2 -0
  19. package/dist/cdk/constructs/bundling/index.d.ts.map +1 -1
  20. package/dist/cdk/constructs/bundling/index.js +6 -2
  21. package/dist/cdk/constructs/bundling/index.js.map +1 -1
  22. package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.d.ts +7 -0
  23. package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.d.ts.map +1 -0
  24. package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.js +30 -0
  25. package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.js.map +1 -0
  26. package/dist/cdk/constructs/bundling/zip/index.d.ts +1 -0
  27. package/dist/cdk/constructs/bundling/zip/index.d.ts.map +1 -1
  28. package/dist/cdk/constructs/bundling/zip/index.js +3 -1
  29. package/dist/cdk/constructs/bundling/zip/index.js.map +1 -1
  30. package/dist/cdk/constructs/components/base-props.d.ts +2 -0
  31. package/dist/cdk/constructs/components/base-props.d.ts.map +1 -1
  32. package/dist/cdk/constructs/components/container/ContainerBuildProject.d.ts +35 -8
  33. package/dist/cdk/constructs/components/container/ContainerBuildProject.d.ts.map +1 -1
  34. package/dist/cdk/constructs/components/container/ContainerBuildProject.js +117 -13
  35. package/dist/cdk/constructs/components/container/ContainerBuildProject.js.map +1 -1
  36. package/dist/cdk/constructs/components/container/ContainerImageBuilder.d.ts +23 -5
  37. package/dist/cdk/constructs/components/container/ContainerImageBuilder.d.ts.map +1 -1
  38. package/dist/cdk/constructs/components/container/ContainerImageBuilder.js +45 -7
  39. package/dist/cdk/constructs/components/container/ContainerImageBuilder.js.map +1 -1
  40. package/dist/cdk/constructs/components/container/container-build-handler.d.ts +4 -1
  41. package/dist/cdk/constructs/components/container/container-build-handler.d.ts.map +1 -1
  42. package/dist/cdk/constructs/components/container/container-build-handler.js +16 -3
  43. package/dist/cdk/constructs/components/container/container-build-handler.js.map +1 -1
  44. package/dist/cdk/constructs/components/mcp/Gateway.d.ts +71 -0
  45. package/dist/cdk/constructs/components/mcp/Gateway.d.ts.map +1 -0
  46. package/dist/cdk/constructs/components/mcp/Gateway.js +976 -0
  47. package/dist/cdk/constructs/components/mcp/Gateway.js.map +1 -0
  48. package/dist/cdk/constructs/components/mcp/McpLambdaCompute.js +2 -2
  49. package/dist/cdk/constructs/components/mcp/McpLambdaCompute.js.map +1 -1
  50. package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.js +1 -1
  51. package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.js.map +1 -1
  52. package/dist/cdk/constructs/components/mcp/connector-defaults.d.ts +20 -0
  53. package/dist/cdk/constructs/components/mcp/connector-defaults.d.ts.map +1 -0
  54. package/dist/cdk/constructs/components/mcp/connector-defaults.js +16 -0
  55. package/dist/cdk/constructs/components/mcp/connector-defaults.js.map +1 -0
  56. package/dist/cdk/constructs/components/mcp/index.d.ts +1 -1
  57. package/dist/cdk/constructs/components/mcp/index.d.ts.map +1 -1
  58. package/dist/cdk/constructs/components/mcp/index.js +3 -3
  59. package/dist/cdk/constructs/components/mcp/index.js.map +1 -1
  60. package/dist/cdk/constructs/components/mcp/mcp-utils.d.ts +1 -1
  61. package/dist/cdk/constructs/components/mcp/mcp-utils.d.ts.map +1 -1
  62. package/dist/cdk/constructs/components/mcp/mcp-utils.js +2 -2
  63. package/dist/cdk/constructs/components/mcp/mcp-utils.js.map +1 -1
  64. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.d.ts +51 -0
  65. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.d.ts.map +1 -0
  66. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.js +54 -0
  67. package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.js.map +1 -0
  68. package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.d.ts +45 -0
  69. package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.d.ts.map +1 -0
  70. package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.js +179 -0
  71. package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.js.map +1 -0
  72. package/dist/cdk/constructs/components/primitives/capacity-provider/index.d.ts +2 -0
  73. package/dist/cdk/constructs/components/primitives/capacity-provider/index.d.ts.map +1 -0
  74. package/dist/cdk/constructs/components/primitives/capacity-provider/index.js +6 -0
  75. package/dist/cdk/constructs/components/primitives/capacity-provider/index.js.map +1 -0
  76. package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.d.ts +36 -0
  77. package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.d.ts.map +1 -0
  78. package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.js +66 -0
  79. package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.js.map +1 -0
  80. package/dist/cdk/constructs/components/primitives/config-bundle/index.d.ts +3 -0
  81. package/dist/cdk/constructs/components/primitives/config-bundle/index.d.ts.map +1 -0
  82. package/dist/cdk/constructs/components/primitives/config-bundle/index.js +6 -0
  83. package/dist/cdk/constructs/components/primitives/config-bundle/index.js.map +1 -0
  84. package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.d.ts +36 -0
  85. package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.d.ts.map +1 -0
  86. package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.js +91 -0
  87. package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.js.map +1 -0
  88. package/dist/cdk/constructs/components/primitives/dataset/index.d.ts +2 -0
  89. package/dist/cdk/constructs/components/primitives/dataset/index.d.ts.map +1 -0
  90. package/dist/cdk/constructs/components/primitives/dataset/index.js +6 -0
  91. package/dist/cdk/constructs/components/primitives/dataset/index.js.map +1 -0
  92. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.d.ts +50 -0
  93. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.d.ts.map +1 -0
  94. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.js +213 -0
  95. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.js.map +1 -0
  96. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.d.ts +28 -0
  97. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.d.ts.map +1 -0
  98. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js +238 -0
  99. package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js.map +1 -0
  100. package/dist/cdk/constructs/components/primitives/evaluator/index.d.ts +3 -0
  101. package/dist/cdk/constructs/components/primitives/evaluator/index.d.ts.map +1 -0
  102. package/dist/cdk/constructs/components/primitives/evaluator/index.js +8 -0
  103. package/dist/cdk/constructs/components/primitives/evaluator/index.js.map +1 -0
  104. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.d.ts +58 -0
  105. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.d.ts.map +1 -0
  106. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.js +79 -0
  107. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.js.map +1 -0
  108. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.d.ts +65 -0
  109. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.d.ts.map +1 -0
  110. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.js +435 -0
  111. package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.js.map +1 -0
  112. package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.d.ts +2 -0
  113. package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.d.ts.map +1 -0
  114. package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.js +182 -0
  115. package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.js.map +1 -0
  116. package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.d.ts +47 -0
  117. package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.d.ts.map +1 -0
  118. package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.js +391 -0
  119. package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.js.map +1 -0
  120. package/dist/cdk/constructs/components/primitives/harness/index.d.ts +3 -0
  121. package/dist/cdk/constructs/components/primitives/harness/index.d.ts.map +1 -0
  122. package/dist/cdk/constructs/components/primitives/harness/index.js +8 -0
  123. package/dist/cdk/constructs/components/primitives/harness/index.js.map +1 -0
  124. package/dist/cdk/constructs/components/primitives/index.d.ts +10 -0
  125. package/dist/cdk/constructs/components/primitives/index.d.ts.map +1 -1
  126. package/dist/cdk/constructs/components/primitives/index.js +23 -1
  127. package/dist/cdk/constructs/components/primitives/index.js.map +1 -1
  128. package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.d.ts +69 -0
  129. package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.d.ts.map +1 -0
  130. package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.js +292 -0
  131. package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.js.map +1 -0
  132. package/dist/cdk/constructs/components/primitives/knowledge-base/index.d.ts +2 -0
  133. package/dist/cdk/constructs/components/primitives/knowledge-base/index.d.ts.map +1 -0
  134. package/dist/cdk/constructs/components/primitives/knowledge-base/index.js +6 -0
  135. package/dist/cdk/constructs/components/primitives/knowledge-base/index.js.map +1 -0
  136. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts +15 -4
  137. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts.map +1 -1
  138. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js +96 -63
  139. package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js.map +1 -1
  140. package/dist/cdk/constructs/components/primitives/memory/__tests__/AgentCoreMemory.test.d.ts +2 -0
  141. package/dist/cdk/constructs/components/primitives/memory/__tests__/AgentCoreMemory.test.d.ts.map +1 -0
  142. package/dist/cdk/constructs/components/primitives/memory/__tests__/AgentCoreMemory.test.js +146 -0
  143. package/dist/cdk/constructs/components/primitives/memory/__tests__/AgentCoreMemory.test.js.map +1 -0
  144. package/dist/cdk/constructs/components/primitives/memory/memory-actions.d.ts +15 -0
  145. package/dist/cdk/constructs/components/primitives/memory/memory-actions.d.ts.map +1 -0
  146. package/dist/cdk/constructs/components/primitives/memory/memory-actions.js +32 -0
  147. package/dist/cdk/constructs/components/primitives/memory/memory-actions.js.map +1 -0
  148. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.d.ts +41 -0
  149. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.d.ts.map +1 -0
  150. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.js +64 -0
  151. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.js.map +1 -0
  152. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.d.ts +38 -0
  153. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.d.ts.map +1 -0
  154. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.js +111 -0
  155. package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.js.map +1 -0
  156. package/dist/cdk/constructs/components/primitives/payment/index.d.ts +3 -0
  157. package/dist/cdk/constructs/components/primitives/payment/index.d.ts.map +1 -0
  158. package/dist/cdk/constructs/components/primitives/payment/index.js +8 -0
  159. package/dist/cdk/constructs/components/primitives/payment/index.js.map +1 -0
  160. package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.d.ts +28 -0
  161. package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.d.ts.map +1 -0
  162. package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js +75 -0
  163. package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js.map +1 -0
  164. package/dist/cdk/constructs/components/primitives/policy/index.d.ts +2 -0
  165. package/dist/cdk/constructs/components/primitives/policy/index.d.ts.map +1 -0
  166. package/dist/cdk/constructs/components/primitives/policy/index.js +6 -0
  167. package/dist/cdk/constructs/components/primitives/policy/index.js.map +1 -0
  168. package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts +43 -2
  169. package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts.map +1 -1
  170. package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js +337 -80
  171. package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js.map +1 -1
  172. package/dist/cdk/constructs/components/primitives/runtime/__tests__/AgentCoreRuntime.test.d.ts +2 -0
  173. package/dist/cdk/constructs/components/primitives/runtime/__tests__/AgentCoreRuntime.test.d.ts.map +1 -0
  174. package/dist/cdk/constructs/components/primitives/runtime/__tests__/AgentCoreRuntime.test.js +113 -0
  175. package/dist/cdk/constructs/components/primitives/runtime/__tests__/AgentCoreRuntime.test.js.map +1 -0
  176. package/dist/cdk/constructs/components/shared/__tests__/build-authorizer-config.test.d.ts +2 -0
  177. package/dist/cdk/constructs/components/shared/__tests__/build-authorizer-config.test.d.ts.map +1 -0
  178. package/dist/cdk/constructs/components/shared/__tests__/build-authorizer-config.test.js +99 -0
  179. package/dist/cdk/constructs/components/shared/__tests__/build-authorizer-config.test.js.map +1 -0
  180. package/dist/cdk/constructs/components/shared/build-authorizer-config.d.ts +28 -0
  181. package/dist/cdk/constructs/components/shared/build-authorizer-config.d.ts.map +1 -0
  182. package/dist/cdk/constructs/components/shared/build-authorizer-config.js +39 -0
  183. package/dist/cdk/constructs/components/shared/build-authorizer-config.js.map +1 -0
  184. package/dist/cdk/constructs/components/shared/load-additional-policies.d.ts +18 -0
  185. package/dist/cdk/constructs/components/shared/load-additional-policies.d.ts.map +1 -0
  186. package/dist/cdk/constructs/components/shared/load-additional-policies.js +51 -0
  187. package/dist/cdk/constructs/components/shared/load-additional-policies.js.map +1 -0
  188. package/dist/cdk/constructs/connections/wire-connections.d.ts +24 -0
  189. package/dist/cdk/constructs/connections/wire-connections.d.ts.map +1 -0
  190. package/dist/cdk/constructs/connections/wire-connections.js +218 -0
  191. package/dist/cdk/constructs/connections/wire-connections.js.map +1 -0
  192. package/dist/cdk/constructs/index.d.ts +7 -3
  193. package/dist/cdk/constructs/index.d.ts.map +1 -1
  194. package/dist/cdk/constructs/index.js +22 -1
  195. package/dist/cdk/constructs/index.js.map +1 -1
  196. package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts +149 -2
  197. package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts.map +1 -1
  198. package/dist/cdk/constructs/l3/AgentCoreApplication.js +623 -10
  199. package/dist/cdk/constructs/l3/AgentCoreApplication.js.map +1 -1
  200. package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.d.ts +38 -0
  201. package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.d.ts.map +1 -0
  202. package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.js +92 -0
  203. package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.js.map +1 -0
  204. package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts +9 -1
  205. package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts.map +1 -1
  206. package/dist/cdk/constructs/l3/AgentCoreMcp.js +95 -17
  207. package/dist/cdk/constructs/l3/AgentCoreMcp.js.map +1 -1
  208. package/dist/cdk/constructs/l3/AgentCorePayments.d.ts +21 -0
  209. package/dist/cdk/constructs/l3/AgentCorePayments.d.ts.map +1 -0
  210. package/dist/cdk/constructs/l3/AgentCorePayments.js +149 -0
  211. package/dist/cdk/constructs/l3/AgentCorePayments.js.map +1 -0
  212. package/dist/cdk/constructs/l3/AgentEnvironment.d.ts +14 -0
  213. package/dist/cdk/constructs/l3/AgentEnvironment.d.ts.map +1 -1
  214. package/dist/cdk/constructs/l3/AgentEnvironment.js +55 -4
  215. package/dist/cdk/constructs/l3/AgentEnvironment.js.map +1 -1
  216. package/dist/cdk/constructs/l3/index.d.ts +3 -1
  217. package/dist/cdk/constructs/l3/index.d.ts.map +1 -1
  218. package/dist/cdk/constructs/l3/index.js +5 -1
  219. package/dist/cdk/constructs/l3/index.js.map +1 -1
  220. package/dist/cdk/index.d.ts +1 -1
  221. package/dist/cdk/index.d.ts.map +1 -1
  222. package/dist/cdk/index.js +16 -1
  223. package/dist/cdk/index.js.map +1 -1
  224. package/dist/cdk/utils/__tests__/tags.test.d.ts +2 -0
  225. package/dist/cdk/utils/__tests__/tags.test.d.ts.map +1 -0
  226. package/dist/cdk/utils/__tests__/tags.test.js +57 -0
  227. package/dist/cdk/utils/__tests__/tags.test.js.map +1 -0
  228. package/dist/cdk/utils/tags.d.ts +11 -0
  229. package/dist/cdk/utils/tags.d.ts.map +1 -0
  230. package/dist/cdk/utils/tags.js +22 -0
  231. package/dist/cdk/utils/tags.js.map +1 -0
  232. package/dist/index.d.ts +1 -1
  233. package/dist/index.d.ts.map +1 -1
  234. package/dist/index.js +16 -1
  235. package/dist/index.js.map +1 -1
  236. package/dist/lib/constants.d.ts +1 -0
  237. package/dist/lib/constants.d.ts.map +1 -1
  238. package/dist/lib/constants.js +2 -1
  239. package/dist/lib/constants.js.map +1 -1
  240. package/dist/lib/errors/config.js +1 -1
  241. package/dist/lib/errors/config.js.map +1 -1
  242. package/dist/lib/index.d.ts +1 -1
  243. package/dist/lib/index.d.ts.map +1 -1
  244. package/dist/lib/index.js +2 -1
  245. package/dist/lib/index.js.map +1 -1
  246. package/dist/lib/packaging/helpers.d.ts +19 -0
  247. package/dist/lib/packaging/helpers.d.ts.map +1 -1
  248. package/dist/lib/packaging/helpers.js +78 -21
  249. package/dist/lib/packaging/helpers.js.map +1 -1
  250. package/dist/lib/packaging/index.d.ts +3 -7
  251. package/dist/lib/packaging/index.d.ts.map +1 -1
  252. package/dist/lib/packaging/index.js +14 -11
  253. package/dist/lib/packaging/index.js.map +1 -1
  254. package/dist/lib/packaging/node.d.ts +6 -0
  255. package/dist/lib/packaging/node.d.ts.map +1 -0
  256. package/dist/lib/packaging/node.js +106 -0
  257. package/dist/lib/packaging/node.js.map +1 -0
  258. package/dist/lib/packaging/types/packaging.d.ts +2 -0
  259. package/dist/lib/packaging/types/packaging.d.ts.map +1 -1
  260. package/dist/lib/packaging/uv.d.ts.map +1 -1
  261. package/dist/lib/packaging/uv.js +1 -1
  262. package/dist/lib/packaging/uv.js.map +1 -1
  263. package/dist/lib/schemas/io/config-io.d.ts +6 -3
  264. package/dist/lib/schemas/io/config-io.d.ts.map +1 -1
  265. package/dist/lib/schemas/io/config-io.js +19 -11
  266. package/dist/lib/schemas/io/config-io.js.map +1 -1
  267. package/dist/schema/constants.d.ts +30 -0
  268. package/dist/schema/constants.d.ts.map +1 -1
  269. package/dist/schema/constants.js +58 -4
  270. package/dist/schema/constants.js.map +1 -1
  271. package/dist/schema/schemas/agent-env.d.ts +265 -6
  272. package/dist/schema/schemas/agent-env.d.ts.map +1 -1
  273. package/dist/schema/schemas/agent-env.js +414 -17
  274. package/dist/schema/schemas/agent-env.js.map +1 -1
  275. package/dist/schema/schemas/agentcore-project.d.ts +1105 -22
  276. package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
  277. package/dist/schema/schemas/agentcore-project.js +335 -11
  278. package/dist/schema/schemas/agentcore-project.js.map +1 -1
  279. package/dist/schema/schemas/auth.d.ts +318 -0
  280. package/dist/schema/schemas/auth.d.ts.map +1 -0
  281. package/dist/schema/schemas/auth.js +238 -0
  282. package/dist/schema/schemas/auth.js.map +1 -0
  283. package/dist/schema/schemas/aws-targets.d.ts +39 -0
  284. package/dist/schema/schemas/aws-targets.d.ts.map +1 -1
  285. package/dist/schema/schemas/aws-targets.js +14 -0
  286. package/dist/schema/schemas/aws-targets.js.map +1 -1
  287. package/dist/schema/schemas/connections.d.ts +183 -0
  288. package/dist/schema/schemas/connections.d.ts.map +1 -0
  289. package/dist/schema/schemas/connections.js +176 -0
  290. package/dist/schema/schemas/connections.js.map +1 -0
  291. package/dist/schema/schemas/deployed-state.d.ts +224 -16
  292. package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
  293. package/dist/schema/schemas/deployed-state.js +52 -4
  294. package/dist/schema/schemas/deployed-state.js.map +1 -1
  295. package/dist/schema/schemas/index.d.ts +2 -0
  296. package/dist/schema/schemas/index.d.ts.map +1 -1
  297. package/dist/schema/schemas/index.js +2 -0
  298. package/dist/schema/schemas/index.js.map +1 -1
  299. package/dist/schema/schemas/mcp.d.ts +645 -32
  300. package/dist/schema/schemas/mcp.d.ts.map +1 -1
  301. package/dist/schema/schemas/mcp.js +567 -44
  302. package/dist/schema/schemas/mcp.js.map +1 -1
  303. package/dist/schema/schemas/primitives/capacity-provider.d.ts +239 -0
  304. package/dist/schema/schemas/primitives/capacity-provider.d.ts.map +1 -0
  305. package/dist/schema/schemas/primitives/capacity-provider.js +220 -0
  306. package/dist/schema/schemas/primitives/capacity-provider.js.map +1 -0
  307. package/dist/schema/schemas/primitives/config-bundle.d.ts +31 -0
  308. package/dist/schema/schemas/primitives/config-bundle.d.ts.map +1 -0
  309. package/dist/schema/schemas/primitives/config-bundle.js +41 -0
  310. package/dist/schema/schemas/primitives/config-bundle.js.map +1 -0
  311. package/dist/schema/schemas/primitives/dataset.d.ts +53 -0
  312. package/dist/schema/schemas/primitives/dataset.d.ts.map +1 -0
  313. package/dist/schema/schemas/primitives/dataset.js +65 -0
  314. package/dist/schema/schemas/primitives/dataset.js.map +1 -0
  315. package/dist/schema/schemas/primitives/evaluator.d.ts +113 -0
  316. package/dist/schema/schemas/primitives/evaluator.d.ts.map +1 -0
  317. package/dist/schema/schemas/primitives/evaluator.js +75 -0
  318. package/dist/schema/schemas/primitives/evaluator.js.map +1 -0
  319. package/dist/schema/schemas/primitives/harness.d.ts +649 -0
  320. package/dist/schema/schemas/primitives/harness.d.ts.map +1 -0
  321. package/dist/schema/schemas/primitives/harness.js +596 -0
  322. package/dist/schema/schemas/primitives/harness.js.map +1 -0
  323. package/dist/schema/schemas/primitives/index.d.ts +18 -2
  324. package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
  325. package/dist/schema/schemas/primitives/index.js +80 -1
  326. package/dist/schema/schemas/primitives/index.js.map +1 -1
  327. package/dist/schema/schemas/primitives/knowledge-base.d.ts +103 -0
  328. package/dist/schema/schemas/primitives/knowledge-base.d.ts.map +1 -0
  329. package/dist/schema/schemas/primitives/knowledge-base.js +98 -0
  330. package/dist/schema/schemas/primitives/knowledge-base.js.map +1 -0
  331. package/dist/schema/schemas/primitives/memory.d.ts +33 -2
  332. package/dist/schema/schemas/primitives/memory.d.ts.map +1 -1
  333. package/dist/schema/schemas/primitives/memory.js +33 -3
  334. package/dist/schema/schemas/primitives/memory.js.map +1 -1
  335. package/dist/schema/schemas/primitives/online-evaluation-config.d.ts +32 -0
  336. package/dist/schema/schemas/primitives/online-evaluation-config.d.ts.map +1 -0
  337. package/dist/schema/schemas/primitives/online-evaluation-config.js +66 -0
  338. package/dist/schema/schemas/primitives/online-evaluation-config.js.map +1 -0
  339. package/dist/schema/schemas/primitives/policy.d.ts +62 -0
  340. package/dist/schema/schemas/primitives/policy.d.ts.map +1 -0
  341. package/dist/schema/schemas/primitives/policy.js +64 -0
  342. package/dist/schema/schemas/primitives/policy.js.map +1 -0
  343. package/dist/schema/schemas/primitives/tags.d.ts +6 -0
  344. package/dist/schema/schemas/primitives/tags.d.ts.map +1 -0
  345. package/dist/schema/schemas/primitives/tags.js +20 -0
  346. package/dist/schema/schemas/primitives/tags.js.map +1 -0
  347. package/package.json +22 -5
  348. package/dist/cdk/constructs/components/mcp/McpGateway.d.ts +0 -49
  349. package/dist/cdk/constructs/components/mcp/McpGateway.d.ts.map +0 -1
  350. package/dist/cdk/constructs/components/mcp/McpGateway.js +0 -288
  351. package/dist/cdk/constructs/components/mcp/McpGateway.js.map +0 -1
package/README.md CHANGED
@@ -23,18 +23,16 @@ import type { AgentCoreProjectSpec } from '@aws/agentcore-cdk';
23
23
  import { Stack } from 'aws-cdk-lib';
24
24
 
25
25
  const spec: AgentCoreProjectSpec = {
26
- name: 'my-project',
26
+ name: 'myProject',
27
+ version: 1,
27
28
  agents: [
28
29
  {
29
- name: 'my-agent',
30
- targetLanguage: 'Python',
31
- sdk: 'Strands',
32
- runtime: {
33
- artifact: 'CodeZip',
34
- codeLocation: 'app/my-agent',
35
- handler: 'main.handler',
36
- pythonRuntime: 'python3.12',
37
- },
30
+ type: 'AgentCoreRuntime',
31
+ name: 'myAgent',
32
+ build: 'CodeZip',
33
+ entrypoint: 'main.py',
34
+ codeLocation: 'app/myAgent/',
35
+ runtimeVersion: 'PYTHON_3_12',
38
36
  },
39
37
  ],
40
38
  };
@@ -57,10 +55,38 @@ Main L3 construct for deploying agent environments.
57
55
 
58
56
  L3 construct for MCP gateways and tools.
59
57
 
58
+ ### AgentCorePayments
59
+
60
+ L3 construct for Payment managers and connectors. It reads `spec.payments`, resolves manual connector credentials from
61
+ the deployed `credentials` map, and wires Payment configuration and permissions into runtimes owned by a sibling
62
+ `AgentCoreApplication`.
63
+
60
64
  ### AgentEnvironment
61
65
 
62
66
  Individual agent environment construct.
63
67
 
68
+ ### Container builds in a VPC
69
+
70
+ When a Container-build agent (or harness) sets `networkMode: VPC`, the build infrastructure — the orchestrator Lambda
71
+ and the shared CodeBuild project — is placed in the same VPC as the runtime, using `networkConfig.subnets` and
72
+ `networkConfig.securityGroups`. CodeBuild additionally requires `networkConfig.vpcId` (its API cannot infer the VPC from
73
+ subnets); it is required only for Container builds in VPC mode.
74
+
75
+ All Container agents and harnesses in a single project must build in the same VPC — the CodeBuild project is shared per
76
+ stack and synthesis fails fast on a mismatch. Container builds in VPC mode allow at most 5 security groups (a CodeBuild
77
+ limit), vs 16 for the runtime.
78
+
79
+ **Network prerequisites.** Private subnets must be able to reach the services the build uses, or the build will hang
80
+ until timeout:
81
+
82
+ - The build Lambda calls CodeBuild (`StartBuild`/`BatchGetBuilds`) and must reach the CloudFormation response endpoint
83
+ (S3).
84
+ - CodeBuild must reach ECR (api + dkr), S3 (source asset), CloudWatch Logs, STS, and any registry the Dockerfile pulls
85
+ base images from.
86
+
87
+ Provide a NAT gateway or VPC endpoints for: ECR (api, dkr), S3 (gateway), CloudWatch Logs, CodeBuild, and STS — plus
88
+ egress for public base-image pulls.
89
+
64
90
  ## Standalone Usage
65
91
 
66
92
  These constructs can be used independently without the CLI:
@@ -71,8 +97,18 @@ import { AgentCoreApplication, ConfigIO } from '@aws/agentcore-cdk';
71
97
  // Option 1: Pass spec directly
72
98
  new AgentCoreApplication(this, 'App', {
73
99
  spec: {
74
- name: 'my-project',
75
- agents: [{ name: 'my-agent', targetLanguage: 'Python', ... }]
100
+ name: 'myProject',
101
+ version: 1,
102
+ agents: [
103
+ {
104
+ type: 'AgentCoreRuntime',
105
+ name: 'myAgent',
106
+ build: 'CodeZip',
107
+ entrypoint: 'main.py',
108
+ codeLocation: 'app/myAgent/',
109
+ runtimeVersion: 'PYTHON_3_12',
110
+ },
111
+ ],
76
112
  },
77
113
  });
78
114
 
@@ -1,3 +1,11 @@
1
1
  export declare const AGENTCORE_SERVICE_PRINCIPAL = "bedrock-agentcore.amazonaws.com";
2
2
  export declare const LAMBDA_SERVICE_PRINCIPAL = "lambda.amazonaws.com";
3
+ export declare const BUILTIN_EVALUATOR_PREFIX = "Builtin.";
4
+ /**
5
+ * Memory data-plane actions a harness execution role needs to read/write its memory at runtime.
6
+ * Shared by every harness memory grant so the modes that have a memory (managed, existing by-name,
7
+ * existing by-ARN) stay in lockstep — NOT control-plane (no CreateMemory/etc.): the memory resource
8
+ * is provisioned by the CFN resource handler under its own role.
9
+ */
10
+ export declare const HARNESS_MEMORY_DATA_PLANE_ACTIONS: readonly ["bedrock-agentcore:ListMemoryRecords", "bedrock-agentcore:RetrieveMemoryRecords", "bedrock-agentcore:GetEvent", "bedrock-agentcore:GetMemory", "bedrock-agentcore:GetMemoryRecord", "bedrock-agentcore:ListActors", "bedrock-agentcore:ListEvents", "bedrock-agentcore:ListSessions", "bedrock-agentcore:CreateEvent", "bedrock-agentcore:DeleteEvent", "bedrock-agentcore:DeleteMemoryRecord"];
3
11
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/cdk/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,oCAAoC,CAAC;AAC7E,eAAO,MAAM,wBAAwB,yBAAyB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/cdk/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,oCAAoC,CAAC;AAC7E,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAM/D,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAMnD;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,2YAYpC,CAAC"}
@@ -3,7 +3,33 @@
3
3
  // Service Principals
4
4
  // ============================================================================
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LAMBDA_SERVICE_PRINCIPAL = exports.AGENTCORE_SERVICE_PRINCIPAL = void 0;
6
+ exports.HARNESS_MEMORY_DATA_PLANE_ACTIONS = exports.BUILTIN_EVALUATOR_PREFIX = exports.LAMBDA_SERVICE_PRINCIPAL = exports.AGENTCORE_SERVICE_PRINCIPAL = void 0;
7
7
  exports.AGENTCORE_SERVICE_PRINCIPAL = 'bedrock-agentcore.amazonaws.com';
8
8
  exports.LAMBDA_SERVICE_PRINCIPAL = 'lambda.amazonaws.com';
9
+ // ============================================================================
10
+ // Evaluator Constants
11
+ // ============================================================================
12
+ exports.BUILTIN_EVALUATOR_PREFIX = 'Builtin.';
13
+ // ============================================================================
14
+ // Memory Constants
15
+ // ============================================================================
16
+ /**
17
+ * Memory data-plane actions a harness execution role needs to read/write its memory at runtime.
18
+ * Shared by every harness memory grant so the modes that have a memory (managed, existing by-name,
19
+ * existing by-ARN) stay in lockstep — NOT control-plane (no CreateMemory/etc.): the memory resource
20
+ * is provisioned by the CFN resource handler under its own role.
21
+ */
22
+ exports.HARNESS_MEMORY_DATA_PLANE_ACTIONS = [
23
+ 'bedrock-agentcore:ListMemoryRecords',
24
+ 'bedrock-agentcore:RetrieveMemoryRecords',
25
+ 'bedrock-agentcore:GetEvent',
26
+ 'bedrock-agentcore:GetMemory',
27
+ 'bedrock-agentcore:GetMemoryRecord',
28
+ 'bedrock-agentcore:ListActors',
29
+ 'bedrock-agentcore:ListEvents',
30
+ 'bedrock-agentcore:ListSessions',
31
+ 'bedrock-agentcore:CreateEvent',
32
+ 'bedrock-agentcore:DeleteEvent',
33
+ 'bedrock-agentcore:DeleteMemoryRecord',
34
+ ];
9
35
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/cdk/constants.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;;;AAElE,QAAA,2BAA2B,GAAG,iCAAiC,CAAC;AAChE,QAAA,wBAAwB,GAAG,sBAAsB,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/cdk/constants.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;;;AAElE,QAAA,2BAA2B,GAAG,iCAAiC,CAAC;AAChE,QAAA,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAElE,QAAA,wBAAwB,GAAG,UAAU,CAAC;AAEnD,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;;;GAKG;AACU,QAAA,iCAAiC,GAAG;IAC/C,qCAAqC;IACrC,yCAAyC;IACzC,4BAA4B;IAC5B,6BAA6B;IAC7B,mCAAmC;IACnC,8BAA8B;IAC9B,8BAA8B;IAC9B,gCAAgC;IAChC,+BAA+B;IAC/B,+BAA+B;IAC/B,sCAAsC;CAC9B,CAAC"}
@@ -8,11 +8,28 @@ export interface ContainerSourceAssetProps {
8
8
  readonly config: AgentEnvSpec;
9
9
  }
10
10
  /**
11
- * Packages the agent source directory (including Dockerfile) as an S3 asset for CodeBuild.
11
+ * Packages the Docker build context (including the Dockerfile) as an S3 asset for CodeBuild.
12
12
  *
13
- * Unlike BundledCodeZipAsset which packages code into a zip with dependencies,
14
- * this simply uploads the source directory as-is. CodeBuild will use the Dockerfile
15
- * within the source to build the container image.
13
+ * The uploaded directory is `buildContextPath` when set, otherwise `codeLocation`. It becomes both
14
+ * the `docker build` context (the `.` in the buildspec) and the root the Dockerfile path is resolved
15
+ * against, so a shared Dockerfile in a monorepo can COPY files that live outside the agent's own
16
+ * `codeLocation`.
17
+ *
18
+ * The uploaded context's `exclude` list (evaluated with `IgnoreMode.DOCKER`, last match wins) layers:
19
+ * 1. {@link CONTAINER_CONTEXT_SECRET_EXCLUDES} — an unconditional secret/junk baseline applied to
20
+ * BOTH `codeLocation` and `buildContextPath` builds, so a stray `.env` / `.git` / `node_modules`
21
+ * is never persisted to the assets bucket or baked into the image (mirrors the CodeZip guard);
22
+ * 2. the user's own build-context-root `.dockerignore`, so they can exclude more or re-include a
23
+ * baseline path with a `!pattern` line;
24
+ * 3. {@link forceKeepDockerfilePatterns} — a force-keep of the Dockerfile (+ ancestor dirs) so an
25
+ * allowlist-style `.dockerignore` can't drop the file CodeBuild builds with.
26
+ *
27
+ * NOTE: applying the baseline unconditionally changes the asset hash for pre-existing container stacks
28
+ * (which previously uploaded the raw directory), so the first deploy after upgrade re-uploads the
29
+ * context and rebuilds the image once. This is intentional — it is what closes the secret-leak.
30
+ *
31
+ * Unlike BundledCodeZipAsset which packages code into a zip with dependencies, this uploads the
32
+ * directory as-is; CodeBuild uses the Dockerfile within it to build the container image.
16
33
  */
17
34
  export declare class ContainerSourceAsset extends Construct {
18
35
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ContainerSourceAsset.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/ContainerSourceAsset.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,qBAAa,oBAAqB,SAAQ,SAAS;IACjD;;OAEG;IACH,SAAgB,KAAK,EAAE,KAAK,CAAC;gBAEjB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB;CAa3E"}
1
+ {"version":3,"file":"ContainerSourceAsset.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/ContainerSourceAsset.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAsCD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,oBAAqB,SAAQ,SAAS;IACjD;;OAEG;IACH,SAAgB,KAAK,EAAE,KAAK,CAAC;gBAEjB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,yBAAyB;CAuB3E"}
@@ -2,14 +2,68 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ContainerSourceAsset = void 0;
4
4
  const lib_1 = require("../../../../lib");
5
+ const aws_cdk_lib_1 = require("aws-cdk-lib");
5
6
  const aws_s3_assets_1 = require("aws-cdk-lib/aws-s3-assets");
6
7
  const constructs_1 = require("constructs");
8
+ const fs_1 = require("fs");
9
+ const path_1 = require("path");
7
10
  /**
8
- * Packages the agent source directory (including Dockerfile) as an S3 asset for CodeBuild.
11
+ * Read the `.dockerignore` at the build-context root and return its patterns (comments and blank
12
+ * lines stripped). Paired with `IgnoreMode.DOCKER` on the `Asset`, this makes the uploaded deploy
13
+ * context honor exactly what a local `docker build` from the same context would — the CDK `Asset`
14
+ * does not read `.dockerignore` on its own. Returns `[]` when there is no `.dockerignore`.
15
+ */
16
+ function readDockerignorePatterns(contextRoot) {
17
+ const dockerignorePath = (0, path_1.join)(contextRoot, '.dockerignore');
18
+ if (!(0, fs_1.existsSync)(dockerignorePath)) {
19
+ return [];
20
+ }
21
+ return (0, fs_1.readFileSync)(dockerignorePath, 'utf-8')
22
+ .split(/\r?\n/)
23
+ .map(line => line.trim())
24
+ .filter(line => line.length > 0 && !line.startsWith('#'));
25
+ }
26
+ /**
27
+ * Force-keep the Dockerfile (and each of its ancestor directories) so an allowlist-style
28
+ * `.dockerignore` (`*` then `!keep`) — or any baseline/user pattern — can never drop the very file
29
+ * CodeBuild builds with (`-f`). Docker will not re-include a file whose parent directory is excluded,
30
+ * so each ancestor segment is negated too. Emitted last; in Docker semantics the last matching pattern
31
+ * wins, so these negations override any preceding exclude.
32
+ */
33
+ function forceKeepDockerfilePatterns(dockerfileRelPath) {
34
+ const segments = dockerfileRelPath.split('/').filter(segment => segment.length > 0);
35
+ const patterns = [];
36
+ for (let i = 1; i < segments.length; i++) {
37
+ patterns.push(`!${segments.slice(0, i).join('/')}`);
38
+ }
39
+ if (segments.length > 0) {
40
+ patterns.push(`!${segments.join('/')}`);
41
+ }
42
+ return patterns;
43
+ }
44
+ /**
45
+ * Packages the Docker build context (including the Dockerfile) as an S3 asset for CodeBuild.
46
+ *
47
+ * The uploaded directory is `buildContextPath` when set, otherwise `codeLocation`. It becomes both
48
+ * the `docker build` context (the `.` in the buildspec) and the root the Dockerfile path is resolved
49
+ * against, so a shared Dockerfile in a monorepo can COPY files that live outside the agent's own
50
+ * `codeLocation`.
51
+ *
52
+ * The uploaded context's `exclude` list (evaluated with `IgnoreMode.DOCKER`, last match wins) layers:
53
+ * 1. {@link CONTAINER_CONTEXT_SECRET_EXCLUDES} — an unconditional secret/junk baseline applied to
54
+ * BOTH `codeLocation` and `buildContextPath` builds, so a stray `.env` / `.git` / `node_modules`
55
+ * is never persisted to the assets bucket or baked into the image (mirrors the CodeZip guard);
56
+ * 2. the user's own build-context-root `.dockerignore`, so they can exclude more or re-include a
57
+ * baseline path with a `!pattern` line;
58
+ * 3. {@link forceKeepDockerfilePatterns} — a force-keep of the Dockerfile (+ ancestor dirs) so an
59
+ * allowlist-style `.dockerignore` can't drop the file CodeBuild builds with.
60
+ *
61
+ * NOTE: applying the baseline unconditionally changes the asset hash for pre-existing container stacks
62
+ * (which previously uploaded the raw directory), so the first deploy after upgrade re-uploads the
63
+ * context and rebuilds the image once. This is intentional — it is what closes the secret-leak.
9
64
  *
10
- * Unlike BundledCodeZipAsset which packages code into a zip with dependencies,
11
- * this simply uploads the source directory as-is. CodeBuild will use the Dockerfile
12
- * within the source to build the container image.
65
+ * Unlike BundledCodeZipAsset which packages code into a zip with dependencies, this uploads the
66
+ * directory as-is; CodeBuild uses the Dockerfile within it to build the container image.
13
67
  */
14
68
  class ContainerSourceAsset extends constructs_1.Construct {
15
69
  /**
@@ -22,9 +76,18 @@ class ContainerSourceAsset extends constructs_1.Construct {
22
76
  if (!configRoot) {
23
77
  throw new Error('Could not find .agentcore directory. Ensure you are running from within an AgentCore project.');
24
78
  }
25
- const resolvedCodeLocation = (0, lib_1.resolveCodeLocation)(props.config.codeLocation, configRoot);
79
+ const buildContext = props.config.buildContextPath ?? props.config.codeLocation;
80
+ const resolvedBuildContext = (0, lib_1.resolveCodeLocation)(buildContext, configRoot);
81
+ const dockerfileRelPath = props.config.dockerfile ?? 'Dockerfile';
82
+ const exclude = [
83
+ ...lib_1.CONTAINER_CONTEXT_SECRET_EXCLUDES,
84
+ ...readDockerignorePatterns(resolvedBuildContext),
85
+ ...forceKeepDockerfilePatterns(dockerfileRelPath),
86
+ ];
26
87
  this.asset = new aws_s3_assets_1.Asset(this, 'SourceAsset', {
27
- path: resolvedCodeLocation,
88
+ path: resolvedBuildContext,
89
+ exclude,
90
+ ignoreMode: aws_cdk_lib_1.IgnoreMode.DOCKER,
28
91
  });
29
92
  }
30
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContainerSourceAsset.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/ContainerSourceAsset.ts"],"names":[],"mappings":";;;AAAA,yCAAsE;AAEtE,6DAAkD;AAClD,2CAAuC;AASvC;;;;;;GAMG;AACH,MAAa,oBAAqB,SAAQ,sBAAS;IACjD;;OAEG;IACa,KAAK,CAAQ;IAE7B,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAgC;QACxE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEjB,MAAM,UAAU,GAAG,IAAA,oBAAc,GAAE,CAAC;QACpC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,+FAA+F,CAAC,CAAC;QACnH,CAAC;QACD,MAAM,oBAAoB,GAAG,IAAA,yBAAmB,EAAC,KAAK,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAExF,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAK,CAAC,IAAI,EAAE,aAAa,EAAE;YAC1C,IAAI,EAAE,oBAAoB;SAC3B,CAAC,CAAC;IACL,CAAC;CACF;AAnBD,oDAmBC"}
1
+ {"version":3,"file":"ContainerSourceAsset.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/ContainerSourceAsset.ts"],"names":[],"mappings":";;;AAAA,yCAAyG;AAEzG,6CAAyC;AACzC,6DAAkD;AAClD,2CAAuC;AACvC,2BAA8C;AAC9C,+BAA4B;AAS5B;;;;;GAKG;AACH,SAAS,wBAAwB,CAAC,WAAmB;IACnD,MAAM,gBAAgB,GAAG,IAAA,WAAI,EAAC,WAAW,EAAE,eAAe,CAAC,CAAC;IAC5D,IAAI,CAAC,IAAA,eAAU,EAAC,gBAAgB,CAAC,EAAE,CAAC;QAClC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,IAAA,iBAAY,EAAC,gBAAgB,EAAE,OAAO,CAAC;SAC3C,KAAK,CAAC,OAAO,CAAC;SACd,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;SACxB,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;GAMG;AACH,SAAS,2BAA2B,CAAC,iBAAyB;IAC5D,MAAM,QAAQ,GAAG,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACpF,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,oBAAqB,SAAQ,sBAAS;IACjD;;OAEG;IACa,KAAK,CAAQ;IAE7B,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAgC;QACxE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEjB,MAAM,UAAU,GAAG,IAAA,oBAAc,GAAE,CAAC;QACpC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,+FAA+F,CAAC,CAAC;QACnH,CAAC;QACD,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;QAChF,MAAM,oBAAoB,GAAG,IAAA,yBAAmB,EAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAC3E,MAAM,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,YAAY,CAAC;QAElE,MAAM,OAAO,GAAG;YACd,GAAG,uCAAiC;YACpC,GAAG,wBAAwB,CAAC,oBAAoB,CAAC;YACjD,GAAG,2BAA2B,CAAC,iBAAiB,CAAC;SAClD,CAAC;QAEF,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAK,CAAC,IAAI,EAAE,aAAa,EAAE;YAC1C,IAAI,EAAE,oBAAoB;YAC1B,OAAO;YACP,UAAU,EAAE,wBAAU,CAAC,MAAM;SAC9B,CAAC,CAAC;IACL,CAAC;CACF;AA7BD,oDA6BC"}
@@ -0,0 +1,17 @@
1
+ import { Asset } from 'aws-cdk-lib/aws-s3-assets';
2
+ import { Construct } from 'constructs';
3
+ export interface ContainerSourceAssetFromPathProps {
4
+ /**
5
+ * Absolute path to the directory containing the Dockerfile and source files.
6
+ */
7
+ readonly sourcePath: string;
8
+ }
9
+ /**
10
+ * Packages a directory (containing a Dockerfile) as an S3 asset for CodeBuild.
11
+ * Unlike ContainerSourceAsset which resolves from an AgentEnvSpec, this takes a raw path.
12
+ */
13
+ export declare class ContainerSourceAssetFromPath extends Construct {
14
+ readonly asset: Asset;
15
+ constructor(scope: Construct, id: string, props: ContainerSourceAssetFromPathProps);
16
+ }
17
+ //# sourceMappingURL=ContainerSourceAssetFromPath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerSourceAssetFromPath.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,SAAS;IACzD,SAAgB,KAAK,EAAE,KAAK,CAAC;gBAEjB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,iCAAiC;CAOnF"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContainerSourceAssetFromPath = void 0;
4
+ const aws_s3_assets_1 = require("aws-cdk-lib/aws-s3-assets");
5
+ const constructs_1 = require("constructs");
6
+ /**
7
+ * Packages a directory (containing a Dockerfile) as an S3 asset for CodeBuild.
8
+ * Unlike ContainerSourceAsset which resolves from an AgentEnvSpec, this takes a raw path.
9
+ */
10
+ class ContainerSourceAssetFromPath extends constructs_1.Construct {
11
+ asset;
12
+ constructor(scope, id, props) {
13
+ super(scope, id);
14
+ this.asset = new aws_s3_assets_1.Asset(this, 'SourceAsset', {
15
+ path: props.sourcePath,
16
+ });
17
+ }
18
+ }
19
+ exports.ContainerSourceAssetFromPath = ContainerSourceAssetFromPath;
20
+ //# sourceMappingURL=ContainerSourceAssetFromPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContainerSourceAssetFromPath.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.ts"],"names":[],"mappings":";;;AAAA,6DAAkD;AAClD,2CAAuC;AASvC;;;GAGG;AACH,MAAa,4BAA6B,SAAQ,sBAAS;IACzC,KAAK,CAAQ;IAE7B,YAAY,KAAgB,EAAE,EAAU,EAAE,KAAwC;QAChF,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEjB,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAK,CAAC,IAAI,EAAE,aAAa,EAAE;YAC1C,IAAI,EAAE,KAAK,CAAC,UAAU;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AAVD,oEAUC"}
@@ -1,2 +1,3 @@
1
1
  export { ContainerSourceAsset, type ContainerSourceAssetProps } from './ContainerSourceAsset';
2
+ export { ContainerSourceAssetFromPath, type ContainerSourceAssetFromPathProps } from './ContainerSourceAssetFromPath';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,4BAA4B,EAAE,KAAK,iCAAiC,EAAE,MAAM,gCAAgC,CAAC"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContainerSourceAsset = void 0;
3
+ exports.ContainerSourceAssetFromPath = exports.ContainerSourceAsset = void 0;
4
4
  var ContainerSourceAsset_1 = require("./ContainerSourceAsset");
5
5
  Object.defineProperty(exports, "ContainerSourceAsset", { enumerable: true, get: function () { return ContainerSourceAsset_1.ContainerSourceAsset; } });
6
+ var ContainerSourceAssetFromPath_1 = require("./ContainerSourceAssetFromPath");
7
+ Object.defineProperty(exports, "ContainerSourceAssetFromPath", { enumerable: true, get: function () { return ContainerSourceAssetFromPath_1.ContainerSourceAssetFromPath; } });
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/index.ts"],"names":[],"mappings":";;;AAAA,+DAA8F;AAArF,4HAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/container/index.ts"],"names":[],"mappings":";;;AAAA,+DAA8F;AAArF,4HAAA,oBAAoB,OAAA;AAC7B,+EAAsH;AAA7G,4IAAA,4BAA4B,OAAA"}
@@ -6,6 +6,8 @@
6
6
  * - container/ - Source assets for Container runtime
7
7
  */
8
8
  export { BundledCodeZipAsset, type BundledCodeZipAssetProps, type PackageResult } from './zip';
9
+ export { NodeBundledCodeZipAsset } from './zip';
9
10
  export { PythonBundledCodeZipAsset } from './zip';
10
11
  export { ContainerSourceAsset, type ContainerSourceAssetProps } from './container';
12
+ export { ContainerSourceAssetFromPath, type ContainerSourceAssetFromPathProps } from './container';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cdk/constructs/bundling/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cdk/constructs/bundling/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,KAAK,iCAAiC,EAAE,MAAM,aAAa,CAAC"}
@@ -7,13 +7,17 @@
7
7
  * - container/ - Source assets for Container runtime
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ContainerSourceAsset = exports.PythonBundledCodeZipAsset = exports.BundledCodeZipAsset = void 0;
10
+ exports.ContainerSourceAssetFromPath = exports.ContainerSourceAsset = exports.PythonBundledCodeZipAsset = exports.NodeBundledCodeZipAsset = exports.BundledCodeZipAsset = void 0;
11
11
  // Zip/CodeZip bundling
12
12
  var zip_1 = require("./zip");
13
13
  Object.defineProperty(exports, "BundledCodeZipAsset", { enumerable: true, get: function () { return zip_1.BundledCodeZipAsset; } });
14
14
  var zip_2 = require("./zip");
15
- Object.defineProperty(exports, "PythonBundledCodeZipAsset", { enumerable: true, get: function () { return zip_2.PythonBundledCodeZipAsset; } });
15
+ Object.defineProperty(exports, "NodeBundledCodeZipAsset", { enumerable: true, get: function () { return zip_2.NodeBundledCodeZipAsset; } });
16
+ var zip_3 = require("./zip");
17
+ Object.defineProperty(exports, "PythonBundledCodeZipAsset", { enumerable: true, get: function () { return zip_3.PythonBundledCodeZipAsset; } });
16
18
  // Container bundling
17
19
  var container_1 = require("./container");
18
20
  Object.defineProperty(exports, "ContainerSourceAsset", { enumerable: true, get: function () { return container_1.ContainerSourceAsset; } });
21
+ var container_2 = require("./container");
22
+ Object.defineProperty(exports, "ContainerSourceAssetFromPath", { enumerable: true, get: function () { return container_2.ContainerSourceAssetFromPath; } });
19
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/constructs/bundling/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,uBAAuB;AACvB,6BAA+F;AAAtF,0GAAA,mBAAmB,OAAA;AAC5B,6BAAkD;AAAzC,gHAAA,yBAAyB,OAAA;AAElC,qBAAqB;AACrB,yCAAmF;AAA1E,iHAAA,oBAAoB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/constructs/bundling/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,uBAAuB;AACvB,6BAA+F;AAAtF,0GAAA,mBAAmB,OAAA;AAC5B,6BAAgD;AAAvC,8GAAA,uBAAuB,OAAA;AAChC,6BAAkD;AAAzC,gHAAA,yBAAyB,OAAA;AAElC,qBAAqB;AACrB,yCAAmF;AAA1E,iHAAA,oBAAoB,OAAA;AAC7B,yCAAmG;AAA1F,yHAAA,4BAA4B,OAAA"}
@@ -0,0 +1,7 @@
1
+ import { BundledCodeZipAsset, type BundledCodeZipAssetProps, type PackageResult } from './BundledCodeZipAsset';
2
+ import { Construct } from 'constructs';
3
+ export declare class NodeBundledCodeZipAsset extends BundledCodeZipAsset {
4
+ constructor(scope: Construct, id: string, props: BundledCodeZipAssetProps);
5
+ protected packageCode(): PackageResult;
6
+ }
7
+ //# sourceMappingURL=NodeBundledCodeZipAsset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeBundledCodeZipAsset.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAKvC,qBAAa,uBAAwB,SAAQ,mBAAmB;gBAClD,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB;IAIzE,SAAS,CAAC,WAAW,IAAI,aAAa;CAiBvC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeBundledCodeZipAsset = void 0;
4
+ const lib_1 = require("../../../../lib");
5
+ const BundledCodeZipAsset_1 = require("./BundledCodeZipAsset");
6
+ const crypto_1 = require("crypto");
7
+ const os_1 = require("os");
8
+ const path_1 = require("path");
9
+ class NodeBundledCodeZipAsset extends BundledCodeZipAsset_1.BundledCodeZipAsset {
10
+ constructor(scope, id, props) {
11
+ super(scope, id, props);
12
+ }
13
+ packageCode() {
14
+ const cacheDir = (0, path_1.join)(this.configRoot, '.cache');
15
+ const outputPath = (0, path_1.join)((0, os_1.tmpdir)(), `${this.config.name}-${(0, crypto_1.randomUUID)()}.zip`);
16
+ const result = (0, lib_1.packCodeZipSync)(this.config, {
17
+ projectRoot: this.resolvedCodeLocation,
18
+ srcDir: '.',
19
+ artifactDir: cacheDir,
20
+ outputPath,
21
+ agentName: this.config.name,
22
+ });
23
+ return {
24
+ artifactPath: result.artifactPath,
25
+ sizeBytes: result.sizeBytes,
26
+ };
27
+ }
28
+ }
29
+ exports.NodeBundledCodeZipAsset = NodeBundledCodeZipAsset;
30
+ //# sourceMappingURL=NodeBundledCodeZipAsset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeBundledCodeZipAsset.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.ts"],"names":[],"mappings":";;;AAAA,yCAAkD;AAClD,+DAA+G;AAE/G,mCAAoC;AACpC,2BAA4B;AAC5B,+BAA4B;AAE5B,MAAa,uBAAwB,SAAQ,yCAAmB;IAC9D,YAAY,KAAgB,EAAE,EAAU,EAAE,KAA+B;QACvE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IAES,WAAW;QACnB,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACjD,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,IAAA,WAAM,GAAE,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAA,mBAAU,GAAE,MAAM,CAAC,CAAC;QAE7E,MAAM,MAAM,GAAG,IAAA,qBAAe,EAAC,IAAI,CAAC,MAAM,EAAE;YAC1C,WAAW,EAAE,IAAI,CAAC,oBAAoB;YACtC,MAAM,EAAE,GAAG;YACX,WAAW,EAAE,QAAQ;YACrB,UAAU;YACV,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;SAC5B,CAAC,CAAC;QAEH,OAAO;YACL,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAC;IACJ,CAAC;CACF;AAtBD,0DAsBC"}
@@ -1,3 +1,4 @@
1
1
  export { BundledCodeZipAsset, type BundledCodeZipAssetProps, type PackageResult } from './BundledCodeZipAsset';
2
+ export { NodeBundledCodeZipAsset } from './NodeBundledCodeZipAsset';
2
3
  export { PythonBundledCodeZipAsset } from './PythonBundledCodeZipAsset';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC/G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC/G,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PythonBundledCodeZipAsset = exports.BundledCodeZipAsset = void 0;
3
+ exports.PythonBundledCodeZipAsset = exports.NodeBundledCodeZipAsset = exports.BundledCodeZipAsset = void 0;
4
4
  var BundledCodeZipAsset_1 = require("./BundledCodeZipAsset");
5
5
  Object.defineProperty(exports, "BundledCodeZipAsset", { enumerable: true, get: function () { return BundledCodeZipAsset_1.BundledCodeZipAsset; } });
6
+ var NodeBundledCodeZipAsset_1 = require("./NodeBundledCodeZipAsset");
7
+ Object.defineProperty(exports, "NodeBundledCodeZipAsset", { enumerable: true, get: function () { return NodeBundledCodeZipAsset_1.NodeBundledCodeZipAsset; } });
6
8
  var PythonBundledCodeZipAsset_1 = require("./PythonBundledCodeZipAsset");
7
9
  Object.defineProperty(exports, "PythonBundledCodeZipAsset", { enumerable: true, get: function () { return PythonBundledCodeZipAsset_1.PythonBundledCodeZipAsset; } });
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/index.ts"],"names":[],"mappings":";;;AAAA,6DAA+G;AAAtG,0HAAA,mBAAmB,OAAA;AAC5B,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/index.ts"],"names":[],"mappings":";;;AAAA,6DAA+G;AAAtG,0HAAA,mBAAmB,OAAA;AAC5B,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAChC,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA"}
@@ -4,5 +4,7 @@ export interface AgentCoreComponentProps {
4
4
  * Example: "${projectName}_${agentName}" for runtime names.
5
5
  */
6
6
  readonly projectName: string;
7
+ /** Project-level tags to propagate to resources. Merged with resource-level tags (resource wins on conflict). */
8
+ readonly projectTags?: Record<string, string>;
7
9
  }
8
10
  //# sourceMappingURL=base-props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-props.d.ts","sourceRoot":"","sources":["../../../../src/cdk/constructs/components/base-props.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B"}
1
+ {"version":3,"file":"base-props.d.ts","sourceRoot":"","sources":["../../../../src/cdk/constructs/components/base-props.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,iHAAiH;IACjH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/C"}
@@ -2,27 +2,54 @@ import * as codebuild from 'aws-cdk-lib/aws-codebuild';
2
2
  import type * as ecr from 'aws-cdk-lib/aws-ecr';
3
3
  import * as iam from 'aws-cdk-lib/aws-iam';
4
4
  import { Construct } from 'constructs';
5
+ export interface BuildNetworkConfig {
6
+ readonly vpcId: string;
7
+ readonly subnets: string[];
8
+ readonly securityGroups: string[];
9
+ }
10
+ /**
11
+ * Build the VPC network config for a container build from a spec's networkMode + networkConfig,
12
+ * or `undefined` for a public (non-VPC) build. Fails fast for direct CDK construct consumers (the
13
+ * CLI's Zod schema already rejects these upstream):
14
+ * - a Container build in VPC mode needs an explicit vpcId (CodeBuild can't infer it from subnets);
15
+ * - CodeBuild allows at most 5 security groups.
16
+ *
17
+ * `label` names the offending agent/harness in the error (e.g. `Agent "foo"`).
18
+ */
19
+ export declare function toBuildNetwork(label: string, networkMode: string | undefined, networkConfig: {
20
+ vpcId?: string;
21
+ subnets: string[];
22
+ securityGroups: string[];
23
+ } | undefined): BuildNetworkConfig | undefined;
5
24
  /**
6
- * Singleton CodeBuild project for building container images.
25
+ * Shared CodeBuild project for building container images.
7
26
  *
8
- * Creates a shared CodeBuild project at the stack level that can be reused
9
- * across multiple agent container builds. The project uses a privileged
10
- * ARM64 environment with Docker layer caching.
27
+ * Created once per distinct network config at the stack level (see getOrCreate) and reused across
28
+ * every agent/harness container build that shares that config. The project uses a privileged ARM64
29
+ * environment with Docker layer caching.
11
30
  *
12
31
  * The buildspec expects environment variables:
13
32
  * - ECR_REGISTRY: The ECR registry URL
14
33
  * - IMAGE_URI: The full image URI (repo:tag)
15
34
  * - DOCKERFILE_PATH: Path to the Dockerfile within the source
35
+ * - BUILD_ARG_FLAGS: Space-separated `--build-arg NAME` flags (may be empty). Each NAME's value is
36
+ * supplied as its own build environment variable, so `docker build` inherits it — keeping build-arg
37
+ * values off the shell command line. Set per-build via CodeBuild environment overrides.
16
38
  */
17
39
  export declare class ContainerBuildProject extends Construct {
18
40
  /**
19
- * Returns the singleton ContainerBuildProject for the given stack.
20
- * Creates a new one if it doesn't exist yet.
41
+ * Returns the shared ContainerBuildProject for the given stack and network config, creating it on
42
+ * first request. There is one project per distinct network config: all container builds that share
43
+ * a config (the common case — same VPC, or all public) reuse a single CodeBuild project, while
44
+ * builds needing different VPCs/subnets/SGs each get their own. Container builds are independent
45
+ * (each is triggered by its own custom resource), so this is purely a project-reuse optimization —
46
+ * there is no requirement that they share a VPC.
21
47
  */
22
- static getOrCreate(scope: Construct): ContainerBuildProject;
48
+ static getOrCreate(scope: Construct, networkConfig?: BuildNetworkConfig): ContainerBuildProject;
23
49
  readonly project: codebuild.Project;
24
50
  readonly role: iam.Role;
25
- constructor(scope: Construct, id: string);
51
+ readonly networkConfig?: BuildNetworkConfig;
52
+ constructor(scope: Construct, id: string, networkConfig?: BuildNetworkConfig);
26
53
  /**
27
54
  * Grant the build project permission to push to a specific ECR repository.
28
55
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ContainerBuildProject.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/container/ContainerBuildProject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC;;;;;;;;;;;GAWG;AACH,qBAAa,qBAAsB,SAAQ,SAAS;IAClD;;;OAGG;WACW,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,qBAAqB;IAUlE,SAAgB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC;IAC3C,SAAgB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC;gBAEnB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM;IAyDxC;;OAEG;IACI,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI;CAGtD"}
1
+ {"version":3,"file":"ContainerBuildProject.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/components/container/ContainerBuildProject.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,SAAS,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;CACnC;AASD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,aAAa,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,GACzF,kBAAkB,GAAG,SAAS,CAmBhC;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAAa,qBAAsB,SAAQ,SAAS;IAClD;;;;;;;OAOG;WACW,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE,kBAAkB,GAAG,qBAAqB;IAatG,SAAgB,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC;IAC3C,SAAgB,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC;IAC/B,SAAgB,aAAa,CAAC,EAAE,kBAAkB,CAAC;gBAEvC,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,kBAAkB;IA8G5E;;OAEG;IACI,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI;CAGtD"}