From 447a3a29cf8d2bf6bb09d38afa221c8a33b44586 Mon Sep 17 00:00:00 2001 From: gitikavj Date: Thu, 15 Oct 2026 22:36:59 +0000 Subject: [PATCH 1/5] feat(add)!: scaffold runtime docs instead of code in add runtime `agentcore add runtime --type create` no longer generates agent code. It creates app// with a README.md and AGENTS.md describing exactly what the user's code needs (entry file, runtime contract per protocol, manifest, container flow), never overwriting existing files, and writes a complete runtime entry with starting values. dev, build and deploy now keep agentcore.json in sync with the code before running: a Dockerfile switches the runtime to Container, requires-python / engines.node constrain runtimeVersion (an allowed current value is kept), and the entrypoint comes from [tool.agentcore] / package.json "main". Changes are printed and written back; prechecks fail early with a pointer to the runtime's README. BREAKING CHANGE: `add runtime` drops --template, --model-provider, --model-id, --api-key and --api-base, and adds --language (required for --type create) and --protocol. Use `create --template` for starter code. --- README.md | 43 +- command.md | 9 +- docs/china-regions.md | 23 +- e2eTest/project/templates.test.ts | 316 ++++---- .../bedrock-managed-agents/README.md | 2 - .../templates/runtime-docs/python/AGENTS.md | 85 ++ .../templates/runtime-docs/python/README.md | 369 +++++++++ .../runtime-docs/typescript/AGENTS.md | 77 ++ .../runtime-docs/typescript/README.md | 304 +++++++ src/core/project/manager.export.test.ts | 5 + src/core/project/manager.test.ts | 499 ++++++++++++ src/core/project/manager.tsx | 203 ++++- src/core/project/migrate/journal.ts | 4 +- src/core/project/runtimeBuild.test.ts | 561 +++++++++++++ src/core/project/runtimeBuild.ts | 605 ++++++++++++++ src/core/project/templates/fsTree.test.ts | 17 +- src/core/project/templates/fsTree.ts | 26 +- src/core/project/templates/runtime.test.ts | 257 ++++++ src/core/project/templates/runtimeDocs.ts | 126 +++ src/handlers/project/RuntimeModelField.tsx | 10 +- .../project/add/runtime/index.test.ts | 744 ++++-------------- src/handlers/project/add/runtime/index.ts | 184 +++-- .../add/runtime/runtime.screen.test.tsx | 295 ++----- src/handlers/project/add/runtime/screen.tsx | 186 ++--- src/handlers/project/add/runtime/types.ts | 18 + src/handlers/project/bma.ts | 5 - src/handlers/project/create/index.ts | 7 +- src/handlers/project/dev/index.test.ts | 163 +++- src/handlers/project/dev/index.ts | 73 +- src/handlers/project/project.test.ts | 2 +- src/handlers/project/types.ts | 35 +- 31 files changed, 3955 insertions(+), 1298 deletions(-) create mode 100644 src/assets/templates/runtime-docs/python/AGENTS.md create mode 100644 src/assets/templates/runtime-docs/python/README.md create mode 100644 src/assets/templates/runtime-docs/typescript/AGENTS.md create mode 100644 src/assets/templates/runtime-docs/typescript/README.md create mode 100644 src/core/project/runtimeBuild.test.ts create mode 100644 src/core/project/runtimeBuild.ts create mode 100644 src/core/project/templates/runtime.test.ts create mode 100644 src/core/project/templates/runtimeDocs.ts diff --git a/README.md b/README.md index 893362b685..dc67645cc0 100644 --- a/README.md +++ b/README.md @@ -57,22 +57,35 @@ agentcore create --name MyAgent --template agent-python-strands ``` `agentcore create --template` scaffolds the template with its default model provider (Amazon -Bedrock for the model-backed templates). To use another provider, add the runtime with -`agentcore add runtime --template