@aws/agentcore 0.8.2 → 1.0.0-preview.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/dist/agent-inspector/favicon.svg +60 -0
- package/dist/agent-inspector/index.css +1 -0
- package/dist/agent-inspector/index.html +14 -0
- package/dist/agent-inspector/index.js +275 -0
- package/dist/agent-inspector/index.js.map +1 -0
- package/dist/assets/README.md +56 -31
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +1732 -259
- package/dist/assets/__tests__/__snapshots__/dockerfile-render.test.ts.snap +77 -0
- package/dist/assets/__tests__/dockerfile-render.test.ts +24 -0
- package/dist/assets/agents/AGENTS.md +84 -55
- package/dist/assets/cdk/bin/cdk.ts +35 -0
- package/dist/assets/cdk/lib/cdk-stack.ts +15 -2
- package/dist/assets/cdk/package.json +1 -1
- package/dist/assets/container/python/Dockerfile +4 -0
- package/dist/assets/harness/invoke.py.template +74 -0
- package/dist/assets/python/a2a/googleadk/base/main.py +65 -3
- package/dist/assets/python/a2a/langchain_langgraph/base/main.py +64 -1
- package/dist/assets/python/a2a/strands/base/main.py +65 -2
- package/dist/assets/python/agui/googleadk/base/README.md +30 -0
- package/dist/assets/python/agui/googleadk/base/gitignore.template +41 -0
- package/dist/assets/python/agui/googleadk/base/main.py +31 -0
- package/dist/assets/python/agui/googleadk/base/model/__init__.py +1 -0
- package/dist/assets/python/agui/googleadk/base/model/load.py +41 -0
- package/dist/assets/python/agui/googleadk/base/pyproject.toml +24 -0
- package/dist/assets/python/agui/langchain_langgraph/base/README.md +22 -0
- package/dist/assets/python/agui/langchain_langgraph/base/gitignore.template +41 -0
- package/dist/assets/python/agui/langchain_langgraph/base/main.py +74 -0
- package/dist/assets/python/agui/langchain_langgraph/base/model/__init__.py +1 -0
- package/dist/assets/python/agui/langchain_langgraph/base/model/load.py +123 -0
- package/dist/assets/python/agui/langchain_langgraph/base/pyproject.toml +30 -0
- package/dist/assets/python/agui/strands/base/README.md +22 -0
- package/dist/assets/python/agui/strands/base/gitignore.template +41 -0
- package/dist/assets/python/agui/strands/base/main.py +43 -0
- package/dist/assets/python/agui/strands/base/model/__init__.py +1 -0
- package/dist/assets/python/agui/strands/base/model/load.py +123 -0
- package/dist/assets/python/agui/strands/base/pyproject.toml +27 -0
- package/dist/assets/python/agui/strands/capabilities/memory/__init__.py +1 -0
- package/dist/assets/python/agui/strands/capabilities/memory/session.py +38 -0
- package/dist/assets/python/http/autogen/base/main.py +61 -1
- package/dist/assets/python/http/googleadk/base/main.py +62 -2
- package/dist/assets/python/http/langchain_langgraph/base/main.py +61 -1
- package/dist/assets/python/http/openaiagents/base/main.py +70 -4
- package/dist/assets/python/http/strands/base/main.py +64 -6
- package/dist/cli/index.mjs +517 -466
- package/dist/lib/constants.d.ts +1 -0
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +3 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors/config.d.ts.map +1 -1
- package/dist/lib/errors/config.js +5 -2
- package/dist/lib/errors/config.js.map +1 -1
- package/dist/lib/schemas/io/config-io.d.ts +9 -1
- package/dist/lib/schemas/io/config-io.d.ts.map +1 -1
- package/dist/lib/schemas/io/config-io.js +14 -0
- package/dist/lib/schemas/io/config-io.js.map +1 -1
- package/dist/lib/schemas/io/path-resolver.d.ts +12 -0
- package/dist/lib/schemas/io/path-resolver.d.ts.map +1 -1
- package/dist/lib/schemas/io/path-resolver.js +18 -0
- package/dist/lib/schemas/io/path-resolver.js.map +1 -1
- package/dist/schema/constants.d.ts +1 -0
- package/dist/schema/constants.d.ts.map +1 -1
- package/dist/schema/constants.js +8 -1
- package/dist/schema/constants.js.map +1 -1
- package/dist/schema/schemas/agent-env.d.ts +20 -0
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agent-env.js +17 -2
- package/dist/schema/schemas/agent-env.js.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +17 -0
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +18 -1
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/deployed-state.d.ts +50 -0
- package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
- package/dist/schema/schemas/deployed-state.js +15 -1
- package/dist/schema/schemas/deployed-state.js.map +1 -1
- package/dist/schema/schemas/primitives/evaluator.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/evaluator.js +0 -1
- package/dist/schema/schemas/primitives/evaluator.js.map +1 -1
- package/dist/schema/schemas/primitives/harness.d.ts +287 -0
- package/dist/schema/schemas/primitives/harness.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/harness.js +237 -0
- package/dist/schema/schemas/primitives/harness.js.map +1 -0
- package/dist/schema/schemas/primitives/index.d.ts +2 -0
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/index.js +14 -1
- package/dist/schema/schemas/primitives/index.js.map +1 -1
- package/package.json +4 -1
- package/scripts/bump-version.ts +7 -80
- package/scripts/bundle.mjs +57 -3
- package/scripts/copy-assets.mjs +14 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HarnessSpecSchema = exports.AllowedToolSchema = exports.HarnessTruncationConfigSchema = exports.SummarizationConfigSchema = exports.SlidingWindowConfigSchema = exports.HarnessTruncationStrategySchema = exports.HarnessMemoryRefSchema = exports.HarnessToolSchema = exports.HarnessToolConfigSchema = exports.InlineFunctionConfigSchema = exports.AgentCoreGatewayConfigSchema = exports.AgentCoreCodeInterpreterConfigSchema = exports.AgentCoreBrowserConfigSchema = exports.RemoteMcpConfigSchema = exports.HarnessToolNameSchema = exports.HarnessToolTypeSchema = exports.HarnessModelSchema = exports.HarnessModelProviderSchema = exports.HarnessNameSchema = void 0;
|
|
4
|
+
const constants_1 = require("../../constants");
|
|
5
|
+
const agent_env_1 = require("../agent-env");
|
|
6
|
+
const agent_env_2 = require("../agent-env");
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
|
+
const zod_util_1 = require("../zod-util");
|
|
9
|
+
const tags_1 = require("./tags");
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Harness Name
|
|
13
|
+
// ============================================================================
|
|
14
|
+
exports.HarnessNameSchema = zod_1.z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1, 'Harness name is required')
|
|
17
|
+
.max(48)
|
|
18
|
+
.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)');
|
|
19
|
+
// ============================================================================
|
|
20
|
+
// Model Configuration
|
|
21
|
+
// ============================================================================
|
|
22
|
+
exports.HarnessModelProviderSchema = zod_1.z.enum(['bedrock', 'open_ai', 'gemini']);
|
|
23
|
+
exports.HarnessModelSchema = zod_1.z
|
|
24
|
+
.object({
|
|
25
|
+
provider: exports.HarnessModelProviderSchema,
|
|
26
|
+
modelId: zod_1.z.string().min(1, 'Model ID is required'),
|
|
27
|
+
apiKeyArn: zod_1.z.string().optional(),
|
|
28
|
+
temperature: zod_1.z.number().min(0).max(2).optional(),
|
|
29
|
+
topP: zod_1.z.number().min(0).max(1).optional(),
|
|
30
|
+
topK: zod_1.z.number().min(0).max(1).optional(),
|
|
31
|
+
maxTokens: zod_1.z.number().int().min(1).optional(),
|
|
32
|
+
})
|
|
33
|
+
.superRefine((model, ctx) => {
|
|
34
|
+
if (model.topK !== undefined && model.provider !== 'gemini') {
|
|
35
|
+
ctx.addIssue({
|
|
36
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
37
|
+
message: 'topK is only supported for the "gemini" provider',
|
|
38
|
+
path: ['topK'],
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
// ============================================================================
|
|
43
|
+
// Tool Configuration
|
|
44
|
+
// ============================================================================
|
|
45
|
+
exports.HarnessToolTypeSchema = zod_1.z.enum([
|
|
46
|
+
'remote_mcp',
|
|
47
|
+
'agentcore_browser',
|
|
48
|
+
'agentcore_gateway',
|
|
49
|
+
'inline_function',
|
|
50
|
+
'agentcore_code_interpreter',
|
|
51
|
+
]);
|
|
52
|
+
exports.HarnessToolNameSchema = zod_1.z
|
|
53
|
+
.string()
|
|
54
|
+
.min(1)
|
|
55
|
+
.max(64)
|
|
56
|
+
.regex(/^[a-zA-Z0-9_-]+$/, 'Tool name must contain only alphanumeric characters, hyphens, and underscores (1-64 chars)');
|
|
57
|
+
exports.RemoteMcpConfigSchema = zod_1.z.object({
|
|
58
|
+
remoteMcp: zod_1.z.object({
|
|
59
|
+
url: zod_1.z.string().min(1),
|
|
60
|
+
headers: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
61
|
+
}),
|
|
62
|
+
});
|
|
63
|
+
exports.AgentCoreBrowserConfigSchema = zod_1.z.object({
|
|
64
|
+
agentCoreBrowser: zod_1.z.object({
|
|
65
|
+
browserArn: zod_1.z.string().optional(),
|
|
66
|
+
}),
|
|
67
|
+
});
|
|
68
|
+
exports.AgentCoreCodeInterpreterConfigSchema = zod_1.z.object({
|
|
69
|
+
agentCoreCodeInterpreter: zod_1.z.object({
|
|
70
|
+
codeInterpreterArn: zod_1.z.string().optional(),
|
|
71
|
+
}),
|
|
72
|
+
});
|
|
73
|
+
exports.AgentCoreGatewayConfigSchema = zod_1.z.object({
|
|
74
|
+
agentCoreGateway: zod_1.z.object({
|
|
75
|
+
gatewayArn: zod_1.z.string().min(1),
|
|
76
|
+
credentialProviderName: zod_1.z.string().optional(),
|
|
77
|
+
}),
|
|
78
|
+
});
|
|
79
|
+
exports.InlineFunctionConfigSchema = zod_1.z.object({
|
|
80
|
+
inlineFunction: zod_1.z.object({
|
|
81
|
+
description: zod_1.z.string().min(1),
|
|
82
|
+
inputSchema: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()),
|
|
83
|
+
}),
|
|
84
|
+
});
|
|
85
|
+
exports.HarnessToolConfigSchema = zod_1.z.union([
|
|
86
|
+
exports.RemoteMcpConfigSchema,
|
|
87
|
+
exports.AgentCoreBrowserConfigSchema,
|
|
88
|
+
exports.AgentCoreCodeInterpreterConfigSchema,
|
|
89
|
+
exports.AgentCoreGatewayConfigSchema,
|
|
90
|
+
exports.InlineFunctionConfigSchema,
|
|
91
|
+
]);
|
|
92
|
+
const TOOL_TYPE_TO_CONFIG_KEY = {
|
|
93
|
+
remote_mcp: 'remoteMcp',
|
|
94
|
+
agentcore_browser: 'agentCoreBrowser',
|
|
95
|
+
agentcore_gateway: 'agentCoreGateway',
|
|
96
|
+
inline_function: 'inlineFunction',
|
|
97
|
+
agentcore_code_interpreter: 'agentCoreCodeInterpreter',
|
|
98
|
+
};
|
|
99
|
+
const TOOL_TYPES_REQUIRING_CONFIG = new Set(['remote_mcp', 'agentcore_gateway', 'inline_function']);
|
|
100
|
+
exports.HarnessToolSchema = zod_1.z
|
|
101
|
+
.object({
|
|
102
|
+
type: exports.HarnessToolTypeSchema,
|
|
103
|
+
name: exports.HarnessToolNameSchema,
|
|
104
|
+
config: exports.HarnessToolConfigSchema.optional(),
|
|
105
|
+
})
|
|
106
|
+
.superRefine((tool, ctx) => {
|
|
107
|
+
const expectedKey = TOOL_TYPE_TO_CONFIG_KEY[tool.type];
|
|
108
|
+
if (!tool.config) {
|
|
109
|
+
if (TOOL_TYPES_REQUIRING_CONFIG.has(tool.type)) {
|
|
110
|
+
ctx.addIssue({
|
|
111
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
112
|
+
message: `Tool type "${tool.type}" requires a "${expectedKey}" config`,
|
|
113
|
+
path: ['config'],
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const configKeys = Object.keys(tool.config);
|
|
119
|
+
if (configKeys.length !== 1 || configKeys[0] !== expectedKey) {
|
|
120
|
+
ctx.addIssue({
|
|
121
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
122
|
+
message: `Tool type "${tool.type}" requires "${expectedKey}" config, got "${configKeys[0]}"`,
|
|
123
|
+
path: ['config'],
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
// ============================================================================
|
|
128
|
+
// Memory Reference
|
|
129
|
+
// ============================================================================
|
|
130
|
+
exports.HarnessMemoryRefSchema = zod_1.z.object({
|
|
131
|
+
name: zod_1.z.string().min(1).optional(),
|
|
132
|
+
arn: zod_1.z.string().min(1).optional(),
|
|
133
|
+
actorId: zod_1.z.string().optional(),
|
|
134
|
+
});
|
|
135
|
+
// ============================================================================
|
|
136
|
+
// Truncation Configuration
|
|
137
|
+
// ============================================================================
|
|
138
|
+
exports.HarnessTruncationStrategySchema = zod_1.z.enum(['sliding_window', 'summarization']);
|
|
139
|
+
exports.SlidingWindowConfigSchema = zod_1.z.object({
|
|
140
|
+
slidingWindow: zod_1.z.object({
|
|
141
|
+
messagesCount: zod_1.z.number().int().min(1).optional(),
|
|
142
|
+
}),
|
|
143
|
+
});
|
|
144
|
+
exports.SummarizationConfigSchema = zod_1.z.object({
|
|
145
|
+
summarization: zod_1.z.object({
|
|
146
|
+
summaryRatio: zod_1.z.number().min(0).max(1).optional(),
|
|
147
|
+
preserveRecentMessages: zod_1.z.number().int().min(0).optional(),
|
|
148
|
+
summarizationSystemPrompt: zod_1.z.string().optional(),
|
|
149
|
+
}),
|
|
150
|
+
});
|
|
151
|
+
exports.HarnessTruncationConfigSchema = zod_1.z.object({
|
|
152
|
+
strategy: exports.HarnessTruncationStrategySchema,
|
|
153
|
+
config: zod_1.z.union([exports.SlidingWindowConfigSchema, exports.SummarizationConfigSchema]).optional(),
|
|
154
|
+
});
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// Allowed Tools
|
|
157
|
+
// ============================================================================
|
|
158
|
+
exports.AllowedToolSchema = zod_1.z
|
|
159
|
+
.string()
|
|
160
|
+
.min(1)
|
|
161
|
+
.max(64)
|
|
162
|
+
.regex(/^(\*|@?[^/]+(\/[^/]+)?)$/, 'Must be "*" or a tool name pattern (max 64 chars)');
|
|
163
|
+
// ============================================================================
|
|
164
|
+
// HarnessSpec — per-harness config file schema (harness.json)
|
|
165
|
+
// ============================================================================
|
|
166
|
+
exports.HarnessSpecSchema = zod_1.z
|
|
167
|
+
.object({
|
|
168
|
+
name: exports.HarnessNameSchema,
|
|
169
|
+
model: exports.HarnessModelSchema,
|
|
170
|
+
systemPrompt: zod_1.z.string().optional(),
|
|
171
|
+
tools: zod_1.z
|
|
172
|
+
.array(exports.HarnessToolSchema)
|
|
173
|
+
.default([])
|
|
174
|
+
.superRefine((0, zod_util_1.uniqueBy)(tool => tool.name, name => `Duplicate tool name: ${name}`)),
|
|
175
|
+
skills: zod_1.z.array(zod_1.z.string().min(1)).default([]),
|
|
176
|
+
allowedTools: zod_1.z.array(exports.AllowedToolSchema).optional(),
|
|
177
|
+
memory: exports.HarnessMemoryRefSchema.optional(),
|
|
178
|
+
maxIterations: zod_1.z.number().int().min(1).optional(),
|
|
179
|
+
maxTokens: zod_1.z.number().int().min(1).optional(),
|
|
180
|
+
timeoutSeconds: zod_1.z.number().int().min(1).optional(),
|
|
181
|
+
truncation: exports.HarnessTruncationConfigSchema.optional(),
|
|
182
|
+
containerUri: zod_1.z.string().min(1).optional(),
|
|
183
|
+
dockerfile: zod_1.z.string().min(1).optional(),
|
|
184
|
+
executionRoleArn: zod_1.z.string().optional(),
|
|
185
|
+
networkMode: constants_1.NetworkModeSchema.optional(),
|
|
186
|
+
networkConfig: agent_env_1.NetworkConfigSchema.optional(),
|
|
187
|
+
lifecycleConfig: agent_env_2.LifecycleConfigurationSchema.optional(),
|
|
188
|
+
sessionStoragePath: zod_1.z
|
|
189
|
+
.string()
|
|
190
|
+
.min(1)
|
|
191
|
+
.refine(val => val.startsWith('/mnt/'), { message: 'sessionStoragePath must be an absolute path under /mnt/' })
|
|
192
|
+
.optional(),
|
|
193
|
+
environmentVariables: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
|
|
194
|
+
/** Authorizer type for inbound requests. Defaults to AWS_IAM. */
|
|
195
|
+
authorizerType: auth_1.RuntimeAuthorizerTypeSchema.optional(),
|
|
196
|
+
/** Authorizer configuration. Required when authorizerType is CUSTOM_JWT. */
|
|
197
|
+
authorizerConfiguration: auth_1.AuthorizerConfigSchema.optional(),
|
|
198
|
+
tags: tags_1.TagsSchema.optional(),
|
|
199
|
+
})
|
|
200
|
+
.superRefine((data, ctx) => {
|
|
201
|
+
if (data.containerUri !== undefined && data.dockerfile !== undefined) {
|
|
202
|
+
ctx.addIssue({
|
|
203
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
204
|
+
message: 'containerUri and dockerfile are mutually exclusive',
|
|
205
|
+
path: ['containerUri'],
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
if (data.networkMode === 'VPC' && !data.networkConfig) {
|
|
209
|
+
ctx.addIssue({
|
|
210
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
211
|
+
message: 'networkConfig is required when networkMode is VPC',
|
|
212
|
+
path: ['networkConfig'],
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
if (data.networkMode !== 'VPC' && data.networkConfig) {
|
|
216
|
+
ctx.addIssue({
|
|
217
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
218
|
+
message: 'networkConfig is only allowed when networkMode is VPC',
|
|
219
|
+
path: ['networkConfig'],
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
if (data.authorizerType === 'CUSTOM_JWT' && !data.authorizerConfiguration?.customJwtAuthorizer) {
|
|
223
|
+
ctx.addIssue({
|
|
224
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
225
|
+
message: 'authorizerConfiguration with customJwtAuthorizer is required when authorizerType is CUSTOM_JWT',
|
|
226
|
+
path: ['authorizerConfiguration'],
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
if (data.authorizerType !== 'CUSTOM_JWT' && data.authorizerConfiguration) {
|
|
230
|
+
ctx.addIssue({
|
|
231
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
232
|
+
message: 'authorizerConfiguration is only allowed when authorizerType is CUSTOM_JWT',
|
|
233
|
+
path: ['authorizerConfiguration'],
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
//# sourceMappingURL=harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/harness.ts"],"names":[],"mappings":";;;AAAA,+CAAoD;AACpD,4CAAmD;AACnD,4CAA4D;AAC5D,kCAA8E;AAC9E,0CAAuC;AACvC,iCAAoC;AACpC,6BAAwB;AAExB,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAElE,QAAA,iBAAiB,GAAG,OAAC;KAC/B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,0BAA0B,CAAC;KAClC,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,8BAA8B,EAC9B,kGAAkG,CACnG,CAAC;AAEJ,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGtE,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,CAAC;IACN,QAAQ,EAAE,kCAA0B;IACpC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;IAClD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAChD,IAAI,EAAE,OAAC,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BAAyB,CAAC;SAClC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -6,4 +6,6 @@ export type { OnlineEvalConfig } from './online-eval-config';
|
|
|
6
6
|
export { OnlineEvalConfigSchema, OnlineEvalConfigNameSchema } from './online-eval-config';
|
|
7
7
|
export type { Policy, PolicyEngine, ValidationMode } from './policy';
|
|
8
8
|
export { PolicyEngineNameSchema, PolicyEngineSchema, PolicyNameSchema, PolicySchema, ValidationModeSchema, } from './policy';
|
|
9
|
+
export type { HarnessMemoryRef, HarnessModel, HarnessModelProvider, HarnessSpec, HarnessTool, HarnessToolType, HarnessTruncationConfig, } from './harness';
|
|
10
|
+
export { AllowedToolSchema, HarnessMemoryRefSchema, HarnessModelProviderSchema, HarnessModelSchema, HarnessNameSchema, HarnessSpecSchema, HarnessToolConfigSchema, HarnessToolNameSchema, HarnessToolSchema, HarnessToolTypeSchema, HarnessTruncationConfigSchema, HarnessTruncationStrategySchema, } from './harness';
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EACL,sCAAsC,EACtC,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAE1F,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,GACrB,MAAM,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EACL,sCAAsC,EACtC,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAErB,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAE1F,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,eAAe,EACf,uBAAuB,GACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,0BAA0B,EAC1B,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,6BAA6B,EAC7B,+BAA+B,GAChC,MAAM,WAAW,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValidationModeSchema = exports.PolicySchema = exports.PolicyNameSchema = exports.PolicyEngineSchema = exports.PolicyEngineNameSchema = exports.OnlineEvalConfigNameSchema = exports.OnlineEvalConfigSchema = exports.RatingScaleSchema = exports.NumericalRatingSchema = exports.ManagedCodeBasedConfigSchema = exports.LlmAsAJudgeConfigSchema = exports.isValidBedrockModelId = exports.ExternalCodeBasedConfigSchema = exports.EvaluatorNameSchema = exports.EvaluatorConfigSchema = exports.EvaluationLevelSchema = exports.CodeBasedConfigSchema = exports.CategoricalRatingSchema = exports.BedrockModelIdSchema = exports.MemoryStrategyTypeSchema = exports.MemoryStrategySchema = exports.MemoryStrategyNameSchema = exports.DEFAULT_STRATEGY_NAMESPACES = exports.DEFAULT_EPISODIC_REFLECTION_NAMESPACES = void 0;
|
|
3
|
+
exports.HarnessTruncationStrategySchema = exports.HarnessTruncationConfigSchema = exports.HarnessToolTypeSchema = exports.HarnessToolSchema = exports.HarnessToolNameSchema = exports.HarnessToolConfigSchema = exports.HarnessSpecSchema = exports.HarnessNameSchema = exports.HarnessModelSchema = exports.HarnessModelProviderSchema = exports.HarnessMemoryRefSchema = exports.AllowedToolSchema = exports.ValidationModeSchema = exports.PolicySchema = exports.PolicyNameSchema = exports.PolicyEngineSchema = exports.PolicyEngineNameSchema = exports.OnlineEvalConfigNameSchema = exports.OnlineEvalConfigSchema = exports.RatingScaleSchema = exports.NumericalRatingSchema = exports.ManagedCodeBasedConfigSchema = exports.LlmAsAJudgeConfigSchema = exports.isValidBedrockModelId = exports.ExternalCodeBasedConfigSchema = exports.EvaluatorNameSchema = exports.EvaluatorConfigSchema = exports.EvaluationLevelSchema = exports.CodeBasedConfigSchema = exports.CategoricalRatingSchema = exports.BedrockModelIdSchema = exports.MemoryStrategyTypeSchema = exports.MemoryStrategySchema = exports.MemoryStrategyNameSchema = exports.DEFAULT_STRATEGY_NAMESPACES = exports.DEFAULT_EPISODIC_REFLECTION_NAMESPACES = void 0;
|
|
4
4
|
var memory_1 = require("./memory");
|
|
5
5
|
Object.defineProperty(exports, "DEFAULT_EPISODIC_REFLECTION_NAMESPACES", { enumerable: true, get: function () { return memory_1.DEFAULT_EPISODIC_REFLECTION_NAMESPACES; } });
|
|
6
6
|
Object.defineProperty(exports, "DEFAULT_STRATEGY_NAMESPACES", { enumerable: true, get: function () { return memory_1.DEFAULT_STRATEGY_NAMESPACES; } });
|
|
@@ -29,4 +29,17 @@ Object.defineProperty(exports, "PolicyEngineSchema", { enumerable: true, get: fu
|
|
|
29
29
|
Object.defineProperty(exports, "PolicyNameSchema", { enumerable: true, get: function () { return policy_1.PolicyNameSchema; } });
|
|
30
30
|
Object.defineProperty(exports, "PolicySchema", { enumerable: true, get: function () { return policy_1.PolicySchema; } });
|
|
31
31
|
Object.defineProperty(exports, "ValidationModeSchema", { enumerable: true, get: function () { return policy_1.ValidationModeSchema; } });
|
|
32
|
+
var harness_1 = require("./harness");
|
|
33
|
+
Object.defineProperty(exports, "AllowedToolSchema", { enumerable: true, get: function () { return harness_1.AllowedToolSchema; } });
|
|
34
|
+
Object.defineProperty(exports, "HarnessMemoryRefSchema", { enumerable: true, get: function () { return harness_1.HarnessMemoryRefSchema; } });
|
|
35
|
+
Object.defineProperty(exports, "HarnessModelProviderSchema", { enumerable: true, get: function () { return harness_1.HarnessModelProviderSchema; } });
|
|
36
|
+
Object.defineProperty(exports, "HarnessModelSchema", { enumerable: true, get: function () { return harness_1.HarnessModelSchema; } });
|
|
37
|
+
Object.defineProperty(exports, "HarnessNameSchema", { enumerable: true, get: function () { return harness_1.HarnessNameSchema; } });
|
|
38
|
+
Object.defineProperty(exports, "HarnessSpecSchema", { enumerable: true, get: function () { return harness_1.HarnessSpecSchema; } });
|
|
39
|
+
Object.defineProperty(exports, "HarnessToolConfigSchema", { enumerable: true, get: function () { return harness_1.HarnessToolConfigSchema; } });
|
|
40
|
+
Object.defineProperty(exports, "HarnessToolNameSchema", { enumerable: true, get: function () { return harness_1.HarnessToolNameSchema; } });
|
|
41
|
+
Object.defineProperty(exports, "HarnessToolSchema", { enumerable: true, get: function () { return harness_1.HarnessToolSchema; } });
|
|
42
|
+
Object.defineProperty(exports, "HarnessToolTypeSchema", { enumerable: true, get: function () { return harness_1.HarnessToolTypeSchema; } });
|
|
43
|
+
Object.defineProperty(exports, "HarnessTruncationConfigSchema", { enumerable: true, get: function () { return harness_1.HarnessTruncationConfigSchema; } });
|
|
44
|
+
Object.defineProperty(exports, "HarnessTruncationStrategySchema", { enumerable: true, get: function () { return harness_1.HarnessTruncationStrategySchema; } });
|
|
32
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/index.ts"],"names":[],"mappings":";;;AACA,mCAMkB;AALhB,gIAAA,sCAAsC,OAAA;AACtC,qHAAA,2BAA2B,OAAA;AAC3B,kHAAA,wBAAwB,OAAA;AACxB,8GAAA,oBAAoB,OAAA;AACpB,kHAAA,wBAAwB,OAAA;AAc1B,yCAaqB;AAZnB,iHAAA,oBAAoB,OAAA;AACpB,oHAAA,uBAAuB,OAAA;AACvB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,gHAAA,mBAAmB,OAAA;AACnB,0HAAA,6BAA6B,OAAA;AAC7B,kHAAA,qBAAqB,OAAA;AACrB,oHAAA,uBAAuB,OAAA;AACvB,yHAAA,4BAA4B,OAAA;AAC5B,kHAAA,qBAAqB,OAAA;AACrB,8GAAA,iBAAiB,OAAA;AAInB,2DAA0F;AAAjF,4HAAA,sBAAsB,OAAA;AAAE,gIAAA,0BAA0B,OAAA;AAG3D,mCAMkB;AALhB,gHAAA,sBAAsB,OAAA;AACtB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,sGAAA,YAAY,OAAA;AACZ,8GAAA,oBAAoB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/index.ts"],"names":[],"mappings":";;;AACA,mCAMkB;AALhB,gIAAA,sCAAsC,OAAA;AACtC,qHAAA,2BAA2B,OAAA;AAC3B,kHAAA,wBAAwB,OAAA;AACxB,8GAAA,oBAAoB,OAAA;AACpB,kHAAA,wBAAwB,OAAA;AAc1B,yCAaqB;AAZnB,iHAAA,oBAAoB,OAAA;AACpB,oHAAA,uBAAuB,OAAA;AACvB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,gHAAA,mBAAmB,OAAA;AACnB,0HAAA,6BAA6B,OAAA;AAC7B,kHAAA,qBAAqB,OAAA;AACrB,oHAAA,uBAAuB,OAAA;AACvB,yHAAA,4BAA4B,OAAA;AAC5B,kHAAA,qBAAqB,OAAA;AACrB,8GAAA,iBAAiB,OAAA;AAInB,2DAA0F;AAAjF,4HAAA,sBAAsB,OAAA;AAAE,gIAAA,0BAA0B,OAAA;AAG3D,mCAMkB;AALhB,gHAAA,sBAAsB,OAAA;AACtB,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,sGAAA,YAAY,OAAA;AACZ,8GAAA,oBAAoB,OAAA;AAYtB,qCAamB;AAZjB,4GAAA,iBAAiB,OAAA;AACjB,iHAAA,sBAAsB,OAAA;AACtB,qHAAA,0BAA0B,OAAA;AAC1B,6GAAA,kBAAkB,OAAA;AAClB,4GAAA,iBAAiB,OAAA;AACjB,4GAAA,iBAAiB,OAAA;AACjB,kHAAA,uBAAuB,OAAA;AACvB,gHAAA,qBAAqB,OAAA;AACrB,4GAAA,iBAAiB,OAAA;AACjB,gHAAA,qBAAqB,OAAA;AACrB,wHAAA,6BAA6B,OAAA;AAC7B,0HAAA,+BAA+B,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/agentcore",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-preview.1",
|
|
4
4
|
"description": "CLI for Amazon Bedrock AgentCore",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -86,7 +86,10 @@
|
|
|
86
86
|
"@aws-sdk/client-sts": "^3.893.0",
|
|
87
87
|
"@aws-sdk/client-xray": "^3.1003.0",
|
|
88
88
|
"@aws-sdk/credential-providers": "^3.893.0",
|
|
89
|
+
"@aws/agent-inspector": "0.2.0",
|
|
89
90
|
"@commander-js/extra-typings": "^14.0.0",
|
|
91
|
+
"@opentelemetry/api": "^1.9.0",
|
|
92
|
+
"@opentelemetry/otlp-transformer": "^0.213.0",
|
|
90
93
|
"@smithy/shared-ini-file-loader": "^4.4.2",
|
|
91
94
|
"commander": "^14.0.2",
|
|
92
95
|
"dotenv": "^17.2.3",
|
package/scripts/bump-version.ts
CHANGED
|
@@ -7,17 +7,12 @@
|
|
|
7
7
|
* npx tsx scripts/bump-version.ts <bump_type> [options]
|
|
8
8
|
*
|
|
9
9
|
* Arguments:
|
|
10
|
-
* bump_type: major | minor | patch | prerelease
|
|
10
|
+
* bump_type: major | minor | patch | prerelease
|
|
11
11
|
*
|
|
12
12
|
* Options:
|
|
13
13
|
* --changelog <text> Custom changelog entry
|
|
14
14
|
* --prerelease-tag <tag> Prerelease identifier (default: beta)
|
|
15
15
|
* --dry-run Show what would be done without making changes
|
|
16
|
-
*
|
|
17
|
-
* Preview bumps (internal format):
|
|
18
|
-
* - 0.3.0 -> 0.3.0-preview.1.0
|
|
19
|
-
* - 0.3.0-preview.1.0 -> 0.3.0-preview.1.1 (preview)
|
|
20
|
-
* - 0.3.0-preview.1.0 -> 0.3.0-preview.2.0 (preview-major)
|
|
21
16
|
*/
|
|
22
17
|
import { execSync } from 'child_process';
|
|
23
18
|
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
@@ -26,7 +21,7 @@ import { existsSync, readFileSync, writeFileSync } from 'fs';
|
|
|
26
21
|
// Types
|
|
27
22
|
// ===========================
|
|
28
23
|
|
|
29
|
-
type BumpType = 'major' | 'minor' | 'patch' | 'prerelease'
|
|
24
|
+
type BumpType = 'major' | 'minor' | 'patch' | 'prerelease';
|
|
30
25
|
|
|
31
26
|
interface ParsedVersion {
|
|
32
27
|
major: number;
|
|
@@ -34,9 +29,6 @@ interface ParsedVersion {
|
|
|
34
29
|
patch: number;
|
|
35
30
|
prerelease?: string;
|
|
36
31
|
prereleaseNum?: number;
|
|
37
|
-
// For preview format: X.Y.Z-previewN.M
|
|
38
|
-
previewMajor?: number;
|
|
39
|
-
previewMinor?: number;
|
|
40
32
|
}
|
|
41
33
|
|
|
42
34
|
interface PackageJson {
|
|
@@ -58,18 +50,6 @@ interface PackageLockJson {
|
|
|
58
50
|
// ===========================
|
|
59
51
|
|
|
60
52
|
function parseVersion(version: string): ParsedVersion {
|
|
61
|
-
// First try to match preview format: X.Y.Z-preview.N.M (e.g., 0.3.0-preview.1.0)
|
|
62
|
-
const previewMatch = /^(\d+)\.(\d+)\.(\d+)-preview\.(\d+)\.(\d+)$/.exec(version);
|
|
63
|
-
if (previewMatch) {
|
|
64
|
-
return {
|
|
65
|
-
major: parseInt(previewMatch[1]!, 10),
|
|
66
|
-
minor: parseInt(previewMatch[2]!, 10),
|
|
67
|
-
patch: parseInt(previewMatch[3]!, 10),
|
|
68
|
-
previewMajor: parseInt(previewMatch[4]!, 10),
|
|
69
|
-
previewMinor: parseInt(previewMatch[5]!, 10),
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
53
|
// Match standard versions like: 1.2.3, 1.2.3-beta.1, 1.2.3-rc.0
|
|
74
54
|
const match = /^(\d+)\.(\d+)\.(\d+)(?:-([a-zA-Z]+)\.(\d+))?$/.exec(version);
|
|
75
55
|
|
|
@@ -89,11 +69,6 @@ function parseVersion(version: string): ParsedVersion {
|
|
|
89
69
|
function formatVersion(parsed: ParsedVersion): string {
|
|
90
70
|
const base = `${parsed.major}.${parsed.minor}.${parsed.patch}`;
|
|
91
71
|
|
|
92
|
-
// Handle preview format: X.Y.Z-preview.N.M
|
|
93
|
-
if (parsed.previewMajor !== undefined && parsed.previewMinor !== undefined) {
|
|
94
|
-
return `${base}-preview.${parsed.previewMajor}.${parsed.previewMinor}`;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
72
|
// Handle standard prerelease format: X.Y.Z-tag.N
|
|
98
73
|
if (parsed.prerelease !== undefined && parsed.prereleaseNum !== undefined) {
|
|
99
74
|
return `${base}-${parsed.prerelease}.${parsed.prereleaseNum}`;
|
|
@@ -121,8 +96,8 @@ function bumpVersion(current: string, bumpType: BumpType, prereleaseTag = 'beta'
|
|
|
121
96
|
});
|
|
122
97
|
|
|
123
98
|
case 'patch':
|
|
124
|
-
// If currently a prerelease
|
|
125
|
-
if (parsed.prerelease
|
|
99
|
+
// If currently a prerelease, just remove the suffix
|
|
100
|
+
if (parsed.prerelease) {
|
|
126
101
|
return formatVersion({
|
|
127
102
|
major: parsed.major,
|
|
128
103
|
minor: parsed.minor,
|
|
@@ -155,47 +130,6 @@ function bumpVersion(current: string, bumpType: BumpType, prereleaseTag = 'beta'
|
|
|
155
130
|
prereleaseNum: 0,
|
|
156
131
|
});
|
|
157
132
|
|
|
158
|
-
case 'preview':
|
|
159
|
-
// Handle preview format: X.Y.Z-previewN.M
|
|
160
|
-
// If already a preview, increment the minor preview number
|
|
161
|
-
if (parsed.previewMajor !== undefined && parsed.previewMinor !== undefined) {
|
|
162
|
-
return formatVersion({
|
|
163
|
-
major: parsed.major,
|
|
164
|
-
minor: parsed.minor,
|
|
165
|
-
patch: parsed.patch,
|
|
166
|
-
previewMajor: parsed.previewMajor,
|
|
167
|
-
previewMinor: parsed.previewMinor + 1,
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
// Otherwise, start at preview.1.0
|
|
171
|
-
return formatVersion({
|
|
172
|
-
major: parsed.major,
|
|
173
|
-
minor: parsed.minor,
|
|
174
|
-
patch: parsed.patch,
|
|
175
|
-
previewMajor: 1,
|
|
176
|
-
previewMinor: 0,
|
|
177
|
-
});
|
|
178
|
-
|
|
179
|
-
case 'preview-major':
|
|
180
|
-
// Increment the major preview number and reset minor to 0
|
|
181
|
-
if (parsed.previewMajor !== undefined && parsed.previewMinor !== undefined) {
|
|
182
|
-
return formatVersion({
|
|
183
|
-
major: parsed.major,
|
|
184
|
-
minor: parsed.minor,
|
|
185
|
-
patch: parsed.patch,
|
|
186
|
-
previewMajor: parsed.previewMajor + 1,
|
|
187
|
-
previewMinor: 0,
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
// Otherwise, start at preview.1.0
|
|
191
|
-
return formatVersion({
|
|
192
|
-
major: parsed.major,
|
|
193
|
-
minor: parsed.minor,
|
|
194
|
-
patch: parsed.patch,
|
|
195
|
-
previewMajor: 1,
|
|
196
|
-
previewMinor: 0,
|
|
197
|
-
});
|
|
198
|
-
|
|
199
133
|
default: {
|
|
200
134
|
const exhaustiveCheck: never = bumpType;
|
|
201
135
|
throw new Error(`Unknown bump type: ${exhaustiveCheck as string}`);
|
|
@@ -392,27 +326,20 @@ function parseArgs(): { bumpType: BumpType; changelog?: string; prereleaseTag: s
|
|
|
392
326
|
Usage: npx tsx scripts/bump-version.ts <bump_type> [options]
|
|
393
327
|
|
|
394
328
|
Arguments:
|
|
395
|
-
bump_type: major | minor | patch | prerelease
|
|
329
|
+
bump_type: major | minor | patch | prerelease
|
|
396
330
|
|
|
397
331
|
Options:
|
|
398
332
|
--changelog <text> Custom changelog entry
|
|
399
333
|
--prerelease-tag <tag> Prerelease identifier (default: beta)
|
|
400
334
|
--dry-run Show what would be done without making changes
|
|
401
335
|
--help, -h Show this help message
|
|
402
|
-
|
|
403
|
-
Preview bumps:
|
|
404
|
-
- 0.3.0 -> 0.3.0-preview.1.0
|
|
405
|
-
- 0.3.0-preview.1.0 -> 0.3.0-preview.1.1 (preview)
|
|
406
|
-
- 0.3.0-preview.1.0 -> 0.3.0-preview.2.0 (preview-major)
|
|
407
336
|
`);
|
|
408
337
|
process.exit(0);
|
|
409
338
|
}
|
|
410
339
|
|
|
411
340
|
const bumpType = args[0] as BumpType;
|
|
412
|
-
if (!['major', 'minor', 'patch', 'prerelease'
|
|
413
|
-
console.error(
|
|
414
|
-
`Error: Invalid bump type '${bumpType}'. Must be one of: major, minor, patch, prerelease, preview, preview-major`
|
|
415
|
-
);
|
|
341
|
+
if (!['major', 'minor', 'patch', 'prerelease'].includes(bumpType)) {
|
|
342
|
+
console.error(`Error: Invalid bump type '${bumpType}'. Must be one of: major, minor, patch, prerelease`);
|
|
416
343
|
process.exit(1);
|
|
417
344
|
}
|
|
418
345
|
|
package/scripts/bundle.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* bundle.mjs — Single command to build CLI + CDK constructs into one tarball.
|
|
2
|
+
* bundle.mjs — Single command to build CLI + CDK constructs + frontend into one tarball.
|
|
3
3
|
*
|
|
4
4
|
* This is a testing-only workflow. It does NOT modify the default build or
|
|
5
5
|
* deployment flow. The normal `npm run build` + `npm pack` pipeline is unchanged.
|
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
* At `agentcore create` time, CDKRenderer detects this tarball and installs it
|
|
10
10
|
* after the normal `npm install`, overriding the registry version.
|
|
11
11
|
*
|
|
12
|
+
* It also builds the @aws/agent-inspector frontend and copies its dist-assets
|
|
13
|
+
* into the CLI's dist/agent-inspector/ directory, overriding the npm registry version.
|
|
14
|
+
*
|
|
12
15
|
* Usage:
|
|
13
16
|
* node scripts/bundle.mjs
|
|
14
17
|
* npm run bundle
|
|
15
18
|
*
|
|
16
19
|
* Environment variables:
|
|
17
|
-
* AGENTCORE_CDK_PATH
|
|
20
|
+
* AGENTCORE_CDK_PATH — absolute path to the agentcore-l3-cdk-constructs repo
|
|
21
|
+
* AGENT_INSPECTOR_PATH — absolute path to the agent-inspector repo
|
|
18
22
|
*/
|
|
19
23
|
import { execFileSync } from 'node:child_process';
|
|
20
24
|
import * as fs from 'node:fs';
|
|
@@ -75,6 +79,30 @@ function resolveCdkPath() {
|
|
|
75
79
|
return cloneDir;
|
|
76
80
|
}
|
|
77
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Resolve the agent-inspector repo path. Priority:
|
|
84
|
+
* 1. AGENT_INSPECTOR_PATH env var
|
|
85
|
+
* 2. Sibling directory ../agent-inspector
|
|
86
|
+
*/
|
|
87
|
+
function resolveInspectorPath() {
|
|
88
|
+
if (process.env.AGENT_INSPECTOR_PATH) {
|
|
89
|
+
const p = path.resolve(process.env.AGENT_INSPECTOR_PATH);
|
|
90
|
+
if (fs.existsSync(path.join(p, 'package.json'))) {
|
|
91
|
+
log(`Using agent-inspector from AGENT_INSPECTOR_PATH: ${p}`);
|
|
92
|
+
return p;
|
|
93
|
+
}
|
|
94
|
+
console.warn(` WARNING: AGENT_INSPECTOR_PATH=${p} does not contain package.json, ignoring.`);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const sibling = path.resolve(cliRoot, '..', 'agent-inspector');
|
|
98
|
+
if (fs.existsSync(path.join(sibling, 'package.json'))) {
|
|
99
|
+
log(`Using agent-inspector from sibling directory: ${sibling}`);
|
|
100
|
+
return sibling;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
|
|
78
106
|
// ---------------------------------------------------------------------------
|
|
79
107
|
// Main
|
|
80
108
|
// ---------------------------------------------------------------------------
|
|
@@ -141,7 +169,33 @@ const bundledTarballDest = path.join(cliRoot, 'dist', 'assets', 'bundled-agentco
|
|
|
141
169
|
fs.copyFileSync(cdkTarballSrc, bundledTarballDest);
|
|
142
170
|
log(`Placed CDK tarball at ${bundledTarballDest}`);
|
|
143
171
|
|
|
144
|
-
// Step 5:
|
|
172
|
+
// Step 5: Build and bundle agent-inspector frontend (overrides the npm version)
|
|
173
|
+
const inspectorPath = resolveInspectorPath();
|
|
174
|
+
if (inspectorPath) {
|
|
175
|
+
log('Installing agent-inspector dependencies...');
|
|
176
|
+
run('npm', ['install'], { cwd: inspectorPath });
|
|
177
|
+
|
|
178
|
+
log('Building agent-inspector...');
|
|
179
|
+
run('npm', ['run', 'build'], { cwd: inspectorPath });
|
|
180
|
+
|
|
181
|
+
const inspectorDistSrc = path.join(inspectorPath, 'dist-assets');
|
|
182
|
+
const inspectorDistDest = path.join(cliRoot, 'dist', 'agent-inspector');
|
|
183
|
+
|
|
184
|
+
if (fs.existsSync(inspectorDistSrc)) {
|
|
185
|
+
if (fs.existsSync(inspectorDistDest)) {
|
|
186
|
+
fs.rmSync(inspectorDistDest, { recursive: true });
|
|
187
|
+
}
|
|
188
|
+
fs.cpSync(inspectorDistSrc, inspectorDistDest, { recursive: true });
|
|
189
|
+
log(`Copied agent-inspector frontend to ${inspectorDistDest}`);
|
|
190
|
+
} else {
|
|
191
|
+
console.error(`ERROR: agent-inspector build did not produce dist-assets/ at ${inspectorDistSrc}`);
|
|
192
|
+
process.exit(1);
|
|
193
|
+
}
|
|
194
|
+
} else {
|
|
195
|
+
log('No local agent-inspector found — using npm registry version.');
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Step 6: Bump CLI version and pack into final tarball (includes the bundled CDK tarball + frontend)
|
|
145
199
|
const cliVersionInfo = bumpVersion(cliRoot);
|
|
146
200
|
try {
|
|
147
201
|
log('Packing CLI tarball...');
|
package/scripts/copy-assets.mjs
CHANGED
|
@@ -7,6 +7,8 @@ const __dirname = path.dirname(__filename);
|
|
|
7
7
|
|
|
8
8
|
const srcDir = path.join(__dirname, '..', 'src', 'assets');
|
|
9
9
|
const destDir = path.join(__dirname, '..', 'dist', 'assets');
|
|
10
|
+
const inspectorSrcDir = path.join(__dirname, '..', 'node_modules', '@aws', 'agent-inspector', 'dist-assets');
|
|
11
|
+
const inspectorDestDir = path.join(__dirname, '..', 'dist', 'agent-inspector');
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Recursively copy directory contents, excluding specified files at root level only
|
|
@@ -44,6 +46,18 @@ try {
|
|
|
44
46
|
console.log('Copying assets...');
|
|
45
47
|
copyDir(srcDir, destDir, ['AGENTS.md']);
|
|
46
48
|
console.log('Assets copied successfully!');
|
|
49
|
+
|
|
50
|
+
// Copy @aws/agent-inspector built assets into dist/agent-inspector/ for bundled CLI
|
|
51
|
+
if (fs.existsSync(inspectorSrcDir)) {
|
|
52
|
+
console.log('Copying @aws/agent-inspector assets...');
|
|
53
|
+
copyDir(inspectorSrcDir, inspectorDestDir);
|
|
54
|
+
console.log('@aws/agent-inspector assets copied successfully!');
|
|
55
|
+
} else {
|
|
56
|
+
console.error(
|
|
57
|
+
'Error: @aws/agent-inspector dist-assets/ not found. Run "npm install" to ensure the package is available.'
|
|
58
|
+
);
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
47
61
|
} catch (error) {
|
|
48
62
|
console.error('Error copying assets:', error);
|
|
49
63
|
process.exit(1);
|