From 17d0fa2e5333694be9a991c8c4bd465663d008cb Mon Sep 17 00:00:00 2001 From: notgitika Date: Sun, 22 Feb 2026 01:57:17 -0500 Subject: [PATCH 1/3] fix: replace dead CDK test and update stale READMEs --- .../assets.snapshot.test.ts.snap | 62 ++++++++++++------- src/assets/cdk/README.md | 26 +++++--- src/assets/cdk/test/cdk.test.ts | 32 +++++----- src/assets/python/strands/base/README.md | 2 +- 4 files changed, 77 insertions(+), 45 deletions(-) diff --git a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap index 1f1df80b..c1b44160 100644 --- a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +++ b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap @@ -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 +\`\`\` " `; @@ -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', + }); }); " `; @@ -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 create CLI tool! # Layout diff --git a/src/assets/cdk/README.md b/src/assets/cdk/README.md index 80c3df35..5fa522fc 100644 --- a/src/assets/cdk/README.md +++ b/src/assets/cdk/README.md @@ -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 +``` diff --git a/src/assets/cdk/test/cdk.test.ts b/src/assets/cdk/test/cdk.test.ts index 8a706f8e..5ff491d1 100644 --- a/src/assets/cdk/test/cdk.test.ts +++ b/src/assets/cdk/test/cdk.test.ts @@ -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', + }); }); diff --git a/src/assets/python/strands/base/README.md b/src/assets/python/strands/base/README.md index 1c180436..f42aacf8 100644 --- a/src/assets/python/strands/base/README.md +++ b/src/assets/python/strands/base/README.md @@ -1,4 +1,4 @@ -This is a project generated by the agentcore create basic CLI tool! +This is a project generated by the agentcore create CLI tool! # Layout From 6e42509add22cfbe116d1e3d8f2182100a04102d Mon Sep 17 00:00:00 2001 From: notgitika Date: Sun, 22 Feb 2026 02:04:42 -0500 Subject: [PATCH 2/3] fix: enable strict tsconfig flags in vended CDK project --- .../__tests__/__snapshots__/assets.snapshot.test.ts.snap | 8 ++++---- src/assets/cdk/tsconfig.json | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap index c1b44160..9098dee7 100644 --- a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +++ b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap @@ -337,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": ".", diff --git a/src/assets/cdk/tsconfig.json b/src/assets/cdk/tsconfig.json index ecb30f6a..c70b0d44 100644 --- a/src/assets/cdk/tsconfig.json +++ b/src/assets/cdk/tsconfig.json @@ -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": ".", From 9d7cf9df370296d7baee9c79acb6019f96612d55 Mon Sep 17 00:00:00 2001 From: gitikavj Date: Mon, 23 Feb 2026 14:44:52 -0500 Subject: [PATCH 3/3] fix: capitalize AgentCore in vended README --- src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap | 2 +- src/assets/python/strands/base/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap index 9098dee7..d3a0d71a 100644 --- a/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +++ b/src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap @@ -2358,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 CLI tool! +"This is a project generated by the AgentCore CLI! # Layout diff --git a/src/assets/python/strands/base/README.md b/src/assets/python/strands/base/README.md index f42aacf8..d6f872d8 100644 --- a/src/assets/python/strands/base/README.md +++ b/src/assets/python/strands/base/README.md @@ -1,4 +1,4 @@ -This is a project generated by the agentcore create CLI tool! +This is a project generated by the AgentCore CLI! # Layout