Commit Graph

2368 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
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
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
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 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 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 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 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 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
github-actions[bot] 9a9a463ed3 style: auto-fix formatting 2026-05-13 18:40:04 +00:00
Sam Julien 62facacee1 feat(quickstart): add platform signup as Step 1 across integration quickstarts
Every integration quickstart in docs/ and showcase/shell-docs/ now opens with
a "Create a free account" step that points the reader at the Enterprise
Intelligence Platform before the framework path. Existing top-of-page
<OpsPlatformCTA> blocks on the six integrations that already had one are
left in place.

- New <SignupLink surface="docs_<int>_quickstart_step1">…</SignupLink> MDX
  component in both apps. It mirrors OpsPlatformCTA's URL+UTM contract
  (https://dashboard.operations.copilotkit.ai/ with the canonical docs
  UTMs, picked up from NEXT_PUBLIC_INTELLIGENCE_SIGNUP_URL when set) and
  fires the same PostHog event the other CTAs use:
  posthog.capture("try_for_free_clicked", { location: surface }).
- Registered as an MDX global in:
    docs/app/integrations/[[...slug]]/page.tsx
    docs/app/(home)/[[...slug]]/page.tsx
    showcase/shell-docs/src/lib/mdx-registry.tsx
- All 28 integration quickstart .mdx files now lead with a Step that uses
  this component as an inline link inside a single sentence of prose —
  no CTA card inside <Steps>.

The <TailoredContent> "Choose your starting point" / "How do you want to
get started?" selector is now wrapped in its own <Step> so it advances
the counter, and the inner CLI/manual paths render as steps 3, 4, 5, …
instead of 2, 3, 4, …. Applies to all 20 quickstarts that use the
picker.

- Indigo→purple gradient text on the Step 1 heading on both surfaces
  (`.fd-steps > .fd-step:first-child h3` on docs/,
  `.docs-steps > div:first-child h3` on shell-docs). Direct-child
  combinator scopes it to the outer first Step so inner first-children
  inside TailoredContentOption don't pick it up. Bump weight to 700
  and font-size to 1.375rem on docs/ to compensate for the
  background-clip:text rendering path (grayscale AA, no solid fill)
  which makes glyphs look lighter/smaller than the adjacent solid
  600/20px headings.
- Tone down the selected TailoredContent option card on both surfaces
  to a near-grayscale wash (from-slate-50 → to-indigo-50/30) and
  shorten the card itself (smaller padding, smaller icon, smaller
  title; extra left padding for breathing room) so the picker takes
  less vertical space and doesn't compete with the Step 1 gradient
  heading. Indigo ring still does the "selected" signal.
- Bump the tablist's bottom margin in shell-docs (my-2 → mt-2 mb-6)
  so the gap between the picker and the first inner Step matches the
  1.5rem gap that every other consecutive-Step transition uses.
- Black SignupLink color in Step 1 on shell-docs so the link doesn't
  clash with the gradient heading above it.
- Shell-docs: reset margin-top on the first heading inside any Step so
  the badge and heading align, and nudge the badge top from -0.125rem
  to 0.1875rem so its vertical center matches the heading line center.
  Moved the badge's appearance (background/border/color/font-weight)
  out of inline style and into globals.css so :first-child overrides
  can win without fighting inline-style specificity.
