@aws/agentcore-cdk 0.1.0-alpha.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/LICENSE +175 -0
- package/README.md +95 -0
- package/dist/cdk/constants.d.ts +3 -0
- package/dist/cdk/constants.d.ts.map +1 -0
- package/dist/cdk/constants.js +9 -0
- package/dist/cdk/constants.js.map +1 -0
- package/dist/cdk/constructs/bundling/index.d.ts +9 -0
- package/dist/cdk/constructs/bundling/index.d.ts.map +1 -0
- package/dist/cdk/constructs/bundling/index.js +15 -0
- package/dist/cdk/constructs/bundling/index.js.map +1 -0
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.d.ts +71 -0
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.d.ts.map +1 -0
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.js +71 -0
- package/dist/cdk/constructs/bundling/zip/BundledCodeZipAsset.js.map +1 -0
- package/dist/cdk/constructs/bundling/zip/PythonBundledCodeZipAsset.d.ts +15 -0
- package/dist/cdk/constructs/bundling/zip/PythonBundledCodeZipAsset.d.ts.map +1 -0
- package/dist/cdk/constructs/bundling/zip/PythonBundledCodeZipAsset.js +40 -0
- package/dist/cdk/constructs/bundling/zip/PythonBundledCodeZipAsset.js.map +1 -0
- package/dist/cdk/constructs/bundling/zip/index.d.ts +3 -0
- package/dist/cdk/constructs/bundling/zip/index.d.ts.map +1 -0
- package/dist/cdk/constructs/bundling/zip/index.js +8 -0
- package/dist/cdk/constructs/bundling/zip/index.js.map +1 -0
- package/dist/cdk/constructs/components/base-props.d.ts +8 -0
- package/dist/cdk/constructs/components/base-props.d.ts.map +1 -0
- package/dist/cdk/constructs/components/base-props.js +3 -0
- package/dist/cdk/constructs/components/base-props.js.map +1 -0
- package/dist/cdk/constructs/components/index.d.ts +4 -0
- package/dist/cdk/constructs/components/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/index.js +19 -0
- package/dist/cdk/constructs/components/index.js.map +1 -0
- package/dist/cdk/constructs/components/mcp/McpGateway.d.ts +37 -0
- package/dist/cdk/constructs/components/mcp/McpGateway.d.ts.map +1 -0
- package/dist/cdk/constructs/components/mcp/McpGateway.js +154 -0
- package/dist/cdk/constructs/components/mcp/McpGateway.js.map +1 -0
- package/dist/cdk/constructs/components/mcp/McpLambdaCompute.d.ts +33 -0
- package/dist/cdk/constructs/components/mcp/McpLambdaCompute.d.ts.map +1 -0
- package/dist/cdk/constructs/components/mcp/McpLambdaCompute.js +85 -0
- package/dist/cdk/constructs/components/mcp/McpLambdaCompute.js.map +1 -0
- package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.d.ts +36 -0
- package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.d.ts.map +1 -0
- package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.js +73 -0
- package/dist/cdk/constructs/components/mcp/McpRuntimeCompute.js.map +1 -0
- package/dist/cdk/constructs/components/mcp/index.d.ts +5 -0
- package/dist/cdk/constructs/components/mcp/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/mcp/index.js +17 -0
- package/dist/cdk/constructs/components/mcp/index.js.map +1 -0
- package/dist/cdk/constructs/components/mcp/mcp-utils.d.ts +25 -0
- package/dist/cdk/constructs/components/mcp/mcp-utils.d.ts.map +1 -0
- package/dist/cdk/constructs/components/mcp/mcp-utils.js +43 -0
- package/dist/cdk/constructs/components/mcp/mcp-utils.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/index.d.ts +3 -0
- package/dist/cdk/constructs/components/primitives/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/index.js +9 -0
- package/dist/cdk/constructs/components/primitives/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts +64 -0
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js +191 -0
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/memory/index.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/memory/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/memory/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/memory/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts +52 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js +179 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntimeRole.d.ts +24 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntimeRole.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntimeRole.js +39 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntimeRole.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/runtime/index.d.ts +3 -0
- package/dist/cdk/constructs/components/primitives/runtime/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/runtime/index.js +8 -0
- package/dist/cdk/constructs/components/primitives/runtime/index.js.map +1 -0
- package/dist/cdk/constructs/index.d.ts +4 -0
- package/dist/cdk/constructs/index.d.ts.map +1 -0
- package/dist/cdk/constructs/index.js +18 -0
- package/dist/cdk/constructs/index.js.map +1 -0
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts +44 -0
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/AgentCoreApplication.js +121 -0
- package/dist/cdk/constructs/l3/AgentCoreApplication.js.map +1 -0
- package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts +76 -0
- package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/AgentCoreMcp.js +203 -0
- package/dist/cdk/constructs/l3/AgentCoreMcp.js.map +1 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts +34 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.js +66 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.js.map +1 -0
- package/dist/cdk/constructs/l3/index.d.ts +4 -0
- package/dist/cdk/constructs/l3/index.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/index.js +10 -0
- package/dist/cdk/constructs/l3/index.js.map +1 -0
- package/dist/cdk/index.d.ts +4 -0
- package/dist/cdk/index.d.ts.map +1 -0
- package/dist/cdk/index.js +21 -0
- package/dist/cdk/index.js.map +1 -0
- package/dist/cdk/logical-ids.d.ts +36 -0
- package/dist/cdk/logical-ids.d.ts.map +1 -0
- package/dist/cdk/logical-ids.js +88 -0
- package/dist/cdk/logical-ids.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/constants.d.ts +24 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +48 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/errors/config.d.ts +49 -0
- package/dist/lib/errors/config.d.ts.map +1 -0
- package/dist/lib/errors/config.js +167 -0
- package/dist/lib/errors/config.js.map +1 -0
- package/dist/lib/errors/index.d.ts +2 -0
- package/dist/lib/errors/index.d.ts.map +1 -0
- package/dist/lib/errors/index.js +18 -0
- package/dist/lib/errors/index.js.map +1 -0
- package/dist/lib/index.d.ts +7 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +37 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/packaging/errors.d.ts +16 -0
- package/dist/lib/packaging/errors.d.ts.map +1 -0
- package/dist/lib/packaging/errors.js +36 -0
- package/dist/lib/packaging/errors.js.map +1 -0
- package/dist/lib/packaging/helpers.d.ts +56 -0
- package/dist/lib/packaging/helpers.d.ts.map +1 -0
- package/dist/lib/packaging/helpers.js +428 -0
- package/dist/lib/packaging/helpers.js.map +1 -0
- package/dist/lib/packaging/index.d.ts +24 -0
- package/dist/lib/packaging/index.d.ts.map +1 -0
- package/dist/lib/packaging/index.js +55 -0
- package/dist/lib/packaging/index.js.map +1 -0
- package/dist/lib/packaging/python.d.ts +10 -0
- package/dist/lib/packaging/python.d.ts.map +1 -0
- package/dist/lib/packaging/python.js +94 -0
- package/dist/lib/packaging/python.js.map +1 -0
- package/dist/lib/packaging/types/index.d.ts +2 -0
- package/dist/lib/packaging/types/index.d.ts.map +1 -0
- package/dist/lib/packaging/types/index.js +3 -0
- package/dist/lib/packaging/types/index.js.map +1 -0
- package/dist/lib/packaging/types/packaging.d.ts +36 -0
- package/dist/lib/packaging/types/packaging.d.ts.map +1 -0
- package/dist/lib/packaging/types/packaging.js +3 -0
- package/dist/lib/packaging/types/packaging.js.map +1 -0
- package/dist/lib/packaging/uv.d.ts +7 -0
- package/dist/lib/packaging/uv.d.ts.map +1 -0
- package/dist/lib/packaging/uv.js +40 -0
- package/dist/lib/packaging/uv.js.map +1 -0
- package/dist/lib/schemas/io/config-io.d.ts +99 -0
- package/dist/lib/schemas/io/config-io.d.ts.map +1 -0
- package/dist/lib/schemas/io/config-io.js +283 -0
- package/dist/lib/schemas/io/config-io.js.map +1 -0
- package/dist/lib/schemas/io/index.d.ts +3 -0
- package/dist/lib/schemas/io/index.d.ts.map +1 -0
- package/dist/lib/schemas/io/index.js +17 -0
- package/dist/lib/schemas/io/index.js.map +1 -0
- package/dist/lib/schemas/io/path-resolver.d.ts +112 -0
- package/dist/lib/schemas/io/path-resolver.d.ts.map +1 -0
- package/dist/lib/schemas/io/path-resolver.js +195 -0
- package/dist/lib/schemas/io/path-resolver.js.map +1 -0
- package/dist/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +15 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/platform.d.ts +2 -0
- package/dist/lib/utils/platform.d.ts.map +1 -0
- package/dist/lib/utils/platform.js +5 -0
- package/dist/lib/utils/platform.js.map +1 -0
- package/dist/lib/utils/subprocess.d.ts +29 -0
- package/dist/lib/utils/subprocess.d.ts.map +1 -0
- package/dist/lib/utils/subprocess.js +94 -0
- package/dist/lib/utils/subprocess.js.map +1 -0
- package/dist/lib/utils/zod.d.ts +14 -0
- package/dist/lib/utils/zod.d.ts.map +1 -0
- package/dist/lib/utils/zod.js +32 -0
- package/dist/lib/utils/zod.js.map +1 -0
- package/dist/schema/constants.d.ts +83 -0
- package/dist/schema/constants.d.ts.map +1 -0
- package/dist/schema/constants.js +125 -0
- package/dist/schema/constants.js.map +1 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +21 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/schemas/agent-env.d.ts +75 -0
- package/dist/schema/schemas/agent-env.d.ts.map +1 -0
- package/dist/schema/schemas/agent-env.js +84 -0
- package/dist/schema/schemas/agent-env.js.map +1 -0
- package/dist/schema/schemas/agentcore-project.d.ts +90 -0
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -0
- package/dist/schema/schemas/agentcore-project.js +82 -0
- package/dist/schema/schemas/agentcore-project.js.map +1 -0
- package/dist/schema/schemas/aws-targets.d.ts +50 -0
- package/dist/schema/schemas/aws-targets.d.ts.map +1 -0
- package/dist/schema/schemas/aws-targets.js +49 -0
- package/dist/schema/schemas/aws-targets.js.map +1 -0
- package/dist/schema/schemas/deployed-state.d.ts +251 -0
- package/dist/schema/schemas/deployed-state.d.ts.map +1 -0
- package/dist/schema/schemas/deployed-state.js +98 -0
- package/dist/schema/schemas/deployed-state.js.map +1 -0
- package/dist/schema/schemas/index.d.ts +8 -0
- package/dist/schema/schemas/index.d.ts.map +1 -0
- package/dist/schema/schemas/index.js +25 -0
- package/dist/schema/schemas/index.js.map +1 -0
- package/dist/schema/schemas/mcp-defs.d.ts +52 -0
- package/dist/schema/schemas/mcp-defs.d.ts.map +1 -0
- package/dist/schema/schemas/mcp-defs.js +50 -0
- package/dist/schema/schemas/mcp-defs.js.map +1 -0
- package/dist/schema/schemas/mcp.d.ts +660 -0
- package/dist/schema/schemas/mcp.d.ts.map +1 -0
- package/dist/schema/schemas/mcp.js +284 -0
- package/dist/schema/schemas/mcp.js.map +1 -0
- package/dist/schema/schemas/primitives/index.d.ts +3 -0
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/index.js +8 -0
- package/dist/schema/schemas/primitives/index.js.map +1 -0
- package/dist/schema/schemas/primitives/memory.d.ts +40 -0
- package/dist/schema/schemas/primitives/memory.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/memory.js +42 -0
- package/dist/schema/schemas/primitives/memory.js.map +1 -0
- package/dist/schema/schemas/zod-util.d.ts +10 -0
- package/dist/schema/schemas/zod-util.d.ts.map +1 -0
- package/dist/schema/schemas/zod-util.js +23 -0
- package/dist/schema/schemas/zod-util.js.map +1 -0
- package/dist/schema/types/index.d.ts +2 -0
- package/dist/schema/types/index.d.ts.map +1 -0
- package/dist/schema/types/index.js +18 -0
- package/dist/schema/types/index.js.map +1 -0
- package/dist/schema/types/path.d.ts +27 -0
- package/dist/schema/types/path.d.ts.map +1 -0
- package/dist/schema/types/path.js +13 -0
- package/dist/schema/types/path.js.map +1 -0
- package/package.json +97 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @aws/agentcore-cdk
|
|
2
|
+
|
|
3
|
+
L3 CDK constructs for Amazon Bedrock AgentCore. Deploy agent infrastructure with strongly-typed, declarative
|
|
4
|
+
specifications.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install @aws/agentcore-cdk
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
**Note:** `aws-cdk-lib` and `constructs` are peer dependencies. If you don't already have them:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @aws/agentcore-cdk aws-cdk-lib constructs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { AgentCoreApplication, AgentCoreMcp } from '@aws/agentcore-cdk';
|
|
22
|
+
import type { AgentCoreProjectSpec } from '@aws/agentcore-cdk';
|
|
23
|
+
import { Stack } from 'aws-cdk-lib';
|
|
24
|
+
|
|
25
|
+
const spec: AgentCoreProjectSpec = {
|
|
26
|
+
name: 'my-project',
|
|
27
|
+
agents: [
|
|
28
|
+
{
|
|
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
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
class MyStack extends Stack {
|
|
43
|
+
constructor(scope: Construct, id: string) {
|
|
44
|
+
super(scope, id);
|
|
45
|
+
new AgentCoreApplication(this, 'App', { spec });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Constructs
|
|
51
|
+
|
|
52
|
+
### AgentCoreApplication
|
|
53
|
+
|
|
54
|
+
Main L3 construct for deploying agent environments.
|
|
55
|
+
|
|
56
|
+
### AgentCoreMcp
|
|
57
|
+
|
|
58
|
+
L3 construct for MCP gateways and tools.
|
|
59
|
+
|
|
60
|
+
### AgentEnvironment
|
|
61
|
+
|
|
62
|
+
Individual agent environment construct.
|
|
63
|
+
|
|
64
|
+
## Standalone Usage
|
|
65
|
+
|
|
66
|
+
These constructs can be used independently without the CLI:
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { AgentCoreApplication, ConfigIO } from '@aws/agentcore-cdk';
|
|
70
|
+
|
|
71
|
+
// Option 1: Pass spec directly
|
|
72
|
+
new AgentCoreApplication(this, 'App', {
|
|
73
|
+
spec: {
|
|
74
|
+
name: 'my-project',
|
|
75
|
+
agents: [{ name: 'my-agent', targetLanguage: 'Python', ... }]
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
// Option 2: Read from disk (using built-in ConfigIO)
|
|
80
|
+
const configIO = new ConfigIO({ baseDir: './agentcore' });
|
|
81
|
+
const spec = await configIO.readProjectSpec();
|
|
82
|
+
new AgentCoreApplication(this, 'App', { spec });
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Related Package
|
|
86
|
+
|
|
87
|
+
- `@aws/agentcore` - CLI tool that uses these constructs via templated CDK projects
|
|
88
|
+
|
|
89
|
+
## Security
|
|
90
|
+
|
|
91
|
+
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
This project is licensed under the Apache-2.0 License.
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Service Principals
|
|
4
|
+
// ============================================================================
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LAMBDA_SERVICE_PRINCIPAL = exports.AGENTCORE_SERVICE_PRINCIPAL = void 0;
|
|
7
|
+
exports.AGENTCORE_SERVICE_PRINCIPAL = 'bedrock-agentcore.amazonaws.com';
|
|
8
|
+
exports.LAMBDA_SERVICE_PRINCIPAL = 'lambda.amazonaws.com';
|
|
9
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundling constructs for packaging code artifacts.
|
|
3
|
+
*
|
|
4
|
+
* Organization:
|
|
5
|
+
* - zip/ - Code zip assets for CodeZip runtime
|
|
6
|
+
*/
|
|
7
|
+
export { BundledCodeZipAsset, type BundledCodeZipAssetProps, type PackageResult } from './zip';
|
|
8
|
+
export { PythonBundledCodeZipAsset } from './zip';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cdk/constructs/bundling/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,KAAK,aAAa,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Bundling constructs for packaging code artifacts.
|
|
4
|
+
*
|
|
5
|
+
* Organization:
|
|
6
|
+
* - zip/ - Code zip assets for CodeZip runtime
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PythonBundledCodeZipAsset = exports.BundledCodeZipAsset = void 0;
|
|
10
|
+
// Zip/CodeZip bundling
|
|
11
|
+
var zip_1 = require("./zip");
|
|
12
|
+
Object.defineProperty(exports, "BundledCodeZipAsset", { enumerable: true, get: function () { return zip_1.BundledCodeZipAsset; } });
|
|
13
|
+
var zip_2 = require("./zip");
|
|
14
|
+
Object.defineProperty(exports, "PythonBundledCodeZipAsset", { enumerable: true, get: function () { return zip_2.PythonBundledCodeZipAsset; } });
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/constructs/bundling/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uBAAuB;AACvB,6BAA+F;AAAtF,0GAAA,mBAAmB,OAAA;AAC5B,6BAAkD;AAAzC,gHAAA,yBAAyB,OAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { AgentEnvSpec } from '../../../../schema';
|
|
2
|
+
import { Asset } from 'aws-cdk-lib/aws-s3-assets';
|
|
3
|
+
import { Construct } from 'constructs';
|
|
4
|
+
/**
|
|
5
|
+
* Props for bundled code zip assets.
|
|
6
|
+
*/
|
|
7
|
+
export interface BundledCodeZipAssetProps {
|
|
8
|
+
/**
|
|
9
|
+
* The agent configuration containing code bundling details.
|
|
10
|
+
*/
|
|
11
|
+
readonly config: AgentEnvSpec;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Result of packaging code into a zip.
|
|
15
|
+
*/
|
|
16
|
+
export interface PackageResult {
|
|
17
|
+
/** Absolute path to the created zip file */
|
|
18
|
+
artifactPath: string;
|
|
19
|
+
/** Size of the zip in bytes */
|
|
20
|
+
sizeBytes: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Abstract base class for CDK constructs that package code into a zip and upload to the bootstrap bucket.
|
|
24
|
+
*
|
|
25
|
+
* IMPORTANT: This does NOT use CDK's bundling feature. CDK bundling always re-zips
|
|
26
|
+
* the output directory, which would create a ZIP-of-a-ZIP and break runtime contracts.
|
|
27
|
+
*
|
|
28
|
+
* Instead, subclasses:
|
|
29
|
+
* 1. Implement packageCode() to create the final ZIP artifact
|
|
30
|
+
* 2. The base class creates an Asset pointing directly at the ZIP (no bundling)
|
|
31
|
+
* 3. CDK uploads the ZIP as-is to the bootstrap bucket
|
|
32
|
+
*
|
|
33
|
+
* Subclasses implement language-specific packaging by overriding:
|
|
34
|
+
* - `packageCode()`: Creates the zip artifact and returns its path
|
|
35
|
+
*/
|
|
36
|
+
export declare abstract class BundledCodeZipAsset extends Construct {
|
|
37
|
+
/**
|
|
38
|
+
* The underlying CDK Asset containing the zip.
|
|
39
|
+
*/
|
|
40
|
+
readonly asset: Asset;
|
|
41
|
+
/**
|
|
42
|
+
* The agent configuration used for this asset.
|
|
43
|
+
*/
|
|
44
|
+
protected readonly config: AgentEnvSpec;
|
|
45
|
+
/**
|
|
46
|
+
* The resolved absolute path to the code location.
|
|
47
|
+
*/
|
|
48
|
+
protected readonly resolvedCodeLocation: string;
|
|
49
|
+
/**
|
|
50
|
+
* The resolved path to the agentcore config directory.
|
|
51
|
+
* Used as artifactDir for packaging to ensure build artifacts go to the right place.
|
|
52
|
+
*/
|
|
53
|
+
protected readonly configRoot: string;
|
|
54
|
+
constructor(scope: Construct, id: string, props: BundledCodeZipAssetProps);
|
|
55
|
+
/**
|
|
56
|
+
* S3 bucket name where the asset is uploaded (CDK bootstrap bucket).
|
|
57
|
+
*/
|
|
58
|
+
get s3BucketName(): string;
|
|
59
|
+
/**
|
|
60
|
+
* S3 object key for the uploaded zip asset.
|
|
61
|
+
*/
|
|
62
|
+
get s3ObjectKey(): string;
|
|
63
|
+
/**
|
|
64
|
+
* Package the code into a zip file.
|
|
65
|
+
* Subclasses implement language-specific packaging logic.
|
|
66
|
+
*
|
|
67
|
+
* @returns The path to the created zip file and its size
|
|
68
|
+
*/
|
|
69
|
+
protected abstract packageCode(): PackageResult;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=BundledCodeZipAsset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BundledCodeZipAsset.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/BundledCodeZipAsset.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;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,8BAAsB,mBAAoB,SAAQ,SAAS;IACzD;;OAEG;IACH,SAAgB,KAAK,EAAE,KAAK,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAExC;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IAEhD;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;gBAE1B,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB;IAuBzE;;OAEG;IACH,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,WAAW,IAAI,aAAa;CAChD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BundledCodeZipAsset = void 0;
|
|
4
|
+
const lib_1 = require("../../../../lib");
|
|
5
|
+
const aws_s3_assets_1 = require("aws-cdk-lib/aws-s3-assets");
|
|
6
|
+
const constructs_1 = require("constructs");
|
|
7
|
+
/**
|
|
8
|
+
* Abstract base class for CDK constructs that package code into a zip and upload to the bootstrap bucket.
|
|
9
|
+
*
|
|
10
|
+
* IMPORTANT: This does NOT use CDK's bundling feature. CDK bundling always re-zips
|
|
11
|
+
* the output directory, which would create a ZIP-of-a-ZIP and break runtime contracts.
|
|
12
|
+
*
|
|
13
|
+
* Instead, subclasses:
|
|
14
|
+
* 1. Implement packageCode() to create the final ZIP artifact
|
|
15
|
+
* 2. The base class creates an Asset pointing directly at the ZIP (no bundling)
|
|
16
|
+
* 3. CDK uploads the ZIP as-is to the bootstrap bucket
|
|
17
|
+
*
|
|
18
|
+
* Subclasses implement language-specific packaging by overriding:
|
|
19
|
+
* - `packageCode()`: Creates the zip artifact and returns its path
|
|
20
|
+
*/
|
|
21
|
+
class BundledCodeZipAsset extends constructs_1.Construct {
|
|
22
|
+
/**
|
|
23
|
+
* The underlying CDK Asset containing the zip.
|
|
24
|
+
*/
|
|
25
|
+
asset;
|
|
26
|
+
/**
|
|
27
|
+
* The agent configuration used for this asset.
|
|
28
|
+
*/
|
|
29
|
+
config;
|
|
30
|
+
/**
|
|
31
|
+
* The resolved absolute path to the code location.
|
|
32
|
+
*/
|
|
33
|
+
resolvedCodeLocation;
|
|
34
|
+
/**
|
|
35
|
+
* The resolved path to the agentcore config directory.
|
|
36
|
+
* Used as artifactDir for packaging to ensure build artifacts go to the right place.
|
|
37
|
+
*/
|
|
38
|
+
configRoot;
|
|
39
|
+
constructor(scope, id, props) {
|
|
40
|
+
super(scope, id);
|
|
41
|
+
this.config = props.config;
|
|
42
|
+
// Resolve CodeLocation relative to repository root
|
|
43
|
+
const configRoot = (0, lib_1.findConfigRoot)();
|
|
44
|
+
if (!configRoot) {
|
|
45
|
+
throw new Error('Could not find .agentcore directory. Ensure you are running from within an AgentCore project.');
|
|
46
|
+
}
|
|
47
|
+
this.configRoot = configRoot;
|
|
48
|
+
this.resolvedCodeLocation = (0, lib_1.resolveCodeLocation)(this.config.codeLocation, configRoot);
|
|
49
|
+
// Package the code into a zip file (language-specific)
|
|
50
|
+
const result = this.packageCode();
|
|
51
|
+
// Create Asset pointing directly at the zip file - NO bundling
|
|
52
|
+
// CDK will upload this zip as-is to the bootstrap bucket
|
|
53
|
+
this.asset = new aws_s3_assets_1.Asset(this, 'ZipAsset', {
|
|
54
|
+
path: result.artifactPath,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* S3 bucket name where the asset is uploaded (CDK bootstrap bucket).
|
|
59
|
+
*/
|
|
60
|
+
get s3BucketName() {
|
|
61
|
+
return this.asset.s3BucketName;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* S3 object key for the uploaded zip asset.
|
|
65
|
+
*/
|
|
66
|
+
get s3ObjectKey() {
|
|
67
|
+
return this.asset.s3ObjectKey;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.BundledCodeZipAsset = BundledCodeZipAsset;
|
|
71
|
+
//# sourceMappingURL=BundledCodeZipAsset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BundledCodeZipAsset.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/BundledCodeZipAsset.ts"],"names":[],"mappings":";;;AAAA,yCAAsE;AAEtE,6DAAkD;AAClD,2CAAuC;AAsBvC;;;;;;;;;;;;;GAaG;AACH,MAAsB,mBAAoB,SAAQ,sBAAS;IACzD;;OAEG;IACa,KAAK,CAAQ;IAE7B;;OAEG;IACgB,MAAM,CAAe;IAExC;;OAEG;IACgB,oBAAoB,CAAS;IAEhD;;;OAGG;IACgB,UAAU,CAAS;IAEtC,YAAY,KAAgB,EAAE,EAAU,EAAE,KAA+B;QACvE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAEjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAE3B,mDAAmD;QACnD,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,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,oBAAoB,GAAG,IAAA,yBAAmB,EAAC,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAEtF,uDAAuD;QACvD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAElC,+DAA+D;QAC/D,yDAAyD;QACzD,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAK,CAAC,IAAI,EAAE,UAAU,EAAE;YACvC,IAAI,EAAE,MAAM,CAAC,YAAY;SAC1B,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC;IACjC,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC;IAChC,CAAC;CASF;AAlED,kDAkEC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BundledCodeZipAsset, type BundledCodeZipAssetProps, type PackageResult } from './BundledCodeZipAsset';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
/**
|
|
4
|
+
* CDK construct that packages Python code into a zip and uploads to the bootstrap bucket.
|
|
5
|
+
*
|
|
6
|
+
* Uses the lib packager which handles:
|
|
7
|
+
* - Installing dependencies via uv
|
|
8
|
+
* - Cross-platform compilation for ARM64 Lambda/AgentCore runtime
|
|
9
|
+
* - Creating the final zip artifact
|
|
10
|
+
*/
|
|
11
|
+
export declare class PythonBundledCodeZipAsset extends BundledCodeZipAsset {
|
|
12
|
+
constructor(scope: Construct, id: string, props: BundledCodeZipAssetProps);
|
|
13
|
+
protected packageCode(): PackageResult;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=PythonBundledCodeZipAsset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PythonBundledCodeZipAsset.d.ts","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/PythonBundledCodeZipAsset.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;;;;;;;GAOG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB;gBACpD,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,wBAAwB;IAIzE,SAAS,CAAC,WAAW,IAAI,aAAa;CAmBvC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PythonBundledCodeZipAsset = 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
|
+
/**
|
|
10
|
+
* CDK construct that packages Python code into a zip and uploads to the bootstrap bucket.
|
|
11
|
+
*
|
|
12
|
+
* Uses the lib packager which handles:
|
|
13
|
+
* - Installing dependencies via uv
|
|
14
|
+
* - Cross-platform compilation for ARM64 Lambda/AgentCore runtime
|
|
15
|
+
* - Creating the final zip artifact
|
|
16
|
+
*/
|
|
17
|
+
class PythonBundledCodeZipAsset extends BundledCodeZipAsset_1.BundledCodeZipAsset {
|
|
18
|
+
constructor(scope, id, props) {
|
|
19
|
+
super(scope, id, props);
|
|
20
|
+
}
|
|
21
|
+
packageCode() {
|
|
22
|
+
// Build staging goes to agentcore/.cache/
|
|
23
|
+
const cacheDir = (0, path_1.join)(this.configRoot, '.cache');
|
|
24
|
+
// Final zip goes to OS temp - CDK Asset will stage it to cdk.out/
|
|
25
|
+
const outputPath = (0, path_1.join)((0, os_1.tmpdir)(), `${this.config.name}-${(0, crypto_1.randomUUID)()}.zip`);
|
|
26
|
+
const result = (0, lib_1.packCodeZipSync)(this.config, {
|
|
27
|
+
projectRoot: this.resolvedCodeLocation,
|
|
28
|
+
srcDir: '.',
|
|
29
|
+
artifactDir: cacheDir,
|
|
30
|
+
outputPath,
|
|
31
|
+
agentName: this.config.name,
|
|
32
|
+
});
|
|
33
|
+
return {
|
|
34
|
+
artifactPath: result.artifactPath,
|
|
35
|
+
sizeBytes: result.sizeBytes,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.PythonBundledCodeZipAsset = PythonBundledCodeZipAsset;
|
|
40
|
+
//# sourceMappingURL=PythonBundledCodeZipAsset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PythonBundledCodeZipAsset.js","sourceRoot":"","sources":["../../../../../src/cdk/constructs/bundling/zip/PythonBundledCodeZipAsset.ts"],"names":[],"mappings":";;;AAAA,yCAAkD;AAClD,+DAA+G;AAE/G,mCAAoC;AACpC,2BAA4B;AAC5B,+BAA4B;AAE5B;;;;;;;GAOG;AACH,MAAa,yBAA0B,SAAQ,yCAAmB;IAChE,YAAY,KAAgB,EAAE,EAAU,EAAE,KAA+B;QACvE,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IAC1B,CAAC;IAES,WAAW;QACnB,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACjD,kEAAkE;QAClE,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;AAxBD,8DAwBC"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PythonBundledCodeZipAsset = exports.BundledCodeZipAsset = void 0;
|
|
4
|
+
var BundledCodeZipAsset_1 = require("./BundledCodeZipAsset");
|
|
5
|
+
Object.defineProperty(exports, "BundledCodeZipAsset", { enumerable: true, get: function () { return BundledCodeZipAsset_1.BundledCodeZipAsset; } });
|
|
6
|
+
var PythonBundledCodeZipAsset_1 = require("./PythonBundledCodeZipAsset");
|
|
7
|
+
Object.defineProperty(exports, "PythonBundledCodeZipAsset", { enumerable: true, get: function () { return PythonBundledCodeZipAsset_1.PythonBundledCodeZipAsset; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-props.js","sourceRoot":"","sources":["../../../../src/cdk/constructs/components/base-props.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cdk/constructs/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./mcp"), exports);
|
|
18
|
+
__exportStar(require("./primitives"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cdk/constructs/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,wCAAsB;AACtB,+CAA6B"}
|