@aws/agentcore 0.3.0-preview.7.0 → 0.3.0-preview.8.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.
Files changed (50) hide show
  1. package/README.md +4 -6
  2. package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +18 -8
  3. package/dist/assets/agents/AGENTS.md +1 -1
  4. package/dist/assets/cdk/bin/cdk.ts +13 -7
  5. package/dist/assets/cdk/lib/cdk-stack.ts +1 -0
  6. package/dist/assets/cdk/test/cdk.test.ts +3 -0
  7. package/dist/cli/index.mjs +401 -370
  8. package/dist/lib/constants.d.ts +0 -1
  9. package/dist/lib/constants.d.ts.map +1 -1
  10. package/dist/lib/constants.js +0 -1
  11. package/dist/lib/constants.js.map +1 -1
  12. package/dist/lib/schemas/io/config-io.d.ts +2 -10
  13. package/dist/lib/schemas/io/config-io.d.ts.map +1 -1
  14. package/dist/lib/schemas/io/config-io.js +0 -15
  15. package/dist/lib/schemas/io/config-io.js.map +1 -1
  16. package/dist/lib/schemas/io/path-resolver.d.ts +0 -5
  17. package/dist/lib/schemas/io/path-resolver.d.ts.map +1 -1
  18. package/dist/lib/schemas/io/path-resolver.js +0 -6
  19. package/dist/lib/schemas/io/path-resolver.js.map +1 -1
  20. package/dist/schema/schemas/agent-env.d.ts +10 -0
  21. package/dist/schema/schemas/agent-env.d.ts.map +1 -1
  22. package/dist/schema/schemas/agent-env.js +17 -1
  23. package/dist/schema/schemas/agent-env.js.map +1 -1
  24. package/dist/schema/schemas/agentcore-project.d.ts +381 -1
  25. package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
  26. package/dist/schema/schemas/agentcore-project.js +33 -1
  27. package/dist/schema/schemas/agentcore-project.js.map +1 -1
  28. package/dist/schema/schemas/deployed-state.d.ts +108 -0
  29. package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
  30. package/dist/schema/schemas/deployed-state.js +2 -0
  31. package/dist/schema/schemas/deployed-state.js.map +1 -1
  32. package/dist/schema/schemas/mcp.d.ts +98 -352
  33. package/dist/schema/schemas/mcp.d.ts.map +1 -1
  34. package/dist/schema/schemas/mcp.js +55 -17
  35. package/dist/schema/schemas/mcp.js.map +1 -1
  36. package/dist/schema/schemas/primitives/online-eval-config.d.ts +1 -0
  37. package/dist/schema/schemas/primitives/online-eval-config.d.ts.map +1 -1
  38. package/dist/schema/schemas/primitives/online-eval-config.js +2 -0
  39. package/dist/schema/schemas/primitives/online-eval-config.js.map +1 -1
  40. package/dist/schema/schemas/primitives/policy.d.ts +1 -0
  41. package/dist/schema/schemas/primitives/policy.d.ts.map +1 -1
  42. package/dist/schema/schemas/primitives/policy.js +2 -0
  43. package/dist/schema/schemas/primitives/policy.js.map +1 -1
  44. package/dist/schema/schemas/primitives/tags.d.ts +6 -0
  45. package/dist/schema/schemas/primitives/tags.d.ts.map +1 -0
  46. package/dist/schema/schemas/primitives/tags.js +27 -0
  47. package/dist/schema/schemas/primitives/tags.js.map +1 -0
  48. package/package.json +2 -2
  49. package/scripts/check-old-cli.lib.mjs +13 -15
  50. package/scripts/check-old-cli.mjs +2 -3
package/README.md CHANGED
@@ -17,17 +17,15 @@ AgentCore with minimal configuration.
17
17
 
18
18
  ## Installation
19
19
 
20
- > **Upgrading from the Bedrock AgentCore Starter Toolkit?** The old Python CLI conflicts with this package. If it is
21
- > still installed, `npm install` will fail with an error telling you which package manager has it. Uninstall it first
22
- > using whichever tool you originally used:
20
+ > **Upgrading from the Bedrock AgentCore Starter Toolkit?** If the old Python CLI is still installed, you'll see a
21
+ > warning after install asking you to uninstall it. Both CLIs use the `agentcore` command name, so having both can cause
22
+ > confusion. Uninstall the old one using whichever tool you originally used:
23
23
  >
24
24
  > ```bash
25
25
  > pip uninstall bedrock-agentcore-starter-toolkit # if installed via pip
26
26
  > pipx uninstall bedrock-agentcore-starter-toolkit # if installed via pipx
27
27
  > uv tool uninstall bedrock-agentcore-starter-toolkit # if installed via uv
28
28
  > ```
29
- >
30
- > If you need to bypass the check (for example, in CI), set `AGENTCORE_SKIP_CONFLICT_CHECK=1` before installing.
31
29
 
