Commit Graph

8571 Commits

Author SHA1 Message Date
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
Alem Tuzlak f97296c202 fix: patch defu prototype pollution CVE via pnpm override (#3841)
Closes #3631

Add pnpm override to force defu >= 6.1.5 (was 6.1.4), resolving the
prototype pollution vulnerability.

Split from #3838.
2026-04-28 18:39:21 +02: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
Jordan Ritter 730ff7d202 fix: regenerate pnpm-lock.yaml after rebase onto main 2026-04-28 09:31:22 -07:00
Jordan Ritter cb28230b96 fix: patch defu prototype pollution CVE via pnpm override (#3631)
Add pnpm override to force defu >= 6.1.5 (was 6.1.4), resolving the
prototype pollution vulnerability.
2026-04-28 09:30:31 -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
Jordan Ritter 74f16c4653 feat: Built-in Agent (TanStack AI) showcase column (#4321) 2026-04-28 09:26:15 -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 5011bb04a2 fix(showcase): update stale showcase/packages refs in ops Dockerfile (#4360)
## Summary
- Fix showcase-ops Docker build failure: `COPY` still referenced deleted
`showcase/packages/` path (now `showcase/integrations/` after #4351)
- Update `.gitignore` patterns from `showcase/packages/` to
`showcase/integrations/`
- Fix pre-existing format issues in 3 showcase-ops probe files

## Test plan
- [ ] showcase-ops Docker build passes in CI (was failing:
`"/repo/showcase/packages": not found`)
- [ ] format check passes
- [ ] No remaining stale `showcase/packages` refs in Dockerfiles or
gitignore
2026-04-28 08:56:02 -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
Alem Tuzlak 1453e66531 refactor: merge showcase packages/ and starters/ into unified integrations/ (#4351)
## Summary

- Renames `showcase/packages/` to `showcase/integrations/` — single
directory per slug, single source of truth
- Replaces shared tool duplication with symlinks (`tools/` →
`../../shared/python/tools/`, `shared-tools/` →
`../../shared/typescript/tools/`)
- Deletes `starters/` (17 duplicated project dirs), `starters/template/`
infrastructure, and the 1,780-line `generate-starters.ts`
- Adds `extract-starter.ts` (~100 lines) for deterministic on-demand
starter extraction with symlink dereferencing, template overlay
(SalesDashboard + renderers + hooks), and placeholder substitution
- Recovers starter template frontend to
`showcase/shared/starter-template/`
- Updates all CI workflows, scripts, shell Dockerfiles, ops Dockerfile,
compose files, and documentation references
- Cleans up Python agent imports to use `from tools import ...` via
symlink + PYTHONPATH instead of `sys.path.insert` hacks

## Why

The dual packages/starters architecture duplicated agent code, shared
tools, and Dockerfiles across 34 directories. Every change required
landing in the right upstream location and flowing through a 1,780-line
generator that rewrote imports, copied tools, swapped ports, and
stripped tests. This merge eliminates the duplication and generator
entirely.

## Test plan

- [x] 575 script tests pass (23 test files)
- [x] Starter extraction verified end-to-end for 3 slugs
(langgraph-python, mastra, claude-sdk-python)
- [x] Docker builds pass locally (langgraph-python, mastra)
- [x] Shell app build passes (18 integrations, 737-cell catalog, 25
pages)
- [x] 7 CI workflow YAML files validate
- [x] Zero stale showcase/packages/ references in codebase
- [x] 7-agent CR converged to zero findings
- [x] Python unit tests pass with PYTHONPATH fix for symlinked tools
2026-04-28 17:31:20 +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
Ran Shemtov 27d0fd5712 feat(langgraph): add state injection to copilotkit middleware (#4354) 2026-04-28 16:44:42 +02:00
Ran Shemtov ae23af5528 Merge branch 'main' into feat/state-injection-langgraph 2026-04-28 16:44:29 +02:00
Alem Tuzlak 12a4130778 fix(showcase): align auth/voice demos with multi-route runtime (#4353)
## Summary
- Fixes the 404s that kill every auth and voice showcase demo in
production. The deployed `<CopilotKit>` v1-wraps-v2 wrapper defaults
`useSingleEndpoint` to `true`, so the client posts `{method:"info"}`
envelopes at the bare runtime URL while `createCopilotRuntimeHandler`
runs in multi-route mode and only matches URL paths like `/info`,
`/agent/:id/run`, `/transcribe`.
- Opts every auth/voice demo into REST mode via
`useSingleEndpoint={false}` on the provider, moves each runtime route
under `[[...slug]]/route.ts` so Next.js delivers sub-paths to the
framework-agnostic handler, and rewrites the voice `SampleAudioButton`
to upload via `multipart/form-data` to `${runtimeUrl}/transcribe`.
- google-adk's auth route already had a `[[...slug]]` re-export and the
langgraph trio already had the catch-all — those packages only needed
the provider opt-in. google-adk's voice demo targets `/api/copilotkit`
(v1) and is unchanged.

## Test plan
- [ ] Visit `/integrations/<integration>/auth/preview` for each affected
integration via showcase.copilotkit.ai and confirm the chat loads as the
demo user, sends a message successfully, and 401s after Sign out.
- [ ] Visit `/integrations/<integration>/voice/preview` and confirm:
page loads, mic-button is visible, and the bundled "Play sample" button
transcribes audio into the chat composer.
- [ ] `pnpm run test` and `pnpm run check:packages` pass locally
(already verified by lefthook on commit).
2026-04-28 15:34:55 +02: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
Ran Shem Tov b3a5fe2670 chore: fix pytests 2026-04-28 15:16:25 +02:00
Alem Tuzlak 8544a8c1c3 Merge branch 'main' into worktree-velvety-wishing-raccoon 2026-04-28 15:12:43 +02:00
Alem Tuzlak b2d14a847e Merge remote-tracking branch 'origin/worktree-mossy-tumbling-unicorn' into worktree-mossy-tumbling-unicorn 2026-04-28 13:55:50 +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
github-actions[bot] 30c0c41c89 style: auto-fix formatting 2026-04-28 11:26:25 +00:00
Ran Shem Tov 6c14258a39 feat(langgraph): add state injection to copilotkit middleware 2026-04-28 13:24:41 +02: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
Alem Tuzlak 79b99650c5 docs(showcase/mastra): region markers for shell-docs snippet coverage (#4326)
## Summary

- Adds `@region[name]` markers to mastra demo source so shell-docs
`<Snippet>` calls resolve to mastra-flavored code instead of yellow
"Missing snippet" warnings.
- 14 files modified (+42 comment-only lines, no runtime change), 2 new
sibling teaching files.
- 10 cells advanced from B (missing regions) to A (ready) in the
snippet-coverage audit, plus a partial mirror on `declarative-gen-ui`.

## Two patterns established

**1. In-place region markers** — wrap existing demo source where it
already reads as a clean teaching example. Markers are comment-only and
stripped from rendered output, so the runtime demo is byte-for-byte
unchanged. Used for 12 of the 14 file edits.

**2. Sibling `<region>.snippet.tsx` files** — for cases where the
production demo carries QA hooks (frontend tools, render tools, agent
context) that aren't relevant to the docs page being taught. The sibling
file lives in the demo folder so the bundler picks it up automatically;
it's never imported or rendered, so the demo route is unaffected. Used
twice this round:

- `agentic-chat/chat-component.snippet.tsx` — minimal `Chat` for the
prebuilt-chat docs page (mastra's production `Chat` carries
`useFrontendTool`, `useRenderTool`, `useAgentContext`)
- `tool-rendering/render-flight-tool.snippet.tsx` — flight + catchall
renderer patterns (mastra's tool-rendering demo only registers a weather
renderer)

## Cells advanced to ready

`prebuilt-popup`, `prebuilt-sidebar`, `frontend-tools`,
`chat-customization-css`, `agentic-chat-reasoning`, `chat-slots`,
`agentic-chat`, `tool-rendering`, `headless-complete`, plus
`provider-a2ui-prop` on `declarative-gen-ui`.

## Out of scope (not regressions)

- `a2ui-fixed-schema` and `runtime-inject-tool` on `declarative-gen-ui`
— the reference framework (langgraph-python) also lacks these regions,
so they need a cross-cutting authoring round before per-framework
mirroring is possible.
- `shared-state-read-write`, `shared-state-streaming`, `subagents`,
`gen-ui-interrupt`, `gen-ui-tool-based`, `mcp-apps`, `open-gen-ui`,
`open-gen-ui-advanced`, `interrupt-headless` — stub frontends or no demo
folder on mastra. Engineering work, not a docs PR.

## Test plan

- [ ] `/mastra/prebuilt-components/chat` — three snippets resolve,
including `chat-component` from the sibling file
- [ ] `/mastra/generative-ui/tool-rendering` — four snippets, exercising
in-place + highlight-file + sibling-file patterns
- [ ] `/mastra/custom-look-and-feel/css` — multi-file regions across
`page.tsx` + `theme.css`
- [ ] `/mastra/custom-look-and-feel/headless-ui` — five regions across
four files
- [ ] `/mastra/generative-ui/a2ui/dynamic-schema` — `provider-a2ui-prop`
resolves; `runtime-inject-tool` still yellow (cross-cutting, expected)
- [ ] `npx tsx showcase/scripts/bundle-demo-content.ts` succeeds
2026-04-28 10:58:56 +02:00