Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
50a6cbd
feat(typescript): scaffold TypeScript language support (WIP checkpoint)
jesseturner21 Apr 21, 2026
3417f9a
docs(typescript): add progress tracker for TS support initiative
jesseturner21 Apr 21, 2026
5bd7f82
docs(typescript): log 3417f9a in progress tracker
jesseturner21 Apr 21, 2026
a487f19
feat(typescript): unblock dev mode for TS agents (Phase 2)
jesseturner21 Apr 21, 2026
6f1aeed
docs(typescript): log a487f19 in progress tracker
jesseturner21 Apr 21, 2026
f6ed2e9
feat(typescript): author TS/Strands HTTP template assets (Phase 3)
jesseturner21 Apr 21, 2026
003f672
docs(typescript): log 6f1aeed + f6ed2e9 in progress tracker
jesseturner21 Apr 21, 2026
076a4aa
feat(typescript): add container template for TS agents (Phase 4)
jesseturner21 Apr 21, 2026
f015ce7
docs(typescript): log 003f672 + 076a4aa in progress tracker
jesseturner21 Apr 21, 2026
5c2af7d
feat(typescript): Node setup helper + create-flow wiring (Phase 5)
jesseturner21 Apr 21, 2026
122d6fb
docs(typescript): log f015ce7 + 5c2af7d in progress tracker
jesseturner21 Apr 21, 2026
c22147d
test(typescript): add TS dev-server spec + create-flow integ block; f…
jesseturner21 Apr 21, 2026
ba49229
docs(typescript): log c22147d in progress tracker
jesseturner21 Apr 21, 2026
7af265e
test(typescript): add TUI walkthrough for create TypeScript + Strands
jesseturner21 Apr 21, 2026
8dd779a
docs(typescript): log 7af265e in progress tracker
jesseturner21 Apr 21, 2026
c406af9
fix(typescript): replace Python-only guard in create validator with S…
jesseturner21 Apr 21, 2026
66da360
docs(typescript): phase 7 user docs + phase 8 verification log
jesseturner21 Apr 21, 2026
29266fa
docs(typescript): add manual test plan with progress-tracker checklist
jesseturner21 Apr 22, 2026
71ebf27
docs(typescript): add code pointers to TS test plan for targeted fixes
jesseturner21 Apr 22, 2026
b2c39c3
fix(typescript): make scaffolded TS agent installable and bootable
jesseturner21 Apr 22, 2026
aa65014
fix(typescript): run npm install during non-interactive create for TS…
jesseturner21 Apr 22, 2026
c9e3923
fix(typescript): surface real npm install error in interactive create…
jesseturner21 Apr 22, 2026
23582be
docs(typescript): add completed test plan results for TS support bug …
jesseturner21 Apr 22, 2026
85671fa
fix(typescript): make container build succeed for scaffolded TS agent
jesseturner21 Apr 23, 2026
124eaf3
fix(typescript): move tsx into dependencies so containers boot withou…
jesseturner21 Apr 23, 2026
38e9973
fix(typescript): reject --protocol MCP + --language TypeScript with a…
jesseturner21 Apr 23, 2026
340f1f3
fix(typescript): enable TypeScript option in interactive create wizard
jesseturner21 Apr 23, 2026
4f742c5
fix(typescript): gate MCP and A2A protocols behind Python-only until …
jesseturner21 Apr 23, 2026
531bb72
feat(dev): enable dev mode for TypeScript agents (CodeZip + Container…
jesseturner21 Apr 24, 2026
63b59df
fix(dev): detect TS server readiness in terminal TUI mode
jesseturner21 Apr 24, 2026
c1f6bcb
fix(typescript): use correct Strands SDK stream event types in template
jesseturner21 Apr 24, 2026
6adf1b2
fix(invoke): include text/event-stream in Accept header for HTTP invoke
jesseturner21 Apr 24, 2026
d1564eb
fix(typescript): disable memory for TypeScript agents and clean up te…
jesseturner21 Apr 27, 2026
1cb83e3
feat(typescript): add Vercel AI SDK framework for TypeScript agents
jesseturner21 Apr 28, 2026
d6aec09
fix(vercelai): fix dependency versions, model ID, and Bedrock credent…
jesseturner21 Apr 28, 2026
ea7e87e
fix(dev): prefer explicit credentials over AWS_PROFILE in container dev
jesseturner21 Apr 28, 2026
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
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
CHANGELOG.md
src/assets/**/*.md
src/assets/**/*.ts
src/assets/**/*.json
src/assets/**/*.template
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ agentcore invoke

## Supported Frameworks

| Framework | Notes |
| ------------------- | ----------------------------- |
| Strands Agents | AWS-native, streaming support |
| LangChain/LangGraph | Graph-based workflows |
| CrewAI | Multi-agent orchestration |
| Google ADK | Gemini models only |
| OpenAI Agents | OpenAI models only |
| Framework | Notes |
| ------------------- | --------------------------------------------------- |
| Strands Agents | AWS-native, streaming support (Python + TypeScript) |
| LangChain/LangGraph | Graph-based workflows |
| CrewAI | Multi-agent orchestration |
| Google ADK | Gemini models only |
| OpenAI Agents | OpenAI models only |

## Supported Model Providers

Expand Down
176 changes: 176 additions & 0 deletions docs/TYPESCRIPT_SUPPORT_HANDOFF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# TypeScript (Strands) support — work-in-progress handoff

This file captures the state of an in-progress initiative to add TypeScript (Strands SDK) as a first-class language
option in `agentcore create`, alongside Python.

**Full plan:** `~/.claude/plans/lets-add-typescript-to-jazzy-honey.md` (owner machine only; copy the plan content into
this file if it needs to travel — it already lives in the git history of the original chat thread.)

## What's been merged in this checkpoint

All changes typecheck clean (`npx tsc --noEmit` from the `agentcore-cli/` directory).

1. **Schema constants** (`src/schema/constants.ts`)
- `DEFAULT_NODE_VERSION: NodeRuntime = 'NODE_22'`
- `DEFAULT_ENTRYPOINT_BY_LANGUAGE: Record<'Python' | 'TypeScript', string>`
- `DEFAULT_RUNTIME_BY_LANGUAGE: Record<'Python' | 'TypeScript', RuntimeVersion>`

2. **UI unblock** (`src/cli/tui/screens/agent/types.ts`)
- TypeScript entry in `LANGUAGE_OPTIONS` is no longer `disabled: true`.

3. **CLI validator** (`src/cli/commands/add/validate.ts`)
- Removed the hard reject of `--language TypeScript`.
- Added a new gate: when `language === 'TypeScript'`, only `Strands` is accepted as `--framework`; every other
framework returns a clear error.

4. **CLI flag help** (`src/cli/commands/create/command.tsx`)
- `--language` description now mentions both Python and TypeScript.

5. **TUI framework filter** (`src/cli/tui/screens/generate/types.ts` + `GenerateWizardUI.tsx`)
- `getSDKOptionsForProtocol(protocol, language?)` takes an optional language arg.
- When `language === 'TypeScript'` the list is filtered down to `Strands` only.
- `GenerateWizardUI` passes `wizard.config.language` into the call site.

6. **Language-aware spec defaults** (`src/cli/operations/agent/generate/schema-mapper.ts`)
- `mapGenerateConfigToAgent` now branches on `config.language === 'TypeScript'`:
- `entrypoint` → `DEFAULT_ENTRYPOINT_BY_LANGUAGE.TypeScript` (`main.ts`)
- `runtimeVersion` → `DEFAULT_RUNTIME_BY_LANGUAGE.TypeScript` (`NODE_22`)
- Imports added from `'../../../../schema'` barrel.

## What is NOT done yet (the big chunks)

Tackling the remaining items requires a fresh context budget and ideally the actual Strands TS SDK and the AgentCore
runtime TS SDK installed locally for quick iteration.

### 1. Template assets (the bulk of the work)

Author files at `src/assets/typescript/http/strands/`:

```
base/
gitignore.template
package.json # Handlebars — pins @strands-agents/sdk + bedrock-agentcore
tsconfig.json # target ES2022, module NodeNext, strict
main.ts # entrypoint — BedrockAgentCoreApp + Agent.stream()
README.md
mcp_client/client.ts # mirrors Python mcp_client/client.py semantics
model/load.ts # mirrors Python model/load.py (per-provider branches)
capabilities/
memory/session.ts # mirrors Python capabilities/memory/session.py
```

**Confirmed SDK surface** (tarballs unpacked under `/tmp/strands-ts-check/` and `/tmp/bac-check/` in my session —
re-fetch with `npm pack` to inspect):

- `@strands-agents/sdk@1.0.0-rc.4`
- Main: `Agent`, `tool`, `BedrockModel`, `McpClient`
- Provider subpaths: `@strands-agents/sdk/models/{bedrock,anthropic,openai,google}`
- MCP: `McpClient` takes `{ transport }` — `Transport` from `@modelcontextprotocol/sdk/shared/transport.js`
- Agent streaming: `agent.stream(input)` yields `AgentStreamEvent`; filter for `ContentBlockDelta` with `textDelta`
blocks to stream text output
- `bedrock-agentcore@0.2.2`
- `BedrockAgentCoreApp` from `bedrock-agentcore/runtime` (Fastify-based, runs on 8080)
- Identity HOFs `withAccessToken` / `withApiKey` from `bedrock-agentcore/identity`

**Template shape for `main.ts`** (sketch; not committed):

```ts
import { BedrockAgentCoreApp } from 'bedrock-agentcore/runtime';
import { Agent, tool } from '@strands-agents/sdk';
import { BedrockModel } from '@strands-agents/sdk/models/bedrock';
import { loadModel } from './model/load.js';
{{#if hasMemory}}import { getMemorySessionManager } from './memory/session.js';{{/if}}

const app = new BedrockAgentCoreApp({
invocationHandler: {
process: async function* (request, context) {
const agent = new Agent({ model: loadModel(), /* sessionManager, tools */ });
for await (const event of agent.stream((request as { prompt: string }).prompt)) {
if (event.type === 'contentBlockDelta' && event.delta.type === 'textDelta') {
yield { data: event.delta.text };
}
}
},
},
});
app.run();
```

Verify this against the actual SDK event shape before finalizing — the `stream()` event type names are in
`/tmp/strands-ts-check/package/dist/src/models/streaming.d.ts`.

### 2. Container template

Under `src/assets/container/typescript/`:

- `Dockerfile` — base `public.ecr.aws/docker/library/node:22-slim`; copy `package.json` + `package-lock.json`,
`npm ci --omit=dev`, copy source, run `npx tsx main.ts` (or `tsc` build step + `node dist/main.js` if we want a build
artifact). Expose 8080.
- `dockerignore.template` — `node_modules`, `dist`, `.env*`, `.git/`.

### 3. Dev server unblock

`src/cli/operations/dev/config.ts:49-54` — the `isDevSupported` function actively rejects non-Python agents with "Dev
mode only supports Python agents." Remove that guard; the actual `codezip-dev-server.ts` already handles `!isPython` via
`npx tsx watch`.

### 4. Node setup helper + wiring

- New `src/cli/operations/node/setup.ts` mirroring `src/cli/operations/python/setup.ts` — exposes
`setupNodeProject({ projectDir })` that shells out to `npm install`.
- Wire into `src/cli/tui/screens/create/useCreateFlow.ts` around line 431 with a branch parallel to the Python setup
block.
- Extend `checkCreateDependencies({ language })` in `src/cli/external-requirements/checks.ts` (called from
`src/cli/commands/create/action.ts`) to verify `node` + `npm` when `language === 'TypeScript'`.

### 5. Packaging dispatcher (verified — no change required)

`src/lib/packaging/index.ts` already delegates to `NodeCodeZipPackager` when `isNodeRuntime(runtimeVersion)` is true.
Confirmed by reading — keep as-is.

### 6. Tests

- **Snapshots.** `src/assets/__tests__/assets.snapshot.test.ts` already has a TypeScript block (lines 106-120) that
auto-discovers `typescript/` files. After authoring templates, run `npm run test:update-snapshots` and review.
- **Create integ test.** `integ-tests/create-with-agent.test.ts` — duplicate the Python block for TypeScript, assert
`app/<name>/main.ts`, `package.json`, and `agentcore.json` has `runtimeVersion: NODE_22` + `entrypoint: main.ts`.
- **Dev-server test.** `src/cli/operations/dev/__tests__/codezip-dev-server.test.ts` — add a TS variant asserting
`getSpawnConfig()` returns `{ cmd: 'npx', args: ['tsx', 'watch', 'main.ts'], ... }`.
- **TUI harness walkthrough** mirroring an existing Python walkthrough under `integ-tests/tui/`.
- **E2E container deploy test.** `integ-tests/deploy-typescript-strands-container.test.ts`: scaffold → container build →
`agentcore deploy` against test account 325335451438 (per root CLAUDE.md, use `AWS_PROFILE=deploy`) →
`agentcore invoke --prompt "ping"` → teardown. Gate behind the same env flag used by other AWS integ tests so CI
without credentials skips cleanly.

### 7. Documentation

- `docs/frameworks.md` — add a "Supported languages" section.
- `docs/local-development.md` — TS dev loop (Node ≥ 18, `npx tsx watch`).
- `docs/commands.md` — `--language TypeScript` examples.
- `docs/container-builds.md` — TS Dockerfile example.
- `README.md` — one-line mention.

## Verification plan (when templates are done)

Refer to the full plan's section "Verification plan" — step-by-step from scratch-dir `agentcore create my-ts-agent`
through `agentcore dev`, `agentcore invoke`, and the container deploy + teardown. AWS account for deploys:
`325335451438` via `AWS_PROFILE=deploy`, per the workspace root CLAUDE.md.

## Out of scope

- LangChain/LangGraph, GoogleADK, OpenAIAgents templates for TypeScript.
- A2A and MCP protocol templates for TypeScript.
- pnpm / yarn support.
- BYO TypeScript path (already works today via `--type byo`).

## Known gotchas

- The Strands TS SDK is at `1.0.0-rc.4` (4 days old at time of writing). Pin exactly, and re-check the version +
event-type names before release.
- `BedrockAgentCoreApp` in the TS SDK is Fastify-based, not ASGI — no uvicorn equivalent needed, but the dev-server code
uses `npx tsx watch` which restarts the whole process on edits. Dev-experience parity with Python's uvicorn `--reload`
is good enough.
- The `isDevSupported` Python-only guard is easy to miss — remember to remove it.
- `BedrockAgentCoreApp.invocationHandler.process` can return an async generator; the runtime wraps it in SSE
automatically. The Python `@app.entrypoint async def invoke` equivalent on the TS side is yielding `{ data: string }`
objects from that generator.
Loading
Loading