@aws/agentcore 0.3.0-preview.1.0
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 +147 -0
- package/dist/assets/README.md +79 -0
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +2862 -0
- package/dist/assets/__tests__/assets.snapshot.test.ts +139 -0
- package/dist/assets/agents/AGENTS.md +102 -0
- package/dist/assets/cdk/.prettierrc +8 -0
- package/dist/assets/cdk/README.md +14 -0
- package/dist/assets/cdk/bin/cdk.ts +50 -0
- package/dist/assets/cdk/cdk.json +88 -0
- package/dist/assets/cdk/gitignore.template +9 -0
- package/dist/assets/cdk/jest.config.js +9 -0
- package/dist/assets/cdk/lib/cdk-stack.ts +38 -0
- package/dist/assets/cdk/npmignore.template +6 -0
- package/dist/assets/cdk/package.json +30 -0
- package/dist/assets/cdk/test/cdk.test.ts +16 -0
- package/dist/assets/cdk/tsconfig.json +28 -0
- package/dist/assets/mcp/python/README.md +27 -0
- package/dist/assets/mcp/python/pyproject.toml +22 -0
- package/dist/assets/mcp/python/server.py +117 -0
- package/dist/assets/mcp/python-lambda/README.md +22 -0
- package/dist/assets/mcp/python-lambda/handler.py +144 -0
- package/dist/assets/mcp/python-lambda/pyproject.toml +15 -0
- package/dist/assets/python/autogen/base/README.md +41 -0
- package/dist/assets/python/autogen/base/gitignore.template +40 -0
- package/dist/assets/python/autogen/base/main.py +52 -0
- package/dist/assets/python/autogen/base/mcp_client/client.py +18 -0
- package/dist/assets/python/autogen/base/model/load.py +136 -0
- package/dist/assets/python/autogen/base/pyproject.toml +35 -0
- package/dist/assets/python/crewai/base/README.md +41 -0
- package/dist/assets/python/crewai/base/gitignore.template +40 -0
- package/dist/assets/python/crewai/base/main.py +55 -0
- package/dist/assets/python/crewai/base/model/load.py +133 -0
- package/dist/assets/python/crewai/base/pyproject.toml +32 -0
- package/dist/assets/python/googleadk/base/README.md +39 -0
- package/dist/assets/python/googleadk/base/gitignore.template +40 -0
- package/dist/assets/python/googleadk/base/main.py +84 -0
- package/dist/assets/python/googleadk/base/mcp_client/client.py +15 -0
- package/dist/assets/python/googleadk/base/model/load.py +41 -0
- package/dist/assets/python/googleadk/base/pyproject.toml +21 -0
- package/dist/assets/python/langchain_langgraph/base/README.md +41 -0
- package/dist/assets/python/langchain_langgraph/base/gitignore.template +40 -0
- package/dist/assets/python/langchain_langgraph/base/main.py +51 -0
- package/dist/assets/python/langchain_langgraph/base/mcp_client/client.py +19 -0
- package/dist/assets/python/langchain_langgraph/base/model/load.py +123 -0
- package/dist/assets/python/langchain_langgraph/base/pyproject.toml +37 -0
- package/dist/assets/python/openaiagents/base/README.md +39 -0
- package/dist/assets/python/openaiagents/base/gitignore.template +40 -0
- package/dist/assets/python/openaiagents/base/main.py +56 -0
- package/dist/assets/python/openaiagents/base/mcp_client/client.py +14 -0
- package/dist/assets/python/openaiagents/base/model/load.py +37 -0
- package/dist/assets/python/openaiagents/base/pyproject.toml +20 -0
- package/dist/assets/python/strands/base/README.md +41 -0
- package/dist/assets/python/strands/base/gitignore.template +41 -0
- package/dist/assets/python/strands/base/main.py +76 -0
- package/dist/assets/python/strands/base/mcp_client/client.py +12 -0
- package/dist/assets/python/strands/base/model/load.py +123 -0
- package/dist/assets/python/strands/base/pyproject.toml +23 -0
- package/dist/assets/python/strands/capabilities/memory/session.py +39 -0
- package/dist/assets/typescript/.gitkeep +0 -0
- package/dist/cli/index.mjs +985 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/constants.d.ts +25 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +49 -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 +39 -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 +54 -0
- package/dist/lib/packaging/helpers.d.ts.map +1 -0
- package/dist/lib/packaging/helpers.js +461 -0
- package/dist/lib/packaging/helpers.js.map +1 -0
- package/dist/lib/packaging/index.d.ts +36 -0
- package/dist/lib/packaging/index.d.ts.map +1 -0
- package/dist/lib/packaging/index.js +89 -0
- package/dist/lib/packaging/index.js.map +1 -0
- package/dist/lib/packaging/node.d.ts +17 -0
- package/dist/lib/packaging/node.d.ts.map +1 -0
- package/dist/lib/packaging/node.js +108 -0
- package/dist/lib/packaging/node.js.map +1 -0
- package/dist/lib/packaging/python.d.ts +17 -0
- package/dist/lib/packaging/python.d.ts.map +1 -0
- package/dist/lib/packaging/python.js +162 -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 +57 -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 +106 -0
- package/dist/lib/schemas/io/config-io.d.ts.map +1 -0
- package/dist/lib/schemas/io/config-io.js +293 -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/aws-account.d.ts +7 -0
- package/dist/lib/utils/aws-account.d.ts.map +1 -0
- package/dist/lib/utils/aws-account.js +24 -0
- package/dist/lib/utils/aws-account.js.map +1 -0
- package/dist/lib/utils/credentials.d.ts +86 -0
- package/dist/lib/utils/credentials.d.ts.map +1 -0
- package/dist/lib/utils/credentials.js +153 -0
- package/dist/lib/utils/credentials.js.map +1 -0
- package/dist/lib/utils/env.d.ts +22 -0
- package/dist/lib/utils/env.d.ts.map +1 -0
- package/dist/lib/utils/env.js +65 -0
- package/dist/lib/utils/env.js.map +1 -0
- package/dist/lib/utils/index.d.ts +7 -0
- package/dist/lib/utils/index.d.ts.map +1 -0
- package/dist/lib/utils/index.js +23 -0
- package/dist/lib/utils/index.js.map +1 -0
- package/dist/lib/utils/platform.d.ts +63 -0
- package/dist/lib/utils/platform.d.ts.map +1 -0
- package/dist/lib/utils/platform.js +88 -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 +82 -0
- package/dist/schema/constants.d.ts.map +1 -0
- package/dist/schema/constants.js +117 -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 +88 -0
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -0
- package/dist/schema/schemas/agentcore-project.js +83 -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 +260 -0
- package/dist/schema/schemas/deployed-state.d.ts.map +1 -0
- package/dist/schema/schemas/deployed-state.js +100 -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 +659 -0
- package/dist/schema/schemas/mcp.d.ts.map +1 -0
- package/dist/schema/schemas/mcp.js +283 -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 +9 -0
- package/dist/schema/schemas/primitives/index.js.map +1 -0
- package/dist/schema/schemas/primitives/memory.d.ts +42 -0
- package/dist/schema/schemas/primitives/memory.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/memory.js +50 -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 +111 -0
- package/scripts/bump-version.ts +442 -0
- package/scripts/check-old-cli.mjs +26 -0
- package/scripts/copy-assets.mjs +50 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { DEFAULT_STRATEGY_NAMESPACES, MemoryStrategySchema, MemoryStrategyTypeSchema } from './primitives/memory';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export { DEFAULT_STRATEGY_NAMESPACES, MemoryStrategySchema, MemoryStrategyTypeSchema };
|
|
4
|
+
export type { MemoryStrategy, MemoryStrategyType } from './primitives/memory';
|
|
5
|
+
export declare const ProjectNameSchema: z.ZodString;
|
|
6
|
+
export declare const MemoryTypeSchema: z.ZodLiteral<"AgentCoreMemory">;
|
|
7
|
+
export type MemoryType = z.infer<typeof MemoryTypeSchema>;
|
|
8
|
+
export declare const MemoryNameSchema: z.ZodString;
|
|
9
|
+
export declare const MemorySchema: z.ZodObject<{
|
|
10
|
+
type: z.ZodLiteral<"AgentCoreMemory">;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
eventExpiryDuration: z.ZodNumber;
|
|
13
|
+
strategies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
14
|
+
type: z.ZodEnum<{
|
|
15
|
+
SEMANTIC: "SEMANTIC";
|
|
16
|
+
SUMMARIZATION: "SUMMARIZATION";
|
|
17
|
+
USER_PREFERENCE: "USER_PREFERENCE";
|
|
18
|
+
}>;
|
|
19
|
+
name: z.ZodOptional<z.ZodString>;
|
|
20
|
+
description: z.ZodOptional<z.ZodString>;
|
|
21
|
+
namespaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type Memory = z.infer<typeof MemorySchema>;
|
|
25
|
+
export declare const CredentialTypeSchema: z.ZodLiteral<"ApiKeyCredentialProvider">;
|
|
26
|
+
export type CredentialType = z.infer<typeof CredentialTypeSchema>;
|
|
27
|
+
export declare const CredentialNameSchema: z.ZodString;
|
|
28
|
+
export declare const CredentialSchema: z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"ApiKeyCredentialProvider">;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type Credential = z.infer<typeof CredentialSchema>;
|
|
33
|
+
export declare const AgentCoreProjectSpecSchema: z.ZodObject<{
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
version: z.ZodNumber;
|
|
36
|
+
agents: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"AgentCoreRuntime">;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
build: z.ZodEnum<{
|
|
40
|
+
CodeZip: "CodeZip";
|
|
41
|
+
Container: "Container";
|
|
42
|
+
}>;
|
|
43
|
+
entrypoint: z.ZodType<import("./agent-env").FilePath, unknown, z.core.$ZodTypeInternals<import("./agent-env").FilePath, unknown>>;
|
|
44
|
+
codeLocation: z.ZodType<import("./agent-env").DirectoryPath, unknown, z.core.$ZodTypeInternals<import("./agent-env").DirectoryPath, unknown>>;
|
|
45
|
+
runtimeVersion: z.ZodUnion<readonly [z.ZodEnum<{
|
|
46
|
+
PYTHON_3_10: "PYTHON_3_10";
|
|
47
|
+
PYTHON_3_11: "PYTHON_3_11";
|
|
48
|
+
PYTHON_3_12: "PYTHON_3_12";
|
|
49
|
+
PYTHON_3_13: "PYTHON_3_13";
|
|
50
|
+
}>, z.ZodEnum<{
|
|
51
|
+
NODE_18: "NODE_18";
|
|
52
|
+
NODE_20: "NODE_20";
|
|
53
|
+
NODE_22: "NODE_22";
|
|
54
|
+
}>]>;
|
|
55
|
+
envVars: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
value: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
networkMode: z.ZodOptional<z.ZodEnum<{
|
|
60
|
+
PUBLIC: "PUBLIC";
|
|
61
|
+
PRIVATE: "PRIVATE";
|
|
62
|
+
}>>;
|
|
63
|
+
instrumentation: z.ZodOptional<z.ZodObject<{
|
|
64
|
+
enableOtel: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>>>;
|
|
67
|
+
memories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"AgentCoreMemory">;
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
eventExpiryDuration: z.ZodNumber;
|
|
71
|
+
strategies: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
72
|
+
type: z.ZodEnum<{
|
|
73
|
+
SEMANTIC: "SEMANTIC";
|
|
74
|
+
SUMMARIZATION: "SUMMARIZATION";
|
|
75
|
+
USER_PREFERENCE: "USER_PREFERENCE";
|
|
76
|
+
}>;
|
|
77
|
+
name: z.ZodOptional<z.ZodString>;
|
|
78
|
+
description: z.ZodOptional<z.ZodString>;
|
|
79
|
+
namespaces: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
|
+
}, z.core.$strip>>>;
|
|
81
|
+
}, z.core.$strip>>>;
|
|
82
|
+
credentials: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
83
|
+
type: z.ZodLiteral<"ApiKeyCredentialProvider">;
|
|
84
|
+
name: z.ZodString;
|
|
85
|
+
}, z.core.$strip>>>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export type AgentCoreProjectSpec = z.infer<typeof AgentCoreProjectSpecSchema>;
|
|
88
|
+
//# sourceMappingURL=agentcore-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentcore-project.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/agentcore-project.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAElH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,CAAC;AACvF,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAM9E,eAAO,MAAM,iBAAiB,aAU1B,CAAC;AAML,eAAO,MAAM,gBAAgB,iCAA+B,CAAC;AAC7D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,gBAAgB,aAO1B,CAAC;AAEJ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;iBAevB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAMlD,eAAO,MAAM,oBAAoB,0CAAwC,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,oBAAoB,aAO9B,CAAC;AAEJ,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAM1D,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AgentCoreProjectSpecSchema = exports.CredentialSchema = exports.CredentialNameSchema = exports.CredentialTypeSchema = exports.MemorySchema = exports.MemoryNameSchema = exports.MemoryTypeSchema = exports.ProjectNameSchema = exports.MemoryStrategyTypeSchema = exports.MemoryStrategySchema = exports.DEFAULT_STRATEGY_NAMESPACES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* AgentCore Project Schema - Resource-centric model
|
|
6
|
+
*
|
|
7
|
+
* Flat resource model where agents, memories, and credentials are top-level.
|
|
8
|
+
* All resources within a project implicitly have access to each other.
|
|
9
|
+
*
|
|
10
|
+
* @module agentcore-project
|
|
11
|
+
*/
|
|
12
|
+
const constants_1 = require("../constants");
|
|
13
|
+
const agent_env_1 = require("./agent-env");
|
|
14
|
+
const memory_1 = require("./primitives/memory");
|
|
15
|
+
Object.defineProperty(exports, "DEFAULT_STRATEGY_NAMESPACES", { enumerable: true, get: function () { return memory_1.DEFAULT_STRATEGY_NAMESPACES; } });
|
|
16
|
+
Object.defineProperty(exports, "MemoryStrategySchema", { enumerable: true, get: function () { return memory_1.MemoryStrategySchema; } });
|
|
17
|
+
Object.defineProperty(exports, "MemoryStrategyTypeSchema", { enumerable: true, get: function () { return memory_1.MemoryStrategyTypeSchema; } });
|
|
18
|
+
const zod_util_1 = require("./zod-util");
|
|
19
|
+
const zod_1 = require("zod");
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Project Name Schema
|
|
22
|
+
// ============================================================================
|
|
23
|
+
exports.ProjectNameSchema = zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.min(1, 'Project name is required')
|
|
26
|
+
.max(23, 'Project name must be 23 characters or less')
|
|
27
|
+
.regex(/^[A-Za-z][A-Za-z0-9]{0,22}$/, 'Project name must start with a letter and contain only alphanumeric characters')
|
|
28
|
+
.refine(name => !(0, constants_1.isReservedProjectName)(name), {
|
|
29
|
+
message: 'This name conflicts with a Python package dependency. Please choose a different name.',
|
|
30
|
+
});
|
|
31
|
+
// ============================================================================
|
|
32
|
+
// Memory Schema
|
|
33
|
+
// ============================================================================
|
|
34
|
+
exports.MemoryTypeSchema = zod_1.z.literal('AgentCoreMemory');
|
|
35
|
+
exports.MemoryNameSchema = zod_1.z
|
|
36
|
+
.string()
|
|
37
|
+
.min(1, 'Name is required')
|
|
38
|
+
.max(48)
|
|
39
|
+
.regex(/^[a-zA-Z][a-zA-Z0-9_]{0,47}$/, 'Must begin with a letter and contain only alphanumeric characters and underscores (max 48 chars)');
|
|
40
|
+
exports.MemorySchema = zod_1.z.object({
|
|
41
|
+
type: exports.MemoryTypeSchema,
|
|
42
|
+
name: exports.MemoryNameSchema,
|
|
43
|
+
eventExpiryDuration: zod_1.z.number().int().min(7).max(365),
|
|
44
|
+
// Strategies array can be empty for short-term memory (just base memory with expiration)
|
|
45
|
+
// Long-term memory includes strategies like SEMANTIC, SUMMARIZATION, USER_PREFERENCE
|
|
46
|
+
strategies: zod_1.z
|
|
47
|
+
.array(memory_1.MemoryStrategySchema)
|
|
48
|
+
.default([])
|
|
49
|
+
.superRefine((0, zod_util_1.uniqueBy)(strategy => strategy.type, type => `Duplicate memory strategy type: ${type}`)),
|
|
50
|
+
});
|
|
51
|
+
// ============================================================================
|
|
52
|
+
// Credential Schema
|
|
53
|
+
// ============================================================================
|
|
54
|
+
exports.CredentialTypeSchema = zod_1.z.literal('ApiKeyCredentialProvider');
|
|
55
|
+
exports.CredentialNameSchema = zod_1.z
|
|
56
|
+
.string()
|
|
57
|
+
.min(3, 'Credential name must be at least 3 characters')
|
|
58
|
+
.max(255)
|
|
59
|
+
.regex(/^[A-Za-z0-9_.-]+$/, 'Must contain only alphanumeric characters, underscores, dots, and hyphens (3-255 chars)');
|
|
60
|
+
exports.CredentialSchema = zod_1.z.object({
|
|
61
|
+
type: exports.CredentialTypeSchema,
|
|
62
|
+
name: exports.CredentialNameSchema,
|
|
63
|
+
});
|
|
64
|
+
// ============================================================================
|
|
65
|
+
// Project Schema (Top Level)
|
|
66
|
+
// ============================================================================
|
|
67
|
+
exports.AgentCoreProjectSpecSchema = zod_1.z.object({
|
|
68
|
+
name: exports.ProjectNameSchema,
|
|
69
|
+
version: zod_1.z.number().int(),
|
|
70
|
+
agents: zod_1.z
|
|
71
|
+
.array(agent_env_1.AgentEnvSpecSchema)
|
|
72
|
+
.default([])
|
|
73
|
+
.superRefine((0, zod_util_1.uniqueBy)(agent => agent.name, name => `Duplicate agent name: ${name}`)),
|
|
74
|
+
memories: zod_1.z
|
|
75
|
+
.array(exports.MemorySchema)
|
|
76
|
+
.default([])
|
|
77
|
+
.superRefine((0, zod_util_1.uniqueBy)(memory => memory.name, name => `Duplicate memory name: ${name}`)),
|
|
78
|
+
credentials: zod_1.z
|
|
79
|
+
.array(exports.CredentialSchema)
|
|
80
|
+
.default([])
|
|
81
|
+
.superRefine((0, zod_util_1.uniqueBy)(credential => credential.name, name => `Duplicate credential name: ${name}`)),
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=agentcore-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentcore-project.js","sourceRoot":"","sources":["../../../src/schema/schemas/agentcore-project.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AgentCoreRegionSchema: z.ZodEnum<{
|
|
3
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
4
|
+
"ap-south-1": "ap-south-1";
|
|
5
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
6
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
7
|
+
"eu-central-1": "eu-central-1";
|
|
8
|
+
"eu-west-1": "eu-west-1";
|
|
9
|
+
"us-east-1": "us-east-1";
|
|
10
|
+
"us-east-2": "us-east-2";
|
|
11
|
+
"us-west-2": "us-west-2";
|
|
12
|
+
}>;
|
|
13
|
+
export type AgentCoreRegion = z.infer<typeof AgentCoreRegionSchema>;
|
|
14
|
+
export declare const DeploymentTargetNameSchema: z.ZodString;
|
|
15
|
+
export declare const AwsAccountIdSchema: z.ZodString;
|
|
16
|
+
export declare const AwsDeploymentTargetSchema: z.ZodObject<{
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
description: z.ZodOptional<z.ZodString>;
|
|
19
|
+
account: z.ZodString;
|
|
20
|
+
region: z.ZodEnum<{
|
|
21
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
22
|
+
"ap-south-1": "ap-south-1";
|
|
23
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
24
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
25
|
+
"eu-central-1": "eu-central-1";
|
|
26
|
+
"eu-west-1": "eu-west-1";
|
|
27
|
+
"us-east-1": "us-east-1";
|
|
28
|
+
"us-east-2": "us-east-2";
|
|
29
|
+
"us-west-2": "us-west-2";
|
|
30
|
+
}>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export type AwsDeploymentTarget = z.infer<typeof AwsDeploymentTargetSchema>;
|
|
33
|
+
export declare const AwsDeploymentTargetsSchema: z.ZodArray<z.ZodObject<{
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
description: z.ZodOptional<z.ZodString>;
|
|
36
|
+
account: z.ZodString;
|
|
37
|
+
region: z.ZodEnum<{
|
|
38
|
+
"ap-northeast-1": "ap-northeast-1";
|
|
39
|
+
"ap-south-1": "ap-south-1";
|
|
40
|
+
"ap-southeast-1": "ap-southeast-1";
|
|
41
|
+
"ap-southeast-2": "ap-southeast-2";
|
|
42
|
+
"eu-central-1": "eu-central-1";
|
|
43
|
+
"eu-west-1": "eu-west-1";
|
|
44
|
+
"us-east-1": "us-east-1";
|
|
45
|
+
"us-east-2": "us-east-2";
|
|
46
|
+
"us-west-2": "us-west-2";
|
|
47
|
+
}>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
export type AwsDeploymentTargets = z.infer<typeof AwsDeploymentTargetsSchema>;
|
|
50
|
+
//# sourceMappingURL=aws-targets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-targets.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/aws-targets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,qBAAqB;;;;;;;;;;EAUhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,0BAA0B,aAQmB,CAAC;AAM3D,eAAO,MAAM,kBAAkB,aAGF,CAAC;AAM9B,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;iBAKpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;kBAKtC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AwsDeploymentTargetsSchema = exports.AwsDeploymentTargetSchema = exports.AwsAccountIdSchema = exports.DeploymentTargetNameSchema = exports.AgentCoreRegionSchema = void 0;
|
|
4
|
+
const zod_util_1 = require("./zod-util");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
// ============================================================================
|
|
7
|
+
// AgentCore Regions
|
|
8
|
+
// ============================================================================
|
|
9
|
+
exports.AgentCoreRegionSchema = zod_1.z.enum([
|
|
10
|
+
'ap-northeast-1',
|
|
11
|
+
'ap-south-1',
|
|
12
|
+
'ap-southeast-1',
|
|
13
|
+
'ap-southeast-2',
|
|
14
|
+
'eu-central-1',
|
|
15
|
+
'eu-west-1',
|
|
16
|
+
'us-east-1',
|
|
17
|
+
'us-east-2',
|
|
18
|
+
'us-west-2',
|
|
19
|
+
]);
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Deployment Target Name
|
|
22
|
+
// ============================================================================
|
|
23
|
+
exports.DeploymentTargetNameSchema = zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.min(1)
|
|
26
|
+
.max(64)
|
|
27
|
+
.regex(/^[a-zA-Z][a-zA-Z0-9_-]*$/, 'Name must start with a letter and contain only alphanumeric characters, hyphens, and underscores')
|
|
28
|
+
.describe('Unique identifier for the deployment target');
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// AWS Account ID
|
|
31
|
+
// ============================================================================
|
|
32
|
+
exports.AwsAccountIdSchema = zod_1.z
|
|
33
|
+
.string()
|
|
34
|
+
.regex(/^[0-9]{12}$/, 'AWS account ID must be exactly 12 digits')
|
|
35
|
+
.describe('AWS account ID');
|
|
36
|
+
// ============================================================================
|
|
37
|
+
// AWS Deployment Target
|
|
38
|
+
// ============================================================================
|
|
39
|
+
exports.AwsDeploymentTargetSchema = zod_1.z.object({
|
|
40
|
+
name: exports.DeploymentTargetNameSchema,
|
|
41
|
+
description: zod_1.z.string().max(256).optional(),
|
|
42
|
+
account: exports.AwsAccountIdSchema,
|
|
43
|
+
region: exports.AgentCoreRegionSchema,
|
|
44
|
+
});
|
|
45
|
+
// ============================================================================
|
|
46
|
+
// AWS Deployment Targets Array
|
|
47
|
+
// ============================================================================
|
|
48
|
+
exports.AwsDeploymentTargetsSchema = zod_1.z.array(exports.AwsDeploymentTargetSchema).superRefine((0, zod_util_1.uniqueBy)(target => target.name, name => `Duplicate deployment target name: ${name}`));
|
|
49
|
+
//# sourceMappingURL=aws-targets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aws-targets.js","sourceRoot":"","sources":["../../../src/schema/schemas/aws-targets.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,6BAAwB;AAExB,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAElE,QAAA,qBAAqB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC1C,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;CACZ,CAAC,CAAC;AAGH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC;KACxC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,0BAA0B,EAC1B,kGAAkG,CACnG;KACA,QAAQ,CAAC,6CAA6C,CAAC,CAAC;AAE3D,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAElE,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,EAAE;KACR,KAAK,CAAC,aAAa,EAAE,0CAA0C,CAAC;KAChE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE9B,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAElE,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,kCAA0B;IAChC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,0BAAkB;IAC3B,MAAM,EAAE,6BAAqB;CAC9B,CAAC,CAAC;AAIH,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC,CAAC,KAAK,CAAC,iCAAyB,CAAC,CAAC,WAAW,CACtF,IAAA,mBAAQ,EACN,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EACrB,IAAI,CAAC,EAAE,CAAC,qCAAqC,IAAI,EAAE,CACpD,CACF,CAAC"}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const AgentCoreDeployedStateSchema: z.ZodObject<{
|
|
3
|
+
runtimeId: z.ZodString;
|
|
4
|
+
runtimeArn: z.ZodString;
|
|
5
|
+
roleArn: z.ZodString;
|
|
6
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
memoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
+
browserId: z.ZodOptional<z.ZodString>;
|
|
9
|
+
codeInterpreterId: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type AgentCoreDeployedState = z.infer<typeof AgentCoreDeployedStateSchema>;
|
|
12
|
+
export declare const GatewayDeployedStateSchema: z.ZodObject<{
|
|
13
|
+
gatewayId: z.ZodString;
|
|
14
|
+
gatewayArn: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
export type GatewayDeployedState = z.infer<typeof GatewayDeployedStateSchema>;
|
|
17
|
+
export declare const McpRuntimeDeployedStateSchema: z.ZodObject<{
|
|
18
|
+
runtimeId: z.ZodString;
|
|
19
|
+
runtimeArn: z.ZodString;
|
|
20
|
+
runtimeEndpoint: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export type McpRuntimeDeployedState = z.infer<typeof McpRuntimeDeployedStateSchema>;
|
|
23
|
+
export declare const McpLambdaDeployedStateSchema: z.ZodObject<{
|
|
24
|
+
functionArn: z.ZodString;
|
|
25
|
+
functionName: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export type McpLambdaDeployedState = z.infer<typeof McpLambdaDeployedStateSchema>;
|
|
28
|
+
export declare const McpDeployedStateSchema: z.ZodObject<{
|
|
29
|
+
gateways: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
30
|
+
gatewayId: z.ZodString;
|
|
31
|
+
gatewayArn: z.ZodString;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
runtimes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
34
|
+
runtimeId: z.ZodString;
|
|
35
|
+
runtimeArn: z.ZodString;
|
|
36
|
+
runtimeEndpoint: z.ZodString;
|
|
37
|
+
}, z.core.$strip>>>;
|
|
38
|
+
lambdas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
39
|
+
functionArn: z.ZodString;
|
|
40
|
+
functionName: z.ZodString;
|
|
41
|
+
}, z.core.$strip>>>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
export type McpDeployedState = z.infer<typeof McpDeployedStateSchema>;
|
|
44
|
+
export declare const ExternallyManagedResourceSchema: z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type ExternallyManagedResource = z.infer<typeof ExternallyManagedResourceSchema>;
|
|
48
|
+
export declare const CustomJwtAuthorizerSchema: z.ZodObject<{
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
allowedAudience: z.ZodArray<z.ZodString>;
|
|
51
|
+
allowedClients: z.ZodArray<z.ZodString>;
|
|
52
|
+
discoveryUrl: z.ZodString;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type CustomJwtAuthorizer = z.infer<typeof CustomJwtAuthorizerSchema>;
|
|
55
|
+
export declare const VpcConfigSchema: z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
58
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type VpcConfig = z.infer<typeof VpcConfigSchema>;
|
|
61
|
+
export declare const ExternallyManagedStateSchema: z.ZodObject<{
|
|
62
|
+
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
allowedAudience: z.ZodArray<z.ZodString>;
|
|
65
|
+
allowedClients: z.ZodArray<z.ZodString>;
|
|
66
|
+
discoveryUrl: z.ZodString;
|
|
67
|
+
}, z.core.$strip>>;
|
|
68
|
+
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
name: z.ZodString;
|
|
70
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
71
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export type ExternallyManagedState = z.infer<typeof ExternallyManagedStateSchema>;
|
|
75
|
+
export declare const DeployedResourceStateSchema: z.ZodObject<{
|
|
76
|
+
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
77
|
+
runtimeId: z.ZodString;
|
|
78
|
+
runtimeArn: z.ZodString;
|
|
79
|
+
roleArn: z.ZodString;
|
|
80
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
memoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
|
+
browserId: z.ZodOptional<z.ZodString>;
|
|
83
|
+
codeInterpreterId: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>>>;
|
|
85
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
gateways: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
87
|
+
gatewayId: z.ZodString;
|
|
88
|
+
gatewayArn: z.ZodString;
|
|
89
|
+
}, z.core.$strip>>>;
|
|
90
|
+
runtimes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
91
|
+
runtimeId: z.ZodString;
|
|
92
|
+
runtimeArn: z.ZodString;
|
|
93
|
+
runtimeEndpoint: z.ZodString;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
lambdas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
96
|
+
functionArn: z.ZodString;
|
|
97
|
+
functionName: z.ZodString;
|
|
98
|
+
}, z.core.$strip>>>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
allowedAudience: z.ZodArray<z.ZodString>;
|
|
104
|
+
allowedClients: z.ZodArray<z.ZodString>;
|
|
105
|
+
discoveryUrl: z.ZodString;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
name: z.ZodString;
|
|
109
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
110
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
stackName: z.ZodOptional<z.ZodString>;
|
|
114
|
+
identityKmsKeyArn: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>;
|
|
116
|
+
export type DeployedResourceState = z.infer<typeof DeployedResourceStateSchema>;
|
|
117
|
+
export declare const TargetDeployedStateSchema: z.ZodObject<{
|
|
118
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
119
|
+
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
120
|
+
runtimeId: z.ZodString;
|
|
121
|
+
runtimeArn: z.ZodString;
|
|
122
|
+
roleArn: z.ZodString;
|
|
123
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
124
|
+
memoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
browserId: z.ZodOptional<z.ZodString>;
|
|
126
|
+
codeInterpreterId: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
129
|
+
gateways: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
130
|
+
gatewayId: z.ZodString;
|
|
131
|
+
gatewayArn: z.ZodString;
|
|
132
|
+
}, z.core.$strip>>>;
|
|
133
|
+
runtimes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
134
|
+
runtimeId: z.ZodString;
|
|
135
|
+
runtimeArn: z.ZodString;
|
|
136
|
+
runtimeEndpoint: z.ZodString;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
lambdas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
139
|
+
functionArn: z.ZodString;
|
|
140
|
+
functionName: z.ZodString;
|
|
141
|
+
}, z.core.$strip>>>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
name: z.ZodString;
|
|
146
|
+
allowedAudience: z.ZodArray<z.ZodString>;
|
|
147
|
+
allowedClients: z.ZodArray<z.ZodString>;
|
|
148
|
+
discoveryUrl: z.ZodString;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
151
|
+
name: z.ZodString;
|
|
152
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
153
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
stackName: z.ZodOptional<z.ZodString>;
|
|
157
|
+
identityKmsKeyArn: z.ZodOptional<z.ZodString>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
export type TargetDeployedState = z.infer<typeof TargetDeployedStateSchema>;
|
|
161
|
+
/**
|
|
162
|
+
* Type alias for deployment target name (maps to aws-targets name field).
|
|
163
|
+
*/
|
|
164
|
+
export type DeploymentTargetName = string;
|
|
165
|
+
export declare const DeployedStateSchema: z.ZodObject<{
|
|
166
|
+
targets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
167
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
168
|
+
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
169
|
+
runtimeId: z.ZodString;
|
|
170
|
+
runtimeArn: z.ZodString;
|
|
171
|
+
roleArn: z.ZodString;
|
|
172
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
173
|
+
memoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
|
+
browserId: z.ZodOptional<z.ZodString>;
|
|
175
|
+
codeInterpreterId: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>>>;
|
|
177
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
178
|
+
gateways: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
179
|
+
gatewayId: z.ZodString;
|
|
180
|
+
gatewayArn: z.ZodString;
|
|
181
|
+
}, z.core.$strip>>>;
|
|
182
|
+
runtimes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
183
|
+
runtimeId: z.ZodString;
|
|
184
|
+
runtimeArn: z.ZodString;
|
|
185
|
+
runtimeEndpoint: z.ZodString;
|
|
186
|
+
}, z.core.$strip>>>;
|
|
187
|
+
lambdas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
188
|
+
functionArn: z.ZodString;
|
|
189
|
+
functionName: z.ZodString;
|
|
190
|
+
}, z.core.$strip>>>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
193
|
+
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
194
|
+
name: z.ZodString;
|
|
195
|
+
allowedAudience: z.ZodArray<z.ZodString>;
|
|
196
|
+
allowedClients: z.ZodArray<z.ZodString>;
|
|
197
|
+
discoveryUrl: z.ZodString;
|
|
198
|
+
}, z.core.$strip>>;
|
|
199
|
+
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
200
|
+
name: z.ZodString;
|
|
201
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
202
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
stackName: z.ZodOptional<z.ZodString>;
|
|
206
|
+
identityKmsKeyArn: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
}, z.core.$strip>>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
export type DeployedState = z.infer<typeof DeployedStateSchema>;
|
|
211
|
+
/**
|
|
212
|
+
* Creates a DeployedState schema that validates target keys against aws-targets.
|
|
213
|
+
* Ensures all keys in deployed-state exist as names in aws-targets.
|
|
214
|
+
*/
|
|
215
|
+
export declare function createValidatedDeployedStateSchema(targetNames: string[]): z.ZodObject<{
|
|
216
|
+
targets: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
217
|
+
resources: z.ZodOptional<z.ZodObject<{
|
|
218
|
+
agents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
219
|
+
runtimeId: z.ZodString;
|
|
220
|
+
runtimeArn: z.ZodString;
|
|
221
|
+
roleArn: z.ZodString;
|
|
222
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
223
|
+
memoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
224
|
+
browserId: z.ZodOptional<z.ZodString>;
|
|
225
|
+
codeInterpreterId: z.ZodOptional<z.ZodString>;
|
|
226
|
+
}, z.core.$strip>>>;
|
|
227
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
228
|
+
gateways: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
229
|
+
gatewayId: z.ZodString;
|
|
230
|
+
gatewayArn: z.ZodString;
|
|
231
|
+
}, z.core.$strip>>>;
|
|
232
|
+
runtimes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
233
|
+
runtimeId: z.ZodString;
|
|
234
|
+
runtimeArn: z.ZodString;
|
|
235
|
+
runtimeEndpoint: z.ZodString;
|
|
236
|
+
}, z.core.$strip>>>;
|
|
237
|
+
lambdas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
238
|
+
functionArn: z.ZodString;
|
|
239
|
+
functionName: z.ZodString;
|
|
240
|
+
}, z.core.$strip>>>;
|
|
241
|
+
}, z.core.$strip>>;
|
|
242
|
+
externallyManaged: z.ZodOptional<z.ZodObject<{
|
|
243
|
+
customJwtAuthorizer: z.ZodOptional<z.ZodObject<{
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
allowedAudience: z.ZodArray<z.ZodString>;
|
|
246
|
+
allowedClients: z.ZodArray<z.ZodString>;
|
|
247
|
+
discoveryUrl: z.ZodString;
|
|
248
|
+
}, z.core.$strip>>;
|
|
249
|
+
vpcConfig: z.ZodOptional<z.ZodObject<{
|
|
250
|
+
name: z.ZodString;
|
|
251
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
252
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
}, z.core.$strip>>;
|
|
255
|
+
stackName: z.ZodOptional<z.ZodString>;
|
|
256
|
+
identityKmsKeyArn: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
//# sourceMappingURL=deployed-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployed-state.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/deployed-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,4BAA4B;;;;;;;;iBAQvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAMlF,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAMpF,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAMlF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;iBAIjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAMtE,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,yBAAyB;;;;;iBAIpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,eAAe;;;;iBAG1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;iBAGvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAMlF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAMhF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,WAAW,EAAE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAYvE"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeployedStateSchema = exports.TargetDeployedStateSchema = exports.DeployedResourceStateSchema = exports.ExternallyManagedStateSchema = exports.VpcConfigSchema = exports.CustomJwtAuthorizerSchema = exports.ExternallyManagedResourceSchema = exports.McpDeployedStateSchema = exports.McpLambdaDeployedStateSchema = exports.McpRuntimeDeployedStateSchema = exports.GatewayDeployedStateSchema = exports.AgentCoreDeployedStateSchema = void 0;
|
|
4
|
+
exports.createValidatedDeployedStateSchema = createValidatedDeployedStateSchema;
|
|
5
|
+
const aws_targets_1 = require("./aws-targets");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Agent Deployed State
|
|
9
|
+
// ============================================================================
|
|
10
|
+
exports.AgentCoreDeployedStateSchema = zod_1.z.object({
|
|
11
|
+
runtimeId: zod_1.z.string().min(1),
|
|
12
|
+
runtimeArn: zod_1.z.string().min(1),
|
|
13
|
+
roleArn: zod_1.z.string().min(1),
|
|
14
|
+
sessionId: zod_1.z.string().optional(),
|
|
15
|
+
memoryIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
16
|
+
browserId: zod_1.z.string().optional(),
|
|
17
|
+
codeInterpreterId: zod_1.z.string().optional(),
|
|
18
|
+
});
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// MCP Gateway Deployed State
|
|
21
|
+
// ============================================================================
|
|
22
|
+
exports.GatewayDeployedStateSchema = zod_1.z.object({
|
|
23
|
+
gatewayId: zod_1.z.string().min(1),
|
|
24
|
+
gatewayArn: zod_1.z.string().min(1),
|
|
25
|
+
});
|
|
26
|
+
// ============================================================================
|
|
27
|
+
// MCP Runtime Deployed State
|
|
28
|
+
// ============================================================================
|
|
29
|
+
exports.McpRuntimeDeployedStateSchema = zod_1.z.object({
|
|
30
|
+
runtimeId: zod_1.z.string().min(1),
|
|
31
|
+
runtimeArn: zod_1.z.string().min(1),
|
|
32
|
+
runtimeEndpoint: zod_1.z.string().min(1),
|
|
33
|
+
});
|
|
34
|
+
// ============================================================================
|
|
35
|
+
// MCP Lambda Deployed State
|
|
36
|
+
// ============================================================================
|
|
37
|
+
exports.McpLambdaDeployedStateSchema = zod_1.z.object({
|
|
38
|
+
functionArn: zod_1.z.string().min(1),
|
|
39
|
+
functionName: zod_1.z.string().min(1),
|
|
40
|
+
});
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// MCP Deployed State Container
|
|
43
|
+
// ============================================================================
|
|
44
|
+
exports.McpDeployedStateSchema = zod_1.z.object({
|
|
45
|
+
gateways: zod_1.z.record(zod_1.z.string(), exports.GatewayDeployedStateSchema).optional(),
|
|
46
|
+
runtimes: zod_1.z.record(zod_1.z.string(), exports.McpRuntimeDeployedStateSchema).optional(),
|
|
47
|
+
lambdas: zod_1.z.record(zod_1.z.string(), exports.McpLambdaDeployedStateSchema).optional(),
|
|
48
|
+
});
|
|
49
|
+
// ============================================================================
|
|
50
|
+
// Externally Managed Resources
|
|
51
|
+
// ============================================================================
|
|
52
|
+
exports.ExternallyManagedResourceSchema = zod_1.z.object({
|
|
53
|
+
name: zod_1.z.string().min(1),
|
|
54
|
+
});
|
|
55
|
+
exports.CustomJwtAuthorizerSchema = exports.ExternallyManagedResourceSchema.extend({
|
|
56
|
+
allowedAudience: zod_1.z.array(zod_1.z.string()),
|
|
57
|
+
allowedClients: zod_1.z.array(zod_1.z.string()),
|
|
58
|
+
discoveryUrl: zod_1.z.string(),
|
|
59
|
+
});
|
|
60
|
+
exports.VpcConfigSchema = exports.ExternallyManagedResourceSchema.extend({
|
|
61
|
+
securityGroups: zod_1.z.array(zod_1.z.string()),
|
|
62
|
+
subnets: zod_1.z.array(zod_1.z.string()),
|
|
63
|
+
});
|
|
64
|
+
exports.ExternallyManagedStateSchema = zod_1.z.object({
|
|
65
|
+
customJwtAuthorizer: exports.CustomJwtAuthorizerSchema.optional(),
|
|
66
|
+
vpcConfig: exports.VpcConfigSchema.optional(),
|
|
67
|
+
});
|
|
68
|
+
// ============================================================================
|
|
69
|
+
// Deployed Resource State
|
|
70
|
+
// ============================================================================
|
|
71
|
+
exports.DeployedResourceStateSchema = zod_1.z.object({
|
|
72
|
+
agents: zod_1.z.record(zod_1.z.string(), exports.AgentCoreDeployedStateSchema).optional(),
|
|
73
|
+
mcp: exports.McpDeployedStateSchema.optional(),
|
|
74
|
+
externallyManaged: exports.ExternallyManagedStateSchema.optional(),
|
|
75
|
+
stackName: zod_1.z.string().optional(),
|
|
76
|
+
identityKmsKeyArn: zod_1.z.string().optional(),
|
|
77
|
+
});
|
|
78
|
+
// ============================================================================
|
|
79
|
+
// Target Deployed State
|
|
80
|
+
// ============================================================================
|
|
81
|
+
exports.TargetDeployedStateSchema = zod_1.z.object({
|
|
82
|
+
resources: exports.DeployedResourceStateSchema.optional(),
|
|
83
|
+
});
|
|
84
|
+
exports.DeployedStateSchema = zod_1.z.object({
|
|
85
|
+
targets: zod_1.z.record(aws_targets_1.DeploymentTargetNameSchema, exports.TargetDeployedStateSchema),
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* Creates a DeployedState schema that validates target keys against aws-targets.
|
|
89
|
+
* Ensures all keys in deployed-state exist as names in aws-targets.
|
|
90
|
+
*/
|
|
91
|
+
function createValidatedDeployedStateSchema(targetNames) {
|
|
92
|
+
const targetNameSet = new Set(targetNames);
|
|
93
|
+
return exports.DeployedStateSchema.refine(state => {
|
|
94
|
+
const stateKeys = Object.keys(state.targets);
|
|
95
|
+
return stateKeys.every(key => targetNameSet.has(key));
|
|
96
|
+
}, {
|
|
97
|
+
message: 'Deployed state contains target names not present in aws-targets',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=deployed-state.js.map
|