Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 43 additions & 27 deletions src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,32 @@ exports[`Assets Directory Snapshots > CDK assets > cdk/cdk/.prettierrc should ma
`;

exports[`Assets Directory Snapshots > CDK assets > cdk/cdk/README.md should match snapshot 1`] = `
"# Welcome to your CDK TypeScript project
"# AgentCore CDK Project

This is a blank project for CDK development with TypeScript.
This CDK project is managed by the AgentCore CLI. It deploys your agent infrastructure into AWS using the \`@aws/agentcore-cdk\` L3 constructs.

The \`cdk.json\` file tells the CDK Toolkit how to execute your app.
## Structure

- \`bin/cdk.ts\` — Entry point. Reads project configuration from \`agentcore/\` and creates a stack per deployment target.
- \`lib/cdk-stack.ts\` — Defines \`AgentCoreStack\`, which wraps the \`AgentCoreApplication\` L3 construct.
- \`test/cdk.test.ts\` — Unit tests for stack synthesis.

## Useful commands

- \`npm run build\` compile typescript to js
- \`npm run watch\` watch for changes and compile
- \`npm run test\` perform the jest unit tests
- \`npm run build\` compile TypeScript to JavaScript
- \`npm run test\` run unit tests
- \`npx cdk synth\` emit the synthesized CloudFormation template
- \`npx cdk deploy\` deploy this stack to your default AWS account/region
- \`npx cdk diff\` compare deployed stack with current state
- \`npx cdk synth\` emits the synthesized CloudFormation template

## Usage

You typically don't need to interact with this directory directly. The AgentCore CLI handles synthesis and deployment:

\`\`\`bash
agentcore deploy # synthesizes and deploys via CDK
agentcore status # checks deployment status
\`\`\`
"
`;

Expand Down Expand Up @@ -289,21 +301,25 @@ exports[`Assets Directory Snapshots > CDK assets > cdk/cdk/package.json should m
`;

exports[`Assets Directory Snapshots > CDK assets > cdk/cdk/test/cdk.test.ts should match snapshot 1`] = `
"// import * as cdk from 'aws-cdk-lib/core';
// import { Template } from 'aws-cdk-lib/assertions';
// import * as Cdk from '../lib/cdk-stack';

// example test. To run these tests, uncomment this file along with the
// example resource in lib/cdk-stack.ts
test('SQS Queue Created', () => {
// const app = new cdk.App();
// // WHEN
// const stack = new Cdk.CdkStack(app, 'MyTestStack');
// // THEN
// const template = Template.fromStack(stack);
// template.hasResourceProperties('AWS::SQS::Queue', {
// VisibilityTimeout: 300
// });
"import * as cdk from 'aws-cdk-lib';
import { Template } from 'aws-cdk-lib/assertions';
import { AgentCoreStack } from '../lib/cdk-stack';

test('AgentCoreStack synthesizes with empty spec', () => {
const app = new cdk.App();
const stack = new AgentCoreStack(app, 'TestStack', {
spec: {
name: 'testproject',
version: 1,
agents: [],
memories: [],
credentials: [],
},
});
const template = Template.fromStack(stack);
template.hasOutput('StackNameOutput', {
Description: 'Name of the CloudFormation Stack',
});
});
"
`;
Expand All @@ -321,14 +337,14 @@ exports[`Assets Directory Snapshots > CDK assets > cdk/cdk/tsconfig.json should
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"strictPropertyInitialization": true,
"skipLibCheck": true,
"typeRoots": ["./node_modules/@types"],
"rootDir": ".",
Expand Down Expand Up @@ -2342,7 +2358,7 @@ packages = ["."]
`;

exports[`Assets Directory Snapshots > Python framework assets > python/python/strands/base/README.md should match snapshot 1`] = `
"This is a project generated by the agentcore create basic CLI tool!
"This is a project generated by the AgentCore CLI!

# Layout

Expand Down
26 changes: 19 additions & 7 deletions src/assets/cdk/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
# Welcome to your CDK TypeScript project
# AgentCore CDK Project

This is a blank project for CDK development with TypeScript.
This CDK project is managed by the AgentCore CLI. It deploys your agent infrastructure into AWS using the `@aws/agentcore-cdk` L3 constructs.

The `cdk.json` file tells the CDK Toolkit how to execute your app.
## Structure

- `bin/cdk.ts` — Entry point. Reads project configuration from `agentcore/` and creates a stack per deployment target.
- `lib/cdk-stack.ts` — Defines `AgentCoreStack`, which wraps the `AgentCoreApplication` L3 construct.
- `test/cdk.test.ts` — Unit tests for stack synthesis.

## Useful commands

- `npm run build` compile typescript to js
- `npm run watch` watch for changes and compile
- `npm run test` perform the jest unit tests
- `npm run build` compile TypeScript to JavaScript
- `npm run test` run unit tests
- `npx cdk synth` emit the synthesized CloudFormation template
- `npx cdk deploy` deploy this stack to your default AWS account/region
- `npx cdk diff` compare deployed stack with current state
- `npx cdk synth` emits the synthesized CloudFormation template

## Usage

You typically don't need to interact with this directory directly. The AgentCore CLI handles synthesis and deployment:

```bash
agentcore deploy # synthesizes and deploys via CDK
agentcore status # checks deployment status
```
32 changes: 18 additions & 14 deletions src/assets/cdk/test/cdk.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
// import * as cdk from 'aws-cdk-lib/core';
// import { Template } from 'aws-cdk-lib/assertions';
// import * as Cdk from '../lib/cdk-stack';
import * as cdk from 'aws-cdk-lib';
import { Template } from 'aws-cdk-lib/assertions';
import { AgentCoreStack } from '../lib/cdk-stack';

// example test. To run these tests, uncomment this file along with the
// example resource in lib/cdk-stack.ts
test('SQS Queue Created', () => {
// const app = new cdk.App();
// // WHEN
// const stack = new Cdk.CdkStack(app, 'MyTestStack');
// // THEN
// const template = Template.fromStack(stack);
// template.hasResourceProperties('AWS::SQS::Queue', {
// VisibilityTimeout: 300
// });
test('AgentCoreStack synthesizes with empty spec', () => {
const app = new cdk.App();
const stack = new AgentCoreStack(app, 'TestStack', {
spec: {
name: 'testproject',
version: 1,
agents: [],
memories: [],
credentials: [],
},
});
const template = Template.fromStack(stack);
template.hasOutput('StackNameOutput', {
Description: 'Name of the CloudFormation Stack',
});
});
8 changes: 4 additions & 4 deletions src/assets/cdk/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"strictNullChecks": true,
"noImplicitThis": true,
"alwaysStrict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": false,
"noFallthroughCasesInSwitch": true,
"inlineSourceMap": true,
"inlineSources": true,
"experimentalDecorators": true,
"strictPropertyInitialization": false,
"strictPropertyInitialization": true,
"skipLibCheck": true,
"typeRoots": ["./node_modules/@types"],
"rootDir": ".",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/python/strands/base/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a project generated by the agentcore create basic CLI tool!
This is a project generated by the AgentCore CLI!

# Layout

Expand Down
Loading