Skip to content

fix(aws-strands): advertise RAW in the TypeScript capabilities matrix - #2614

Merged
ranst91 merged 1 commit into
mainfrom
claude/kind-herschel-56c61e
Sep 3, 2026
Merged

fix(aws-strands): advertise RAW in the TypeScript capabilities matrix#2614
ranst91 merged 1 commit into
mainfrom
claude/kind-herschel-56c61e

Conversation

@ranst91

@ranst91 ranst91 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What

DEFAULT_CAPABILITIES in integrations/aws-strands/typescript/src/endpoint.ts reported events.RAW: false, while the run loop's terminal fallback in agent.ts forwards every unmapped Strands stream event as { type: "RAW", event, source: "strands" }. A client reading GET /capabilities was told the adapter never emits RAW while it does.

  • Flip events.RAW to true.
  • capabilitiesFor needs no derivation for this flag. The fallback is not gated on emitChunkEvents or any other config, so the static default is correct in every configuration. A test pins that.
  • Fix the doc comment above StrandsAguiCapabilities, which used RAW as its example of a family this adapter does not emit. SUBAGENT_* replaces it: nothing under src/ references SUBAGENT_STARTED, SUBAGENT_FINISHED or SUBAGENT_ERROR. The ACTIVITY_* example still holds.

Test

New cases in src/__tests__/endpoint-capabilities.test.ts, in the spirit of docs-contract.test.ts: rather than hardcoding true, they script an unmapped provider event (modelRedactionEvent, the same one raw-fallback.test.ts uses) through the adapter, read off whether a RAW event actually reached the wire, and assert the served /capabilities document agrees. A second case pins the same equality for a chunk-mode agent through capabilitiesFor.

Both fail against the old flag (expected false to be true), and pass after it.

pnpm exec vitest run in integrations/aws-strands/typescript: 1613 tests across 76 files, all passing. tsc --noEmit clean.

Python

No equivalent drift. integrations/aws-strands/python/src/ag_ui_strands/endpoint.py exposes only the run endpoint and add_ping — there is no capabilities endpoint and no capability matrix in the package, so nothing there can be stale about RAW. Python does emit RAW (agent.py), it just never advertises anything.

Note for whoever merges second

The TypeScript README's capabilities section carried a paragraph documenting events.RAW: false as a known-wrong flag and telling readers not to gate on it. That caveat landed in #2611, which is already merged into main, so this PR deletes it directly rather than leaving it for a follow-up — the surrounding text now flags only STATE_DELTA / stateDelta, which remain accurate.

If another branch touches that same paragraph, keep this version: the flag it warned about is no longer wrong.

`DEFAULT_CAPABILITIES` reported `events.RAW: false` while the run loop's
terminal fallback in `agent.ts` forwards every unmapped Strands stream event
as `{ type: "RAW", event, source: "strands" }`, unconditionally. A client that
read `GET /capabilities` was told the adapter never emits RAW while it does.

Flip the flag to `true`. `capabilitiesFor` needs no derivation for it: the
fallback is not gated on `emitChunkEvents` or any other config, so the static
default is correct in every configuration.

The doc comment above `StrandsAguiCapabilities` used `RAW` as an example of a
family this adapter does not emit. Replace it with `SUBAGENT_*`, which the
adapter genuinely never emits (no reference to it anywhere in `src/`),
alongside the `ACTIVITY_*` example that still holds.

The new test derives the expectation from a real run rather than hardcoding
it: it scripts an unmapped provider event through the adapter, reads whether a
RAW event reached the wire, and asserts the served `/capabilities` document
agrees. A second case pins the same equality for a chunk-mode agent through
`capabilitiesFor`. Both fail against the old flag.

The README carried a caveat telling readers the flag was wrong and not to gate
on it. With the flag correct, that paragraph is deleted and the surrounding
text now flags only `STATE_DELTA` / `stateDelta`, which are accurate as they
stand.

Python has no equivalent drift to fix: `ag_ui_strands/endpoint.py` exposes only
the run endpoint and `add_ping`, with no capabilities endpoint and no
capability matrix to be stale.

Full suite: 1613 tests across 76 files, all passing.
@ranst91
ranst91 requested a review from a team as a code owner September 3, 2026 08:07
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Python Preview Packages

Version 0.0.0.dev1788422873 published to TestPyPI.

Warning: These packages are built from contributor code that may not yet have been vetted for correctness or security. Install at your own risk and do not use in production.

Install with uv

Add the TestPyPI index to your pyproject.toml:

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true

Then install the packages you need:

# Core SDK
uv add 'ag-ui-protocol==0.0.0.dev1788422873' --index testpypi

# Integrations (each already depends on the matching ag-ui-protocol preview)
uv add 'ag-ui-langgraph==0.0.0.dev1788422873' --index testpypi
uv add 'ag-ui-crewai==0.0.0.dev1788422873' --index testpypi
# NOTE: ag-ui-agent-spec depends on pyagentspec (git-only, not on PyPI).
# You will need to install pyagentspec separately from its git repo.
uv add 'ag-ui-agent-spec==0.0.0.dev1788422873' --index testpypi
uv add 'ag_ui_adk==0.0.0.dev1788422873' --index testpypi
uv add 'ag_ui_strands==0.0.0.dev1788422873' --index testpypi

Install with pip

pip install \
  --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple/ \
  ag-ui-protocol==0.0.0.dev1788422873

Use --extra-index-url https://pypi.org/simple/ so pip can resolve
transitive dependencies (pydantic, fastapi, etc.) from real PyPI.


Commit: 2761209

@pkg-pr-new

pkg-pr-new Bot commented Sep 3, 2026

Copy link
Copy Markdown

Open in StackBlitz

@ag-ui/a2a-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a-middleware@2614

@ag-ui/a2ui-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-middleware@2614

@ag-ui/event-throttle-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/event-throttle-middleware@2614

@ag-ui/mcp-apps-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-apps-middleware@2614

@ag-ui/mcp-middleware

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mcp-middleware@2614

@ag-ui/a2a

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2a@2614

@ag-ui/adk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/adk@2614

@ag-ui/ag2

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/ag2@2614

@ag-ui/agno

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/agno@2614

@ag-ui/aws-strands

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/aws-strands@2614

@ag-ui/claude-agent-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-agent-sdk@2614

@ag-ui/claude-managed-agents

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/claude-managed-agents@2614

@ag-ui/crewai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/crewai@2614

@ag-ui/langchain

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langchain@2614

@ag-ui/langgraph

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/langgraph@2614

@ag-ui/llamaindex

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/llamaindex@2614

@ag-ui/mastra

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/mastra@2614

@ag-ui/pydantic-ai

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/pydantic-ai@2614

@ag-ui/vercel-ai-sdk

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/vercel-ai-sdk@2614

@ag-ui/watsonx

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/watsonx@2614

@ag-ui/a2ui-toolkit

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/a2ui-toolkit@2614

create-ag-ui-app

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/create-ag-ui-app@2614

@ag-ui/client

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/client@2614

@ag-ui/core

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/core@2614

@ag-ui/encoder

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/encoder@2614

@ag-ui/proto

pnpm add https://pkg.pr.new/ag-ui-protocol/ag-ui/@ag-ui/proto@2614

commit: 3ca768e

@ranst91
ranst91 merged commit 8ad6c73 into main Sep 3, 2026
40 checks passed
@ranst91
ranst91 deleted the claude/kind-herschel-56c61e branch September 3, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants