@aws/agentcore-cdk 0.1.0-alpha.36 → 0.1.0-alpha.39
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/dist/cdk/constructs/components/mcp/Gateway.d.ts +11 -0
- package/dist/cdk/constructs/components/mcp/Gateway.d.ts.map +1 -1
- package/dist/cdk/constructs/components/mcp/Gateway.js +377 -4
- package/dist/cdk/constructs/components/mcp/Gateway.js.map +1 -1
- package/dist/cdk/constructs/components/mcp/connector-defaults.d.ts +20 -0
- package/dist/cdk/constructs/components/mcp/connector-defaults.d.ts.map +1 -0
- package/dist/cdk/constructs/components/mcp/connector-defaults.js +16 -0
- package/dist/cdk/constructs/components/mcp/connector-defaults.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.d.ts +36 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.js +65 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/AgentCoreConfigBundle.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.d.ts +3 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/config-bundle/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js +68 -22
- package/dist/cdk/constructs/components/primitives/evaluator/AgentCoreOnlineEvaluationConfig.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.d.ts +64 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.js +91 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarness.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.d.ts +25 -8
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.js +120 -11
- package/dist/cdk/constructs/components/primitives/harness/AgentCoreHarnessRole.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.d.ts +47 -0
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.js +388 -0
- package/dist/cdk/constructs/components/primitives/harness/harness-cfn-mapping.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/harness/index.d.ts +1 -0
- package/dist/cdk/constructs/components/primitives/harness/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/harness/index.js +3 -1
- package/dist/cdk/constructs/components/primitives/harness/index.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/index.d.ts +3 -1
- package/dist/cdk/constructs/components/primitives/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/index.js +6 -1
- package/dist/cdk/constructs/components/primitives/index.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.d.ts +69 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.js +292 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/AgentCoreKnowledgeBase.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/knowledge-base/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js +20 -5
- package/dist/cdk/constructs/components/primitives/policy/AgentCorePolicyEngine.js.map +1 -1
- package/dist/cdk/constructs/index.d.ts +2 -2
- package/dist/cdk/constructs/index.d.ts.map +1 -1
- package/dist/cdk/constructs/index.js +4 -1
- package/dist/cdk/constructs/index.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts +74 -4
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.js +264 -2
- package/dist/cdk/constructs/l3/AgentCoreApplication.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.d.ts +24 -0
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.js +31 -3
- package/dist/cdk/constructs/l3/AgentCoreHarnessEnvironment.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreMcp.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreMcp.js +25 -1
- package/dist/cdk/constructs/l3/AgentCoreMcp.js.map +1 -1
- package/dist/cdk/constructs/l3/index.d.ts +1 -1
- package/dist/cdk/constructs/l3/index.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/index.js.map +1 -1
- package/dist/cdk/feature-flags.d.ts +15 -0
- package/dist/cdk/feature-flags.d.ts.map +1 -0
- package/dist/cdk/feature-flags.js +19 -0
- package/dist/cdk/feature-flags.js.map +1 -0
- package/dist/cdk/index.d.ts +1 -1
- package/dist/cdk/index.d.ts.map +1 -1
- package/dist/cdk/index.js +4 -1
- package/dist/cdk/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/schema/schemas/agent-env.d.ts +35 -0
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +175 -4
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +81 -4
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/auth.d.ts +171 -0
- package/dist/schema/schemas/auth.d.ts.map +1 -1
- package/dist/schema/schemas/auth.js +125 -3
- package/dist/schema/schemas/auth.js.map +1 -1
- package/dist/schema/schemas/mcp.d.ts +254 -0
- package/dist/schema/schemas/mcp.d.ts.map +1 -1
- package/dist/schema/schemas/mcp.js +452 -4
- package/dist/schema/schemas/mcp.js.map +1 -1
- package/dist/schema/schemas/primitives/harness.d.ts +353 -19
- package/dist/schema/schemas/primitives/harness.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/harness.js +385 -25
- package/dist/schema/schemas/primitives/harness.js.map +1 -1
- package/dist/schema/schemas/primitives/index.d.ts +5 -1
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/index.js +31 -1
- package/dist/schema/schemas/primitives/index.js.map +1 -1
- package/dist/schema/schemas/primitives/knowledge-base.d.ts +103 -0
- package/dist/schema/schemas/primitives/knowledge-base.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/knowledge-base.js +98 -0
- package/dist/schema/schemas/primitives/knowledge-base.js.map +1 -0
- package/dist/schema/schemas/primitives/memory.d.ts +2 -2
- package/dist/schema/schemas/primitives/online-evaluation-config.d.ts +19 -2
- package/dist/schema/schemas/primitives/online-evaluation-config.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/online-evaluation-config.js +39 -5
- package/dist/schema/schemas/primitives/online-evaluation-config.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComponentConfigurationMapSchema = exports.ComponentConfigurationSchema = exports.ConfigBundleDescriptionSchema = exports.ConfigBundleNameSchema = exports.ConfigBundleSchema = exports.ValidationModeSchema = exports.PolicySchema = exports.PolicyNameSchema = exports.PolicyEngineSchema = exports.PolicyEngineNameSchema = exports.OnlineEvaluationConfigNameSchema = exports.OnlineEvaluationConfigSchema = exports.RatingScaleSchema = exports.NumericalRatingSchema = exports.ManagedCodeBasedConfigSchema = exports.LlmAsAJudgeConfigSchema = exports.ExternalCodeBasedConfigSchema = exports.EvaluatorNameSchema = exports.EvaluatorConfigSchema = exports.EvaluationLevelSchema = exports.CodeBasedConfigSchema = exports.CategoricalRatingSchema = exports.MemoryStrategyTypeSchema = exports.MemoryStrategyNameSchema = exports.MemoryStrategySchema = exports.IndexedKeyTypeSchema = exports.IndexedKeySchema = exports.DatasetSchemaTypeSchema = exports.DatasetSchema = exports.DatasetNameSchema = void 0;
|
|
3
|
+
exports.HarnessSkillPathSourceSchema = exports.HarnessSkillGitAuthSchema = exports.HarnessSkillGitSourceSchema = exports.HarnessSkillS3SourceSchema = exports.HarnessSkillSchema = exports.HarnessGatewayOutboundAuthSchema = exports.HarnessTruncationConfigSchema = exports.HarnessMemoryRefSchema = exports.HarnessToolTypeSchema = exports.HarnessToolSchema = exports.HarnessModelProviderSchema = exports.HarnessModelSchema = exports.HarnessSpecSchema = exports.HarnessNameSchema = exports.S3DataSourceSchema = exports.KnowledgeBaseTypeSchema = exports.KnowledgeBaseSchema = exports.KnowledgeBaseNameSchema = exports.DataSourceSchema = exports.ComponentConfigurationMapSchema = exports.ComponentConfigurationSchema = exports.ConfigBundleDescriptionSchema = exports.ConfigBundleNameSchema = exports.ConfigBundleSchema = exports.ValidationModeSchema = exports.PolicySchema = exports.PolicyNameSchema = exports.PolicyEngineSchema = exports.PolicyEngineNameSchema = exports.OnlineEvaluationConfigNameSchema = exports.OnlineEvaluationConfigSchema = exports.ClusteringConfigSchema = exports.RatingScaleSchema = exports.NumericalRatingSchema = exports.ManagedCodeBasedConfigSchema = exports.LlmAsAJudgeConfigSchema = exports.ExternalCodeBasedConfigSchema = exports.EvaluatorNameSchema = exports.EvaluatorConfigSchema = exports.EvaluationLevelSchema = exports.CodeBasedConfigSchema = exports.CategoricalRatingSchema = exports.MemoryStrategyTypeSchema = exports.MemoryStrategyNameSchema = exports.MemoryStrategySchema = exports.IndexedKeyTypeSchema = exports.IndexedKeySchema = exports.DatasetSchemaTypeSchema = exports.DatasetSchema = exports.DatasetNameSchema = void 0;
|
|
4
|
+
exports.validateApiFormat = exports.ManagedMemoryStrategySchema = exports.HarnessApiFormatSchema = exports.OpenAiApiFormatSchema = exports.BedrockApiFormatSchema = exports.GatewayOAuthGrantTypeSchema = exports.HarnessSkillAwsSkillsSourceSchema = void 0;
|
|
4
5
|
var dataset_1 = require("./dataset");
|
|
5
6
|
Object.defineProperty(exports, "DatasetNameSchema", { enumerable: true, get: function () { return dataset_1.DatasetNameSchema; } });
|
|
6
7
|
Object.defineProperty(exports, "DatasetSchema", { enumerable: true, get: function () { return dataset_1.DatasetSchema; } });
|
|
@@ -23,6 +24,7 @@ Object.defineProperty(exports, "ManagedCodeBasedConfigSchema", { enumerable: tru
|
|
|
23
24
|
Object.defineProperty(exports, "NumericalRatingSchema", { enumerable: true, get: function () { return evaluator_1.NumericalRatingSchema; } });
|
|
24
25
|
Object.defineProperty(exports, "RatingScaleSchema", { enumerable: true, get: function () { return evaluator_1.RatingScaleSchema; } });
|
|
25
26
|
var online_evaluation_config_1 = require("./online-evaluation-config");
|
|
27
|
+
Object.defineProperty(exports, "ClusteringConfigSchema", { enumerable: true, get: function () { return online_evaluation_config_1.ClusteringConfigSchema; } });
|
|
26
28
|
Object.defineProperty(exports, "OnlineEvaluationConfigSchema", { enumerable: true, get: function () { return online_evaluation_config_1.OnlineEvaluationConfigSchema; } });
|
|
27
29
|
Object.defineProperty(exports, "OnlineEvaluationConfigNameSchema", { enumerable: true, get: function () { return online_evaluation_config_1.OnlineEvaluationConfigNameSchema; } });
|
|
28
30
|
var policy_1 = require("./policy");
|
|
@@ -37,4 +39,32 @@ Object.defineProperty(exports, "ConfigBundleNameSchema", { enumerable: true, get
|
|
|
37
39
|
Object.defineProperty(exports, "ConfigBundleDescriptionSchema", { enumerable: true, get: function () { return config_bundle_1.ConfigBundleDescriptionSchema; } });
|
|
38
40
|
Object.defineProperty(exports, "ComponentConfigurationSchema", { enumerable: true, get: function () { return config_bundle_1.ComponentConfigurationSchema; } });
|
|
39
41
|
Object.defineProperty(exports, "ComponentConfigurationMapSchema", { enumerable: true, get: function () { return config_bundle_1.ComponentConfigurationMapSchema; } });
|
|
42
|
+
var knowledge_base_1 = require("./knowledge-base");
|
|
43
|
+
Object.defineProperty(exports, "DataSourceSchema", { enumerable: true, get: function () { return knowledge_base_1.DataSourceSchema; } });
|
|
44
|
+
Object.defineProperty(exports, "KnowledgeBaseNameSchema", { enumerable: true, get: function () { return knowledge_base_1.KnowledgeBaseNameSchema; } });
|
|
45
|
+
Object.defineProperty(exports, "KnowledgeBaseSchema", { enumerable: true, get: function () { return knowledge_base_1.KnowledgeBaseSchema; } });
|
|
46
|
+
Object.defineProperty(exports, "KnowledgeBaseTypeSchema", { enumerable: true, get: function () { return knowledge_base_1.KnowledgeBaseTypeSchema; } });
|
|
47
|
+
Object.defineProperty(exports, "S3DataSourceSchema", { enumerable: true, get: function () { return knowledge_base_1.S3DataSourceSchema; } });
|
|
48
|
+
var harness_1 = require("./harness");
|
|
49
|
+
Object.defineProperty(exports, "HarnessNameSchema", { enumerable: true, get: function () { return harness_1.HarnessNameSchema; } });
|
|
50
|
+
Object.defineProperty(exports, "HarnessSpecSchema", { enumerable: true, get: function () { return harness_1.HarnessSpecSchema; } });
|
|
51
|
+
Object.defineProperty(exports, "HarnessModelSchema", { enumerable: true, get: function () { return harness_1.HarnessModelSchema; } });
|
|
52
|
+
Object.defineProperty(exports, "HarnessModelProviderSchema", { enumerable: true, get: function () { return harness_1.HarnessModelProviderSchema; } });
|
|
53
|
+
Object.defineProperty(exports, "HarnessToolSchema", { enumerable: true, get: function () { return harness_1.HarnessToolSchema; } });
|
|
54
|
+
Object.defineProperty(exports, "HarnessToolTypeSchema", { enumerable: true, get: function () { return harness_1.HarnessToolTypeSchema; } });
|
|
55
|
+
Object.defineProperty(exports, "HarnessMemoryRefSchema", { enumerable: true, get: function () { return harness_1.HarnessMemoryRefSchema; } });
|
|
56
|
+
Object.defineProperty(exports, "HarnessTruncationConfigSchema", { enumerable: true, get: function () { return harness_1.HarnessTruncationConfigSchema; } });
|
|
57
|
+
Object.defineProperty(exports, "HarnessGatewayOutboundAuthSchema", { enumerable: true, get: function () { return harness_1.HarnessGatewayOutboundAuthSchema; } });
|
|
58
|
+
Object.defineProperty(exports, "HarnessSkillSchema", { enumerable: true, get: function () { return harness_1.HarnessSkillSchema; } });
|
|
59
|
+
Object.defineProperty(exports, "HarnessSkillS3SourceSchema", { enumerable: true, get: function () { return harness_1.HarnessSkillS3SourceSchema; } });
|
|
60
|
+
Object.defineProperty(exports, "HarnessSkillGitSourceSchema", { enumerable: true, get: function () { return harness_1.HarnessSkillGitSourceSchema; } });
|
|
61
|
+
Object.defineProperty(exports, "HarnessSkillGitAuthSchema", { enumerable: true, get: function () { return harness_1.HarnessSkillGitAuthSchema; } });
|
|
62
|
+
Object.defineProperty(exports, "HarnessSkillPathSourceSchema", { enumerable: true, get: function () { return harness_1.HarnessSkillPathSourceSchema; } });
|
|
63
|
+
Object.defineProperty(exports, "HarnessSkillAwsSkillsSourceSchema", { enumerable: true, get: function () { return harness_1.HarnessSkillAwsSkillsSourceSchema; } });
|
|
64
|
+
Object.defineProperty(exports, "GatewayOAuthGrantTypeSchema", { enumerable: true, get: function () { return harness_1.GatewayOAuthGrantTypeSchema; } });
|
|
65
|
+
Object.defineProperty(exports, "BedrockApiFormatSchema", { enumerable: true, get: function () { return harness_1.BedrockApiFormatSchema; } });
|
|
66
|
+
Object.defineProperty(exports, "OpenAiApiFormatSchema", { enumerable: true, get: function () { return harness_1.OpenAiApiFormatSchema; } });
|
|
67
|
+
Object.defineProperty(exports, "HarnessApiFormatSchema", { enumerable: true, get: function () { return harness_1.HarnessApiFormatSchema; } });
|
|
68
|
+
Object.defineProperty(exports, "ManagedMemoryStrategySchema", { enumerable: true, get: function () { return harness_1.ManagedMemoryStrategySchema; } });
|
|
69
|
+
Object.defineProperty(exports, "validateApiFormat", { enumerable: true, get: function () { return harness_1.validateApiFormat; } });
|
|
40
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/index.ts"],"names":[],"mappings":";;;;AACA,qCAAsF;AAA7E,4GAAA,iBAAiB,OAAA;AAAE,wGAAA,aAAa,OAAA;AAAE,kHAAA,uBAAuB,OAAA;AAGlE,mCAMkB;AALhB,0GAAA,gBAAgB,OAAA;AAChB,8GAAA,oBAAoB,OAAA;AACpB,8GAAA,oBAAoB,OAAA;AACpB,kHAAA,wBAAwB,OAAA;AACxB,kHAAA,wBAAwB,OAAA;AAc1B,yCAWqB;AAVnB,oHAAA,uBAAuB,OAAA;AACvB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,gHAAA,mBAAmB,OAAA;AACnB,0HAAA,6BAA6B,OAAA;AAC7B,oHAAA,uBAAuB,OAAA;AACvB,yHAAA,4BAA4B,OAAA;AAC5B,kHAAA,qBAAqB,OAAA;AACrB,8GAAA,iBAAiB,OAAA;AAInB,uEAIoC;AAHlC,kIAAA,sBAAsB,OAAA;AACtB,wIAAA,4BAA4B,OAAA;AAC5B,4IAAA,gCAAgC,OAAA;AAIlC,mCAMkB;AALhB,gHAAA,sBAAsB,OAAA;AACtB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,sGAAA,YAAY,OAAA;AACZ,8GAAA,oBAAoB,OAAA;AAItB,iDAMyB;AALvB,mHAAA,kBAAkB,OAAA;AAClB,uHAAA,sBAAsB,OAAA;AACtB,8HAAA,6BAA6B,OAAA;AAC7B,6HAAA,4BAA4B,OAAA;AAC5B,gIAAA,+BAA+B,OAAA;AAIjC,mDAM0B;AALxB,kHAAA,gBAAgB,OAAA;AAChB,yHAAA,uBAAuB,OAAA;AACvB,qHAAA,mBAAmB,OAAA;AACnB,yHAAA,uBAAuB,OAAA;AACvB,oHAAA,kBAAkB,OAAA;AAuBpB,qCAsBmB;AArBjB,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,6GAAA,kBAAkB,OAAA;AAClB,qHAAA,0BAA0B,OAAA;AAC1B,4GAAA,iBAAiB,OAAA;AACjB,gHAAA,qBAAqB,OAAA;AACrB,iHAAA,sBAAsB,OAAA;AACtB,wHAAA,6BAA6B,OAAA;AAC7B,2HAAA,gCAAgC,OAAA;AAChC,6GAAA,kBAAkB,OAAA;AAClB,qHAAA,0BAA0B,OAAA;AAC1B,sHAAA,2BAA2B,OAAA;AAC3B,oHAAA,yBAAyB,OAAA;AACzB,uHAAA,4BAA4B,OAAA;AAC5B,4HAAA,iCAAiC,OAAA;AACjC,sHAAA,2BAA2B,OAAA;AAC3B,iHAAA,sBAAsB,OAAA;AACtB,gHAAA,qBAAqB,OAAA;AACrB,iHAAA,sBAAsB,OAAA;AACtB,sHAAA,2BAA2B,OAAA;AAC3B,4GAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Knowledge Base name validation.
|
|
4
|
+
* 1-48 chars, starts with a letter, alphanumeric + dash + underscore.
|
|
5
|
+
* Mirrors the naming convention used by Memory/Evaluator/Dataset primitives;
|
|
6
|
+
* stricter than the Bedrock CreateKnowledgeBase API allows (which permits up
|
|
7
|
+
* to 100 chars), but consistent with the rest of the agentcore-cli schemas.
|
|
8
|
+
*/
|
|
9
|
+
export declare const KnowledgeBaseNameSchema: z.ZodString;
|
|
10
|
+
export declare const S3DataSourceSchema: z.ZodObject<{
|
|
11
|
+
type: z.ZodLiteral<"S3">;
|
|
12
|
+
uri: z.ZodString;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type S3DataSource = z.infer<typeof S3DataSourceSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* Wire-verbatim connector type values for non-S3 FMKB data sources. These are
|
|
17
|
+
* the exact `connectorParameters.type` literals the Bedrock managed-connector
|
|
18
|
+
* API uses (confirmed against the FMKB console module's read and write paths).
|
|
19
|
+
* Note `WEB` (not `WEBCRAWLER`) and the single-word `GOOGLEDRIVE`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ConnectorDataSourceTypeSchema: z.ZodEnum<{
|
|
22
|
+
WEB: "WEB";
|
|
23
|
+
CONFLUENCE: "CONFLUENCE";
|
|
24
|
+
SHAREPOINT: "SHAREPOINT";
|
|
25
|
+
ONEDRIVE: "ONEDRIVE";
|
|
26
|
+
GOOGLEDRIVE: "GOOGLEDRIVE";
|
|
27
|
+
}>;
|
|
28
|
+
export type ConnectorDataSourceType = z.infer<typeof ConnectorDataSourceTypeSchema>;
|
|
29
|
+
/**
|
|
30
|
+
* Non-S3 data source. The connector-specific structure lives in a JSON file
|
|
31
|
+
* (`connectorConfigFile`, a project-relative path) and is passed through to
|
|
32
|
+
* the DataSource's connectorParameters verbatim at deploy time. This honors
|
|
33
|
+
* the DevEx "JSON file passthrough" decision: new connector params don't
|
|
34
|
+
* require CLI/schema changes.
|
|
35
|
+
*/
|
|
36
|
+
export declare const ConnectorFileDataSourceSchema: z.ZodObject<{
|
|
37
|
+
type: z.ZodEnum<{
|
|
38
|
+
WEB: "WEB";
|
|
39
|
+
CONFLUENCE: "CONFLUENCE";
|
|
40
|
+
SHAREPOINT: "SHAREPOINT";
|
|
41
|
+
ONEDRIVE: "ONEDRIVE";
|
|
42
|
+
GOOGLEDRIVE: "GOOGLEDRIVE";
|
|
43
|
+
}>;
|
|
44
|
+
connectorConfigFile: z.ZodString;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
export type ConnectorFileDataSource = z.infer<typeof ConnectorFileDataSourceSchema>;
|
|
47
|
+
/**
|
|
48
|
+
* Knowledge Base data source: S3 (inline `uri`) or a non-S3 connector
|
|
49
|
+
* (file-path reference). Discriminated union on `type`.
|
|
50
|
+
*/
|
|
51
|
+
export declare const DataSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52
|
+
type: z.ZodLiteral<"S3">;
|
|
53
|
+
uri: z.ZodString;
|
|
54
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
55
|
+
type: z.ZodEnum<{
|
|
56
|
+
WEB: "WEB";
|
|
57
|
+
CONFLUENCE: "CONFLUENCE";
|
|
58
|
+
SHAREPOINT: "SHAREPOINT";
|
|
59
|
+
ONEDRIVE: "ONEDRIVE";
|
|
60
|
+
GOOGLEDRIVE: "GOOGLEDRIVE";
|
|
61
|
+
}>;
|
|
62
|
+
connectorConfigFile: z.ZodString;
|
|
63
|
+
}, z.core.$strict>], "type">;
|
|
64
|
+
export type DataSource = z.infer<typeof DataSourceSchema>;
|
|
65
|
+
/**
|
|
66
|
+
* Type literal for KnowledgeBase entries in `agentcore.json`.
|
|
67
|
+
* Mirrors how Memory/Evaluator/etc. tag themselves for forward-compat.
|
|
68
|
+
*/
|
|
69
|
+
export declare const KnowledgeBaseTypeSchema: z.ZodLiteral<"AgentCoreKnowledgeBase">;
|
|
70
|
+
export type KnowledgeBaseType = z.infer<typeof KnowledgeBaseTypeSchema>;
|
|
71
|
+
/**
|
|
72
|
+
* Knowledge Base entry. The CLI creates and owns the KB, its data sources,
|
|
73
|
+
* its IAM role, and (when `gateway` is set in Wave 2) its connector gateway
|
|
74
|
+
* target.
|
|
75
|
+
*
|
|
76
|
+
* To wire an EXTERNAL KB (one this project does not own) as a gateway target,
|
|
77
|
+
* skip this schema and use a connector gateway target with the external KB's
|
|
78
|
+
* literal 10-char ID set on `knowledgeBaseId`.
|
|
79
|
+
*
|
|
80
|
+
* `gateway` is optional in Wave 1 — when set, it's stored but not yet wired
|
|
81
|
+
* to a gateway target. Wave 2 lights up the connector gateway target.
|
|
82
|
+
*/
|
|
83
|
+
export declare const KnowledgeBaseSchema: z.ZodObject<{
|
|
84
|
+
type: z.ZodDefault<z.ZodLiteral<"AgentCoreKnowledgeBase">>;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
description: z.ZodOptional<z.ZodString>;
|
|
87
|
+
dataSources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
88
|
+
type: z.ZodLiteral<"S3">;
|
|
89
|
+
uri: z.ZodString;
|
|
90
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
91
|
+
type: z.ZodEnum<{
|
|
92
|
+
WEB: "WEB";
|
|
93
|
+
CONFLUENCE: "CONFLUENCE";
|
|
94
|
+
SHAREPOINT: "SHAREPOINT";
|
|
95
|
+
ONEDRIVE: "ONEDRIVE";
|
|
96
|
+
GOOGLEDRIVE: "GOOGLEDRIVE";
|
|
97
|
+
}>;
|
|
98
|
+
connectorConfigFile: z.ZodString;
|
|
99
|
+
}, z.core.$strict>], "type">>;
|
|
100
|
+
gateway: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
export type KnowledgeBase = z.infer<typeof KnowledgeBaseSchema>;
|
|
103
|
+
//# sourceMappingURL=knowledge-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-base.d.ts","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/knowledge-base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,aAOjC,CAAC;AAgBJ,eAAO,MAAM,kBAAkB;;;kBAcpB,CAAC;AAEZ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;EAAyE,CAAC;AACpH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;kBAK/B,CAAC;AAEZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;4BAAoF,CAAC;AAClH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,uBAAuB,wCAAsC,CAAC;AAC3E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;kBAgBrB,CAAC;AAEZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KnowledgeBaseSchema = exports.KnowledgeBaseTypeSchema = exports.DataSourceSchema = exports.ConnectorFileDataSourceSchema = exports.ConnectorDataSourceTypeSchema = exports.S3DataSourceSchema = exports.KnowledgeBaseNameSchema = void 0;
|
|
4
|
+
const zod_util_1 = require("../zod-util");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
/**
|
|
7
|
+
* Knowledge Base name validation.
|
|
8
|
+
* 1-48 chars, starts with a letter, alphanumeric + dash + underscore.
|
|
9
|
+
* Mirrors the naming convention used by Memory/Evaluator/Dataset primitives;
|
|
10
|
+
* stricter than the Bedrock CreateKnowledgeBase API allows (which permits up
|
|
11
|
+
* to 100 chars), but consistent with the rest of the agentcore-cli schemas.
|
|
12
|
+
*/
|
|
13
|
+
exports.KnowledgeBaseNameSchema = zod_1.z
|
|
14
|
+
.string()
|
|
15
|
+
.min(1, 'Name is required')
|
|
16
|
+
.max(48)
|
|
17
|
+
.regex(/^[a-zA-Z][a-zA-Z0-9_-]{0,47}$/, 'Must begin with a letter and contain only alphanumeric characters, dashes, and underscores (max 48 chars)');
|
|
18
|
+
/**
|
|
19
|
+
* S3 data source for FMKB. Wave 1 supports S3 only.
|
|
20
|
+
*
|
|
21
|
+
* `uri` must be an `s3://bucket[/prefix]` URI. Non-S3 connectors (Confluence,
|
|
22
|
+
* SharePoint, OneDrive, Google Drive, Web Crawler) are deferred to a later wave.
|
|
23
|
+
*
|
|
24
|
+
* Bucket validation enforces the AWS S3 bucket naming rules at parse time:
|
|
25
|
+
* 3-63 chars, lowercase + digits + dot + hyphen, must start and end with
|
|
26
|
+
* letter/digit, no consecutive dots, and none of the AWS-reserved prefixes
|
|
27
|
+
* (`xn--`, `sthree-`) or suffixes (`-s3alias`). AWS will ultimately reject
|
|
28
|
+
* non-conformant buckets server-side; failing fast at config-load time
|
|
29
|
+
* gives a better error surface.
|
|
30
|
+
*/
|
|
31
|
+
const S3_BUCKET_NAME = /^(?!xn--)(?!sthree-)[a-z0-9](?!.*\.\.)[a-z0-9.-]{1,61}[a-z0-9](?<!-s3alias)$/;
|
|
32
|
+
exports.S3DataSourceSchema = zod_1.z
|
|
33
|
+
.object({
|
|
34
|
+
type: zod_1.z.literal('S3'),
|
|
35
|
+
uri: zod_1.z
|
|
36
|
+
.string()
|
|
37
|
+
.min(1)
|
|
38
|
+
.refine(s => {
|
|
39
|
+
const m = /^s3:\/\/([^/]+)(?:\/.*)?$/.exec(s);
|
|
40
|
+
return !!m && S3_BUCKET_NAME.test(m[1]);
|
|
41
|
+
}, { message: 'Must be a valid s3:// URI with an AWS-compliant bucket name' }),
|
|
42
|
+
})
|
|
43
|
+
.strict();
|
|
44
|
+
/**
|
|
45
|
+
* Wire-verbatim connector type values for non-S3 FMKB data sources. These are
|
|
46
|
+
* the exact `connectorParameters.type` literals the Bedrock managed-connector
|
|
47
|
+
* API uses (confirmed against the FMKB console module's read and write paths).
|
|
48
|
+
* Note `WEB` (not `WEBCRAWLER`) and the single-word `GOOGLEDRIVE`.
|
|
49
|
+
*/
|
|
50
|
+
exports.ConnectorDataSourceTypeSchema = zod_1.z.enum(['WEB', 'CONFLUENCE', 'SHAREPOINT', 'ONEDRIVE', 'GOOGLEDRIVE']);
|
|
51
|
+
/**
|
|
52
|
+
* Non-S3 data source. The connector-specific structure lives in a JSON file
|
|
53
|
+
* (`connectorConfigFile`, a project-relative path) and is passed through to
|
|
54
|
+
* the DataSource's connectorParameters verbatim at deploy time. This honors
|
|
55
|
+
* the DevEx "JSON file passthrough" decision: new connector params don't
|
|
56
|
+
* require CLI/schema changes.
|
|
57
|
+
*/
|
|
58
|
+
exports.ConnectorFileDataSourceSchema = zod_1.z
|
|
59
|
+
.object({
|
|
60
|
+
type: exports.ConnectorDataSourceTypeSchema,
|
|
61
|
+
connectorConfigFile: zod_1.z.string().min(1, 'connectorConfigFile path is required'),
|
|
62
|
+
})
|
|
63
|
+
.strict();
|
|
64
|
+
/**
|
|
65
|
+
* Knowledge Base data source: S3 (inline `uri`) or a non-S3 connector
|
|
66
|
+
* (file-path reference). Discriminated union on `type`.
|
|
67
|
+
*/
|
|
68
|
+
exports.DataSourceSchema = zod_1.z.discriminatedUnion('type', [exports.S3DataSourceSchema, exports.ConnectorFileDataSourceSchema]);
|
|
69
|
+
/**
|
|
70
|
+
* Type literal for KnowledgeBase entries in `agentcore.json`.
|
|
71
|
+
* Mirrors how Memory/Evaluator/etc. tag themselves for forward-compat.
|
|
72
|
+
*/
|
|
73
|
+
exports.KnowledgeBaseTypeSchema = zod_1.z.literal('AgentCoreKnowledgeBase');
|
|
74
|
+
/**
|
|
75
|
+
* Knowledge Base entry. The CLI creates and owns the KB, its data sources,
|
|
76
|
+
* its IAM role, and (when `gateway` is set in Wave 2) its connector gateway
|
|
77
|
+
* target.
|
|
78
|
+
*
|
|
79
|
+
* To wire an EXTERNAL KB (one this project does not own) as a gateway target,
|
|
80
|
+
* skip this schema and use a connector gateway target with the external KB's
|
|
81
|
+
* literal 10-char ID set on `knowledgeBaseId`.
|
|
82
|
+
*
|
|
83
|
+
* `gateway` is optional in Wave 1 — when set, it's stored but not yet wired
|
|
84
|
+
* to a gateway target. Wave 2 lights up the connector gateway target.
|
|
85
|
+
*/
|
|
86
|
+
exports.KnowledgeBaseSchema = zod_1.z
|
|
87
|
+
.object({
|
|
88
|
+
type: exports.KnowledgeBaseTypeSchema.default('AgentCoreKnowledgeBase'),
|
|
89
|
+
name: exports.KnowledgeBaseNameSchema,
|
|
90
|
+
description: zod_1.z.string().max(2048).optional(),
|
|
91
|
+
dataSources: zod_1.z
|
|
92
|
+
.array(exports.DataSourceSchema)
|
|
93
|
+
.min(1, 'At least one data source is required')
|
|
94
|
+
.superRefine((0, zod_util_1.uniqueBy)(ds => (ds.type === 'S3' ? ds.uri : ds.connectorConfigFile), key => `Duplicate data source: ${key}`)),
|
|
95
|
+
gateway: zod_1.z.string().min(1).optional(),
|
|
96
|
+
})
|
|
97
|
+
.strict();
|
|
98
|
+
//# sourceMappingURL=knowledge-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-base.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/knowledge-base.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,6BAAwB;AAExB;;;;;;GAMG;AACU,QAAA,uBAAuB,GAAG,OAAC;KACrC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;KAC1B,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,+BAA+B,EAC/B,2GAA2G,CAC5G,CAAC;AAEJ;;;;;;;;;;;;GAYG;AACH,MAAM,cAAc,GAAG,8EAA8E,CAAC;AACzF,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACrB,GAAG,EAAE,OAAC;SACH,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CACL,CAAC,CAAC,EAAE;QACF,MAAM,CAAC,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9C,OAAO,CAAC,CAAC,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC;IAC3C,CAAC,EACD,EAAE,OAAO,EAAE,6DAA6D,EAAE,CAC3E;CACJ,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ;;;;;GAKG;AACU,QAAA,6BAA6B,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC,CAAC;AAGpH;;;;;;GAMG;AACU,QAAA,6BAA6B,GAAG,OAAC;KAC3C,MAAM,CAAC;IACN,IAAI,EAAE,qCAA6B;IACnC,mBAAmB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sCAAsC,CAAC;CAC/E,CAAC;KACD,MAAM,EAAE,CAAC;AAIZ;;;GAGG;AACU,QAAA,gBAAgB,GAAG,OAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,0BAAkB,EAAE,qCAA6B,CAAC,CAAC,CAAC;AAGlH;;;GAGG;AACU,QAAA,uBAAuB,GAAG,OAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAG3E;;;;;;;;;;;GAWG;AACU,QAAA,mBAAmB,GAAG,OAAC;KACjC,MAAM,CAAC;IACN,IAAI,EAAE,+BAAuB,CAAC,OAAO,CAAC,wBAAwB,CAAC;IAC/D,IAAI,EAAE,+BAAuB;IAC7B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;IAC5C,WAAW,EAAE,OAAC;SACX,KAAK,CAAC,wBAAgB,CAAC;SACvB,GAAG,CAAC,CAAC,EAAE,sCAAsC,CAAC;SAC9C,WAAW,CACV,IAAA,mBAAQ,EACN,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAC1D,GAAG,CAAC,EAAE,CAAC,0BAA0B,GAAG,EAAE,CACvC,CACF;IACH,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACtC,CAAC;KACD,MAAM,EAAE,CAAC"}
|
|
@@ -10,10 +10,10 @@ import { z } from 'zod';
|
|
|
10
10
|
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-properties-bedrockagentcore-memory-memorystrategy.html
|
|
11
11
|
*/
|
|
12
12
|
export declare const MemoryStrategyTypeSchema: z.ZodEnum<{
|
|
13
|
+
CUSTOM: "CUSTOM";
|
|
13
14
|
SEMANTIC: "SEMANTIC";
|
|
14
15
|
SUMMARIZATION: "SUMMARIZATION";
|
|
15
16
|
USER_PREFERENCE: "USER_PREFERENCE";
|
|
16
|
-
CUSTOM: "CUSTOM";
|
|
17
17
|
EPISODIC: "EPISODIC";
|
|
18
18
|
}>;
|
|
19
19
|
export type MemoryStrategyType = z.infer<typeof MemoryStrategyTypeSchema>;
|
|
@@ -35,10 +35,10 @@ export declare const MemoryStrategyNameSchema: z.ZodString;
|
|
|
35
35
|
*/
|
|
36
36
|
export declare const MemoryStrategySchema: z.ZodObject<{
|
|
37
37
|
type: z.ZodEnum<{
|
|
38
|
+
CUSTOM: "CUSTOM";
|
|
38
39
|
SEMANTIC: "SEMANTIC";
|
|
39
40
|
SUMMARIZATION: "SUMMARIZATION";
|
|
40
41
|
USER_PREFERENCE: "USER_PREFERENCE";
|
|
41
|
-
CUSTOM: "CUSTOM";
|
|
42
42
|
EPISODIC: "EPISODIC";
|
|
43
43
|
}>;
|
|
44
44
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const OnlineEvaluationConfigNameSchema: z.ZodString;
|
|
3
|
+
export declare const ClusteringConfigSchema: z.ZodObject<{
|
|
4
|
+
frequencies: z.ZodArray<z.ZodEnum<{
|
|
5
|
+
DAILY: "DAILY";
|
|
6
|
+
WEEKLY: "WEEKLY";
|
|
7
|
+
MONTHLY: "MONTHLY";
|
|
8
|
+
}>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
3
10
|
export declare const OnlineEvaluationConfigSchema: z.ZodObject<{
|
|
4
11
|
name: z.ZodString;
|
|
5
|
-
agent: z.ZodString
|
|
12
|
+
agent: z.ZodOptional<z.ZodString>;
|
|
6
13
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
7
|
-
|
|
14
|
+
logGroupNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
|
+
serviceNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
|
+
evaluators: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
insights: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
|
+
clusteringConfig: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
frequencies: z.ZodArray<z.ZodEnum<{
|
|
20
|
+
DAILY: "DAILY";
|
|
21
|
+
WEEKLY: "WEEKLY";
|
|
22
|
+
MONTHLY: "MONTHLY";
|
|
23
|
+
}>>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
8
25
|
samplingRate: z.ZodNumber;
|
|
9
26
|
description: z.ZodOptional<z.ZodString>;
|
|
10
27
|
sessionTimeoutMinutes: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"online-evaluation-config.d.ts","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/online-evaluation-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,gCAAgC,aAO1C,CAAC;AAEJ,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"online-evaluation-config.d.ts","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/online-evaluation-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,gCAAgC,aAO1C,CAAC;AAEJ,eAAO,MAAM,sBAAsB;;;;;;iBAKjC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;iBAgDtC,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OnlineEvaluationConfigSchema = exports.OnlineEvaluationConfigNameSchema = void 0;
|
|
3
|
+
exports.OnlineEvaluationConfigSchema = exports.ClusteringConfigSchema = exports.OnlineEvaluationConfigNameSchema = void 0;
|
|
4
4
|
const tags_1 = require("./tags");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
// ============================================================================
|
|
@@ -11,14 +11,29 @@ exports.OnlineEvaluationConfigNameSchema = zod_1.z
|
|
|
11
11
|
.min(1, 'Name is required')
|
|
12
12
|
.max(48)
|
|
13
13
|
.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)');
|
|
14
|
-
exports.
|
|
14
|
+
exports.ClusteringConfigSchema = zod_1.z.object({
|
|
15
|
+
frequencies: zod_1.z
|
|
16
|
+
.array(zod_1.z.enum(['DAILY', 'WEEKLY', 'MONTHLY']))
|
|
17
|
+
.min(1)
|
|
18
|
+
.max(3),
|
|
19
|
+
});
|
|
20
|
+
exports.OnlineEvaluationConfigSchema = zod_1.z
|
|
21
|
+
.object({
|
|
15
22
|
name: exports.OnlineEvaluationConfigNameSchema,
|
|
16
|
-
/** Agent name to monitor (must match a project agent) */
|
|
17
|
-
agent: zod_1.z.string().min(1, 'Agent name is required'),
|
|
23
|
+
/** Agent name to monitor (must match a project agent). Required for managed AgentCore agents. */
|
|
24
|
+
agent: zod_1.z.string().min(1, 'Agent name is required').optional(),
|
|
18
25
|
/** Optional runtime endpoint name to scope monitoring to a specific endpoint */
|
|
19
26
|
endpoint: zod_1.z.string().min(1).optional(),
|
|
27
|
+
/** CloudWatch log group names for custom/3rd-party agents (1-5 entries) */
|
|
28
|
+
logGroupNames: zod_1.z.array(zod_1.z.string().min(1)).min(1).max(5).optional(),
|
|
29
|
+
/** Service names to filter traces for custom/3rd-party agents */
|
|
30
|
+
serviceNames: zod_1.z.array(zod_1.z.string().min(1)).min(1).optional(),
|
|
20
31
|
/** Evaluator names (custom), Builtin.* IDs, or evaluator ARNs */
|
|
21
|
-
evaluators: zod_1.z.array(zod_1.z.string().min(1)).
|
|
32
|
+
evaluators: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
33
|
+
/** Insight IDs to enable */
|
|
34
|
+
insights: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
35
|
+
/** Clustering configuration for insights */
|
|
36
|
+
clusteringConfig: exports.ClusteringConfigSchema.optional(),
|
|
22
37
|
/** Sampling rate as a percentage (0.01 to 100) */
|
|
23
38
|
samplingRate: zod_1.z.number().min(0.01).max(100),
|
|
24
39
|
/** Optional description */
|
|
@@ -28,5 +43,24 @@ exports.OnlineEvaluationConfigSchema = zod_1.z.object({
|
|
|
28
43
|
/** Whether to enable evaluation immediately after deploy */
|
|
29
44
|
enableOnCreate: zod_1.z.boolean().optional(),
|
|
30
45
|
tags: tags_1.TagsSchema.optional(),
|
|
46
|
+
})
|
|
47
|
+
.refine(data => data.agent ?? data.logGroupNames, {
|
|
48
|
+
message: 'Either "agent" or "logGroupNames" must be provided',
|
|
49
|
+
})
|
|
50
|
+
.refine(data => !(data.agent && data.logGroupNames), {
|
|
51
|
+
message: '"agent" and "logGroupNames" are mutually exclusive',
|
|
52
|
+
})
|
|
53
|
+
.refine(data => !data.endpoint || data.agent, {
|
|
54
|
+
message: '"endpoint" requires "agent"',
|
|
55
|
+
})
|
|
56
|
+
.refine(data => !data.serviceNames || data.logGroupNames, {
|
|
57
|
+
message: '"serviceNames" requires "logGroupNames"',
|
|
58
|
+
})
|
|
59
|
+
.refine(data => {
|
|
60
|
+
const hasEvaluators = (data.evaluators?.length ?? 0) > 0;
|
|
61
|
+
const hasInsights = (data.insights?.length ?? 0) > 0;
|
|
62
|
+
return hasEvaluators || hasInsights;
|
|
63
|
+
}, {
|
|
64
|
+
message: 'At least one of evaluators or insights must be non-empty',
|
|
31
65
|
});
|
|
32
66
|
//# sourceMappingURL=online-evaluation-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"online-evaluation-config.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/online-evaluation-config.ts"],"names":[],"mappings":";;;AAAA,iCAAoC;AACpC,6BAAwB;AAExB,+EAA+E;AAC/E,iCAAiC;AACjC,+EAA+E;AAElE,QAAA,gCAAgC,GAAG,OAAC;KAC9C,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;KAC1B,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,8BAA8B,EAC9B,kGAAkG,CACnG,CAAC;AAES,QAAA,
|
|
1
|
+
{"version":3,"file":"online-evaluation-config.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/online-evaluation-config.ts"],"names":[],"mappings":"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"}
|