Commit Graph

9183 Commits

Author SHA1 Message Date
Sam Julien b76ddf594e fix(shell-docs): remove broken /langgraph/deep-agents CTA on whats-new page 2026-05-14 16:11:20 -07:00
Jordan Ritter fd599f89d6 feat(showcase): discovery caching, auth failure alerting, and browser pool status (#4828)
## Summary

- Adds `CachingDiscoverySource` wrapper with 24h TTL and concurrent
enumeration collapsing — serves stale discovery results when Railway API
is unreachable, preventing total probe blindness
- Adds `DiscoveryAuthTracker` that detects persistent auth failures (3
consecutive) and writes system status to PocketBase with rate-limited
sustained alerting
- Adds `DiscoveryAuthBanner` dashboard component that surfaces auth
failures and browser pool degradation above all tabs, with auto-dismiss
on recovery
- Caches Railway `listServices` in the adapter (60s TTL) to eliminate
N+1 GraphQL round-trips per probe tick
- Writes system status on browser pool init failure so stub-driver
degradation is visible

## Why

A Railway API token expired and the showcase dashboard showed stale
green data for 24+ hours with no operator-visible alert. Discovery runs
from scratch every probe tick with no caching or fallback. This PR adds
resilience (cache), observability (auth tracker + dashboard banner), and
fixes a pre-existing silent degradation path (browser pool).

## Test plan

- [ ] 18 caching-source tests (success, failure, TTL, eviction,
concurrent collapse, tracker integration)
- [ ] 9 auth-tracker tests (threshold, rate-limiting, recovery,
interleaved errors)
- [ ] 12 banner tests (render variants, signal validation,
accessibility, both banners simultaneously)
- [ ] Full harness suite regression check (1612/1614 pass, 2
pre-existing failures on main)
- [ ] TypeScript typecheck clean on new code
2026-05-14 15:14:15 -07:00
github-actions[bot] c0fb61e774 style: auto-fix formatting 2026-05-14 22:06:20 +00:00
Jordan Ritter a1b7cc7c4e feat(showcase/dashboard): add system health banners for auth and browser pool
DiscoveryAuthBanner renders above all tabs when discovery auth fails.
Two variants: serving-stale (probes running against cached data) and
no-cache (probes offline). Also surfaces browser pool degradation.
Runtime signal shape validation, auto-dismiss on recovery. 12 tests.
2026-05-14 15:05:15 -07:00
Jordan Ritter 42edc3d5c3 feat(showcase/harness): wire discovery cache, auth tracker, and browser pool status
Wraps railwayServicesSource with withCache (24h TTL). Instantiates
DiscoveryAuthTracker with threshold 3. Adds system dimension. Caches
listServices in Railway adapter (60s TTL). Writes system status on
browser pool init failure so degradation is visible in the dashboard.
2026-05-14 15:05:15 -07:00
Jordan Ritter 736f38ac1a feat(showcase/harness): add DiscoveryAuthTracker with rate-limited alerting
Tracks auth failures per source since last success. After 3 failures,
writes system:discovery-auth-failed to PocketBase. Sustained alerts
rate-limited to one PB write per 5 minutes. Auto-recovers on next
success. Non-auth errors are no-ops. 9 test cases.
2026-05-14 15:05:15 -07:00
Jordan Ritter 8108db6b00 feat(showcase/harness): add CachingDiscoverySource with TTL and concurrent collapse
Transparent wrapper at the DiscoverySource interface level. Caches
successful enumerate() results in memory (24h TTL), serves stale
data on upstream failure, collapses concurrent callers into a single
upstream request. Auth tracker side-effects are try-caught to never
block the primary data path. Evicts entries older than 2x TTL.
18 test cases covering success, failure, TTL, collapse, eviction,
non-JSON config guard, and tracker integration.
2026-05-14 15:05:15 -07:00
Tyler Slaton a375cef9d1 fix(showcase/google-adk + harness): unblock D5 probes — harness fixes, ag-ui-adk 0.6.3, e2e spec parity (#4826)
## Summary

Three independent, layered fixes that came out of a focused google-adk
D5 debugging session on top of the recently-merged ag-ui-adk + aimock
parity work:

1. **Harness probe fixes** (`showcase/harness/...`) —
`E2eDeepPage.locator` is now wired through the structurally-typed
wrapper so probes that need count-based polling can use
`page.locator(sel).count()` instead of erroring with "pw.locator is not
a function" at runtime. Paired with a native `setTimeout` between polls
in `d5-tool-rendering-reasoning-chain` (Playwright's
`page.waitForTimeout` also wasn't in the wrapper surface). Added
`google-adk` to `d5-gen-ui-custom`'s `CHART_INTEGRATIONS` set —
google-adk's `gen-ui-tool-based` page was ported from LGP verbatim and
now registers `render_pie_chart`/`render_bar_chart`, so the haiku-shape
probe path no longer applies.
2. **`ag-ui-adk 0.6.1 → 0.6.3`** (`requirements.txt`) — pulls in the
`FunctionResponse.name` fix
([ag-ui-protocol/ag-ui#1682](https://github.com/ag-ui-protocol/ag-ui/pull/1682)).
Without it, every multi-leg D5 fixture keyed on `toolCallId` fell
through to the first-leg `userMessage` matcher and looped indefinitely.
3. **E2E spec parity** (`tests/e2e/*.spec.ts`) — 16 diverged specs
synced verbatim from langgraph-python plus 3 previously-missing ones
(`chat-customization-css`, `prebuilt-sidebar`, `reasoning-custom`).
Per-package `pnpm test:e2e` is the local dev validation loop; without
parity here, tiny divergences accumulate silently until they surface as
D5 regressions in CI.

## Context

These changes were extracted from a broader google-adk D5 investigation
branch. Several other fixes from that session (the `@ag-ui/client 0.0.43
→ 0.0.53` bump, the `stop_on_terminal_text` callback, most agent-side
edits, several diverged demo pages) landed independently on `main`
during the same window, so this PR carries only the work that does not
overlap with those commits.

## Test plan

- [ ] CI: harness vitest + showcase package builds pass.
- [ ] Local: `./showcase/bin/showcase test
google-adk:tool-rendering-reasoning-chain --d5` no longer errors with
`pw.locator is not a function`; the chain advances past leg 1.
- [ ] Local: `./showcase/bin/showcase test google-adk:gen-ui-tool-based
--d5` exercises the chart path (not haiku) and goes green.
- [ ] Local: `cd showcase/integrations/google-adk && pnpm test:e2e` runs
the synced specs against the dev server.

Pairs with merged upstream work:
- aimock [#199](https://github.com/CopilotKit/aimock/pull/199) (egress
`functionCall.id` round-trip, v1.24.1)
- ag-ui-protocol/ag-ui
[#1682](https://github.com/ag-ui-protocol/ag-ui/pull/1682)
(`FunctionResponse.name` correction, 0.6.3)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-14 13:11:28 -07:00
Nathan 🔶 Tarbert 2c6bd1073c chore: align A2UI integration docs with v0.9 SDK helpers (#4822)
## Summary

- Aligns A2UI integration docs (DeepAgents, LangGraph, A2A) with the
v0.9 helpers exported by
[`sdk-python/copilotkit/a2ui.py`](https://github.com/CopilotKit/CopilotKit/blob/main/sdk-python/copilotkit/a2ui.py):
`create_surface`, `update_components`, `update_data_model`.
- Updates Python helper names, wire-format op keys in prose
(`surfaceUpdate` → `updateComponents`, etc.), and the TS action-handler
return shapes in `advanced.mdx`. Reorders operations so `createSurface`
comes first (no trailing `beginRendering`).
- A2A example: renames the root component id from `root-column` to
`root` per the v0.9 catalog convention (exactly one component must have
`id: "root"`).

Frontend dispatch confirmation:
`packages/react-core/src/v2/a2ui/A2UIMessageRenderer.tsx`
(`getOperationSurfaceId`) routes only on `createSurface |
updateComponents | updateDataModel | deleteSurface`, so the pre-v0.9
names in the docs would not round-trip through the runtime.

Tracks #4821 (point 1).

## Files changed

9 mdx files, +45 / −47:

-
`docs/content/docs/integrations/deepagents/generative-ui/a2ui/{index,fixed-schema,dynamic-schema,advanced}.mdx`
-
`docs/content/docs/integrations/langgraph/generative-ui/a2ui/{index,fixed-schema,dynamic-schema,advanced}.mdx`
-
`docs/content/docs/integrations/a2a/generative-ui/declarative-a2ui.mdx`

No SDK or runtime changes.

## Out of scope (filed under #4821)

- `action_handlers=` kwarg appears in fixed-schema examples but is not
yet on `a2ui.render`'s signature. Left in place — separate decision
needed (SDK feature vs. doc rollback).
- No runnable DeepAgents showcase. Filed for tracking, not addressed
here.

## Test plan

- [ ] Vercel preview renders all 9 pages without MDX errors
- [ ] Code snippets visually match the v0.9 SDK surface
(`create_surface` / `update_components` / `update_data_model`)
- [ ] A2A example: root component id reads `"root"` (not
`"root-column"`)
- [ ] `dynamic-schema.mdx` prose lists `createSurface` +
`updateComponents` (not the pre-v0.9 names)
2026-05-14 16:09:14 -04:00
Alem Tuzlak d530592317 feat(showcase/google-adk/headless-complete): port backend tools to unblock D5
`headless_complete` was wired to `_simple_chat` (zero backend tools)
in the registry. The d5-gen-ui-headless-complete probe sends prompts
that need `get_weather` / `get_stock_price` / `get_revenue_chart`
to mount their respective per-tool renderer cards on the frontend
(`useRenderTool` keys on tool name), so without the backend tools the
fixture's tool-call response had no matching Python function to run
and the cards never mounted.

Ports the three mock tools verbatim from
`langgraph-python/src/agents/headless_complete.py` (same payload
shapes, same system-prompt routing rules) onto a dedicated
`headless_complete_agent` LlmAgent and re-points the registry slot.
The frontend's `highlight_note` is a useComponent-style frontend
tool and the Excalidraw MCP tools are injected by the runtime
middleware — neither needs a backend Python function, matching the
LGP shape.

Local D5: google-adk:headless-complete flips from red to green.
2026-05-14 21:23:32 +02:00
Alem Tuzlak 02e48162c4 test(showcase/google-adk): sync e2e specs to langgraph-python north-star
Ports 16 diverged Playwright e2e specs verbatim from langgraph-python
and adds 3 previously-missing specs (chat-customization-css,
prebuilt-sidebar, reasoning-custom). All 19 files are byte-identical
to LGP, mirroring the same approach the recent ADK parity push used
for the demo pages.

Why this matters even though D5 is the gold standard: the per-package
Playwright suites (`pnpm test:e2e`) are the local dev validation loop.
Without parity here, a contributor editing google-adk's CopilotChat
surface has no local check that matches what langgraph-python ships,
and tiny divergences between the two surfaces (missing testids, stale
selectors, wrong assertion shapes) silently accumulate until they
surface as D5 regressions in CI.
2026-05-14 20:54:21 +02:00
Alem Tuzlak 05a1a95118 fix(showcase/google-adk): bump ag-ui-adk to 0.6.3
0.6.3 ships the FunctionResponse.name fix
(ag-ui-protocol/ag-ui#1682) — the converter now sets the response's
name field to the called function's name (e.g. `get_weather`) instead
of the tool_call_id. Without this, downstream consumers that recover
the originating call's id by name (Gemini's session correlator,
aimock's gemini->openai translator that locates a prior tool_call by
name to recover its id) hit a UUID-shaped `name` that no prior call
matches and the round-trip silently breaks — multi-leg D5 fixtures
keyed on `toolCallId` (tool-rendering-reasoning-chain, the gen-ui-*
chains, shared-state-streaming) fall through to the first-leg fixture
on every follow-up, looping indefinitely or stranding the UI.

Pairs with aimock 1.24.1 (CopilotKit/aimock#199) which surfaces the
`tool_call.id` on the egress side so there's actually an id for the
ADK middleware to preserve in the round-trip.
2026-05-14 20:53:27 +02:00
Alem Tuzlak d35afaadf3 fix(showcase/harness): unblock google-adk D5 probes — page.locator wrapper, setTimeout sleep, CHART_INTEGRATIONS 2026-05-14 20:51:14 +02:00
Nathan 🔶 Tarbert 0b6460a192 chore: align A2UI integration docs with v0.9 SDK helpers
The Python A2UI SDK (sdk-python/copilotkit/a2ui.py) exposes v0.9 helpers
create_surface, update_components, and update_data_model, but the
integration docs still referenced earlier names (surface_update,
data_model_update, begin_rendering) and the corresponding wire-format
op keys (surfaceUpdate, dataModelUpdate, beginRendering). The frontend
renderer (A2UIMessageRenderer) routes operations by the v0.9 keys, so
the docs as written would not round-trip through the runtime.

Updates 9 mdx files under integrations/{deepagents,langgraph,a2a}:
- Python helper names in code snippets
- Op keys in prose and TS action-handler return values
- Reorders operations so createSurface comes first (no trailing
  beginRendering)
- a2a example: renames the root component id from "root-column" to
  "root" per the v0.9 catalog convention (exactly one component must
  have id="root")

No SDK or runtime changes.
2026-05-14 12:49:15 -04:00
Jordan Ritter 720cbee1a3 fix(showcase/langgraph-typescript): regenerate agent package-lock.json (#4815)
## Summary

Regenerates `src/agent/package-lock.json` for the langgraph-typescript
integration. 5 dependencies drifted after multiple package.json bumps
without regenerating the nested lock file, causing `npm ci` to fail
in Docker builds.

| Dependency | package.json | package-lock.json (was) |
|---|---|---|
| @copilotkit/sdk-js | 1.56.5 | 1.51.4 |
| @langchain/core | 1.1.44 | ^1.0.1 |
| @langchain/langgraph | 1.3.0 | 1.0.2 |
| @langchain/openai | 1.4.4 | ^1.1.3 |
| langchain | 1.3.4 | ^1.3.3 |

## Test plan

- [ ] langgraph-typescript build-check passes in CI
2026-05-14 00:10:44 -07:00
Jordan Ritter d234b10142 fix(showcase/langgraph-typescript): regenerate agent package-lock.json
5 dependencies drifted between package.json and package-lock.json in
the nested src/agent sub-package, causing npm ci to fail in Docker
builds. Lock file regenerated to match current package.json.
2026-05-14 00:04:32 -07:00
Jordan Ritter 5ac5131b18 fix(showcase): remove misleading header badges + simplify health endpoints (#4814)
## Summary

- **Health endpoints**: All 18 integration health endpoints simplified
from
two-hop agent proxy (3s timeout, false reds) to local-only (just
confirms
Next.js process is alive). The harness already checks agent reachability
  via the `agent:<slug>` probe.
- **Column headers**: U/W/C/T badges removed from Coverage tab. They
read
  integration-level probes independent of per-feature cell data, causing
contradictory states (e.g. U red while all cells green). The tally
derived
  from `buildCellModel` is now the sole column summary.

## Why

Google ADK's U badge showed red while all 34 feature tests passed. Root
cause:
the health endpoint proxied to the Python agent's `/health` with a
3-second
timeout. Under load, the agent's health middleware exceeded 3s even
though
AG-UI protocol endpoints (used by e2e tests, with 30-60s timeouts)
responded
fine. The health probe was testing a different code path with a tighter
timeout
than the actual tests.

## Test plan

- [x] 100 dashboard tests pass (cell-model, unified-cell, depth-chip,
cell-matrix)
- [x] oxfmt clean
- [ ] Health probes flip to green after deploy (harness smoke tick
within 5 min)
- [ ] Coverage tab headers show tally only, no U/W/C/T badges
2026-05-13 23:56:15 -07:00
Jordan Ritter 25a76275e7 fix(showcase): red chipColor when tests exist but all fail
Previously achievedDepth=0 always produced gray regardless of whether
tests existed. Now: ceilingDepth=0 (no tests) = gray, ceilingDepth>0
with achievedDepth=0 (tests exist, all fail) = red. Tally dimension
derived from model instead of hardcoded "e2e".
2026-05-13 23:50:05 -07:00
Jordan Ritter 686286f771 fix(showcase): remove U/W/C/T badges and fix dashboard type hygiene
Remove misleading header badges that read integration-level probes
independent of per-feature cell data. Replace 5 duplicate local
Overlay types with canonical import. Remove dead connection prop.
Add exhaustive state handling in level-strip. Remove redundant
?? false in isSupported expressions.
2026-05-13 23:45:26 -07:00
Jordan Ritter fcc2cef9b2 fix(showcase): simplify health endpoints to local-only (no agent proxy)
All 18 integration health endpoints previously proxied to the backend
agent /health with a 3s timeout, causing false reds when agents were
slow but functional. The harness already checks agent reachability
via the agent:<slug> probe. Health endpoints now return a simple 200
confirming the Next.js process is alive.
2026-05-13 23:45:26 -07:00
Jordan Ritter e50737fcaf style: apply ruff format to Python codebase (#4813)
## Summary

One-time `ruff format .` across the Python codebase — 320 files,
7759+/4678-.

This aligns the existing Python code with the ruff format check added in
#4812. Without this, the push-to-main format job fails on every merge
that touches the `static / quality` workflow.

## Why a separate PR

Pure formatting, no behavioral changes. Keeping it isolated makes git
blame clean — one commit to skip, not interleaved with logic changes.

## Test plan

- [ ] CI format job passes (the whole point)
- [ ] Python unit tests unaffected (formatting only)
2026-05-13 23:19:04 -07:00
Jordan Ritter 2482317ccc style: apply ruff format to Python codebase
320 files reformatted. One-time alignment to match the ruff format
check added to CI in #4812.
2026-05-13 23:10:35 -07:00
Jordan Ritter 4066aaafa1 perf: optimize CI format job + widen lefthook + add ruff for Python (#4812)
## Summary

- **lefthook**: Widen pre-commit glob from JS/TS-only to match CI's full
file
coverage (json, md, css, yml, yaml, html, vue, py). Add `ruff format`
for
  Python files.
- **CI format job**: Replace full `pnpm install` (~8min) with standalone
binary
installs (`oxfmt` + `ruff`, ~10s). Add Python formatting to both PR and
  push-to-main paths.

## Why

The format job took 8+ minutes because it ran `pnpm install
--frozen-lockfile`
to get the oxfmt binary. oxfmt and ruff are both standalone Rust
binaries that
don't need the monorepo's node_modules. Local lefthook only covered
JS/TS
extensions, so JSON/YAML/MD/Python formatting was only enforced in CI —
after
the push.

## Test plan

- [x] lefthook.yml YAML validates
- [x] static_quality.yml YAML validates
- [ ] CI format job runs in <30s (was ~8min)
- [ ] Lefthook pre-commit catches formatting in JSON/MD/Python files
2026-05-13 23:04:18 -07:00
Jordan Ritter 57d26314da fix(showcase): derive column header tallies from buildCellModel
Tallies now count by CellModel.chipColor instead of resolveCell rollup,
ensuring header numbers match what cells actually render. Gray cells
(no data) are excluded from counts.
2026-05-13 22:55:21 -07:00
Jordan Ritter 1671492f57 perf: optimize CI format job with standalone oxfmt + ruff
Replaces full pnpm install with standalone binary installs. Adds ruff
format for Python files in both PR and push-to-main paths. Reduces
format job from ~8min to ~30s.
2026-05-13 22:55:15 -07:00
Jordan Ritter 1e70dae975 chore: widen lefthook format glob and add ruff for Python
Pre-commit lint-fix now covers json, md, css, yml, yaml, html, vue, py
in addition to js/ts. Adds ruff format for Python files. Local
formatting coverage now matches CI.
2026-05-13 22:55:11 -07:00
Jordan Ritter 090ddb2bfe fix(showcase): consolidate cell rendering into single CellModel codepath (#4810)
## Summary

Consolidates all Coverage-tab cell rendering into a single codepath
driven by `CellModel` — a unified type that captures support status +
D3/D4/D5 test existence and status. Replaces the fragmented
multi-codepath architecture where `deriveDepth()`, `resolveCell()`,
`ComposedCell`, `DepthLayer`, and `HealthLayer` each independently
resolved different aspects of cell state.

**Fixes three dashboard rendering bugs:**
- **D0 despite passing tests** — old depth ladder required
`health:<slug>` green before checking e2e; new model resolves D3
directly from `e2e:<slug>/<feature>`
- **Yellow D4 at ceiling** — old `depthColorClass()` hardcoded D4 as
blue/accent with no ceiling concept; new model computes chip color
relative to ceiling (green when achieved == ceiling)
- **No-entry icon alongside test badges** — old
`DepthLayer`/`HealthLayer` rendered independently without cross-checking
support status; new `UnifiedCell` short-circuits on unsupported

## Changes

- **`cell-model.ts`** — New `CellModel` type and `buildCellModel()`
function. Single derivation: resolves D3 (e2e), D4 (chat/tools
worst-state), D5 (CATALOG_TO_D5_KEY multi-key worst-state). Computes
contiguous ceiling depth and chip color relative to ceiling.
- **`unified-cell.tsx`** — New `UnifiedCell` component consuming
`CellModel`. Unsupported = no-entry only. Badges only for existing test
levels. `arePropsEqual` synced with `buildCellModel` reads.
- **`depth-chip.tsx`** — Added `chipColor` prop for pre-computed color
override (green/amber/red/gray).
- **`page.tsx`** — Replaced `ComposedCell` with `UnifiedCell`,
`deriveDepth` with `buildCellModel` in healthStats/depthDistribution.
- **`feature-grid.tsx`** — Ref-depth column migrated to
`buildCellModel`.
- **`cell-matrix.tsx`** — Baseline tab migrated from `deriveDepth` to
`buildCellModel`.
- **`composed-cell.tsx` / `depth-utils.ts`** — Deprecated.

## Test plan

- [x] 22 unit tests for `buildCellModel` covering all bug regressions,
D4 worst-state, D5 multi-key, contiguous chain, degraded mapping
- [x] 14 unit tests for `UnifiedCell` covering unsupported guard, badge
existence, overlay gating, chipColor passthrough
- [x] 12 existing `DepthChip` tests + 12 new `chipColor` tests (52
total)
- [x] 12 `CellMatrix` tests updated for D3/D4/D5 model
- [x] 100 tests pass, 0 fail
- [x] 7-agent CR converged in 2 rounds (3 bucket-a fixes in round 1, 0
in confirmation)
2026-05-13 22:26:36 -07:00
Jordan Ritter f7fde425d9 fix(showcase): wire unified cell model into Coverage and Baseline tabs
Coverage tab uses buildCellModel + UnifiedCell. Baseline tab CellMatrix
migrated from deriveDepth to buildCellModel. Fixes three dashboard bugs:
D0 shown despite passing tests, yellow D4 at ceiling, no-entry icon
alongside test badges. ComposedCell and deriveDepth deprecated.
2026-05-13 22:11:04 -07:00
Jordan Ritter 475cd7c991 feat(showcase): add UnifiedCell with chipColor-driven DepthChip
DepthChip accepts pre-computed chipColor prop (green when achieved equals
ceiling). UnifiedCell is the single rendering codepath: unsupported cells
show only the no-entry icon, badges render only for existing test levels.
arePropsEqual synced with buildCellModel reads (e2e/chat/tools/d5 keys).
2026-05-13 22:10:58 -07:00
Jordan Ritter 4d57d7b869 feat(showcase): add CellModel type and buildCellModel() for unified cell rendering
Single source of truth for Coverage-tab cell state. Replaces fragmented
depth/badge resolution. Resolves D3/D4/D5 test existence and status
independently, computes contiguous ceiling depth and chip color relative
to ceiling (green at ceiling, gray for no data, amber/red below).
2026-05-13 22:10:51 -07:00
Jordan Ritter edb405d71c fix(showcase): add hasToolResult:false to feature-parity fixtures (#4809)
## Summary

31 feature-parity aimock fixtures had `userMessage` match + `toolCalls`
response but **no `hasToolResult` constraint**. They re-matched on
follow-up turns (where a tool result was already present), returning
another tool call — creating infinite loops across all ADK demos.

Combined with aimock v1.23.1
([CopilotKit/aimock#196](https://github.com/CopilotKit/aimock/pull/196)
— preserves `functionCall.id` in Gemini conversation conversion), this
eliminates the showcase infinite tool call loop.

## Root cause

The loop was caused by aimock fixture re-matching, not Gemini model
behavior.

## Test plan

- [x] RED: "What is the weather in Paris?" on tool-rendering demo with
old fixtures → `max_llm_calls limit of 15 exceeded`, 15 Tokyo weather
cards rendered
- [ ] GREEN: Same query with fixed fixtures → single tool call, text
response, done
2026-05-13 20:06:40 -07:00
Jordan Ritter d7019b7e29 fix(showcase): add hasToolResult:false to feature-parity fixtures
31 fixtures had userMessage match + toolCalls response but no
hasToolResult constraint. They re-matched on follow-up turns where
a tool result was present, returning another tool call — infinite loop.
2026-05-13 20:02:59 -07:00
Tyler Slaton 5dffc13f8c fix(showcase/beautiful-chat): pin canvas to "beautiful-chat" agent id so shared state renders (#4807)
## What does this PR do?

Fixes the Task Manager (Shared State) pill in the langgraph-python
`beautiful-chat` showcase, where clicking the pill flipped the canvas to
App mode but the To Do column stayed empty even though the backend graph
had populated `state.todos`.

**Root cause.** `<CopilotKit agent="beautiful-chat">` in
[`page.tsx`](showcase/integrations/langgraph-python/src/app/demos/beautiful-chat/page.tsx)
routes the chat through agent id `"beautiful-chat"`. The chat is
required to be on that id so the cell's `useComponent` /
`useFrontendTool` / `useDefaultRenderTool` registrations (chart, flight,
dashboard pills) resolve. `ExampleCanvas`, however, called `useAgent()`
with no args, which defaults to `DEFAULT_AGENT_ID` (`"default"`). The
frontend's agent registry creates a separate
`ProxiedCopilotRuntimeAgent` instance per id even though the route had a
`default: beautifulChatAgent` alias on the backend — state-deltas from
`manage_todos` landed on the chat's `"beautiful-chat"` instance and
never reached the canvas's `"default"` subscription.

**Fix.** Pin the canvas to the same agent id and drop the now-unused
backend alias:

- `src/app/demos/beautiful-chat/components/example-canvas/index.tsx` —
`useAgent({ agentId: "beautiful-chat" })`
- `src/app/api/copilotkit-beautiful-chat/route.ts` — drop the `default:
beautifulChatAgent` alias (the only consumer was the canvas's old
default fallback)

Both halves now share one `ProxiedCopilotRuntimeAgent` on the frontend,
so `manage_todos` state-deltas flow into `agent.state.todos` and the
canvas re-renders.

**Regression coverage.**

- `tests/e2e/beautiful-chat.spec.ts` — Playwright test clicks the Task
Manager pill and asserts the 3 verbatim todo titles render in the To Do
column. Includes a `waitForLoadState("networkidle")` before the click so
the pill-driven `runAgent` doesn't race the v1 CopilotKit context setup.
- `showcase/aimock/feature-parity.json` — 3 fixtures for the multi-turn
flow (`parallel_tool_calls=False`, so each step is its own LLM call):
1. `userMessage: "three todos about learning CopilotKit"` +
`hasToolResult: false` → `enableAppMode` tool call
2. `toolCallId: call_fp_beautiful_chat_enable_app_mode_001` →
`manage_todos` tool call with three pending todos
3. `toolCallId: call_fp_beautiful_chat_manage_todos_001` → final
plain-text confirmation

Verified end-to-end against local aimock + langgraph + Next.js. With the
fix the test passes in ~5s; reverting just the `useAgent` change
reproduces the empty-canvas failure.

## Related PRs and Issues

- N/A

## Checklist

- [x] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [x] If the PR changes or adds functionality, I have updated the
relevant documentation
- [x] "Allow edits by maintainers" is checked (lets us help iterate on
your PR directly — faster turnaround for everyone)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-13 17:08:50 -07:00
Jordan Ritter b6ad624c94 style: apply formatter to vue package and other unformatted files 2026-05-13 17:06:47 -07:00
Tyler Slaton c41c2dec71 fix(showcase/beautiful-chat): pin canvas to "beautiful-chat" agent id so shared state renders
`<CopilotKit agent="beautiful-chat">` routes the chat to agent id
"beautiful-chat", but ExampleCanvas called `useAgent()` with no args and
fell back to DEFAULT_AGENT_ID ("default"). The frontend's agent registry
tracks state per id, so `manage_todos` state-deltas from the chat run
landed on "beautiful-chat" and never reached the canvas's "default"
subscription — the Task Manager pill auto-flipped the panel to App mode
but the To Do column stayed empty. Drop the unused "default" alias from
the runtime route and pin the canvas to `useAgent({ agentId:
"beautiful-chat" })` so both halves share one ProxiedCopilotRuntimeAgent
instance. Adds a Playwright regression test asserting the 3 verbatim
todo titles render after the pill click, plus 3 aimock fixtures for the
multi-turn flow (enableAppMode -> manage_todos -> confirmation).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 17:04:50 -07:00
Jordan Ritter 0150ca11f0 fix: regenerate pnpm-lock.yaml for vue demo dependencies 2026-05-13 16:58:04 -07:00
Jordan Ritter 99ed0c7c95 fix(vue): use absolute GitHub URLs in README for npm compatibility 2026-05-13 16:54:42 -07:00
Tyler Slaton cf0b032d58 chore: release monorepo v1.57.2 (#4787)
## Release monorepo v1.57.2

**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.2`
   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.2`
   - Creates git tag `monorepo/v1.57.2`
   - 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.
2026-05-13 16:43:11 -07:00
Jordan Ritter e3d4f60719 fix(vue): architecture fixes for Vue 3 integration (#4400)
## Summary

Ships `@copilotkit/vue` as a production-ready Vue 3 port of CopilotKit's
React UI library with full parity coverage.

### What's included

**Core package** (`packages/vue/`)
- CopilotKit provider with Vue provide/inject context propagation
- Chat, sidebar, popup components with full slot-based customization
- Agent hooks: useAgent, useThreads, useFrontendTool, useInterrupt,
useCapabilities, useRenderCustomMessages, useRenderActivityMessage
- A2UI rendering pipeline with Vue-native implementation (adapter,
catalog, VueSurface)
- A2UIBuiltInToolCallRenderer + A2UICatalogContext for dynamic A2UI
generation
- Attachment system with queue and renderer primitives
- v1/v2 dual-export structure for backwards compatibility
- Thread management with isolation and cloning support
- Comprehensive test suite (994 tests passing)

**Demo & Storybook** (`examples/v2/vue/`)
- Nuxt demo app with server-side agent endpoints
- Storybook stories for component parity verification

**Packaging & Release**
- Wired into CopilotKit release system (release.config.json)
- npm publishing metadata (license, repository, keywords)
- sideEffects + typesVersions for proper bundler/TS resolution
- Version synced to monorepo shared version

### CR fixes applied (3 rounds, 7 agents per round)

- Fixed resource leaks in useFrontendTool cleanup and useCopilotReadable
context dedup
- Added missing A2UI context injection (A2UIBuiltInToolCallRenderer +
A2UICatalogContext)
- Added GENERATE_SANDBOXED_UI_DESCRIPTION and DEFAULT_DESIGN_SKILL
parity
- Fixed useSingleEndpoint "auto" mode (was defaulting to "rest")
- Added viewerTheme default for A2UI surfaces
- Added missing hooks: useCapabilities, useRenderCustomMessages,
useRenderActivityMessage
- Added missing provider props: licenseToken, inspectorDefaultAnchor,
renderToolCalls
- Fixed silent failures: useInterrupt handler logging, resolveInterrupt
.catch(), handleSubmitMessage null guard, useCopilotAction warning
- Fixed waitForAgentIdle 30s timeout, isVueComponent heuristic,
VueCustomMessageRendererRenderFn null type
- Fixed available:"remote" semantic mapping, handleFileUpload input
reset, v-bind ordering
- Fixed JSON.stringify crash on circular refs in useCopilotReadable
- Eliminated private field access via new propRenderToolCalls getter
- Fixed module-level state isolation in A2UIBuiltInToolCallRenderer
- Added MCPApps request queue cancellation on unmount
- Bumped @ag-ui/client and @ag-ui/core from 0.0.52 to 0.0.53
- Removed dead code (normalizeVueRenderer, isVueComponent)
- Merged duplicate agent resolution branches
- Removed redundant onBeforeUnmount cleanup
- Fixed all 9 pre-existing test failures
- Removed global console suppression from test setup

## Test plan

- [x] `vue-tsc --noEmit` — 0 errors
- [x] `vitest run` — 994 tests passing, 0 errors
- [x] CI build passing
- [x] CI unit tests passing (Node 20/22/24)
- [x] All Vercel deploys passing
- [x] All e2e integrations passing
- [x] commitlint, oxlint, package-quality passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-13 15:50:30 -07:00
Tyler Slaton 74447ffd66 fix(vue): CR correctness fixes for v1 hooks and A2UI catalog
Fix use-copilot-action and use-copilot-readable v1 hook
implementations and A2UI catalog registration logic based
on code review findings.
2026-05-13 15:50:13 -07:00
Jordan Ritter a187e6b64c fix(react-core): fix flaky CopilotChatPerf e2e test
Harden rAF cleanup and timing assertions in the performance
test to prevent intermittent failures on Node 20.
2026-05-13 15:50:13 -07:00
Jordan Ritter 91dd4b13fa feat(vue): add v1 wrappers, A2UI Vue-native renderer, and
CR parity fixes

V1 CopilotKit.vue provider wrapper with backward-compatible
API, A2UI adapter/surface/catalog context/built-in tool-call
renderer for Vue-native rendering, capability and custom
message hooks, config allowlist and release config updates.
2026-05-13 15:50:13 -07:00
enekesabel 233b7532c2 feat(vue): add Storybook stories
Vue Storybook configuration and stories for visual component
parity testing: chat views, inputs, messages, suggestions,
toggle buttons, sidebar, popup, inspector, provider, and
A2UI activity rendering.
2026-05-13 15:50:13 -07:00
enekesabel bdd0532b1c feat(vue-demo): add Nuxt demo app
Nuxt 3 demo application with CopilotKit integration
showcasing popup, sidebar, single-agent, MCP apps, and
A2UI demo pages with Hono-based API endpoints.
2026-05-13 15:50:12 -07:00
enekesabel 913c36b8b5 test(vue): add comprehensive test suite
Unit, integration, and e2e tests covering hooks, components,
providers, types, and utilities with mock agent context,
mount helpers, and web-inspector stubs for full React
parity verification.
2026-05-13 15:50:12 -07:00
enekesabel 90b3c2f0c0 feat(vue): implement providers, types, lib, and utility
components

CopilotKit and chat configuration providers with injection
keys, type definitions for tools/HITL/interrupts/renderers,
HTML processing and transcription utilities, inspector,
license warning, activity renderers, and barrel exports.
2026-05-13 15:50:12 -07:00
enekesabel 28d07ccaa4 feat(vue): implement chat components with React parity
Full chat UI component suite: CopilotChat, CopilotPopup,
CopilotSidebar, message views, suggestion pills, toggle
buttons, audio recorder, tool calls view, modal headers,
welcome screens, and auto-scroll normalization.
2026-05-13 15:50:12 -07:00
enekesabel 63b23f9c1f feat(vue): implement core hooks and composables
Vue 3 composition API hooks matching React hook parity:
agents, attachments, suggestions, frontend tools, HITL,
interrupts, threads, keyboard/katex utilities, and
pin-to-send.
2026-05-13 15:50:12 -07:00
enekesabel 92c0f0ec25 feat(vue): add @copilotkit/vue package scaffolding and config
Package skeleton with build tooling (Vite, Vitest, ESLint),
TypeScript configuration, styles, workspace integration, and
documentation scaffolding.
2026-05-13 15:50:11 -07:00
Jordan Ritter 62dd1b8edc feat(react-native): full v2 API parity — components, attachments, and test suite (#4750)
## Summary

React Native SDK — full v2 API parity with web SDK, including file
attachments.

### Bug fixes
- Streaming crash fix — XHR callbacks deferred to JS thread to prevent
iOS crash
- agentId consistency across v2 hooks
- Dynamic headers function and credentials prop on CopilotKitProvider

### Components (4 new)
- **CopilotChat** — headless chat with attachment support and
`useCopilotChatContext` for children
- **CopilotModal** — thin wrapper around CopilotChat
- **CopilotPopup** — floating chat overlay with FAB trigger, attachment
prop forwarding
- **CopilotSidebar** — animated slide-in drawer, attachment prop
forwarding

### Hooks (3 new)
- **useAttachments** — file attachment lifecycle with
expo-document-picker + expo-file-system (replaces web
FileReader/HTMLInputElement)
- **useRenderTool** — generative UI on React Native
- **useCapabilities** — agent capability introspection

### Types (15+ new re-exports from headless layer)
- UseInterruptConfig, AgentContextInput, JsonSerializable, Thread types
- InterruptEvent, InterruptHandlerProps, InterruptRenderProps
- ReactFrontendTool, ReactHumanInTheLoop, defineToolCallRenderer
- CopilotChatLabels, CopilotChatDefaultLabels,
CopilotChatConfigurationValue
- NativeFileInput, NativeAttachmentsConfig, UseNativeAttachmentsReturn

### Attachment system
- `useAttachments` hook with `NativeFileInput` type (replaces web
`File`)
- `openPicker()` — imperative file picker via expo-document-picker
- `processFiles()` — validate, read (base64 via expo-file-system), add
to queue
- `consumeAttachments()` — snapshot + clear for submit flow
- Custom `onUpload` handler support for cloud upload workflows
- Wired into CopilotChat submit — builds InputContent[] with text +
attachment parts
- Forwarded through CopilotPopup and CopilotSidebar props

### headless.ts additions (react-core)
- InterruptEvent, InterruptHandlerProps, InterruptRenderProps exports
- ReactFrontendTool, ReactHumanInTheLoop exports

## Test plan

- [x] 155 tests across 10 test files (vitest)
- [x] TDD — all tests written before implementation
- [x] useAttachments: 15 unit tests (state lifecycle, processFiles,
openPicker, consume, remove, errors)
- [x] CopilotChat attachments: 3 integration tests (context exposure,
submit flow)
- [x] Popup/Sidebar: prop forwarding tests
- [x] Full integration: pick → attach → submit → verify InputContent
includes attachment data
- [x] Surface-to-surface comparison against web SDK — all v2 hooks
present
- [x] No DOM type dependencies in any export
- [x] expo-document-picker and expo-file-system as optional peer deps
2026-05-13 15:45:03 -07:00