Commit Graph

1975 Commits

Author SHA1 Message Date
Jordan Ritter 0edac5285d fix: deduplicate spring-ai headless-simple assistant messages to prevent infinite loop
The AG-UI Spring AI adapter's ToolMapper returns empty strings for frontend
tool results (show_card, book_call) because actual execution happens on the
CopilotKit frontend. After aimock fixtures exhaust and proxy-mode forwards
to the real LLM, the model keeps calling the same frontend tool, creating an
unbounded loop. Each CopilotKit follow-up run produces a new assistant
message, growing the DOM from 0 to 300+ elements and preventing the D5
conversation-runner from settling.

The fix deduplicates rendered messages at the React level: only the first
assistant message per unique tool-call name is rendered, and only the first
text-only narration message passes through. This stabilises the DOM at 2-3
elements regardless of backend loop iterations, allowing the probe to settle
and assert on the ShowCard component and narration text.
2026-04-28 10:37:12 -07:00
Jordan Ritter 6fe6625a4a fix(showcase): fix D5 hitl probes for mastra and langgraph-fastapi
mastra hitl-approve-deny: fix mixed V2/non-V2 CopilotKit import in
hitl-in-app/page.tsx — import CopilotKit from @copilotkit/react-core/v2
instead of @copilotkit/react-core so the provider and child hooks share
the same context tree

langgraph-fastapi hitl-steps: add dedicated hitl_steps graph (tools=[],
CopilotKitMiddleware) matching the langgraph-python reference pattern.
The human_in_the_loop agent alias previously mapped to sample_agent
which has 7 backend tools and a custom AgentState with todos — the HITL
step-selection demo only needs the frontend-injected generate_task_steps
tool via CopilotKitMiddleware, so the minimal graph eliminates
state/tool contention

Also fix mixed V2/non-V2 CopilotKit import in langgraph-fastapi
hitl-in-app/page.tsx proactively
2026-04-28 10:37:11 -07:00
Jordan Ritter ee5952bd46 fix(showcase): fix tool-rendering D5 probes for llamaindex and ms-agent-dotnet
- Add missing `import os` to llamaindex agent.py (NameError crash on
  os.environ.get at module level prevented agent server startup)
- Update useRenderTool in both services to canonical v2 pattern:
  use `parameters` instead of `args`, add deps array, remove `: any`
  type cast
2026-04-28 10:37:11 -07:00
Jordan Ritter 9729cffbce fix(showcase): fix D5 probe failures for claude-sdk-python and langroid
claude-sdk-python tool-rendering: ToolCallResultEvent was missing the
required `message_id` field, causing a pydantic ValidationError that
crashed the SSE stream whenever a tool was invoked. Add message_id
derived from the parent message id and tool call id.

claude-sdk-python agentic-chat: wrap the Anthropic streaming loop in
try/except so errors from the LLM client surface as visible text in
the assistant message instead of silently breaking the SSE stream.

langroid agentic-chat: bump ag-ui-protocol from ==0.1.9 to >=0.1.14.
Version 0.1.9 typed UserMessage.content as `str` only, but CopilotKit
sends structured content as `list[TextInputContent]`. This caused a
pydantic ValidationError on every request, breaking all langroid
backend endpoints.
2026-04-28 10:36:38 -07:00
Jordan Ritter 468095ed83 fix: align pydantic-ai demos with langgraph-python reference for D5 probe compatibility
agentic-chat: strip extra frontend tools (change_background, get_weather) and
agent context that interfere with D5 3-turn conversation probe; use unified V2
imports from @copilotkit/react-core/v2

hitl-in-app: fix mixed V2/non-V2 CopilotKit import; portal approval dialog to
document.body via createPortal so D5 probe can reliably click Approve button
regardless of parent CSS stacking context

Update e2e tests to match simplified agentic-chat page (remove weather card and
background change assertions for features that no longer exist)
2026-04-28 10:36:38 -07:00
Jordan Ritter 92aee33b90 fix(showcase): use V2 CopilotKit provider import across all google-adk demos
All 25 demo pages had CopilotKit imported from @copilotkit/react-core
(V1) while V2 hooks (useRenderTool, useFrontendTool, useAgent, etc.)
were imported from @copilotkit/react-core/v2. This mixed-import causes
V2 hooks to silently fail because they cannot find the V2 context
provided by the V1 CopilotKit provider.

Consolidated all imports so CopilotKit comes from
@copilotkit/react-core/v2 alongside the other V2 hooks. The only
remaining V1 import is useLangGraphInterrupt in hitl/page.tsx, which
is not available in V2.
2026-04-28 10:36:38 -07:00
Jordan Ritter 29d63143b6 fix: align google-adk subagent tool parameter names with aimock fixtures
The aimock D5 fixtures send tool calls with argument names `topic`,
`brief`/`facts`, and `draft` for the three sub-agent tools, but the
google-adk Python functions all used `task: str`. Google ADK maps
function arguments strictly by name, so the mismatch caused every
sub-agent tool call to fail silently.

- research_agent: task -> topic
- writing_agent: task -> brief + facts (optional)
- critique_agent: task -> draft
- Updated supervisor instruction to reference correct parameter names
2026-04-28 10:36:38 -07:00
Jordan Ritter 6bc0db6a25 fix: harden showcase packages — dep pins + Docker image pins
Dependency version floors:
- next: ^15.0.0 → ^15.5.15 across all 19 showcase packages (CVE-2025-29927)
- express: ^4.21.0 → ^4.21.2 in claude-sdk-typescript (open redirect fix)
- hono: ^4.0.0 → ^4.6.0 in shell (path traversal fix)

Docker base image pins:
- node:20-slim → node:20.19-slim (18 Dockerfiles)
- python:3.12-slim → python:3.12.11-slim (12 Dockerfiles)
- aimock:latest → aimock:1.13.0 (1 Dockerfile)

Part of CPK-7320
2026-04-28 10:33:06 -07:00
Alem Tuzlak c46a3d951d docs(showcase): region markers across ms-agent-python + ms-agent-dotnet (batch 2) (#4363)
## Summary

Per-framework region pass on the MS Agent Framework integrations
(positions 5 + 6 in the dashboard left-to-right). Frontends are
byte-identical between the two; backends diverge (Python in
`src/agents/*.py` vs C# in `agent/*.cs`). One commit per framework so
reviewers can navigate.

15 (framework × cell) targets advanced from B (regions missing) to A
(ready). 0 yellow boxes introduced.

## Cells covered

| Cell | ms-agent-python | ms-agent-dotnet |
|---|---|---|
| agentic-chat | 3 regions (provider-setup, configure-suggestions,
chat-component sibling) | same |
| tool-rendering | 4 regions (render-weather-tool, weather-tool-backend
on `src/agents/agent.py`, render-flight-tool + catchall-renderer
sibling) | same shape, weather-tool-backend on `agent/Program.cs` |
| frontend-tools | 2 regions (frontend-tool-handler,
frontend-tool-registration) | same |
| readonly-state-agent-context | 2 regions (context-provider-sketch,
use-agent-context-call) | same |
| open-gen-ui | minimal-provider-setup + minimal-runtime-flag |
minimal-runtime-flag only (advanced-runtime-config existed already) |
| open-gen-ui-advanced | advanced-runtime-config + multi-file
sandbox-function-registration | advanced-runtime-config |
| a2ui-fixed-schema | backend-schema-json-load +
backend-render-operations on `src/agents/a2ui_fixed.py` |
backend-render-operations on `agent/A2uiFixedSchemaAgent.cs`
(schema-json-load deferred — see below) |
| mcp-apps | — | no-frontend-renderer-needed + runtime-mcpapps-config |

## Patterns applied (same as #4326, #4361)

- **In-place markers** for all frontend cells where the existing code
reads as a clean teaching example.
- **Sibling `<region>.snippet.tsx` files** for the QA-laden Chat case
(`chat-component`) and the partial-feature tool-rendering case
(`render-flight-tool` + `catchall-renderer`). Same content as mastra's
siblings.
- **Multi-file region** for `sandbox-function-registration` on
ms-agent-python (page.tsx + sandbox-functions.ts).
- **Manifest highlight additions** for tool-rendering on both frameworks
(the backend agent file wasn't previously bundled).

## Deferred

These cells need either showcase-team alignment or the auto-config
infrastructure to ship before regions can be added without
misrepresenting the framework:

| Deferred cell | Why |
|---|---|
| `gen-ui-interrupt` (both frameworks) | MS Agent Framework lacks a
native interrupt primitive — the demos use `useFrontendTool` +
Promise-based handler instead of `useInterrupt`. The canonical regions
(`backend-interrupt-tool`, `frontend-useinterrupt-render`) don't apply.
|
| `interrupt-headless` (both) | Same reason — `useFrontendTool` shim
instead of the langgraph `useHeadlessInterrupt` pattern. |
| `chat-slots` (ms-agent-python disclaimer + assistant-message slots) |
Production demo only registers the welcome slot. Adding sibling teaching
files would invent demo content. |
| `a2ui-fixed-schema::backend-schema-json-load` (ms-agent-dotnet only) |
.NET keeps the schema inline as a C# array (`FlightSchema` in
`A2uiFixedSchemaAgent.cs`) rather than loading from a JSON file. The
docs region's "load JSON at startup" framing doesn't match. The
ms-agent-python equivalent uses `_load_schema(...)` and is wrapped. |
| `declarative-gen-ui::runtime-inject-tool` (both) | Cross-cutting;
tracked separately. |

## Test plan

- [ ] `npx tsx showcase/scripts/bundle-demo-content.ts` succeeds; all 15
targets resolve in `demo-content.json`
- [ ] Spot-check
`localhost:<port>/<ms-agent-{python,dotnet}>/prebuilt-components/chat` —
chat-component snippet renders the minimal Chat from the sibling file
- [ ] Spot-check
`localhost:<port>/<ms-agent-{python,dotnet}>/generative-ui/tool-rendering`
— all four tool-rendering snippets resolve
- [ ] Spot-check
`localhost:<port>/<ms-agent-{python,dotnet}>/generative-ui/a2ui/fixed-schema`
— backend-render-operations resolves; ms-agent-dotnet's
backend-schema-json-load is expected to remain yellow (deferred per
above)
- [ ] Spot-check
`localhost:<port>/ms-agent-dotnet/generative-ui/mcp-apps` — both regions
resolve
- [ ] Manifest YAML still parses (both)
2026-04-28 19:08:41 +02:00
Alem Tuzlak ab92b9289e docs(showcase): region markers across 5 small-backlog frameworks (batch 1) (#4361)
## Summary

Per-framework region-marker pass across the 5 frameworks with the
smallest B-cell backlog, following the pattern established in #4326
(mastra). Each commit is one framework so reviewers can navigate.

| Framework | Cells advanced | Files changed |
|---|---|---|
| langgraph-typescript | agentic-chat, tool-rendering | 6 |
| langgraph-fastapi | agentic-chat, tool-rendering | 5 |
| strands | agentic-chat, open-gen-ui, open-gen-ui-advanced | 6 |
| claude-sdk-typescript | agentic-chat, open-gen-ui,
open-gen-ui-advanced | 3 |
| ag2 | agentic-chat (chat-component only — provider-setup +
configure-suggestions already existed), tool-rendering | 4 |

12 (framework × cell) targets advanced from B (regions missing) to A
(ready). 0 yellow boxes introduced; existing yellow boxes elsewhere are
unchanged.

## Patterns applied (same as #4326)

- **In-place markers** for code that already reads as a clean teaching
example (provider-setup, configure-suggestions, render-weather-tool,
weather-tool-backend, minimal-provider-setup, minimal-runtime-flag /
advanced-runtime-config, sandbox-function-registration).
- **Sibling `<region>.snippet.tsx` files** for cases where the
production demo carries QA hooks irrelevant to the docs page being
taught:
- `chat-component.snippet.tsx` × 5 (every framework's
`agentic-chat/page.tsx` carries a 96-line QA-laden Chat function).
- `render-flight-tool.snippet.tsx` × 3 (the 3 frameworks' tool-rendering
only registers a weather renderer; this sibling teaches both
`render-flight-tool` and `catchall-renderer`).

All sibling files are non-imported, non-rendered. Bundler picks them up
via the `@region[...]` markers; runtime demos are unchanged.

## Manifest changes

- **langgraph-typescript** `tool-rendering` gains a `highlight:` entry
so the bundler picks up `weather-tool-backend` from
`src/agent/tool-rendering.ts`.
- **langgraph-fastapi** `tool-rendering` gains the same for
`src/agents/src/tool_rendering_agent.py` (the region marker already
existed in source).

## Deferred (out of scope, picks up in a future pass)

- **strands × `a2ui-fixed-schema`** (`backend-render-operations`,
`backend-schema-json-load`) — strands has the demo folder but no a2ui
backend agent in `src/agents/`. No local source to wrap. Will pick up
once the showcase team ships strands' a2ui_fixed implementation.
- **`declarative-gen-ui::runtime-inject-tool` across 4 frameworks** —
cross-cutting authoring needed first; tracked separately.

## Test plan

- [ ] `npx tsx showcase/scripts/bundle-demo-content.ts` succeeds; all 12
targets resolve in `demo-content.json`
- [ ] Spot-check at
`localhost:<port>/<framework>/prebuilt-components/chat` for each of the
5 frameworks — the `chat-component` snippet renders the minimal Chat
from the sibling file
- [ ] Spot-check
`localhost:<port>/<framework>/generative-ui/tool-rendering` for
langgraph-typescript, langgraph-fastapi, ag2 — all four snippets resolve
- [ ] Spot-check
`localhost:<port>/strands/generative-ui/open-generative-ui` — both
minimal and advanced runtime regions resolve
- [ ] Manifest YAML still parses (langgraph-typescript and
langgraph-fastapi)
2026-04-28 19:08:20 +02:00
github-actions[bot] e4984c4536 style: auto-fix formatting 2026-04-28 17:06:40 +00:00
Alem Tuzlak b0b9316230 Merge branch 'main' into blitz/coverage-state-subagents/integration 2026-04-28 19:03:55 +02:00
Sam Julien 9d782800f6 docs(showcase/ms-agent-dotnet): region markers across 8 cells
Same patterns as ms-agent-python (sibling commit), with backend regions
in C# instead of Python:

Frontend (identical TS code to ms-agent-python):
- agentic-chat, tool-rendering, frontend-tools,
  readonly-state-agent-context — mirror mastra/smalls patterns.
- open-gen-ui (minimal-runtime-flag) + open-gen-ui-advanced
  (advanced-runtime-config) — shared span in copilotkit-ogui/route.ts.
- mcp-apps: no-frontend-renderer-needed in page.tsx;
  runtime-mcpapps-config in copilotkit-mcp-apps/route.ts.

Backend (C#):
- weather-tool-backend on agent/Program.cs::GetWeather (added to
  manifest highlight).
- backend-render-operations on agent/A2uiFixedSchemaAgent.cs::SearchFlights
  (already in manifest highlight).

Deferred:
- a2ui-fixed-schema::backend-schema-json-load — .NET keeps the schema
  inline as a C# array (FlightSchema), not a JSON file load. The docs
  region's narrative ("load JSON at startup") doesn't fit this idiom;
  defer until the auto-config infrastructure can render different
  snippets per framework, or showcase team aligns the .NET demo.
- gen-ui-interrupt + interrupt-headless: same useFrontendTool-with-Promise
  divergence as ms-agent-python.
- declarative-gen-ui::runtime-inject-tool: cross-cutting.
2026-04-28 09:57:33 -07:00
Sam Julien 7a0e3956f2 docs(showcase/ms-agent-python): region markers across 7 cells
Mirrors the mastra (#4326) and smalls-batch (#4361) patterns:

Frontend:
- agentic-chat: provider-setup + configure-suggestions in place; sibling
  chat-component.snippet.tsx for the QA-laden Chat case.
- tool-rendering: render-weather-tool in place; sibling
  render-flight-tool.snippet.tsx covering render-flight-tool +
  catchall-renderer (production demo only registers a weather renderer).
- frontend-tools: frontend-tool-registration + frontend-tool-handler in place.
- readonly-state-agent-context: context-provider-sketch +
  use-agent-context-call in place.
- open-gen-ui: minimal-provider-setup in page; minimal-runtime-flag and
  advanced-runtime-config share a span in copilotkit-ogui/route.ts.
- open-gen-ui-advanced: multi-file sandbox-function-registration
  (page.tsx + sandbox-functions.ts).

Backend:
- tool-rendering: weather-tool-backend on src/agents/agent.py
  (added to manifest highlight).
- a2ui-fixed-schema: backend-schema-json-load + backend-render-operations
  on src/agents/a2ui_fixed.py (already in manifest highlight).

Deferred (defer until showcase team aligns or auto-config infrastructure
ships):
- gen-ui-interrupt + interrupt-headless: ms-agent uses useFrontendTool
  with a Promise-based handler instead of useInterrupt because MS Agent
  Framework lacks a native interrupt primitive. The canonical regions
  don't apply.
- chat-slots: production demo only registers the welcome slot; disclaimer
  and assistant-message slots not implemented.
- declarative-gen-ui::runtime-inject-tool: cross-cutting (tracked separately).
2026-04-28 09:57:17 -07:00
Jordan Ritter 12e3a9ee9c fix(showcase): raise PocketBase fetch cap to fix dashboard D2 regression (#4362)
## Summary
- Root-cause fix for dashboard showing all cells as D2 (red) instead of
D4 (blue)
- `INITIAL_CAP = 500` in `useLiveStatus.ts` was too low — PocketBase now
has ~1300+ records
- The paginated fetch loads records in rowid order; the 500 cap filled
with smoke/health/agent/d5/chat records and **zero**
`e2e:<slug>/<featureId>` per-cell records made it through (created later
by the 6-hourly e2e-demos probe)
- Without e2e records in the LiveStatusMap, the depth ladder stopped at
D2 for every cell
- Raised cap to 2000

## Test plan
- [ ] Dashboard cells return to D4 (blue) after deploy
- [ ] No performance regression on dashboard load (2000 records vs 500
is still <100KB)
2026-04-28 09:48:20 -07:00
Sam Julien 261c0be08b fix(shell-docs): drop framework-name sidebar link + retire legacy /integrations/ URLs
Two related cleanups that fall out of the soft-default world.

**Framework-name sidebar link** — the labeled "you're reading X's docs"
header link below the framework selector was redundant. The selector
pill above it already identifies the active framework, the breadcrumb
trail at the top of the body covers "go to root," and `/` and
`/<framework>` now render the same docs-landing shell so clicking the
link mostly just changed the URL. Removed from all four call sites:
DocsOverview (unscoped /), FrameworkLandingPage,
NotAvailableForFrameworkPage, and DocsPageView.

DocsPageView's `sidebarTitle` and `backLink` props are gone (no
remaining consumers). Breadcrumb root label is now derived from
`frameworkOverride` at render time — "LangGraph (Python)" on
framework-scoped pages, "Docs" otherwise.

**Legacy `/integrations/<framework>/<slug>` URLs** — the original URL
scheme before `/<framework>/<slug>` shipped. The Notion plan flagged
them as still reachable via UnscopedDocsPage's regex match on
`integrations/...`. Since shell-docs hasn't shipped publicly, no real
inbound links exist; cleaner to retire them than maintain dual schemes.

UnscopedDocsPage's integrationMatch branch is gone. Any
`/integrations/...` URL now 404s. The `integrations/<framework>/`
content tree on disk stays — it's still loaded by the framework
router's per-framework override fallback (e.g. `/built-in-agent/quickstart`
serves `integrations/built-in-agent/quickstart.mdx`). Only the URL
scheme is retired.

search-modal.tsx integration and demo result links now point at the
shell host's integrations explorer (`${SHELL_HOST}/integrations/...`)
instead of the now-404 shell-docs paths.
2026-04-28 09:45:24 -07:00
Jordan Ritter 438161e2e2 fix(showcase): raise PocketBase initial fetch cap from 500 to 2000
The status collection now has ~1300+ records across all probe
dimensions. The paginated getList fetches in rowid order, so
the 500 cap loaded smoke/health/agent/d5/chat/tools records
but truncated all e2e per-cell records (created later by the
6-hourly e2e-demos probe). Without e2e records in the
LiveStatusMap the depth ladder stopped at D2 for every cell.
2026-04-28 09:40:06 -07:00
github-actions[bot] 5fcb637bde style: auto-fix formatting 2026-04-28 16:37:55 +00:00
Alem Tuzlak 23a3b24a01 feat(showcase/integrations): shared-state-read-write + subagents demos across 15 packages
Adds real working Shared State (Read+Write) and Sub-Agents demos to 15
showcase integrations, mirroring the canonical langgraph-python and
google-adk reference implementations. Fills rows previously empty on
the showcase coverage dashboard.

Packages: ag2, agno, claude-sdk-python, claude-sdk-typescript,
crewai-crews, langgraph-fastapi, langgraph-typescript, langroid,
llamaindex, mastra, ms-agent-dotnet, ms-agent-python, pydantic-ai,
spring-ai, strands. (built-in-agent landed independently on main as
PR #4321 — its variant is canonical; this PR no longer touches it.)

Per-package deliverables: framework-native backend agents
(preferences-injection middleware/callback + set_notes tool;
supervisor + 3 sub-agents wired as tools with running -> completed
/failed delegation log); frontend page.tsx + preferences-card.tsx /
notes-card.tsx for SSRW and delegation-log.tsx for subagents — wired
to useAgent({ updates: [OnStateChanged] }); manifest entries; runtime
route registration + per-package agent server config; real QA
scripts.

Includes targeted hardening fixes from a 7-agent code-review loop:

- Sub-agent failure paths now correctly emit status: "failed"
  (previously hardcoded "completed" or unreachable in
  mastra/strands/langgraph-fastapi/langgraph-typescript/ag2)
- Parallel-tool-call delegation race fixed in langgraph-fastapi
  (Annotated[list, add]) and langgraph-typescript (concat reducer)
- Silent data loss eliminated in
  claude-sdk-python/claude-sdk-typescript/crewai-crews — empty
  JSON.parse catches now log + emit error events
- ms-agent-dotnet set_notes writes to per-thread slot via AsyncLocal
- mastra working-memory writes are deterministic via
  src/mastra/tools/working-memory.ts helper
- spring-ai tool-call envelope ids match supervisor's tc.id() and
  AG-UI event ordering reordered; CopyOnWriteArrayList for
  parallel-call safety
- Stack trace + raw error message leaks scrubbed across 8+ Next.js
  routes — log server-side with errorId + return generic envelope
- Sub-agent calls no longer block event loops in ag2
  (asyncio.to_thread), langroid (llm_response_async), pydantic-ai
  (async run + async tools)
- langroid lru_cache cross-request contamination dropped
- Numerous smaller items: claude-sdk-python invalid model id, Callable
  annotation, /health endpoint exposed; crewai-crews supervisor
  no longer resets delegations every turn; pydantic-ai snapshot uses
  model_dump()

CI fixes folded in:
- crewai-crews test_forwarded_props: extend the stubbed
  ag_ui_crewai.endpoint module to expose
  add_crewai_flow_fastapi_endpoint and add stub
  agents.shared_state_read_write / agents.subagents modules
- generate-catalog test: bump crewai-crews wired-cell expectation
  28 -> 30; replace hardcoded total-wired count with an invariant
  (wired + stub + unshipped = 737) plus a lower-bound floor
- oxfmt run on the qa/shared-state-read-write.md files in mastra +
  spring-ai

Rebased onto latest main (post showcase/packages -> showcase/integrations
rename + post built-in-agent landing). Original blitz history
preserved at the blitz-pre-rebase-snapshot tag.

Known follow-ups (deferred to follow-up PR):
- agno sync sub_agent.run() blocks event loop (perf only)
- ms-agent-python asyncio thread-fallback fragility
- llamaindex initial-state coercion when UI clears state
- Manifest highlight audit (langgraph-typescript headless-complete,
  langgraph-fastapi byoc-* missing route.ts highlights)
- agno hitl-in-chat declared in demos but not features; duplicate
  /demos/hitl-in-chat route
- langgraph-typescript server.mjs graphSpec only registers 3 graphs
  vs 23 in langgraph.json (pre-existing)
- mastra hitl legacy demo missing from features list
- claude-sdk-python agents/agent.py line 474 also has the legacy
  claude-opus-4-5 default
- PARITY_NOTES vs manifest mismatches for hitl-in-app across
  spring-ai/agno/ag2 (pre-existing)
- spring-ai a2ui-fixed-schema missing from generative_ui list
2026-04-28 18:36:13 +02:00
Sam Julien d02d4e89e5 fix(shell-docs): drop "All docs" sidebar back-link and "Reset to default" dropdown row
Both affordances were vestiges of the pre-soft-default world.

"All docs" pointed at `/`. Before the IA restructure, that was a
distinct picker view; now `/` and `/<framework>` render the same
docs-landing shell with whichever framework is effective. Clicking
the link from a deep page just changed the URL with no visible
content change. The CopilotKit logo in the top header already covers
"go to root," and the framework-name link below the selector covers
"go to this framework's landing." Removed from all three call sites
(feature-page backLink, FrameworkLandingPage sidebar,
NotAvailableForFrameworkPage sidebar).

"Reset to default" set storedFramework to null and navigated to the
unscoped equivalent of the current page. With the CopilotKit row
pinned at the top of the dropdown, picking it does the same thing
end-to-end (effectiveFramework becomes BIA, navigation lands on a
BIA-scoped URL) — the user reaches for the same target either way.
The button only appeared when storedFramework was set, so removing it
loses no on-screen affordance for fresh visitors and one redundant
row for returning visitors.
2026-04-28 09:34:40 -07:00
Sam Julien 4f4062c729 fix(shell-docs): rename BIA to "CopilotKit" in sidebar selector, drop from picker
Two small UX nudges so the soft-default reads naturally to a fresh
visitor:

1. Sidebar selector — closed pill and dropdown row both display
   "CopilotKit" instead of "Built-in Agent" when BIA is the
   effective framework. Topbar variant and other surfaces keep the
   registry name. The framing in the sidebar is "you're reading
   CopilotKit's docs" rather than "you've picked the Built-in Agent
   backend"; in the docs landing's "Continue with X" / "Browse X
   docs" affordances, the registry name is still the right framing.

2. Sidebar selector — BIA pinned at the top of the dropdown,
   outside the Popular category bucket. It's the default, so it
   reads more naturally as the always-there starting point than as
   one of several Popular options.

3. "Switch backend" picker on the docs landing filters BIA out.
   Showing "switch to Built-in Agent" inside a "Switch backend"
   affordance is a no-op tile when BIA is already the soft-default.
2026-04-28 09:27:49 -07:00
Alem Tuzlak 5c3d74baf6 Merge branch 'main' into worktree-mossy-tumbling-unicorn 2026-04-28 18:24:01 +02:00
Sam Julien 4e75380550 fix(shell-docs): framework selector reflects effectiveFramework
The selector's display label and dropdown checkmark were keyed off
URL framework + stored only, so on `/` (URL null, no localStorage) it
read "Pick a backend" even though the page was rendering Built-in
Agent code. Switch both to `effectiveFramework` so the chrome stays
honest about what the page is actually rendering.

Renames the legacy "Clear selection" affordance to "Reset to default
(Built-in Agent)" — the action now means "go back to soft-default,"
not "have nothing selected." Only shown when storedFramework is set,
so it doesn't surface for fresh visitors who never picked.
2026-04-28 09:16:41 -07:00
Alem Tuzlak c089d5969e Merge remote-tracking branch 'origin/main' into worktree-mossy-tumbling-unicorn
# Conflicts:
#	.github/workflows/showcase_deploy.yml
#	showcase/integrations/built-in-agent/.env.example
#	showcase/integrations/built-in-agent/Dockerfile
#	showcase/integrations/built-in-agent/README.md
#	showcase/integrations/built-in-agent/docs-links.json
#	showcase/integrations/built-in-agent/entrypoint.sh
#	showcase/integrations/built-in-agent/next.config.ts
#	showcase/integrations/built-in-agent/package-lock.json
#	showcase/integrations/built-in-agent/package.json
#	showcase/integrations/built-in-agent/playwright.config.ts
#	showcase/integrations/built-in-agent/postcss.config.mjs
#	showcase/integrations/built-in-agent/public/.gitkeep
#	showcase/integrations/built-in-agent/qa/agentic-chat.md
#	showcase/integrations/built-in-agent/qa/gen-ui-agent.md
#	showcase/integrations/built-in-agent/qa/gen-ui-tool-based.md
#	showcase/integrations/built-in-agent/qa/hitl-in-chat.md
#	showcase/integrations/built-in-agent/qa/sales-dashboard.md
#	showcase/integrations/built-in-agent/qa/shared-state-read-write.md
#	showcase/integrations/built-in-agent/qa/shared-state-streaming.md
#	showcase/integrations/built-in-agent/qa/subagents.md
#	showcase/integrations/built-in-agent/qa/tool-rendering.md
#	showcase/integrations/built-in-agent/src/app/api/copilotkit/[[...slug]]/route.ts
#	showcase/integrations/built-in-agent/src/app/api/health/route.ts
#	showcase/integrations/built-in-agent/src/app/copilotkit-overrides.css
#	showcase/integrations/built-in-agent/src/app/demos/agentic-chat/page.tsx
#	showcase/integrations/built-in-agent/src/app/demos/gen-ui-agent/page.tsx
#	showcase/integrations/built-in-agent/src/app/demos/gen-ui-tool-based/page.tsx
#	showcase/integrations/built-in-agent/src/app/demos/hitl/page.tsx
#	showcase/integrations/built-in-agent/src/app/demos/shared-state-read-write/page.tsx
#	showcase/integrations/built-in-agent/src/app/demos/shared-state-streaming/page.tsx
#	showcase/integrations/built-in-agent/src/app/demos/subagents/page.tsx
#	showcase/integrations/built-in-agent/src/app/demos/tool-rendering/page.tsx
#	showcase/integrations/built-in-agent/src/app/globals.css
#	showcase/integrations/built-in-agent/src/app/layout.tsx
#	showcase/integrations/built-in-agent/src/app/page.tsx
#	showcase/integrations/built-in-agent/src/lib/factory/server-tools.ts
#	showcase/integrations/built-in-agent/src/lib/factory/state-tools.ts
#	showcase/integrations/built-in-agent/src/lib/factory/subagent-tools.ts
#	showcase/integrations/built-in-agent/src/lib/factory/tanstack-factory.ts
#	showcase/integrations/built-in-agent/tests/e2e/agentic-chat.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/gen-ui-agent.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/gen-ui-tool-based.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/hitl-in-chat.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/shared-state-read.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/shared-state-streaming.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/shared-state-write.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/subagents.spec.ts
#	showcase/integrations/built-in-agent/tests/e2e/tool-rendering.spec.ts
#	showcase/integrations/built-in-agent/tsconfig.json
2026-04-28 18:13:21 +02:00
Sam Julien f80a29c717 feat(shell-docs): soft-default to Built-in Agent for unselected visitors
FrameworkProvider gains an `effectiveFramework` field that falls
through URL → stored → DEFAULT_FRAMEWORK ("built-in-agent"), so it's
never null. Snippet renderers, sidebar links, and "Continue with X"
affordances read this; the original `framework` field stays
URL-strict for the few call sites that genuinely need to know
"is the URL scoped?"

Removes the forced-picker dead end. Fresh visitors land on the docs,
see BIA code immediately, and switch backends from the picker on the
landing page or the sidebar dropdown when they want.

Consumers updated:

- SidebarLink resolves href against effectiveFramework. Drops
  hideWhenUnscoped (Quickstart entry now always lands on a real
  framework-scoped URL).
- DocsLandingNext collapses its two-branch render (picker vs
  Continue-with-X) into one: always shows "Continue with
  {effectiveFramework}" + Quickstart/Browse pointer cards, with the
  categorized framework picker below as a "Switch backend" affordance.
- RouterPivot becomes a pure redirect: dispatches to
  `/<effectiveFramework>/<slug>` on mount. The legacy picker grid is
  gone — soft-default makes that branch unreachable.
- FrameworkGuardedContent always returns null (the body is hidden
  during the redirect tick).
- UnscopedDocsPage drops the props that fed RouterPivot's old picker
  (frameworksWithCell, previewUrl, featureName, featureDescription).
2026-04-28 09:11:34 -07:00
Jordan Ritter 2bc7469042 fix(showcase): repair agent-config (LangGraph 1.x context) + multimodal aimock fixtures (#4356) 2026-04-28 09:07:35 -07:00
Sam Julien 339d02ad71 docs(showcase/ag2): chat-component sibling + tool-rendering region markers
ag2's agentic-chat already had provider-setup and configure-suggestions
in place; just adds the sibling chat-component.snippet.tsx (same as
mastra). tool-rendering follows the same mirror pattern: render-weather-tool
in place, weather-tool-backend wraps get_weather() in src/agents/agent.py
(already in manifest highlight), sibling render-flight-tool.snippet.tsx
covers render-flight-tool and catchall-renderer.
2026-04-28 08:58:29 -07:00
Sam Julien 0da960acbd docs(showcase/claude-sdk-typescript): region markers for agentic-chat + ogui runtime
agentic-chat follows the mastra (#4326) pattern. The ogui route gains
the nested minimal-runtime-flag + advanced-runtime-config markers (same
shape as langgraph-python and strands).
2026-04-28 08:58:22 -07:00
Sam Julien 23b3e10531 docs(showcase/strands): region markers for agentic-chat + open-gen-ui (minimal & advanced)
agentic-chat follows the mastra (#4326) pattern. open-gen-ui regions
mirror langgraph-python's: minimal-provider-setup wraps the CopilotKit
JSX in page.tsx; minimal-runtime-flag and advanced-runtime-config share
a span in copilotkit-ogui/route.ts (per langgraph-python's nested-region
shape). open-gen-ui-advanced uses a multi-file region for
sandbox-function-registration (page.tsx + sandbox-functions.ts).

a2ui-fixed-schema deferred — strands has the demo folder but no a2ui
backend agent in src/agents/, so the schema-loading regions have no
local source to wrap. Picks up in a future pass once showcase team
ships the strands a2ui_fixed implementation.
2026-04-28 08:58:16 -07:00
Sam Julien 0525749aa5 docs(showcase/langgraph-fastapi): region markers for agentic-chat + tool-rendering
Same pattern as langgraph-typescript. The weather-tool-backend region
already existed in src/agents/src/tool_rendering_agent.py; just added
the file to the manifest highlight so the bundler picks it up.
2026-04-28 08:57:58 -07:00
Sam Julien 51de3d437c docs(showcase/langgraph-typescript): region markers for agentic-chat + tool-rendering
Mirrors the mastra (#4326) pattern:
- agentic-chat: provider-setup + configure-suggestions in place; sibling
  chat-component.snippet.tsx for a minimal Chat that doesn't carry the
  production demo's QA hooks.
- tool-rendering: render-weather-tool in place; weather-tool-backend in
  src/agent/tool-rendering.ts (added to manifest highlight); sibling
  render-flight-tool.snippet.tsx covering both render-flight-tool and
  catchall-renderer regions (the production demo only registers a weather
  renderer).
2026-04-28 08:57:53 -07:00
Jordan Ritter 88f0f27184 fix(showcase): update stale showcase/packages refs in ops Dockerfile
and .gitignore

The packages→integrations rename in #4351 missed two COPY
directives and a gitignore pattern that still referenced the
old showcase/packages/ path. Also fixes pre-existing format
issues in three showcase-ops probe files.
2026-04-28 08:49:36 -07:00
Alem Tuzlak a16eaa1b74 fix(showcase): repair agent-config (LangGraph 1.x context) + multimodal fixtures
agent-config — empty stream
The /demos/agent-config runtime returned RUN_ERROR on every send. The
existing route wrapper repacked the provider's properties into
forwardedProps.config.configurable.properties so the agent could read
them via RunnableConfig["configurable"]["properties"]. LangGraph 1.x
(deployed langgraph 1.1.x / langgraph-api 0.7.x) now rejects any run
that sends configurable with "Cannot specify both configurable and
context. Prefer setting context alone." because it auto-injects an
empty context and refuses both channels at once.

Switch to LangGraph 1.x's context API: route wrapper repacks user props
onto forwardedProps.context instead, the Python graph defines
context_schema=AgentConfigContext and reads via the
Runtime[AgentConfigContext] parameter, and RunnableConfig is no longer
consulted. Unit tests updated to pass the flat context dict directly.
Add context to RESERVED_FORWARDED_PROPS_KEYS so a caller that
explicitly sets forwardedProps.context is preserved (and merged with
provider-supplied properties) instead of being treated as a user prop
and double-wrapped.

multimodal — PDF "doesn't work"
The multimodal pipeline (legacy-shape rewrite shim → ag-ui-langgraph
converter → _PdfFlattenMiddleware running pypdf) is fine; sample.pdf
extraction shows up correctly in the run state snapshot. The visible
breakage is the aimock fixture file: aimock matches userMessage as a
substring, and the generic "hi" fixture lives early enough to swallow
any prompt containing "this" — including "What is in this PDF?" and
"What is in this image?" — short-circuiting before the request reaches
real OpenAI and returning a generic "I'm your showcase assistant"
greeting that never references the attachment.

Add two more-specific fixtures ("this PDF", "this image") ahead of the
"hi" entry so multimodal prompts return responses grounded in the
bundled samples. The "hi" fixture stays in place so the several E2E
specs that fill literal "hi" still match it.
2026-04-28 17:44:07 +02:00
Jordan Ritter bbe318a4de fix(showcase): update stale showcase/packages/ refs and
remove dead starter scripts

Update probe configs, fixtures, and test drivers to reference
showcase/integrations/ instead of showcase/packages/.
Remove obsolete generate-starters test, starter-consistency
test, validate-workflow-starters, and rebuild-coord.sh.
2026-04-28 07:51:40 -07:00
Jordan Ritter d4736a911a fix(showcase): update CI workflows, Dockerfiles, and configs
for integrations/ rename

Update GitHub Actions workflows to reference
showcase/integrations/ instead of showcase/packages/.
Fix Dockerfiles to dereference symlinks during COPY.
Remove obsolete showcase_template-drift workflow.
Update docker-compose, shell Dockerfiles, and registry paths.
2026-04-28 07:51:06 -07:00
Jordan Ritter fa98b9c803 feat(showcase): replace starters/ with on-demand extract-starter
Delete the pre-generated starters/ directory tree (previously
synced from packages/ by generate-starters.ts). Add
extract-starter.ts which produces a starter tarball on demand
from any integration. Move shared starter template files to
showcase/shared/starter-template/.
2026-04-28 07:50:39 -07:00
Jordan Ritter e9a2e143de fix(showcase): add shared-tools symlinks and refactor imports
Replace sys.path.insert hacks in Python agent files with direct
imports via symlinks to shared/{python,typescript}/tools.
Update Dockerfiles, entrypoints, and configs to support the new
symlink-based tool resolution. Add PARITY_NOTES for frameworks
that have known gaps.
2026-04-28 07:50:03 -07:00
Jordan Ritter dd06dd89d1 refactor(showcase): rename packages/ to integrations/
The showcase framework directories better reflect their role as
integration examples rather than distributable packages.
Renames showcase/packages/ -> showcase/integrations/ and updates
the test docker-compose file reference accordingly.
2026-04-28 07:47:35 -07:00
Alem Tuzlak 5348524a32 fix(showcase): trim trailing slash from runtimeUrl before /transcribe
`${runtimeUrl}/transcribe` produced a double slash when callers passed
a URL ending in `/`. Next.js tolerated it, but other deploy targets
(Spring, .NET, strict reverse proxies) returned 404. Normalize via
`runtimeUrl.replace(/\/$/, "")` before concatenation in every
sample-audio-button.tsx duplicate across showcase packages.
2026-04-28 15:22:29 +02:00
Alem Tuzlak 8544a8c1c3 Merge branch 'main' into worktree-velvety-wishing-raccoon 2026-04-28 15:12:43 +02:00
Alem Tuzlak 46eeb21924 Merge remote-tracking branch 'origin/main' into worktree-mossy-tumbling-unicorn
# Conflicts:
#	showcase/scripts/__tests__/generate-catalog.test.ts
2026-04-28 13:54:22 +02:00
Jordan Ritter b5a5a12275 fix: D5 all-green — fixtures, tool-rendering, manifest cleanup (#4352)
## Summary

Comprehensive D5 probe fixes to get all probes green across 17
integrations.

**Fixture fixes (d5-all.json + individual fixtures):**
- Convert ALL toolCallId-based matching to sequenceIndex — Gemini's
functionResponse has no id field, so aimock synthesizes IDs that don't
match fixture strings. sequenceIndex is provider-agnostic.
- Add missing generate_haiku fixtures (were in gen-ui-custom.json but
never bundled)
- Fix hitl-text-input arg `name` → `attendee` to match frontend schema

**Tool-rendering fix (16 integration pages):**
- All non-LGP pages used `result?.temperature` on a JSON string. Add
`parseJsonResult<T>()` helper to parse string before accessing
properties.

**Backend/routing fixes (earlier commits):**
- Route google-adk through aimock for ALL agent types
- Add CopilotKitMiddleware to langgraph-fastapi for frontend tool
injection
- Rewrite langroid AGUI adapter for proper tool result handling
- Fix hitl-text-input D5 feature mapping
- Add langgraph-python hitl-in-chat page
- Remove architecturally unsupported HITL features from 5 manifests
(agno, claude-sdk-python, google-adk, llamaindex, spring-ai)

**Starters:**
- Regenerate to sync with package changes

## Test plan

- [ ] CI green (drift-check, commitlint, format, tests)
- [ ] Deploy ops image → D5 probes run against all 17 integrations
- [ ] Dashboard shows green across fixture-covered features
2026-04-28 04:33:48 -07:00
Alem Tuzlak e2d09b9dc5 fix(showcase): point auth/voice manifest highlights at [[...slug]]/route.ts
The previous commit moved each copilotkit-auth/route.ts and
copilotkit-voice/route.ts under a [[...slug]] catch-all so multi-route
runtime sub-paths are matched, but the package manifests still listed
the old paths as highlight files. The bundle-demo-content script
validates that every highlight path exists and was failing the
Validate Showcase CI job (e.g. agno::auth: highlight path
"src/app/api/copilotkit-auth/route.ts" not found).

Update all 11 affected manifests to reference the new
[[...slug]]/route.ts location. google-adk keeps the legacy path because
its old route.ts shim is still in place.
2026-04-28 13:20:59 +02:00
Alem Tuzlak ec9e21d0ab fix(showcase): align auth/voice demos with multi-route runtime
The deployed v1-wraps-v2 wrapper defaults useSingleEndpoint to true, so
the client posts {method:"info"} envelopes to the bare runtime URL.
createCopilotRuntimeHandler defaults to multi-route mode, which only
matches /info, /agent/:id/run, /transcribe etc. as URL paths — so every
auth and voice demo using the v2 handler returned 404 in production.

Fix: opt every auth/voice demo into REST/multi-route on the client by
passing useSingleEndpoint={false} on the <CopilotKit> provider. Move
each route file under a [[...slug]] catch-all so Next.js routes the
runtime sub-paths through the framework-agnostic handler. Rewrite the
voice SampleAudioButton to upload via multipart/form-data POST to
${runtimeUrl}/transcribe, matching transcription-client's REST mode and
dropping the now-unused base64 helper.

google-adk's auth route already had a [[...slug]] re-export shim and is
left in place. The langgraph package trio already had the catch-all and
only needed the provider opt-in. google-adk's voice demo points at the
v1 /api/copilotkit endpoint and is unaffected.
2026-04-28 12:49:14 +02:00
Jordan Ritter 7d949579af fix: update catalog ratchet pins after HITL manifest removals
482→476 wired, 246→252 unshipped — 6 features removed from 5
integrations that can't architecturally support those HITL patterns.
2026-04-28 03:35:34 -07:00
Jordan Ritter aad6fec19f fix: regenerate starters to sync with package changes
Runs generate-starters.ts to pick up the langgraph-python book_call
frontend tool, google-adk agent updates, and langroid adapter rewrite.
2026-04-28 03:32:18 -07:00
Jordan Ritter b02644cdf8 fix: parse JSON string result in all tool-rendering demo pages
useRenderTool's result prop arrives as a JSON string, not an object.
All 16 non-LGP integrations accessed result?.temperature directly,
getting undefined and falling to defaults. Add parseJsonResult<T>
helper (matching LGP reference) to properly parse the string first.
2026-04-28 03:32:07 -07:00
Jordan Ritter c70d86f6f9 fix: convert all D5 fixtures from toolCallId to sequenceIndex matching
Aimock's Gemini adapter synthesizes tool_call_ids (call_gemini_<name>_N)
that don't match the D5 fixture IDs (call_d5_<name>_001). This breaks
ALL two-leg and multi-leg fixtures for google-adk and any future Gemini
backend because Gemini's functionResponse format has no id field.

sequenceIndex counts per-userMessage matches regardless of provider,
making fixtures provider-agnostic.

Also adds missing generate_haiku fixtures to d5-all.json (were in
gen-ui-custom.json but never bundled) and fixes hitl-text-input
fixture arg name→attendee to match frontend schema.
2026-04-28 03:31:55 -07:00
Jordan Ritter 72ec1bea9a fix: remove architecturally unsupported HITL features from 5 manifests
agno: remove hitl-in-chat + hitl-in-chat-booking (aimock fixture
mismatch — shared agent sends all 11 tools)

claude-sdk-python: remove hitl (backend hardcodes TOOLS, executes
generate_task_steps server-side, ignores input.tools)

google-adk: remove hitl (hitl_in_chat_agent.py executes
generate_task_steps locally, never routes to frontend)

llamaindex: remove hitl-in-chat (ag-ui 0.2.2 executes book_call
server-side instead of emitting frontend tool call events)

spring-ai: remove hitl-in-chat (AG-UI Java lib does not handle
frontend tool injection for useHumanInTheLoop)
2026-04-28 03:06:47 -07:00
Jordan Ritter 71caa425b0 fix: langgraph-fastapi use CopilotKitMiddleware for frontend tool injection
create_react_agent does not support CopilotKitMiddleware, so
frontend-registered tools (useHumanInTheLoop, useFrontendTool) were
never injected into the LLM tool list. Switch to create_agent with
CopilotKitMiddleware so HITL flows work correctly.
2026-04-28 02:33:02 -07:00