feat(templates): add strands-ts TypeScript runtime template - #7
Draft
Hweinstock wants to merge 5 commits into
Draft
feat(templates): add strands-ts TypeScript runtime template#7Hweinstock wants to merge 5 commits into
Hweinstock wants to merge 5 commits into
Conversation
added 5 commits
August 28, 2026 04:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds first-class TypeScript support to the CLI via a new
strands-tsproject template, ported from the upstreamsrc/assets/typescript/http/strandsassets and reformatted to match the Python template layout. Containers are intentionally out of scope for this PR (pending other work).Stacked on top of aws#2116 (memory-in-templates) — base is
memory-in-templates.Spec
What changed
src/assets/templates/strands-http-typescript/— new template (main.ts,model/load.ts,mcp_client/client.ts,memory/memory.ts,package.json,tsconfig.json,gitignore.template,README.md). Handlebars-templated; memory variables rewired to this repo's render context (memoryEnvVarName/memoryStrategies/hasMemory), mirroring the Pythonstrands-http-pythontemplate.runtime.ts— newstrands/TypeScriptresolver (+toNpmPackageName), mirroring the Python strands resolver (same memory-dir filter and spec shape).shortcuts.ts— newstrands-tsshortcut (CodeZip,NODE_22,longAndShortTermmemory).types.ts/create/add runtime—"TypeScript"added to the language enum; asuperRefinerequiresframework === "strands"for TypeScript; entrypoint/runtimeVersion derived per language.manager.tsx—installRuntimeDependenciesgained apackage.json→npm installbranch.codezip.ts—project devmaps a compiled.jsentrypoint back to its.tssource fortsx watch.Entrypoint note
The AgentCore
NODE_22runtime requires a.jsentrypoint; the deploy packager (@aws/agentcore-cdk) compilesmain.ts→main.jsvia esbuild at synth. So the runtime spec entrypoint ismain.jswhile the scaffolded source ismain.ts;project devruns the.tssource directly.package.json version pinning
Template dependencies are pinned with
~(patch-only) to avoid pulling breaking minor bumps into customer projects.Verification
Built the binary with
bun run compile:linux-x64and exercised the compiled CLI end to end against a dev AWS account (us-east-1).Automated checks
project dev+ curl (headless)project deploy+ aws cli invoke(Test stack deleted after verification.)
Validation — TypeScript without strands is rejected
Memory works both ways:
--memory noneomits thememory/dir and the memory import frommain.ts; the default (longAndShortTerm) wiresmemory/memory.tswithMEMORY_<NAME>_IDand all four strategy namespaces.How to test