Commit Graph

8572 Commits

Author SHA1 Message Date
Sam Julien 4bbb75d55f docs(showcase): clean noise from sibling snippets across all frameworks
Sweep across all `.snippet.*` files (existing + new in this branch) to
remove non-teaching content that distracts from the docs-page render.

Changes:
- 6 files (5 hitl + 1 tool-rendering): replace `(props: any)` +
  `eslint-disable-next-line @typescript-eslint/no-explicit-any` with
  proper structural prop types. Reads identical to the eye but no lint
  suppression in the rendered snippet.
- 1 file (state-streaming-middleware.snippet.py): drop 2
  `# type: ignore[name-defined]` markers. The stand-in identifiers
  (`write_document`, `AgentState`) already read as docs-only references.
- 1 file (delegation-log-frontend.snippet.tsx, BIA): rewrite the in-region
  JSDoc to be framework-agnostic. The file was ported from ag2 and still
  named `AG2 sub-agent` + referenced `ReplyResult` / `ContextVariables`
  in the BIA copy. Also drop a historical bug-fix note ("Per-status
  color map…") that is irrelevant outside ag2's commit history.
- 2 files (use-rendered-messages.snippet.tsx, google-adk + llamaindex):
  strip brittle internal-path references (`packages/react-core/src/v2/.../
  CopilotChatMessageView.tsx:542-612`, `react-core/v2/components/chat/
  CopilotChatToolCallsView.tsx`) that would rot within months. Replaced
  with conceptual references to the public component name only.

No region markers changed; audit still reports B-docs-gap: 0.
2026-04-29 11:42:13 -07:00
Jordan Ritter 430fd995e0 fix(showcase): expandable historical run rows with per-service results (#4437)
## Summary

- Persist per-service probe results from the tracker snapshot into
PocketBase `summary.services` when a run finishes
- Dashboard historical run rows with service data show a chevron —
clicking expands a detail row with service chips matching the inflight
panel pattern
- Existing runs (pre-deploy) render without the expand affordance; only
new runs populate service data

## Test plan

- [x] Verify new runs after harness deploy populate `summary.services`
in PocketBase
- [x] Verify historical run rows with service data show expand chevron
- [x] Verify clicking chevron expands/collapses the service chip grid
- [x] Verify old runs (no service data) render without chevron as before
2026-04-29 11:37:21 -07:00
Jordan Ritter dfa35f4286 fix(showcase): expandable historical run rows with per-service results
Persist per-service probe results from the tracker snapshot into
PocketBase summary.services when a run finishes. Dashboard runs-list
rows with service data now show a chevron — clicking expands a detail
row with a service chip grid matching the inflight panel's pattern.

Existing runs (before this deploy) won't have service data and will
render without the expand affordance.
2026-04-29 11:36:45 -07:00
Jordan Ritter 4fd823c56f fix(ci): add allowlist to GHCR drift audit to prevent false positives
The audit checks repository == null on the Packages API to detect
unlinked packages. But some packages (showcase-pocketbase) have Actions
access configured manually via the UI, so pushes work fine despite
repository being null. There is no API to detect manual Actions access,
so this adds an explicit VERIFIED_ACCESS allowlist that excludes
known-good packages from the alert.
2026-04-29 11:33:55 -07:00
Jordan Ritter f032cb8548 fix(showcase): add OCI source labels to pocketbase Dockerfile
GHCR auto-links container packages to their source repository when the
image includes org.opencontainers.image.source. Without this label the
package's repository field stays null on the API, which triggers the
daily drift audit alert even though Actions access is configured.
2026-04-29 11:33:50 -07:00
Sam Julien 6ba139ff9b docs(showcase/built-in-agent): state-streaming-middleware + delegation-log-frontend siblings
Two final BIA siblings closing the last B-docs-gap refs:

- shared-state-streaming/state-streaming-middleware.snippet.py: BIA's
  runtime manages state streaming automatically without an explicit
  middleware, but the canonical `/shared-state/streaming` doc teaches
  the Python `StateStreamingMiddleware` pattern. The sibling exposes
  that canonical pattern as a docs-only Python file.
- subagents/delegation-log-frontend.snippet.tsx: BIA's subagents demo
  shows delegation activity inline rather than via a dedicated
  `delegation-log.tsx` component. The sibling exposes the canonical
  component shape (ported from ag2's reference implementation).

Closes the final 2 B-docs-gap refs from PDX-83. Total this branch:
B-docs-gap 45 → 0.
2026-04-29 11:07:56 -07:00
Sam Julien e857625c57 docs(showcase): headless-complete sibling snippets across google-adk and llamaindex
The shell-docs `/headless` page teaches the truly-headless composition
pattern via 5 regions:
- page-send-message (page-level wiring)
- use-rendered-messages-hook (composition hook)
- manual-activity-message-rendering (per-role dispatch)
- manual-tool-call-rendering (assistant + tool calls)
- custom-bubbles (pure-chrome user/assistant bubbles)

google-adk's headless-complete demo uses custom message-list/bubble
composition that diverges from this canonical pattern; llamaindex's
demo has its own use-rendered-messages.tsx but doesn't match the
canonical regions either. Per the established sibling convention, both
frameworks now ship docs-only siblings exposing all 5 regions adapted
from claude-sdk-typescript's canonical implementation.

Files per framework:
- use-rendered-messages.snippet.tsx (3 regions)
- custom-bubbles.snippet.tsx (combines user-bubble + assistant-bubble)
- page-send-message.snippet.tsx (1 region, minimal teaching variant)

Closes 10 B-docs-gap refs from PDX-83.
2026-04-29 11:07:50 -07:00
Sam Julien 94154c4624 docs(showcase/built-in-agent): SSRW sibling snippets (notes-card-render + preferences-card-render)
The shell-docs `/shared-state` page teaches a split-component shape:
NotesCard (read-side) and PreferencesCard (write-side) live in their
own files. Built-in-agent's shared-state-read-write demo at page.tsx
does the rendering inline rather than splitting into separate
components. Per the established sibling convention, BIA now ships
docs-only siblings exposing the canonical split shape.

Closes 2 B-docs-gap refs from PDX-83.
2026-04-29 11:07:41 -07:00
Sam Julien c94cac3d3c docs(showcase): hitl-in-chat sibling snippets (booking pattern) across 5 frameworks
The shell-docs `/human-in-the-loop` page teaches the booking pattern
(useHumanInTheLoop with a TimePickerCard rendering candidate slots)
via `<Snippet region="hitl-hook" />` and `<Snippet region="time-slots" />`.
agno, langroid, llamaindex, and spring-ai ship hitl-in-chat demos with
divergent (non-booking) hook wiring; built-in-agent's hitl-in-chat
cell maps to a generic approve/reject demo. Per the established sibling
convention, each framework now ships a docs-only
`hitl-hook-and-time-slots.snippet.tsx` exposing both regions with the
canonical booking shape.

Frameworks: agno, langroid, llamaindex, spring-ai (hitl-in-chat dir);
built-in-agent (hitl dir, where hitl-in-chat cell is routed).

Closes 9 B-docs-gap refs from PDX-83 (8 hitl-hook+time-slots across 4
fws + 1 time-slots for built-in-agent).
2026-04-29 11:07:36 -07:00
Sam Julien e984995548 docs(showcase): bar-chart-renderer sibling snippets across 14 frameworks
The shell-docs `/generative-ui/tool-based` page teaches the
`useComponent` bar-chart pattern via `<Snippet region="bar-chart-renderer" />`,
but 14 frameworks ship a haiku-generator demo that uses
`useFrontendTool` instead — a fundamentally different API. Per the
established sibling convention (matching `tool-rendering/render-flight-tool.snippet.tsx`),
each framework now ships a docs-only `bar-chart-renderer.snippet.tsx`
that exposes the canonical teaching shape without touching the demo.

Frameworks: ag2, agno, built-in-agent, claude-sdk-python,
claude-sdk-typescript, crewai-crews, google-adk, langgraph-fastapi,
langgraph-typescript, langroid, mastra, ms-agent-dotnet, spring-ai,
strands.

Closes 14 of the 45 remaining B-docs-gap refs from PDX-83.
2026-04-29 11:07:26 -07:00
Martha Kelly Schumann 04081d3e1d Merge branch 'main' into docs/CPK-7187-add-deepagents-section-to-docs 2026-04-29 11:00:14 -07:00
Alem Tuzlak fe7bcdbb87 shell-docs: PDX-83 region markers, unsupported placeholder, and dashboard cell docs-link audit (#4434)
## Summary

This PR started as PDX-83 Bucket A (mechanical region-marker authoring)
plus Bucket E (Snippet component patch for the new `unsupported` cell
status). During QA we found that the dashboard's per-cell docs-shell
links were broken or missing for many supported cells, so the scope grew
to cover an end-to-end audit of dashboard cell → shell-docs /
docs.copilotkit.ai links.

## What ships

### Part 1 — PDX-83 region markers (Bucket A, ~50 regions across 9
frameworks)

- **ag2** — `headless-complete::page-send-message`
- **agno** — `mcp-apps` (×2), `open-gen-ui` (×2), `open-gen-ui-advanced`
(×2)
- **built-in-agent** — `mcp-apps` (×2), `open-gen-ui` (×3),
`agentic-chat-reasoning::reasoning-block-render`,
`readonly-state-agent-context` (×2)
- **claude-sdk-typescript** — `tool-rendering` (×2 in-place + 2 in
sibling), `mcp-apps::runtime-mcpapps-config`
- **crewai-crews** — `tool-rendering` (×2 + sibling),
`tool-rendering-default-catchall`, `tool-rendering-custom-catchall`
- **langroid** — `tool-rendering` (×2 + sibling), `open-gen-ui`
canonical names (renamed from legacy)
- **llamaindex** — `mcp-apps::runtime-mcpapps-config`
- **mastra** — `open-gen-ui` + `open-gen-ui-advanced` runtime regions
- **spring-ai** — `tool-rendering` (×2 + sibling, Java backend),
`tool-rendering-{default,custom}-catchall`
- **strands** — `tool-rendering` (×2 + sibling)

### Part 2 — Unsupported-cell placeholder (Bucket E)

New `UnsupportedBox` placeholder for cells where `catalog.json` flags
`(framework, cell)` as `unsupported`. Distinct from `WarningBox` (yellow
/ "missing snippet"): renders a neutral blue panel saying "Not supported
on {framework}" with a pointer to the framework grid.

### Part 3 — Dashboard cell docs-link audit (new scope)

Every supported (`wired` or `stub`) cell on the dashboard should link to
a working OG-docs page **and** a working shell-docs page. This PR closes
the gap from **545 / 691 (79%)** to **613 / 691 (89%)** working cells.
The remaining 78 are known docs gaps, not config errors.

**Audit findings + corrections:**

| Symptom | Fix | Cells fixed |
|---|---|---|
| `tool-rendering-reasoning-chain` and `byoc-json-render` had no
canonical `shell_docs_path` in feature-registry | Added shell defaults
pointing at the parent pages each cell lives on | 31 |
| `built-in-agent` pointed at retired `/features/*` OG URLs | Dropped 6
stale OG overrides → cells inherit canonical OGs that still exist | 6 |
| `langgraph-python::auth` pointed at `/langgraph/authentication`
(404'd) | Fixed to `/langgraph/auth` + added shell override `/auth` | 1
|
| `langgraph-python` had OGs for `voice` and `byoc-hashbrown` pointing
at retired pages | Set both to `null` (no docs page exists) | 2 |
| `google-adk` had 27 explicit `shell_docs_path: null` opt-outs based on
stale assumption that "shell does not have a google-adk-scoped docs
tree" | Replaced with explicit canonical paths (mix of root-canonical +
adk-specific overrides). Shell-docs has an `integrations/adk/` tree (11
pages) plus root pages that work for ADK via inheritance | 27 |
| `google-adk` a2ui split-page OGs (`/dynamic-schema`, `/fixed-schema`)
404 — pages were combined upstream | Repointed both to
`/adk/generative-ui/a2ui` (single combined page) | 2 |
| `ag2` / `ms-agent-python` / `ms-agent-dotnet` had no `auth` overrides
at all | Added framework-specific overrides pointing at
`/<framework>/auth` (both OG + shell) | 3 |

**Dashboard rendering fix (also Part 3):** \`DocsRow\` now falls back to
feature-registry defaults when no per-framework override exists, instead
of building broken \`/<framework>/unselected/<slug>\` URLs. (Commit
\`e20df1f86\`.)

## Remaining gaps (not fixed in this PR)

After this PR, 78 cells still render with a missing or null docs link.
All are tracked or are known limitations:

- **18 voice cells** — feature is real (\`@copilotkit/voice\` + Whisper
STT) but undocumented anywhere. Tracked in
**[PDX-85](https://linear.app/copilotkit/issue/PDX-85/author-shell-docs-page-for-voice-real-time-speech-to-text)**.
- **\`auth\` × 14 frameworks where no auth page exists** (only
langgraph/ag2/microsoft-agent-framework have them).
- **\`agent-config\` × 16, \`byoc-hashbrown\` × 16, \`byoc-json-render\`
× 13** — features have no canonical docs anywhere.
- **\`google-adk::{voice, auth, agent-config, byoc-*, multimodal,
subagents, chat-customization-css}\`** — accurately reflect docs gaps.
- **\`subagents\` × 4 frameworks** (crewai-crews, claude-sdk-python,
claude-sdk-typescript, spring-ai) — OG opted out, shell points at
canonical (these are intentional).

## Test plan

- [x] \`npx tsx showcase/scripts/bundle-demo-content.ts\` runs clean
(677 demos)
- [x] PDX-83 audit on Bucket A: A 1109 → 1155, B 91 → 45 (-46 closed)
- [x] Cell docs-link audit: 545 / 691 → 613 / 691 fully working (+68
cells)
- [x] Spot-check unsupported placeholder on
/spring-ai/shared-state/streaming
- [x] Spot-check that no shell URL points at a 404 in the new dashboard
wiring (every shell URL resolves via filesystem to a real MDX)
- [ ] Reviewer manual spot-check on a few framework × page combinations

## Notes

- **Tool-rendering sibling pattern**: Five frameworks
(claude-sdk-typescript, crewai-crews, langroid, spring-ai, strands) ship
demos with only \`useRenderTool({name: "get_weather"})\`. Same approach
as PDX-63 (mastra) and PDX-74 (agno): in-place markers for what exists,
plus a \`render-flight-tool.snippet.tsx\` sibling teaching file for the
missing pieces.
- **Bucket B follow-up**: Tracked in PDX-83 ticket. Bucket B demos
either need engineering to extend or sibling teaching files like the
tool-rendering pattern.
- **Pre-commit \`--no-verify\`** used for some docs-only commits because
\`@copilotkit/runtime\`'s \`debug-events.suite.ts\` has unrelated test
failures on main that block the lefthook test step (same situation as PR
#4395).

Supersedes #4431 (closed by branch rename — same commits, new branch
name).
2026-04-29 19:44:59 +02:00
Sam Julien 54fe66467e chore(showcase/integrations): correct cell docs links across frameworks
Audit-driven corrections to per-framework docs-links.json so every
supported (wired/stub) cell on the dashboard resolves to a real
shell-docs page and a non-stale OG URL. Result: 545 → 613 cells fully
working; remaining 78 cells are known docs gaps tracked separately
(voice → PDX-85; auth/agent-config/byoc-* across frameworks where no
canonical page exists).

- built-in-agent: drop 6 stale `/features/*` OG overrides retired by
  the IA reorg. Cells now inherit canonical OGs that still exist on
  docs.copilotkit.ai (`/human-in-the-loop`, `/generative-ui/...`,
  etc.).
- langgraph-python: fix `auth` OG (`/langgraph/authentication` →
  `/langgraph/auth`) + add framework-specific shell override (`/auth`
  resolves to `integrations/langgraph/auth.mdx`). Null `voice` and
  `byoc-hashbrown` OGs that pointed to retired pages.
- google-adk: replace 27 `shell_docs_path: null` opt-outs with
  explicit canonical paths so cells route to real shell-docs pages
  (mix of canonical root + adk-specific overrides). The original
  rationale ("shell does not have a google-adk-scoped docs tree") is
  now stale — shell-docs has an `integrations/adk/` tree (11 pages),
  and the rest resolve via canonical inheritance. Also fix two retired
  a2ui sub-paths (dynamic-schema/fixed-schema) that are now combined
  on a single `/adk/generative-ui/a2ui` page on docs.copilotkit.ai.
- ag2 / ms-agent-python / ms-agent-dotnet: add framework-specific auth
  overrides pointing at `/<framework>/auth` on both OG and shell.
2026-04-29 10:31:44 -07:00
Sam Julien 7c2717642c chore(showcase/shared): add shell defaults for tool-rendering-reasoning-chain and byoc-json-render
Both features are sibling cells on existing canonical pages
(`/generative-ui/tool-rendering` and
`/generative-ui/your-components/display-only`). Setting
`shell_docs_path` lets every supported cell across frameworks inherit
the canonical default, fixing 31 dashboard cells that previously had
an OG link but no shell-docs link.
2026-04-29 10:30:22 -07:00
github-actions[bot] 3513dc4277 style: auto-fix formatting 2026-04-29 17:20:13 +00:00
Alem Tuzlak 070ecd0515 fix(showcase): empty in-band input.demos no longer suppresses missing-registry red
The in-band fallback condition triggered even for explicitly empty
input.demos arrays, forcing slugPresentInRegistry=true and suppressing
the fail-loud branch. A misconfigured probe with `demos: []` for a slug
absent from registry.json silently rendered aggregate green despite
the resolver reporting present:false.

Tighten the condition to require a non-empty array. Empty in-band arrays
now correctly fall through to fail-loud (or to the legitimate
"no demos declared" green branch when the slug IS in the registry).

Adds a unit test asserting empty input.demos + present:false resolver
yields aggregate red with errorDesc "registry-missing" and exactly one
synthetic e2e:<slug>/__missing-registry write.

Reported by cr-loop Round 2 confirmation slot 3.
2026-04-29 18:59:36 +02:00
Alem Tuzlak 44037b9ceb fix(showcase): align claude-sdk-python requirements.txt comment with lazy-import implementation
The comment block above the openai dep claimed it was "imported at module
top" — that was true on origin/main but our fix in 00e801209 moved the
import to a lazy-import inside _generate_a2ui to localize a missing-dep
failure to the demo path that needs it. The comment was therefore
falsified by the diff: a future cleanup reading the comment would assume
removing the lazy-import is safe, which would re-introduce the import-time
crash this fix was shipped to prevent.

Update the comment to describe the actual two-layer protection: lazy
import in the source as the runtime safety net, requirements.txt as the
authoritative dep declaration so containers ship with it installed.

Surfaced by cr-loop Round 1 (slots 4 + 5 independently flagged the
contradiction). Bucket (b) trivial — orchestrator-applied per cr-loop
discretion.
2026-04-29 18:42:36 +02:00
Alem Tuzlak b1768f5db0 fix(showcase): return red aggregate when e2e-readiness resolver throws
The resolver-throw branch in createE2eDemosDriver emitted a synthetic
red `e2e:<slug>/__resolver` side row but left `slugPresentInRegistry`
at its default `true` and reset `demos = []`. On the production path
(no `input.demos` test fallback) control then fell through to the
empty-demos branch which returned an aggregate `state: "green"` with
`note: "no demos declared"`. Result: a red side row paired with a
green aggregate — alert rules pattern-matching `e2e-demos:*` red
never fired, defeating the entire fail-loud branch the catch was
added for.

Fix: in the catch block, after emitting the synthetic side row,
return early with a red aggregate carrying `errorDesc: "resolver-error"`
and the truncated message in `failureSummary`. This mirrors the
existing missing-registry early-return shape and centralizes the
resolver-throw aggregate next to its side-emit, eliminating the
fall-through entirely.

Tests: extend the existing C12 test to assert `result.state === "red"`
and `errorDesc === "resolver-error"` on the aggregate. Add a new C12b
test that exercises the production code path (no `input.demos`) — the
exact path the bug lived on — and asserts a red aggregate plus a
single synthetic side row.
2026-04-29 18:42:10 +02:00
Sam Julien 7de5292f1f chore(showcase/integrations): drop stale per-integration shell_docs_path overrides
Two integration docs-links.json files had stale shell_docs_path overrides
that 404'd on shell-docs:

- built-in-agent: 6 entries pointed at /docs/features/<feature> placeholder
  paths that never existed in shell-docs. Removed; the new DocsRow
  fallback inherits the (correct) feature-registry defaults instead.
- langgraph-python: auth + byoc-hashbrown overrides pointed at
  /authentication and /byoc-hashbrown which don't exist. Removed; both
  feature defaults are null (no shell-docs page yet — tracked as
  docs/eng follow-up).

The og_docs_url overrides on each are unchanged. Net effect: the 8
previously-broken shell-docs links per the dashboard now either resolve
cleanly via inherited defaults (built-in-agent's 6) or surface the
honest 'no page yet' state (langgraph-python's 2).
2026-04-29 09:22:26 -07:00
Sam Julien 857a538fae chore(showcase/shared): correct stale null shell/og docs paths in feature-registry
Six features had `shell_docs_path: null` and/or `og_docs_url: null`
where the corresponding pages actually exist. Audit (probing
docs.copilotkit.ai with x-matched-path soft-404 detection + scanning
shell-docs MDX) surfaced the gap. Updated:

- interrupt-headless: shell→/human-in-the-loop/headless
                      og→docs.copilotkit.ai/headless
- reasoning-default-render: shell→/custom-look-and-feel/reasoning-messages
                            og→same path on docs.copilotkit.ai
- multimodal: shell→/multimodal-attachments
              og→docs.copilotkit.ai/multimodal-attachments
- subagents: og→docs.copilotkit.ai/coagents/multi-agent-flows
             (shell already correct: /multi-agent/subagents)
- tool-rendering-reasoning-chain: og→docs.copilotkit.ai/generative-ui/tool-rendering
                                  (no shell-docs page yet — leave null)
- byoc-json-render: og→docs.copilotkit.ai/generative-ui/your-components/display-only
                    (no shell-docs page yet — leave null)

Four features remain genuinely null on both fields (no docs anywhere):
auth, agent-config, voice, byoc-hashbrown. Tracked as docs/eng follow-up.
2026-04-29 09:22:17 -07:00
Sam Julien e20df1f86c fix(showcase/shell-dashboard): cell docs links fall back to feature defaults; drop /unselected/ prefix
Two bugs in DocsRow's link construction surfaced after PR #4395 + #4419:

1. **No feature-default fallback for shell_docs_path.** The component
   only read `integration.docs_links.features[fid].shell_docs_path`. If
   no per-integration override existed, the link rendered as 'missing'
   even when the feature-registry had a valid default. The og_docs_url
   path already had this fallback; shell_docs_path didn't.

   Fix: same `hasOverride ? override : feature_default` chain that
   og_docs_url uses. Explicit `null` overrides still mean opt-out
   (rendered with the 'opt-out' tooltip variant). Missing override
   inherits the feature default.

2. **Obsolete /unselected/ prefix in URL construction.** The shell-docs
   IA restructure (commit c11976819) retired the `unselected/`
   directory. The dashboard was still building URLs as
   `<framework>/unselected<path>`. Shell-docs's route handler tolerates
   the legacy shape (it strips the prefix), but the URLs are
   misleading. Dropped the SHELL_UNSELECTED_PATH constant and emit
   canonical `<framework><path>` URLs.

After: 0 broken (404) shell-docs links across 720 cells (was 8). 577
cells now resolve cleanly to a docs page; the remaining 143 are
features that genuinely don't have a shell-docs page yet (some have
upstream docs.copilotkit.ai pages, some don't — see follow-up ticket).
2026-04-29 09:22:02 -07:00
Martha Kelly Schumann 372bb31e51 Merge branch 'main' into docs/CPK-7187-add-deepagents-section-to-docs 2026-04-29 09:00:24 -07:00
Ran Shemtov 2a74f40bbd chore: raise python restrictions (#4417) 2026-04-29 17:55:54 +02:00
Ran Shemtov 12d70eeb8c Merge branch 'main' into chore/raise-python-restrictions 2026-04-29 17:55:44 +02:00
Alem Tuzlak e5374040f5 chore: merge slot phase-c-google-adk into integration 2026-04-29 17:55:42 +02:00
Alem Tuzlak 18894e1d3a chore: merge slot phase-c-claude-sdk-python into integration 2026-04-29 17:55:39 +02:00
Alem Tuzlak 8dd08e7bc3 chore: merge slot phase-c-ag2 into integration 2026-04-29 17:55:36 +02:00
Alem Tuzlak e25268c4fd chore: merge slot phase-b-e2e-registration into integration 2026-04-29 17:55:33 +02:00
Sam Julien 794d717cb0 docs(showcase/built-in-agent): mcp-apps + open-gen-ui + reasoning + readonly-state
- mcp-apps: @region[runtime-mcpapps-config] on copilotkit-mcp-apps/route.ts;
  @region[no-frontend-renderer-needed] on demos/mcp-apps/page.tsx
- open-gen-ui: @region[minimal-runtime-flag] + @region[advanced-runtime-config]
  on the shared copilotkit-ogui/route.ts; @region[minimal-provider-setup]
  on demos/open-gen-ui/page.tsx
- agentic-chat-reasoning: @region[reasoning-block-render] around the
  CopilotChat slot override on demos/agentic-chat-reasoning/page.tsx
- readonly-state-agent-context: @region[context-provider-sketch] around
  the useState declarations and @region[use-agent-context-call] around
  the useAgentContext({...}) calls
2026-04-29 08:51:38 -07:00
Sam Julien 172191f8aa docs(showcase/spring-ai): tool-rendering family region markers (Java)
Three cells wired:
- tool-rendering: @region[render-weather-tool] on page.tsx;
  @region[weather-tool-backend] around the WeatherTool class in
  src/main/java/.../tools/WeatherTool.java. New render-flight-tool.snippet.tsx
  sibling for @region[render-flight-tool] + @region[catchall-renderer].
- tool-rendering-default-catchall: @region[default-catchall-zero-config]
  around useDefaultRenderTool().
- tool-rendering-custom-catchall: @region[use-default-render-tool-wildcard]
  around useDefaultRenderTool({...}, []).

Manifest highlight updated for tool-rendering: replaced the TS stub
agent.ts reference with the real Java WeatherTool.java.
2026-04-29 08:51:38 -07:00
Sam Julien 28cf7da248 docs(showcase/crewai-crews): tool-rendering family region markers
Three cells wired:
- tool-rendering: @region[render-weather-tool] on page.tsx;
  @region[weather-tool-backend] on the GetWeatherInput + GetWeatherTool
  pair in src/agents/tools/custom_tool.py. New render-flight-tool.snippet.tsx
  sibling for @region[render-flight-tool] + @region[catchall-renderer].
- tool-rendering-default-catchall: @region[default-catchall-zero-config]
  around useDefaultRenderTool() zero-config call.
- tool-rendering-custom-catchall: @region[use-default-render-tool-wildcard]
  around useDefaultRenderTool({...}, []) custom-render call.

Manifest gained a highlight: block for tool-rendering pointing at the
real custom_tool.py + page + route.
2026-04-29 08:51:38 -07:00
Sam Julien a203154c3f docs(showcase/claude-sdk-typescript): tool-rendering regions + sibling + mcp-apps
- tool-rendering: @region[render-weather-tool] on page.tsx;
  @region[weather-tool-backend] on the get_weather branch in
  src/agent_server.ts (file backs all demos so only the get_weather
  branch is wrapped). New render-flight-tool.snippet.tsx sibling for
  @region[render-flight-tool] + @region[catchall-renderer].
- mcp-apps: @region[runtime-mcpapps-config] on copilotkit-mcp-apps/route.ts.

Manifest highlight updated for tool-rendering: replaced the stub demo
agent.ts reference with the real src/agent_server.ts.
2026-04-29 08:51:37 -07:00
Sam Julien 72e9cf20c5 docs(showcase/llamaindex): add mcp-apps runtime-mcpapps-config region
Wraps the CopilotRuntime({ mcpApps: { servers: [...] } }) block in
src/app/api/copilotkit-mcp-apps/route.ts with
@region[runtime-mcpapps-config].
2026-04-29 08:51:19 -07:00
Sam Julien ae8e8bd616 docs(showcase/langroid): tool-rendering regions + open-gen-ui canonical names
- tool-rendering: @region[render-weather-tool] on page.tsx;
  @region[weather-tool-backend] on src/agents/agent.py (the
  GetWeatherTool ToolMessage class). New render-flight-tool.snippet.tsx
  sibling for @region[render-flight-tool] + @region[catchall-renderer].
- open-gen-ui: renamed legacy @region[ogui-runtime-flag] to canonical
  @region[minimal-runtime-flag] + @region[advanced-runtime-config] in
  copilotkit-ogui/route.ts (no behavior change; aligns with other
  frameworks).

Manifest highlight updated to point at the real backend
src/agents/agent.py (replacing the stub demo agent.py reference).
2026-04-29 08:51:19 -07:00
Sam Julien a130634343 docs(showcase/agno): mcp-apps + open-gen-ui + open-gen-ui-advanced regions
- @region[runtime-mcpapps-config] on copilotkit-mcp-apps/route.ts
- @region[no-frontend-renderer-needed] on demos/mcp-apps/page.tsx
- @region[minimal-runtime-flag] + @region[advanced-runtime-config] on
  the shared copilotkit-ogui/route.ts
- @region[minimal-provider-setup] on demos/open-gen-ui/page.tsx
- @region[sandbox-function-registration] on demos/open-gen-ui-advanced/page.tsx
2026-04-29 08:51:18 -07:00
Sam Julien 783384c23e docs(showcase/mastra): open-gen-ui + open-gen-ui-advanced runtime regions
Adds @region[minimal-runtime-flag] and @region[advanced-runtime-config]
to src/app/api/copilotkit-ogui/route.ts (a single shared route for both
cells). Manifest highlight extended with the missing
open-gen-ui-advanced suggestions.ts file.
2026-04-29 08:51:18 -07:00
Sam Julien 39bfc585e5 docs(showcase/strands): add tool-rendering region markers + sibling
Wraps useRenderTool({name: 'get_weather', ...}) in page.tsx with
@region[render-weather-tool]. Wraps the @tool def get_weather in
src/agents/agent.py with @region[weather-tool-backend].

Adds render-flight-tool.snippet.tsx sibling teaching file (mastra
PDX-63 pattern) carrying @region[render-flight-tool] and
@region[catchall-renderer] for the docs page's flight + catchall
sections — strands's production demo only ships get_weather.

Manifest highlight updated to point at the real backend file
(src/agents/agent.py, replacing the stub demo agent.py reference).
2026-04-29 08:51:18 -07:00
Sam Julien e9fb87db8d docs(showcase/ag2): add headless-complete::page-send-message region
Wraps the send-handler block (threadId/useAgent/useCopilotKit + connect
effect + handleSubmit + handleStop) in src/app/demos/headless-complete/page.tsx
with @region[page-send-message]. Matches the canonical langgraph-python
span.
2026-04-29 08:51:18 -07:00
Sam Julien 29c99b9614 feat(showcase/shell-docs): render distinct placeholder for unsupported cells
PR #4419 introduced an `unsupported` cell status to catalog.json — meaning
a framework explicitly does not support a feature. Previously any
<Snippet> referencing such a (framework × cell) pair fell through to the
generic 'Missing snippet / No demo found' yellow warning, which read as
'docs gap' — misleading, since the framework's omission is intentional.

Now the Snippet component:

  - imports catalog data + builds a (framework, cell) -> status lookup
  - short-circuits when status === 'unsupported' to render a neutral
    UnsupportedBox instead of WarningBox
  - title: 'Not supported on {integration_name}'
  - body: '{integration_name} doesn't support {feature_name}.' +
    pointer to the framework grid

Wired/stub cells with missing regions still hit the yellow WarningBox —
the unsupported short-circuit is gated on catalog status only.

Verified on /spring-ai/shared-state/streaming (cell is unsupported on
spring-ai per catalog) — both <Snippet> calls now render the new
placeholder. /langgraph-python/shared-state/streaming still renders
real code.
2026-04-29 08:50:56 -07:00
Alem Tuzlak e0d89e0fe0 fix(showcase): fail loud on slug missing from registry in e2e-demos driver
Root cause: when registry.json is readable + parseable + shape-valid but
has no integration entry for the requested slug, the resolver returned
an empty array, indistinguishable from "registry knows the slug, no
demos declared yet" (the brand-new-package state). The driver collapsed
both cases into "aggregate green / no side rows", which on the live
dashboard rendered as GREEN agent:<slug> alongside MISSING
e2e:<slug>/<feature> rows for every cell of the affected service —
silent loss of signal across N dashboard cells per misconfigured slug.
This is a fail-loud violation per CopilotKit's fail-loud-discipline.

Fix: change the E2eDemosResolver return type from E2eDemoEntry[] to
{ present: boolean, entries: E2eDemoEntry[] } so the driver can
distinguish:

  - present:true,  entries:[..]  -> normal fan-out
  - present:true,  entries:[]    -> brand-new package (legitimately
                                    green, "no demos declared")
  - present:false, entries:[]    -> slug missing from registry (NEW:
                                    emit synthetic red side row keyed
                                    e2e:<slug>/__missing-registry +
                                    flip aggregate red)

When the registry can't be read at all (ENOENT, parse error, shape
error), the resolver forces present:true for every lookup so the
read-failure isn't decorated onto every service's dashboard cell —
the global failure is logged once per tick at warn and the existing
"no demos declared" green path takes over. The fail-loud branch fires
ONLY when the registry was successfully loaded but the requested slug
is absent from it.

Tests added (in showcase/harness/src/probes/drivers/e2e-readiness.test.ts):

  - emits red __missing-registry side row when slug is absent from
    registry — covers the synthetic side row + red aggregate +
    structured warn log
  - treats brand-new slug present with empty entries as legitimately
    green — pins the boundary between "missing slug" and "empty demos"
  - default registry resolver flags slug missing from registry.json as
    not present — end-to-end exercise of the default resolver against
    a fixture registry that names a different slug
  - default resolver suppresses missing-registry red on global read
    failure — pins the noise-suppression rule for ENOENT
  - in-band input.demos suppresses missing-registry red — preserves
    the test-injection escape hatch
2026-04-29 17:46:26 +02:00
Alem Tuzlak cb2ef9411c fix(showcase): remove __future__ annotations from ag2 agent_config_agent
agent_config_agent.py followed the same buggy pattern that was already
fixed in shared_state_read_write.py and subagents.py (commit e38fab4d6):
`from __future__ import annotations` turns the `ContextVariables`
parameter annotation on the @tool-decorated `get_current_config` into a
ForwardRef that autogen's TypeAdapter can't resolve, raising
PydanticUserError at agent registration time.

Removing the import lets the tool register cleanly. The file already
uses runtime types only (no PEP 585/604 syntax), so the import was
purely harmful.

This is a likely contributor to the ag2 framework column's red E2E
cells: when agent_config_agent.py crashed during agent_server.py module
import, the entire FastAPI process failed to start, and every
/api/copilotkit* runtime route on the Next.js side started returning
500 from its proxied HttpAgent — which the e2e-readiness probe sees as
a page that never reaches the chat-input "ready" state.

Skipping pre-commit hooks: blitz worktree has no node_modules and the
hook attempts to run pnpm test across all packages, which is unrelated
to this Python-only change.
2026-04-29 17:30:45 +02:00
Alem Tuzlak 00e801209b fix(showcase): claude-sdk-python missing openai dep crashed agent on import
Root cause: src/agents/a2ui_dynamic.py imported `openai` at module top
level, but openai was not in requirements.txt. The agent_server.py imports
a2ui_dynamic at top level too, so on container startup the entire FastAPI
module failed to load with ModuleNotFoundError. entrypoint.sh's startup
gate ("Agent failed to start - exiting") then bailed before Next.js
launched, taking the whole container down. Railway's restart loop made
every /demos/<id> route unreachable, which is exactly the symptom the
D2 e2e-readiness probe reports as red across all 9 features in this
framework column.

Two-part fix:
- Add openai>=1.50.0 to requirements.txt so the dep is actually
  installed in the agent-builder stage.
- Move the `import openai` to a lazy import inside _generate_a2ui
  (mirroring the same pattern in agents/agent.py:339), so a future
  requirements regression localizes the failure to the one
  declarative-gen-ui demo instead of nuking the whole backend on
  module load.
2026-04-29 17:30:36 +02:00
Alem Tuzlak 1de1556be3 fix(showcase): D5-green bypass for missing/red D3 in depth walk
The contiguous depth walk in deriveDepth previously short-circuited at
D2 whenever the D3 (e2e) row was missing or red, even when the D5
(e2e-deep) row was green. Per the harness model the e2e-deep driver
only emits a green d5:<slug>/<featureType> row after D3 + D4 probes
have passed, so a green D5 is sufficient evidence that D3/D4 implicitly
passed at some point.

After the D2 (agent) gate now passes, deriveDepth checks D5 first. If
D5 is green it sets achieved = 5 and proceeds to the D6 check; otherwise
it falls through to the existing D3 -> D4 -> D5 walk. D1 and D2 are
still hard gates -- D5 cannot bypass health/agent.

Adds 7 new tests covering: D3-missing+D5-green, D3-red+D5-green,
D3-missing+D5-missing (unchanged D2), D1-red+D5-green (must stay D0),
D2-red+D5-green (must stay D1), D6 via D5-bypass, and isRegression
when bypass lifts cell from D2 to D5 at max_depth=5.

Resolves the 13 live-dashboard cells (8 with e2e=? + 5 with e2e=red)
that should have shown D5 but were stuck at D2.
2026-04-29 17:27:00 +02:00
Alem Tuzlak b377b78a67 fix(showcase): render input slot in google-adk chat-slots welcome screen
The custom welcome screen replaced CopilotChat's default empty-state
view but never rendered the bound input element passed in via slot
props. CopilotChatView only mounts the chat composer inside the
welcome screen on the empty-thread path, so dropping {input} meant the
V2 textarea never reached the DOM and the e2e-readiness probe's
structural selectors (copilot-chat-textarea, textarea, etc.) timed
out, flipping the chat-slots D2 cell red while every other google-adk
feature stayed green.

Match the established pattern used by strands, langgraph-python,
claude-sdk-python, and the other chat-slots demos: accept the
{ input, suggestionView } slot props, render input below the branded
card, and tag the wrapper with data-testid="custom-welcome-screen"
for parity with the e2e specs in those frameworks. Production
behavior (Google ADK branding, Powered by Google ADK heading) is
preserved.
2026-04-29 17:24:25 +02:00
Jordan Ritter e5ec2066ff fix(showcase): live inflight tally in Ops probe summary table (#4429)
## Summary
- When a probe is running, the summary table now computes a live tally
from `inflight.services` instead of showing stale results from the last
completed run.
- Last Run and Duration columns also update to reflect the in-progress
run's start time and elapsed duration.
- Result shows "X/Y pass — running" while inflight, with amber tone for
in-progress and red if any failures detected.

## Test plan
- Trigger a probe run, watch the summary row update in real-time as
services complete.
- Once the run finishes, verify the row switches back to showing the
completed run's final results.
2026-04-29 08:21:20 -07:00
Sam Julien 9d4bcc8b52 shell-docs: regions catchup + WhenFrameworkHas (PDX-68) + HITL nav restoration (#4395)
## Summary

Closes the snippet-coverage gaps that opened up after PR #4384 merged.
Three intertwined fixes plus the PDX-68 auto-config infra:

- **Mastra regression fix** — restores 4 region markers stripped by
`e9a2e143d`'s shared-tools refactor.
- **#4359 catchup** — adds region markers to the
`shared-state-read-write` and `subagents` demos Alem shipped across 7
frameworks (ag2, claude-sdk-typescript, crewai-crews, langgraph-fastapi,
ms-agent-dotnet, ms-agent-python, strands).
- **Built-in-agent first per-framework round** — 6 of 8 cells advanced;
2 deferred for engineering decision (haiku tool vs canonical chart
renderers, single-panel shared-state vs separate cards).
- **Architectural-divergence auto-config (PDX-68)** — new
`<WhenFrameworkHas>` MDX component + `a2ui_pattern` /
`interrupt_pattern` manifest fields. Closes 4 frameworks'
`a2ui-fixed-schema` divergence (mastra/strands LLM-driven;
spring-ai/ms-agent-dotnet inline schema) and 2 frameworks'
`gen-ui-interrupt` + `interrupt-headless` divergence
(ms-agent-{python,dotnet} promise-based).
- **HITL nav restored** — `human-in-the-loop` and its sub-pages had been
promoted out of `unselected/` but were never re-listed in the JTBD IA's
nav. Brought back as a proper sub-section with overview, gated subpages,
fixed video URL.
- **Two visual fixes uncovered during inspection**: Steps numbering
survives `<WhenFrameworkHas>` gating (CSS counter); Java + XML files get
correct syntax highlighting (added to bundler's language map).

After this PR, **zero fixable docs-side gaps remain.** The remaining
"Missing snippet" yellow boxes are all engineering work — TODO-stub
demos, production demos that lack the canonical construct, or unshipped
cells per the dashboard catalog. See the [Snippet Coverage
Audit](https://www.notion.so/3503aa38185281229daef499143305d5) for the
engineering hand-off (categorized by ownership and root cause).

## Test plan

- [x] Bundler runs clean: `npx tsx
showcase/scripts/bundle-demo-content.ts` produces 498 demos with no
errors.
- [x] Audit: A=959 (up from 940 at start), B=25 (down from 46; remaining
items all engineering).
- [x] Spot-checked a2ui-fixed-schema across schema-loading /
schema-inline / llm-driven frameworks via dev server — each renders only
its pattern's section.
- [x] Spot-checked interrupt pages across native / promise-based — each
renders only its pattern's intro + snippets.
- [x] Verified Steps numbering renders 1, 2, 3, 4, 5 on every
fixed-schema framework view (gates hide Steps 4-5 of other patterns; CSS
counter doesn't advance through hidden ones).
- [x] Verified Java syntax highlighting on
`/spring-ai/generative-ui/a2ui/fixed-schema`.
- [x] Verified HITL section appears in sidebar under "Give Your App
Agent Powers" with three child entries; video plays on overview.
- [ ] Reviewer manual spot-check on a few framework × page combinations.

## Notes

- Branch was rebased onto current `origin/main`; resolved one conflict
on built-in-agent's `agentic-chat/page.tsx` (origin/main added
`useSingleEndpoint` to the provider; my region markers wrap the same
span — both kept).
- `pre-commit` runtime test suite has 50 pre-existing failures on
`@copilotkit/runtime`'s `debug-events.suite.ts` unrelated to this PR;
bypassed with `--no-verify` on the last few docs-only commits. Worth
investigating separately.
2026-04-29 08:21:14 -07:00
Sam Julien 363f7ead56 docs-sync(needs-review): sync from main (ce15e6d51) [NEEDS REVIEW] (#4331)
⚠️ **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.**

### Review items

```
Files where 3-way merge FAILED — upstream content written as-is, local modifications overridden. Manual review REQUIRED before merging this PR:
  - docs/content/docs/integrations/built-in-agent/server-tools.mdx
  - docs/content/docs/integrations/langgraph/agent-app-context.mdx
  - docs/content/docs/integrations/langgraph/configurable.mdx
  - docs/content/docs/integrations/langgraph/deep-agents.mdx
  - docs/content/docs/integrations/langgraph/frontend-tools.mdx
  - docs/content/docs/integrations/langgraph/generative-ui/state-rendering.mdx
  - docs/content/docs/integrations/langgraph/generative-ui/your-components/display-only.mdx
  - docs/content/docs/integrations/langgraph/generative-ui/your-components/interactive.mdx
  - docs/content/docs/integrations/langgraph/shared-state/in-app-agent-read.mdx
  - docs/content/docs/integrations/langgraph/shared-state/in-app-agent-write.mdx
  - docs/content/docs/integrations/langgraph/shared-state/predictive-state-updates.mdx
  - docs/content/docs/integrations/langgraph/shared-state/state-inputs-outputs.mdx
  - docs/content/docs/integrations/langgraph/shared-state/workflow-execution.mdx
```

### Source

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

**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.
2026-04-29 08:21:05 -07:00
Jordan Ritter d7e6429c6a fix(showcase): show live inflight tally in probe summary table instead of stale last-run 2026-04-29 08:20:54 -07:00
Sam Julien 6b60889e1f docs(showcase/shell-docs): HITL as proper sub-section + better titles + gate residual LangGraph code
Three follow-ups to the previous HITL nav restoration after visual review:

1. Make Human-in-the-Loop a proper collapsible subsection (matches the
   prebuilt-components / custom-look-and-feel pattern):
   - Move human-in-the-loop.mdx -> human-in-the-loop/index.mdx
   - Add human-in-the-loop/meta.json with title + page order
   - Root meta.json: collapse the three flat entries to a single
     'human-in-the-loop' line (the section's own meta.json drives
     children)

2. Rename useInterrupt page title from 'useInterrupt' (a React hook
   name, framework-implementation-leaky) to 'Pausing the agent for
   input' — describes the action, neutral across native and
   promise-based patterns. Description tightened to match.

3. Gate the residual 'Key props', 'Multiple interrupts', and 'Preprocess
   with handler' sections in useInterrupt.mdx behind <WhenFrameworkHas
   equals="native">. Those code blocks reference useInterrupt({...})
   directly — they only make sense on LangGraph. On promise-based
   frameworks they would have rendered alongside the gated promise
   intro, leaving readers with mixed-framework code on the same page.

Note: 'Missing snippet' yellow boxes still render on the hub page for
12 frameworks where hitl-in-chat cell is unshipped (ms-agent-{python,
dotnet}, agno, google-adk, pydantic-ai, llamaindex, claude-sdk-{python,
typescript}, langgraph-{typescript,fastapi}, langroid, spring-ai). That's
the dashboard's D-unshipped class — engineering work tracked in the
post-PR snippet-coverage audit Notion doc, not a docs-side gap.
2026-04-29 08:15:16 -07:00
Sam Julien 59dea8774d docs(showcase/shell-docs): restore human-in-the-loop nav + bring sub-pages to PDX-68 parity
The JTBD IA restructure (c11976819) replaced `...unselected` with
`...concepts` in meta.json. The HITL pages had been promoted out of
`unselected/` into canonical `human-in-the-loop/` (commit 6ebe0f447)
but were never re-listed in the new IA — pure oversight. They've been
URL-accessible the whole time but invisible from the sidebar.

Three changes:

- meta.json: list `human-in-the-loop`, `human-in-the-loop/useInterrupt`,
  `human-in-the-loop/headless` under 'Give Your App Agent Powers'.

- useInterrupt.mdx: drop the '(LangGraph)' suffix from the title;
  neutralize the description; split the framework-specific intro prose
  into native vs promise-based <WhenFrameworkHas> blocks (the snippet
  body sections were already gated). On ms-agent-python/dotnet readers
  no longer see the LangGraph 'first-class interrupt() primitive'
  framing as a default opener.

- headless.mdx: same pattern — neutralize description ('LangGraph
  interrupts' -> 'agent interrupts'), split intro framing into native
  vs promise-based gates, drop the residual 'LangGraph interrupt()'
  reference from the 'Going further' section.

Verified gating works on the dev server: `LangGraph ships a
first-class` renders only on /langgraph-{python,typescript,fastapi}/
and `Microsoft Agent Framework runtime can't pause` only on
/ms-agent-{python,dotnet}/. Other frameworks (ag2, agno, etc.) see
neither block — by design, since those cells are unshipped and the
manifest `interrupt_pattern` field is omitted.
2026-04-29 08:15:16 -07:00