Commit Graph

10887 Commits

Author SHA1 Message Date
Tyler Slaton 504e025b6d feat(showcase): register A2UI, MigrateTo{1100,182,V2}, SelfHosting stubs in mdx-registry
All 5 missing stubs now map to their existing shell-docs partials in
STUB_PARTIAL_MAP and are exported from docsComponents via stubWithPartial.
No new partial files needed — all backing .mdx files already exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 14:05:10 -07:00
Tyler Slaton fc364337c9 feat(showcase): add v1 component mapping table + legacy shim barrel
Maps all 77 JSX components from the Phase 0 audit to either
use-existing (74 entries) or shim (5 entries: A2UI, MigrateTo1100,
MigrateTo182, MigrateToV2, SelfHosting). Creates the legacy/index.ts
barrel scaffold that Task 13 will populate with shim implementations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 13:59:31 -07:00
Ran Shemtov c2d2046d73 chore: renovate aws strands canonical demo (#4730) 2026-05-19 22:57:35 +02:00
Tyler Slaton 8508073bd3 feat(showcase): add essential-content checklist and wire into verifier
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:47:10 -07:00
Tyler Slaton c63161018a fix(showcase): strip route-group segments in shell-docs verifier known-routes
Fumadocs/Next.js route groups like (other) are stripped from URL paths, so
a file at (other)/telemetry.mdx is served at /telemetry. loadKnownRoutes()
now filters those segments before registering routes, eliminating false-positive
dead-link failures for pages inside route-group directories.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 13:44:28 -07:00
Tyler Slaton a251e21126 feat(showcase): shell-docs verifier CLI runs all checks against real repo state
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 13:41:49 -07:00
Tyler Slaton c573fd0622 feat(showcase): verifier checks @/snippets and @/components import paths 2026-05-19 13:36:34 -07:00
Tyler Slaton c485ec8981 feat(showcase): verifier checks internal markdown links against known routes 2026-05-19 13:36:04 -07:00
Tyler Slaton 4a56b958dc feat(showcase): verifier checks <Snippet> regions against demo-content 2026-05-19 13:35:32 -07:00
Tyler Slaton 11a351d4b9 feat(showcase): verifier checks <InlineDemo> ids against registry 2026-05-19 13:34:56 -07:00
Tyler Slaton b0a370b41b docs(showcase): clarify REPO_ROOT derivation in shell-docs verifier 2026-05-19 13:32:58 -07:00
Tyler Slaton 52ffd2ee8a feat(showcase): scaffold shell-docs verifier with nx build check
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:31:07 -07:00
Tyler Slaton de9ecd32cc fix(showcase): make docs-porting audit resilient to unreadable MDX files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:29:18 -07:00
Sam Julien d38cfecb5c docs(shell-docs): tighten telemetry opt-out copy + useAgent API rename (#4905)
## Summary

Two surgical pickups from a closed auto-sync PR, applied directly to
shell-docs (the post-cutover canonical authoring location).

**1. `telemetry/index.mdx`** — collapse three opt-out paragraphs into a
single tighter sentence, and add the Inspector dev-console to the scope
of what `COPILOTKIT_TELEMETRY_DISABLED` covers.

**2. `snippets/use-agent.mdx`** — three independent improvements:
- `agent.id` → `agent.agentId` (current v2 API field name).
- New `<Callout>` pointing out that `useAgent({ agentId })` is required
when not using CopilotKit Cloud's public access/license key.
- `subscribe()` `useEffect` cleanup gets `[agent]` in the deps array
(exhaustive-deps; prevents stale subscriber after the agent reference
changes).

## What was deliberately skipped

The auto-sync also wanted to rewrite `@copilotkit/shared/v2` →
`@copilotkit/shared` in `use-agent.mdx`. The `/v2` subpath was
deliberately restored as the V2 canonical-form import — left alone here.

## Test plan

- [ ] CI green
- [ ] Spot-check rendered `/telemetry` page locally / on Railway preview
— opt-out paragraph reads cleaner
- [ ] Spot-check rendered `/{any-framework}/use-agent` — Callout renders
inside the `<Steps>` flow, `agent.agentId` displays where the Agent ID
line was, dependency array shows `[agent]`
2026-05-19 13:27:54 -07:00
Sam Julien fd21473fbd fix(shell-docs): backport Deep Agents + Agent Spec as hidden placeholders, repoint CTA, add redirects (#4833)
## Summary

External QA flagged that Deep Agents and Agent Spec are documented in
shell-docs but neither has shipped as a showcase integration. Both have
orphaned MDX in the dead `src/content/docs/integrations/*/` tree (which
the framework router doesn't serve), and the live
`/whats-new/langgraph-deep-agents` page had a CTA pointing at
`/langgraph/deep-agents` which 404s.

This PR backports both as **live placeholder pages, hidden from sidebar
navigation and framework pickers**, ready to be revealed in nav when the
showcase integrations are built. It also re-points the broken CTA at the
new canonical URL and adds legacy URL redirects.

Supersedes PR #4832 (which only removed the CTA).

## What changed

### New live placeholder pages

- `/deepagents` — full Deep Agents documentation, content adapted from
the upstream `integrations/langgraph/deep-agents.mdx` (the
self-referential "promoted to top-level integration" Callout removed
since this *is* the destination now)
- `/agent-spec` — Agent Spec landing
- `/agent-spec/quickstart`
- `/agent-spec/langgraph`
- `/agent-spec/wayflow`
- `/agent-spec/human-in-the-loop`

All six new MDX files are at
`showcase/shell-docs/src/content/docs/{deepagents,agent-spec}/`.

### Hiding mechanism

The framework router (`[framework]/[[...slug]]/page.tsx`) falls through
to `UnscopedDocsPage` when `getIntegration(slug)` returns `undefined`.
Neither `deepagents` nor `agent-spec` is in `registry.json` (since
neither has showcase integration code), so they automatically take this
fall-through path and `loadDoc()` resolves the MDX. No registry entries
needed.

- Sidebar nav: pages are not listed in any `meta.json`, so
`buildNavTree()` (which iterates `meta.json` `pages` arrays) silently
omits them
- Framework picker / `<IntegrationGrid>`: pulls from `registry.json`,
which only contains integrations with manifests under
`showcase/integrations/`. Neither placeholder is in the registry —
neither surfaces in pickers
- Existing `<IntegrationGrid exclude={["agent-spec", ...]}>` calls
remain no-ops (the grid renders a static link, not a registry-driven
list) — no behavior change

### CTA fix

`whats-new/langgraph-deep-agents.mdx` CTA now points at `/deepagents`
(was: `/langgraph/deep-agents`, 404).

### Redirect entries

Two new `LEGACY_CHAINS_EXACT` rules in `src/lib/seo-redirects.ts`:

- `L12`: `/langgraph/deep-agents → /deepagents`
- `L13`: `/langgraph-python/deep-agents → /deepagents`

Together these catch the legacy-slug upstream URL (`/langgraph/...`) and
the post-slug-rename path that the existing rename system would
otherwise produce (`/langgraph-python/...`). Both land on the canonical
placeholder.

No new redirects are needed for Agent Spec — `agent-spec` is already in
the `FRAMEWORKS` array, and the subpath-rename redirects it generates
now resolve to live placeholder pages rather than 404s.

## Future evolution

When the Deep Agents or Agent Spec showcase integration ships:

1. Add a manifest at `showcase/integrations/{integration}/manifest.yaml`
(or wherever new integrations register)
2. The registry regenerates, the framework picker surfaces the
integration, sidebar nav surfaces its pages
3. The placeholder content can be replaced with real demo-linked content
and the redirects remain valid

## Files changed

- `showcase/shell-docs/src/content/docs/deepagents/index.mdx` (new, 370
lines)
- `showcase/shell-docs/src/content/docs/agent-spec/index.mdx` (new, 54
lines)
- `showcase/shell-docs/src/content/docs/agent-spec/quickstart.mdx` (new,
509 lines)
- `showcase/shell-docs/src/content/docs/agent-spec/langgraph.mdx` (new,
114 lines)
- `showcase/shell-docs/src/content/docs/agent-spec/wayflow.mdx` (new,
114 lines)
-
`showcase/shell-docs/src/content/docs/agent-spec/human-in-the-loop.mdx`
(new, 119 lines)
-
`showcase/shell-docs/src/content/docs/whats-new/langgraph-deep-agents.mdx`
(1 line — CTA repoint)
- `showcase/shell-docs/src/lib/seo-redirects.ts` (15 lines — two new
redirect entries)

## Test plan

- [ ] `/deepagents` renders the Deep Agents documentation
- [ ] `/agent-spec`, `/agent-spec/quickstart`, `/agent-spec/langgraph`,
`/agent-spec/wayflow`, `/agent-spec/human-in-the-loop` all render
- [ ] Neither page appears in the sidebar nav on any framework
- [ ] Neither integration appears in the framework picker or in
`<IntegrationGrid>` listings
- [ ] `/whats-new/langgraph-deep-agents` CTA points at `/deepagents` and
lands on the placeholder
- [ ] `/langgraph/deep-agents` 301s to `/deepagents`
- [ ] `/langgraph-python/deep-agents` 301s to `/deepagents`

## Hook bypass

Pre-commit `test-and-check-packages` fails on a pre-existing
`@copilotkit/web-inspector` telemetry test on main (jsdom not installed
in fresh worktrees). Commits used
`LEFTHOOK_EXCLUDE=test-and-check-packages` to bypass only that one hook;
lint-fix, commitlint, sync-lockfile, and check-binaries all ran and
passed.
2026-05-19 13:27:28 -07:00
Tyler Slaton 245a77e768 feat(showcase): add CLI entry for docs-porting audit and run end-to-end
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:26:25 -07:00
github-actions[bot] 2843f61581 style: auto-fix formatting 2026-05-19 20:25:47 +00:00
Tyler Slaton e4b52861a5 fix(showcase): strip code blocks and dedup snippet imports in MDX reference extraction
Fenced code blocks are now stripped before extracting JSX component
references so samples inside ``` blocks don't get counted as real
component refs. snippetImports is deduplicated via a Set consistent
with how components are handled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 13:24:15 -07:00
Ran Shem Tov 6389d5111b chore: refresh showcase validate-pins hash after main merge 2026-05-19 15:23:01 -05:00
Tyler Slaton 23f562afb5 feat(showcase): extract MDX component refs and snippet imports in porting audit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:21:42 -07:00
Tyler Slaton 9a74927635 fix(showcase): normalize line endings and clean up tempdirs in docs-porting audit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:19:51 -07:00
Tyler Slaton 3e4eac44d9 feat(showcase): add per-framework page diff to docs-porting audit 2026-05-19 13:16:04 -07:00
Tyler Slaton ef991db232 fix(showcase): export READY_SLUGS and drop brittle length assertion in docs-porting audit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-19 13:13:51 -07:00
Tyler Slaton aef5637aa6 feat(showcase): scaffold docs-porting audit script with unready-framework enumeration 2026-05-19 13:10:42 -07:00
Ran Shemtov bf7898c446 Merge branch 'main' into chore/upgrade-strands-integration-demo 2026-05-19 19:27:50 +02:00
github-actions[bot] a3654c3f08 style: auto-fix formatting 2026-05-19 17:04:12 +00:00
Alem Tuzlak 393b75facb feat(showcase/ms-agent-python): LGP parity sweep — 33/37 cells green (#4924)
## Summary

Brings `ms-agent-python` to one-to-one parity with `langgraph-python`
(the D5 north star). Playwright e2e suite goes **from 49/108 (~26%) →
164/178 (~92%)**, **33 of 37 cells fully green**.

| | Before | After |
| --- | --- | --- |
| ✅ Green cells | ~5 | 33 |
| Tests passing | 49 / 108 | 164 / 178 |
| Pass rate | ~26% | ~92% |

## Highlights

**Manifest parity:** dropped 4 MAF-only cells with no LGP analog
(`agentic-chat-reasoning`, `hitl-in-chat-booking`, `shared-state-write`,
`reasoning-default-render`), renamed `byoc-hashbrown` →
`declarative-hashbrown` and `byoc-json-render` →
`declarative-json-render` to match LGP. Ported LGP `_shared/`,
`_shared/interrupt-fallback-slots.ts`, and `demos/layout.tsx`.

**Cells ported verbatim from LGP** (page + e2e spec): every shared cell
— agentic-chat, auth, beautiful-chat, chat-customization-css,
chat-slots, declarative-*, frontend-tools*, gen-ui-*, headless-*,
hitl-in-*, shared-state-*, subagents, tool-rendering* (4 variants),
a2ui-fixed-schema, agent-config, mcp-apps, multimodal, open-gen-ui*,
prebuilt-*, readonly-state-agent-context, reasoning-*, voice.

**Chat client swap.** `OpenAIChatClient` (Responses API) →
`OpenAIChatCompletionClient`. Root cause of the cross-cell post-tool
ChatClientException family: Responses is stateful, sends only NEW items
per leg, relies on `previous_response_id`. aimock has no view of
server-side state, so second-leg requests arrived without the user
message — fixture matchers keyed on `userMessage` couldn't fire and runs
fell through to real OpenAI. ChatCompletions sends full history every
leg, matching LGP's wire shape. The reasoning agent is the one exception
(kept on Responses since it needs the `reasoning_summary_text.delta`
event path).

**`@ag-ui/client` `^0.0.43` → `^0.0.53`** (matches google-adk/LGP).
Fixes the REASONING_* Zod discriminator trap. Lockfile regenerated in
isolation.

**Six new / re-added MAF agent backends mirroring LGP behavior:**

| File | LGP reference | FastAPI path |
| --- | --- | --- |
| `reasoning_agent.py` | `reasoning_agent.py` | `/reasoning` |
| `tool_rendering_agent.py` | `tool_rendering_agent.py` |
`/tool-rendering` |
| `gen_ui_agent.py` | `gen_ui_agent.py` | `/gen-ui-agent` |
| `shared_state_streaming.py` | `shared_state_streaming.py` |
`/shared-state-streaming` |
| `readonly_state_agent_context.py` | same |
`/readonly-state-agent-context` |
| `headless_complete_agent.py` | `headless_complete.py` |
`/headless-complete` |

State-bearing agents (`gen_ui_agent`, `shared_state_streaming`) use
MAF's `state_update(text=..., state={...})` (equivalent of LGP's
`Command(update={...})`) plus `predict_state_config` for per-token
tool-arg streaming.

**A2UI tool rename** `render_a2ui` → `_design_a2ui_surface` across
`tools/generate_a2ui.py`, `tools/__init__.py`, and
`src/agents/{a2ui_dynamic,agent,beautiful_chat}.py`. LGP renamed to
avoid the A2UI middleware's auto-bypass; shared d5-all.json fixtures key
responses on the new name. Also patched 4 declarative-gen-ui aimock
fixtures to pass `context` arg in the first-leg `generate_a2ui` call
(`agent_framework` doesn't auto-inject `AgentSession` into our `@tool`
function so `session=None`, and the secondary-LLM `user_content` was
defaulting to a catch-all string that matched the KPI fixture for every
pill).

**Test infrastructure:** capped local `workers: 4` + `retries: 1`. CI
keeps `workers: 1, retries: 2`. `agent_framework.Agent` instance is
reused across requests and the shared OpenAI HTTP client serialises
concurrent SSE streams; >4 workers makes 30s timeouts inevitable for a
handful of cells. Hard-data: workers=1 serial = 164 passed (16.8 min);
workers=4+retries=1 = 164 passed (7.2 min); workers=undefined parallel =
159 passed. Same green set, ~2x faster. Long-term upstream fix is
per-request `Agent(...)` instantiation in `agent_framework_ag_ui`.

## Remaining 14 failures (4 cells)

Documented per-cell in [the Notion D5 sweep
doc](https://www.notion.so/3653aa38185281479e37dbf3569ababa) with
specific next-pass actions:

- `declarative-gen-ui` (2) — A2UI surface activity not mounting in DOM
despite correct payload arriving. Suspected `@copilotkit/*@next`
(1.55.2-next.1) vs LGP's 1.57.1 version mismatch in the A2UI renderer.
- `multimodal` (4) — image/PDF attachment forwarding not wired in
`multimodal_agent.py`.
- `tool-rendering-default-catchall` (6) +
`tool-rendering-reasoning-chain` (4) — multi-leg chain fixture chaining;
needs aimock-log traces per chain.

## Test plan

- [x] Run `BASE_URL=http://localhost:3114
../../harness/node_modules/.bin/playwright test --reporter=line` from
`showcase/integrations/ms-agent-python` — 164 passing, 14 failing, 7
skipped.
- [x] Verified each of the 5 "flaky-under-parallel-load" cells
(`agent-config`, `agentic-chat`, `gen-ui-tool-based`, `auth`,
`beautiful-chat`) passes 100% in isolation.
- [x] Confirmed `workers: 1` serial vs `workers: 4` + `retries: 1`
produce the same pass set (164).
- [x] Manual headed Playwright walkthrough of every newly-green cell.
- [ ] CI green (depends on the test-infra changes landing cleanly in the
CI env).

Migration tracking: [MAF migration
doc](https://www.notion.so/3643aa38185281e4bdc8fd8972e56b5f) · [D5 sweep
+ next-pass
plan](https://www.notion.so/3653aa38185281479e37dbf3569ababa)
2026-05-19 18:53:41 +02:00
Ran Shem Tov 00ce3a9332 chore: ratchet showcase baseline to 95 + sync strands lockfile 2026-05-19 11:45:34 -05:00
github-actions[bot] 113d900702 style: auto-fix formatting 2026-05-19 16:41:33 +00:00
Alem Tuzlak 5cd77233b7 feat(showcase/ms-agent-python): LGP parity sweep — 33/37 cells green
Brings ms-agent-python to one-to-one parity with langgraph-python (the D5
north star). Playwright e2e suite goes from 49/108 (~26%) → 164/178 (~92%),
33 of 37 cells fully green.

Manifest parity:
- Drop 4 MAF-only cells with no LGP analog: agentic-chat-reasoning,
  hitl-in-chat-booking, shared-state-write, reasoning-default-render.
  Reasoning is handled by reasoning-default + reasoning-custom (LGP);
  booking pill folds into hitl-in-chat; shared-state-write was a TODO stub.
- Rename byoc-hashbrown → declarative-hashbrown and byoc-json-render →
  declarative-json-render. Demo dir, API route dir, and frontend agent id
  follow LGP's naming. Python module files retain the legacy `byoc_*`
  prefix and FastAPI paths stay `/byoc-hashbrown` / `/byoc-json-render`
  (matches LGP's "module name retains legacy graph id" convention).
- Port LGP `_shared/`, `_shared/interrupt-fallback-slots.ts`, and
  `demos/layout.tsx` for one-to-one parity.

Cells ported verbatim from LGP (page + spec):
- agentic-chat, auth, beautiful-chat, chat-customization-css, chat-slots,
  declarative-gen-ui, declarative-hashbrown, declarative-json-render,
  frontend-tools, frontend-tools-async, gen-ui-agent, gen-ui-interrupt,
  gen-ui-tool-based, headless-complete, headless-simple, hitl-in-app,
  hitl-in-chat, shared-state-read, shared-state-read-write,
  shared-state-streaming, subagents, tool-rendering, plus all four
  tool-rendering* variants, a2ui-fixed-schema, agent-config, mcp-apps,
  multimodal, open-gen-ui, open-gen-ui-advanced, prebuilt-popup,
  prebuilt-sidebar, readonly-state-agent-context, reasoning-default,
  reasoning-custom, voice.

Backend infrastructure:
- Swap shared `OpenAIChatClient` (Responses API) → `OpenAIChatCompletionClient`
  (ChatCompletions). Root cause of the cross-cell post-tool ChatClientException
  family: Responses API is stateful and only sends NEW items per leg,
  relying on `previous_response_id` for history. aimock has no view of
  that server-side state, so second-leg requests arrived without the
  user message — fixture matchers keyed on `userMessage` couldn't fire
  and the run fell through to real OpenAI. ChatCompletions sends full
  history every leg, matching the LGP wire shape.
- Bump @ag-ui/client ^0.0.43 → ^0.0.53 (matches google-adk/LGP). Fixes
  the REASONING_* Zod discriminator trap on the catch-all agent.
- Regenerate package-lock.json in isolation outside the pnpm monorepo so
  npm-arborist doesn't resolve transitives against pnpm's hoisted
  symlinks (avoid 40+ `../../../node_modules/.pnpm/...` paths in the
  lockfile that break `npm ci` inside Docker).
- Add `yaml` (^2.8.4) for the new `src/app/demos/layout.tsx` that reads
  manifest.yaml for per-cell page titles (LGP parity).

New / re-added MAF agent backends with LGP-equivalent behavior:
- reasoning_agent.py (uses Responses API explicitly — the only chat
  client that emits AG-UI REASONING_MESSAGE_* events; rest of the
  integration stays on ChatCompletions).
- tool_rendering_agent.py (non-reasoning sibling of the existing
  reasoning_chain variant; shares tool surface via direct imports so
  they can never drift apart; routes the three catchall cells to a
  non-reasoning backend so the default renderer spec stops failing on
  leaked reasoning blocks).
- gen_ui_agent.py — `set_steps` tool + `steps` state schema +
  `predict_state_config` mirrors LGP's StateStreamingMiddleware shape.
- shared_state_streaming.py — `write_document` tool with
  `predict_state_config` that streams the `document` arg into
  `state.document` per-token.
- readonly_state_agent_context.py — minimal agent that consumes
  frontend-provided `useAgentContext` entries; no tools.
- headless_complete_agent.py — three deterministic tools (`get_weather`,
  `get_stock_price`, `get_revenue_chart`) mounted at /headless-complete
  on the mcp-apps runtime (was routing to catch-all sales agent, which
  returned seeded-random weather instead of the deterministic 68°F the
  test asserts on).

Wiring:
- copilotkit/route.ts: register the new agents, drop the stale
  shared-state-write entry, route all three tool-rendering variants to
  the non-reasoning backend (the reasoning-chain cell keeps its own
  dedicated path), register reasoning-default + reasoning-custom on
  /reasoning, register gen-ui-agent on /gen-ui-agent,
  shared-state-streaming on /shared-state-streaming,
  readonly-state-agent-context on its dedicated path.
- copilotkit-mcp-apps/route.ts: register headless-complete agent (was
  missing — the strict useAgent runtime sync in the newer
  @copilotkit/react-core surfaced the gap).
- copilotkit-declarative-hashbrown/route.ts + copilotkit-declarative-json-render/route.ts:
  new dedicated runtimes; agent IDs and runtime URLs follow LGP.
- copilotkit-declarative-gen-ui/route.ts: drop non-LGP `openGenerativeUI:
  false` for parity.

A2UI tool rename — `render_a2ui` → `_design_a2ui_surface`:
- Ported LGP's `tools/generate_a2ui.py` (LGP renamed the secondary-LLM
  tool to `_design_a2ui_surface` to avoid the A2UI middleware's bypass;
  shared d5-all.json fixtures key the response on this name).
- Renamed every `render_a2ui` occurrence in src/agents/{a2ui_dynamic,
  agent,beautiful_chat}.py and `tools/__init__.py`.
- Updated 4 declarative-gen-ui aimock fixtures to pass `context` arg in
  the first-leg `generate_a2ui` tool call (agent_framework doesn't
  auto-inject AgentSession into our @tool function so `session=None` and
  the secondary-LLM `user_content` was defaulting to a catch-all string
  containing "KPI dashboard" — every pill matched the KPI fixture).

Aimock router patch persisted alongside the integration changes:
hasToolResult matcher restricted to scan only messages after the last
user message (was global). The patch lives in F:/projects/cpk/aimock —
upstream PR pending.

Test infrastructure:
- playwright.config.ts: cap local workers at 4 + retries at 1. CI keeps
  workers=1, retries=2. `agent_framework.Agent` is reused across requests
  and the shared OpenAI HTTP client serialises concurrent SSE streams;
  >4 workers makes 30s timeouts inevitable on a few cells. Confirmed
  with hard data: workers=1 = 164 passed (16.8 min), workers=4+retries=1
  = 164 passed (7.2 min), workers=undefined = 159 passed. Same green
  set, ~2x faster. Long-term upstream fix is per-request Agent
  instantiation in agent_framework_ag_ui.

Remaining 14 failures across 4 cells documented per-cell in the Notion
D5 sweep doc (declarative-gen-ui A2UI surface mounting, multimodal
attachment forwarding, tool-rendering-default-catchall multi-pill chain,
tool-rendering-reasoning-chain multi-leg chains). Each has a specific
next-pass action.
2026-05-19 18:36:01 +02:00
Jordan Ritter 4e1b5ad373 chore: release monorepo v1.57.3 (#4922)
## Release monorepo v1.57.3

**Scope:** `monorepo` | **Bump:** `patch`

---

### How this release process works

1. **This PR was created automatically** by the "release / create-pr"
workflow.
   It bumped the `monorepo` packages to `1.57.3`
   and generated AI-enhanced release notes.

2. **CI runs on this PR** — the full test suite (unit tests, lint, type
checks, build)
   must pass before merging. This is the review gate.

3. **Review the release notes** in `release-notes.md` in this PR.
If a Notion draft was created, you can edit the release notes there
before merging.

4. **When this PR is merged**, the `release / publish` workflow
automatically:
   - Builds all packages
   - Publishes the `monorepo` packages to npm at version `1.57.3`
   - Creates git tag `monorepo/v1.57.3`
   - Creates a GitHub Release with the final release notes

### Before merging

- [ ] CI is green (tests, lint, types, build)
- [ ] Version bumps look correct
- [ ] Release notes are accurate (edit in Notion if a draft was created)

---

> **Do not merge until CI is fully green.** The full test suite runs
automatically on this PR.
v1.57.3
2026-05-19 09:08:48 -07:00
Ran Shem Tov 4de3562bc8 chore: revert docker route override change 2026-05-19 11:07:17 -05:00
github-actions[bot] 499740952b style: auto-fix formatting 2026-05-19 11:06:47 -05:00
Ran Shem Tov 70b4d28063 chore: use latest agui strands integration 2026-05-19 11:06:47 -05:00
Ran Shem Tov a6c3fcbc2a test(showcase): strands-python uses showcase shell, set hasAppMode true
starter-smoke @interaction branches on `starter.hasAppMode`: when true it
clicks the App/Chat toggle and asserts the canvas + textarea; when false
it assumes a CopilotSidebar layout and asserts "Popup Assistant".

Strands now renders the same showcase shell as langgraph-python (App/Chat
toggle + ExampleCanvas), so the smoke test must take the `hasAppMode:
true` branch. Without this flag the test waits for "Popup Assistant" text
that never appears and times out.
2026-05-19 11:06:47 -05:00
Ran Shem Tov d07c058b33 chore(strands): drop langgraph naming from docker smoke stack
Previous commit wired LANGGRAPH_DEPLOYMENT_URL into the strands route.ts
to satisfy the verbatim langgraph-python docker-compose.test.yml — that
leaks the wrong runtime's name into a strands-only file.

Instead, mark docker-compose.test.yml as allowed-divergence for strands
(parity manifest) and give strands its own compose stack:
  - agent on port 8000 (matches `npm run dev:agent` locally)
  - healthcheck on /health (already exposed by main.py)
  - app reads AGENT_URL (strands-native), no LANGGRAPH_DEPLOYMENT_URL

Reverts:
  - Dockerfile.agent: EXPOSE/uvicorn back to 8000
  - main.py: drop the /ok endpoint added in 2994b3a96
  - route.ts: drop the LANGGRAPH_DEPLOYMENT_URL fallback

Keeps:
  - Dockerfile.agent: COPY src/ ./src/ (needed for db.csv + a2ui schemas)
2026-05-19 11:06:47 -05:00
Ran Shem Tov 4341880dec chore(strands): align agent with verbatim docker smoke stack
The smoke-test docker-compose.test.yml is a verbatim copy of the canonical
langgraph-python stack, which expects:
  - agent listening on port 8123
  - readiness probe at /ok
  - app reading LANGGRAPH_DEPLOYMENT_URL for the agent URL

Bring the strands agent in line:
  - Dockerfile.agent: COPY src/ so main.py can find db.csv +
    a2ui/schemas/flight_schema.json; expose 8123 and bind uvicorn to it
  - main.py: add /ok alongside existing /health endpoint
  - route.ts: read LANGGRAPH_DEPLOYMENT_URL as a fallback so the verbatim
    compose env wires through; AGENT_URL / STRANDS_AGENT_URL still win
    for local dev overrides
2026-05-19 11:06:47 -05:00
github-actions[bot] 2db98e69ee style: auto-fix formatting 2026-05-19 11:06:47 -05:00
Ran Shem Tov d94cb38178 chore(strands): fix CI on canonical demo renovation
- Drop local editable uv.sources for ag_ui_strands; pin agent deps to
  exact resolved versions so CI resolves from PyPI
- Switch docker-route-override.ts to type-only NextRequest import across
  strands-python and the three langgraph integrations to satisfy
  oxlint + restore parity-check
- Pin showcase/integrations/strands deps to exact versions matching the
  upgraded agent (ag-ui-protocol, strands-agents, ag_ui_strands, copilotkit,
  langchain, langchain-openai, openai, @copilotkit/* @ 1.56.5, @ag-ui/client
  @ 0.0.52); add missing @copilotkit/react-ui and @copilotkit/shared
- Ratchet validatePinsFailCount baseline 98 -> 87 (drift decreased)
2026-05-19 11:06:44 -05:00
Ran Shem Tov 2d1ede341c chore: renovate aws strands canonical demo 2026-05-19 11:06:28 -05:00
tylerslaton efae3dfb5b chore: release monorepo v1.57.3 2026-05-19 15:59:44 +00:00
Tyler Slaton e02908d688 Fix rAF teardown errors in CopilotChat perf tests and lefthook script (#4921)
## What does this PR do?

This PR addresses two issues:

1. **CopilotChat perf test flakiness**: Fixes unhandled errors from
`@tanstack/virtual-core` 3.13.18's `scrollToIndex` method, which
schedules nested `requestAnimationFrame` callbacks without null-checking
`targetWindow`. When the virtualizer unmounts and sets `targetWindow =
null`, pending rAF callbacks throw "Cannot read properties of null
(reading 'requestAnimationFrame')". The fix wraps both
`globalThis.requestAnimationFrame` and `window.requestAnimationFrame` to
catch and swallow this known tanstack teardown error while allowing
other errors to propagate.

2. **Lefthook script robustness**: Fixes the pre-commit
oxlint/oxfmt/ruff hook to properly handle staged files with spaces or
special characters. The old `[ -n "{staged_files}" ]` check failed with
"unexpected operator" errors because lefthook interpolates file lists as
space-separated words. The fix uses `set --` to convert the file list
into positional arguments, enabling proper shell-portable testing and
quoting.

## Related PRs and Issues

- Addresses flakiness in `CopilotChat perf — re-render regression` test
suite
- Improves reliability of pre-commit linting hooks

## Checklist

- [x] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] Changes are covered by existing test infrastructure (perf tests
now pass reliably)
- [x] "Allow edits by maintainers" is checked

https://claude.ai/code/session_01MvPWxQAVmUmZRB6dTnJyjU
2026-05-19 08:57:32 -07:00
Claude ce3084700c fix(release): swallow tanstack/virtual rAF teardown error in perf test
The release-PR workflow's pre-commit hook ran the full test suite and
failed because @tanstack/virtual-core 3.13.18 has a latent bug — its
scrollToIndex schedules a nested rAF that calls
`this.targetWindow.requestAnimationFrame(verify)` with no null-check.
The virtualizer's cleanup nulls `targetWindow` on React unmount, so the
queued rAF fires post-unmount and throws. All 1170 tests passed, but
vitest exited non-zero from the unhandled error.

Wrap rAF on both globalThis and window (separate bindings in
vitest+jsdom; tanstack uses `targetWindow.rAF` which resolves to
`window.rAF`) so callbacks hitting this specific error are swallowed.

Also fix the lint-fix lefthook command — `[ -n "{staged_files}" ]`
broke on multi-file expansion ("[: <path>: unexpected operator")
because lefthook interpolates files as space-separated words, not a
quoted string. Use `set --` to put them in positional args.
2026-05-19 15:28:07 +00:00
Jordan Ritter 3981a7e6fb fix(showcase): un-skip declarative-gen-ui KPI + StatusReport tests (#4918)
## Summary
- Un-skip KPI dashboard and Status report tests in declarative-gen-ui
- Fix CSS selector mismatch: tests used inline-style selectors but
components use Tailwind classes
- Switch to existing `data-testid` attributes (`declarative-metric`,
`declarative-status-badge`)

## Root cause
Tests were skipped citing "Railway slowness" (W8-7) but the real issue
was CSS selector mismatch — inline-style queries never matched
Tailwind-rendered components.

## Test plan
- [x] 6/6 declarative-gen-ui tests pass on LGP (port 3100)
- [x] 6/6 pass on LGT (port 3101)
- [x] Specs byte-identical between LGP and LGT

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-19 07:58:50 -07:00
Jordan Ritter 19271bf5c9 Un-skip KPI dashboard and Status report declarative-gen-ui tests
The two tests were skipped (W8-7) under the assumption that Railway
agent slowness caused timeouts. The actual root cause was twofold:

1. Fixture content+toolCalls split (already fixed in 2436adba6 for all
   four pills including KPI and StatusReport).

2. CSS selector mismatch: the tests used inline-style selectors
   (letter-spacing: 0.12em, border-radius: 999) but the renderers use
   Tailwind classes (tracking-wider, rounded-md). Switched both tests
   to use the data-testid attributes already present on the components
   (declarative-metric, declarative-status-badge).

Verified 6/6 pass on both LGP (3100) and LGT (3101). LGP and LGT
test specs are byte-identical.
2026-05-19 06:01:31 -07:00
Jordan Ritter 379923f984 fix(showcase): un-skip hitl-in-app downgrade + fix beautiful-chat networkidle (#4917)
## Summary
- Un-skip hitl-in-app downgrade test — upstream bug is fixed, test
passes on both LGP and LGT
- Remove `page.waitForLoadState("networkidle")` from beautiful-chat Task
Manager test — persistent SSE connections prevent networkidle from ever
resolving

## Test plan
- [x] 16/16 tests pass on LGP (port 3100) — hitl-in-app + beautiful-chat
specs
- [x] 16/16 tests pass on LGT (port 3101)
- [x] All specs byte-identical between LGP and LGT

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-19 05:47:43 -07:00
Jordan Ritter c804fb7f51 fix(showcase): un-skip hitl-in-app downgrade test + remove networkidle from beautiful-chat 2026-05-19 05:39:50 -07:00
Alem Tuzlak cd6300cd68 fix(showcase): lockfile-pinned npm ci in all integration Dockerfiles + reclaim BuildKit cache on build (#4915)
## Summary

Fixes the disk-bloat root cause that crashed Docker repeatedly during
yesterday's MAF showcase port session — eventually ballooning the WSL2
`docker_data.vhdx` past 300 GB on the Windows host.

**Root cause:** 17 of 18 integration Dockerfiles copy `package.json` but
ignore the existing `package-lock.json`, then run `npm install
--legacy-peer-deps` instead of `npm ci`. Despite a ~700 KB lockfile
sitting in every integration directory, none of them inform the build.

## Effects

1. `npm install` re-resolves package versions from scratch on every
rebuild, downloading ~1.1 GB into the build container's writable layer
plus hundreds of MB of `~/.npm/_cacache` *inside the same layer*
(BuildKit can't dedupe across builds because the layer hash varies with
each non-deterministic resolution).
2. The install layer's BuildKit cache key is just `package.json`'s hash
+ base image — but with `npm install` (not `npm ci`) the install itself
is non-deterministic, so a cached layer that resolved successfully can
produce a different node_modules tree than a fresh resolution. Even when
the layer is reused, interrupted rebuilds (host OOM during install)
leave dangling cache that's only reclaimed after 24 h.
3. WSL2's `docker_data.vhdx` grows monotonically — it never shrinks
until `wsl --shutdown` + `Optimize-VHD`. Repeated rebuilds compound into
a VHDX file that can reach hundreds of GB on the Windows host before any
reclaim happens.

Only `built-in-agent` had the correct pattern; the other 17 were
copy-pasted from each other.

## Changes

1. **Lockfile-pinned, deterministic install** in all 18 Dockerfiles:
   ```dockerfile
   COPY package.json package-lock.json ./
   RUN npm ci --legacy-peer-deps
   ```
- `npm ci` is faster, deterministic, and writes ~half the temporary
state of `npm install`.
- With the lockfile in the COPY, BuildKit's layer cache key is stable
across rebuilds — once warm, it stays warm.
   - Matches the pattern `built-in-agent` already uses.

2. **Reclaim dangling BuildKit cache in `bin/showcase build`** with
`docker builder prune --filter "until=24h"`. Keeps the warm cache for
day-of work, reaps orphans from interrupted builds.

## Verification

After the patch every integration shows the same install header:

```bash
for d in showcase/integrations/*/; do
  grep -E "^(COPY package|RUN npm)" "$d/Dockerfile" | head -2
done
```

returns identical:
```
COPY package.json package-lock.json ./
RUN npm ci --legacy-peer-deps
```

for all 18.

## Out of band (already done locally, not in this diff)

- `docker volume prune -af` — reclaimed **16.11 GB** from 236 orphaned
anonymous Postgres volumes from 2023.
- `Optimize-VHD F:\Docker\wsl\disk\docker_data.vhdx -Mode Full`
(elevated PowerShell, after `wsl --shutdown`) — each developer runs this
on their own host when disk gets tight; not something CI or this script
can do.

## Test plan

- [ ] CI green
- [ ] `bin/showcase build ms-agent-python` from clean cache succeeds +
cold-build time roughly matches pre-PR baseline
- [ ] Second `bin/showcase build ms-agent-python` (warm cache) is faster
than first (because lockfile-pinned layer now actually hits cache)
- [ ] `docker images | grep showcase-` produces same image sizes as
before (~2.3-3 GB per integration)
2026-05-19 13:00:30 +02:00
Alem Tuzlak a98c591044 chore(showcase): ratchet validate-pins baseline 95 -> 105
Main has been red on Validate Showcase since #4912 landed
("bump deps to v1.57.2") -- that PR bumped Dojo's @copilotkit/*
pins to 1.55.2 which exposed 10 new showcase=next vs Dojo=1.55.2
mismatches across ms-agent-python, pydantic-ai, and strands.

The count on origin/main is also 105 (verified against run
26082332924's logs); my branch produces an identical 105 FAIL set
with matching hash. So this ratchet absorbs unrelated drift from
#4912 -- needed to unblock CI for this PR (and every other PR
that touches showcase/).

Sign-off: this is a documented baseline ratchet per the fail
threshold instructions in fail-baseline.json's _comment field.
2026-05-19 12:50:28 +02:00
Alem Tuzlak 03bed3b76b fix(showcase): regenerate 18 lockfiles in isolation; switch to npm ci
Lockfiles committed in 8ba692c42 were generated inside the monorepo
while pnpm's hoisted node_modules tree was present. npm-arborist
resolved transitive deps against pnpm's symlinks and wrote ~40
`../../../node_modules/.pnpm/...` paths into each lockfile's
`packages` map.

npm 10 can parse the JSON, but its arborist bombs out walking the
tree at those pnpm-relative entries with the misleading error:

    npm error code EUSAGE
    npm error The `npm ci` command can only install with an
    npm error existing package-lock.json or npm-shrinkwrap.json
    npm error with lockfileVersion >= 1.

`npm install --dry-run` surfaces the real cause:

    Cannot read properties of undefined (reading 'extraneous')

A fresh lockfile generated in an isolated container works.
- broken: 1259 packages, 43 with `../../../node_modules/.pnpm/...`
- fresh:  1321 packages, all `node_modules/...` paths

This commit regenerates every integration's lockfile inside an
isolated `node:22-slim` container via `npm install
--package-lock-only --legacy-peer-deps` and verifies with `npm ci`.
2026-05-19 12:12:57 +02:00