@aws/agentcore-cdk 0.1.0-alpha.9 → 1.0.0-rc.1
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.
- package/README.md +242 -40
- package/dist/cdk/constants.d.ts +1 -0
- package/dist/cdk/constants.d.ts.map +1 -1
- package/dist/cdk/constants.js +2 -1
- package/dist/cdk/constants.js.map +1 -1
- package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.d.ts +26 -4
- package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.d.ts.map +1 -1
- package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.js +69 -10
- package/dist/cdk/constructs/bundling/container/ContainerSourceAsset.js.map +1 -1
- package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.d.ts +17 -0
- package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.d.ts.map +1 -0
- package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.js +20 -0
- package/dist/cdk/constructs/bundling/container/ContainerSourceAssetFromPath.js.map +1 -0
- package/dist/cdk/constructs/bundling/container/index.d.ts +1 -0
- package/dist/cdk/constructs/bundling/container/index.d.ts.map +1 -1
- package/dist/cdk/constructs/bundling/container/index.js +3 -1
- package/dist/cdk/constructs/bundling/container/index.js.map +1 -1
- package/dist/cdk/constructs/bundling/index.d.ts +2 -0
- package/dist/cdk/constructs/bundling/index.d.ts.map +1 -1
- package/dist/cdk/constructs/bundling/index.js +6 -2
- package/dist/cdk/constructs/bundling/index.js.map +1 -1
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.d.ts +5 -0
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.d.ts.map +1 -1
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.js +2 -7
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.js.map +1 -1
- package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.d.ts +7 -0
- package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.d.ts.map +1 -0
- package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.js +30 -0
- package/dist/cdk/constructs/bundling/zip/NodeBundledCodeZipAsset.js.map +1 -0
- package/dist/cdk/constructs/bundling/zip/index.d.ts +1 -0
- package/dist/cdk/constructs/bundling/zip/index.d.ts.map +1 -1
- package/dist/cdk/constructs/bundling/zip/index.js +3 -1
- package/dist/cdk/constructs/bundling/zip/index.js.map +1 -1
- package/dist/cdk/constructs/components/base-props.d.ts +9 -2
- package/dist/cdk/constructs/components/base-props.d.ts.map +1 -1
- package/dist/cdk/constructs/components/container/ContainerBuildProject.d.ts +35 -8
- package/dist/cdk/constructs/components/container/ContainerBuildProject.d.ts.map +1 -1
- package/dist/cdk/constructs/components/container/ContainerBuildProject.js +117 -13
- package/dist/cdk/constructs/components/container/ContainerBuildProject.js.map +1 -1
- package/dist/cdk/constructs/components/container/ContainerImageBuilder.d.ts +25 -7
- package/dist/cdk/constructs/components/container/ContainerImageBuilder.d.ts.map +1 -1
- package/dist/cdk/constructs/components/container/ContainerImageBuilder.js +45 -7
- package/dist/cdk/constructs/components/container/ContainerImageBuilder.js.map +1 -1
- package/dist/cdk/constructs/components/container/ContainerRepository.d.ts +30 -0
- package/dist/cdk/constructs/components/container/ContainerRepository.d.ts.map +1 -0
- package/dist/cdk/constructs/components/container/{AgentEcrRepository.js → ContainerRepository.js} +19 -8
- package/dist/cdk/constructs/components/container/ContainerRepository.js.map +1 -0
- package/dist/cdk/constructs/components/container/container-build-handler.d.ts +4 -1
- package/dist/cdk/constructs/components/container/container-build-handler.d.ts.map +1 -1
- package/dist/cdk/constructs/components/container/container-build-handler.js +16 -3
- package/dist/cdk/constructs/components/container/container-build-handler.js.map +1 -1
- package/dist/cdk/constructs/components/container/index.d.ts +1 -1
- package/dist/cdk/constructs/components/container/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/container/index.js +3 -3
- package/dist/cdk/constructs/components/container/index.js.map +1 -1
- package/dist/cdk/constructs/components/gateway/AgentCoreGateway.d.ts +111 -0
- package/dist/cdk/constructs/components/gateway/AgentCoreGateway.d.ts.map +1 -0
- package/dist/cdk/constructs/components/gateway/AgentCoreGateway.js +611 -0
- package/dist/cdk/constructs/components/gateway/AgentCoreGateway.js.map +1 -0
- package/dist/cdk/constructs/components/gateway/connector-defaults.d.ts +20 -0
- package/dist/cdk/constructs/components/gateway/connector-defaults.d.ts.map +1 -0
- package/dist/cdk/constructs/components/gateway/connector-defaults.js +16 -0
- package/dist/cdk/constructs/components/gateway/connector-defaults.js.map +1 -0
- package/dist/cdk/constructs/components/gateway/gateway-targets.d.ts +25 -0
- package/dist/cdk/constructs/components/gateway/gateway-targets.d.ts.map +1 -0
- package/dist/cdk/constructs/components/gateway/gateway-targets.js +95 -0
- package/dist/cdk/constructs/components/gateway/gateway-targets.js.map +1 -0
- package/dist/cdk/constructs/components/gateway/index.d.ts +3 -0
- package/dist/cdk/constructs/components/gateway/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/gateway/index.js +8 -0
- package/dist/cdk/constructs/components/gateway/index.js.map +1 -0
- package/dist/cdk/constructs/components/index.d.ts +2 -1
- package/dist/cdk/constructs/components/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/index.js +2 -1
- package/dist/cdk/constructs/components/index.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.d.ts +42 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.js +126 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.d.ts +31 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.js +62 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.d.ts +3 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.d.ts +29 -0
- package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.js +80 -0
- package/dist/cdk/constructs/components/primitives/dataset/AgentCoreDataset.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/dataset/index.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/dataset/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/dataset/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/dataset/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.d.ts +27 -5
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.js +129 -40
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreEvaluator.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.d.ts +8 -8
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js +98 -124
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.d.ts +124 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.js +185 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.d.ts +71 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.js +389 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.js +182 -0
- package/dist/cdk/constructs/components/primitives/harness/__tests__/AgentCoreHarnessRole.test.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.d.ts +30 -0
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.js +165 -0
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/index.d.ts +3 -0
- package/dist/cdk/constructs/components/primitives/harness/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/index.js +8 -0
- package/dist/cdk/constructs/components/primitives/harness/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/index.d.ts +9 -3
- package/dist/cdk/constructs/components/primitives/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/index.js +17 -3
- package/dist/cdk/constructs/components/primitives/index.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.d.ts +67 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.js +282 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts +30 -44
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js +147 -154
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/index.d.ts +1 -1
- package/dist/cdk/constructs/components/primitives/memory/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/index.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/memory-actions.d.ts +17 -0
- package/dist/cdk/constructs/components/primitives/memory/memory-actions.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/memory/memory-actions.js +34 -0
- package/dist/cdk/constructs/components/primitives/memory/memory-actions.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.d.ts +36 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.js +52 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentConnector.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.d.ts +65 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.js +143 -0
- package/dist/cdk/constructs/components/primitives/payment/AgentCorePaymentManager.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/payment/index.d.ts +3 -0
- package/dist/cdk/constructs/components/primitives/payment/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/payment/index.js +8 -0
- package/dist/cdk/constructs/components/primitives/payment/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.d.ts +47 -0
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js +94 -0
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/policy/index.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/policy/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/policy/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/policy/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts +110 -9
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js +324 -149
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/index.d.ts +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/index.js.map +1 -1
- package/dist/cdk/constructs/components/shared/bindable.d.ts +30 -0
- package/dist/cdk/constructs/components/shared/bindable.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/bindable.js +9 -0
- package/dist/cdk/constructs/components/shared/bindable.js.map +1 -0
- package/dist/cdk/constructs/components/shared/environment-variables.d.ts +41 -0
- package/dist/cdk/constructs/components/shared/environment-variables.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/environment-variables.js +77 -0
- package/dist/cdk/constructs/components/shared/environment-variables.js.map +1 -0
- package/dist/cdk/constructs/components/shared/execution-role-grants.d.ts +17 -0
- package/dist/cdk/constructs/components/shared/execution-role-grants.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/execution-role-grants.js +65 -0
- package/dist/cdk/constructs/components/shared/execution-role-grants.js.map +1 -0
- package/dist/cdk/constructs/components/shared/filesystem-access.d.ts +15 -0
- package/dist/cdk/constructs/components/shared/filesystem-access.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/filesystem-access.js +53 -0
- package/dist/cdk/constructs/components/shared/filesystem-access.js.map +1 -0
- package/dist/cdk/constructs/components/shared/identity-access.d.ts +30 -0
- package/dist/cdk/constructs/components/shared/identity-access.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/identity-access.js +44 -0
- package/dist/cdk/constructs/components/shared/identity-access.js.map +1 -0
- package/dist/cdk/constructs/components/shared/imported-role-principal.d.ts +32 -0
- package/dist/cdk/constructs/components/shared/imported-role-principal.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/imported-role-principal.js +51 -0
- package/dist/cdk/constructs/components/shared/imported-role-principal.js.map +1 -0
- package/dist/cdk/constructs/components/shared/jwt-authorizer.d.ts +10 -0
- package/dist/cdk/constructs/components/shared/jwt-authorizer.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/jwt-authorizer.js +20 -0
- package/dist/cdk/constructs/components/shared/jwt-authorizer.js.map +1 -0
- package/dist/cdk/constructs/components/shared/load-additional-policies.d.ts +20 -0
- package/dist/cdk/constructs/components/shared/load-additional-policies.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/load-additional-policies.js +47 -0
- package/dist/cdk/constructs/components/shared/load-additional-policies.js.map +1 -0
- package/dist/cdk/constructs/components/shared/managed-tool-access.d.ts +6 -0
- package/dist/cdk/constructs/components/shared/managed-tool-access.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/managed-tool-access.js +24 -0
- package/dist/cdk/constructs/components/shared/managed-tool-access.js.map +1 -0
- package/dist/cdk/constructs/components/shared/physical-names.d.ts +17 -0
- package/dist/cdk/constructs/components/shared/physical-names.d.ts.map +1 -0
- package/dist/cdk/constructs/components/shared/physical-names.js +20 -0
- package/dist/cdk/constructs/components/shared/physical-names.js.map +1 -0
- package/dist/cdk/constructs/components/{mcp/McpLambdaCompute.d.ts → tools/LambdaToolTarget.d.ts} +6 -6
- package/dist/cdk/constructs/components/tools/LambdaToolTarget.d.ts.map +1 -0
- package/dist/cdk/constructs/components/{mcp/McpLambdaCompute.js → tools/LambdaToolTarget.js} +20 -12
- package/dist/cdk/constructs/components/tools/LambdaToolTarget.js.map +1 -0
- package/dist/cdk/constructs/components/tools/RuntimeToolTarget.d.ts +28 -0
- package/dist/cdk/constructs/components/tools/RuntimeToolTarget.d.ts.map +1 -0
- package/dist/cdk/constructs/components/{mcp/McpRuntimeCompute.js → tools/RuntimeToolTarget.js} +12 -29
- package/dist/cdk/constructs/components/tools/RuntimeToolTarget.js.map +1 -0
- package/dist/cdk/constructs/components/tools/index.d.ts +3 -0
- package/dist/cdk/constructs/components/tools/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/tools/index.js +8 -0
- package/dist/cdk/constructs/components/tools/index.js.map +1 -0
- package/dist/cdk/constructs/connections/import-connection.d.ts +10 -0
- package/dist/cdk/constructs/connections/import-connection.d.ts.map +1 -0
- package/dist/cdk/constructs/connections/import-connection.js +64 -0
- package/dist/cdk/constructs/connections/import-connection.js.map +1 -0
- package/dist/cdk/constructs/index.d.ts +9 -3
- package/dist/cdk/constructs/index.d.ts.map +1 -1
- package/dist/cdk/constructs/index.js +23 -3
- package/dist/cdk/constructs/index.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts +190 -13
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.js +746 -39
- package/dist/cdk/constructs/l3/AgentCoreApplication.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.d.ts +34 -0
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.js +96 -0
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.js.map +1 -0
- package/dist/cdk/constructs/l3/AgentCorePayments.d.ts +24 -0
- package/dist/cdk/constructs/l3/AgentCorePayments.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/AgentCorePayments.js +99 -0
- package/dist/cdk/constructs/l3/AgentCorePayments.js.map +1 -0
- package/dist/cdk/constructs/l3/RuntimeEnvironment.d.ts +47 -0
- package/dist/cdk/constructs/l3/RuntimeEnvironment.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/RuntimeEnvironment.js +152 -0
- package/dist/cdk/constructs/l3/RuntimeEnvironment.js.map +1 -0
- package/dist/cdk/constructs/l3/index.d.ts +3 -3
- package/dist/cdk/constructs/l3/index.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/index.js +5 -5
- package/dist/cdk/constructs/l3/index.js.map +1 -1
- package/dist/cdk/index.d.ts +2 -1
- package/dist/cdk/index.d.ts.map +1 -1
- package/dist/cdk/index.js +26 -3
- package/dist/cdk/index.js.map +1 -1
- package/dist/cdk/logical-ids.d.ts +5 -5
- package/dist/cdk/logical-ids.js +5 -5
- package/dist/cdk/project/index.d.ts +4 -0
- package/dist/cdk/project/index.d.ts.map +1 -0
- package/dist/cdk/project/index.js +13 -0
- package/dist/cdk/project/index.js.map +1 -0
- package/dist/cdk/project/read-project.d.ts +34 -0
- package/dist/cdk/project/read-project.d.ts.map +1 -0
- package/dist/cdk/project/read-project.js +86 -0
- package/dist/cdk/project/read-project.js.map +1 -0
- package/dist/cdk/project/target-stacks.d.ts +55 -0
- package/dist/cdk/project/target-stacks.d.ts.map +1 -0
- package/dist/cdk/project/target-stacks.js +50 -0
- package/dist/cdk/project/target-stacks.js.map +1 -0
- package/dist/cdk/project/transform.d.ts +38 -0
- package/dist/cdk/project/transform.d.ts.map +1 -0
- package/dist/cdk/project/transform.js +106 -0
- package/dist/cdk/project/transform.js.map +1 -0
- package/dist/cdk/utils/__tests__/tags.test.d.ts +2 -0
- package/dist/cdk/utils/__tests__/tags.test.d.ts.map +1 -0
- package/dist/cdk/utils/__tests__/tags.test.js +57 -0
- package/dist/cdk/utils/__tests__/tags.test.js.map +1 -0
- package/dist/cdk/utils/tags.d.ts +11 -0
- package/dist/cdk/utils/tags.d.ts.map +1 -0
- package/dist/cdk/utils/tags.js +22 -0
- package/dist/cdk/utils/tags.js.map +1 -0
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -28
- package/dist/index.js.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +2 -2
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors/config.d.ts +0 -16
- package/dist/lib/errors/config.d.ts.map +1 -1
- package/dist/lib/errors/config.js +2 -29
- package/dist/lib/errors/config.js.map +1 -1
- package/dist/lib/index.d.ts +1 -2
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/packaging/helpers.d.ts +19 -0
- package/dist/lib/packaging/helpers.d.ts.map +1 -1
- package/dist/lib/packaging/helpers.js +80 -27
- package/dist/lib/packaging/helpers.js.map +1 -1
- package/dist/lib/packaging/index.d.ts +3 -7
- package/dist/lib/packaging/index.d.ts.map +1 -1
- package/dist/lib/packaging/index.js +14 -11
- package/dist/lib/packaging/index.js.map +1 -1
- package/dist/lib/packaging/node.d.ts +6 -0
- package/dist/lib/packaging/node.d.ts.map +1 -0
- package/dist/lib/packaging/node.js +106 -0
- package/dist/lib/packaging/node.js.map +1 -0
- package/dist/lib/packaging/types/packaging.d.ts +2 -0
- package/dist/lib/packaging/types/packaging.d.ts.map +1 -1
- package/dist/lib/packaging/uv.d.ts.map +1 -1
- package/dist/lib/packaging/uv.js +1 -1
- package/dist/lib/packaging/uv.js.map +1 -1
- package/dist/lib/utils/subprocess.d.ts +5 -1
- package/dist/lib/utils/subprocess.d.ts.map +1 -1
- package/dist/lib/utils/subprocess.js +0 -6
- package/dist/lib/utils/subprocess.js.map +1 -1
- package/dist/schema/constants.d.ts +11 -0
- package/dist/schema/constants.d.ts.map +1 -1
- package/dist/schema/constants.js +33 -6
- package/dist/schema/constants.js.map +1 -1
- package/dist/schema/schemas/agent-env.d.ts +257 -9
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agent-env.js +407 -12
- package/dist/schema/schemas/agent-env.js.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +1042 -38
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +290 -15
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/auth.d.ts +318 -0
- package/dist/schema/schemas/auth.d.ts.map +1 -0
- package/dist/schema/schemas/auth.js +238 -0
- package/dist/schema/schemas/auth.js.map +1 -0
- package/dist/schema/schemas/aws-targets.d.ts +39 -0
- package/dist/schema/schemas/aws-targets.d.ts.map +1 -1
- package/dist/schema/schemas/aws-targets.js +16 -2
- package/dist/schema/schemas/aws-targets.js.map +1 -1
- package/dist/schema/schemas/connections.d.ts +183 -0
- package/dist/schema/schemas/connections.d.ts.map +1 -0
- package/dist/schema/schemas/connections.js +176 -0
- package/dist/schema/schemas/connections.js.map +1 -0
- package/dist/schema/schemas/deployed-state.d.ts +204 -16
- package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
- package/dist/schema/schemas/deployed-state.js +44 -4
- package/dist/schema/schemas/deployed-state.js.map +1 -1
- package/dist/schema/schemas/index.d.ts +2 -0
- package/dist/schema/schemas/index.d.ts.map +1 -1
- package/dist/schema/schemas/index.js +2 -0
- package/dist/schema/schemas/index.js.map +1 -1
- package/dist/schema/schemas/mcp.d.ts +255 -249
- package/dist/schema/schemas/mcp.d.ts.map +1 -1
- package/dist/schema/schemas/mcp.js +317 -60
- package/dist/schema/schemas/mcp.js.map +1 -1
- package/dist/schema/schemas/primitives/capacity-provider.d.ts +239 -0
- package/dist/schema/schemas/primitives/capacity-provider.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/capacity-provider.js +220 -0
- package/dist/schema/schemas/primitives/capacity-provider.js.map +1 -0
- package/dist/schema/schemas/primitives/config-bundle.d.ts +31 -0
- package/dist/schema/schemas/primitives/config-bundle.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/config-bundle.js +41 -0
- package/dist/schema/schemas/primitives/config-bundle.js.map +1 -0
- package/dist/schema/schemas/primitives/dataset.d.ts +53 -0
- package/dist/schema/schemas/primitives/dataset.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/dataset.js +65 -0
- package/dist/schema/schemas/primitives/dataset.js.map +1 -0
- package/dist/schema/schemas/primitives/evaluator.d.ts +49 -2
- package/dist/schema/schemas/primitives/evaluator.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/evaluator.js +30 -3
- package/dist/schema/schemas/primitives/evaluator.js.map +1 -1
- package/dist/schema/schemas/primitives/harness.d.ts +649 -0
- package/dist/schema/schemas/primitives/harness.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/harness.js +596 -0
- package/dist/schema/schemas/primitives/harness.js.map +1 -0
- package/dist/schema/schemas/primitives/index.d.ts +17 -5
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/index.js +71 -3
- package/dist/schema/schemas/primitives/index.js.map +1 -1
- package/dist/schema/schemas/primitives/knowledge-base.d.ts +103 -0
- package/dist/schema/schemas/primitives/knowledge-base.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/knowledge-base.js +98 -0
- package/dist/schema/schemas/primitives/knowledge-base.js.map +1 -0
- package/dist/schema/schemas/primitives/memory.d.ts +33 -2
- package/dist/schema/schemas/primitives/memory.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/memory.js +33 -3
- package/dist/schema/schemas/primitives/memory.js.map +1 -1
- package/dist/schema/schemas/primitives/online-evaluation-config.d.ts +22 -3
- package/dist/schema/schemas/primitives/online-evaluation-config.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/online-evaluation-config.js +45 -6
- package/dist/schema/schemas/primitives/online-evaluation-config.js.map +1 -1
- package/dist/schema/schemas/primitives/policy.d.ts +62 -0
- package/dist/schema/schemas/primitives/policy.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/policy.js +64 -0
- package/dist/schema/schemas/primitives/policy.js.map +1 -0
- package/dist/schema/schemas/primitives/tags.d.ts +6 -0
- package/dist/schema/schemas/primitives/tags.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/tags.js +20 -0
- package/dist/schema/schemas/primitives/tags.js.map +1 -0
- package/package.json +13 -11
- package/dist/cdk/constructs/components/container/AgentEcrRepository.d.ts +0 -25
- package/dist/cdk/constructs/components/container/AgentEcrRepository.d.ts.map +0 -1
- package/dist/cdk/constructs/components/container/AgentEcrRepository.js.map +0 -1
- package/dist/cdk/constructs/components/mcp/Gateway.d.ts +0 -55
- package/dist/cdk/constructs/components/mcp/Gateway.d.ts.map +0 -1
- package/dist/cdk/constructs/components/mcp/Gateway.js +0 -454
- package/dist/cdk/constructs/components/mcp/Gateway.js.map +0 -1
- package/dist/cdk/constructs/components/mcp/McpLambdaCompute.d.ts.map +0 -1
- package/dist/cdk/constructs/components/mcp/McpLambdaCompute.js.map +0 -1
- package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.d.ts +0 -36
- package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.d.ts.map +0 -1
- package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.js.map +0 -1
- package/dist/cdk/constructs/components/mcp/index.d.ts +0 -5
- package/dist/cdk/constructs/components/mcp/index.d.ts.map +0 -1
- package/dist/cdk/constructs/components/mcp/index.js +0 -17
- package/dist/cdk/constructs/components/mcp/index.js.map +0 -1
- package/dist/cdk/constructs/components/mcp/mcp-utils.d.ts +0 -25
- package/dist/cdk/constructs/components/mcp/mcp-utils.d.ts.map +0 -1
- package/dist/cdk/constructs/components/mcp/mcp-utils.js +0 -43
- package/dist/cdk/constructs/components/mcp/mcp-utils.js.map +0 -1
- package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.d.ts +0 -46
- package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.d.ts.map +0 -1
- package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.js +0 -49
- package/dist/cdk/constructs/components/primitives/BasePrimitiveConstruct.js.map +0 -1
- package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts +0 -86
- package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts.map +0 -1
- package/dist/cdk/constructs/l3/AgentCoreMcp.js +0 -241
- package/dist/cdk/constructs/l3/AgentCoreMcp.js.map +0 -1
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts +0 -34
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts.map +0 -1
- package/dist/cdk/constructs/l3/AgentEnvironment.js +0 -99
- package/dist/cdk/constructs/l3/AgentEnvironment.js.map +0 -1
- package/dist/lib/schemas/io/config-io.d.ts +0 -99
- package/dist/lib/schemas/io/config-io.d.ts.map +0 -1
- package/dist/lib/schemas/io/config-io.js +0 -283
- package/dist/lib/schemas/io/config-io.js.map +0 -1
- package/dist/lib/schemas/io/index.d.ts +0 -3
- package/dist/lib/schemas/io/index.d.ts.map +0 -1
- package/dist/lib/schemas/io/index.js +0 -17
- package/dist/lib/schemas/io/index.js.map +0 -1
- package/dist/lib/schemas/io/path-resolver.d.ts +0 -112
- package/dist/lib/schemas/io/path-resolver.d.ts.map +0 -1
- package/dist/lib/schemas/io/path-resolver.js +0 -195
- package/dist/lib/schemas/io/path-resolver.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/constructs/l3/index.ts"],"names":[],"mappings":";;;AAAA,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/constructs/l3/index.ts"],"names":[],"mappings":";;;AAAA,+DAIgC;AAH9B,4HAAA,oBAAoB,OAAA;AAItB,2DAAwF;AAA/E,wHAAA,kBAAkB,OAAA;AAC3B,6EAAmH;AAA1G,0IAAA,2BAA2B,OAAA"}
|
package/dist/cdk/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { AgentCoreApplication, type AgentCoreApplicationProps,
|
|
1
|
+
export { AgentCoreApplication, type AgentCoreApplicationProps, RuntimeEnvironment, type RuntimeEnvironmentProps, AgentCoreHarnessEnvironment, type AgentCoreHarnessEnvironmentProps, type HarnessDeploymentConfig, type AgentCoreComponentProps, AgentCoreHarnessRole, type AgentCoreHarnessRoleProps, type HarnessRoleConfig, AgentCoreHarness, type AgentCoreHarnessProps, AgentCoreKnowledgeBase, type AgentCoreKnowledgeBaseProps, AgentCoreConfigBundle, type AgentCoreConfigBundleProps, AgentCoreMemory, type AgentCoreMemoryProps, type IAgentCoreMemory, AgentCorePolicyEngine, type AgentCorePolicyEngineProps, AgentCoreRuntime, type AgentCoreRuntimeProps, type IAgentCoreRuntime, AgentCorePaymentManager, type AgentCorePaymentManagerProps, type CustomJWTAuthorizerConfig, AgentCorePaymentConnector, type AgentCorePaymentConnectorProps, AgentCoreGateway, type AgentCoreGatewayProps, type GatewayAuthType, type IAgentCoreGateway, type GatewayTargetRef, type GrantTarget, type BindOptions, type IBindable, type IAgentCoreWorkload, ContainerSourceAssetFromPath, type ContainerSourceAssetFromPathProps, ContainerRepository, type ContainerRepositoryProps, ContainerBuildProject, ContainerImageBuilder, type ContainerImageBuilderProps, } from './constructs';
|
|
2
2
|
export { toPascalId, outputId, exportName } from './logical-ids';
|
|
3
|
+
export { AGENTCORE_PROJECT_TAG, AGENTCORE_TARGET_TAG, type DeployedCredentials, type ResolveTargetStacksInput, type TargetStack, resolveTargetStacks, type TransformAgentCoreJsonOptions, transformAgentCoreJson, type AgentCoreProjectFiles, NoProjectError, readAgentCoreProject, } from './project';
|
|
3
4
|
export { AGENTCORE_SERVICE_PRINCIPAL, LAMBDA_SERVICE_PRINCIPAL } from './constants';
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cdk/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cdk/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,2BAA2B,EAC3B,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAE5B,KAAK,uBAAuB,EAC5B,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EAEtB,uBAAuB,EACvB,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,yBAAyB,EACzB,KAAK,8BAA8B,EAEnC,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,kBAAkB,EAEvB,4BAA4B,EAC5B,KAAK,iCAAiC,EACtC,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjE,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,sBAAsB,EACtB,KAAK,qBAAqB,EAC1B,cAAc,EACd,oBAAoB,GACrB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/cdk/index.js
CHANGED
|
@@ -1,19 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LAMBDA_SERVICE_PRINCIPAL = exports.AGENTCORE_SERVICE_PRINCIPAL = exports.exportName = exports.outputId = exports.toPascalId = exports.AgentCoreRuntime = exports.AgentCoreMemory = exports.
|
|
3
|
+
exports.LAMBDA_SERVICE_PRINCIPAL = exports.AGENTCORE_SERVICE_PRINCIPAL = exports.readAgentCoreProject = exports.NoProjectError = exports.transformAgentCoreJson = exports.resolveTargetStacks = exports.AGENTCORE_TARGET_TAG = exports.AGENTCORE_PROJECT_TAG = exports.exportName = exports.outputId = exports.toPascalId = exports.ContainerImageBuilder = exports.ContainerBuildProject = exports.ContainerRepository = exports.ContainerSourceAssetFromPath = exports.AgentCoreGateway = exports.AgentCorePaymentConnector = exports.AgentCorePaymentManager = exports.AgentCoreRuntime = exports.AgentCorePolicyEngine = exports.AgentCoreMemory = exports.AgentCoreConfigBundle = exports.AgentCoreKnowledgeBase = exports.AgentCoreHarness = exports.AgentCoreHarnessRole = exports.AgentCoreHarnessEnvironment = exports.RuntimeEnvironment = exports.AgentCoreApplication = void 0;
|
|
4
4
|
// Constructs (L3 and Component)
|
|
5
5
|
var constructs_1 = require("./constructs");
|
|
6
6
|
// L3 Constructs
|
|
7
7
|
Object.defineProperty(exports, "AgentCoreApplication", { enumerable: true, get: function () { return constructs_1.AgentCoreApplication; } });
|
|
8
|
-
Object.defineProperty(exports, "
|
|
9
|
-
Object.defineProperty(exports, "
|
|
8
|
+
Object.defineProperty(exports, "RuntimeEnvironment", { enumerable: true, get: function () { return constructs_1.RuntimeEnvironment; } });
|
|
9
|
+
Object.defineProperty(exports, "AgentCoreHarnessEnvironment", { enumerable: true, get: function () { return constructs_1.AgentCoreHarnessEnvironment; } });
|
|
10
|
+
Object.defineProperty(exports, "AgentCoreHarnessRole", { enumerable: true, get: function () { return constructs_1.AgentCoreHarnessRole; } });
|
|
11
|
+
Object.defineProperty(exports, "AgentCoreHarness", { enumerable: true, get: function () { return constructs_1.AgentCoreHarness; } });
|
|
12
|
+
Object.defineProperty(exports, "AgentCoreKnowledgeBase", { enumerable: true, get: function () { return constructs_1.AgentCoreKnowledgeBase; } });
|
|
13
|
+
Object.defineProperty(exports, "AgentCoreConfigBundle", { enumerable: true, get: function () { return constructs_1.AgentCoreConfigBundle; } });
|
|
10
14
|
Object.defineProperty(exports, "AgentCoreMemory", { enumerable: true, get: function () { return constructs_1.AgentCoreMemory; } });
|
|
15
|
+
Object.defineProperty(exports, "AgentCorePolicyEngine", { enumerable: true, get: function () { return constructs_1.AgentCorePolicyEngine; } });
|
|
11
16
|
Object.defineProperty(exports, "AgentCoreRuntime", { enumerable: true, get: function () { return constructs_1.AgentCoreRuntime; } });
|
|
17
|
+
// Payment Constructs
|
|
18
|
+
Object.defineProperty(exports, "AgentCorePaymentManager", { enumerable: true, get: function () { return constructs_1.AgentCorePaymentManager; } });
|
|
19
|
+
Object.defineProperty(exports, "AgentCorePaymentConnector", { enumerable: true, get: function () { return constructs_1.AgentCorePaymentConnector; } });
|
|
20
|
+
// Gateway Component Constructs
|
|
21
|
+
Object.defineProperty(exports, "AgentCoreGateway", { enumerable: true, get: function () { return constructs_1.AgentCoreGateway; } });
|
|
22
|
+
// Container Constructs
|
|
23
|
+
Object.defineProperty(exports, "ContainerSourceAssetFromPath", { enumerable: true, get: function () { return constructs_1.ContainerSourceAssetFromPath; } });
|
|
24
|
+
Object.defineProperty(exports, "ContainerRepository", { enumerable: true, get: function () { return constructs_1.ContainerRepository; } });
|
|
25
|
+
Object.defineProperty(exports, "ContainerBuildProject", { enumerable: true, get: function () { return constructs_1.ContainerBuildProject; } });
|
|
26
|
+
Object.defineProperty(exports, "ContainerImageBuilder", { enumerable: true, get: function () { return constructs_1.ContainerImageBuilder; } });
|
|
12
27
|
// CDK IDs
|
|
13
28
|
var logical_ids_1 = require("./logical-ids");
|
|
14
29
|
Object.defineProperty(exports, "toPascalId", { enumerable: true, get: function () { return logical_ids_1.toPascalId; } });
|
|
15
30
|
Object.defineProperty(exports, "outputId", { enumerable: true, get: function () { return logical_ids_1.outputId; } });
|
|
16
31
|
Object.defineProperty(exports, "exportName", { enumerable: true, get: function () { return logical_ids_1.exportName; } });
|
|
32
|
+
// Project-level helpers used by the vended CDK app
|
|
33
|
+
var project_1 = require("./project");
|
|
34
|
+
Object.defineProperty(exports, "AGENTCORE_PROJECT_TAG", { enumerable: true, get: function () { return project_1.AGENTCORE_PROJECT_TAG; } });
|
|
35
|
+
Object.defineProperty(exports, "AGENTCORE_TARGET_TAG", { enumerable: true, get: function () { return project_1.AGENTCORE_TARGET_TAG; } });
|
|
36
|
+
Object.defineProperty(exports, "resolveTargetStacks", { enumerable: true, get: function () { return project_1.resolveTargetStacks; } });
|
|
37
|
+
Object.defineProperty(exports, "transformAgentCoreJson", { enumerable: true, get: function () { return project_1.transformAgentCoreJson; } });
|
|
38
|
+
Object.defineProperty(exports, "NoProjectError", { enumerable: true, get: function () { return project_1.NoProjectError; } });
|
|
39
|
+
Object.defineProperty(exports, "readAgentCoreProject", { enumerable: true, get: function () { return project_1.readAgentCoreProject; } });
|
|
17
40
|
// Constants
|
|
18
41
|
var constants_1 = require("./constants");
|
|
19
42
|
Object.defineProperty(exports, "AGENTCORE_SERVICE_PRINCIPAL", { enumerable: true, get: function () { return constants_1.AGENTCORE_SERVICE_PRINCIPAL; } });
|
package/dist/cdk/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cdk/index.ts"],"names":[],"mappings":";;;AAAA,gCAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cdk/index.ts"],"names":[],"mappings":";;;AAAA,gCAAgC;AAChC,2CAqDsB;AApDpB,gBAAgB;AAChB,kHAAA,oBAAoB,OAAA;AAEpB,gHAAA,kBAAkB,OAAA;AAElB,yHAAA,2BAA2B,OAAA;AAK3B,kHAAA,oBAAoB,OAAA;AAGpB,8GAAA,gBAAgB,OAAA;AAEhB,oHAAA,sBAAsB,OAAA;AAEtB,mHAAA,qBAAqB,OAAA;AAErB,6GAAA,eAAe,OAAA;AAGf,mHAAA,qBAAqB,OAAA;AAErB,8GAAA,gBAAgB,OAAA;AAGhB,qBAAqB;AACrB,qHAAA,uBAAuB,OAAA;AAGvB,uHAAA,yBAAyB,OAAA;AAEzB,+BAA+B;AAC/B,8GAAA,gBAAgB,OAAA;AAUhB,uBAAuB;AACvB,0HAAA,4BAA4B,OAAA;AAE5B,iHAAA,mBAAmB,OAAA;AAEnB,mHAAA,qBAAqB,OAAA;AACrB,mHAAA,qBAAqB,OAAA;AAIvB,UAAU;AACV,6CAAiE;AAAxD,yGAAA,UAAU,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAAE,yGAAA,UAAU,OAAA;AAEzC,mDAAmD;AACnD,qCAYmB;AAXjB,gHAAA,qBAAqB,OAAA;AACrB,+GAAA,oBAAoB,OAAA;AAIpB,8GAAA,mBAAmB,OAAA;AAEnB,iHAAA,sBAAsB,OAAA;AAEtB,yGAAA,cAAc,OAAA;AACd,+GAAA,oBAAoB,OAAA;AAGtB,YAAY;AACZ,yCAAoF;AAA3E,wHAAA,2BAA2B,OAAA;AAAE,qHAAA,wBAAwB,OAAA"}
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* Converts dynamic names to valid CloudFormation logical IDs in PascalCase.
|
|
3
3
|
*
|
|
4
4
|
* Use this when building construct IDs that include dynamic names from user
|
|
5
|
-
* configuration (e.g.,
|
|
5
|
+
* configuration (e.g., runtime names like "my-agent" → "MyAgent").
|
|
6
6
|
*
|
|
7
7
|
* For static construct IDs, prefer simple string literals instead:
|
|
8
8
|
* new AgentCoreRuntime(this, 'Runtime', ...) // Good - simple literal
|
|
9
9
|
* new AgentCoreRuntime(this, toPascalId('Runtime'), ...) // Unnecessary
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* // Convert user-provided
|
|
13
|
-
* new
|
|
14
|
-
* // "my-agent" -> "
|
|
12
|
+
* // Convert a user-provided runtime name to a valid construct ID
|
|
13
|
+
* new RuntimeEnvironment(this, toPascalId('Runtime', spec.name), {...})
|
|
14
|
+
* // "my-agent" -> "RuntimeMyAgent"
|
|
15
15
|
*/
|
|
16
16
|
export declare function toPascalId(...parts: string[]): string;
|
|
17
17
|
/**
|
|
@@ -29,7 +29,7 @@ export declare function outputId(...parts: string[]): string;
|
|
|
29
29
|
* Underscores are converted to hyphens; other invalid chars are removed.
|
|
30
30
|
*
|
|
31
31
|
* @example
|
|
32
|
-
* exportName(stackName,
|
|
32
|
+
* exportName(stackName, runtimeName, 'RuntimeId')
|
|
33
33
|
* // -> "MyStack-MyAgent-RuntimeId"
|
|
34
34
|
*/
|
|
35
35
|
export declare function exportName(...parts: string[]): string;
|
package/dist/cdk/logical-ids.js
CHANGED
|
@@ -39,16 +39,16 @@ function toLogicalIdPart(name) {
|
|
|
39
39
|
* Converts dynamic names to valid CloudFormation logical IDs in PascalCase.
|
|
40
40
|
*
|
|
41
41
|
* Use this when building construct IDs that include dynamic names from user
|
|
42
|
-
* configuration (e.g.,
|
|
42
|
+
* configuration (e.g., runtime names like "my-agent" → "MyAgent").
|
|
43
43
|
*
|
|
44
44
|
* For static construct IDs, prefer simple string literals instead:
|
|
45
45
|
* new AgentCoreRuntime(this, 'Runtime', ...) // Good - simple literal
|
|
46
46
|
* new AgentCoreRuntime(this, toPascalId('Runtime'), ...) // Unnecessary
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
|
-
* // Convert user-provided
|
|
50
|
-
* new
|
|
51
|
-
* // "my-agent" -> "
|
|
49
|
+
* // Convert a user-provided runtime name to a valid construct ID
|
|
50
|
+
* new RuntimeEnvironment(this, toPascalId('Runtime', spec.name), {...})
|
|
51
|
+
* // "my-agent" -> "RuntimeMyAgent"
|
|
52
52
|
*/
|
|
53
53
|
function toPascalId(...parts) {
|
|
54
54
|
if (parts.length === 0) {
|
|
@@ -75,7 +75,7 @@ function outputId(...parts) {
|
|
|
75
75
|
* Underscores are converted to hyphens; other invalid chars are removed.
|
|
76
76
|
*
|
|
77
77
|
* @example
|
|
78
|
-
* exportName(stackName,
|
|
78
|
+
* exportName(stackName, runtimeName, 'RuntimeId')
|
|
79
79
|
* // -> "MyStack-MyAgent-RuntimeId"
|
|
80
80
|
*/
|
|
81
81
|
function exportName(...parts) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { AGENTCORE_PROJECT_TAG, AGENTCORE_TARGET_TAG, type DeployedCredentials, type ResolveTargetStacksInput, type TargetStack, resolveTargetStacks, } from './target-stacks';
|
|
2
|
+
export { type TransformAgentCoreJsonOptions, transformAgentCoreJson } from './transform';
|
|
3
|
+
export { type AgentCoreProjectFiles, NoProjectError, readAgentCoreProject } from './read-project';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cdk/project/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,6BAA6B,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACzF,OAAO,EAAE,KAAK,qBAAqB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.readAgentCoreProject = exports.NoProjectError = exports.transformAgentCoreJson = exports.resolveTargetStacks = exports.AGENTCORE_TARGET_TAG = exports.AGENTCORE_PROJECT_TAG = void 0;
|
|
4
|
+
var target_stacks_1 = require("./target-stacks");
|
|
5
|
+
Object.defineProperty(exports, "AGENTCORE_PROJECT_TAG", { enumerable: true, get: function () { return target_stacks_1.AGENTCORE_PROJECT_TAG; } });
|
|
6
|
+
Object.defineProperty(exports, "AGENTCORE_TARGET_TAG", { enumerable: true, get: function () { return target_stacks_1.AGENTCORE_TARGET_TAG; } });
|
|
7
|
+
Object.defineProperty(exports, "resolveTargetStacks", { enumerable: true, get: function () { return target_stacks_1.resolveTargetStacks; } });
|
|
8
|
+
var transform_1 = require("./transform");
|
|
9
|
+
Object.defineProperty(exports, "transformAgentCoreJson", { enumerable: true, get: function () { return transform_1.transformAgentCoreJson; } });
|
|
10
|
+
var read_project_1 = require("./read-project");
|
|
11
|
+
Object.defineProperty(exports, "NoProjectError", { enumerable: true, get: function () { return read_project_1.NoProjectError; } });
|
|
12
|
+
Object.defineProperty(exports, "readAgentCoreProject", { enumerable: true, get: function () { return read_project_1.readAgentCoreProject; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cdk/project/index.ts"],"names":[],"mappings":";;;AAAA,iDAOyB;AANvB,sHAAA,qBAAqB,OAAA;AACrB,qHAAA,oBAAoB,OAAA;AAIpB,oHAAA,mBAAmB,OAAA;AAErB,yCAAyF;AAA5C,mHAAA,sBAAsB,OAAA;AACnE,+CAAkG;AAA7D,8GAAA,cAAc,OAAA;AAAE,oHAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { AwsDeploymentTarget, DeployedState } from '../../schema';
|
|
2
|
+
/** Thrown when no AgentCore project can be found from the requested directory. */
|
|
3
|
+
export declare class NoProjectError extends Error {
|
|
4
|
+
constructor(message?: string);
|
|
5
|
+
}
|
|
6
|
+
/** The files of an AgentCore project the vended CDK app needs, read once. */
|
|
7
|
+
export interface AgentCoreProjectFiles {
|
|
8
|
+
/** Absolute path of the directory that contains `agentcore/`. */
|
|
9
|
+
readonly projectRoot: string;
|
|
10
|
+
/** Absolute path of the `agentcore/` directory. */
|
|
11
|
+
readonly configRoot: string;
|
|
12
|
+
/** The project name from agentcore.json, validated so stack names can be derived before the full transform. */
|
|
13
|
+
readonly projectName: string;
|
|
14
|
+
/** agentcore/agentcore.json, parsed but not validated (transformAgentCoreJson validates). */
|
|
15
|
+
readonly agentCoreJson: unknown;
|
|
16
|
+
/** aws-targets.json validated against AwsDeploymentTargetsSchema; `[]` when the file is absent. No env or profile fallbacks. */
|
|
17
|
+
readonly targets: AwsDeploymentTarget[];
|
|
18
|
+
/** agentcore/.cli/deployed-state.json validated against DeployedStateSchema; `undefined` when absent; a malformed file throws. */
|
|
19
|
+
readonly deployedState?: DeployedState;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Read an AgentCore project's configuration files by walking up from `startDir` to the nearest
|
|
23
|
+
* directory that contains `agentcore/agentcore.json`.
|
|
24
|
+
*
|
|
25
|
+
* This is the one place the vended CDK app touches the working directory, and it does so once.
|
|
26
|
+
* It reads only the project files and deliberately does not consult `AWS_PROFILE`, call STS or
|
|
27
|
+
* fall back to environment regions; `aws-targets.json` written by the CLI always carries `account`
|
|
28
|
+
* and `region`, so no fallback is needed.
|
|
29
|
+
*
|
|
30
|
+
* @param startDir directory to start the walk from (default: the process working directory)
|
|
31
|
+
* @throws NoProjectError when no `agentcore/agentcore.json` is found on the way up
|
|
32
|
+
*/
|
|
33
|
+
export declare function readAgentCoreProject(startDir?: string): AgentCoreProjectFiles;
|
|
34
|
+
//# sourceMappingURL=read-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-project.d.ts","sourceRoot":"","sources":["../../../src/cdk/project/read-project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAMvE,kFAAkF;AAClF,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,CAAC,EAAE,MAAM;CAI7B;AAED,6EAA6E;AAC7E,MAAM,WAAW,qBAAqB;IACpC,iEAAiE;IACjE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mDAAmD;IACnD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,+GAA+G;IAC/G,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,6FAA6F;IAC7F,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,gIAAgI;IAChI,QAAQ,CAAC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IACxC,kIAAkI;IAClI,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,GAAE,MAAsB,GAAG,qBAAqB,CAiC5F"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoProjectError = void 0;
|
|
4
|
+
exports.readAgentCoreProject = readAgentCoreProject;
|
|
5
|
+
const constants_1 = require("../../lib/constants");
|
|
6
|
+
const errors_1 = require("../../lib/errors");
|
|
7
|
+
const schema_1 = require("../../schema");
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
/** Thrown when no AgentCore project can be found from the requested directory. */
|
|
11
|
+
class NoProjectError extends Error {
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(message ?? 'No agentcore project found. Run "agentcore create" first.');
|
|
14
|
+
this.name = 'NoProjectError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.NoProjectError = NoProjectError;
|
|
18
|
+
/**
|
|
19
|
+
* Read an AgentCore project's configuration files by walking up from `startDir` to the nearest
|
|
20
|
+
* directory that contains `agentcore/agentcore.json`.
|
|
21
|
+
*
|
|
22
|
+
* This is the one place the vended CDK app touches the working directory, and it does so once.
|
|
23
|
+
* It reads only the project files and deliberately does not consult `AWS_PROFILE`, call STS or
|
|
24
|
+
* fall back to environment regions; `aws-targets.json` written by the CLI always carries `account`
|
|
25
|
+
* and `region`, so no fallback is needed.
|
|
26
|
+
*
|
|
27
|
+
* @param startDir directory to start the walk from (default: the process working directory)
|
|
28
|
+
* @throws NoProjectError when no `agentcore/agentcore.json` is found on the way up
|
|
29
|
+
*/
|
|
30
|
+
function readAgentCoreProject(startDir = process.cwd()) {
|
|
31
|
+
const projectRoot = findProjectRootFrom(startDir);
|
|
32
|
+
if (!projectRoot) {
|
|
33
|
+
throw new NoProjectError(`No AgentCore project found: no ${constants_1.CONFIG_DIR}/${constants_1.CONFIG_FILES.AGENT_ENV} in ${(0, path_1.resolve)(startDir)} or any parent directory.`);
|
|
34
|
+
}
|
|
35
|
+
const configRoot = (0, path_1.join)(projectRoot, constants_1.CONFIG_DIR);
|
|
36
|
+
const agentCoreJsonPath = (0, path_1.join)(configRoot, constants_1.CONFIG_FILES.AGENT_ENV);
|
|
37
|
+
const agentCoreJson = readJsonFile(agentCoreJsonPath);
|
|
38
|
+
const projectName = validate(agentCoreJsonPath, 'AgentCore Project Config', schema_1.ProjectNameSchema, agentCoreJson?.name);
|
|
39
|
+
// `project build` runs before the project has a target; an absent file is the normal case then.
|
|
40
|
+
const targetsPath = (0, path_1.join)(configRoot, constants_1.CONFIG_FILES.AWS_TARGETS);
|
|
41
|
+
const targets = (0, fs_1.existsSync)(targetsPath)
|
|
42
|
+
? validate(targetsPath, 'AWS Targets', schema_1.AwsDeploymentTargetsSchema, readJsonFile(targetsPath))
|
|
43
|
+
: [];
|
|
44
|
+
// A missing state file is the normal first-deploy case. A malformed one is not: surface it
|
|
45
|
+
// rather than silently synthesizing without the credential ARNs it holds (which would drop
|
|
46
|
+
// them from the stack).
|
|
47
|
+
const statePath = (0, path_1.join)(configRoot, constants_1.CLI_SYSTEM_DIR, constants_1.CONFIG_FILES.DEPLOYED_STATE);
|
|
48
|
+
const deployedState = (0, fs_1.existsSync)(statePath)
|
|
49
|
+
? validate(statePath, 'State', schema_1.DeployedStateSchema, readJsonFile(statePath))
|
|
50
|
+
: undefined;
|
|
51
|
+
return { projectRoot, configRoot, projectName, agentCoreJson, targets, deployedState };
|
|
52
|
+
}
|
|
53
|
+
function findProjectRootFrom(startDir) {
|
|
54
|
+
let dir = (0, path_1.resolve)(startDir);
|
|
55
|
+
for (;;) {
|
|
56
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(dir, constants_1.CONFIG_DIR, constants_1.CONFIG_FILES.AGENT_ENV)))
|
|
57
|
+
return dir;
|
|
58
|
+
const parent = (0, path_1.dirname)(dir);
|
|
59
|
+
if (parent === dir)
|
|
60
|
+
return undefined;
|
|
61
|
+
dir = parent;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function readJsonFile(filePath) {
|
|
65
|
+
let content;
|
|
66
|
+
try {
|
|
67
|
+
content = (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
68
|
+
}
|
|
69
|
+
catch (err) {
|
|
70
|
+
throw new errors_1.ConfigReadError(filePath, err);
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
return JSON.parse(content);
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
throw new errors_1.ConfigParseError(filePath, err);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function validate(filePath, fileType, schema, value) {
|
|
80
|
+
const result = schema.safeParse(value);
|
|
81
|
+
if (!result.success) {
|
|
82
|
+
throw new errors_1.ConfigValidationError(filePath, fileType, result.error);
|
|
83
|
+
}
|
|
84
|
+
return result.data;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=read-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-project.js","sourceRoot":"","sources":["../../../src/cdk/project/read-project.ts"],"names":[],"mappings":";;;AA4CA,oDAiCC;AA7ED,mDAA+E;AAC/E,6CAA4F;AAE5F,yCAAkG;AAClG,2BAA8C;AAC9C,+BAA8C;AAG9C,kFAAkF;AAClF,MAAa,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,IAAI,2DAA2D,CAAC,CAAC;QAC9E,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AALD,wCAKC;AAkBD;;;;;;;;;;;GAWG;AACH,SAAgB,oBAAoB,CAAC,WAAmB,OAAO,CAAC,GAAG,EAAE;IACnE,MAAM,WAAW,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,cAAc,CACtB,kCAAkC,sBAAU,IAAI,wBAAY,CAAC,SAAS,OAAO,IAAA,cAAO,EAAC,QAAQ,CAAC,2BAA2B,CAC1H,CAAC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AAG,EAAE,sBAAU,EAAE,wBAAY,CAAC,SAAS,CAAC,CAAC;YAAE,OAAO,GAAG,CAAC;QAC1E,MAAM,MAAM,GAAG,IAAA,cAAO,EAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,SAAS,CAAC;QACrC,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,QAAgB;IACpC,IAAI,OAAe,CAAC;IACpB,IAAI,CAAC;QACH,OAAO,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,wBAAe,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAY,CAAC;IACxC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,yBAAgB,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAI,QAAgB,EAAE,QAAgB,EAAE,MAAkB,EAAE,KAAc;IACzF,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,IAAI,8BAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { AwsDeploymentTarget, DeployedCredentials, DeployedState } from '../../schema';
|
|
2
|
+
import type { Environment } from 'aws-cdk-lib';
|
|
3
|
+
/** Stack tag carrying the project name; present on every stack the vended app synthesizes. */
|
|
4
|
+
export declare const AGENTCORE_PROJECT_TAG = "agentcore:project-name";
|
|
5
|
+
/**
|
|
6
|
+
* Stack tag carrying the deployment target name. Present only on a stack synthesized for a real
|
|
7
|
+
* target: the AgentCore CLI selects the stack to deploy by this tag, so the target-less
|
|
8
|
+
* `project build` stack must not carry it.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AGENTCORE_TARGET_TAG = "agentcore:target-name";
|
|
11
|
+
/**
|
|
12
|
+
* A deployment target's credential providers, keyed by credential name, as recorded in
|
|
13
|
+
* `agentcore/.cli/deployed-state.json`. Credential providers are created by the CLI before synth,
|
|
14
|
+
* not by the stack; the stack only reads their ARNs.
|
|
15
|
+
*/
|
|
16
|
+
export type { DeployedCredentials };
|
|
17
|
+
/** One CloudFormation stack the vended CDK app should instantiate. */
|
|
18
|
+
export interface TargetStack {
|
|
19
|
+
/** `AgentCore-<project>-<target>`, or `AgentCore-<project>` for the target-less build stack; `_` becomes `-`. */
|
|
20
|
+
readonly stackName: string;
|
|
21
|
+
/** The deployment target this stack is for; absent for the target-less build stack. */
|
|
22
|
+
readonly target?: AwsDeploymentTarget;
|
|
23
|
+
/** The target's account and region; absent (environment-agnostic) for the target-less build stack. */
|
|
24
|
+
readonly env?: Environment;
|
|
25
|
+
/** The stack tags: the project tag always, the target tag only for a real target. */
|
|
26
|
+
readonly tags: Record<string, string>;
|
|
27
|
+
/** Human-readable stack description. */
|
|
28
|
+
readonly description: string;
|
|
29
|
+
/** The target's credential providers from deployed state, when the file records any. */
|
|
30
|
+
readonly credentials?: DeployedCredentials;
|
|
31
|
+
}
|
|
32
|
+
export interface ResolveTargetStacksInput {
|
|
33
|
+
/** The project name from agentcore.json. */
|
|
34
|
+
readonly projectName: string;
|
|
35
|
+
/** The deployment targets from aws-targets.json; empty before the first deploy. */
|
|
36
|
+
readonly targets: AwsDeploymentTarget[];
|
|
37
|
+
/** The parsed deployed state, when the file exists. */
|
|
38
|
+
readonly deployedState?: DeployedState;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Decide which stacks the vended CDK app instantiates for a project.
|
|
42
|
+
*
|
|
43
|
+
* `project build` runs before a project has anywhere to deploy, so an empty target list is not
|
|
44
|
+
* an error: it yields a single environment-agnostic stack (account and region resolved from
|
|
45
|
+
* CloudFormation pseudo-parameters at deploy time), which is enough to typecheck the app and
|
|
46
|
+
* produce a template. Otherwise there is one stack per target, pinned to the target's account and
|
|
47
|
+
* region, carrying the target tag that marks it as a deploy candidate and the credentials the CLI
|
|
48
|
+
* provisioned for that target.
|
|
49
|
+
*
|
|
50
|
+
* The stack name and both tags are part of the CLI's contract: `agentcore project status` and
|
|
51
|
+
* the observability commands re-derive the stack name from the project and target names, and
|
|
52
|
+
* deploy selects the synthesized stack by the target tag.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveTargetStacks(input: ResolveTargetStacksInput): TargetStack[];
|
|
55
|
+
//# sourceMappingURL=target-stacks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-stacks.d.ts","sourceRoot":"","sources":["../../../src/cdk/project/target-stacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAC9D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D;;;;GAIG;AACH,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,sEAAsE;AACtE,MAAM,WAAW,WAAW;IAC1B,iHAAiH;IACjH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACtC,sGAAsG;IACtG,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC;IAC3B,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,wCAAwC;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wFAAwF;IACxF,QAAQ,CAAC,WAAW,CAAC,EAAE,mBAAmB,CAAC;CAC5C;AAED,MAAM,WAAW,wBAAwB;IACvC,4CAA4C;IAC5C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IACxC,uDAAuD;IACvD,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC;CACxC;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,WAAW,EAAE,CAqBlF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGENTCORE_TARGET_TAG = exports.AGENTCORE_PROJECT_TAG = void 0;
|
|
4
|
+
exports.resolveTargetStacks = resolveTargetStacks;
|
|
5
|
+
/** Stack tag carrying the project name; present on every stack the vended app synthesizes. */
|
|
6
|
+
exports.AGENTCORE_PROJECT_TAG = 'agentcore:project-name';
|
|
7
|
+
/**
|
|
8
|
+
* Stack tag carrying the deployment target name. Present only on a stack synthesized for a real
|
|
9
|
+
* target: the AgentCore CLI selects the stack to deploy by this tag, so the target-less
|
|
10
|
+
* `project build` stack must not carry it.
|
|
11
|
+
*/
|
|
12
|
+
exports.AGENTCORE_TARGET_TAG = 'agentcore:target-name';
|
|
13
|
+
function sanitize(name) {
|
|
14
|
+
return name.replace(/_/g, '-');
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Decide which stacks the vended CDK app instantiates for a project.
|
|
18
|
+
*
|
|
19
|
+
* `project build` runs before a project has anywhere to deploy, so an empty target list is not
|
|
20
|
+
* an error: it yields a single environment-agnostic stack (account and region resolved from
|
|
21
|
+
* CloudFormation pseudo-parameters at deploy time), which is enough to typecheck the app and
|
|
22
|
+
* produce a template. Otherwise there is one stack per target, pinned to the target's account and
|
|
23
|
+
* region, carrying the target tag that marks it as a deploy candidate and the credentials the CLI
|
|
24
|
+
* provisioned for that target.
|
|
25
|
+
*
|
|
26
|
+
* The stack name and both tags are part of the CLI's contract: `agentcore project status` and
|
|
27
|
+
* the observability commands re-derive the stack name from the project and target names, and
|
|
28
|
+
* deploy selects the synthesized stack by the target tag.
|
|
29
|
+
*/
|
|
30
|
+
function resolveTargetStacks(input) {
|
|
31
|
+
const { projectName, targets, deployedState } = input;
|
|
32
|
+
if (targets.length === 0) {
|
|
33
|
+
return [
|
|
34
|
+
{
|
|
35
|
+
stackName: `AgentCore-${sanitize(projectName)}`,
|
|
36
|
+
tags: { [exports.AGENTCORE_PROJECT_TAG]: projectName },
|
|
37
|
+
description: `AgentCore stack for ${projectName} (no deployment target configured)`,
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
return targets.map(target => ({
|
|
42
|
+
stackName: `AgentCore-${sanitize(projectName)}-${sanitize(target.name)}`,
|
|
43
|
+
target,
|
|
44
|
+
env: { account: target.account, region: target.region },
|
|
45
|
+
tags: { [exports.AGENTCORE_PROJECT_TAG]: projectName, [exports.AGENTCORE_TARGET_TAG]: target.name },
|
|
46
|
+
description: `AgentCore stack for ${projectName} deployed to ${target.name} (${target.region})`,
|
|
47
|
+
credentials: deployedState?.targets[target.name]?.resources?.credentials,
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=target-stacks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-stacks.js","sourceRoot":"","sources":["../../../src/cdk/project/target-stacks.ts"],"names":[],"mappings":";;;AA8DA,kDAqBC;AAhFD,8FAA8F;AACjF,QAAA,qBAAqB,GAAG,wBAAwB,C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../../schema';
|
|
2
|
+
import type { AgentCoreApplicationProps } from '../constructs/l3/AgentCoreApplication';
|
|
3
|
+
import type { DeployedCredentials } from './target-stacks';
|
|
4
|
+
export interface TransformAgentCoreJsonOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Absolute path of the project root: the directory that contains `agentcore/`. Every relative
|
|
7
|
+
* path in the spec (`harnesses[].path`, `codeLocation`, connector config files, additional policy
|
|
8
|
+
* files) resolves against it.
|
|
9
|
+
*/
|
|
10
|
+
readonly projectRoot: string;
|
|
11
|
+
/**
|
|
12
|
+
* The deployment target's credential providers from deployed-state.json, keyed by credential
|
|
13
|
+
* name. The CLI provisions them before synth; the stack only reads their ARNs.
|
|
14
|
+
*/
|
|
15
|
+
readonly credentials?: DeployedCredentials;
|
|
16
|
+
/**
|
|
17
|
+
* The deployment target the stack is synthesized for. Its name becomes the middle segment of
|
|
18
|
+
* every physical resource name. Absent for the target-less `project build` stack.
|
|
19
|
+
*/
|
|
20
|
+
readonly target?: AwsDeploymentTarget;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Turn the parsed contents of `agentcore/agentcore.json` into the props for one
|
|
24
|
+
* AgentCoreApplication.
|
|
25
|
+
*
|
|
26
|
+
* Synchronous, deterministic, no network, no `process.env`: the only I/O is reading the files the
|
|
27
|
+
* spec points at under `projectRoot` — each harness's `harness.yaml` (and its `system-prompt.md`
|
|
28
|
+
* when the spec has no inline prompt) and the connector-config files of non-S3 knowledge-base data
|
|
29
|
+
* sources. This is everything the CLI's earlier vended `bin/cdk.ts` did, moved into the library so
|
|
30
|
+
* future changes to how agentcore.json is interpreted ship as library versions instead of as code
|
|
31
|
+
* on customers' machines.
|
|
32
|
+
*
|
|
33
|
+
* @throws ConfigValidationError when `agentCoreJson` does not satisfy the project schema. Keys the
|
|
34
|
+
* schema does not know (the CLI writes `abTests`, `httpGateways`, `$schema`) are stripped, not
|
|
35
|
+
* rejected.
|
|
36
|
+
*/
|
|
37
|
+
export declare function transformAgentCoreJson(agentCoreJson: unknown, options: TransformAgentCoreJsonOptions): AgentCoreApplicationProps;
|
|
38
|
+
//# sourceMappingURL=transform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../src/cdk/project/transform.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,mBAAmB,EAAe,MAAM,cAAc,CAAC;AAG3F,OAAO,KAAK,EAAE,yBAAyB,EAA2B,MAAM,uCAAuC,CAAC;AAChH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAK3D,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,OAAO,EACtB,OAAO,EAAE,6BAA6B,GACrC,yBAAyB,CAqB3B"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transformAgentCoreJson = transformAgentCoreJson;
|
|
4
|
+
const constants_1 = require("../../lib/constants");
|
|
5
|
+
const errors_1 = require("../../lib/errors");
|
|
6
|
+
const schema_1 = require("../../schema");
|
|
7
|
+
const harness_cfn_mapping_1 = require("../constructs/components/primitives/harness/harness-cfn-mapping");
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const yaml_1 = require("yaml");
|
|
11
|
+
/**
|
|
12
|
+
* Turn the parsed contents of `agentcore/agentcore.json` into the props for one
|
|
13
|
+
* AgentCoreApplication.
|
|
14
|
+
*
|
|
15
|
+
* Synchronous, deterministic, no network, no `process.env`: the only I/O is reading the files the
|
|
16
|
+
* spec points at under `projectRoot` — each harness's `harness.yaml` (and its `system-prompt.md`
|
|
17
|
+
* when the spec has no inline prompt) and the connector-config files of non-S3 knowledge-base data
|
|
18
|
+
* sources. This is everything the CLI's earlier vended `bin/cdk.ts` did, moved into the library so
|
|
19
|
+
* future changes to how agentcore.json is interpreted ship as library versions instead of as code
|
|
20
|
+
* on customers' machines.
|
|
21
|
+
*
|
|
22
|
+
* @throws ConfigValidationError when `agentCoreJson` does not satisfy the project schema. Keys the
|
|
23
|
+
* schema does not know (the CLI writes `abTests`, `httpGateways`, `$schema`) are stripped, not
|
|
24
|
+
* rejected.
|
|
25
|
+
*/
|
|
26
|
+
function transformAgentCoreJson(agentCoreJson, options) {
|
|
27
|
+
const { projectRoot, credentials, target } = options;
|
|
28
|
+
const parsed = schema_1.AgentCoreProjectSpecSchema.safeParse(agentCoreJson);
|
|
29
|
+
if (!parsed.success) {
|
|
30
|
+
throw new errors_1.ConfigValidationError((0, path_1.join)(projectRoot, constants_1.CONFIG_DIR, constants_1.CONFIG_FILES.AGENT_ENV), 'AgentCore Project Config', parsed.error);
|
|
31
|
+
}
|
|
32
|
+
const spec = parsed.data;
|
|
33
|
+
return {
|
|
34
|
+
spec,
|
|
35
|
+
harnesses: resolveHarnessConfigs(spec, projectRoot),
|
|
36
|
+
connectorParametersByFile: resolveConnectorParametersByFile(spec, projectRoot),
|
|
37
|
+
credentials,
|
|
38
|
+
projectRoot,
|
|
39
|
+
targetName: target?.name,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* One HarnessDeploymentConfig per `spec.harnesses[]` entry: the validated `harness.yaml`, the
|
|
44
|
+
* role-scoped fields the IAM role and container build read, and the harness directory. The system
|
|
45
|
+
* prompt is resolved here (inline `systemPrompt`, else the directory's `system-prompt.md`) so the
|
|
46
|
+
* construct reads no files for a harness built through the transform.
|
|
47
|
+
*/
|
|
48
|
+
function resolveHarnessConfigs(spec, projectRoot) {
|
|
49
|
+
const harnessConfigs = [];
|
|
50
|
+
for (const entry of spec.harnesses ?? []) {
|
|
51
|
+
const harnessDir = (0, path_1.resolve)(projectRoot, entry.path);
|
|
52
|
+
const harnessPath = (0, path_1.resolve)(harnessDir, 'harness.yaml');
|
|
53
|
+
let harnessSpec;
|
|
54
|
+
try {
|
|
55
|
+
harnessSpec = schema_1.HarnessSpecSchema.parse((0, yaml_1.parse)((0, fs_1.readFileSync)(harnessPath, 'utf-8')));
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
throw new Error(`Could not read harness.yaml for "${entry.name}" at ${harnessPath}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
|
|
59
|
+
}
|
|
60
|
+
if (harnessSpec.systemPrompt === undefined) {
|
|
61
|
+
const prompt = (0, harness_cfn_mapping_1.readSystemPromptFile)(harnessDir);
|
|
62
|
+
if (prompt !== undefined)
|
|
63
|
+
harnessSpec = { ...harnessSpec, systemPrompt: prompt };
|
|
64
|
+
}
|
|
65
|
+
harnessConfigs.push({
|
|
66
|
+
name: entry.name,
|
|
67
|
+
executionRoleArn: harnessSpec.executionRoleArn,
|
|
68
|
+
containerUri: harnessSpec.containerUri,
|
|
69
|
+
hasDockerfile: !!harnessSpec.dockerfile,
|
|
70
|
+
dockerfile: harnessSpec.dockerfile,
|
|
71
|
+
codeLocation: harnessSpec.dockerfile ? harnessDir : undefined,
|
|
72
|
+
tools: harnessSpec.tools,
|
|
73
|
+
skills: harnessSpec.skills,
|
|
74
|
+
apiKeyArn: harnessSpec.model.apiKeyArn,
|
|
75
|
+
efsAccessPoints: harnessSpec.efsAccessPoints,
|
|
76
|
+
s3AccessPoints: harnessSpec.s3AccessPoints,
|
|
77
|
+
apiFormat: harnessSpec.model.apiFormat,
|
|
78
|
+
// Full spec + dir drive the AWS::BedrockAgentCore::Harness CFN resource.
|
|
79
|
+
spec: harnessSpec,
|
|
80
|
+
harnessDir,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return harnessConfigs;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The parsed connector-config file of every non-S3 knowledge-base data source, keyed by the
|
|
87
|
+
* `connectorConfigFile` value. AgentCoreKnowledgeBase emits the parsed object verbatim.
|
|
88
|
+
*/
|
|
89
|
+
function resolveConnectorParametersByFile(spec, projectRoot) {
|
|
90
|
+
const connectorParametersByFile = {};
|
|
91
|
+
for (const kb of spec.knowledgeBases ?? []) {
|
|
92
|
+
for (const ds of kb.dataSources) {
|
|
93
|
+
if (ds.type === 'S3')
|
|
94
|
+
continue;
|
|
95
|
+
const abs = (0, path_1.resolve)(projectRoot, ds.connectorConfigFile);
|
|
96
|
+
try {
|
|
97
|
+
connectorParametersByFile[ds.connectorConfigFile] = JSON.parse((0, fs_1.readFileSync)(abs, 'utf-8'));
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
throw new Error(`Could not read connector config '${ds.connectorConfigFile}' for knowledge base '${kb.name}' at ${abs}: ${err instanceof Error ? err.message : String(err)}`, { cause: err });
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return connectorParametersByFile;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../../src/cdk/project/transform.ts"],"names":[],"mappings":";;AA6CA,wDAwBC;AArED,mDAA+D;AAC/D,6CAAyD;AAEzD,yCAA6E;AAC7E,yGAAuG;AAGvG,2BAAkC;AAClC,+BAAqC;AACrC,+BAA6B;AAqB7B;;;;;;;;;;;;;;GAcG;AACH,SAAgB,sBAAsB,CACpC,aAAsB,EACtB,OAAsC;IAEtC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAErD,MAAM,MAAM,GAAG,mCAA0B,CAAC,SAAS,CAAC,aAAa,CAAC,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