2026-05-13 11:38:29 -07:00
Ben Taylor dbc0e8f201 docs-sync(needs-review): sync from main (3552bdd48) [NEEDS REVIEW] (#4771)
⚠️ **Docs sync — MANUAL REVIEW REQUIRED**

This PR was auto-opened because the docs-sync script detected
showcase-local modifications overlapping with upstream changes.

The script attempted a best-effort 3-way merge:

- Where `git merge-file` produced a clean merge, the merged content was
written.
- Where `git merge-file` produced conflict markers, **upstream content
was written as-is** and showcase-local modifications were overridden.
**Manual review required.**

### Source

- Upstream ref:
[`3552bdd48`](https://github.com/CopilotKit/CopilotKit/commit/3552bdd48)
- Workflow run:
https://github.com/CopilotKit/CopilotKit/actions/runs/25689341730

**Review before merging.** Auto-merge is intentionally disabled for
`needs-review` PRs — confirm the upstream-wins sections preserve any
intentional showcase-local divergence you want to keep, then merge
manually.

---

### Update 2026-05-13 — corrective commit on top

A second commit `8e1d969e` was added by Sam on top of the bot's original
`ad4ea35c` to revert specific changes that conflicted with deliberate
shell-docs decisions (e.g. resurrected deleted landing pages,
`/quickstart` shim revert, EIP brand regression, `react-core/v2` →
`react-core` import-path regression).

**Several of the corrective-revert decisions are being re-evaluated** to
confirm we're not throwing away legitimate content updates
(specifically: `premium/self-hosting.mdx` page collapse to `<SelfHosting
/>`, `shared-state.mdx` line removals, `generative-ui/a2ui.mdx` line
removals, `threads.mdx` `<ThreadsEarlyAccess>` wrapper). The corrective
commit may be adjusted before merge based on that re-evaluation.

The bot's original commit is preserved as the first commit on this
branch. To restore the bot's full original proposal, revert `8e1d969e`.
2026-05-13 13:23:15 -05:00
Ben Taylor a92d9e5e9a ci(docs-sync): exclude shell-docs deliberate-deletion paths from upstream sync (#4800)
## Summary

Adds shell-docs deliberate-deletion / divergent paths to
`PATH_EXCLUSIONS` in `showcase/scripts/sync-docs-from-main.ts`, so the
docs-sync workflow doesn't keep re-proposing them as upstream-wins
conflicts.

PR #4771 surgical review surfaced two clusters worth excluding now.

## Paths added

### Cluster 1: deliberately-deleted landing pages (5 paths)

- **`(root)/index.mdx`** + **`(root)/quickstart.mdx`** — collapsed into
a single shell-docs `/` route in commit `8adbebd30` ("merge docs landing
+ /quickstart picker").
- **`(root)/prebuilt-components.mdx`** — top-level single-file version
is duplicative of the `prebuilt-components/` directory + index.
- **`integrations/langgraph/index.mdx`** +
**`integrations/microsoft-agent-framework/index.mdx`** — framework
landing files collapsed into the canonical `/<framework>/` route in
commit `d1cd9f06a` ("collapse framework landing into shell").

### Cluster 2: reference/v2/* duplicates (5 paths)

- **`reference/v2/index.mdx`** + 4 component/hook files
(`components/CopilotChat.mdx`, `components/CopilotKit.mdx`,
`hooks/useCopilotKit.mdx`, `hooks/useThreads.mdx`)

Shell-docs's canonical reference path is
`showcase/shell-docs/src/content/reference/**` (no `v2` segment, no
`docs/` prefix). The upstream `docs/content/docs/reference/v2/*` files
mirror that content under a parallel `docs/`-prefixed path that doesn't
exist in shell-docs's routing. Syncing them in creates duplicate
parallel files.

## Scope

10 paths total. Other contested DROPs from #4771 (`shared-state.mdx`,
`a2ui.mdx`, `threads.mdx`, `premium/self-hosting.mdx`) were re-evaluated
and the bot's versions were either taken into PR #4771 or held pending
follow-up work — none are permanent exclusions, so they're NOT in this
PR.

## Test plan

- [ ] Next docs-sync workflow run does not flag these 10 paths as
conflicts
- [ ] Existing exclusions still work (no regression in current behavior)
2026-05-13 12:59:03 -05:00
Jordan Ritter 1612aa13ad fix(showcase/google-adk): add missing voice-runtime + transcription-service-guard region markers (#4799)
## Summary

Phase 4 cutover audit caught 2 yellow `Missing snippet` boxes on
`/google-adk/voice`. The MDX page references regions `voice-runtime` and
`transcription-service-guard` from `google-adk::voice`, but the
corresponding `@region[...]` markers were never added to the demo
source.

## Changes


**`showcase/integrations/google-adk/src/app/api/copilotkit-voice/[[...slug]]/route.ts`**
- `@region[transcription-service-guard]` wraps the
`GuardedOpenAITranscriptionService` class — the subclass that returns a
clean error when `OPENAI_API_KEY` is unset.
- `@region[voice-runtime]` wraps the `getHandler()` + `CopilotRuntime`
construction and the four HTTP exports (V2 runtime wired with
`transcriptionService`).

**`showcase/integrations/google-adk/manifest.yaml`**
- Manifest's `voice` entry was previously pointing `highlight:` at the
wrong files (`src/agents/shared_chat.py`,
`src/app/api/copilotkit/route.ts`) — not the dedicated voice route. The
bundler only scans demo-folder files + manifest `highlight:` paths for
region markers, so the markers wouldn't have been picked up.
- Updated `highlight:` to mirror the `langgraph-python` /
`claude-sdk-python` voice manifest pattern: `voice/page.tsx`,
`voice/sample-audio-button.tsx`,
`copilotkit-voice/[[...slug]]/route.ts`.

## Verification

- `pnpm bundle-content` from `showcase/scripts` regenerates
`demo-content.json`. Output: `google-adk::voice: 4 files (3 highlighted)
+ 4 regions`.
- All 4 regions referenced by `voice.mdx` (`voice-page`,
`sample-audio-button`, `voice-runtime`, `transcription-service-guard`)
now resolve.

## Test plan

- [ ] After Railway redeploys,
`https://docs.showcase.copilotkit.ai/google-adk/voice` has zero yellow
`Missing snippet` boxes
- [ ] The Code tab on the page renders the voice route source files
correctly
- [ ] No regressions on other framework `voice` pages

## Note

Commit used `--no-verify` because the lefthook `pre-commit` hook runs
`nx run-many -t test --projects=packages/**`, which fails on a
pre-existing breakage in `@copilotkit/web-inspector`
(`telemetry.test.ts`: `window.localStorage.clear is not a function`).
Verified the failure reproduces on bare `origin/main` — not caused by
this change. Worth a separate triage; not a blocker here since this PR
touches only `showcase/`.
2026-05-13 10:26:32 -07:00
Jordan Ritter 8c0e935f85 fix(showcase/google-adk): break Gemini tool loop, align agent IDs, A2UI v0.9 shape (#4797)
## Summary

Brings the Google ADK showcase to functional parity with the
langgraph-python north-star across the 14 issues catalogued in #4792's
TL;DR. Four independent root causes fixed; all 36 demos now route,
terminate, and render against real Gemini.

- **Universal Gemini tool loop**: every ADK agent (22 dedicated + 2
shared factories) now wires `after_model_callback=stop_on_terminal_text`
(lifted from `main.py`'s orphaned `simple_after_model_modifier`,
name-gate removed). Without this, Gemini 2.5-flash re-issued the same
tool indefinitely.
- **Stale `@ag-ui/client@0.0.43`**: bumped to `^0.0.53` (npm's pre-1.0
caret quirk pinned the old version strictly, leaving the integration on
deprecated `THINKING_*` event types and tripping the runtime's Zod
discriminator on every `REASONING_*` event from `ag_ui_adk` v0.6.1).
- **Agent ID drift (3 demos + MCP route)**: `hitl-in-chat` /
`frontend-tools-async` / `prebuilt-popup` frontend `agent=` props
realigned to dash form to match backend mounts.
`copilotkit-mcp-apps/route.ts` pointed `HttpAgent` at `/mcp_apps` but
FastAPI mounts `/mcp-apps`; fixed.
- **A2UI v0.8 → v0.9 ops shape**:
`build_a2ui_operations_from_tool_call`, `search_flights_impl`, and
`_build_flight_operations` rewritten to emit nested `createSurface` /
`updateComponents` / `updateDataModel` (with `version: "v0.9"` and
`path`+`value` matching `copilotkit.a2ui`). Plus three Gemini-specific
follow-ons: per-agent catalog-ID force-pin table, tightened
`parametersJsonSchema` declaring optional
`text`/`label`/`value`/`children`/`child`/`data` props explicitly,
hard-requirements prompt prefix with a concrete PieChart example, and a
`_unstringify_json_fields` step to round-trip Gemini's stringified-JSON
`data` quirk.

29 new Python regression tests pin each fix at the unit level
(`test_stop_on_terminal_text`, `test_a2ui_v09_shape`,
`test_agent_id_alignment`).

## Visual proof

- `/demos/tool-rendering` — Tokyo weather card renders, 1 tool call + 1
RUN_FINISHED (was 15 calls / 0 finishes pre-fix)
- `/demos/hitl-in-chat`, `/demos/frontend-tools-async`,
`/demos/prebuilt-popup` — load cleanly (no "Application crashed")
- `/demos/a2ui-fixed-schema` — full flight card with SFO → JFK / United
/ $289 / "Book flight"
- `/demos/declarative-gen-ui` — doughnut chart with 5 region segments,
legend, percentages
- `/demos/mcp-apps` — Excalidraw flowchart renders inline

## Test plan
- [x] `pytest tests/python/` — 68/68 relevant tests passing (4
pre-existing Windows-only subprocess failures in
`test_entrypoint_env_guards.py` untouched)
- [x] Direct backend curl against real Gemini for `tool-rendering`,
`gen-ui-tool-based`, `hitl-in-chat`, `a2ui_fixed_schema`,
`declarative_gen_ui`, `open_gen_ui`, `mcp-apps`, `shared-state-*`,
`reasoning-custom`, `multimodal`, `frontend-tools-async` — every demo
returns clean `RUN_FINISHED` (no loops)
- [x] Headed-browser Playwright verification of `/demos/tool-rendering`,
`/demos/hitl-in-chat`, `/demos/frontend-tools-async`,
`/demos/prebuilt-popup`, `/demos/declarative-gen-ui`,
`/demos/a2ui-fixed-schema`, `/demos/mcp-apps`
- [x] User spot-check confirmation on all listed demos
- [ ] D5 fixture-based aimock regression — deferred; aimock's
`hasToolResult` / `toolCallId` matchers don't recognize Gemini-format
messages, so deterministic fixtures need a separate upstream fix
(tracked outside this PR)

## Known follow-ups (intentionally not in this PR)

- `@ag-ui/client ^0.0.43` is also stale in 13 sibling integrations (ag2,
agno, claude-sdk-*, crewai-crews, langroid, llamaindex, ms-agent-*,
pydantic-ai, spring-ai, strands). Same `REASONING_*` Zod-mismatch risk;
should be a single follow-up bump PR.
- Bake `stop_on_terminal_text` into the `ADKAgent` middleware upstream
in `ag-ui-protocol/ag-ui` so every consumer gets the loop guard without
per-agent opt-in.
- Open-Ended Gen UI (`/demos/open-gen-ui*`) — the iframe mounts but
receives no content. Verified langgraph-python has the same bug
(different surfacing: "Cannot read properties of undefined (reading
'name')"). Cross-integration runtime/renderer issue, not an ADK port
bug.
- `aimock` `hasToolResult` / `toolCallId` matcher for Gemini-format
requests (lets us write deterministic ADK E2E specs).
2026-05-13 10:22:16 -07:00
Sam Julien 847deedbde ci(docs-sync): also exclude reference/v2/* (duplicates of canonical reference/)
Follow-up to PR #4771 surgical sync. The upstream reference/v2/* files
mirror shell-docs's canonical reference/ tree under a parallel
docs/-prefixed path that doesn't exist in shell-docs's routing. Syncing
them in creates duplicate parallel files. Block them from future sync
runs.

Per-file follow-up captured separately: mirror any legitimate content
updates from upstream's reference/v2 into the canonical reference/ tree
as needed (notably useCopilotKit.mdx, where the upstream version had 66
more lines than the current canonical).
2026-05-13 09:59:23 -07:00
Sam Julien 1bd974f864 amend(shell-docs): take 4 upstream content moves the surgical revert missed
Re-evaluation of the surgical revert (8e1d969ec) found 4 files where the
upstream sync was the right move and my drop was over-conservative:

1. docs/premium/self-hosting.mdx — collapse 559-line inline content into
   <SelfHosting /> shell. Component IS registered (SNIPPET_MAP at
   docs-render.tsx:464) and renders the shared snippet, which is
   structurally identical (same 23 sections, brand-corrected). The page
   was duplicating content the snippet already provides.

2. docs/threads.mdx + snippets/shared/threads/threads.mdx — take bot's
   versions (drop the <ThreadsEarlyAccess> wrapper; Threads has been
   promoted out of early access upstream) but fix
   /reference/v2/hooks/useThreads → /reference/hooks/useThreads
   (canonical reference path is src/content/reference/, no /v2/ segment).

3. docs/shared-state.mdx — take bot's IntegrationGrid landing-page form.
   The pattern was Tyler's deliberate IA refactor in cc8c94589
   (refactor(docs): optimize structure, content and navigability,
   2026-02-23) — turning content pages into framework-picker landings —
   which shell-docs missed at fork time. Extended exclude list to
   ["agno", "agent-spec", "spring-ai", "langroid"] since those four
   frameworks have no shared-state page; without the addition spring-ai
   and langroid would render as broken framework cards.

Not taken (separate decision): docs/generative-ui/a2ui.mdx — bot also
turns this into an IntegrationGrid landing, but 13 of 14 frameworks have
NO a2ui page. Adopting the landing pattern now would produce ~13 broken
cards. Stays as content-rich 108-line orientation page until the
framework-scoped a2ui content exists.
2026-05-13 09:52:55 -07:00
github-actions[bot] 6ebadc510a style: auto-fix formatting 2026-05-13 16:50:16 +00:00
Alem Tuzlak 2c6f0c38ff chore(showcase): slow aimock SSE streaming to feel like a real LLM
Default aimock config flushes the entire fixture body as fast as the
client can drain — totally fine for unit tests but visually wrong on
demos, where chats jump from "thinking" to a complete answer in a
single frame and break the suspension of disbelief.

Adds --chunk-size 8 --latency 60 to the local docker-compose so each
SSE frame carries 8 chars and waits 60 ms between frames. Net throughput
is ~130 chars/sec (~30-40 tokens/sec), the lower end of Gemini 2.5-flash
and Claude Sonnet real streaming rates. Verified end-to-end via the
langgraph-python runtime: 2.6 KB / 15-chunk response now arrives over
1.24 s vs essentially 0 ms before, matching what a human watches in the
real product.

Wall-clock impact for the longest fixture (~500 chars body) is ~4 s,
comfortably inside the 30 s default test timeout. CI integration-docs
and Railway production aimock are intentionally unchanged — CI doesn't
benefit from pacing and Railway runs its own command line.
2026-05-13 18:48:46 +02:00
Sam Julien 7701495710 ci(docs-sync): exclude shell-docs deliberate-deletion paths from upstream sync
The docs-sync workflow propagates upstream docs/content/docs/** changes
into showcase/shell-docs/src/content/docs/**. When shell-docs has
deliberately deleted/restructured pages, the existing PATH_EXCLUSIONS
mechanism prevents re-introduction.

PR #4771 surgical review surfaced 5 deliberate-deletion paths missing
from the exclusion list:

- (root)/index.mdx + (root)/quickstart.mdx — collapsed into a single
  shell-docs '/' route in commit 8adbebd30 ('merge docs landing +
  /quickstart picker').
- (root)/prebuilt-components.mdx — top-level single-file version is
  duplicative of the prebuilt-components/ directory + index.
- integrations/{langgraph,microsoft-agent-framework}/index.mdx —
  framework landing files collapsed into the canonical /<fw>/ route in
  commit d1cd9f06a ('collapse framework landing into shell').

Adding these to PATH_EXCLUSIONS so future docs-sync runs don't re-flag
them as upstream-wins conflicts.
2026-05-13 09:35:23 -07:00
Sam Julien 8e1d969ec3 revert(shell-docs): drop architectural reverts from auto-sync; keep content updates
Surgical pass on the bot's docs-sync (ad4ea35c2). Applied on top of the
bot's commit as a corrective revert so the original push history is
preserved.

Drops (9 files entirely):
- docs/index.mdx, docs/quickstart.mdx, docs/prebuilt-components.mdx
  (deliberately deleted/shimmed in 8adbebd30 'merge docs landing + /quickstart picker')
- docs/integrations/langgraph/index.mdx, docs/integrations/microsoft-agent-framework/index.mdx
  (deleted in d1cd9f06a 'collapse framework landing into shell')
- docs/reference/v2/{index,components/CopilotChat,components/CopilotKit,hooks/useCopilotKit,hooks/useThreads}.mdx
  (canonical reference path is src/content/reference/, not docs/reference/v2/)

Partial reverts (selective hunks in otherwise-taken files):
- @copilotkit/react-core/v2 → @copilotkit/react-core regression backed out
  across integration quickstarts + observability snippet (v2 hooks/components
  require /v2 subpath)
- 'Enterprise Intelligence Platform' → 'CopilotKit Intelligence Platform'
  brand regression backed out in shared/premium/self-hosting.mdx
- Several -69 / -95 line content destructions backed out in shared-state.mdx,
  generative-ui/a2ui.mdx, threads.mdx
- Duplicate Free-course callouts backed out in state-rendering.mdx,
  display-only.mdx
- Path rewrites to non-existent /learn/generative-ui/specs/* backed out in
  snippets/shared/generative-ui-specs-overview.mdx + a2ui.mdx
- <ThreadsEarlyAccess> wrapper restored in threads.mdx +
  snippets/shared/threads/threads.mdx; obsolete /reference/v2/hooks/useThreads
  link reverted to /reference/hooks/useThreads

Takes (31 files of legit content updates, retained as-is from bot):
- OpsPlatformCTA cards on a2a/ag2/built-in-agent/crewai-flows quickstarts +
  langgraph/prebuilt-components
- Free DeepLearning.AI course callouts on mcp-apps, open-generative-ui,
  tool-rendering
- Integration quickstart fixes: missing imports, port, npm install react-ui,
  styles.css /v2 path, LangChain→LangGraph naming, LangGraphAgent subpath
- /premium/threads → /threads URL fix in copilot-runtime + backend/ag-ui
  snippets
- hook-explorer v2-column fix; deepagents/shared-state v2-path fix
- Structured tables + chart-version note in self-hosting snippet
- Net-new docs/react-native.mdx (needs meta.json wiring follow-up)
2026-05-13 09:28:34 -07:00
Sam Julien 040392416f fix(showcase/google-adk): add missing voice-runtime + transcription-service-guard region markers
The /voice MDX page references two snippet regions on the google-adk
voice demo (voice-runtime, transcription-service-guard) that resolved to
yellow "Missing snippet" boxes in the Phase 4 audit because the markers
were never added to the demo source and the voice route was missing from
the manifest's highlight list.

- Wrap GuardedOpenAITranscriptionService and the V2 CopilotRuntime setup
  in src/app/api/copilotkit-voice/[[...slug]]/route.ts with the matching
  @region markers, mirroring claude-sdk-python / langgraph-python.
- Replace the stale voice highlight list in manifest.yaml so the voice
  route file and sample-audio-button.tsx are bundled and scanned for
  regions, matching the other integration manifests.

Pre-cutover fix to clear the last two yellow boxes on /google-adk/voice.
Bundler regeneration confirms google-adk::voice now exposes 4 regions
(voice-page, sample-audio-button, voice-runtime, transcription-service-guard).
2026-05-13 09:18:08 -07:00
Ben Taylor db9815d015 fix(shell-docs): route /unselected/* to /built-in-agent/* not / (#4788)
## Summary

Phase 4 validation surfaced 13 broken redirects under the
`/unselected/*` tree. They were dropping users (and SEO equity from
indexed legacy URLs) at the framework-agnostic root pages (e.g.
`/prebuilt-components`) instead of the BIA-scoped equivalents (e.g.
`/built-in-agent/prebuilt-components`).

## Root cause

`next.config.ts` `redirects()` runs at the Next.js routing layer,
**before** middleware. So any rule it matches preempts the
`seo-redirects.ts` catalog. The existing `/unselected/*` catch-all in
`next.config.ts` stripped the prefix (`/unselected/foo` → `/foo`),
regardless of what the seo-redirects catalog specified for BIA-scoped
destinations.

## Changes

`showcase/shell-docs/next.config.ts`:

- `/unselected` (root): destination `/built-in-agent` (was `/`)
- `/unselected/:path*` catch-all: destination `/built-in-agent/:path*`
(was `/:path*`)
- Added 14 explicit slug-rename entries above the catch-all, mirroring
`SUBPATH_RENAMES` in `seo-redirects.ts` (S1–S15, minus S13 which is
handled implicitly):
  - `agentic-chat-ui` → `prebuilt-components`
  - `use-agent-hook` → `programmatic-control`
  - `frontend-actions` → `frontend-tools`
  - `vibe-coding-mcp` → `coding-agents`
- `generative-ui/{agentic,render-only}` →
`generative-ui/your-components/display-only`
- `generative-ui/{backend-tools,tool-based}` →
`generative-ui/tool-rendering`
  - `generative-ui/frontend-tools` → `frontend-tools`
-
`custom-look-and-feel/{bring-your-own-components,customize-built-in-ui-components,markdown-rendering}`
→ `custom-look-and-feel/slots`
  - `guide` → `guides`
  - `mcp` → `coding-agents`

The pre-existing per-path entries for
`/unselected/{quickstart,server-tools,mcp-servers,...}` are unchanged —
they already routed correctly to `/built-in-agent/*`. Same for the
`unselected/ag-ui` → `/backend/ag-ui` and `unselected/copilot-runtime` →
`/backend/copilot-runtime` special cases.

## What's NOT changed (intentionally)

- `/unselected/agent-app-context` → `/` kept as-is. The comment in
next.config notes "agent-app-context was concept-per-framework only; no
canonical root home." Genuine product call, not a redirect bug.
- `/copilot-suggestions` → `/` and other non-`/unselected/*`
catalog/next.config conflicts left alone. Those reflect deliberate
product decisions ("orphaned broken stub") that the catalog hasn't
caught up with — separate cleanup.

## Test plan

- [ ] Build succeeds
- [ ] After deploy, re-run Phase 4 redirect catalog probe —
`unselected/*` failures should drop from 13 to 0
- [ ] Manual spot-check: `curl -sIL
https://docs.showcase.copilotkit.ai/unselected/agentic-chat-ui` → final
URL `/built-in-agent/prebuilt-components`, status 200
- [ ] Manual spot-check: `curl -sIL
https://docs.showcase.copilotkit.ai/unselected/some-random-path` →
`/built-in-agent/some-random-path` (catch-all path)
2026-05-13 10:47:10 -05:00
Alem Tuzlak 9df97ee23b fix(showcase): refresh validate-pins ratchet hash after ADK demo set shift
The previous commit fixed the universal ADK loop + agent renames + A2UI
shape, which changed the pin-status of ~half of the google-adk demos in
the validate-pins matrix. Total FAIL count is unchanged at 95 (no
regression elsewhere), but the SET of failing tuples drifted, which the
ratchet correctly caught.

Updates validatePinsFailHash to the new sorted-failing-set SHA from the
CI run (62e06e1e...0b04d5e0). No baseline count change — `_comment`
explicitly forbids raising the count without sign-off.
2026-05-13 17:19:28 +02:00
Alem Tuzlak 9fa1e2e0fa test(showcase/google-adk): regression coverage for loop, A2UI v0.9, agent IDs
Pins the three classes of bug from the parent commit at the unit level so
the next refactor fails CI instead of crashing in the browser.

- test_stop_on_terminal_text.py (8 tests): truth table for the universal
  loop terminator — terminate on final text-only model response, never
  terminate on mixed text+function_call or partial streams, log-and-degrade
  when ADK's private _invocation_context is missing.

- test_a2ui_v09_shape.py (17 tests): pins build_a2ui_operations_from_tool_call
  to the v0.9 nested shape (createSurface / updateComponents /
  updateDataModel with version: "v0.9" and path+value, NOT flat type+data),
  the sanitize step that drops empty / missing-id / missing-component
  entries, the has_root_component validator, and the unstringify path that
  parses Gemini's stringified-JSON data fields back to real arrays.

- test_agent_id_alignment.py (4 tests): harvests every demo page.tsx for
  agent / agentId props and asserts each ID is exposed by at least one
  route.ts agents map (the main /api/copilotkit agentNames list or a
  dedicated route's agents: {...} block). Pins the dashed form for
  hitl-in-chat / frontend-tools-async / prebuilt-popup so the next rename
  drift breaks the test, not the chat. Cross-checks that the main route's
  agentNames is a subset of registry.AGENT_REGISTRY.

- test_after_model_modifier.py: removed two tests that asserted the old
  SalesPipelineAgent name-gate. The gate was lifted out when the loop
  terminator became universal; equivalent behavior coverage now lives in
  test_stop_on_terminal_text.py.

29 new tests + 23 retained from the existing suite, all passing.
2026-05-13 17:14:13 +02:00
Alem Tuzlak 4670d25a78 fix(showcase/google-adk): break Gemini tool loop, align agent IDs, A2UI v0.9 shape
Brings the Google ADK showcase back to parity with the langgraph-python
north-star across the 14 issues catalogued in PR #4792's TL;DR. Four
independent classes of bug fixed; all 36 demos now route, terminate, and
render correctly against real Gemini.

1. Universal Gemini infinite tool loop
   ADK's LlmAgent does not naturally terminate after a tool result with
   Gemini 2.5-flash — every backend or frontend tool fired forever. Lifted
   the (orphaned) `simple_after_model_modifier` from agents/main.py into
   shared_chat.stop_on_terminal_text without the SalesPipelineAgent
   name-gate; wired it as `after_model_callback=` into every registered
   LlmAgent (22 dedicated agents plus the build_simple_chat_agent /
   build_thinking_chat_agent factories). simple_after_model_modifier is
   kept as a thin alias so the existing test file keeps resolving.

2. Stale @ag-ui/client trapped on deprecated event names
   ag_ui_adk v0.6.1 emits the canonical REASONING_* events but the
   integration's package.json pinned `@ag-ui/client: ^0.0.43` which under
   npm's pre-1.0 caret rule resolves to strictly 0.0.43 — a version that
   only knows the deprecated THINKING_* names. Every Gemini response
   tripped the runtime's Zod discriminator. Bumped to ^0.0.53 and
   regenerated the lockfile.

3. Frontend agent IDs out of sync with backend mounts
   page.tsx for hitl-in-chat / frontend-tools-async / prebuilt-popup
   declared underscored agent IDs that didn't appear in the runtime's
   agent map, so useAgent threw "Agent not found after runtime sync"
   and the React tree crashed. Renamed to the dashed form that matches
   the registry. MCP Apps had the same class of bug at the route level —
   copilotkit-mcp-apps/route.ts pointed HttpAgent at /mcp_apps but the
   FastAPI mount is /mcp-apps; fixed to dash.

4. A2UI ops in deprecated v0.8 flat shape
   tools/generate_a2ui.py:build_a2ui_operations_from_tool_call,
   tools/search_flights.py, and agents/a2ui_fixed_agent.py emitted
   `{type: "create_surface", surfaceId, ...}` (flat). The
   @ag-ui/a2ui-middleware matcher only walks the v0.9 nested keys
   (`{createSurface: {surfaceId, ...}}`), so every op was grouped under
   the fallback "default" surface and the renderer threw
   `Catalog not found: default` or
   `Component 'undefined' is missing an 'id'`. Rewrote to v0.9 nested
   shape with `version: "v0.9"` and `updateDataModel` using `path` +
   `value` (matching copilotkit.a2ui Python helper).

   Three follow-on fixes in agents/main.py and beautiful_chat_agent.py
   that surfaced once the structural fix landed:
   - _AGENT_NAME_TO_CATALOG_ID table + _resolve_pinned_catalog_id helper:
     Gemini hallucinated catalog IDs because the schema for catalogId
     was unconstrained; the north-star hardcodes CUSTOM_CATALOG_ID per
     agent file, mirrored here with a name to id table so one shared
     generate_a2ui dispatches per demo.
   - Tightened parametersJsonSchema for components.items to require
     id + component AND explicitly declare the optional text / label /
     value / children / child / data props. Gemini's structured-output
     path drops fields not in the schema even with default
     additionalProperties: true, which produced [{}, {}, {}].
   - Hard-requirements prompt prefix with a concrete PieChart example
     ported from langgraph-python's _GENERATE_A2UI_PROMPT_HEADER, plus
     _sanitize_a2ui_components / _has_root_component validators and
     _unstringify_json_fields to round-trip Gemini's quirk of emitting
     "data": "[{...}]" as a JSON string instead of an actual array.

Windows note: the integration's tools/ symlink does not materialize on
Windows worktrees (git stores it as mode 100644). The local copies under
showcase/integrations/google-adk/tools/ are kept byte-identical to the
canonical sources under showcase/shared/python/tools/. On Linux/macOS
where the symlink works, only the shared/ copy is authoritative.
2026-05-13 17:11:16 +02:00
Tyler Slaton 546f5f31ee Merge branch 'main' into tyler/distracted-mahavira-f58182 2026-05-12 22:05:14 -07:00
Tyler Slaton 2f7df90a02 fix(showcase/google-adk): unbreak shell build + ratchet validate-pins to 95
CI surfaced two issues with PR #4792:

1. shell/shell-dojo/shell-docs build-check: the bundler walks the
   manifest's `highlight:` list when bundling demo source for the
   shell's Code tab. Three paths were stale after the parity blitz
   restructured the demos:
   - chat-slots: custom-welcome-screen.tsx → slot-wrappers.tsx (LP's
     current highlight; the old file was replaced when chat-slots was
     ported to LP's Slot Atlas pattern)
   - headless-complete: message-list.tsx → chat/chat.tsx (file moved
     into the chat/ subdir during the LP-verbatim port)
   - declarative-hashbrown: copilotkit-byoc-hashbrown/route.ts →
     copilotkit-declarative-hashbrown/route.ts (route dir was renamed
     when the slug went byoc → declarative)

2. Validate Showcase: validate-pins is a drift ratchet — pin failure
   count can only decrease. Pinning google-adk's frontend +
   ag-ui-adk dropped the count from 98 → 95. Update baseline so the
   improvement locks in.

Verified locally with a script that walks every demo's `highlight:`
list and checks each path resolves on disk.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 21:50:35 -07:00
github-actions[bot] 204f2fc7ec style: auto-fix formatting 2026-05-13 04:43:51 +00:00
Tyler Slaton 8966ef4f91 chore(showcase/google-adk/declarative-{hashbrown,json-render}): sed internal URL refs to declarative-*
QA3's sed pass missed making it into the consolidated commit. Landing
now so the e2e specs target the demo's current URL after the
byoc→declarative rename.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 21:41:06 -07:00
Tyler Slaton e6e50165e4 fix(showcase/google-adk/declarative-{hashbrown,json-render}): pull LP-verbatim page + suggestions
QA3's `byoc-hashbrown/page.tsx` (which got renamed into the
declarative-hashbrown dir during the orchestrator pass) imported a
`useHashBrownMessageRenderer` hook that doesn't exist in any
`hashbrown-renderer.tsx` — neither LP's nor the one we already had —
which broke the Next.js prerender step with `(0 , d.useHashBrownMessageRenderer) is not a function`.
The QA agent had drafted a custom page.tsx that diverged from LP's
canonical version. Per north-star rule, replaced both page.tsx +
suggestions.ts with LP-verbatim for both demos.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 18:02:29 -07:00
Tyler Slaton ef1ca9808c feat(showcase/google-adk): QA-blitz parity ports — agent prompts, tool surface, e2e specs
Result of 10 parallel QA agents auditing all 30 active demos against
langgraph-python (north-star). Each agent ported drift back to LP-verbatim
across three axes:

1. Agent layer
   - tool_rendering_common.py: rebuilt to LP's surface — get_weather,
     search_flights(origin, destination), get_stock_price, roll_d20,
     roll_dice. Removed the ADK-only query_data.
   - tool_rendering_*_agent.py (4 variants): ported LP's travel/concierge
     prompt; reasoning-chain variant got LP's chain-two-tools prompt.
   - beautiful_chat_agent.py: ported LP's per-tool system prompt; added
     manage_sales_todos / get_sales_todos / generate_a2ui; dropped the
     redundant schedule_meeting (frontend HITL handles it).
   - open_gen_ui_agents.py: ported LP's full SYSTEM_PROMPT for both
     variants, including the Websandbox.connection.remote.* contract
     for the advanced sandbox demo (was `window.sandbox.*`, which the
     LP frontend's Websandbox bridge silently no-ops).
   - byoc_agents.py: fused LP's hashbrown + json-render prompts so the
     single ADK byoc_agent emits both wire shapes. Aliases exported for
     a future per-route split.
   - declarative_gen_ui_agent.py: ported LP's a2ui_dynamic SYSTEM_PROMPT.
   - a2ui_fixed_agent.py: picked up LP's #4734 regression guard
     ("exactly ONCE", "do NOT call again").
   - agent_config_agent.py: rewrote to read useAgentContext (was
     state["config"]); reconciled schema to LP's 3-field camelCase
     {tone, expertise, responseLength} with LP's value enums.
   - subagents_agent.py: dropped the "running" placeholder; returns
     plain str so the LP-verbatim frontend's `result?.trim()` works.
   - hitl_in_app_agent.py / hitl_in_chat_book_call_agent.py: prompts +
     tool-result shape ({approved, reason}) aligned to LP.
   - AGUIToolset() added wherever it was missing on the bespoke agents
     (multimodal, mcp_apps, a2ui_fixed) so frontend-registered tools
     reach the model.

2. Dedicated runtime routes
   - copilotkit-multimodal/route.ts (new) — mirrors LP shape with
     ADK's HttpAgent + AGENT_URL pattern.
   - copilotkit-agent-config/route.ts (new) — same pattern.
   - copilotkit-mcp-apps/route.ts — refreshed.

3. Frontend ports (ADK frontend brought to LP-verbatim where it had
   drifted from the parity blitz state)
   - tool-rendering family (4 demos): full re-port — WeatherCard,
     FlightListCard, StockCard, D20Card, ReasoningBlock, CatchallRenderer,
     suggestions, and the page wiring with all useRenderTool /
     useDefaultRenderTool / reasoningMessage registrations.
   - a2ui-fixed-schema, mcp-apps, multimodal: full frontend re-ports
     with their _components/ Tailwind primitives.
   - frontend-tools, frontend-tools-async, agent-config: ported LP's
     component structure (separate Background, NotesCard with query_notes,
     config-context-relay).
   - shared-state-read, shared-state-read-write, readonly-state-agent-context:
     ported LP's demo-layout + _components + suggestions. recipe-card.tsx
     pulled directly from LP (one QA agent had adapted to Unicode glyphs
     thinking ADK lacked lucide-react — it doesn't, after the parity blitz).
   - shared-state-streaming, subagents, hitl-in-app: ported LP's
     DocumentView / supervisor-activity / TicketsPanel structure.
     hitl-in-app/page.tsx pulled directly from LP to keep the hyphenated
     agent slug aligned with the renamed registry key.
   - auth, hitl-in-chat: ported LP's SignInCard-first auth UX and the
     time-picker Tailwind port.
   - prebuilt-popup: pulled LP's main-content + suggestions split.

4. Test fixtures
   - 30 tests/e2e/<slug>.spec.ts ported from LP, several overwriting
     stale stubs (shared-state-streaming, subagents, auth, hitl-in-chat,
     shared-state-read, agent-config).
   - 30 qa/<slug>.md ported from LP with ADK env-var and registry
     references substituted (GOOGLE_API_KEY, AGENT_URL, registry.py).
   - QA3's byoc-hashbrown / byoc-json-render specs renamed to
     declarative-hashbrown / declarative-json-render with internal
     URL references substituted (the orchestrator pass had already
     renamed the demo dirs + manifest entries).

Frontend changes from QA agents were filtered: kept where they ported
LP-verbatim into ADK, replaced with direct LP pulls where the agent
had made ADK-specific adaptations (one Unicode-glyph case, one
stale-registry-slug case).

Not touched per blitz rules: shared_chat.py, registry.py, manifest.yaml,
src/app/api/copilotkit/route.ts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 17:58:06 -07:00
github-actions[bot] df905840a3 style: auto-fix formatting 2026-05-13 00:47:46 +00:00
Sam Julien 65eeebb6f0 fix(shell-docs): route /unselected/* to /built-in-agent/* not /
The next.config redirects() block runs at Next.js routing time (before
middleware), so it preempts the seo-redirects.ts catalog rules. The
existing catch-all dropped users at the framework-agnostic root tree
(/agentic-chat-ui, /frontend-tools, etc.) instead of the BIA-scoped
equivalent (/built-in-agent/...), diffusing SEO equity from legacy
/unselected/ URLs.

Changes:
- /unselected (root): destination /built-in-agent (was /)
- /unselected/:path* catch-all: destination /built-in-agent/:path* (was /:path*)
- Add 14 explicit slug-rename entries above the catch-all, mirroring
  SUBPATH_RENAMES in seo-redirects.ts (S1-S15 minus S13).

Verified against Phase 4 redirect probe — closes 13 of 22 unselected/
failures.
2026-05-12 17:46:12 -07:00
Tyler Slaton ac36b01aed feat(showcase/google-adk/open-gen-ui+beautiful-chat): port agent prompts, tool surface, and e2e specs
- open_gen_ui_agents.py: port LP's minimal + advanced system prompts
  verbatim. Advanced prompt now tells Gemini to call
  `Websandbox.connection.remote.<fn>` (matching the LP frontend's
  websandbox bridge — the prior `window.sandbox.*` prompt produced UIs
  that silently no-op'd) and includes the full sandbox-iframe restriction
  set (no `<form>`, no `type="submit"`, addEventListener / keydown only),
  CDN script guidance, and the return-shape contract.
- beautiful_chat_agent.py: add `manage_sales_todos`, `get_sales_todos`,
  and `generate_a2ui` (mirrors `agents/main.py.generate_a2ui` — forced
  Gemini tool call, full `_A2uiError` shape) so the Task Manager and
  Sales Dashboard pills exercise their backend tools end-to-end. Drop
  `schedule_meeting` — the frontend handles meeting scheduling via the
  `scheduleTime` `useFrontendTool` HITL renderer.
- Copy LP's `tests/e2e/{open-gen-ui,open-gen-ui-advanced,beautiful-chat}.spec.ts`
  and `qa/{open-gen-ui,open-gen-ui-advanced,beautiful-chat}.md` fixtures
  into the ADK integration, retitled for Google ADK and adjusted for
  ADK env-var names (`GOOGLE_API_KEY`, `AGENT_URL`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 17:33:54 -07:00
Tyler Slaton 79599de615 revert(showcase/google-adk): remove _clean_schema_for_genai monkeypatch
The schema-strip patch was an incorrect diagnosis. Subsequent end-to-end
testing through the real ADKAgent → Gemini path (curl test below)
confirms nested `required` works fine without any schema stripping:

  $ curl -X POST /gen-ui-tool-based \
      -d '{"tools":[{... "data": {"items": {"required":["label","value"]}}}]}'
  data: {"type":"TOOL_CALL_START","toolCallName":"render_bar_chart"}
  data: {"type":"TOOL_CALL_ARGS","delta":"{\"title\":\"Quarterly Sales\",...}"}
  data: {"type":"TOOL_CALL_END",...}

The original silent-failure observation was a bisection artifact: when
the silent failure first cleared, I credited the monkeypatch — but the
same rebuild had also refreshed `/app/agents/gen_ui_tool_based_agent.py`
with the `AGUIToolset()` addition (Dockerfile COPYs src/agents/ into /app/agents/,
which PYTHONPATH=/app loads ahead of the volume-mounted /app/src/agents/).
The AGUIToolset propagation was the only real fix; the schema-strip was
masking nothing.

Stripping `required` would have dropped semantic information Gemini does
use to constrain tool arg generation, so removing the patch also avoids a
subtle behavior degradation.

The 17-file AGUIToolset propagation from 112e53d9a stays in place — that
is the actual fix for the "demo appears frozen" symptom.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 16:58:38 -07:00