32
30
  ```bash
33
31
  npm install -g @aws/agentcore
@@ -100,7 +98,7 @@ agentcore invoke
100
98
  | -------------------- | --------------------------------------------- |
101
99
  | `add evaluator` | Add a custom LLM-as-a-Judge evaluator |
102
100
  | `add online-eval` | Add continuous evaluation for live traffic |
103
- | `run evals` | Run on-demand evaluation against agent traces |
101
+ | `run eval` | Run on-demand evaluation against agent traces |
104
102
  | `evals history` | View past eval run results |
105
103
  | `pause online-eval` | Pause a deployed online eval config |
106
104
  | `resume online-eval` | Resume a paused online eval config |
@@ -73,13 +73,19 @@ async function main() {
73
73
  const spec = await configIO.readProjectSpec();
74
74
  const targets = await configIO.readAWSDeploymentTargets();
75
75
 
76
- // Read MCP configuration if it exists
77
- let mcpSpec;
78
- try {
79
- mcpSpec = await configIO.readMcpSpec();
80
- } catch {
81
- // MCP config is optional
82
- }
76
+ // Extract MCP configuration from project spec.
77
+ // Gateway fields are stored in agentcore.json but may not yet be on the
78
+ // AgentCoreProjectSpec type from @aws/agentcore-cdk, so we read them
79
+ // dynamically and cast the resulting object.
80
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
81
+ const specAny = spec as any;
82
+ const mcpSpec = specAny.agentCoreGateways?.length
83
+ ? {
84
+ agentCoreGateways: specAny.agentCoreGateways,
85
+ mcpRuntimeTools: specAny.mcpRuntimeTools,
86
+ unassignedTargets: specAny.unassignedTargets,
87
+ }
88
+ : undefined;
83
89
 
84
90
  // Read deployed state for credential ARNs (populated by pre-deploy identity setup)
85
91
  let deployedState: Record<string, unknown> | undefined;
@@ -301,6 +307,7 @@ export class AgentCoreStack extends Stack {
301
307
  mcpSpec,
302
308
  agentCoreApplication: this.application,
303
309
  credentials,
310
+ projectTags: spec.tags,
304
311
  });
305
312
  }
306
313
 
@@ -375,6 +382,9 @@ test('AgentCoreStack synthesizes with empty spec', () => {
375
382
  evaluators: [],
376
383
  onlineEvalConfigs: [],
377
384
  policyEngines: [],
385
+ agentCoreGateways: [],
386
+ mcpRuntimeTools: [],
387
+ unassignedTargets: [],
378
388
  },
379
389
  });
380
390
  const template = Template.fromStack(stack);
@@ -4266,7 +4276,7 @@ model** where agents, memories, and credentials are top-level arrays.
4266
4276
  The project uses a **flat resource model**. Agents, memories, and credentials are independent top-level arrays in
4267
4277
  \`agentcore.json\`. There is no binding or attachment between resources in the schema — each resource is provisioned
4268
4278
  independently. To use a memory or credential from an agent, the application code discovers the resource at runtime
4269
- (e.g., via environment variables or SDK calls).
4279
+ (e.g., via environment variables or SDK calls). Tags defined in \`agentcore.json\` flow through to deployed CloudFormation resources.
4270
4280
 
4271
4281
  ## Critical Invariants
4272
4282
 
@@ -11,7 +11,7 @@ model** where agents, memories, and credentials are top-level arrays.
11
11
  The project uses a **flat resource model**. Agents, memories, and credentials are independent top-level arrays in
12
12
  `agentcore.json`. There is no binding or attachment between resources in the schema — each resource is provisioned
13
13
  independently. To use a memory or credential from an agent, the application code discovers the resource at runtime
14
- (e.g., via environment variables or SDK calls).
14
+ (e.g., via environment variables or SDK calls). Tags defined in `agentcore.json` flow through to deployed CloudFormation resources.
15
15
 
16
16
  ## Critical Invariants
17
17
 
@@ -28,13 +28,19 @@ async function main() {
28
28
  const spec = await configIO.readProjectSpec();
29
29
  const targets = await configIO.readAWSDeploymentTargets();
30
30
 
31
- // Read MCP configuration if it exists
32
- let mcpSpec;
33
- try {
34
- mcpSpec = await configIO.readMcpSpec();
35
- } catch {
36
- // MCP config is optional
37
- }
31
+ // Extract MCP configuration from project spec.
32
+ // Gateway fields are stored in agentcore.json but may not yet be on the
33
+ // AgentCoreProjectSpec type from @aws/agentcore-cdk, so we read them
34
+ // dynamically and cast the resulting object.
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
36
+ const specAny = spec as any;
37
+ const mcpSpec = specAny.agentCoreGateways?.length
38
+ ? {
39
+ agentCoreGateways: specAny.agentCoreGateways,
40
+ mcpRuntimeTools: specAny.mcpRuntimeTools,
41
+ unassignedTargets: specAny.unassignedTargets,
42
+ }
43
+ : undefined;
38
44
 
39
45
  // Read deployed state for credential ARNs (populated by pre-deploy identity setup)
40
46
  let deployedState: Record<string, unknown> | undefined;
@@ -49,6 +49,7 @@ export class AgentCoreStack extends Stack {
49
49
  mcpSpec,
50
50
  agentCoreApplication: this.application,
51
51
  credentials,
52
+ projectTags: spec.tags,
52
53
  });
53
54
  }
54
55
 
@@ -14,6 +14,9 @@ test('AgentCoreStack synthesizes with empty spec', () => {
14
14
  evaluators: [],
15
15
  onlineEvalConfigs: [],
16
16
  policyEngines: [],
17
+ agentCoreGateways: [],
18
+ mcpRuntimeTools: [],
19
+ unassignedTargets: [],
17
20
  },
18
21
  });
19
22
  const template = Template.fromStack(stack);