@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
|
@@ -0,0 +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,EAE1B,KAAK,uBAAuB,EAC5B,eAAe,EACf,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LAMBDA_SERVICE_PRINCIPAL = exports.AGENTCORE_SERVICE_PRINCIPAL = exports.exportName = exports.outputId = exports.toPascalId = exports.AgentCoreRuntimeRole = exports.AgentCoreRuntime = exports.AgentCoreMemory = exports.AgentEnvironment = exports.AgentCoreApplication = void 0;
|
|
4
|
+
// Constructs (L3 and Component)
|
|
5
|
+
var constructs_1 = require("./constructs");
|
|
6
|
+
// L3 Constructs
|
|
7
|
+
Object.defineProperty(exports, "AgentCoreApplication", { enumerable: true, get: function () { return constructs_1.AgentCoreApplication; } });
|
|
8
|
+
Object.defineProperty(exports, "AgentEnvironment", { enumerable: true, get: function () { return constructs_1.AgentEnvironment; } });
|
|
9
|
+
Object.defineProperty(exports, "AgentCoreMemory", { enumerable: true, get: function () { return constructs_1.AgentCoreMemory; } });
|
|
10
|
+
Object.defineProperty(exports, "AgentCoreRuntime", { enumerable: true, get: function () { return constructs_1.AgentCoreRuntime; } });
|
|
11
|
+
Object.defineProperty(exports, "AgentCoreRuntimeRole", { enumerable: true, get: function () { return constructs_1.AgentCoreRuntimeRole; } });
|
|
12
|
+
// CDK IDs
|
|
13
|
+
var logical_ids_1 = require("./logical-ids");
|
|
14
|
+
Object.defineProperty(exports, "toPascalId", { enumerable: true, get: function () { return logical_ids_1.toPascalId; } });
|
|
15
|
+
Object.defineProperty(exports, "outputId", { enumerable: true, get: function () { return logical_ids_1.outputId; } });
|
|
16
|
+
Object.defineProperty(exports, "exportName", { enumerable: true, get: function () { return logical_ids_1.exportName; } });
|
|
17
|
+
// Constants
|
|
18
|
+
var constants_1 = require("./constants");
|
|
19
|
+
Object.defineProperty(exports, "AGENTCORE_SERVICE_PRINCIPAL", { enumerable: true, get: function () { return constants_1.AGENTCORE_SERVICE_PRINCIPAL; } });
|
|
20
|
+
Object.defineProperty(exports, "LAMBDA_SERVICE_PRINCIPAL", { enumerable: true, get: function () { return constants_1.LAMBDA_SERVICE_PRINCIPAL; } });
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cdk/index.ts"],"names":[],"mappings":";;;AAAA,gCAAgC;AAChC,2CAcsB;AAbpB,gBAAgB;AAChB,kHAAA,oBAAoB,OAAA;AAEpB,8GAAA,gBAAgB,OAAA;AAIhB,6GAAA,eAAe,OAAA;AAEf,8GAAA,gBAAgB,OAAA;AAEhB,kHAAA,oBAAoB,OAAA;AAItB,UAAU;AACV,6CAAiE;AAAxD,yGAAA,UAAU,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAAE,yGAAA,UAAU,OAAA;AAEzC,YAAY;AACZ,yCAAoF;AAA3E,wHAAA,2BAA2B,OAAA;AAAE,qHAAA,wBAAwB,OAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts dynamic names to valid CloudFormation logical IDs in PascalCase.
|
|
3
|
+
*
|
|
4
|
+
* Use this when building construct IDs that include dynamic names from user
|
|
5
|
+
* configuration (e.g., agent names like "my-agent" → "MyAgent").
|
|
6
|
+
*
|
|
7
|
+
* For static construct IDs, prefer simple string literals instead:
|
|
8
|
+
* new AgentCoreRuntime(this, 'Runtime', ...) // Good - simple literal
|
|
9
|
+
* new AgentCoreRuntime(this, toPascalId('Runtime'), ...) // Unnecessary
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // Convert user-provided agent name to valid construct ID
|
|
13
|
+
* new AgentEnvironment(this, toPascalId('Agent', spec.name), {...})
|
|
14
|
+
* // "my-agent" -> "AgentMyAgent"
|
|
15
|
+
*/
|
|
16
|
+
export declare function toPascalId(...parts: string[]): string;
|
|
17
|
+
/**
|
|
18
|
+
* Builds a CloudFormation logical ID for CfnOutput resources.
|
|
19
|
+
* Appends 'Output' suffix to distinguish outputs from other resources.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* new CfnOutput(this, outputId('RuntimeId'), { value: ... })
|
|
23
|
+
* // -> "RuntimeIdOutput"
|
|
24
|
+
*/
|
|
25
|
+
export declare function outputId(...parts: string[]): string;
|
|
26
|
+
/**
|
|
27
|
+
* Builds a CloudFormation export name from parts.
|
|
28
|
+
* Export names allow: alphanumerics, colons, hyphens (max 255 chars).
|
|
29
|
+
* Underscores are converted to hyphens; other invalid chars are removed.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* exportName(stackName, agentName, 'RuntimeId')
|
|
33
|
+
* // -> "MyStack-MyAgent-RuntimeId"
|
|
34
|
+
*/
|
|
35
|
+
export declare function exportName(...parts: string[]): string;
|
|
36
|
+
//# sourceMappingURL=logical-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logical-ids.d.ts","sourceRoot":"","sources":["../../src/cdk/logical-ids.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,UAAU,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAQrD;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAEnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAQrD"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toPascalId = toPascalId;
|
|
4
|
+
exports.outputId = outputId;
|
|
5
|
+
exports.exportName = exportName;
|
|
6
|
+
/**
|
|
7
|
+
* Utilities for generating stable CloudFormation logical IDs and export names.
|
|
8
|
+
*
|
|
9
|
+
* Logical IDs must remain stable across deployments to ensure CloudFormation
|
|
10
|
+
* correctly identifies resources for updates rather than replacements.
|
|
11
|
+
*
|
|
12
|
+
* CDK automatically generates logical IDs from construct paths. These utilities
|
|
13
|
+
* are only needed when:
|
|
14
|
+
* 1. Converting dynamic names (e.g., "my-agent") to valid PascalCase IDs
|
|
15
|
+
* 2. Building CfnOutput logical IDs with the "Output" suffix
|
|
16
|
+
* 3. Building CloudFormation export names
|
|
17
|
+
*
|
|
18
|
+
* For most construct IDs, use simple string literals (e.g., "Runtime", "Role").
|
|
19
|
+
* CDK's construct tree provides scoping automatically.
|
|
20
|
+
*/
|
|
21
|
+
const LOGICAL_ID_PATTERN = /^[a-zA-Z][a-zA-Z0-9]*$/;
|
|
22
|
+
const MAX_LOGICAL_ID_LENGTH = 255;
|
|
23
|
+
function assertLogicalId(id) {
|
|
24
|
+
if (id.length === 0 || id.length > MAX_LOGICAL_ID_LENGTH || !LOGICAL_ID_PATTERN.test(id)) {
|
|
25
|
+
throw new Error(`Invalid CloudFormation logical ID: "${id}". Must start with a letter, contain only alphanumerics, and be <= ${MAX_LOGICAL_ID_LENGTH} characters.`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Converts a name to a valid logical ID part by converting to PascalCase.
|
|
30
|
+
* Examples: "my-gateway" -> "MyGateway", "my_tool" -> "MyTool"
|
|
31
|
+
*/
|
|
32
|
+
function toLogicalIdPart(name) {
|
|
33
|
+
return name
|
|
34
|
+
.split(/[-_]/)
|
|
35
|
+
.map(part => part.charAt(0).toUpperCase() + part.slice(1))
|
|
36
|
+
.join('');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Converts dynamic names to valid CloudFormation logical IDs in PascalCase.
|
|
40
|
+
*
|
|
41
|
+
* Use this when building construct IDs that include dynamic names from user
|
|
42
|
+
* configuration (e.g., agent names like "my-agent" → "MyAgent").
|
|
43
|
+
*
|
|
44
|
+
* For static construct IDs, prefer simple string literals instead:
|
|
45
|
+
* new AgentCoreRuntime(this, 'Runtime', ...) // Good - simple literal
|
|
46
|
+
* new AgentCoreRuntime(this, toPascalId('Runtime'), ...) // Unnecessary
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* // Convert user-provided agent name to valid construct ID
|
|
50
|
+
* new AgentEnvironment(this, toPascalId('Agent', spec.name), {...})
|
|
51
|
+
* // "my-agent" -> "AgentMyAgent"
|
|
52
|
+
*/
|
|
53
|
+
function toPascalId(...parts) {
|
|
54
|
+
if (parts.length === 0) {
|
|
55
|
+
throw new Error('toPascalId requires at least one part');
|
|
56
|
+
}
|
|
57
|
+
const id = parts.map(toLogicalIdPart).join('');
|
|
58
|
+
assertLogicalId(id);
|
|
59
|
+
return id;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Builds a CloudFormation logical ID for CfnOutput resources.
|
|
63
|
+
* Appends 'Output' suffix to distinguish outputs from other resources.
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* new CfnOutput(this, outputId('RuntimeId'), { value: ... })
|
|
67
|
+
* // -> "RuntimeIdOutput"
|
|
68
|
+
*/
|
|
69
|
+
function outputId(...parts) {
|
|
70
|
+
return toPascalId(...parts, 'Output');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Builds a CloudFormation export name from parts.
|
|
74
|
+
* Export names allow: alphanumerics, colons, hyphens (max 255 chars).
|
|
75
|
+
* Underscores are converted to hyphens; other invalid chars are removed.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* exportName(stackName, agentName, 'RuntimeId')
|
|
79
|
+
* // -> "MyStack-MyAgent-RuntimeId"
|
|
80
|
+
*/
|
|
81
|
+
function exportName(...parts) {
|
|
82
|
+
const name = parts.map(part => part.replace(/_/g, '-').replace(/[^a-zA-Z0-9:-]/g, '')).join('-');
|
|
83
|
+
if (name.length === 0 || name.length > 255) {
|
|
84
|
+
throw new Error(`Invalid CloudFormation export name: "${name}". Must be 1-255 characters.`);
|
|
85
|
+
}
|
|
86
|
+
return name;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=logical-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logical-ids.js","sourceRoot":"","sources":["../../src/cdk/logical-ids.ts"],"names":[],"mappings":";;AAoDA,gCAQC;AAUD,4BAEC;AAWD,gCAQC;AA3FD;;;;;;;;;;;;;;GAcG;AACH,MAAM,kBAAkB,GAAG,wBAAwB,CAAC;AACpD,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,SAAS,eAAe,CAAC,EAAU;IACjC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,qBAAqB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CACb,uCAAuC,EAAE,sEAAsE,qBAAqB,cAAc,CACnJ,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,IAAI;SACR,KAAK,CAAC,MAAM,CAAC;SACb,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACzD,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,UAAU,CAAC,GAAG,KAAe;IAC3C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/C,eAAe,CAAC,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,QAAQ,CAAC,GAAG,KAAe;IACzC,OAAO,UAAU,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,UAAU,CAAC,GAAG,KAAe;IAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEjG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,wCAAwC,IAAI,8BAA8B,CAAC,CAAC;IAC9F,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main entry point for the @aws/agentcore-cdk package.
|
|
3
|
+
* Exports L3 CDK constructs, schema types, and config I/O utilities.
|
|
4
|
+
*/
|
|
5
|
+
export { AgentCoreApplication, type AgentCoreApplicationProps, AgentEnvironment, type AgentEnvironmentProps, type AgentCoreComponentProps, AgentCoreMemory, type AgentCoreMemoryProps, AgentCoreRuntime, type AgentCoreRuntimeProps, AgentCoreRuntimeRole, type AgentCoreRuntimeRoleProps, } from './cdk';
|
|
6
|
+
export { toPascalId, outputId, exportName } from './cdk/logical-ids';
|
|
7
|
+
export { AGENTCORE_SERVICE_PRINCIPAL, LAMBDA_SERVICE_PRINCIPAL } from './cdk/constants';
|
|
8
|
+
export { ConfigIO, createConfigIO } from './lib/schemas/io';
|
|
9
|
+
export { findConfigRoot, requireConfigRoot, PathResolver, findProjectRoot, setSessionProjectRoot, getSessionProjectRoot, getWorkingDirectory, NoProjectError, type PathConfig, } from './lib/schemas/io/path-resolver';
|
|
10
|
+
export * from './schema';
|
|
11
|
+
export { CONFIG_DIR, CONFIG_FILES, APP_DIR, CLI_SYSTEM_DIR, CLI_LOGS_DIR } from './lib/constants';
|
|
12
|
+
export { packCodeZipSync, resolveCodeLocation } from './lib/packaging';
|
|
13
|
+
export type { ArtifactResult, PackageOptions } from './lib/packaging';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,gBAAgB,EAChB,KAAK,qBAAqB,EAE1B,KAAK,uBAAuB,EAC5B,eAAe,EACf,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAGxF,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,cAAc,EACd,KAAK,UAAU,GAChB,MAAM,gCAAgC,CAAC;AAGxC,cAAc,UAAU,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGlG,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Main entry point for the @aws/agentcore-cdk package.
|
|
4
|
+
* Exports L3 CDK constructs, schema types, and config I/O utilities.
|
|
5
|
+
*/
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
18
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.resolveCodeLocation = exports.packCodeZipSync = exports.CLI_LOGS_DIR = exports.CLI_SYSTEM_DIR = exports.APP_DIR = exports.CONFIG_FILES = exports.CONFIG_DIR = exports.NoProjectError = exports.getWorkingDirectory = exports.getSessionProjectRoot = exports.setSessionProjectRoot = exports.findProjectRoot = exports.PathResolver = exports.requireConfigRoot = exports.findConfigRoot = exports.createConfigIO = exports.ConfigIO = exports.LAMBDA_SERVICE_PRINCIPAL = exports.AGENTCORE_SERVICE_PRINCIPAL = exports.exportName = exports.outputId = exports.toPascalId = exports.AgentCoreRuntimeRole = exports.AgentCoreRuntime = exports.AgentCoreMemory = exports.AgentEnvironment = exports.AgentCoreApplication = void 0;
|
|
22
|
+
// L3 Constructs
|
|
23
|
+
var cdk_1 = require("./cdk");
|
|
24
|
+
// L3 Constructs
|
|
25
|
+
Object.defineProperty(exports, "AgentCoreApplication", { enumerable: true, get: function () { return cdk_1.AgentCoreApplication; } });
|
|
26
|
+
Object.defineProperty(exports, "AgentEnvironment", { enumerable: true, get: function () { return cdk_1.AgentEnvironment; } });
|
|
27
|
+
Object.defineProperty(exports, "AgentCoreMemory", { enumerable: true, get: function () { return cdk_1.AgentCoreMemory; } });
|
|
28
|
+
Object.defineProperty(exports, "AgentCoreRuntime", { enumerable: true, get: function () { return cdk_1.AgentCoreRuntime; } });
|
|
29
|
+
Object.defineProperty(exports, "AgentCoreRuntimeRole", { enumerable: true, get: function () { return cdk_1.AgentCoreRuntimeRole; } });
|
|
30
|
+
// CDK Utilities
|
|
31
|
+
var logical_ids_1 = require("./cdk/logical-ids");
|
|
32
|
+
Object.defineProperty(exports, "toPascalId", { enumerable: true, get: function () { return logical_ids_1.toPascalId; } });
|
|
33
|
+
Object.defineProperty(exports, "outputId", { enumerable: true, get: function () { return logical_ids_1.outputId; } });
|
|
34
|
+
Object.defineProperty(exports, "exportName", { enumerable: true, get: function () { return logical_ids_1.exportName; } });
|
|
35
|
+
var constants_1 = require("./cdk/constants");
|
|
36
|
+
Object.defineProperty(exports, "AGENTCORE_SERVICE_PRINCIPAL", { enumerable: true, get: function () { return constants_1.AGENTCORE_SERVICE_PRINCIPAL; } });
|
|
37
|
+
Object.defineProperty(exports, "LAMBDA_SERVICE_PRINCIPAL", { enumerable: true, get: function () { return constants_1.LAMBDA_SERVICE_PRINCIPAL; } });
|
|
38
|
+
// Config I/O (for reading schema files - makes package self-contained)
|
|
39
|
+
var io_1 = require("./lib/schemas/io");
|
|
40
|
+
Object.defineProperty(exports, "ConfigIO", { enumerable: true, get: function () { return io_1.ConfigIO; } });
|
|
41
|
+
Object.defineProperty(exports, "createConfigIO", { enumerable: true, get: function () { return io_1.createConfigIO; } });
|
|
42
|
+
var path_resolver_1 = require("./lib/schemas/io/path-resolver");
|
|
43
|
+
Object.defineProperty(exports, "findConfigRoot", { enumerable: true, get: function () { return path_resolver_1.findConfigRoot; } });
|
|
44
|
+
Object.defineProperty(exports, "requireConfigRoot", { enumerable: true, get: function () { return path_resolver_1.requireConfigRoot; } });
|
|
45
|
+
Object.defineProperty(exports, "PathResolver", { enumerable: true, get: function () { return path_resolver_1.PathResolver; } });
|
|
46
|
+
Object.defineProperty(exports, "findProjectRoot", { enumerable: true, get: function () { return path_resolver_1.findProjectRoot; } });
|
|
47
|
+
Object.defineProperty(exports, "setSessionProjectRoot", { enumerable: true, get: function () { return path_resolver_1.setSessionProjectRoot; } });
|
|
48
|
+
Object.defineProperty(exports, "getSessionProjectRoot", { enumerable: true, get: function () { return path_resolver_1.getSessionProjectRoot; } });
|
|
49
|
+
Object.defineProperty(exports, "getWorkingDirectory", { enumerable: true, get: function () { return path_resolver_1.getWorkingDirectory; } });
|
|
50
|
+
Object.defineProperty(exports, "NoProjectError", { enumerable: true, get: function () { return path_resolver_1.NoProjectError; } });
|
|
51
|
+
// All schema types
|
|
52
|
+
__exportStar(require("./schema"), exports);
|
|
53
|
+
// Constants
|
|
54
|
+
var constants_2 = require("./lib/constants");
|
|
55
|
+
Object.defineProperty(exports, "CONFIG_DIR", { enumerable: true, get: function () { return constants_2.CONFIG_DIR; } });
|
|
56
|
+
Object.defineProperty(exports, "CONFIG_FILES", { enumerable: true, get: function () { return constants_2.CONFIG_FILES; } });
|
|
57
|
+
Object.defineProperty(exports, "APP_DIR", { enumerable: true, get: function () { return constants_2.APP_DIR; } });
|
|
58
|
+
Object.defineProperty(exports, "CLI_SYSTEM_DIR", { enumerable: true, get: function () { return constants_2.CLI_SYSTEM_DIR; } });
|
|
59
|
+
Object.defineProperty(exports, "CLI_LOGS_DIR", { enumerable: true, get: function () { return constants_2.CLI_LOGS_DIR; } });
|
|
60
|
+
// Packaging (for CDK bundling)
|
|
61
|
+
var packaging_1 = require("./lib/packaging");
|
|
62
|
+
Object.defineProperty(exports, "packCodeZipSync", { enumerable: true, get: function () { return packaging_1.packCodeZipSync; } });
|
|
63
|
+
Object.defineProperty(exports, "resolveCodeLocation", { enumerable: true, get: function () { return packaging_1.resolveCodeLocation; } });
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAEH,gBAAgB;AAChB,6BAce;AAbb,gBAAgB;AAChB,2GAAA,oBAAoB,OAAA;AAEpB,uGAAA,gBAAgB,OAAA;AAIhB,sGAAA,eAAe,OAAA;AAEf,uGAAA,gBAAgB,OAAA;AAEhB,2GAAA,oBAAoB,OAAA;AAItB,gBAAgB;AAChB,iDAAqE;AAA5D,yGAAA,UAAU,OAAA;AAAE,uGAAA,QAAQ,OAAA;AAAE,yGAAA,UAAU,OAAA;AACzC,6CAAwF;AAA/E,wHAAA,2BAA2B,OAAA;AAAE,qHAAA,wBAAwB,OAAA;AAE9D,uEAAuE;AACvE,uCAA4D;AAAnD,8FAAA,QAAQ,OAAA;AAAE,oGAAA,cAAc,OAAA;AACjC,gEAUwC;AATtC,+GAAA,cAAc,OAAA;AACd,kHAAA,iBAAiB,OAAA;AACjB,6GAAA,YAAY,OAAA;AACZ,gHAAA,eAAe,OAAA;AACf,sHAAA,qBAAqB,OAAA;AACrB,sHAAA,qBAAqB,OAAA;AACrB,oHAAA,mBAAmB,OAAA;AACnB,+GAAA,cAAc,OAAA;AAIhB,mBAAmB;AACnB,2CAAyB;AAEzB,YAAY;AACZ,6CAAkG;AAAzF,uGAAA,UAAU,OAAA;AAAE,yGAAA,YAAY,OAAA;AAAE,oGAAA,OAAO,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,yGAAA,YAAY,OAAA;AAExE,+BAA+B;AAC/B,6CAAuE;AAA9D,4GAAA,eAAe,OAAA;AAAE,gHAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from '../schema';
|
|
2
|
+
export declare const CONFIG_DIR = "agentcore";
|
|
3
|
+
export declare const APP_DIR = "app";
|
|
4
|
+
export declare const MCP_APP_SUBDIR = "mcp";
|
|
5
|
+
export declare const CLI_SYSTEM_DIR = ".cli";
|
|
6
|
+
export declare const CLI_LOGS_DIR = "logs";
|
|
7
|
+
export declare const CONFIG_FILES: {
|
|
8
|
+
readonly AGENT_ENV: "agentcore.json";
|
|
9
|
+
readonly AWS_TARGETS: "aws-targets.json";
|
|
10
|
+
readonly DEPLOYED_STATE: "deployed-state.json";
|
|
11
|
+
readonly MCP: "mcp.json";
|
|
12
|
+
readonly MCP_DEFS: "mcp-defs.json";
|
|
13
|
+
};
|
|
14
|
+
/** Environment file for secrets (API keys, etc.) - local only, not committed */
|
|
15
|
+
export declare const ENV_FILE = ".env.local";
|
|
16
|
+
/**
|
|
17
|
+
* Get the artifact zip name for a bundle
|
|
18
|
+
* @param name Name for the artifact (agent or tool name)
|
|
19
|
+
* @returns <name>.zip
|
|
20
|
+
*/
|
|
21
|
+
export declare function getArtifactZipName(name: string): string;
|
|
22
|
+
export declare const UV_INSTALL_HINT = "Install uv from https://github.com/astral-sh/uv#installation and ensure it is on your PATH.";
|
|
23
|
+
export declare const DEFAULT_PYTHON_PLATFORM = "aarch64-manylinux2014";
|
|
24
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAG1B,eAAO,MAAM,UAAU,cAAc,CAAC;AAGtC,eAAO,MAAM,OAAO,QAAQ,CAAC;AAC7B,eAAO,MAAM,cAAc,QAAQ,CAAC;AAGpC,eAAO,MAAM,cAAc,SAAS,CAAC;AACrC,eAAO,MAAM,YAAY,SAAS,CAAC;AAEnC,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAEX,gFAAgF;AAChF,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,eAAO,MAAM,eAAe,gGACmE,CAAC;AAChG,eAAO,MAAM,uBAAuB,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
exports.DEFAULT_PYTHON_PLATFORM = exports.UV_INSTALL_HINT = exports.ENV_FILE = exports.CONFIG_FILES = exports.CLI_LOGS_DIR = exports.CLI_SYSTEM_DIR = exports.MCP_APP_SUBDIR = exports.APP_DIR = exports.CONFIG_DIR = void 0;
|
|
18
|
+
exports.getArtifactZipName = getArtifactZipName;
|
|
19
|
+
// Re-export all schema constants from schema
|
|
20
|
+
__exportStar(require("../schema"), exports);
|
|
21
|
+
// Configuration directory and file names
|
|
22
|
+
exports.CONFIG_DIR = 'agentcore';
|
|
23
|
+
// Application code directory (for generated agents and MCP tools)
|
|
24
|
+
exports.APP_DIR = 'app';
|
|
25
|
+
exports.MCP_APP_SUBDIR = 'mcp';
|
|
26
|
+
// CLI system subdirectory (inside CONFIG_DIR)
|
|
27
|
+
exports.CLI_SYSTEM_DIR = '.cli';
|
|
28
|
+
exports.CLI_LOGS_DIR = 'logs';
|
|
29
|
+
exports.CONFIG_FILES = {
|
|
30
|
+
AGENT_ENV: 'agentcore.json',
|
|
31
|
+
AWS_TARGETS: 'aws-targets.json',
|
|
32
|
+
DEPLOYED_STATE: 'deployed-state.json',
|
|
33
|
+
MCP: 'mcp.json',
|
|
34
|
+
MCP_DEFS: 'mcp-defs.json',
|
|
35
|
+
};
|
|
36
|
+
/** Environment file for secrets (API keys, etc.) - local only, not committed */
|
|
37
|
+
exports.ENV_FILE = '.env.local';
|
|
38
|
+
/**
|
|
39
|
+
* Get the artifact zip name for a bundle
|
|
40
|
+
* @param name Name for the artifact (agent or tool name)
|
|
41
|
+
* @returns <name>.zip
|
|
42
|
+
*/
|
|
43
|
+
function getArtifactZipName(name) {
|
|
44
|
+
return `${name}.zip`;
|
|
45
|
+
}
|
|
46
|
+
exports.UV_INSTALL_HINT = 'Install uv from https://github.com/astral-sh/uv#installation and ensure it is on your PATH.';
|
|
47
|
+
exports.DEFAULT_PYTHON_PLATFORM = 'aarch64-manylinux2014';
|
|
48
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA8BA,gDAEC;AAhCD,6CAA6C;AAC7C,4CAA0B;AAE1B,yCAAyC;AAC5B,QAAA,UAAU,GAAG,WAAW,CAAC;AAEtC,kEAAkE;AACrD,QAAA,OAAO,GAAG,KAAK,CAAC;AAChB,QAAA,cAAc,GAAG,KAAK,CAAC;AAEpC,8CAA8C;AACjC,QAAA,cAAc,GAAG,MAAM,CAAC;AACxB,QAAA,YAAY,GAAG,MAAM,CAAC;AAEtB,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,gBAAgB;IAC3B,WAAW,EAAE,kBAAkB;IAC/B,cAAc,EAAE,qBAAqB;IACrC,GAAG,EAAE,UAAU;IACf,QAAQ,EAAE,eAAe;CACjB,CAAC;AAEX,gFAAgF;AACnE,QAAA,QAAQ,GAAG,YAAY,CAAC;AAErC;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,OAAO,GAAG,IAAI,MAAM,CAAC;AACvB,CAAC;AAEY,QAAA,eAAe,GAC1B,6FAA6F,CAAC;AACnF,QAAA,uBAAuB,GAAG,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ZodError } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Base class for all config-related errors
|
|
4
|
+
*/
|
|
5
|
+
export declare abstract class ConfigError extends Error {
|
|
6
|
+
protected constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Thrown when a config file doesn't exist
|
|
10
|
+
*/
|
|
11
|
+
export declare class ConfigNotFoundError extends ConfigError {
|
|
12
|
+
readonly filePath: string;
|
|
13
|
+
readonly fileType: string;
|
|
14
|
+
constructor(filePath: string, fileType: string);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Thrown when a config file can't be read
|
|
18
|
+
*/
|
|
19
|
+
export declare class ConfigReadError extends ConfigError {
|
|
20
|
+
readonly filePath: string;
|
|
21
|
+
readonly cause: unknown;
|
|
22
|
+
constructor(filePath: string, cause: unknown);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Thrown when a config file can't be written
|
|
26
|
+
*/
|
|
27
|
+
export declare class ConfigWriteError extends ConfigError {
|
|
28
|
+
readonly filePath: string;
|
|
29
|
+
readonly cause: unknown;
|
|
30
|
+
constructor(filePath: string, cause: unknown);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Thrown when config validation fails
|
|
34
|
+
*/
|
|
35
|
+
export declare class ConfigValidationError extends ConfigError {
|
|
36
|
+
readonly filePath: string;
|
|
37
|
+
readonly fileType: string;
|
|
38
|
+
readonly zodError: ZodError;
|
|
39
|
+
constructor(filePath: string, fileType: string, zodError: ZodError);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Thrown when JSON parsing fails
|
|
43
|
+
*/
|
|
44
|
+
export declare class ConfigParseError extends ConfigError {
|
|
45
|
+
readonly filePath: string;
|
|
46
|
+
readonly cause: unknown;
|
|
47
|
+
constructor(filePath: string, cause: unknown);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/lib/errors/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAE/B;;GAEG;AACH,8BAAsB,WAAY,SAAQ,KAAK;IAC7C,SAAS,aAAa,OAAO,EAAE,MAAM;CAKtC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;aAEhC,QAAQ,EAAE,MAAM;aAChB,QAAQ,EAAE,MAAM;gBADhB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM;CAInC;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,WAAW;aAE5B,QAAQ,EAAE,MAAM;aACP,KAAK,EAAE,OAAO;gBADvB,QAAQ,EAAE,MAAM,EACP,KAAK,EAAE,OAAO;CAK1C;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;aAE7B,QAAQ,EAAE,MAAM;aACP,KAAK,EAAE,OAAO;gBADvB,QAAQ,EAAE,MAAM,EACP,KAAK,EAAE,OAAO;CAK1C;AA2GD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;aAElC,QAAQ,EAAE,MAAM;aAChB,QAAQ,EAAE,MAAM;aAChB,QAAQ,EAAE,QAAQ;gBAFlB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ;CAKrC;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;aAE7B,QAAQ,EAAE,MAAM;aACP,KAAK,EAAE,OAAO;gBADvB,QAAQ,EAAE,MAAM,EACP,KAAK,EAAE,OAAO;CAK1C"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConfigParseError = exports.ConfigValidationError = exports.ConfigWriteError = exports.ConfigReadError = exports.ConfigNotFoundError = exports.ConfigError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Base class for all config-related errors
|
|
6
|
+
*/
|
|
7
|
+
class ConfigError extends Error {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = this.constructor.name;
|
|
11
|
+
Error.captureStackTrace(this, this.constructor);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ConfigError = ConfigError;
|
|
15
|
+
/**
|
|
16
|
+
* Thrown when a config file doesn't exist
|
|
17
|
+
*/
|
|
18
|
+
class ConfigNotFoundError extends ConfigError {
|
|
19
|
+
filePath;
|
|
20
|
+
fileType;
|
|
21
|
+
constructor(filePath, fileType) {
|
|
22
|
+
super(`${fileType} config file not found at: ${filePath}`);
|
|
23
|
+
this.filePath = filePath;
|
|
24
|
+
this.fileType = fileType;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ConfigNotFoundError = ConfigNotFoundError;
|
|
28
|
+
/**
|
|
29
|
+
* Thrown when a config file can't be read
|
|
30
|
+
*/
|
|
31
|
+
class ConfigReadError extends ConfigError {
|
|
32
|
+
filePath;
|
|
33
|
+
cause;
|
|
34
|
+
constructor(filePath, cause) {
|
|
35
|
+
const message = cause instanceof Error ? cause.message : String(cause);
|
|
36
|
+
super(`Failed to read config file at ${filePath}: ${message}`);
|
|
37
|
+
this.filePath = filePath;
|
|
38
|
+
this.cause = cause;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ConfigReadError = ConfigReadError;
|
|
42
|
+
/**
|
|
43
|
+
* Thrown when a config file can't be written
|
|
44
|
+
*/
|
|
45
|
+
class ConfigWriteError extends ConfigError {
|
|
46
|
+
filePath;
|
|
47
|
+
cause;
|
|
48
|
+
constructor(filePath, cause) {
|
|
49
|
+
const message = cause instanceof Error ? cause.message : String(cause);
|
|
50
|
+
super(`Failed to write config file at ${filePath}: ${message}`);
|
|
51
|
+
this.filePath = filePath;
|
|
52
|
+
this.cause = cause;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.ConfigWriteError = ConfigWriteError;
|
|
56
|
+
/**
|
|
57
|
+
* Format a Zod path array to bracket notation: agents[0].name
|
|
58
|
+
*/
|
|
59
|
+
function formatPath(path) {
|
|
60
|
+
if (path.length === 0)
|
|
61
|
+
return 'root';
|
|
62
|
+
return path
|
|
63
|
+
.map((segment, i) => typeof segment === 'number' ? `[${segment}]` : i === 0 ? String(segment) : `.${String(segment)}`)
|
|
64
|
+
.join('');
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Format a single Zod issue into an actionable message.
|
|
68
|
+
* Augments common cases with "got X, expected Y" format.
|
|
69
|
+
* Falls back to Zod's message for unhandled cases.
|
|
70
|
+
*/
|
|
71
|
+
function formatZodIssue(issue) {
|
|
72
|
+
const path = formatPath(issue.path);
|
|
73
|
+
switch (issue.code) {
|
|
74
|
+
case 'invalid_type':
|
|
75
|
+
if (issue.expected !== undefined) {
|
|
76
|
+
if (issue.received !== undefined) {
|
|
77
|
+
return `${path}: got ${JSON.stringify(issue.received)}, expected ${JSON.stringify(issue.expected)}`;
|
|
78
|
+
}
|
|
79
|
+
return `${path}: expected ${JSON.stringify(issue.expected)}`;
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
case 'invalid_enum_value':
|
|
83
|
+
case 'invalid_value': {
|
|
84
|
+
const opts = issue.options ?? issue.values;
|
|
85
|
+
if (Array.isArray(opts)) {
|
|
86
|
+
const expectedStr = opts.map(o => `"${String(o)}"`).join(' | ');
|
|
87
|
+
if (issue.received !== undefined) {
|
|
88
|
+
return `${path}: got ${JSON.stringify(issue.received)}, expected ${expectedStr}`;
|
|
89
|
+
}
|
|
90
|
+
return `${path}: expected ${expectedStr}`;
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
case 'invalid_literal':
|
|
95
|
+
if (issue.received !== undefined && issue.expected !== undefined) {
|
|
96
|
+
return `${path}: got ${JSON.stringify(issue.received)}, expected ${JSON.stringify(issue.expected)}`;
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
case 'unrecognized_keys':
|
|
100
|
+
if (Array.isArray(issue.keys)) {
|
|
101
|
+
return `${path}: unknown keys (remove): ${issue.keys.map(k => `"${k}"`).join(', ')}`;
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case 'invalid_union': {
|
|
105
|
+
// Zod 4 discriminated union: show discriminator field and valid options
|
|
106
|
+
if (issue.discriminator) {
|
|
107
|
+
return `${path}: invalid "${issue.discriminator}" value`;
|
|
108
|
+
}
|
|
109
|
+
// Pick the most actionable error from union failures (one fix, not all branches)
|
|
110
|
+
const unionErrors = issue.unionErrors?.flatMap(e => e.issues) ?? issue.errors ?? [];
|
|
111
|
+
for (const err of unionErrors) {
|
|
112
|
+
if (err.code === 'invalid_enum_value' || err.code === 'invalid_value') {
|
|
113
|
+
return formatZodIssue(err);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
for (const err of unionErrors) {
|
|
117
|
+
if (err.code === 'invalid_type') {
|
|
118
|
+
return formatZodIssue(err);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const firstError = unionErrors[0];
|
|
122
|
+
if (firstError)
|
|
123
|
+
return formatZodIssue(firstError);
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case 'invalid_union_discriminator': {
|
|
127
|
+
const opts = issue.options ?? issue.values;
|
|
128
|
+
if (Array.isArray(opts)) {
|
|
129
|
+
return `${path}: expected ${opts.map(o => `"${String(o)}"`).join(' | ')}`;
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// Fail open: unhandled cases use Zod's message verbatim
|
|
135
|
+
return `${path}: ${issue.message}`;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Thrown when config validation fails
|
|
139
|
+
*/
|
|
140
|
+
class ConfigValidationError extends ConfigError {
|
|
141
|
+
filePath;
|
|
142
|
+
fileType;
|
|
143
|
+
zodError;
|
|
144
|
+
constructor(filePath, fileType, zodError) {
|
|
145
|
+
const formattedErrors = zodError.issues.map(issue => ` - ${formatZodIssue(issue)}`).join('\n');
|
|
146
|
+
super(`${filePath}:\n${formattedErrors}`);
|
|
147
|
+
this.filePath = filePath;
|
|
148
|
+
this.fileType = fileType;
|
|
149
|
+
this.zodError = zodError;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
exports.ConfigValidationError = ConfigValidationError;
|
|
153
|
+
/**
|
|
154
|
+
* Thrown when JSON parsing fails
|
|
155
|
+
*/
|
|
156
|
+
class ConfigParseError extends ConfigError {
|
|
157
|
+
filePath;
|
|
158
|
+
cause;
|
|
159
|
+
constructor(filePath, cause) {
|
|
160
|
+
const message = cause instanceof Error ? cause.message : String(cause);
|
|
161
|
+
super(`Failed to parse JSON in config file at ${filePath}: ${message}`);
|
|
162
|
+
this.filePath = filePath;
|
|
163
|
+
this.cause = cause;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
exports.ConfigParseError = ConfigParseError;
|
|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C;IACA;IACA;IAHlB,YACkB,QAAgB,EAChB,QAAgB,EAChB,QAAkB;QAElC,MAAM,eAAe,GAAI,QAAQ,CAAC,MAAwB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnH,KAAK,CAAC,GAAG,QAAQ,MAAM,eAAe,EAAE,CAAC,CAAC;QAL1B,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAU;IAIpC,CAAC;CACF;AATD,sDASC;AAED;;GAEG;AACH,MAAa,gBAAiB,SAAQ,WAAW;IAE7B;IACS;IAF3B,YACkB,QAAgB,EACP,KAAc;QAEvC,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,KAAK,CAAC,0CAA0C,QAAQ,KAAK,OAAO,EAAE,CAAC,CAAC;QAJxD,aAAQ,GAAR,QAAQ,CAAQ;QACP,UAAK,GAAL,KAAK,CAAS;IAIzC,CAAC;CACF;AARD,4CAQC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./config"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/errors/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CONFIG_DIR, APP_DIR, MCP_APP_SUBDIR, CLI_SYSTEM_DIR, CLI_LOGS_DIR, CONFIG_FILES, ENV_FILE, getArtifactZipName, UV_INSTALL_HINT, DEFAULT_PYTHON_PLATFORM, } from './constants';
|
|
2
|
+
export * from '../schema';
|
|
3
|
+
export * from './errors';
|
|
4
|
+
export * from './packaging';
|
|
5
|
+
export * from './utils';
|
|
6
|
+
export * from './schemas/io';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,OAAO,EACP,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,uBAAuB,GACxB,MAAM,aAAa,CAAC;AAGrB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC"}
|